• 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.
A big one is make sure your potential sections are structured so that the easiest failure conditions are first so it doesnt bother evaluating tons of stuff before hitting a failure.

I believe pre triggers are supported in descions now similar to events which are even better.


No idea to be honest.


Yep
Perhaps I'm misremembering, but I thought it had been stated that the game re-orders triggers to what it thinks is optimal anyway, so the order you type them has no effect.
 
I'm having some trouble getting the game to recognize my renamed provinces. Usually when I add new text there's no problem; do you have to use a 'replace' folder structure for provinces?
 
:(

Seriously does the /replace folder thing not work in this game at all?
 
Last edited:
That's "replace_path". And unless you want the game to ignore all files in that folder, no, you don't want to use that.

Can you be more specific on what you're doing?
I only want to replace certain lines of text in those files, and in HoI4 you can use the replace file structure to do that. It doesn't mean replacing the entire folder - though I guess it doesn't work like that in CK2, even though I feel sure I've done this before a long time ago.

I'm trying to, for example, rename a few provinces and ruler culture titles. The game reads my new text no problem, and some of my overriding (replacement) text, but not all of it, and it's certainly not reading my attempts at renaming provinces.

One thing I'm trying to do is rename the province of Brie to Meaux, so how can I do that and get the game to read it?

It should just be this:

PROV1964;Meaux;;;;;;;;;;;;;x
c_brie_adj;Meldois;;;;;;;;;;;;;x

...but no matter which file it's in, the game isn't reading it.

I could have sworn this was quite simple, as I've certainly done it before some years ago.
 
The game reads my new text no problem, and some of my overriding (replacement) text, but not all of it,
Probably because the text for those is in different files from the ones not overriding,

from the wiki.

Full override. If duplicates are in different files, first file loaded wins (i.e. use 00_ file prefix to override vanilla keys). If in same file, last duplicate in file wins. Warning: files must end with .csv extension, or they will not be taken into account.
 
I only want to replace certain lines of text in those files, and in HoI4 you can use the replace file structure to do that. It doesn't mean replacing the entire folder - though I guess it doesn't work like that in CK2, even though I feel sure I've done this before a long time ago.

I'm trying to, for example, rename a few provinces and ruler culture titles. The game reads my new text no problem, and some of my overriding (replacement) text, but not all of it, and it's certainly not reading my attempts at renaming provinces.

One thing I'm trying to do is rename the province of Brie to Meaux, so how can I do that and get the game to read it?

It should just be this:

PROV1964;Meaux;;;;;;;;;;;;;x
c_brie_adj;Meldois;;;;;;;;;;;;;x

...but no matter which file it's in, the game isn't reading it.

I could have sworn this was quite simple, as I've certainly done it before some years ago.
Is there some reason you're not also renaming c_brie?

nd
 
Is there a way to mod the "buy favor" conditions for marriage arrangement? Or is it hard-coded? Image for reference: https://i.imgur.com/KgtCf4T.png

How Favours interact with the marriage system is hardcoded. You can possibly work around it by adding a new marriage interaction that costs a Favour that is usable in some circumstances, but you'd have to come up with your own AI logic if you want to make the AI use it.
 
Is it possible to set cultural names for a province in localisation rather than in landed_titles?
So, instead of
Code:
c_york = {
         norse = "Jorvik"
}
I'd like to do something like what's below in localisation files, if at all possible
c_york_norse;Jorvik;;;;;;;;x
 
Is it possible to set cultural names for a province in localisation rather than in landed_titles?
So, instead of
Code:
c_york = {
         norse = "Jorvik"
}
I'd like to do something like what's below in localisation files, if at all possible
c_york_norse;Jorvik;;;;;;;;x
I would *expect* it to work. Indeed, I don't even know why they added the landed_titles option, when the localization option works in other contexts, and is more flexible. But only one way to be sure: try it.

Of course, if both forms exist, I'm not sure which would win.

On the other hand, technically you are looking at the *county* name, which can be different from the *province* name. Counties are usually named after the province, except that the landed_titles entry can override that.
 
Last edited:
I would *expect* it to work. Indeed, I don't even know why they added the landed_titles option, when the localization option works in other contexts, and is more flexible. But only one way to be sure: try it.

Of course, if both forms exist, I'm not sure which would win.

On the other hand, technically you are looking at the *county* name, which can be different from the *province* name. Counties are usually named after the province, except that the landed_titles entry can override that.
Strangely enough, the latter doesn't seem to work, even though doing the same with the adjective (like below) seems to work.
k_england_adj_norman;Anglais;;;;;;;;;;;x
 
Is it possible to have the localisation of a title (title as in "King", "Emperor", "Doge", etc.) be defined by both culture *and* religion? For example, have Muslim Sindhi kings get called Jam while Hindu Sindhi kings remain Maharaja.
 
So I'm considering creating events for a religious doctrine. These new events would kinda be like pilgrimages in the sense that they will all have multiple steps. Since I've never done anything this ambitious before I'm wondering how this will affect performance. If every character of a certain religion had multiple pilgrimage type events occurring at different times will this significantly affect performance? Should I somehow limit these events for player only? If I had to make a limit for performance sake I would prefer to make it a close family (in this case I mean parents and their children, maybe grandchildren) limit. Is that possible?
 
Is it possible to have the localisation of a title (title as in "King", "Emperor", "Doge", etc.) be defined by both culture *and* religion? For example, have Muslim Sindhi kings get called Jam while Hindu Sindhi kings remain Maharaja.
Don't see why not. The system seems flexible enough for it, even though this particular case is not used in vanilla. Try both king_muslim_sindhi and king_sindhi_muslim to figure out the right order.
So I'm considering creating events for a religious doctrine. These new events would kinda be like pilgrimages in the sense that they will all have multiple steps. Since I've never done anything this ambitious before I'm wondering how this will affect performance. If every character of a certain religion had multiple pilgrimage type events occurring at different times will this significantly affect performance? Should I somehow limit these events for player only? If I had to make a limit for performance sake I would prefer to make it a close family (in this case I mean parents and their children, maybe grandchildren) limit. Is that possible?
One way of doing it while saving performance is this:

Code:
PILG.1 #Starting event {
    random {
        chance = 50
        event = {
            PILG.5 #Flavour event #1
            days = 15
        }
    }
    random {
        chance = 50
        event = {
            PILG.6 #Flavour event #2
            days = 30
        }
    }
    random {
        chance = 50
        event = {
            PILG.7 #Flavour event #3
            days = 45
        }
    }
    event = {
        PILG.10 #End event
        days = 60
    }
}
Then only PILG.1 needs to be evaluated by the game (either through mtth or through a decision the game needs to keep a check on), the rest occur at fixed intervals (also possible to add some randomness in there as well), and the ending is fixed too.
 
I'm making a landless duchy title to represent a political/religious institution. It is always meant to be the vassal of a specific emperor, like the Mamluks. However, while I can set the liege to the emperor with set_defacto_liege, they automatically become independent again in days. Setting the emperor as the de jure liege does not seem to work. Has anyone tried doing something like this before? How do you keep a landless duchy from randomly becoming independent?
 
Hello, busy learning to mod.

Code:
namespace = population


# Set starting population
province_event = {
    id = population.1
    hide_window = yes
    is_triggered_only = yes

    trigger = {
        NOT = {
            has_global_flag = population_initialised
            }
    }

    any_province = {
        limit = {
            has_owner = yes
            }

        any_province_holding = {
            set_variable = {
                which = local_peasant_population
                value = 9000
                }
            set_variable = {
                which = local_citizen_population
                value = 1000
                }
        }
    }

    repeat_event = {
        province_event = {
            id = population.2
            days = 365
            }
    }
}

More or less a "my first event", but it doesn't seem to be working. When I go into a game and fire it in the console, it seems to execute, but on checking the save file, none of the holdings have actually had the variables above set.

Any solutions?