News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Max vehicle price

Started by Zeno, August 12, 2009, 09:44:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zeno

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?

gerw

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.

Zeno

Thanks gerw. sigh...  :'(
I'll have to look for a walkaround then.

gerw


Zeno

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 ;)

jamespetts

Maybe the prices need to be increased to 64-bit?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Zeno

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)