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

Loliveira103

Recruit
74 Badges
Nov 16, 2012
2
0
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Magicka
  • Knights of Pen and Paper +1 Edition
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Jade Dragon
  • Prison Architect
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Cities: Skylines Industries
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: No Step Back
  • Imperator: Rome Sign Up
  • Cities: Skylines - Campus
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Prison Architect: Psych Ward
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Battle for Bosporus
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Hearts of Iron IV: By Blood Alone
  • Stellaris Sign-up
I'm creating an event that potentially needs to repeat a few times throughout the game. And it has 3 potential paths according to the trigger. It turns out that it only applies the effects the first time it is activated, despite recognizing the other two triggers. If it pulls one of the actions (remove and add traits), it doesn't do the same the second time it's activated.Traits are one level above those used as triggers

The code used below:

country_event = {
id = originsextended_gods.401
title = "originsextended_gods.401.name"
desc = "originsextended_gods.401.desc"
picture = GFX_evt_crisis_defeated
show_sound = event_mystic_reveal_light

is_triggered_only = yes

trigger = {
any_owned_leader = {
OR = {
has_trait = trait_originsextended_gods_council_blessed
has_trait = trait_originsextended_gods_nobilis_blessed
has_trait = trait_originsextended_gods_generic_blessed
}
}
}

option = {
name = "originsextended_gods.401.a"
}

after = {
leader = {
switch = {
trigger = has_trait
trait_originsextended_gods_council_blessed = {
remove_trait = trait_originsextended_gods_council_blessed
add_trait = trait_originsextended_gods_council_blood
add_skill = 1
}
trait_originsextended_gods_nobilis_blessed = {
remove_trait = trait_originsextended_gods_nobilis_blessed
add_trait = trait_originsextended_gods_nobilis_blood
add_skill = 1
}
trait_originsextended_gods_generic_blessed = {
remove_trait = trait_originsextended_gods_generic_blessed
add_trait = trait_originsextended_gods_generic_blood
add_skill = 1
}
}
}
}
immediate = {
owner = {
country_event = {
id = originsextended_gods.401 days = 30 random = 30
}
}
}
}