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

Fawr

Field Marshal
80 Badges
Jan 22, 2003
3.231
1.913
  • Europa Universalis IV: Common Sense
  • Semper Fi
  • Sengoku
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Magicka 2
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Horse Lords
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Europa Universalis 4: Emperor
  • 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: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Cities in Motion
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2
[RESOURCE] Events

I've been thinking about creating events, but I keep getting stuck as I'm unsure about what the game can do. So I've started to work on lists of what the eventsystem can do by semi-automatically parsing parts of the events which come with the game. I've started with what triggers I can see in a character_event.

Before I begin with the examples I need to talk a bit about event scope. Basically you will declare the starting event scope by your event's first line of either character_event or province_event. A character event means that all your triggers start working on the character who is being assessed for the event. So if your trigger says culture = English, then that means your event will check to ensure that the person getting the event is english. However the same line in a province event would mean you want the province getting the event to be English. Many triggers (like trait = ambitious) only work on people or provinces.

You can then change the scope by using some of the triggers below, for example to ensure that in a character event the character getting the event's mother is alive you would say "mother = { is_alive = yes }". However in a province event something similar can be done by saying "owner = { mother = { is_alive = yes } }". These can end up getting very complex to read if you don't think through every step of the way.

These are examples of various triggers which apply to a character:
age = 60
ai = no
at_location = ROOT
base_health = 4
can_change_religion = yes
check_variable = {which = test_variable value = 1.0 }
controls_religion = yes
culture = english
demesne_size = 1
diplomacy = 10
fertility = 0.3
had_character_flag = { flag = flag_promised_marriage days = 365 }
has_called_crusade = yes
has_character_flag = ugly_doll
has_character_modifier = holding_large_feast
has_epidemic = no
has_guardian = no
has_job_action = action_oversee_construction
has_job_title = job_treasurer
has_landed_title = e_golden_horde
has_landed_title = no
has_lover = yes
has_law = succ_feudal_elective
has_minor_title = title_regent
has_nickname = no
has_objective = no
has_objective = obj_become_chancellor
health = 6
imprisoned_days = 14
in_battle = yes
in_command = yes
in_siege = no
independent = no
intrigue = 9
is_abroad = no
is_alive = yes
is_betrothed = no
is_councillor = yes
is_female = no
is_feudal = yes
is_heretic = yes
is_ill = yes
is_liege_of = FROM
is_married = no
is_parent_religion = FROM
is_plot_active = no
is_pregnant = yes
is_priest = yes
is_primary_heir = yes
is_republic = yes
is_ruler = no
is_theocracy = yes
job_chancellor = { diplomacy = 10 }
job_marshal = { martial = 10 martial = ROOT }
job_spiritual = { learning = 10 }
job_spymaster = { has_job_action = no OR = { trait = ambitious trait = diligent } }
job_treasurer = { has_job_action = no }
learning = 10
lifestyle_traits = 1
martial = 9
month = 2
num_of_children = 3
num_of_claims = 1
num_of_friends = 1
num_of_king_titles = 1
num_of_plot_backers = 1
num_of_prisoners = 1
num_of_rivals = 1
num_of_vassals = 5
num_traits = 4
personality_traits = 6
piety = 50
prisoner = yes
realm_intrigue = 15
religion = FROM
religion = orthodox
religion_authority = 0.35
religion_group = christian
same_realm = fromfrom
scaled_wealth = 0.5
stewardship = 8
tier = count
trait = ambitious
treasury = 70
vassal_of = FROM
war = yes
wealth = 20
year = 1350
Here are the triggers which transfer the scope to another character, or characters:
  • any_backed_character = { OR = { has_objective = plot_gain_title has_objective = plot_succ_seniority has_objective = plot_succ_primogeniture has_objective = plot_succ_gavelkind has_objective = plot_succ_feudal_elective has_objective = plot_lower_crown_authority has_objective = plot_kill_character has_objective = plot_kill_spouse } is_plot_active = no NOT = { has_character_flag = event7040 } }
  • any_child = { age = 13 is_abroad = no prisoner = no OR = { trait = craven trait = paranoid } }
  • any_courtier = { age = 16 ai = yes family = no is_councillor = no }
  • any_current_enemy = { culture = ROOT }
  • any_dynasty_member = { NOT = { num_of_children = 1 } age = 35 demesne_size = 2 NOT = { has_law = succ_feudal_elective } is_feudal = yes NOT = { any_demesne_title = { claimed_by = root} } }
  • any_friend = { has_character_flag = nofriends_friend }
  • any_independent_ruler = { religion = catholic rightful_religious_head = ROOT trait = kinslayer piety = 100 reverse_opinion = { who = ROOT value = 0 } has_character_flag = kinslaying_offered }
  • any_liege = { any_child = { is_female = no had_character_flag = { flag = impregnated_vassal_daughter days = 60 } } }
  • any_playable_ruler = { religion = catholic rightful_religious_head = ROOT NOT = { has_character_flag = pope_dislikes_heathen_employed } any_courtier = { prisoner = no OR = { religion_group = muslim religion_group = pagan_group } OR = { has_job_title = job_chancellor has_job_title = job_marshal has_job_title = job_treasurer has_job_title = job_spymaster has_job_title = job_spiritual } } }
  • any_realm_character = { has_character_flag= we_are_evil_assasinator prisoner = no }
  • any_realm_lord = { is_theocracy = yes }
  • any_rival = { is_female = no war = no in_command = no prisoner = no age = 16 same_liege = ROOT NOT = { age = 60 } NOT = { trait = wounded } NOT = { trait = maimed } NOT = { has_character_flag = duel_rival } }
  • any_sibling = { is_female = no is_alive = yes NOT = { martial = 8 } }
  • any_vassal = { age = 16 not = { opinion = { who = ROOT value = 0 } } }
  • any_ward = { prisoner = no age = 6 NOT = { age = 16 } OR = { trait = shy trait = craven trait = kind trait = trusting } }
  • enemy = { religion_group = pagan }
  • father = { is_alive = yes }
  • father_even_if_dead = { is_alive = no prestige = 100 }
  • father_of_unborn = { spouse = { character = ROOT } }
  • FROM = { is_alive = yes }
  • guardian = { NOT = { religion = ROOT} }
  • host = { religion = catholic }
  • liege = { age = 16 trait = incapable }
  • lover = { is_married = yes }
  • mother = { is_alive = no }
  • religion_head = { NOT = { reverse_opinion = { who = ROOT value = 10 } } NOT = { reverse_has_opinion_modifier = { who = ROOT modifier = show_true_humility } } }
  • ROOT = { is_female = yes }
  • spouse = { has_lover = no }
  • spouse_even_if_dead = { is_alive = no is_female = yes }
  • top_liege = { dynasty = root war = no }
