Migration file order
-
- Long Handed Inserter
- Posts: 80
- Joined: Sat Aug 20, 2016 8:00 pm
- Contact:
Migration file order
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?
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Migration file order
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.
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.
-
- Long Handed Inserter
- Posts: 80
- Joined: Sat Aug 20, 2016 8:00 pm
- Contact:
Re: Migration file order
Thanks, Bob.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.
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?
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Migration file order
it can migrate those too, not just entities, but yeah, there's no way to avoid the migration message.badtouchatr wrote: Thu Apr 25, 2019 9:59 amThanks, Bob.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.
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?
-
- Long Handed Inserter
- Posts: 80
- Joined: Sat Aug 20, 2016 8:00 pm
- Contact:
Re: Migration file order
Thanks for your help and insight on this.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.