• 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.
im trying to make a custom murder mod and is there a command in ck3 with the same effect as CK2s "murder" command where u could simple type murder murder [character id1] [character id2] (this would make the character with ID1 murder the character with ID2)? i searched but couldnt find it
 
Hi all, quick question, I've noticed that when adding the localization of a few files, it doesn't work unless I copy the entire vanilla file and then modify it off of that, keeping the name and all. Do you know if this is normal or if I'm doing something wrong? It gets a bit convoluted
 
Hi all, quick question, I've noticed that when adding the localization of a few files, it doesn't work unless I copy the entire vanilla file and then modify it off of that, keeping the name and all. Do you know if this is normal or if I'm doing something wrong? It gets a bit convoluted
Maybe it has something to do with the file encoding. The correct encoding is UTF-8 with BOM.
 
Is there a modding or console command for religion-related localization string replacement? Like, for example, you've founded a Norse heresy and want to set Freya or Loki as High God instead of Odin. I think CK2 had something like that.
 
Last edited:
I'm sorry, what exactly does that mean and how would I fix it then? I'm pretty new to this stuff.
In Notepad++, you can change the encoding as Fig.1. In VSCode, you can change the encoding as the Fig.2. And if you use the notepad in windows system, you can change the encoding by "save as". The figures are in the spoiler below.

Fig. 1 Notepad++
微信图片_20210118194436.png


Fig.2 VSCode
未标题-1.png


Fig.3 notepad
未标题-2.png
 
Where can I find the game files for the console commands? Specifically, I am looking for the instant_birth command and how it works.
Console commands are, to my knowledge, programmed in code, and therefore do not have a script-defined mechanism that is exposed to the user.

Hi all, quick question, I've noticed that when adding the localization of a few files, it doesn't work unless I copy the entire vanilla file and then modify it off of that, keeping the name and all. Do you know if this is normal or if I'm doing something wrong? It gets a bit convoluted
If you're overwriting any vanilla localization string, the file with the replacement must be included in the localization/<language>/replace folder, rather than anywhere else in the localization folder structure.
 
im trying to make a custom murder mod and is there a command in ck3 with the same effect as CK2s "murder" command where u could simple type murder murder [character id1] [character id2] (this would make the character with ID1 murder the character with ID2)? i searched but couldnt find it
Use this in the murder victim scope:
Code:
death = {
    killer = scope:killer
    death_reason = death_murder
}
 
Can you stop an event that was triggered but is on a countdown?

Code:
trigger_event = {
                    id = birth.3001
                    days = { 180 200 }
                }

I want to make a mod that stops events like this in the 180 to 200 days between triggering the event and the event firing. Is this possible and if yes how?
 
Can you stop an event that was triggered but is on a countdown?

Code:
trigger_event = {
                    id = birth.3001
                    days = { 180 200 }
                }

I want to make a mod that stops events like this in the 180 to 200 days between triggering the event and the event firing. Is this possible and if yes how?

I don't believe it's directly possible. However, if the event's trigger evaluates as false at the time when it is set to fire, it will not execute, so what you could do is modify the trigger to check for the conditions which you wish to have suspend it, and cause it to not fire if they're not met.

If the event you want to use to stop it firing is user-driven, such that you can't just check for the conditions in the main event trigger, you could have your stopping event set something like a character flag, and then check for its existence in the trigger of the event you want to stop. If the flag exists, don't trigger the event. Just be sure you have the character flag expire (or be otherwise cleared) in an appropriate amount of time after the event would fire, so that it doesn't impede future instances of the event from firing if it shouldn't do so.
 
I don't believe it's directly possible. However, if the event's trigger evaluates as false at the time when it is set to fire, it will not execute, so what you could do is modify the trigger to check for the conditions which you wish to have suspend it, and cause it to not fire if they're not met.

If the event you want to use to stop it firing is user-driven, such that you can't just check for the conditions in the main event trigger, you could have your stopping event set something like a character flag, and then check for its existence in the trigger of the event you want to stop. If the flag exists, don't trigger the event. Just be sure you have the character flag expire (or be otherwise cleared) in an appropriate amount of time after the event would fire, so that it doesn't impede future instances of the event from firing if it shouldn't do so.

