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

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
It depends on what you want to do. Do you want for all nations to have a specific event a a given date? Then, it would look like this:
Code:
event = {
   id = 135460
   persistent = yes
   trigger = { atwar = no }

   date = { day = 6 month = january year = 1936 }
   name = "1936 Winter Olympics"
   desc = "It's time for a great festival of sport! Winter Olympics starting in Garmisch-Partenkirchen today!"

   action = {
       name = "Hail to Heroes of our Nation"
       ai_chance = 50
       command = { type = dissent value = -1 }
       command = { type = trigger which = 135461 }
   }
   action = {
       name = "Not at this time"
       ai_chance = 50
       command = { type = dissent value = 3 }
   }
}
If you want the event to trigger for a specific country (let's say Germany) at a given date, then it would look like this:
Code:
event = {
   id = 135460
   country = GER
   trigger = { atwar = no }

   date = { day = 6 month = january year = 1936 }
   name = "1936 Winter Olympics"
   desc = "It's time for a great festival of sport! Winter Olympics starting in Garmisch-Partenkirchen today!"

   action = {
       name = "Hail to Heroes of our Nation"
       ai_chance = 50
       command = { type = dissent value = -1 }
       command = { type = trigger which = 135461 }
   }
   action = {
       name = "Not at this time"
       ai_chance = 50
       command = { type = dissent value = 3 }
   }
}
If you want the event to only trigger for the human player, then you add a "ai = no" into the trigger (like your event 135400)

If you want the event to trigger for a specific set of countries (for instance, Argentina and Germany) on a given date, then it would look like this:
Code:
event = {
   id = 135460
   TAG = { ARG GER }
   persistent = yes
   trigger = { atwar = no }

   date = { day = 6 month = january year = 1936 }
   name = "1936 Winter Olympics"
   desc = "It's time for a great festival of sport! Winter Olympics starting in Garmisch-Partenkirchen today!"
   style = 0

   action = {
       name = "Hail to Heroes of our Nation"
       ai_chance = 50
       command = { type = dissent value = -1 }
       command = { type = trigger which = 135461 }
   }
   action = {
       name = "Not at this time"
       ai_chance = 50
       command = { type = dissent value = 3 }
   }
}
If you want all nations with one or more exceptions (let's say, no Germany nor Afghanistan) to get it, then you can try this: (this is useful when you only want to exclude a few, as is shorter and faster than the TAG method)
Code:
event = {
   id = 135460
   persistent = yes
   trigger = { atwar = no NOT = { country = GER country = AFG } }

   date = { day = 6 month = january year = 1936 }
   name = "1936 Winter Olympics"
   desc = "It's time for a great festival of sport! Winter Olympics starting in Garmisch-Partenkirchen today!"
   style = 0

   action = {
       name = "Hail to Heroes of our Nation"
       ai_chance = 50
       command = { type = dissent value = -1 }
       command = { type = trigger which = 135461 }
   }
   action = {
       name = "Not at this time"
       ai_chance = 50
       command = { type = dissent value = 3 }
   }
}
Another way to get the event to trigger for all nations would be:
Code:
event = {
   id = 135460
   all = yes
   persistent = yes
   trigger = { atwar = no }

   date = { day = 6 month = january year = 1936 }
   name = "1936 Winter Olympics"
   desc = "It's time for a great festival of sport! Winter Olympics starting in Garmisch-Partenkirchen today!"
   style = 0

   action = {
       name = "Hail to Heroes of our Nation"
       ai_chance = 50
       command = { type = dissent value = -1 }
       command = { type = trigger which = 135461 }
   }
   action = {
       name = "Not at this time"
       ai_chance = 50
       command = { type = dissent value = 3 }
   }
}

All of the previous events will happen on January 7th, 1936.
 

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
Thank you very much! I don't know this "persistent" think. I need to use it always, than I'd like to have event fire for all nations?
Persistent merely means that the event can happen more than once. But in general, if you want an event to happen to more than one nation (or more than once), it's required. Keep in mind that, for non-date fixed events you may need extra steps to ensure that the event doesn't trigger constantly.
 

Aniknk

Major
98 Badges
Feb 25, 2012
614
11
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Megacorp
  • Tyranny - Tales from the Tiers
  • Crusader Kings II: Jade Dragon
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Cradle of Civilization
  • Cities: Skylines - Green Cities
  • Tyranny - Bastards Wound
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Natural Disasters
  • Age of Wonders: Planetfall Season pass
  • Victoria 3 Sign Up
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Europa Universalis IV: Dharma
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Cities: Skylines - Campus
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Cities: Skylines Industries
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV
  • Magicka
  • Victoria 2
  • Cities: Skylines
Sorry, it's me who is stupid. I miss small problem with countries
ERROR : Invalid IDs in inventions for Abyssinia (Check scenario file)!
ERROR : Invalid IDs in inventions for Afghanistan (Check scenario file)!
ERROR : Invalid IDs in inventions for Albania (Check scenario file)!
ERROR : Invalid IDs in inventions for Argentina (Check scenario file)!
ERROR : Invalid IDs in inventions for Australia (Check scenario file)!
ERROR : Invalid IDs in inventions for Austria (Check scenario file)!
ERROR : Invalid IDs in inventions for Belgium (Check scenario file)!
ERROR : Invalid IDs in inventions for Bhutan (Check scenario file)!
ERROR : Invalid IDs in inventions for Bolivia (Check scenario file)!
ERROR : Invalid IDs in inventions for Brasilian Empire (Check scenario file)!
ERROR : Invalid IDs in inventions for Bulgaria (Check scenario file)!
ERROR : Invalid IDs in inventions for Canada (Check scenario file)!
ERROR : Invalid IDs in inventions for Guangxi Clique (Check scenario file)!
ERROR : Invalid IDs in inventions for Communist China (Check scenario file)!
ERROR : Invalid IDs in inventions for Nationalist China (Check scenario file)!
ERROR : Invalid IDs in inventions for Chile (Check scenario file)!
ERROR : Invalid IDs in inventions for Colombia (Check scenario file)!
ERROR : Invalid IDs in inventions for Costa Rica (Check scenario file)!
ERROR : Invalid IDs in inventions for Shanxi Clique (Check scenario file)!
ERROR : Invalid IDs in inventions for Cuba (Check scenario file)!
ERROR : Invalid IDs in inventions for San Ma Clique (Check scenario file)!
ERROR : Invalid IDs in inventions for Yunnan Clique (Check scenario file)!
ERROR : Invalid IDs in inventions for Czechoslovakia (Check scenario file)!
ERROR : Invalid IDs in inventions for Denmark (Check scenario file)!
ERROR : Invalid IDs in inventions for Dominican Republic (Check scenario file)!
ERROR : Invalid IDs in inventions for Ecuador (Check scenario file)!
ERROR : Invalid IDs in inventions for Egypt (Check scenario file)!
ERROR : Invalid IDs in inventions for United Kingdom (Check scenario file)!
ERROR : Invalid IDs in inventions for Estonia (Check scenario file)!
ERROR : Invalid IDs in inventions for Finland (Check scenario file)!
ERROR : Invalid IDs in inventions for France (Check scenario file)!
ERROR : Invalid IDs in inventions for Germany (Check scenario file)!
ERROR : Invalid IDs in inventions for Greece (Check scenario file)!
ERROR : Invalid IDs in inventions for Guatemala (Check scenario file)!
ERROR : Invalid IDs in inventions for Haiti (Check scenario file)!
ERROR : Invalid IDs in inventions for East Hebei Autonomous Council (Check scenario file)!
ERROR : Invalid IDs in inventions for Netherlands (Check scenario file)!
ERROR : Invalid IDs in inventions for Honduras (Check scenario file)!
ERROR : Invalid IDs in inventions for Hungary (Check scenario file)!
ERROR : Invalid IDs in inventions for Ireland (Check scenario file)!
ERROR : Invalid IDs in inventions for Iraq (Check scenario file)!
ERROR : Invalid IDs in inventions for Italy (Check scenario file)!
ERROR : Invalid IDs in inventions for Japan (Check scenario file)!
ERROR : Invalid IDs in inventions for Latvia (Check scenario file)!
ERROR : Invalid IDs in inventions for Liberia (Check scenario file)!
ERROR : Invalid IDs in inventions for Lithuania (Check scenario file)!
ERROR : Invalid IDs in inventions for Luxemburg (Check scenario file)!
ERROR : Invalid IDs in inventions for Manchuria (Check scenario file)!
ERROR : Invalid IDs in inventions for Mexico (Check scenario file)!
ERROR : Invalid IDs in inventions for Mongolian People's Republic (Check scenario file)!
ERROR : Invalid IDs in inventions for Nepal (Check scenario file)!
ERROR : Invalid IDs in inventions for Nicaragua (Check scenario file)!
ERROR : Invalid IDs in inventions for Norway (Check scenario file)!
ERROR : Invalid IDs in inventions for Florence (Check scenario file)!
ERROR : Invalid IDs in inventions for New Zealand (Check scenario file)!
ERROR : Invalid IDs in inventions for Oman (Check scenario file)!
ERROR : Invalid IDs in inventions for Panama (Check scenario file)!
ERROR : Invalid IDs in inventions for Paraguay (Check scenario file)!
ERROR : Invalid IDs in inventions for Iran (Check scenario file)!
ERROR : Invalid IDs in inventions for Philippines (Check scenario file)!
ERROR : Invalid IDs in inventions for Poland (Check scenario file)!
ERROR : Invalid IDs in inventions for Portugal (Check scenario file)!
ERROR : Invalid IDs in inventions for Peru (Check scenario file)!
ERROR : Invalid IDs in inventions for Romania (Check scenario file)!
ERROR : Invalid IDs in inventions for Union of South Africa (Check scenario file)!
ERROR : Invalid IDs in inventions for El Salvador (Check scenario file)!
ERROR : Invalid IDs in inventions for Saudi Arabia (Check scenario file)!
ERROR : Invalid IDs in inventions for Switzerland (Check scenario file)!
ERROR : Invalid IDs in inventions for Siam (Check scenario file)!
ERROR : Invalid IDs in inventions for Xinjiang (Check scenario file)!
ERROR : Invalid IDs in inventions for Soviet Union (Check scenario file)!
ERROR : Invalid IDs in inventions for Spanish Republic (Check scenario file)!
ERROR : Invalid IDs in inventions for Sweden (Check scenario file)!
ERROR : Invalid IDs in inventions for Tannu Tuva (Check scenario file)!
ERROR : Invalid IDs in inventions for Tibet (Check scenario file)!
ERROR : Invalid IDs in inventions for Turkey (Check scenario file)!
ERROR : Invalid IDs in inventions for Catalonia (Check scenario file)!
ERROR : Invalid IDs in inventions for North Italy Kingdom (Check scenario file)!
ERROR : Invalid IDs in inventions for French Syria (Check scenario file)!
ERROR : Invalid IDs in inventions for Venice (Check scenario file)!
ERROR : Invalid IDs in inventions for Uruguay (Check scenario file)!
ERROR : Invalid IDs in inventions for USA (Check scenario file)!
ERROR : Invalid IDs in inventions for Venezuela (Check scenario file)!
ERROR : Invalid IDs in inventions for Yemen (Check scenario file)!
ERROR : Invalid IDs in inventions for Yugoslavia (Check scenario file)!
But I don't know where, and how to fix it. This countries just dont exist in start of our mod. But I want them to exist, so I could release them.
 

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
The last one means that in the scenario files (.inc) you used an "inventions" section whose numbers are invalid. Invalid may mean a typo (111 instead of 110 and the like) or a non-invention event.
As to what this section does... have you notice that some techs are unlocked by event? Most of those are considered "inventions" (invention = yes). "inventions" is the section where you can set some of those events as already triggered by the nation in question (and grant them the corresponding benefits of such an event).
Judging by the amount, I guess that you removed those events altogether (located in secret_weapon_events.txt) or made a copy-paste error.

And a warning I forgot to mention about using "all = yes" and persistent at the same time: never use then in conjunction if the trigger is always true. And by always i mean "no option will make the trigger false". It can generate a loop.
I believe "all = yes" is enough by itself to trigger an event to everyone a single time as long as the trigger is met. However, used alongside "persistent = yes" can give problems if you aren't careful.
As to why I didn't mentioned earlier... it's been a while since I used that combo, and I don't remember clearly when the loop happened.
 

Arcangelus

Major
9 Badges
Apr 8, 2012
753
36
  • Darkest Hour
  • Europa Universalis III Complete
  • Divine Wind
  • Heir to the Throne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Victoria 3 Sign Up
Plan B
Code:
event = {
   id = 135460
   persistent = yes
   all = yes
   trigger = { atwar = no NOT = { flag = wo_36 } }

   name = "1936 Winter Olympics"
   desc = "It's time for a great festival of sport! Winter Olympics starting in Garmisch-Partenkirchen today!"

   date = { day = 6 month = 0 year = 1936 }

   action = {
       name = "Hail to Heroes of our Nation"
       ai_chance = 50
       command = { type = dissent value = -1 }
       command = { type = trigger which = 135461 }
       command = { type = setflag which = wo_36 }
   }
   action = {
       name = "Not at this time"
       ai_chance = 50
       command = { type = dissent value = 3 }
       command = { type = setflag which = wo_36 }
   }
}

event = { #This will remove the flag, as it's no longer needed.
   id = 900099900
   trigger = { ai = yes }
   name = "AI_EVENT" #This should not appear on the event log.

   date = { day = 7 month = 0 year = 1936 }

   action = {
       command = { type = clrflag which = wo_36 }
   }
}
 

Mexbuild

Major
55 Badges
Apr 25, 2006
757
79
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Art of War
  • 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 III Complete
  • Europa Universalis IV
  • Arsenal of Democracy
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria 2
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
A question: Is it possible to start constructing a unit by event with more than one brigade? For expample:

command = { type = build_division which = carrier value = cag when = 1 cost = -2.6 }

Could I use value more than one time? Respective ships it's a little bit annoying if you need to build their additions after their completion.
 

der Kriegsherr

Simp for the Constitution
38 Badges
Oct 27, 2010
1.690
190
  • Arsenal of Democracy
  • Semper Fi
  • Sengoku
  • Victoria 2: A House Divided
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Rome: Vae Victis
  • Stellaris: Distant Stars
  • Victoria 2
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
  • Rome Gold
  • Hearts of Iron III: Their Finest Hour
  • 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: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis III: Chronicles
  • Darkest Hour
  • Stellaris - Path to Destruction bundle
Hi, I've done quite a few events in my time, but I'm a little iffy on this one due to my use of flags. Does this look okay? Any problems?

event = {
id = 3000011
random = no
country = CAN

name = "EVT_3000011_NAME" # Clarification of our government form
desc = "EVT_3000011_DESC"
#-#
picture = "BITUSSA\british_dominions"

action = {
name = "ACTION_NAME_GREAT"
command = { type = dissent value = -5 }
command = { type = set_domestic which = democratic value = 10 }
command = { trigger = { government = { type = fascist country = ENG }} type = set_domestic which = democratic value = 4 }
command = { type = set_domestic which = political_left value = 3 }
command = { type = headofstate which = 575050 }
command = { trigger = { government = { type = fascist country = ENG }} type = headofstate which = 575051 }
command = { trigger = { flag = ENG_King_Ed type = headofstate which = 575048 }}
command = { trigger = { government = { type = fascist country = ENG }} flag = ENG_King_Ed type = headofstate which = 575051 }
command = { type = relation which = U00 value = -100 }
command = { type = relation which = RUS value = 100 }
command = { type = relation which = MEX value = 100 }
command = { type = relation which = BRA value = 100 }
}
}

Granted, it's one in a series, but the other events are literally identical apart from the minister values.
 

^_AC_^

Field Marshal
84 Badges
Feb 24, 2009
5.695
327
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • Victoria 2: Heart of Darkness
  • War of the Roses
  • Hearts of Iron IV Sign-up
  • Europa Universalis III Complete
  • The Showdown Effect
  • Warlock 2: The Exiled
  • Crusader Kings II: Conclave
  • 500k Club
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Prison Architect
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Common Sense
  • Stellaris: Ancient Relics
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Cadet
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris Sign-up
  • Europa Universalis IV: Golden Century
  • Stellaris: Synthetic Dawn
  • Imperator: Rome
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Imperator: Rome Deluxe Edition
Hi, I've done quite a few events in my time, but I'm a little iffy on this one due to my use of flags. Does this look okay? Any problems?



Granted, it's one in a series, but the other events are literally identical apart from the minister values.
It's a trigger like the others, so they should follow the same rules:
command = { trigger = { flag = ENG_King_Ed } type = headofstate which = 575048 }
command = { trigger = { government = { type = fascist country = ENG } flag = ENG_King_Ed } type = headofstate which = 575051 }
 

Aigle2

Sergeant
65 Badges
Feb 14, 2017
82
253
  • Darkest Hour
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: By Blood Alone
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis 4: Emperor
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Nemesis
  • Steel Division: Normand 44 - Second Wave
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Lithoids
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV
  • Stellaris: Federations
  • Crusader Kings III
  • Battle for Bosporus
  • Hearts of Iron IV: La Resistance
  • Victoria 2
  • Stellaris: Digital Anniversary Edition
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Cities: Skylines - Campus
  • Imperator: Rome
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II
  • Victoria: Revolutions
I have a question concerning event making.
I want to create events where depending of the triggers, choices appear or not.

Ex :

action {
name = action_1
ai_chances = 50
}

action {
name = action_2
ai_chances = 20
trigger { flag = flag1 }
}

action {
name = action_3
ai_chances = 30
trigger {
flag = flag1
flag = flag2
}
}

But, depending of the cases, ai chances total isn't equal to 100.
So, how to deal with it ?
 

mccarty.geoff

Major
On Probation
Jul 11, 2017
641
4
AI chances do not need to equal 100. It will add valid action chances then randomly generate no matter the sum. Look at the bottom of event commands.txt in the mod documentation directory for action trigger syntax.
 

der Kriegsherr

Simp for the Constitution
38 Badges
Oct 27, 2010
1.690
190
  • Arsenal of Democracy
  • Semper Fi
  • Sengoku
  • Victoria 2: A House Divided
  • Stellaris: Galaxy Edition
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • 500k Club
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Rome: Vae Victis
  • Stellaris: Distant Stars
  • Victoria 2
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
  • Rome Gold
  • Hearts of Iron III: Their Finest Hour
  • 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: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis III: Chronicles
  • Darkest Hour
  • Stellaris - Path to Destruction bundle
Also, since I'm bad at decisions, does this decision event look okay to everyone?

event = {
id = 60022
random = no
country = FRA
style = 1

decision = {
lost_national = { country = POL value = 5 }
}

decision_trigger = {
ideology = { type = nazi country = FRA }
alliance = { country = FRA country = POL }
lost_national = { country = POL value = 5 }
war = { country = FRA country = U05 }
or = {
war = { country = FRA country = SOV }
}
}
}

trigger = {
ideology = { type = nazi country = FRA }
alliance = { country = FRA country = POL }
war = { country = FRA country = U05 }
or = {
war = { country = FRA country = SOV }
}
}

date = { day = 14 month = june year = 1941 }
offset = 14
deathdate = { day = 29 month = december year = 1964 }

name = "EVT_60022_NAME" # Operation Davout
desc = "EVT_60022_DESC"
#-#
picture = "decision_CZE_end"
decision_picture = "decision_mob_emergency"

action_a = {
name = "ACTION_NAME_OK"
ai_chance = 100
command = { type = make_puppet which = POL }
command = { type = trigger which = 60023 }
}

action_b = {
name = "ACTION_NAME_DECLINE_2"
ai_chance = 0
command = { type = sleepevent which = 60023 }
}
}
 

^_AC_^

Field Marshal
84 Badges
Feb 24, 2009
5.695
327
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • Victoria 2: Heart of Darkness
  • War of the Roses
  • Hearts of Iron IV Sign-up
  • Europa Universalis III Complete
  • The Showdown Effect
  • Warlock 2: The Exiled
  • Crusader Kings II: Conclave
  • 500k Club
  • Stellaris
  • Europa Universalis IV: El Dorado
  • Prison Architect
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Common Sense
  • Stellaris: Ancient Relics
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Hearts of Iron IV: Cadet
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Stellaris Sign-up
  • Europa Universalis IV: Golden Century
  • Stellaris: Synthetic Dawn
  • Imperator: Rome
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Imperator: Rome Deluxe Edition
decision_trigger = {
ideology = { type = nazi country = FRA }
alliance = { country = FRA country = POL }
lost_national = { country = POL value = 5 }
or = {
war = { country = FRA country = U05 }
war = { country = FRA country = SOV }
}
}

trigger = {
ideology = { type = nazi country = FRA }
alliance = { country = FRA country = POL }
or = {
war = { country = FRA country = U05 }
war = { country = FRA country = SOV }
}
}
 

Tera Brandford

Lt. General
52 Badges
Jan 26, 2016
1.254
91
  • Divine Wind
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis III Complete
  • Europa Universalis III
  • Darkest Hour
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines
  • Crusader Kings Complete
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Jade Dragon
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Europa Universalis IV: Mare Nostrum
Hello.

I made this event to create the Free Territory. The event fires but none of the provinces are given to them. Any ideas?

event = {
id = 80050001
country = SOV
random = no

trigger = {
exists = SOV
}

date = { day = 10 month = november year = 1918 }
offset = 1
deathdate = { day = 11 month = november year = 1918 }

name = "Creation of the Free Territory"
desc = "EVT_80050001_DESC"
style = 2
picture = "black_army"

action_a = {
name = "Invade"
ai_chance = 25
command = { type = independence which = U00 value = 0 when = 0 }
command = { type = secedeprovince which = U00 value = 644 when = 1 }
command = { type = secedeprovince which = U00 value = 634 when = 1 }
command = { type = secedeprovince which = U00 value = 635 when = 1 }
command = { type = secedeprovince which = U00 value = 627 when = 1 }
command = { type = secedeprovince which = U00 value = 631 when = 1 }
command = { type = secedeprovince which = U00 value = 632 when = 1 }
command = { type = secedeprovince which = U00 value = 630 when = 1 }
command = { type = war which = U00 }
}

action_b = {
name = "We shall work with them"
ai_chance = 75
command = { type = independence which = U00 value = 0 when = 0 }
command = { type = secedeprovince which = U00 value = 644 when = 1 }
command = { type = secedeprovince which = U00 value = 634 when = 1 }
command = { type = secedeprovince which = U00 value = 635 when = 1 }
command = { type = secedeprovince which = U00 value = 627 when = 1 }
command = { type = secedeprovince which = U00 value = 631 when = 1 }
command = { type = secedeprovince which = U00 value = 632 when = 1 }
command = { type = secedeprovince which = U00 value = 630 when = 1 }
}
}