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

furiousnerdhere

Recruit
Sep 9, 2020
3
1
I do a lot of scripting at my job, and started looking at the available strings to create runnable cheat batch scripts. This is just a beginning reference, if you would like more just let me know below.

Directions:
1. Creat Run folder
On Windows if you open explorer then go to, "C:\Users\%yourusername%\Documents\Paradox Interactive\Crusader Kings III\" (no quotes, i can create a script to automatically make this if that's helpful at all.)
In this folder, you need to make a new folder called "run" (no quotes)

2. Make a new text document in the run folder and name it "sumthin.txt" (no quotes, name it whatever you want in the run folder, just remember the file name.)

3. Open the text document and add the stuff you want it to load, it's slightly different than the console syntax, keep that in mind.

This is what I know works so far:
Code:
add_gold = 500000
add_piety = 8600
add_prestige = 8600
add_renown = 8600
set_sexuality = ho
add_dynasty_prestige = 81081
add_martial_skill = 56
add_prowess_skill = 56
add_diplomacy_skill = 56
add_stewardship_skill = 56
add_learning_skill = 56
add_intrigue_skill = 56

Keep in mind Skills max out at 100, other than that, make it whatever you want.

After that, save the document, and then in game type "run yourtextdoc.txt"

I'm going to be updating this with a list of the different values and strings, just wanted to throw this up here to help people out.
 
Last edited:
Code:
set_sexuality = X
In place of X you can put : he, ho, bi, as, none
he = Heterosexual
ho = Homosexual
bi = Bisexual
as = Asexual
none = no fun for you

Code:
add_diplomacy_lifestyle_xp = 50000
add_intrigue_lifestyle_xp = 50000
add_learning_lifestyle_xp = 50000
add_martial_lifestyle_xp = 50000
add_stewardship_lifestyle_xp = 50000
The add_lifestyle_xp_all command does not work in batch (for whatever reason, so you can just select per.

Code:
change_government = X
Here you can put a few different values:
theocracy_government
clan_government
feudal_government
holy_order_government
mercenary_government
 
Last edited:
Thanks a lot! I tried to add some myself but no luck :p. For example in game console it works like this: discover_innovation innovation_city_planning

in the txt file I tried:
discover_innovation = innovation_city_planning
discover_innovation = city_planning

but none worked. Is there any way you find out the correct syntax? Or just trial and error?
 
In their scripting environment, it takes specific criteria, so in this case for what your looking for.

discover_innovation = innovation_city_planning
discover_innovation = city_planning

Instead, try this, put this in a txt doc, and run it in game and see what happens.

Code:
add_innovation = innovation_city_planning

or you can unlock the era

Code:
discover_era = culture_era_tribal

One of those should work.
 
  • 1Like
Reactions:
Is there a way to run the add_dynasty_perk script ? For role playing reasons I want to add certain dynasty perks to my house early in the game without boosting it to be the most famous dynasty in the world
 
But how would you select someone to run that batch file that isn't the currently controlled character?
You can use things like every_, random_, and ordered_ to select specific characters, and then do things with them. Switching to the character then running the run.txt you want is probably easier, but if you're willing to write a little bit of script you can make the game do things for you to a bunch of people at once.

'Every' will apply an effect to every character who fits the appropriate triggers, 'Random' will select one character at random from that group of people who meet the triggers, and 'Ordered' will take every character who fits the triggers, then put them in order based on a value you decide. If you explore the Wiki a little, you can ctrl+F "random_", "every_", and "ordered_" to see the different groups of people you can use it on (and if you go to the triggers page you can see all the limits you can use).

For example, I set up this scripted effect:

Code:
scripted_effect give_all_courtiers_lustful_trait = {
    every_courtier_or_guest = {   
        if = {
            limit = { has_trait = chaste } # If chaste, take it away and give them lustful; otherwise, because you can't have opposite traits, nothing will happen
            remove_trait = chaste
            add_trait = lustful
        }
        else = {
            add_trait = lustful
        }
    }
}

and then ran the document. It takes everyone who is a courtier or guest and gives them lustful (even if they already have the opposite chaste trait). Note that I use scripted_effect because I think it's required to run the more complicated functions and to use scopes.
2022-08-12 23-29-22 - give_lustful_example .png

And then you can use limits to narrow down the list of characters you want to affect:

Code:
scripted_effect give_all_young_adult_courtiers_lovers_pox_trait = {
    every_courtier_or_guest = {   
        limit = { # We want every character who is a courtier between the ages of 17 and 28, who doesn't look like me
            age > 16
            age <= 28
            NOT = { has_trait = beauty_bad }
        }
        if = {
            limit = { NOT = { has_trait = chaste } } # Don't give it to chaste characters, because they would never
            add_trait = lovers_pox
        }
    }
}
2022-08-12 23-35-02 - example_2.png

By using increasingly more specific limits you can really narrow down characters to basically exactly who you want to be affected by something. But, if the character has a Historical ID, you can also use that historical ID directly in the script:

Code:
scripted_effect give_scottish_queen_schemer = {
    character:102505 = {
        add_trait = schemer
    }
}

There might be a way to use the regular character ID in the same capacity, but I've only ever been able to get the historical ID to work this way.
2022-08-12 23-41-05 - example_3.png

So, yeah, switching might be easier in some cases, and at this point you're basically just straight up modding, but you can get some really cool results if you're willing to experiment with some more advanced stuff.
 
  • 2
  • 1Like
Reactions:
So I can't just target a specific character in-game to give traits to, but I could give an otherwise unused trait in-game like the saint trait to a courtier, THEN run the script to target guests with the saint trait to make the changes I want which would also remove said saint trait?

Also, thank you for being so helpful, your explanations are easy to follow.
 
  • 1Like
Reactions:
So I can't just target a specific character in-game to give traits to, but I could give an otherwise unused trait in-game like the saint trait to a courtier, THEN run the script to target guests with the saint trait to make the changes I want which would also remove said saint trait?

Also, thank you for being so helpful, your explanations are easy to follow.
Yeah, that's actually kind of a brilliant idea. I think that should work, but if it proves somehow not to, or it causes unforeseen problems, you could also try using character flags. Just switch to whatever character you want to affect, and copy and paste this into the console: effect = { add_character_flag = character_to_do_stuff_to }

Change the flag's name (i.e., character_to_do_stuff_to) to whatever you want it to be (and if you hover over the pink AIValue at the top of a character's portrait, at the bottom of that dropdown, under variables, it will tell you all the variables and flags a character has). This will apply a character_flag to the character you currently are, then when you run the script, instead of targeting a trait, target that flag with:

Code:
every_courtier_or_guest = {
    limit = {
        has_character_flag = character_to_do_stuff_to
    }
    # Your effects here
}

If you ever want to remove a character flag, just type effect = { remove_character_flag = your_flag_here } into the console (EDIT: Or add just remove_character_flag = your_flag_here into your script).
 
Last edited:
  • 1
Reactions:
I do a lot of scripting at my job, and started looking at the available strings to create runnable cheat batch scripts. This is just a beginning reference, if you would like more just let me know below.

Directions:
1. Creat Run folder
On Windows if you open explorer then go to, "C:\Users\%yourusername%\Documents\Paradox Interactive\Crusader Kings III\" (no quotes, i can create a script to automatically make this if that's helpful at all.)
In this folder, you need to make a new folder called "run" (no quotes)

2. Make a new text document in the run folder and name it "sumthin.txt" (no quotes, name it whatever you want in the run folder, just remember the file name.)

3. Open the text document and add the stuff you want it to load, it's slightly different than the console syntax, keep that in mind.

This is what I know works so far:
Code:
add_gold = 500000
add_piety = 8600
add_prestige = 8600
add_renown = 8600
set_sexuality = ho
add_dynasty_prestige = 81081
add_martial_skill = 56
add_prowess_skill = 56
add_diplomacy_skill = 56
add_stewardship_skill = 56
add_learning_skill = 56
add_intrigue_skill = 56

Keep in mind Skills max out at 100, other than that, make it whatever you want.

After that, save the document, and then in game type "run yourtextdoc.txt"

I'm going to be updating this with a list of the different values and strings, just wanted to throw this up here to help people out.
hi how i make all this commands in one run text.. ?
know_schemes
instant_birth
instabuild
instant_responses
 
I've given a try at making the following effect work with no luck are you able to point out what i've done wrong and how i can get it to run.

effect = { every_realm_province = { limit = { has_holding = yes has_building_or_higher = hospices_01 NOT = { has_building = hospices_08 } } if = { limit = { has_building = hospices_07 } remove_building = hospices_07 add_building = hospices_08 } else_if = { limit = { has_building = hospices_06 } remove_building = hospices_06 add_building = hospices_07 } else_if = { limit = { has_building = hospices_05 } remove_building = hospices_05 add_building = hospices_06 } else_if = { limit = { has_building = hospices_04 } remove_building = hospices_04 add_building = hospices_05 } else_if = { limit = { has_building = hospices_03 } remove_building = hospices_03 add_building = hospices_04 } else_if = { limit = { has_building = hospices_02 } remove_building = hospices_02 add_building = hospices_03 } else = { remove_building = hospices_01 add_building = hospices_02 } } }
 
how do I get a character flag added to someone who is selected, but is not the currently played character?

I tried a very simple
Code:
add_character_flag = tagged_character
while having the heir to my played character selected in the interface, and it added the flag to my played character.

Again, I don't want it to be for my played character, I don't want to script it for specific characters, I want to add the tag to the currently displayed character.