• 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.
Guys, help me, please) I created my own character traits and they work great, but I can’t find in which of the localization files I need to enter the name and description of the trait. I don’t want to make it a separate mod, I change it in the files of the game itself. I tried following the old guide “enter at the end of any localization file”, but it didn’t lead to anything. Traits are named as they appear in the "traits" file, for example "ultra_fair".

PS: Got it. I created a new localization file in csv format and wrote down my traits, adding them to the localization files of the game itself.
 
Last edited:
Guys, help me, please) I created my own character traits and they work great, but I can’t find in which of the localization files I need to enter the name and description of the trait. I don’t want to make it a separate mod, I change it in the files of the game itself. I tried following the old guide “enter at the end of any localization file”, but it didn’t lead to anything. Traits are named as they appear in the "traits" file, for example "ultra_fair".

PS: Got it. I created a new localization file in csv format and wrote down my traits, adding them to the localization files of the game itself.
The biggest reason not to do it the way you did is because it will get destroyed if you ever validate the files. If the devs release a new version (which is slightly less likely than world peace breaking out) it will also destroy your work.

Otherwise, congrats on getting your mod to work.
 
  • 1
Reactions:
Last edited:
  • 1
Reactions:
Is it possible to have a different set of is_revolt_cb = yes (+ is_tyranny_cb = no) and is_revolt_cb = yes + is_tyranny_cb = yes that comes into play under certain conditions (e.g. game rules, government types, or religions)?

Edit: Yes, it is.
 
Last edited:
I'm looking at siege_events and I'm a bit confused at how some things work. MTTH I understand but this doesn't feature any. Also how do the factor work in terms of modifier, ie. factor 2 and factor 4 are additive or multiplicative...?

Code:
    weight_multiplier = {
        days = 1
        modifier = {
            factor = 2
            is_female = yes
            new_character = {
                OR = {
                    religion_group = pagan_group
                    religion_group = zoroastrian_group
                }
            }
        }
        modifier = {
            factor = 4 # Free prisoner
            new_character = {
                ROOT = {
                    prisoner = yes
                    employer = {
                        character = PREVPREV
                    }
                }
            }
        }
        modifier = {
            factor = 1.2 # if new_char (the sieger) was a warrior lodge member
            new_character = {
                is_member_of_any_warrior_lodge_trigger = yes
                society_rank > 1 #Must be rank 2 or higher
            }
        }
        modifier = {
            factor = 1.1 # if new_char (the sieger) has a particular Legendary bloodline
            new_character = {
                any_owned_bloodline = {
                    has_bloodline_flag = bloodline_reaver
                }
            }
        }
    }
 
Investigating a bit more it reference this in on_actions but I still can't intereprete the numbers.

Code:
# Fires for all characters presumed to be in the Holding at the time. Siege winner unit owner in the 'new_character' scope, lost holding title in FROM, local character in ROOT.
on_siege_over_loc_chars = {
    events = {
        #SoA.5406 # Shepherds' Crusade kills Jews and priests
    }
    random_events = {
         1000 = 0 # Nothing happens
         400 = SSI.61 # Aztec sacrifice
         100 = 62100 # Character imprisoned
         200 = TOG.1190 # Rebels kill character
     }
}

My aim is to tweak the probability to take prisoners, I find it a bit silly that lodge members end up imprisoning like half the relatives of the holding owner when pillaging but randomly tweaking numbers didn't end up with satifying results.
 
|Siege stuff]

The weight_multiplier affects the chance in the on_action (the "days" is likely a leftover from when MTTH was a lot more widespread), and the modifier blocks are multiplicative. So, for example, if we ignore the Aztec and rebel outcomes, there's a 1 in 11 -- 100/(1000 + 100) -- base chance of imprisoning each character presumed to be at the holding when the siege is won; add the female multiplier-- wow, that's not implemented well, considering "Only women can be consorts", "Only pagans and Mazdans can take consorts", and "All pagans can take consorts" all are flawed assumptions; has this perhaps not been touched since TOG's release...? -- and it'd be 200/1200 -- 1 in 6 -- if we still ignore the Aztec and rebel outcomes.
 
  • 1
Reactions:
Thanks. The original factor for the lodge power was 10, so that would be 2000/3000 chance to steal females. That would match with my experience.
 
How to know what PREV and FROM refer to?
 
How to know what PREV and FROM refer to?
If you haven't already, I recommend checking out the Event modding, Scripting, and Scopes pages on the wiki. I well remember the task of wrapping my head around CK 2 modding to be quite daunting, but those pages help significantly.

To answer your specific questions:

PREV is a step backwards on the scope chain. Here is an example.
Code:
liege = {
     job_chancellor = {
          PREV = {
               #This scope is one step back from the scope it's inside. The scope it is inside is job_chancellor, so one step back from that is the liege scope.
          }
     }
}
PREV can stack up to four times I think. PREV, PREVPREV, PREVPREVPREV, each of which steps an additional step back.

In events, FROM is usually the ROOT of the prior event in an event chain. If the event was fired from a decision, then FROM is instead the ROOT of the decision it was fired from.

