Page 1 of 1

[0.10.9] Mod deletion doesn't resets recipes.

Posted: Fri Sep 05, 2014 1:09 pm
by Martc
Step to reproduce:
1) Activate mod that modifies any base recipe. (e.g. DyTech-Modules).
2) Load some game and save it with mod active. If you check blueprint you will see that is modified from mod.
SpeedModule1.png
SpeedModule1.png (191.56 KiB) Viewed 5358 times
3) Exit game and delete mod (Disabling mod is not enough).
4) Load game from step 2 and check blueprint. You will see that is still modified, but the message which mod done that disappeared.
SpeedModule2.png
SpeedModule2.png (209.09 KiB) Viewed 5358 times
I think that recipes should be reset when you load game with missing or disabled mod.

Re: [0.10.9] Mod deletion don't resets recipes.

Posted: Fri Sep 05, 2014 7:34 pm
by Rseding91
The only time recipes are reset is when you trigger them to be reset In code: game.resetrecipes() - that's standard behavior.

Re: [0.10.9] Mod deletion don't resets recipes.

Posted: Fri Sep 05, 2014 7:57 pm
by FishSandwich
It shouldn't be, if I turn off a mod I want it turned off, including all of its features.

Getting the game to reset recipes when it removes all other mod related stuff should be standard.

Re: [0.10.9] Mod deletion don't resets recipes.

Posted: Fri Sep 05, 2014 8:25 pm
by Rseding91
Just so everyone reading this is aware: resetting recipes clears what's in the assembler's crafting queue erasing the items. I personally wouldn't want that to happen every time I change mod versions/remove a mod/add a mod.

Re: [0.10.9] Mod deletion don't resets recipes.

Posted: Sat Sep 06, 2014 1:12 pm
by Martc
But now you have no clue that recipe was modified and you should call game.resetrecipes(). Because text that recipe was modified is missing.

Re: [0.10.9] Mod deletion doesn't resets recipes.

Posted: Tue Sep 09, 2014 12:30 pm
by kovarex
I just wanted to clear why is the recipe reseting problem in the game on the first place. There is a concept, that we would like to create in the game, but we just hadn't time to get to it. Imagine research that changes the recipe for the current player, something like efficient steel processing, which changes the recipe to require one less iron. But the change will just effect the current player. This is the reason, why we have the copy of recipes of current player. The reset recipes currently just takes all the default versions and re-sets them.

We talked about this, and I believe we found a solution to make it all work automatically. The resetrecipes lua method will be removed completely, and the engine will automatically rebuild the recipes when mod configuration changes on game load. The trick is, that it will remember the changes made by research (or by other effects) separatly, so they will be applied anyway, when the recipes are rebuilt. This could go even further, the game could remember which mod created each applied changes to recipe. So if you remove mod that contained research to change recipe. The applied change will go away once you remove the mod as well, but the applied changes of other mods will stay.

Re: [0.10.9] Mod deletion doesn't resets recipes.

Posted: Tue Sep 09, 2014 1:06 pm
by kovarex
Anyway, for 0.10.10 the change is, that the resetrecipes is called automatically whenever Factorio version or mod configuration changes (Change of mod configuration includes change of mod version).

Re: [0.10.9] Mod deletion doesn't resets recipes.

Posted: Fri Dec 26, 2014 12:31 pm
by YuokiTani
kovarex wrote:Anyway, for 0.10.10 the change is, that the resetrecipes is called automatically whenever Factorio version or mod configuration changes (Change of mod configuration includes change of mod version).
so it's no other way to reset recipes in game or with lua ?
if someone make a mod, and change the recipe he need to bump alway version numbers or rename recipes to see effekt in game ?

Re: [0.10.9] Mod deletion doesn't resets recipes.

Posted: Fri Dec 26, 2014 1:16 pm
by kovarex
You can still call resetrecipes manually.