Page 1 of 1
Changing effect of modules in control.lua
Posted: Sat Mar 04, 2017 6:17 pm
by sensenmann
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
Posted: Sat Mar 04, 2017 6:25 pm
by daniel34
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.
Re: Changing effect of modules in control.lua
Posted: Sat Mar 04, 2017 7:24 pm
by sensenmann
Thanks for the hint, but how do i get all the modules i want to switch out that are currently in existence?