Page 1 of 1
Add a way to read the game version from within a mod
Posted: Fri Jul 15, 2016 12:37 pm
by Killkrog
Title says it all.
Would make it a lot easier to apply automated fixes to saved information after major updates.
Cheers!
Re: Add a way to read the game version from within a mod
Posted: Fri Jul 15, 2016 2:47 pm
by ssilk
Re: Add a way to read the game version from within a mod
Posted: Fri Jul 15, 2016 2:59 pm
by Killkrog
Doesnt fire without an actual update.
Re: Add a way to read the game version from within a mod
Posted: Fri Jul 15, 2016 3:57 pm
by steinio
Seems killkrog means a game version change, not a mod change.
So you need a on_version_changed event.
Greetings steinio
Re: Add a way to read the game version from within a mod
Posted: Fri Jul 15, 2016 4:04 pm
by Killkrog
The event ssilk meant handles both, but like I said, wont fire without update.
Re: Add a way to read the game version from within a mod
Posted: Fri Jul 15, 2016 4:05 pm
by daniel34
You can use
http://lua-api.factorio.com/0.13.8/LuaG ... ctive_mods to access the version of the "base" mod, which gives you the current running version of Factorio.
Note: this is bugged in 0.13.8 (possibly also in previous versions), fixed for 0.13.9:
viewtopic.php?f=30&t=29088
Re: Add a way to read the game version from within a mod
Posted: Fri Jul 15, 2016 8:44 pm
by Killkrog
Oh nice, never thought about the fact that the game itself also is considered a mod.
Thanks Daniel!
Re: Add a way to read the game version from within a mod
Posted: Sat Jul 16, 2016 11:38 am
by ssilk
Moved from Suggestions to Technical Help.