I tried:
Code: Select all
game.item_prototypes["speed-module"].module_effects["speed"]["bonus"] = 0.5
Isnt there any way of changing the bonus of a module mid-game?
Code: Select all
game.item_prototypes["speed-module"].module_effects["speed"]["bonus"] = 0.5
This is not a solution! This is a hack!kikker450 wrote:Load the entities you want to replace with in the midgame beforehand and write some script to replace every entity (with LuaEntity not LuaEntityPrototype) with that pre-written entity when you want to.
Now the table raw is 3-5 MB in text format. Is it problem?Rseding91 wrote:Every prototype is read-only - this is by design. If a prototype wasn't read-only then it would need to be included in the save file and would massively increase the save size, save time, and amount of RAM used.
kikker450 wrote:Load the entities you want to replace with in the midgame beforehand and write some script to replace every entity (with LuaEntity not LuaEntityPrototype) with that pre-written entity when you want to.