• 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.
I tested it myself and I do get it running, at least from the console even with the trigger intact. First I made sure the character I was playing as had the 'viking' trait.
The console command I typed :
event superexample.1337

And it launched normally. I got no idea why it won't function.
Its indeed run correctly with console but somehow it won't trigger normally even when my character has viking trait.
Really strange indeed.
 
Its indeed run correctly with console but somehow it won't trigger normally even when my character has viking trait.
Really strange indeed.
How are you intending to trigger it ?
In CK3 you need to trigger your events from decisions, other events or from on_actions, or character interactions.
Events are not run automatically. Under what kind of circumstance should this event be run ?

For example you can make an event run yearly on a character's birthday using an on_action.

For that you can create your own on_action file as a simple .TXT file in your mod's \\common\on_action\ folder.
The text file should be in UTF-8-BOM encoding but you can change that in Notepad++ in the top bar under 'Encoding' and selecting 'Convert to UTF-8-BOM'.

Inside that text file you can add the following code :
Code:
yearly_playable_pulse = {
    on_actions = {
        your_yearly_pulse
    }
}
your_yearly_pulse = {
    events = {
        superexample.1337
    }
}
Now that event gets run for all characters who are Counts, Dukes, Kings or Emperors on their birthday. And this way inside your own on_action block it won't override other mods or the base game's events.

The trigger inside the event itself will preclude characters who cannot fulfill the requirements. If you only want this event to happen to the Player you can add inside the trigger block the line is_ai = no like this :
Code:
    trigger = {
        is_ai = no
        has_trait = viking
        NOT = { has_trait = shy }
    }
 
  • 1
  • 1Like
Reactions:
How are you intending to trigger it ?
In CK3 you need to trigger your events from decisions, other events or from on_actions, or character interactions.
Events are not run automatically. Under what kind of circumstance should this event be run ?

For example you can make an event run yearly on a character's birthday using an on_action.

For that you can create your own on_action file as a simple .TXT file in your mod's \\common\on_action\ folder.
The text file should be in UTF-8-BOM encoding but you can change that in Notepad++ in the top bar under 'Encoding' and selecting 'Convert to UTF-8-BOM'.

Inside that text file you can add the following code :
Code:
yearly_playable_pulse = {
    on_actions = {
        your_yearly_pulse
    }
}
your_yearly_pulse = {
    events = {
        superexample.1337
    }
}
Now that event gets run for all characters who are Counts, Dukes, Kings or Emperors on their birthday. And this way inside your own on_action block it won't override other mods or the base game's events.

The trigger inside the event itself will preclude characters who cannot fulfill the requirements. If you only want this event to happen to the Player you can add inside the trigger block the line is_ai = no like this :
Code:
    trigger = {
        is_ai = no
        has_trait = viking
        NOT = { has_trait = shy }
    }
Thank You very much, the code is working and I got the general idea of how event work,
 
  • 1
Reactions:
HI. I made some decision but it's not working. Please tell me what is the problem.
I was trying to make decision that when you change culture, new culture gets all innovations I had from former culture.
It shows correct explanation in game that your new culture gets all innovations from former culture and It actually change my culture into capital province culture, but get innovation effect is not working.

this is the code that I made.

Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

    effect = {
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
        culture = { save_scope_as = former_culture }
        root.culture = {
            get_all_innovations_from = capital_province.culture
        }
    }

    ai_potential = {
        always = no
    }

}
 
HI. I made some decision but it's not working. Please tell me what is the problem.
I was trying to make decision that when you change culture, new culture gets all innovations I had from former culture.
It shows correct explanation in game that your new culture gets all innovations from former culture and It actually change my culture into capital province culture, but get innovation effect is not working.

this is the code that I made.

Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

    effect = {
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
        culture = { save_scope_as = former_culture }
        root.culture = {
            get_all_innovations_from = capital_province.culture
        }
    }

    ai_potential = {
        always = no
    }

}
The Capital culture is the target culture, the culture you're converting to, right ?
So I guess you need to save the old culture as a scope first before changing the ROOT's culture.
Then add all the innovations to the Capital province's culture from that former culture.

EDIT: Because in your example you had already changed the ROOT's culture to that of the Capital province so when it came time for the Capital province's culture
to get all the innovations from ROOT's culture by that point ROOT's culture was already the same as the Capital province's so nothing new got added.

Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

    effect = {
        culture = { save_scope_as = former_culture }
       
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
       
        capital_province.culture = {
            get_all_innovations_from = scope:former_culture
        }
    }

    ai_potential = {
        always = no
    }

}
 
