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

MegaPIMP

General
81 Badges
Aug 5, 2003
1.791
0
Visit site
  • Crusader Kings II: Conclave
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Victoria 2
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Battle for Bosporus
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Arsenal of Democracy
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Magicka
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
Hello, I have a little problem with a event I'm writing.

################################
# Gold falls from the sky.
################################
Character_event = {
id = 99999

picture = "event_crusades"

trigger = {

condition = {
type = is_independent
}
condition = {
type = is_vassal
}
mean_time_to_happen = {
months = 1
modifier = {
condition = {
type = not
value = {
type = Ai
}



}
action_a = {#Get the gold!
effect = { type = gold value = 10000 }
effect = { type = piety value = 10000 }
effect = { type = prestige value = 10000 }
}
}
}


action_b = {#No we don't need it!
}
}


I get a error message about the "mean time to happen" line, and it does not fire.
So how do I get it to fire for all human players at the start of the game?
 
Your event is badly written, syntaxically, and lack a couple of {

Plus, use the cheat code: gold/piety/prestige from the console instead of making an event :rofl:

Cat
 
If you ever want to correct it:

Code:
################################
# Gold falls from the sky. 
################################ 
Character_event = {
id = 99999

picture = "event_crusades"

trigger = {
	condition = { type = ruler }
	condition = { type = not value = { type = Ai } }
	}

mean_time_to_happen = {
	months = 12
	}

action_a = {#Get the gold!
	effect = { type = gold value = 10000 }
	effect = { type = piety value = 10000 } 
	effect = { type = prestige value = 10000 }
	}

action_b = {#No we don't need it!
	}
}
Do not use small MTTH value.

Cat
 
Thank you, great cat. :)

It's my first go with event writing, and I patched it together with some other events if you wonder about some missing "{" ;)

It's not a "cheat" per se, but I'm trying to get a friend into the game over LAN, and cheats does not work in MP so I tried to create a event that gives us both some gold etc to get the ball rolling.
 
MegaPIMP said:
Hello, I have a little problem with a event I'm writing.

Code:
################################
# Gold falls from the sky. 
################################ 
Character_event = {
  id = 99999

  picture = "event_crusades"

  trigger = {

    condition = {
      type = is_independent
    }
    condition = {
      type = is_vassal
    }
The trigger conditions are contradictory. The pre-1.03 way to test for a ruler was to OR the is_independent and is_vassal conditions, but you've written it to AND them. (With 1.03 or later, you can test with a simple type = ruler.) You're also missing the closing } for the trigger section.
Code:
  mean_time_to_happen = {
    months = 1
    modifier = {
      condition = {
        type = not
        value = {
          type = Ai
        }
      }
Modifier blocks change the MTTH; since you don't want this event to trigger for AI characters, the test on ai belongs in the triiger block, not the MTTH block. The modifier block is missing a factor line and closing }, and the MTTH block is missing a closing }.
Code:
  action_a = {#Get the gold!
    effect = { type = gold value = 10000 }
    effect = { type = piety value = 10000 }			
    effect = { type = prestige value = 10000 }
  }		
}
}
There's two extra }s in the action_a block
Code:
  action_b = {#No we don't need it!
  }
}
This is the only section without errors.
I get a error message about the "mean time to happen" line,
Because it sees the mean_time_to_happen line when it is still inside the trigger block.
and it does not fire.
Because the trigger conditions are never both satisfied.
So how do I get it to fire for all human players at the start of the game?
There's no way to do precisely what you want, if I understand you correctly: trigger the event once for each player right at the start of the game. Any event will continue to be triggered throughout the game, as long as its trigger conditions are satisfied. Cat Lord's version of your event is about the closest you can get to what you want.
 
Last edited by a moderator: