• 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.

Botox

Major
65 Badges
Jul 19, 2007
661
832
  • Cities: Skylines Industries
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Cities: Skylines - Campus
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV
  • Crusader Kings III
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Hearts of Iron IV: Colonel
  • Stellaris: Distant Stars Pre-Order
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Surviving Mars: First Colony Edition
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Surviving Mars: First Colony Edition
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Victoria 2: Heart of Darkness
  • A Game of Dwarves
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Europa Universalis III
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Lost Empire - Immortals
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
Can you set a planet-flag with an edict?

Was trying to add an edict that triggers an event for that specific planet. As I haven't found any edicts that set a flag, just modifiers, question is can you and how would it look like?
 
This is pure speculation but try this
Code:
    immediate = {
        set_global_flag = YOUR_FLAG
   }
Be aware that even if this works the flag would stay when the edict ends.
Already tried it with
Code:
immediate = {
set_planet_flag = YOUR_FLAG
}
But it doesnt work.
I wanted to add an edict that triggers an event. The edict works but the flag is not set. Fired the event just to get the error that there is no planet with said flag. Tripple-checked for spelling and stuff but nothing.

Very annoying.
 
This is pure speculation but try this
Code:
    immediate = {
        set_global_flag = YOUR_FLAG
   }
Be aware that even if this works the flag would stay when the edict ends.

Another way is to create a modifier with the same duration as the edict. You can then check for the modifier in your events and it goes away at the end of the duration. Note that you would have to define the modifier (even as blank) in the Static_Modifiers file

add_modifier = {
modifier = "my_modifer"
days = 3600
}
 
  • 1
Reactions:
Another way is to create a modifier with the same duration as the edict. You can then check for the modifier in your events and it goes away at the end of the duration. Note that you would have to define the modifier (even as blank) in the Static_Modifiers file

add_modifier = {
modifier = "my_modifer"
days = 3600
}
I never thought about modifiers... thanks!
 
So I tried the following:
Code:
## 01_planetary_edicts.txt
# Abandon Colony Edict (handle with care)
planet_edict = {
   name = "abandon_player_colony"
   influence_cost = @standardEdictCost
 
   allow = {
   }
 
   ai_weight = {
     weight = 0
   } 
}

## colony_events.txt
# Abandon Player Colony Event (trigger after edict)
planet_event = {
   id = abandon_player_colony.1
   title = "colony.12.name"
   desc = "colony.12.desc"
   picture = GFX_evt_nuclear_explosion
   show_sound = event_super_explosion
   location = ROOT
 
   trigger = {
     has_planet_edict = "abandon_player_colony"
   }
 
   mean_time_to_happen = {
     months = 1
   }
   
   option = {
     name = ABANDON
     destroy_colony = yes
   }
}
That does seem to work meh...
I can set the edict, which give the planet the modifier.
I can fire the event and remove a colony if I have that planet highlighted atm I fire the event (but says there is no modifier of that kind to be found).
It does not trigger due to having the modifier on the colony... wondering what I've done wrong there :/
 
Might be that planet events don't work like that, every planet_event that I've seen is triggered only. Try making a country event with trigger = {any_planet = {has_planet_edict = EDICT} that fires the event.
 
  • 1
Reactions:
like this one

Code:
# Forests Move
planet_event = {
   id = colony.12
   title = "colony.12.name"
   desc = "colony.12.desc"
   picture = GFX_evt_alien_nature
   show_sound = event_alien_nature
   location = ROOT
  
   trigger = {
     has_modifier = "migrating_forests"
   }
  
   mean_time_to_happen = {
     months = 80
   }
  
   immediate = {
     random_tile = {
       limit = {
         has_blocker = "tb_wandering_forests"
         any_neighboring_tile = {
           has_blocker = no
           has_grown_pop = no
           has_building = no
           has_building_construction = no
         }
       }
       remove_blocker = yes
       random_neighboring_tile = {
         limit = {
           has_blocker = no
           has_grown_pop = no
           has_building = no
           has_building_construction = no
         }
         set_blocker = "tb_wandering_forests"
       }
     }
   }
  
   option = {
     name = PECULIAR
   }
}
Will think about it a while. There must be a way to check for edicts...