Changing effect of modules in control.lua
-
- Burner Inserter
- Posts: 13
- Joined: Tue Feb 28, 2017 5:04 pm
- Contact:
Changing effect of modules in control.lua
After trying for some while i wonder how it is possible to change the effect of modules while running the game, for example a module that gets stronger with the number of items manufactured. Or a module that gets stronger when enemies are killed.
Re: Changing effect of modules in control.lua
The effect of modules is defined in the prototype, which can only be changed in data.lua.
What you can do is creating several identical modules except increasing productivity/speed/... in data.lua and then (invisible to the player) switch them out in control.lua to simulate that the module got better.
What you can do is creating several identical modules except increasing productivity/speed/... in data.lua and then (invisible to the player) switch them out in control.lua to simulate that the module got better.
-
- Burner Inserter
- Posts: 13
- Joined: Tue Feb 28, 2017 5:04 pm
- Contact:
Re: Changing effect of modules in control.lua
Thanks for the hint, but how do i get all the modules i want to switch out that are currently in existence?