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?
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.
Thanks gerw. sigh... :'(
I'll have to look for a walkaround then.
What do you want to do?
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 ;)
Maybe the prices need to be increased to 64-bit?
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)