In my current game and Mod, I want to change an entity from type = "container" to type = "logistic-container"
But this is causing the game to crash on load. The entities are already built in the save, the crash does not happen if they have not yet been built.
Is there a way for me to fix this using Migrations or will the change not be save compatible?
Thanks.
Migrations question
-
- Fast Inserter
- Posts: 157
- Joined: Fri Jun 26, 2015 11:13 pm
Re: Migrations question
There are two kinds of migrations, JSON and LUA. The JSON migration allows you to change one type of entity to another. The LUA option gives you full scripting flexibility.
I have only done a bit of migration, so I'm just guessing here, but you might be able to use the LUA migration to find all of the "bad" containers, then destroy and rebuild them with the new container type.
I have only done a bit of migration, so I'm just guessing here, but you might be able to use the LUA migration to find all of the "bad" containers, then destroy and rebuild them with the new container type.
Re: Migrations question
Thanks for the replay, sounds a little out of my league.johanwanderer wrote:There are two kinds of migrations, JSON and LUA. The JSON migration allows you to change one type of entity to another. The LUA option gives you full scripting flexibility.
I have only done a bit of migration, so I'm just guessing here, but you might be able to use the LUA migration to find all of the "bad" containers, then destroy and rebuild them with the new container type.