• 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.
You can only check for the presence of lack of presence of a specific character flag, there is no way to check if a character has any flag at all.
Ah, that sucks.

Well, hopefully I should be able to "guess" most of them via the History/Characters files, and if there's not too many use that.

Edit : Well, that was unexpected... Apparently there's only 8 people in the History files with character flags set... I'd thought there were more, somehow.
 
Last edited:
I've got my own music mod working, but...
haven't music when I start the game,now. The main theme music has gone.

I looked into Stellaris and EUIV music and their songs and assets files, but they implement them in a bit different way.
I tried it with a maintheme.txt and also a maintheme entry in the songs.txt, but without success.
Any idea how I can set up a maintheme music with my mod again?

The music song list file should not be named "songs.txt" as in vanilla.
A "asongs.txt" for instance will already do.
This is under the assumption you don't use replace_path, as then you obviously require a crusaderkings2_maintitle file.
 
How do you disable Abrahamic religions sending missionaries to pagan realms?

Assuming you also want to include the Mazdans and Dharmic religions, replace action_inquisition in 00_job_actions.txt with this

Code:
action_inquisition = {
   attribute = learning
   
   potential = {
   }
   
   trigger = {
       num_of_settlements = 1
       NAND = {
           FROM = { job_spiritual = { has_character_modifier = spiritual_refused_pagans } }  # See Event ZE.5040
           owner = { religion_group = pagan_group }
       }
       OR = {
           #owner = {
           #   FROM = { NOT = { religion_group = pagan_group } }
           #   independent = yes
           #   NOT = { religion = FROM }
           #   religion_group = pagan_group
           #   OR = {
           #       NOT = { religion = aztec }
           #       year = 1350
           #   }
           #   is_reformed_religion = no
           #   capital_scope = {
           #       province = ROOT
           #   }
           #   controls_religion = no
           #   FROM = {
           #       higher_tier_than = COUNT
           #       OR = {
           #           independent = yes
           #           higher_tier_than = DUKE
           #       }
           #   }
           #   NOT = {
           #       has_opinion_modifier = { who = FROM modifier = opinion_sent_preacher }
           #   }
           #   is_within_diplo_range = FROM
           #}
           any_province_lord = {
               OR = {
                   character = FROM
                   is_liege_or_above = FROM
               }
           }
       }
   }

   events = { 900 901 902 903 }
}

If you want to allow the Mazdans and Dharmic religions to send preachers, ignore the above code and change "FROM = { NOT = { religion_group = pagan_group } }" to "FROM = { NOR = { religion_group = pagan group religion_group = christian religion_group = muslim religion_group = jewish_group} }".
 
Doesn't seem to be a Command for it, but are there any ways to clear the Messages part of the Outliner? My Mod causes several hundred to be presented in both high and low priority (as characters move in and out of your Court on start-up : apparently losing their titles causes them to default to come to me), and I'd like to wipe it at the end of the Event just for neatness.
 
Doesn't seem to be a Command for it, but are there any ways to clear the Messages part of the Outliner? My Mod causes several hundred to be presented in both high and low priority (as characters move in and out of your Court on start-up : apparently losing their titles causes them to default to come to me), and I'd like to wipe it at the end of the Event just for neatness.
I do not believe so no
 
ext up - I'm trying to assign a character a secret religion in the history files. I'm using a line that says secret_religion = <name here> as suggested in the recent change log (and as found on a couple of well-hidden characters in vanilla, which I checked, and which work) - but nothing is happening.
That's the conditional for checking the religion. Use set_secret_religion instead.
 
In edit event 301 (events/birth_events.txt), change the ai_chance. Changing a factor to 0 will make them never take that option. Since modifiers are multiplicative, the modifiers won't change that.

The first option is for legitimizing the child, the second for acknowledging, and the third for denouncing.
 
Is it possible to add a permanent modifier to a character (like a trait) without having it show up on the character screen? I don't want the player to be able to see who has the trait and who doesn't.
 
How can I make an event for a vassal were he/she becomes the designated regent of the liege? Do I need to trigger an event for the liege were the vassal in honored with the title?