Add a way to read the game version from within a mod

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Add a way to read the game version from within a mod

Post by Killkrog »

Title says it all.

Would make it a lot easier to apply automated fixes to saved information after major updates.

Cheers!

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add a way to read the game version from within a mod

Post by ssilk »

Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: Add a way to read the game version from within a mod

Post by Killkrog »

Doesnt fire without an actual update.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Add a way to read the game version from within a mod

Post by steinio »

Seems killkrog means a game version change, not a mod change.

So you need a on_version_changed event.

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: Add a way to read the game version from within a mod

Post by Killkrog »

The event ssilk meant handles both, but like I said, wont fire without update.
Last edited by Killkrog on Tue Aug 02, 2016 10:30 pm, edited 1 time in total.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Add a way to read the game version from within a mod

Post 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
quick links: log file | graphical issues | wiki

User avatar
Killkrog
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Jun 09, 2016 1:04 pm
Contact:

Re: Add a way to read the game version from within a mod

Post by Killkrog »

Oh nice, never thought about the fact that the game itself also is considered a mod.
Thanks Daniel!
Last edited by Killkrog on Tue Aug 02, 2016 10:30 pm, edited 1 time in total.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Add a way to read the game version from within a mod

Post by ssilk »

Moved from Suggestions to Technical Help.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Technical Help”