News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

metric to US measure

Started by grampybear, December 03, 2011, 12:17:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

grampybear

Good morning all, I am playing with converting the goods list to US measure and have a problem with liquids. The oil trailer truck calls for a payload of 26 m^s (which runs on the road just fine) but when I convert to gals (x264) the same truck will not move. Please point me in the right direction. Thank you for any help
EDIT: the refinery has been converted to gallons produced and the gas station also.

Zeno

I can't imagine what are you playing with, but I guess that if you load 26x264 units (whatever they are) into a single lorry, then it will not move ever due to the overwheight, unless you change the base weight per unit. Have you taken a look to that? IIRC it's in the goods DAT file as well.


grampybear

#2
This is not part of any game just experimenting with converting the std metric currently in game to US measure. I started with oil, converting oil rig to gallons produced, gas station to gallons consumed and oil truck to gallons transported. The payload for the oil trailer is 26M^3. One M^3 =264 us gal so I converted trailer payload to 6864 gals

EDIT:Thank you , I had over looked the weight per unit. Works better now

Zeno

Aaah, that was the only thing that made some sense to me. Good to know that you found it :)
I guess that a good weight/unit would be to divide the existing value per 264, so vehicle's physics remain untouched for you. But probably you already did that...

falconne

Why not just do the conversion at the UI level and leave the quantities unchanged? It would be safer. If you want to do it properly you could add an extra method to the translate class to do localised unit conversion and also create an en_US language file maybe (because some vehicle description text is in composite form). But that's probably overkill if you just want to do this for yourself.

Václav

I am not sure but ...

I think that coversion between both scales (metric and US - but may it be that simplier conversion will be between cube metres and liters - because in some languages m3 is not displayed right) may be part of translation - with minor change of translation process. Units would be showed after each number of load (in dialogue of vehicle), not after last one.

So there would be shown (for example) 90 000 l of 180 000 l instead 90 of 180 000 l.

In dialogue of depots it would be a little simplier.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

grampybear

Sorry gentlemen, you are both way over my head ??? ,but I am learning. That is one of the very nice things about open source, I can play around with the information code, see my results and then actually play my changes ;D . Thanks for all the great help I get here in forum