Last edited:
The Capital culture is the target culture, the culture you're converting to, right ?
So I guess you need to save the old culture as a scope first before changing the ROOT's culture.
Then add all the innovations to the Capital province's culture from that former culture.

Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

    effect = {
        culture = { save_scope_as = former_culture }
    
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
    
        capital_province.culture = {
            get_all_innovations_from = scope:former_culture
        }
    }

    ai_potential = {
        always = no
    }

}
Thank you for replying. I tried what you told me to do, but it's still not working.
Is there any other option?
 
Thank you for replying. I tried what you told me to do, but it's still not working.
Is there any other option?
Maybe you'll need to change the last line to :
Code:
culture:capital_province.culture = {
    get_all_innovations_from = scope:former_culture
}
OR
Code:
culture:capital_province.culture = {
    get_all_innovations_from = scope:former_culture.culture
}

Other than this I'm also out of ideas. You might could want to check your error.log at \\Documents\Paradox Interactive\Crusader Kings III\logs\ for clues though.
 
Maybe you'll need to change the last line to :
Code:
culture:capital_province.culture = {
    get_all_innovations_from = scope:former_culture
}
OR
Code:
culture:capital_province.culture = {
    get_all_innovations_from = scope:former_culture.culture
}

Other than this I'm also out of ideas. You might could want to check your error.log at \\Documents\Paradox Interactive\Crusader Kings III\logs\ for clues though.
error log says Error: get_all_innovations_from effect [ target culture was null ]

maybe we can't technecally set 'capital province's culture' to target, not just pick certain culture.
 
error log says Error: get_all_innovations_from effect [ target culture was null ]

maybe we can't technecally set 'capital province's culture' to target, not just pick certain culture.
You may be right, but you could try saving the Capital province's culture as a scope first too :
Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

    effect = {
        culture = { save_scope_as = former_culture }
        capital_province.culture = { save_scope_as = new_culture }
        
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
        
        scope:new_culture = {
            get_all_innovations_from = scope:former_culture
        }
    }

    ai_potential = {
        always = no
    }

}
Or try using Capital COUNTY's culture instead :
Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

   effect = {
        culture = { save_scope_as = former_culture }
        
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
        
        culture:capital_county.culture = {
            get_all_innovations_from = scope:former_culture
        }
    }

    ai_potential = {
        always = no
    }

}
 
  • 1Like
Reactions:
You may be right, but you could try saving the Capital province's culture as a scope first too :
Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

    effect = {
        culture = { save_scope_as = former_culture }
        capital_province.culture = { save_scope_as = new_culture }
       
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
       
        scope:new_culture = {
            get_all_innovations_from = scope:former_culture
        }
    }

    ai_potential = {
        always = no
    }

}
Or try using Capital COUNTY's culture instead :
Code:
merge_with_local_culture_decision = {
    picture = "gfx/interface/illustrations/decisions/decision_realm.dds"
    title = merge_with_local_culture_decision_title
    desc = merge_with_local_culture_decision_desc
    selection_tooltip = merge_with_local_culture_decision_tooltip
    major = yes

    is_shown = {
        is_landed = yes
        primary_title.tier > tier_barony
        NOT = { culture = capital_province.culture }
    }

    is_valid_showing_failures_only = {
        is_at_war = no
    }

    cost = {
        prestige = convert_to_local_culture_base_cost
    }

   effect = {
        culture = { save_scope_as = former_culture }
       
        convert_family_culture_and_notify_vassals_effect = {
            CONVERTER = root
            OLD_CULTURE = root.culture
            NEW_CULTURE = capital_province.culture
        }
       
        culture:capital_county.culture = {
            get_all_innovations_from = scope:former_culture
        }
    }

    ai_potential = {
        always = no
    }

}
It works! Saving capital province's culture as a scope is the answer. Thank you so much!
 
  • 1
Reactions:
Does anyone understand how the ai starting a murder scheme is put together?

The only two relevant files I could find are: common/schemes/murder_scheme.txt, which mostly controls things like age at which you can start one, how much intrigue skill points matter, etc.

