Page 1 of 1
modify existing recipe
Posted: Thu Sep 12, 2013 8:57 pm
by grobyc
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?
Re: modify existing recipe
Posted: Thu Sep 12, 2013 9:08 pm
by ficolas
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()
Re: modify existing recipe
Posted: Thu Sep 12, 2013 9:22 pm
by grobyc
Already done it by creating migration file in mod, good to knew alternative.
Re: modify existing recipe
Posted: Thu Sep 12, 2013 10:47 pm
by kovarex
ficolas 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()
This is better than
Code: Select all
game.player.force.reloadrecipes();
Because soon(er or later), we will start modifying recipe of players (technology to make some recipes cheaper for example).
This way you would revert all these kind of changes.