I have write some mod, create recipe run game, and play with it.
Now I want modify it and add to technology tree. I do this and problem was appeared.
When I start new game item require technology first and recipe is modify.
When I load old save, item doesn't require technology and recipe use old materials.
Any clue what to do with this?
modify existing recipe
Re: modify existing recipe
the title tells me what you need is this:
https://forums.factorio.com/forum/vie ... =25&t=1221
And with the text I think that what you need to do is to reload the recipes in old saves
To do that you need to use:
game.player.forze.recipes["the recipe name"].reload()
https://forums.factorio.com/forum/vie ... =25&t=1221
And with the text I think that what you need to do is to reload the recipes in old saves
To do that you need to use:
game.player.forze.recipes["the recipe name"].reload()
Re: modify existing recipe
Already done it by creating migration file in mod, good to knew alternative.
Re: modify existing recipe
This is better thanficolas wrote: And with the text I think that what you need to do is to reload the recipes in old saves
To do that you need to use:Code: Select all
game.player.force.recipes["the recipe name"].reload()
Code: Select all
game.player.force.reloadrecipes();
This way you would revert all these kind of changes.