Re: A few more jobs/qustions

BryanRoach@aol.com
Date: 11/20/95


In a message dated 95-11-20 02:18:34 EST, you write:

>3: I want to spit coins up into 3 diffrent units.  IE 1 gold = 1000 copper
>1 silver = 100 copper.  IS there a way i can do this(Having the current 
>coin uinit be copper)  Basicly it would have to change all of the verable 
>from where it normaly saiod #of coins to # gold coins, # silver pennies, 
># copper pennies.  This includes shops, sc, and anywhere else

Actually.... You really wouldn't need 3 variables, just some fancy math...
If you have 3 currency denominators, the easy way is to just declare the
variable as floating point instead of integer, then base your money system
off decimal places to determine what coins the charater has. For example...

150.23  
a good system here would be:
1 silver = 100 copper
1 gold = 100 silver 

In the case above,  by grabbing the decimal place value of the floating point
variable, the character would have 23 copper, 50 silver, and 1 gold piece. 

- Brian



This archive was generated by hypermail 2b30 : 12/07/00 PST