Nicolas Weeger wrote: > Also, the price estimation seems quite weird - you set the price to eg > 2000 silver, and player will pay ~500 platinum :) > I suspect it's due to the query_cost and such functions using charisma / > shop specialization / ...
yes. Presumably, shop specialization could be turned off, or made equal for everything, fixing that problem. IIRC, the value of the object is largely its sell value (with various adjustments), buy price is higher. I'm also not sure how you deal with multiple items (too lazy right now to look at the patch). If I have 20 arrows and set the price to 5000 sp, is that 5000 sp for all 20 (250 sp each), or 5000 sp each? You could get odd effects with that also. I'm also not sure if it being on the shop floor may set the identified flag - if for example you set the price to 2000 sp, but that is before it is identified, then once identified, the price could go up quite a bit. IIRC, unidentified items only get pennies on the dollar (silvers on the platinum?) The real fix for all this would be to add an object flag like 'flag_true_cost', which causes the buy/sell code to use the op->value without modifying for various things, basically like the gem code (but with just a minor increase/decrease for buy/sell, but a fixed amount, so you couldn't sell something for the same price you bought it). Perhaps even use a key/value in the object itself to denote that rate? this I think also fixes other problems, in that price is also tweaked based on other attributes of an item - wands are basically pro-rated based on the number of charged. So if the seller set the price for a wand with 10 charges to 10 platinum, the query_cost would effectively reduce that to 2 platinum since the wand only has 20% of its potential charges, etc. I'd think that for this code, when you set the price, the player doing so is already taking all that into consideration and doesn't want the code further mucking with the values. _______________________________________________ crossfire mailing list crossfire@metalforge.org http://mailman.metalforge.org/mailman/listinfo/crossfire