• 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.
Hey everyone, does anyone know what the religious equivalent of event 55000 is, if such an analogous event exists, and what file to find it in? Thanks

The closest is event 39500, which converts non-Muslim counties to Islam when they have a Muslim owner. Otherwise, they usually only change religion when a lord spiritual is converting the county (event 900)
 
I have about 10 conditional statements in an on-event trigger that evaluate various close relative family members. If there aren't any close family, it checks the liege. Which would save the most CPU:
a) Wrap all 10 relative checks in a conditional that first checks 'any_close_relative' scope
b) Evaluate all 10 relative checks separately before liege

Also, is there a way to benchmark the time it takes CK2 to process my event or have it output event duration to the console?
 
The closest is event 39500, which converts non-Muslim counties to Islam when they have a Muslim owner. Otherwise, they usually only change religion when a lord spiritual is converting the county (event 900)

Thanks. I guess I never realized that religion pretty much only changes through the court chaplain event unless one is Muslim.
 
I have about 10 conditional statements in an on-event trigger that evaluate various close relative family members. If there aren't any close family, it checks the liege. Which would save the most CPU:
a) Wrap all 10 relative checks in a conditional that first checks 'any_close_relative' scope
b) Evaluate all 10 relative checks separately before liege

Also, is there a way to benchmark the time it takes CK2 to process my event or have it output event duration to the console?
I feel I should point something out: the order you type a list of conditionals is not necessarily the order they get checked. The game does some of its own optimizing.

As it stands, your question is a bit vague as to exactly what you're doing. Could you perhaps show us some code?
 
What actually does kill my spouse in the plot? I mean what single code line does the job?
Code:
# Get a spouse killed
plot_kill_spouse = {
    type = spouse
    intrigue_plot = yes
    murder_plot = yes
    society_plot = {
        ROOT = {
            society_member_of = the_assassins
            society_rank >= 2
        }
        OR = {
            FROM = {
                NOR = {
                    religion = shiite
                    has_secret_religion = shiite
                }
            }
            ROOT = {
                has_quest = quest_the_assassins_assassination
                quest_target = { character = FROM }
            }
        }
    }
    
    # Plotter scope
    potential = {
        prisoner = no
        age = 16
        is_married = yes
        NOT = { trait = incapable }
        NOT = {
            AND = {
                ai = yes
                trait = honest
            }
        }
        NOT = {
            AND = {
                ai = yes
                trait = kind
            }
        }
    }
    
    # Target allow trigger for when players target a specific character in the GUI
    player_allow = {
        always = yes
    }
    
    # Target character scope
    allow = {
        NOT = { is_lover = FROM }
        
        OR = {
            # Human
            FROM = { ai = no }
            
            # Male plotter without sons wanting to kill an old/barren wife
            AND = {
                age = 40
                FROM = {
                    is_female = no
                    OR = {
                        is_ruler = yes
                        is_primary_heir = yes
                    }
                    # No sons
                    NOT = {
                        any_child = {
                            is_alive = yes
                            is_female = no
                        }
                    }
                    NOT = { opinion = { who = ROOT value = 50 } }
                }
            }
            
            # Female plotter disliking her husband but loving her child - the legal heir
            FROM = {
                is_female = yes
                num_of_children = 1
                any_child = {
                    is_alive = yes
                    any_heir_title = {
                        holder = ROOT
                    }
                    NOT = { trait = incapable }
                    their_opinion = { who = FROM value = 75 }
                }
            }
            
            # Spouse has a lover...
            AND = {
                has_lover = yes
                any_lover = {
                    NOT = { character = FROM }
                }
            }

            # Insane plotter...
            FROM = {
                OR = {
                    trait = lunatic
                    trait = possessed
                }
            }
        }

        OR = {
            FROM = { ai = no }
            FROM = { NOT = { opinion = { who = ROOT value = -25 } } }
        }
    }
    
    chance = {
        factor = 10
        
        modifier = {
            factor = 0.01
            FROM = { trait = content }
        }
        modifier = {
            factor = 0.2
            FROM = { pacifist = yes }
        }       
        modifier = {
            factor = 0
            their_opinion = { who = FROM value = 25 }
        }
        modifier = {
            factor = 0
            their_opinion = { who = FROM value = 0 }
            NOT = {
                OR = {
                    FROM = { trait = envious }
                    FROM = { trait = deceitful }
                    FROM = { trait = ambitious }
                }
            }       
        }
        modifier = {
            factor = 1.5
            NOT = { their_opinion = { who = FROM value = -25 } }
        }
        modifier = {
            factor = 1.5
            NOT = { their_opinion = { who = FROM value = -50 } }
        }
        modifier = {
            factor = 2.0
            NOT = { their_opinion = { who = FROM value = -75 } }
        }
        modifier = {
            factor = 2.0
            FROM = { trait = deceitful }
        }
        modifier = {
            factor = 1.5
            FROM = { trait = paranoid }
        }
        modifier = {
            factor = 1.25
            FROM = { trait = lunatic }
        }
        modifier = {
            factor = 1.25
            FROM = { trait = possessed }
        }
        modifier = {
            factor = 1.25
            FROM = { trait = intricate_webweaver }
        }
        modifier = {
            factor = 1.5
            FROM = { trait = elusive_shadow }
        }
        modifier = {
            factor = 2.0
            age = 40
            FROM = {
                is_female = no
                NOT = {
                    any_child = {
                        is_alive = yes
                        is_female = no
                    }
                }
            }
        }
        modifier = {
            factor = 50
            FROM = { has_quest = quest_the_assassins_assassination }
            is_quest_target_of = FROM
        }
    }
    
    success = {
        is_alive = no
        hidden_tooltip = {
            FROM = { has_character_flag = murder_in_motion }
        }
    }
    abort = {
        is_alive = no
        FROM = {
            trait = incapable
        }
    }
    abort_effect = {
        FROM = { clr_character_flag = murder_in_motion }
    }
    effect = {
        FROM = {
            clr_character_flag = murder_in_motion
            # Achievement
            hidden_tooltip = {
                if = {
                    limit = {
                        ai = no
                    }
                    set_character_flag = achievement_spouse_killer
                }
            }
        }
    }
}
 
What actually does kill my spouse in the plot? I mean what single code line does the job?
Code:
# Get a spouse killed
plot_kill_spouse = {
    type = spouse
    intrigue_plot = yes
    murder_plot = yes
    society_plot = {
        ROOT = {
            society_member_of = the_assassins
            society_rank >= 2
        }
        OR = {
            FROM = {
                NOR = {
                    religion = shiite
                    has_secret_religion = shiite
                }
            }
            ROOT = {
                has_quest = quest_the_assassins_assassination
                quest_target = { character = FROM }
            }
        }
    }
   
    # Plotter scope
    potential = {
        prisoner = no
        age = 16
        is_married = yes
        NOT = { trait = incapable }
        NOT = {
            AND = {
                ai = yes
                trait = honest
            }
        }
        NOT = {
            AND = {
                ai = yes
                trait = kind
            }
        }
    }
   
    # Target allow trigger for when players target a specific character in the GUI
    player_allow = {
        always = yes
    }
   
    # Target character scope
    allow = {
        NOT = { is_lover = FROM }
       
        OR = {
            # Human
            FROM = { ai = no }
           
            # Male plotter without sons wanting to kill an old/barren wife
            AND = {
                age = 40
                FROM = {
                    is_female = no
                    OR = {
                        is_ruler = yes
                        is_primary_heir = yes
                    }
                    # No sons
                    NOT = {
                        any_child = {
                            is_alive = yes
                            is_female = no
                        }
                    }
                    NOT = { opinion = { who = ROOT value = 50 } }
                }
            }
           
            # Female plotter disliking her husband but loving her child - the legal heir
            FROM = {
                is_female = yes
                num_of_children = 1
                any_child = {
                    is_alive = yes
                    any_heir_title = {
                        holder = ROOT
                    }
                    NOT = { trait = incapable }
                    their_opinion = { who = FROM value = 75 }
                }
            }
           
            # Spouse has a lover...
            AND = {
                has_lover = yes
                any_lover = {
                    NOT = { character = FROM }
                }
            }

            # Insane plotter...
            FROM = {
                OR = {
                    trait = lunatic
                    trait = possessed
                }
            }
        }

        OR = {
            FROM = { ai = no }
            FROM = { NOT = { opinion = { who = ROOT value = -25 } } }
        }
    }
   
    chance = {
        factor = 10
       
        modifier = {
            factor = 0.01
            FROM = { trait = content }
        }
        modifier = {
            factor = 0.2
            FROM = { pacifist = yes }
        }      
        modifier = {
            factor = 0
            their_opinion = { who = FROM value = 25 }
        }
        modifier = {
            factor = 0
            their_opinion = { who = FROM value = 0 }
            NOT = {
                OR = {
                    FROM = { trait = envious }
                    FROM = { trait = deceitful }
                    FROM = { trait = ambitious }
                }
            }      
        }
        modifier = {
            factor = 1.5
            NOT = { their_opinion = { who = FROM value = -25 } }
        }
        modifier = {
            factor = 1.5
            NOT = { their_opinion = { who = FROM value = -50 } }
        }
        modifier = {
            factor = 2.0
            NOT = { their_opinion = { who = FROM value = -75 } }
        }
        modifier = {
            factor = 2.0
            FROM = { trait = deceitful }
        }
        modifier = {
            factor = 1.5
            FROM = { trait = paranoid }
        }
        modifier = {
            factor = 1.25
            FROM = { trait = lunatic }
        }
        modifier = {
            factor = 1.25
            FROM = { trait = possessed }
        }
        modifier = {
            factor = 1.25
            FROM = { trait = intricate_webweaver }
        }
        modifier = {
            factor = 1.5
            FROM = { trait = elusive_shadow }
        }
        modifier = {
            factor = 2.0
            age = 40
            FROM = {
                is_female = no
                NOT = {
                    any_child = {
                        is_alive = yes
                        is_female = no
                    }
                }
            }
        }
        modifier = {
            factor = 50
            FROM = { has_quest = quest_the_assassins_assassination }
            is_quest_target_of = FROM
        }
    }
   
    success = {
        is_alive = no
        hidden_tooltip = {
            FROM = { has_character_flag = murder_in_motion }
        }
    }
    abort = {
        is_alive = no
        FROM = {
            trait = incapable
        }
    }
    abort_effect = {
        FROM = { clr_character_flag = murder_in_motion }
    }
    effect = {
        FROM = {
            clr_character_flag = murder_in_motion
            # Achievement
            hidden_tooltip = {
                if = {
                    limit = {
                        ai = no
                    }
                    set_character_flag = achievement_spouse_killer
                }
            }
        }
    }
}