here are the triggers which transfer the scope to a province or provinces
765 = {...} # transfers to a province ID
any_demesne_province = { has_disease = yes }
any_realm_province = { religion = catholic }
b_athlith = { has_holder = no } #transfers to a barrony
capital_scope = { TECH_NOBLE_CUSTOMS = 4 }
crusade_target = { is_located_in = ROOT }
location = { is_heresy_of = ROOT } #character's location
These triggers transfer scope from a character to a title
primary_title = { higher_tier_than = COUNT }
primary_title = { tier = BARON }
primary_title = { title = d_teutonic_order }
primary_title = { title = e_golden_horde holder_scope = { religion = tengri_pagan NOT = { trait = zealous } } }

And onto province events:
These triggers will work on provinces
controlled_by = e_rebels
culture = saxon
has_disease = yes
has_global_flag = possible_province_defection
has_higher_tech_than = ROOT
has_province_modifier = thieves_guild
is_capital = yes
is_heresy_of = ROOT
is_heretic = no
is_land = yes
is_located_in = ROOT
num_of_settlements = 7
province_id = 333
port = yes
religion = ROOT
religion_group = ROOT
revolt_risk = 2
TECH_NOBLE_CUSTOMS = 4 # I assume other tech can be used too.
This moves the scope to province(s)
any_neighbor_province = { is_land = yes }
These move the scope back to a character or characters
any_province_lord = { is_feudal = yes }
any_province_character = {...}
owner = { demesne_efficiency = 1.0 prisoner = no }
These move the scope to a title
duchy = { holder_scope = { top_liege = { ROOT = { owner = { top_liege = { character = REVPREVPREV } } } } } }
kingdom = { OR = { title = k_lithuania title = k_finland } }

Triggers can be run on titles with these commands
higher_tier_than = COUNT
holder_scope = { top_liege = { ROOT = { owner = { top_liege = { character = PREVPREVPREV } } } } }
tier = BARON
title = d_teutonic_order
title = e_golden_horde

Here are some other generic triggers
had_global_flag = { flag = il_khanate_arrival days = 3650 }
has_global_flag = ck2_tutorial
is_title_active = d_teutonic_order
opinion = { who = top_liege value = 0 }
opinion_levy_raised_days = { who = liege days = 73 }
reverse_opinion = { who = FROM value = -75 }
siege = { is_attacker = yes }
OR = { trait = zealous trait = diligent trait = ambitious }
NOT = {trait = wounded}
AND = { trait = zealous trait = diligent trait = ambitious } #default is AND, so that rarely gets used except inside OR statements

Sometimes the examples make more sense in context so you should be able to search for most of these in the event files. However above I have combined some longer statements into one line.

If you notice I've missed something (or have come across something in a mod which isn't in the main game), please let me know and I'll add it.
 
Last edited:
  • 4
Reactions:
Options

So that section was all about triggers. Triggers are very useful at making sure the right events fire in the right context, but the meat of an event is the actions which happen in the options section. The same commands can also be used in the immediate section, and are also relevent to decisions.

