The International Simutrans Forum

 

Author Topic: metric to US measure  (Read 2258 times)

0 Members and 1 Guest are viewing this topic.

Offline grampybear

  • *
  • Posts: 176
metric to US measure
« 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.

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: metric to US measure
« Reply #1 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.


Offline grampybear

  • *
  • Posts: 176
Re: metric to US measure
« Reply #2 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
« Last Edit: December 03, 2011, 02:15:54 PM by grampybear »

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: metric to US measure
« Reply #3 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...

Offline falconne

  • *
  • Posts: 51
Re: metric to US measure
« Reply #4 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.

Offline Václav

  • Devotee
  • *
  • Posts: 3267
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: metric to US measure
« Reply #5 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.

Offline grampybear

  • *
  • Posts: 176
Re: metric to US measure
« Reply #6 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