Thank you for your answer. It is an in-game event so I can't add a trigger so I just copied the event to my mod and added a charcter flag. It's a bit inconviniet this way and more likely to interfere with other mods but if this is the only way...
 
Last edited:
In Notepad++, you can change the encoding as Fig.1. In VSCode, you can change the encoding as the Fig.2. And if you use the notepad in windows system, you can change the encoding by "save as". The figures are in the spoiler below.

Fig. 1 Notepad++
View attachment 672102

Fig.2 VSCode
View attachment 672103

Fig.3 notepad
View attachment 672118
Wow, that was a really in-depth guide, thank you so much! Nonetheless, though, it is already set in that encoding. The localization works only if I copy and paste a vanilla localization file and then add my localization inside of it, without changing the name nor removing the codes inside of it. This means that it becomes difficult to find my own localization since it's mixed with the vanilla one, while also forcing me to use the long vanilla names like "cultural_innovations_l_english.yml" instead of using my own, personalized names
 
I initially had trouble overwriting vanilla lines of localization.

What was needed I think was :

- In your mod's folder, you must place your own localization overwrite file at
\\Documents\Paradox Interactive\Crusader Kings III\mod\YOUR_MOD_NAME\localization\replace\

- Your localization overwrite file has to be a .YML file with UTF-8-BOM encoding
- If overwriting English text lines your localization overwrite file needs to be named something like YOUR_OVERWRITE_FILE_NAME_l_english.yml
(notice the lowercase letter L in between there, not a capital letter i)

- If overwriting English text lines the very first line of your overwrite localization file needs to start with the all lowercase text l_english:
- Next lines may require to always have one space at the start
Code:
l_english:
 vanilla_entry_one:0 "New text to display ingame here"
 vanilla_entry_two:0 "New text to display ingame here"
 vanilla_entry_three:0 "New text to display ingame here"
 
Last edited:
  • 1
Reactions:
Is there a modding or console command for religion-related localization string replacement? Like, for example, you've founded a Norse heresy and want to set Freya or Loki as High God instead of Odin. I think CK2 had something like that.
Two ways. You could do a customizable localistation to make the germanic_high_god_name localization key refer to other localization keys depending on whatever criteria you set. See \common\customizable_localization folder for examples of how it's done.

Or if you're making a new faith for your Germanic heresy, you can make the HighGodName of the faith refer to a new loc key with whatever name you want.

Either way remember to do all the he/she, alternate, and possessive loc keys as well. See common\religion\religions\00_germanic.txt for all the name locs you'll have to do.
 
Wow, that was a really in-depth guide, thank you so much! Nonetheless, though, it is already set in that encoding. The localization works only if I copy and paste a vanilla localization file and then add my localization inside of it, without changing the name nor removing the codes inside of it. This means that it becomes difficult to find my own localization since it's mixed with the vanilla one, while also forcing me to use the long vanilla names like "cultural_innovations_l_english.yml" instead of using my own, personalized names
If you want to add localization files for your mod, the names of localizatoin files need to be same with "name_l_english.yml". For example, you can name the cultural innovations localization file as "new_l_english.yml", but not "new_cultural_innovations.yml". And the first line in the file needs to be "l_english:". If you use the name same with vanilla names, you should also copy and paste the content of vanilla, otherwise the contents of vanilla itself will not be displayed. In addition to file encoding, name, and content format, you also need to make sure that the file path is correct.
If you want to add localization files to others' mod (i.e., translate others' mod), you can only copy and paste and modify it.
 
  • 1
Reactions:
I'm having trouble with the spawn_army command. I want the army to disband after a war. I've used war= scope:war and war = war , and neither seem to work. I'm not sure how to reference a war properly. I would basically want them to disband when all the wars are over. The code below works fine except for the war part.


Code:
spawn_army= {
        levies=0
        men_at_arms={
          type=armored_horsemen
          men=2000
              }
        men_at_arms={
          type=armored_footmen
          men=2000
              }
        location = root.capital_province
        inheritable = yes
        uses_supply = no
        name = "Army"
        war = scope:war
            }
 
