Page 1 of 1

Migrations question

Posted: Wed Sep 02, 2015 4:48 pm
by TheSAguy
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.

Re: Migrations question

Posted: Thu Sep 03, 2015 9:41 pm
by johanwanderer
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.

Re: Migrations question

Posted: Thu Sep 03, 2015 10:48 pm
by TheSAguy
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.
Thanks for the replay, sounds a little out of my league. :roll: