As some people might know there is a command you can use ingame to update modded recipe cost
My wish is to implement this code in the "command"-lua file so this command is done everytime the game starts(initializes)/c game.player.force.reset_recipes()
With
it can be done, but the problem is, that this wont work as exspected.script.on_init(init)
Imagine this:
-Original Laser turret recipe cost is 5 batteries
-Mod changes it to 8
If you start game manually and use "/c game.player.force.reset_recipes()" it works as expected->turret costs 8 batteries
If the savegame already has the recipes updated(8 batteries) and you add /c game.player.force.reset_recipes() in lua-command file and restart the game the cost is then resetted 5 batteries
The weird thing is, that other recipes dont get resetted to its original state. I will try around a little bit, also this problem is not too important but if anybody knows how to fix this, it would be nice.
bascially what I want to do is to automate "/c game.player.force.reset_recipes()" so if I update my mod and other people download it, they dont miss this "mandatory" input.