• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Limith

Modding for Myself
18 Badges
Apr 7, 2010
3.740
369
  • Darkest Hour
  • Deus Vult
  • East India Company
  • Europa Universalis III Complete
  • Divine Wind
  • Crusader Kings II
  • Heir to the Throne
  • Rome: Vae Victis
  • Rome Gold
  • Sword of the Stars
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Stellaris Sign-up
  • 500k Club
  • Victoria 2
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
Hi, there is "enable_task" command but not "disable_task". This command could have been useful for controlling nuclear ability of AI natios. Just an idea..

You can disable in the tech tree via changing the tech that enables nuke usage to
command = { trigger = { not = { local_flag = THISTASKDISABLED } } type = enable_task which = BLAH }
and setting the task to disabled by default in misc.txt. Then when you want to disable it via event, simply use
command = { type = local_setflag which = THISTASKDISABLED }
and when you want to re-enable it again:
command = { type = local_clrflag which = THISTASKDISABLED }
 

makif130289

Field Marshal
78 Badges
Feb 20, 2008
3.631
63
  • Arsenal of Democracy
  • Supreme Ruler: Cold War
  • Europa Universalis IV: Res Publica
  • Iron Cross
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Darkest Hour
  • Crusader Kings II: Conclave
  • Stellaris
  • Imperator: Rome - Magna Graecia
  • Stellaris Sign-up
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Stellaris: Galaxy Edition
  • Stellaris: Lithoids
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Dharma
  • Crusader Kings II
  • Stellaris: Nemesis
  • Prison Architect: Psych Ward
  • Stellaris: Ancient Relics
  • Crusader Kings II: Holy Fury
  • Prison Architect
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Battle for Bosporus
  • Europa Universalis IV
  • Europa Universalis IV: El Dorado
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Victoria 2
  • Europa Universalis IV: Cradle of Civilization
  • Warlock 2: The Exiled
You can disable in the tech tree via changing the tech that enables nuke usage to
command = { trigger = { not = { local_flag = THISTASKDISABLED } } type = enable_task which = BLAH }
and setting the task to disabled by default in misc.txt. Then when you want to disable it via event, simply use
command = { type = local_setflag which = THISTASKDISABLED }
and when you want to re-enable it again:
command = { type = local_clrflag which = THISTASKDISABLED }

But that means i have to add new techs just to make them flags and to wait for AI countries to research them.