Log in

View Full Version : Editing Item Price


sonicintuition
09-03-2007, 01:31 PM
Hello all,


I have searched high and low about editing item price in the database, and I figured it out ...column "price" and the number you put in is the amount of copper ...so 500 would be 5 gold. Great ...however there's a small problem ..when I enter in a price, say, 15000, which should be 15 plat, the price doesn't work in game - it ends up being more or less than 15 plat, by quite a bit in most cases. What am I doing wrong, or is this by design?

Regards,
Sonic

soulshot
09-04-2007, 01:08 AM
Last time I checked you are able to set COST of items in the database but you are unable to modify the sell to npc price/percentage. Is this still the case?

-Mard

sonicintuition
09-04-2007, 05:51 AM
I'm referring to the price field. The value in the price field is what determines how much an NPC will sell the item for, in this format:

1=1cp
10=1sp
100=1gp
1000=1pp

So if I plugged in a value of 350000, that *should* be 350 plat. But in game, it isn't ...it ends up being about 20-30 platinum off, usually higher than 350. That's what I'm trying to figure out.


Regards,
Sonic

sfisque
09-04-2007, 07:42 AM
IIRC the price is the base value of the object before adjusting for "merchant profit", faction, charisma, etc. you'll probably never see an item on an npc for the exact value plugged into the database.

from client_process.cpp:

inst->SetPrice(item->Price*127/100);

so it seems all items undergo a merchant markup of 27%. which isnt too bad. IIRC macy's used to have a 300% markup. :-P

== sfisque

sonicintuition
09-04-2007, 10:44 AM
Ahhh, okay ..I figured that might have something to do with that. Evidently, it does. Thanks for clearing that up. :)

Regards,
Sonic