If you want to add localization files for your mod, the names of localizatoin files need to be same with "name_l_english.yml". For example, you can name the cultural innovations localization file as "new_l_english.yml", but not "new_cultural_innovations.yml". And the first line in the file needs to be "l_english:". If you use the name same with vanilla names, you should also copy and paste the content of vanilla, otherwise the contents of vanilla itself will not be displayed. In addition to file encoding, name, and content format, you also need to make sure that the file path is correct.
If you want to add localization files to others' mod (i.e., translate others' mod), you can only copy and paste and modify it.
Thanks, it worked!
 
EDIT: Solved it, I had written the namespace wrong, though I still have no idea why the third one still worked

Hi all, quick (I think) question. I have created three events and they all work correctly, but for some reason, only the third one shows up in-game and in the console. I can switch them out and they all work, but only one at a time. If I type as a console command the first or second event, the third one shows up in their place. Again, I know for a fact that they all work. There's something wrong in the way I put them inside the file though, and I don't know what it is.
Here's the file I put in my_mod/events/ma_artists
Code:
#Events managing artists common to the whole world
namespace = feast_activity

#Culture-specific events
# 0001 - Irish metalworker (for irish rulers)
# 0002 - Irish metalworker (for insular rulers)
# 0003 - Irish metalworker (for catholic rulers)

