[SOLVED][0.18.18] Compatibility with older versions

Place to get help with not working mods / modding interface.
XaLpHa89
Fast Inserter
Fast Inserter
Posts: 122
Joined: Wed Jan 24, 2018 6:59 am
Contact:

[SOLVED][0.18.18] Compatibility with older versions

Post by XaLpHa89 »

I am able to start multiple servers with the same scenario. The function "game.reset_time_played()" does not yet exist in 0.17.79. I am looking for a variable (script.version, game.version, global.version) with which I can bridge the function. The only variable I found is _VERSION, this is the Lua version, but it doesn't help me.
Last edited by XaLpHa89 on Mon Apr 13, 2020 9:31 am, edited 1 time in total.
Pi-C
Smart Inserter
Smart Inserter
Posts: 1760
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: [0.18.18] Compatibility with older versions

Post by Pi-C »

XaLpHa89 wrote: Mon Apr 13, 2020 3:18 am I am able to start multiple servers with the same scenario. The function "game.reset_time_played()" does not yet exist in 0.17.79. I am looking for a variable (script.version, game.version, global.version) with which I can bridge the function. The only variable I found is _VERSION, this is the Lua version, but it doesn't help me.
You have access to the active mods, and considering that the game basically is the base mod, you should be able to get the game version this way:

Code: Select all

local version = game.active_mods["base"]
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Post Reply

Return to “Modding help”