And then you have common/scripted_modifiers/00_hostile_scheme_scripted_modifiers.txt, in which:
- hostile_scheme_base_chance_modifier and hostile_scheme_agent_success_chance_modifier determine the chance the scheme succeeds (for the one that started it and for the agents that joined).
- hostile_scheme_agent_base_join_chance_modifier and hostile_murder_agent_base_join_chance_modifier are the factors that will determine if the ai will join someone elses scheme as an agent or not (differentiated between murder schemes and other hostile schemes).
- and finally you have start_hostile_scheme_ai_base_modifiers, which has literally nothing in it except for an intimidation penalty.

The last one is the one the part that confuses me. Where are all the other factors that determine whether ai will start a murder scheme? Does it use the same one as for the agents joining? (seems unlikely since opinion of the one starting the scheme is also a factor). Is it in a different file somewhere?
 
Is there a way to create a rule to make consorts only available to whoever owns the head of faith title?
So regular followers of the faith get 1 spouse and 0 consorts
but the head of faith gets 3 consorts for example?

In the help files I only see Parameters like
"men_can_have_consorts = yes"
 
Is there a way to create a rule to make consorts only available to whoever owns the head of faith title?
So regular followers of the faith get 1 spouse and 0 consorts
but the head of faith gets 3 consorts for example?

In the help files I only see Parameters like
"men_can_have_consorts = yes"
You could block it in the concubine interactions. If you look at common\character_interactions\00_marriage_interactions.txt there's a common check in the three concubine interactions make_concubine_interaction, find_concubine, and offer_concubine, of allowed_concubines = yes, and likewise in common\important_actions\00_marriage_actions.txt the action_can_take_concubine and action_can_take_consort the same allowed_concubines = yes.

I don't think the allowed_concubine trigger is moddable, but where ever it appears in those five locations you could add in your own code that if the character is a member of your modded faith, they must be the head of faith to allow the concubine interaction to be valid.
 
  • 1Like
Reactions:
Is it possible for a perk to have different character modifiers based on a game rule? For example, Perk A gives a 1 point increase to Martial with "Game Rule Normal", whereas "Game Rule Advanced" gives 3 points to Martial for the same perk. I've tried to create custom values for this, but they seem to be ignored for anything under character_modifier.
 
Is it possible for a perk to have different character modifiers based on a game rule? For example, Perk A gives a 1 point increase to Martial with "Game Rule Normal", whereas "Game Rule Advanced" gives 3 points to Martial for the same perk. I've tried to create custom values for this, but they seem to be ignored for anything under character_modifier.

Modifiers only take constant values.

The only exception to this are councillors which have scaling modifiers, so you could make a councillor (probably the Chaplain position, which must always be filled) give a character modifier to the liege, the value of which would scale depending on whether the perk is unlocked, and depending on the game rule. A bit janky, but it would work.
 
  • 1Like
Reactions:
Modifiers only take constant values.

The only exception to this are councillors which have scaling modifiers, so you could make a councillor (probably the Chaplain position, which must always be filled) give a character modifier to the liege, the value of which would scale depending on whether the perk is unlocked, and depending on the game rule. A bit janky, but it would work.
Clever, I'll give that a shot. Thank you.
 
I want to make it so when the player (not AI) takes a specific piece of land (title), they get a stat boost (+2 diplomacy) for example.
ie - conquer sussex and get +2 in diplomacy.

Anyone know how I would go about doing this. A 'decision' or 'character interaction', idk
 
I want to make it so when the player (not AI) takes a specific piece of land (title), they get a stat boost (+2 diplomacy) for example.
ie - conquer sussex and get +2 in diplomacy.

Anyone know how I would go about doing this. A 'decision' or 'character interaction', idk

There are on_actions that trigger when a character gets a title, probably on_title_gain, if you want it to be automatic.

But a decision would work fine as well.

Character interactions as well, but it's more complicated to set up for what you're doing.
 
English is not my first language.

Hi guys.
I want to change age that characters gets Education traits(e.g.Brilliant Strategist ).

on_16th_birthday = { trigger = { age = 15 } # Default is 16
(childhood_on_actions.txt)

I changed code like this.
But, education system has get completely broken.

already 'minimum_age' values in 00_traits.txt changed into 15.
'male_adult_age', 'female_adult_age' and 'adulthood_start_age' defined 15. (00_defines, 00_age_values.txt)

Old people still has traits like Affectionate or Willful. :<
And they never get any education traits.

Someone please help me :'<

edit:
Now over 15 yo History characters (when game has started) has education traits as I want. but lower 15 yo characters never get it.
 
Last edited: