Vehicle speed units & conversion

Place to get help with not working mods / modding interface.
sillyfly
Smart Inserter
Smart Inserter
Posts: 1103
Joined: Sun May 04, 2014 11:29 am
Contact:

Vehicle speed units & conversion

Post by sillyfly »

Does anybody know what units the vehicle speed (in the lua interface) are in? Seem to be between 0 and about 1.
Is there a known way to convert this number to km/h, or maybe a modding interface to the function used by Factorio to display this info to the player?
sillyfly
Smart Inserter
Smart Inserter
Posts: 1103
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Vehicle speed units & conversion

Post by sillyfly »

I think I got it -
if the speed is given in tiles/tick this means the conversion should be speed * 60 * 3.6 = km/h.
This is consistent with old version having trains max out at 1.2, which in new versions is 259.2 = 216*1.2
Post Reply

Return to “Modding help”