There are options which apply to characters:
  • add_character_modifier = { name = unrighteous_spouse duration = -1 }
  • add_lover = FROM
  • add_objective = obj_get_married
  • add_spouse = FROM
  • add_trait = zealous
  • banish = yes
  • become_heretic = yes
  • cancel_objective = plot_weaken_fellow_vassal
  • change_diplomacy = 1
  • change_intrigue = 1
  • change_learning = 2
  • change_martial = -2
  • change_stewardship = 2
  • change_variable = {which = test_variable value = +1.0 }
  • character_event = { id = 100427 days = 2 random = 2 tooltip = "EVTTOOLTIP100427" }
  • character_event = { id = 30080 tooltip = "EVTTOOLTIP30080" }
  • clear_wealth = yes
  • clr_character_flag = ask_for_indulgence
  • create_character = { diplomacy = 10 dynasty = random trait = poet age = 30 female = no has_nickname = nick_the_troubadour }
  • create_character = { random_traits = no dynasty = random female = no age = 16 trait = brave trait = ambitious trait = humble health = 10 attributes = { martial = 10 } }
  • create_random_diplomat = { random_traits = yes dynasty = random female = no }
  • create_random_soldier = { random_traits = yes dynasty = random female = no }
  • culture = english
  • cure_illness = yes
  • death = { death_reason = death_accident }
  • death = { death_reason = death_murder killer = FROM }
  • dynasty = FROM
  • fertility = 0.1
  • give_minor_title = title_regent
  • give_title = FROM
  • health = -2
  • hidden_tooltip = { character_event = { id = 75112 } }
  • hidden_tooltip = { father = { character_event = { id = 37051 } } }
  • impregnate = FROM
  • imprison = FROM
  • imprison = yes
  • leave_plot = FROM
  • morale = -0.1
  • opinion = { modifier = opinion_rival who = FROM years = 100 }
  • piety = 10
  • prestige = -60
  • prisoner = no
  • random = { chance = 1 remove_trait = ill hidden_tooltip = { character_event = { id = 38283 #Notify remove ill } } }
  • random_list = { 30 = { add_trait = craven } 30 = { add_trait = chaste } 30 = { add_trait = shy } }
  • random_list = { 40 = { } 30 = { spouse = { fertility = 0.2 } } 20 = { spouse = { fertility = 0.1 } } 10 = { health = -2 } }
  • religion = catholic
  • religion = FROM
  • religion_authority = -0.02
  • remove_character_modifier = true_christian_knight
  • remove_lover = yes
  • remove_opinion = { who = FROM modifier = opinion_revenge_seeker }
  • remove_spouse = spouse
  • remove_trait = ambitious
  • reverse_opinion = { modifier = campaign_friend who = FROM }
  • ROOT = { piety = 30 }
  • scaled_wealth = -1.0
  • send_assassin = fromfrom
  • set_character_flag = "flag_denied_title"
  • set_guardian = FROM
  • set_father = FROM # maybe only for new_characters
  • set_mother = FROM # maybe only for new_characters
  • set_variable = {which = test_variable value = 1.0 }
  • spawn_unit = { province = 904 troops = { horse_archers = { 10000 10000 } light_cavalry = { 6666 6666 } light_infantry = { 2222 2222 } heavy_infantry = { 1112 1112 } knights = { 200 200 } } }
  • tooltip = { banish = yes }
  • treasury = -50
  • troops = -0.1
  • vassal_opinion = { modifier = opinion_tyrant multiplier = 2 }
  • wealth = 75
There are options which change the scope to another character:
  • any_child = { limit = { age = 6 } opinion = { modifier = opinion_disappointed who = ROOT years = 2 } }
  • any_courtier = { limit = { has_character_flag = murder_suspect } clr_character_flag = murder_suspect }
  • any_defender = { troops = -0.05 morale = -0.05 }
  • any_dynasty_member = { opinion = { who = ROOT modifier = disrespects_dynasty months = 120 } }
  • any_independent_ruler = { limit = { ai = no religion = catholic any_war = { using_cb = crusade } excommunicated_for = ROOT } set_character_flag = offered_revoked_excommunication letter_event = { id = 8467 days = 1 } }
  • any_liege = { limit = { has_character_flag = host_feast_started has_character_modifier = holding_large_feast } character_event = { id = 72035 tooltip = "EVTTOOLTIP72035" } }
  • any_realm_character = { limit = { religion = tengri_pagan } religion = sunni if = { limit = { capital_scope = { religion = tengri_pagan } } capital_scope = { religion = sunni } } }
  • any_vassal = { limit = { has_character_flag = coming_to_feast } character_event = { id = 72016 tooltip = "EVTTOOLTIP72016" } }
  • father = { character_event = { id = 24503 days = 128 tooltip = EVTTOOLTIP24503 } }
  • FROM = { add_trait = ambitious }
  • guardian = { character_event = { id = 38101 days = 2 tooltip = "EVTTOOLTIP38101" } }
  • host = { opinion = { modifier = opinion_religious_tract who = ROOT years = 10 } }
  • job_chancellor = { opinion = { who = ROOT modifier = talent_recognized } }
  • job_marshal = { prestige = 10 }
  • job_spiritual = { letter_event = { id= 3244 tooltip = EVTTOOLTIP3244 } }
  • job_spymaster = { character_event = { id = 76007 tooltip = "EVTTOOLTIP76007" } }
  • job_treasurer = { character_event = { id = 75076 tooltip = "EVTTOOLTIP75076" } }
  • liege = { letter_event = { id = 8455 days = 1 } }
  • lover = { add_spouse = ROOT }
  • new_character = { set_character_flag = pressured_poet character_event = { id = 3661 days = 2 tooltip = "EVTTOOLTIP3661" } }
  • new_character = { spawn_unit = { province = 904 # Balkh troops = { horse_archers = { 10000 10000 } light_cavalry = { 6666 6666 } light_infantry = { 2222 2222 } heavy_infantry = { 1112 1112 } knights = { 200 200 } } } }
  • plot_target_char = { opinion = { modifier = scheming_bastard who = ROOT months = 120 } }
  • random_backed_character = { limit = { OR = { has_objective = plot_gain_title has_objective = plot_succ_seniority has_objective = plot_succ_primogeniture has_objective = plot_succ_gavelkind has_objective = plot_succ_feudal_elective has_objective = plot_lower_crown_authority has_objective = plot_kill_character has_objective = plot_kill_spouse } NOT = { has_character_flag = event7040 } } opinion = { who = ROOT modifier = revealed_plot months = 120 } set_character_flag = event7040 hidden_tooltip = { character_event = { id = 7045 days = 1 } } }
  • random_child = { limit = { age = 13 NOT = { age = 20 } is_abroad = no prisoner = no } character_event = { id = 3691 tooltip = "EVTTOOLTIP3691" } }
  • random_courtier = { limit = { age = 16 } opinion = { modifier = opinion_enjoyed_feast who = ROOT years = 5 } }
  • random_dynasty_member = { limit = { demesne_size = 1 num_of_king_titles = 2 } character_event = { id = 66051 days = 1 tooltip = ""EVTTOOLTIP66051"" } }
  • random_friend = { limit = { has_character_flag = nofriends_friend } clr_character_flag = nofriends_friend tooltip = { character_event = { id = 100171 tooltip = "EVTTOOLTIPA100171" } } }
  • random_independent_ruler = { limit = { religion = catholic rightful_religious_head = root has_character_flag = pope_we_refuse_law_changed } clr_character_flag = pope_we_refuse_law_changed }
  • random_playable_ruler = { limit = { religion = catholic rightful_religious_head = ROOT NOT = { has_character_flag = pope_dislikes_heathen_employed } any_courtier = { prisoner = no OR = { religion_group = muslim religion_group = pagan_group } OR = { has_job_title = job_chancellor has_job_title = job_marshal has_job_title = job_treasurer has_job_title = job_spymaster has_job_title = job_spiritual } } } character_event = { id = 39241 days = 14 tooltip = EVTTOOLTIP392401 } set_character_flag = pope_dislikes_heathen_employed }
  • random_realm_character = { limit = { has_character_flag = we_are_evil_assasinator } clr_character_flag = we_are_evil_assasinator }
  • random_realm_lord = { limit = { is_theocracy = yes } reverse_banish = FROM }
  • random_rival = { limit = { has_character_flag = devious_rival } character_event = { id = 100453 days = 5 random = 2 tooltip = "EVTTOOLTIP100453" } }
  • random_sibling = { limit = { has_character_flag = sister_suspected_of_incest } character_event = { id = 38022 days = 5 tooltip = "EVTTOOLTIP38022" } }
  • random_vassal = { limit = { age = 20 } opinion = { modifier = charitable_pos who = ROOT years = 2 } }
  • random_ward = { limit = { family = no age = 6 NOT = { age = 16 } prisoner = no } opinion = { modifier = opinion_upset who = ROOT years = 5 } }
  • religion_head = { opinion = { who = ROOT modifier = show_true_humility } }
  • rightful_religious_head_scope = { clr_character_flag = pope_currently_demanding }
  • spouse = { add_lover = ROOT }
  • top_liege = { primary_title = { add_pressed_claim = ROOT }}
There are options which change the scope from a character to a province:
  • 765 = { owner = { letter_event = { id = 8501 days = 7 } } }
  • capital_scope = { add_province_modifier = { name = war_knowledge duration = 365 } }
  • capital_scope = { religion = catholic }
  • location = { add_province_modifier = { name = friendly_innovations duration = 730 } }
  • random_demesne_province = { limit = { NOT = { has_province_modifier = diligent_liege_size } } add_province_modifier = { name = diligent_liege_size duration = 1825 } }
There are some options which change the scope from a person to a title
  • random_demesne_title = { add_claim = FROM }
  • any_demesne_title = { limit = { OR = { tier = KING tier = EMPEROR } is_titular = no has_law = investiture_law_1 } revoke_law = investiture_law_1 add_law_w_cooldown = investiture_law_0 }

There are also a bunch of misc options, or ones which don't really fit elsewhere:
  • if = { limit = { diplomacy = 10 } change_diplomacy = 1 }
  • ai_chance = { factor = 10 modifier = { factor = 9 trait = zealous } }
  • name = "ACCEPT"
  • random_claim = { limit = { can_be_given_away = yes holder = FROM } grant_title = ROOT }
  • trigger = { age = 16 }

There are options which apply to provinces:
  • add_province_modifier = { name = clergy_extra_tithe duration = 3650 }
  • build_holding = { title = b_athlith type = castle holder = FROMFROM }
  • change_random_mil_tech = 1
  • clear_revolt = yes
  • clr_global_flag = land_wanted_by_teutonic_order
  • clr_province_flag = land_wanted_by_teutonic_order
  • create_character = { random_traits = yes dynasty = random religion = tengri_pagan culture = mongol female = no age = 20 }
  • create_random_soldier = { random_traits = yes dynasty = random religion = prev culture = prev female = no age = 30 employer = e_rebels }
  • new_character = { spawn_unit = { province = prev home = prev scaled_by_biggest_garrison = 1.25 troops = { archers = { 6 6 } light_cavalry = { 4 4 } light_infantry = { 10 10 } } }
  • province_event = { id = 80058 days = 3 }
  • religion = catholic
  • remove_province_modifier = highway_robber_band
  • reverse_religion = ROOT
  • tooltip = { owner = { any_independent_ruler = { limit = { primary_title = { title = d_teutonic_order } } ROOT = { county = { grant_title = PREVPREV } } } } }
There are options which change the scope to a character
  • random_province_lord = { limit = { is_priest = no NOT = { is_liege_of = ROOT } NOT = { character = ROOT } } character_event = { id = 20100 days = 7 } }
  • owner = { piety = 10 }
  • random_province_character = { limit = { NOT = { is_liege_of = ROOT } NOT = { character = ROOT } OR = { has_objective = plot_gain_title has_objective = plot_succ_seniority has_objective = plot_succ_primogeniture has_objective = plot_succ_gavelkind has_objective = plot_succ_feudal_elective has_objective = plot_kill_character has_objective = plot_kill_spouse } } character_event = { id = 20290 days = 7 } }
  • random_province_lord = { limit = { is_republic = yes } opinion ={ modifier = opinion_happy who = ROOT years = 2 } }
  • ruler = { piety = -10 }
There is an option which changes the scope to another province
  • any_neighbor_province = { culture = ROOT owner = { culture = ROOT } }
There are options which change the scope to a title
  • county = { rebel_defection = yes }
    # I assume there is an equivelent for a duchy/kingdom/empire
There are also miscelanious options
  • name = "EVTOPTA39000"
  • trigger = { owner = { religion = ROOT } }


There are also a few title based options, but they will be a future post...
 
Last edited:
  • 3
Reactions:
General Syntax

Sure you can now see what triggers and modifiers to include, but where does that fit into the syntax for an event?

As far as I can tell an event is made up of these parts
Code:
character_event = {
  id = 100006
  title = "EVTNAME931"
  desc = "EVTDESC100000"
  picture = "GFX_evt_battle"
  major = yes
  border = "GFX_event_normal_frame_economy"
  <conditions>
  hide_from = yes
  is_triggered_only = yes
  trigger = { <triggers> }
  mean_time_to_happen = { days = 1  modifier = { factor = 0.2 <triggers> } }
  immediate = { <options> }
  option = { name = "CURSES" <options> }
}

The stuff in <> is just pointers to things I'll explain, but I'll go through that line by line.

All events must have an ID, and it should be unique. If you are building a mod which you want to work with other people's mods then see http://forum.paradoxplaza.com/forum/showthread.php?585385-Crusader-Kings-II-Characters-dynasties-and-event-ID-s-request-thread

The title and descriptions are just what the player will see when the event goes off. You can put the words in here directly, but Paradox have put in pointers to localisation files instead. Title is optional.

The picture and border are just cosmetic. Border is optional, unsure about picture.

Some events have a line saying major = yes. I don't know what the effect of this is, but there aren't many of these events.

Events then have what look to be some sort of trigger conditions, but they don't use the normal trigger syntax that I gave examples of in my first post above. My assumption is that the designers have deliberatly put down this smaller list of triggers, whcih you can't nest to improve efficiency. They aren't required but if you want to use them here are the ones I've seen:
age = 16
is_prisoner = no
is_ruler = yes
max_age = 11
capable_only = yes
min_age = 16
only_capable = yes
only_men = yes
only_playable = yes
only_rulers = yes
only_women = yes
prisoner = no

There is a hide_from command which again is optional, and I don't understand exactly what it does.

After that you can have three lines about how people get the event. is_triggered_only = yes, trigger = { } & mean_time_to_happen = {}. See the section on how events start below.

Then you have the sections which make things happen. The first is a immediate = { <options - see post above> }, and that will happen immediatly once the event pops up. After that there are a bunch of option = { <options - see post above> }, one per button you want in the event.

A closing } and then thats it for your event!

How events start
There are basically 3 ways events can start. These are mean time to happen, triggered only & on_actions.

The first is the CK1 way, which means that events have a mean time to happen. In this case you don't include the line "is_triggered_only = yes", but do include a mean_time_to_happen = {} section and normally a trigger = {} section. The trigger section is used to rule some people out of getting the event. The mean time to happen section has two parts, the first is a base mean time to happen, something like years = 10 if you want it to happen every ten years as a base. The second part is a series of "modifier = { factor = 0.2 trait =ambitious }" bits, and the game assesses these to work out a modified mean time to happen. This is where you say that an ambitious character will get this event every 2 years on average rather than 10 years, but anything from the trigers section will work there instead. The main trick here is that if you include multiple modifiers then they can all apply multiplicativly.

The second way includes the line "is_triggered_only = yes", but doesn't have a mean time to happen. These events are triggered by other events. For example when a women becomes pregnant she triggers an event for the father to inform him of the good news.

The 3rd way will include both a line saying "is_triggered_only = yes" and a mean time to happen (normally of close to one day). These events are triggered by the on_actions file. Basically when an actions happens some events may be triggered as a consequence. Those actions include a child's birthday, the birth of a child or something as obscure as when a character stops backing another character's plot. Take a look at on_actions.txt in the common folder if you want to see what else is there.

More info on these can be found at http://forum.paradoxplaza.com/forum/showthread.php?578572-CKII-Modding-FAQ&p=13475904&viewfull=1#post13475904.
 
Last edited:
  • 3
Reactions:
yeah some useful things there, the more instances you can build up the better for the community :)...... until the official documents are released anyway, but we dont know when thats gonna be, could be tomorrow or next year lol.
 
I'm not really the sort to patiently wait for someone else to produce something I want. In that vein I've now added the stuff I've seen in the modifiers section.

The list from the devs should be better than this as I expect they would have some triggers/modifiers that they never used, plus they would probably explain a bit about how some of the weirder ones really work...
 
By scope I mean what are you talking about right now. If you write religion = orthodox which charater's religion are you checking?

To start with a character_event's scope is the character who gets the event notification, so religion = orthodox just inside the trigger will check if that character is orthodox. If you use the "father = { religion = orthodox }" trigger then the game instead checks to see if their father is orthodox, instead of the character getting the event. so father = {...} is a trigger which changes the scope from one character to another character.

Similarly you can change the scope to the province by using something like "capital_scope = { religion = orthodox }", which should check if the character's captial is orthodox.

Of course something like capital_scope = { trait = ambitious } just produces an error because trait = ... only make sense if your scope is a character, and not if your scope is a province. Provinces don't have traits.


NB: Just ignore for a second that "religion = orthodox" doesn't show up as a trigger you can use on provinces. I'll look into why when I get home from work.
 
The in game events often have a line saying something like
desc = "EVTDESC60000"

Then in one of the files in the localisation folder they will have a line which said what text EVTDESC60000 really is in all the different languages.

The format looks like this, where the x and the number of ; are very important:
EVTTOOLTIP7501;Receives your positive reply.;Reçoit votre réponse positive.;Erhält Ihre positive Antwort..;;Recibe tu respuesta positiva.;;;;;;;;;x
 
I found desc so can make my own and it look like it let choice what choice say.

Irresistable young wench
character_event = {
id = 76000
desc = "EVTDESC76000"
picture = GFX_evt_lovers

min_age = 16
max_age = 25
only_men = yes
only_rulers = yes
capable_only = yes

is_triggered_only = yes

trigger = {
is_married = no
NOT = {
trait = chaste
}
NOT = {
trait = celibate
}
NOT = {
trait = homosexual
}
fertility = 0.6
NOT = {
has_lover = yes
}
}

mean_time_to_happen = {
days = 1

modifier = {
factor = 2
trait = lustful
}
modifier = {
factor = 2
trait = gregarious
}

modifier = {
factor = 0.5
trait = shy
}
}

option = {
name = "EVTOPTA76000"
piety = -10
if = {
limit = {
NOT = {
trait = lustful
}
}
random = {
chance = 50

add_trait = lustful
hidden_tooltip = {
character_event = {
id = 38272 #Notify Lustful
}
}
}
}
}
option = {
name = "EVTOPTB76000"
if = {
limit = {
religion_group = muslim
}
piety = 5
}
if = {
limit = {
NOT = {
religion_group = muslim
}
}
add_trait = chaste
}
}
}


This something in the even strip I do understand and other things I do not. It could helpful not only to me, but community on forum if could break down that example that show, if not being to rude by asking.
 
This something in the even strip I do understand and other things I do not. It could helpful not only to me, but community on forum if could break down that example that show, if not being to rude by asking.

So far I've just been copying a similar event and working from that. I plan to look at the whole event structure eventually, but it could be a couple of weeks before I get the data I need together.
 
Very useful! What about the province-based options to come? I'm also very interested in the options that transfer titles between characters and de jure vassals between higher tier titles.