Page 1 of 1

Disable Creeper Attacks

Posted: Sat Aug 17, 2013 10:38 am
by DRBLN
Hi!

I saved the game => opened saved game folder => opened control.lua => changed data (i put false instead of true)

initattackdata = function()
glob.attackdata = {
-- whether all attacks are enabled
enabled = false,
-- this script is allowed to change the attack values attackcount and untilnextattack
changevalues = true,
-- what distracts the creepers during the attack
distraction = defines.distraction.byenemy,
-- number of units in the next attack
attackcount = 5,
-- time to the next attack
untilnextattack = 60 * 60 * 60,


However, the creepers continue to attack.

How do I disable them?

Re: Disable Creeper Attacks

Posted: Sat Aug 17, 2013 10:39 pm
by zer0t3ch
DRBLN wrote:Hi!

I saved the game => opened saved game folder => opened control.lua => changed data (i put false instead of true)

initattackdata = function()
glob.attackdata = {
-- whether all attacks are enabled
enabled = false,
-- this script is allowed to change the attack values attackcount and untilnextattack
changevalues = true,
-- what distracts the creepers during the attack
distraction = defines.distraction.byenemy,
-- number of units in the next attack
attackcount = 5,
-- time to the next attack
untilnextattack = 60 * 60 * 60,


However, the creepers continue to attack.

How do I disable them?
The TestMode mod will allow you to do that.

Re: Disable Creeper Attacks

Posted: Mon Aug 19, 2013 11:51 am
by slpwnd
You changed the variable value in the init function. However the init function has been called only once in the beginning. Now the variable value is taken from the serialised script state.

Instead, open the console while playing the game (press ~ or /) and type:

Code: Select all

glob.attackdata.enabled = false