When it comes to FROM and ROOT for decisions and on_action events, you'll want to check the details in the Decision modding and Event modding pages (the list of on_action triggers for the second one), as it varies.

Additionally, something that escaped me for a long while, is that a FROM nested inside another FROM is actually FROMFROM.
 
  • 2
Reactions:
Greetings,

I'm new to modding and can't get started with this. I ran the official test mode (comet event) successfully but once trying my own test, it won't work. The mod shows up on the launcher but won't affect anything. I tried making something very simple with changing the title of ecumenical patriarch to supreme patriarch. The title change should be simple by editing files "landed_titles" and "text1.csv".

The mod folder is in C:/users/documents/paradox interactive/crusader kings II/mod. The .mod file is in the mod folder and I have "common" (which includes a subfolder "landed_titles") and "localisation" folders in the "orthodoxx" folder. This should be right, but none of the .mod file combinations seem to work.

Code:
name = "orthodoxx"
path = "mods/orthodoxx"


or

Code:
name = "orthodoxx"
path = "mods/orthodoxx"
user_dir = "orthodoxx"
replace_path = "common/landed_titles"
replace_path = "localisation"


or

Code:
name = "orthodoxx"
path = "mods/orthodoxx"
user_dir = "orthodoxx"
extend = "common/landed_titles"
extend = "localisation"
 
Last edited:
Greetings,

I'm new to modding and can't get started with this. I ran the official test mode (comet event) successfully but once trying my own test, it won't work. The mod shows up on the launcher but won't affect anything. I tried making something very simple with changing the title of ecumenical patriarch to supreme patriarch. The title change should be simple by editing files "landed_titles" and "text1.csv".

The mod folder is in C:/users/documents/paradox interactive/crusader kings II/mod. The .mod file is in the mod folder and I have "common" (which includes a subfolder "landed_titles") and "localisation" folders in the "orthodoxx" folder. This should be right, but none of the .mod file combinations seem to work.

Code:
name = "orthodoxx"
path = "mods/orthodoxx"


or

Code:
name = "orthodoxx"
path = "mods/orthodoxx"
user_dir = "orthodoxx"
replace_path = "common/landed_titles"
replace_path = "localisation"


or

Code:
name = "orthodoxx"
path = "mods/orthodoxx"
user_dir = "orthodoxx"
extend = "common/landed_titles"
extend = "localisation"

A)
Let's start with the first obvious basic mistake preventing the mod to be read, it's the "mod" folder ,not "mods",
hence should be :
path = "mod/orthodoxx"
Common mistake. Everyone done that at some point, no worries.
It's always these little oversights that drive modders nuts.
Incorrect spelling, brackets, spaces, missing or too many, for instance.

B)
The first example.

- Using replace_path makes the according vanilla folder to be ignored. You don't want that.
I'm not of the impression that your mod is going to be that complex.
- You don't need to add whole original files in localisation. Just add a file of whatever name with the changed line(s).

- I have no idea what those "extend=" lines are. Never seen those. Forget it, would be my suggestion.
- You don't need a "user_dir" for that. It can make sense for COAs/shields and map changes though.

C)
Modifiying the patriarch title only, should ony involve the localisation folder, but i'm no expert in title modding.
If you could specify what you are trying to modify there, that could be helpful.

@jonjowett or anyone else to the rescue, please.
To assist and correct any potential error i made.
Not that i think i did, but sometimes...

PS:
Obligatory Wiki-link for a modding start : https://ck2.paradoxwikis.com/Modding
 
Last edited:
  • 2Like
Reactions:
Let's start with the first obvious basic mistake preventing the mod to be read, it's the "mod" folder ,not "mods",
hence should be :
path = "mod/orthodoxx"
Common mistake. Everyone done that at some point, no worries.
It's always these little oversights that drive modders nuts.
Incorrect spelling, brackets, spaces, missing or too many, for instance.

My Lord, I am stupid! It was that one "s" that was too much. And I thought I was through. Stuff is working quite well right now, thank you very much.

All it takes is one letter....
 
  • 1Haha
Reactions:
Is it possible to mod the willingness of the AI to create empire titles? It seems the AI sometimes has enough gold and provinces to create the titles but decide to spend its gold on something else and that's a bit sad.
 
Is it possible to mod the willingness of the AI to create empire titles? It seems the AI sometimes has enough gold and provinces to create the titles but decide to spend its gold on something else and that's a bit sad.

The AI reasoning for title creation is hardcoded -- unless you're looking at decisions like creating Outremer -- so it cannot be tweaked (outside lowering the cost, which also affects the player). However, you could conceivably add some kind of maintenance event or AI-only decision for creating specific empire titles using whatever logic you desire, though the logic might get messy (especially since de jure drift and stuff like empty nomadic provinces breaking at least some region-related conditions might make it hard to check the "Controls 80 % of the de jure" condition).
 
  • 1
Reactions:
I see, thanks.
 
Is it possible to create seasonal land bridges? Vanilla has a couple of land bridges, and I wonder if it's possible to make them not passable all year round.