The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: Zeno on August 12, 2009, 09:44:30 PM

Title: Max vehicle price
Post by: Zeno on August 12, 2009, 09:44:30 PM
Which is the maximum purchasing price I can give to a vehicle?
I was making some tests and I got a 7M cost when I wrote 50M in the DAT... Maybe trunked number?
Title: Re: Max vehicle price
Post by: gerw on August 13, 2009, 08:42:15 AM
The internal price variable is an uint32. Thus the maximum value is 2^32 ~ 4.2e9 _cent_, i.e. 42M. But when the price is accounted to the player, it is converted to a sint32. So the max price simutrans can handle is only 21M.
Title: Re: Max vehicle price
Post by: Zeno on August 13, 2009, 10:51:26 AM
Thanks gerw. sigh...  :'(
I'll have to look for a walkaround then.
Title: Re: Max vehicle price
Post by: gerw on August 13, 2009, 10:55:00 AM
What do you want to do?
Title: Re: Max vehicle price
Post by: Zeno on August 13, 2009, 11:28:13 AM
I was making some tests with really big ships (300-400 m. long ones), and I am balancing prices, running costs, etc. I was getting quite high numbers (between 20 and 40 millions) due to the big size and weight (between 40 and 60 thousand tons weight); I will pull down the structure cost (calculated as a weight penalty) and raise a little bit running costs; nothing to worry as these are just tests ;)
Title: Re: Max vehicle price
Post by: jamespetts on August 13, 2009, 10:13:42 PM
Maybe the prices need to be increased to 64-bit?
Title: Re: Max vehicle price
Post by: Zeno on August 14, 2009, 08:00:23 AM
Quote from: jamespetts on August 13, 2009, 10:13:42 PM
Maybe the prices need to be increased to 64-bit?
I'm not sure it's worthy. Has it any sense a purchase price over 20M?? I think it doesn't; most ships/airplanes have prices around 1-2 millions, and I think it's high enough in comparison with train and truck prices. Now monster-ships (or planes) have size-penalty factors applying to price, but I've made some tests and they are mostly below 10M, which is expensive enough 8)