Shops and Jade/Amberium

Technical and coding related questions.

Moderator: Board moderators

Post Reply
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Shops and Jade/Amberium

Post by SilverNexus »

Wouldn't it make sense for shops to deal in amberium and jade when the player sells items? They make change for amberium and jade when the player buys, after all. It would prevent the player having to lug around umpteen-bajillion (<sarcasm>a very specific number</sarcasm>) platinum until they can find a bank of Skud.

I would guess all it would take is an extrapolation of the already existing coding that handles the values between platinum, gold, and silver to include jade and amberium.

Maybe I'm wrong though; it seems that such a simple change would have been done by now.
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

Hello.


When selling, the sale is done item by item, so the player gets the sum incrementally.

So it's not merely changing the code to use amberium, it's some rewriting to first compute the whole sum, then give the money in correct change :)
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Post by SilverNexus »

But then, wouldn't it just be rewriting the correct change calculation to calculate jade and amberium? The total value of the items wouldn't change, just the coins it is disbursed in would (the change would change, not the value :wink: )
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

That's not that easy to do, because the coins are given object by object. So money should be first accumulated then given :)


I'll try to glance at that when I get time.
mwedel
Regular
Posts: 86
Joined: Tue Jul 17, 2007 5:23 am
Location: Santa Clara, CA, USA

Post by mwedel »

Just to clarify what Ryo said:

If you sell 20 items for 1 sp each, you will not end up with 2 gold, but 20 sp. The player never has an option to hand in change to get a large denomination, like someone could in real life (instead of giving me $4.52 in change, here is $.50, and give be $5.02)

While it would not be hard to collapse coinage (automatically convert all less denominations into larger ones when selling), that may have unintended consequences - in the past, there was some needs to have certain specific currencies to buy things, so if you need 1000 gp (and not an amount of platinum equal to that worth), it would be annoying if you sold something and ended up with 202 pp, 3 gp, etc if you had just gone to the bank to exchange 200 pp into 1000 gp.

My personal thought is that the entire currency handling in crossfire adds a fair amount of complexity to the code (to find out how much money the player has, you need to traverse the inventory and total things up, making change is more of a pain, etc). It would be much simpler I think to have something like a stat which is 'money', which perhaps get displayed in broken down increments (200 pp, 3 gp, 5 sp). For any system operations, like selling/buying, that greatly simplifies logic - just increment/decrement that stat.

For cases where legacy coinage is still needed, create a special money purse type item which lets characters pull out whatever coinage they want. Likewise, any coinage put into the purse just increments the players money total.
SilverNexus
Junior member
Posts: 165
Joined: Mon Jun 25, 2012 5:33 pm
Location: Planet Earth

Post by SilverNexus »

Perhaps we're not quite on the same page.

I was thinking of merely something that would incorporate jade and amberium into the already existing change algorithms.

For example, if you sell an item (or stack of items) worth 123 platinum coins, you would get one jade and 23 platinum for it. Of course, the estimated value would also reflect the currencies being paid to the player. If that 123 platinum was accumulated over multiple non-stacked items, however, those change values don't collapse any more than they already would.

This probably would effect low-level characters very little, being of more use to characters who come across more valuable treasure.

I thought of this after selling something for over 100 plat (I don't remember what it was anymore), thinking it would have been more convenient if the store had consolidated the 100 plat into a jade coin,
That SilverNexus guy? You needn't worry about him.
He is level negative 4 in oratory, and his singing is worse.
Post Reply