Page 1 of 1

Receipt change - Save/Load game

Posted: Tue Aug 23, 2016 9:05 am
by TomyTheBest
HI all,

I had a newbie question about basic mod changes.
I have a few mods added to my library that give me some fabulous new items. I believe the receipt of one of the new item have some issues about the inputs. I found the way to change the receipt, but i realize even if the factorio load all the mods at the start up, the changes works only in new games.
If i load back my previously saved game (where I already made a few items based on the original - presumably wrong - receipt) the requested inputs for the item is same as before. That means for me the 'save' code contains information about the outdated receipt of the already constructed items. At this point I'm stuck.
Do you know any possibility to make the receipt change active in a previously saved game? It works with only the items I never constructed in the saved game before.

Thank you,

Re: Receipt change - Save/Load game

Posted: Tue Aug 23, 2016 9:39 am
by Nexela
You need to reset the recipes. you can do it either in a migration lua file or in the on_configuration_changed event in your control.lua or through the command line. The first 2 options require bumping up your version number.

Code: Select all

script.on_configuration_changed(function(event) 
for _, force in pairs(game.forces) do
force.reset_recipies()
end
end)

Re: Receipt change - Save/Load game

Posted: Tue Aug 23, 2016 2:12 pm
by DedlySpyder
I believe the game automatically triggers reset recipes and technologies, but only if the mod version number changed. Did you only change the recipe, but not increase the version number?

Re: Receipt change - Save/Load game

Posted: Tue Aug 23, 2016 10:57 pm
by TomyTheBest
DedlySpyder wrote: Did you only change the recipe, but not increase the version number?
That is correct.

The removing and copied back mod files are also solved my issue. Even if it is the most barbarian way. :)
I believe I will need to learn a lot about modding in the future.
Thanks for your help guys.