Migration file order

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
badtouchatr
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Aug 20, 2016 8:00 pm
Contact:

Migration file order

Post by badtouchatr »

As far as I can tell re: migration scripts, ALL json files are run before ANY lua files, regardless of their filenames or version numbers. Can someone verify this?

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Migration file order

Post by bobingabout »

This is correct.

This is because a JSON file typically replaces entities that no longer exist with a new version, or replacement, which needs to be done before the game is fully initialised.
LUA is run after initialisation.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

badtouchatr
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Aug 20, 2016 8:00 pm
Contact:

Re: Migration file order

Post by badtouchatr »

bobingabout wrote:
Thu Apr 25, 2019 9:54 am
This is correct.

This is because a JSON file typically replaces entities that no longer exist with a new version, or replacement, which needs to be done before the game is fully initialised.
LUA is run after initialisation.
Thanks, Bob.

So, if we delete a recipe/item/technology, then there's no way to avoid the migration message for that, because the .json file only does "renames", right?

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Migration file order

Post by bobingabout »

badtouchatr wrote:
Thu Apr 25, 2019 9:59 am
bobingabout wrote:
Thu Apr 25, 2019 9:54 am
This is correct.

This is because a JSON file typically replaces entities that no longer exist with a new version, or replacement, which needs to be done before the game is fully initialised.
LUA is run after initialisation.
Thanks, Bob.

So, if we delete a recipe/item/technology, then there's no way to avoid the migration message for that, because the .json file only does "renames", right?
it can migrate those too, not just entities, but yeah, there's no way to avoid the migration message.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

badtouchatr
Long Handed Inserter
Long Handed Inserter
Posts: 80
Joined: Sat Aug 20, 2016 8:00 pm
Contact:

Re: Migration file order

Post by badtouchatr »

bobingabout wrote:
Thu Apr 25, 2019 11:01 am
it can migrate those too, not just entities, but yeah, there's no way to avoid the migration message.
Thanks for your help and insight on this.

Post Reply

Return to “Modding discussion”