The International Simutrans Forum

PakSets and Customization => Pak128 => Topic started by: grampybear on December 03, 2011, 12:17:37 PM

Title: metric to US measure
Post by: grampybear on December 03, 2011, 12:17:37 PM
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.
Title: Re: metric to US measure
Post by: Zeno on December 03, 2011, 12:54:14 PM
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.

Title: Re: metric to US measure
Post by: grampybear on December 03, 2011, 01:50:38 PM
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
Title: Re: metric to US measure
Post by: Zeno on December 03, 2011, 03:14:51 PM
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...
Title: Re: metric to US measure
Post by: falconne on December 03, 2011, 08:38:43 PM
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.
Title: Re: metric to US measure
Post by: VĂˇclav on December 03, 2011, 09:14:16 PM
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.
Title: Re: metric to US measure
Post by: grampybear on December 04, 2011, 12:35:04 AM
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