None of it. The actually murder is done by events. If your looking for the code, the command is:

Code:
death = {
     death_reason = (death reason)
     killer = (killer, if applicable)
}

If your looking for the events, they're in plot_events and cm_murder_plot_events (the latter is for if the target is in hiding)
 
None of it. The actually murder is done by events. If your looking for the code, the command is:

Code:
death = {
     death_reason = (death reason)
     killer = (killer, if applicable)
}

If your looking for the events, they're in plot_events and cm_murder_plot_events (the latter is for if the target is in hiding)
Great thx. I already wondered why those plot scripst are so short^^

Another question:
What combination of type, target_potential and allow do I need to make only the liege of the plotter be a target of a plot. I tried a few combinations but I clearly don't understand those variables enough to get them right.
 
Hey friends, I have created a new religion in a new religion group, and inside the religion I have set
Code:
 priests_can_marry = yes
yet when I try to arrange a marriage with a the religious head or anyone in his court it will not let me send the request. There is no bar showing that such a request would be accepted or denied, rather the send button is simply greyed out. I am able to properly arrange marriages with regular baron-level priests.

- Might it be related to the fact that the religion group defaults to Christianity for a number of things? I am pretty sure those are only cosmetic UI defaults.
- Could it also be related to the government type?
 
Hey friends, I have created a new religion in a new religion group, and inside the religion I have set
Code:
 priests_can_marry = yes
yet when I try to arrange a marriage with a the religious head or anyone in his court it will not let me send the request. There is no bar showing that such a request would be accepted or denied, rather the send button is simply greyed out.
Is his title set up right? If it's dynamic, he could be stuck in province null (which is a common mistake; dynamic titles need a valid base title for diplomacy and other things to function right), or it could have one of the title flags that forbid marriage, such as rebel (which seems less likely).
 
What combination of type, target_potential and allow do I need to make only the liege of the plotter be a target of a plot. I tried a few combinations but I clearly don't understand those variables enough to get them right.
I finally found it out myself:
Code:
type = realm_characters
...
target_potential = {
       ROOT = { de_facto_liege = ROOT }
   }
 
Is the minor title title_regent moddable? In the file I see this: HARD: AUTO-GRANTED - DO NOT REMOVE! Does that mean I can mod it but not remove or not even modding is possible?
 
I've got a question on ai_will_do when used in a casus belli: Paradox in the comments says, "ai_will_do is the importance placed on this CB." What does that mean exactly? Is it similar to decisions, where factor 1 = 100% chance of using it every month, or is it just about the ai prioritizing what cb to use over others?
 
Last edited:
In the localisation files, is it possible to set another language? How can I make the game recognize another?
 
Does anyone know the syntax to add a imprison_reason, revoke_reason or whatever to a Trait ? I am trying to add a trait (Slave) that gives the liege the right to imprison at any time but I can't seem to do it without a modifier - is this the only way ?
 
Does anyone know the syntax to add a imprison_reason, revoke_reason or whatever to a Trait ? I am trying to add a trait (Slave) that gives the liege the right to imprison at any time but I can't seem to do it without a modifier - is this the only way ?
I'm not an modding expert, but I don't see a way that revoke_reason can be used outside of opinion modifiers. That appears to be the only way Paradox coded revocation reasons in the base game.