#Ruler picking local_irish metalworker's craft
scripted_trigger irish_metalworker_trigger = {
    is_landed = yes
    short_term_gold >= minor_gold_value
    NOT = {
        has_character_modifier = vow_of_poverty_modifier
    }
    NOT = {
        has_character_flag = irish_metalworker_introduced_flag
    }
}
ma_artist.0001 = { #Irish metalworker (for irish rulers)
    type = character_event
    title = ma_artist.0001.t
    desc = ma_artist.0001.desc
    theme = diplomacy_majesty_focus
    override_background = {
        event_background = throne_room
    }
    left_portrait = {
        character = root
        animation = personality_bold
    }
    right_portrait = {
        character = scope:local_irish_metalworker
        animation = admiration
    }
    trigger = {
        irish_metalworker_trigger = yes
        has_culture = culture:irish
    }
    weight_multiplier = {
        base = 0.8
        modifier = { #More likely if ruler has gold
            add = 0.5
            short_term_gold >= medium_gold_value
        }
        modifier = { #Much more likely if ruler is prestigious
            add = 2
            prestige_level >= 3
        }
    }
    immediate = {
        hidden_effect = {
            create_character = {
                location = root.capital_province
                gender_female_chance = 20
                template_character = root
                age = { 18 50 }
                stewardship = { medium_skill_rating high_skill_rating }
                learning = 7
                trait = diligent
                random_traits = yes
                random_traits_list = {
                    count = 2
                    calm = {}
                    generous = {}
                    zealous = {}
                    greedy = {}
                }
                save_scope_as = local_irish_metalworker
                dynasty = none
            }          
        }
    }
    option = {  #Secular craft (IRISH)
        trigger = {
            exists = scope:local_irish_metalworker
            is_landed = yes
        }
        name = ma_artist.0001.a      
        pay_short_term_gold = {
            target = scope:local_irish_metalworker
            gold = minor_gold_value
        }
        add_courtier = scope:local_irish_metalworker
        hidden_effect = {
            reverse_add_opinion = {
                target = scope:local_irish_metalworker
                modifier = hired_me_opinion
            }
        }
        add_character_modifier = {
            modifier = local_golden_belt_modifier
            years = 15
        }
        add_character_flag = {
            flag = irish_metalworker_introduced_flag
            years = 15
        }
        ai_chance = {
            factor = 500
            modifier = {
                short_term_gold <= minor_gold_value
                factor = 0
            }
        }
    }
    option = {  #Theological craft (IRISH)
        trigger = {
            exists = scope:local_irish_metalworker
            is_landed = yes #extra check to make sure they haven't lost their status
        }
        name = ma_artist.0001.b  
        pay_short_term_gold = {
            target = scope:local_irish_metalworker
            gold = minor_gold_value
        }
        add_courtier = scope:local_irish_metalworker
        hidden_effect = {
            reverse_add_opinion = {
                target = scope:local_irish_metalworker
                modifier = hired_me_opinion
            }
        }
        add_character_modifier = {
            modifier = local_altarware_modifier
            years = 15
        }
        add_character_flag = {
            flag = irish_metalworker_introduced_flag
            years = 15
        }
        ai_chance = {
            factor = 500
            modifier = {
                short_term_gold <= minor_gold_value
                factor = 0
            }
        }
    }
    option = {  #Send him home
        name = ma_artist.0001.c
        custom_tooltip = ma_artist.0001.c1
        hidden_effect = {
            scope:local_irish_metalworker = { move_to_pool = yes }              
        }
        ai_chance = {
            factor = 200
        }
    }
}
ma_artist.0002 = { #Irish metalworker (for insular rulers)
    type = character_event
    title = ma_artist.0002.t
    desc = ma_artist.0002.desc
    theme = diplomacy_majesty_focus
    override_background = {
        event_background = throne_room
    }
    left_portrait = {
        character = root
        animation = personality_bold
    }
    right_portrait = {
        character = scope:insular_irish_metalworker
        animation = admiration
    }
    trigger = {
        irish_metalworker_trigger = yes
        culture = {
            has_innovation = innovation_insular_art
        }
        NOT = {
            has_culture = culture:irish
        }
    }
    weight_multiplier = {
        base = 0.5
        modifier = { #More likely if ruler has gold
            add = 0.3
            short_term_gold >= medium_gold_value
        }
        modifier = { #Much more likely if ruler is prestigious
            add = 1.8
            prestige_level >= 3
        }
    }
    immediate = {
        hidden_effect = {
            create_character = {
                location = root.capital_province
                gender_female_chance = 15
                template_character = root
                age = { 18 50 }
                stewardship = { medium_skill_rating high_skill_rating }
                learning = 6
                trait = diligent
                random_traits = yes
                random_traits_list = {
                    count = 2
                    calm = {}
                    ambitious = {}
                    zealous = {}
                    greedy = {}
                }
                dynasty = none
                save_scope_as = insular_irish_metalworker
            }      
        }
    }
    option = {  #Secular craft (IRISH)
        trigger = {
            exists = scope:insular_irish_metalworker
            is_landed = yes
        }
        name = ma_artist.0001.a      
        pay_short_term_gold = {
            target = scope:insular_irish_metalworker
            gold = minor_gold_value
        }
        add_courtier = scope:insular_irish_metalworker
        hidden_effect = {
            reverse_add_opinion = {
                target = scope:insular_irish_metalworker
                modifier = hired_me_opinion
            }
        }
        add_character_modifier = {
            modifier = insular_golden_belt_modifier
            years = 15
        }
        add_character_flag = {
            flag = irish_metalworker_introduced_flag
            years = 15
        }
        ai_chance = {
            factor = 500
            modifier = {
                short_term_gold <= minor_gold_value
                factor = 0
            }
        }
    }
    option = {  #Theological craft (IRISH)
        trigger = {
            exists = scope:insular_irish_metalworker
            is_landed = yes #extra check to make sure they haven't lost their status
        }
        name = ma_artist.0001.b  
        pay_short_term_gold = {
            target = scope:insular_irish_metalworker
            gold = minor_gold_value
        }
        add_courtier = scope:insular_irish_metalworker
        hidden_effect = {
            reverse_add_opinion = {
                target = scope:insular_irish_metalworker
                modifier = hired_me_opinion
            }
        }
        add_character_modifier = {
            modifier = insular_altarware_modifier
            years = 15
        }
        add_character_flag = {
            flag = irish_metalworker_introduced_flag
            years = 15
        }
        ai_chance = {
            factor = 500
            modifier = {
                short_term_gold <= minor_gold_value
                factor = 0
            }
        }
    }
    option = {  #Send him home
        name = ma_artist.0001.c
        custom_tooltip = ma_artist.0001.c1
        hidden_effect = {
            scope:insular_irish_metalworker = { move_to_pool = yes }              
        }
        ai_chance = {
            factor = 200
        }
    }
}
ma_artist.0003 = { #Irish metalworker (for catholic rulers)
    type = character_event
    title = ma_artist.0003.t
    desc = ma_artist.0003.desc
    theme = diplomacy_foreign_affairs_focus
    override_background = {
        event_background = throne_room_scope
    }
    left_portrait = {
        character = root
        animation = personality_bold
    }
    right_portrait = {
        character = scope:irish_metalworker
        animation = admiration
    }
    trigger = {
        irish_metalworker_trigger = yes
        has_faith = faith:catholic
        NOR = {
            has_culture = culture:irish
            culture = {
                has_innovation = innovation_insular_art
            }
        }
    }
    weight_multiplier = {
        base = 0.1
        modifier = { #More likely if ruler has gold
            add = 0.1
            short_term_gold >= medium_gold_value
        }
        modifier = { #More likely if ruler has a lot of gold
            add = 0.1
            short_term_gold >= major_gold_value
        }
        modifier = { #More likely if ruler is prestigious
            add = 0.2
            prestige_level >= 3
        }
        modifier = { #Much more likely if ruler is inside of
            add = 1
            capital_province = { geographical_region = custom_irish_influence_area }
        }
    }
    immediate = {
        hidden_effect = {
            create_character = {
                location = root.capital_province
                gender_female_chance = 15
                faith = faith:insular_celtic
                culture = culture:irish
                age = { 18 50 }
                stewardship = { medium_skill_rating high_skill_rating }
                learning = 6
                trait = ambitious
                random_traits = yes
                random_traits_list = {
                    count = 2
                    calm = {}
                    generous = {}
                    diligent = {}
                    greedy = {}
                }
                save_scope_as = irish_metalworker
                dynasty = none
            }
        }
    }
    option = {  #Secular craft (IRISH)
        trigger = {
            exists = scope:irish_metalworker
            is_landed = yes
        }
        name = ma_artist.0001.a      
        pay_short_term_gold = {
            target = scope:irish_metalworker
            gold = minor_gold_value
        }
        add_courtier = scope:irish_metalworker
        hidden_effect = {
            reverse_add_opinion = {
                target = scope:irish_metalworker
                modifier = hired_me_opinion
            }
        }
        add_character_modifier = {
            modifier = insular_golden_belt_modifier
            years = 15
        }
        add_character_flag = {
            flag = irish_metalworker_introduced_flag
            years = 15
        }
        ai_chance = {
            factor = 500
            modifier = {
                short_term_gold <= minor_gold_value
                factor = 0
            }
        }
    }
    option = {  #Theological craft (IRISH)
        trigger = {
            exists = scope:irish_metalworker
            is_landed = yes #extra check to make sure they haven't lost their status
        }
        name = ma_artist.0001.b  
        pay_short_term_gold = {
            target = scope:irish_metalworker
            gold = minor_gold_value
        }
        add_courtier = scope:irish_metalworker
        hidden_effect = {
            reverse_add_opinion = {
                target = scope:irish_metalworker
                modifier = hired_me_opinion
            }
        }
        add_character_modifier = {
            modifier = insular_altarware_modifier
            years = 15
        }
        add_character_flag = {
            flag = irish_metalworker_introduced_flag
            years = 15
        }
        ai_chance = {
            factor = 500
            modifier = {
                short_term_gold <= minor_gold_value
                factor = 0
            }
        }
    }
    option = {  #Send him home
        name = ma_artist.0001.c
        custom_tooltip = ma_artist.0001.c1
        hidden_effect = {
            scope:insular_irish_metalworker = { move_to_pool = yes }              
        }
        ai_chance = {
            factor = 200
        }
    }
}
 
Last edited:
I think perhaps you might be misunderstanding the purpose of the namespace. It has to appear at the start of the event file as an index for the game to find the event. So with your namespace of feast_activity you need to name your events:

feast_activity.ma_artist.0001 = {

Either that or change your namespace to ma_artist