• 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.
Is it possible for a secondary title for force it's character title, similar to the Fylkirate while not controlling a religion?
My goal is to have d_saxon_hegemony make your character be called Bretwalda [character name] while not being your primary title.
 
Is it possible for a secondary title for force it's character title, similar to the Fylkirate while not controlling a religion?
My goal is to have d_saxon_hegemony make your character be called Bretwalda [character name] while not being your primary title.
It's religion head title override effect. You'll need your d_saxon_hegemony have "controls_religion = maybe_church_england" attribute in common/landed_titles/landed_titles.txt
Or make an on_yearly_pulse on_action event, that checks player titles, like
Code:
d_saxon_hegemony = {
  holder = {
    primary_title = {
      set_name = d_saxon_hegemony
    }
  }
}
# resetting title name is a little complex though
Edit: Wrong codes above, just ignore them.

If your religion has "set_can_have_antipopes = yes" attribute, having a claim of your religion head shares religion head title effect either.
 
Last edited:
In a great work is it possible to scope a character effect to every vassal (or, preferably, to every vassal of a certain type) and grant an effect like "+1 trade posts"?
 
I remove and crop some provinces in map/provinces.bmp.
And the error.log is full of
Code:
...
[map.cpp:1388]: Province 1112 has no pixels in provinces.bmp
[map.cpp:1388]: Province 1113 has no pixels in provinces.bmp
[map.cpp:1388]: Province 1114 has no pixels in provinces.bmp
...
I understand some modifications required in map/definition.csv and map/default.map
But for map/definition.csv, I do not know how to properly reindex. I tried
Code:
# 1112;85;141;56;Madurai;x # comment out, no use
1112;;;;Madurai;x # remove RGB index, no use
1112;0;36;195;Madurai;x # use RGB index of 1111(exists in map), no use

If I delete all province definitions and renumber in order, no error spaming. However it turns that all events and all others become incompatible.

Anyway to keep majority of province id while removing some of them?
 
Last edited:
I remove and crop some provinces in map/provinces.bmp.
And the error.log is full of
Code:
...
[map.cpp:1388]: Province 1112 has no pixels in provinces.bmp
[map.cpp:1388]: Province 1113 has no pixels in provinces.bmp
[map.cpp:1388]: Province 1114 has no pixels in provinces.bmp
...
I understand some modifications required in map/definition.csv and map/default.map
But for map/definition.csv, I do not know how to properly reindex. I tried
Code:
# 1112;85;141;56;Madurai;x # comment out, no use
1112;;;;Madurai;x # remove RGB index, no use
1112;0;36;195;Madurai;x # using RGB index of 1111(previous exsting), no use

If I delete all province definitions and renumber in order, no error spaming. However it turns that all events and all others become incompatible.

Anyway to keep majority of province id while removing some of them?

Don't comment out any lines (except for the one at the very top of the file) in definitions.csv or give two provinces the same RGB values; it almost certainly will break the map in one way or another.

If you want to remove a small amount of provinces (say ten or less), there's really no need to re-index things, though you need to override the whole \history\provinces directory as the relevant province file needs to not be read (it isn't possible to tell the game to ignore a certain file) and you'll still get the pixel error (which doesn't matter). However, it isn't good to do this if you're removing a lot of provinces, as you both will get a lot of errors (which increase the chance that you'll not spot something that's actually an error) and chances are there will be a significant performance drain caused by the provinces being tracked despite not existing.

Regardless of how many provinces you're removing, you still need to manually track down and remove all other references to the province wherever they may be (e.g. if it is a Silk Road province, you need to remove it from the Silk Road path(s) in question (and from the trade post checks in two different files as well, if it is one of those provinces)). You'll also have to manually deal with various issues that can arise from removing titles (e.g. if you remove a duchy, one or more geographical regions might break, and if you remove a county that's a holy site, you break the religion(s) in question), which might cause trouble if the titles in question are involved in a lot of things and might require you to override more things (e.g. the \history\titles directory), which can result in a lot of compatibility work being necessary whenever there's a major patch.

If you renumber provinces, you still need to override the whole \history\provinces directory (as you'll otherwise get errors caused by the old files that no longer have an associated province) and still need to manually fix various references to both of the provinces. You'll also get the same issues related to title removal, you'll also need to fix stuff like positions and adjacencies (as those are associated with province ids), and you're going to have to do more work if vanilla adds more provinces in the future. However, it might still be better in the end if you're removing a lot of provinces.

Also, removing provinces might severely upset the balance of power in the relevant part of the map, which might cause issues elsewhere as the imbalance might result in other imbalances thanks to someone blobbing into an area you weakened (or someone failing to blob into another area because you weakened them). Whether you consider this a problem or not comes down to personal taste, but even small changes can have significant side-effects for the game as a whole.

In short, I strongly advise against removing vanilla provinces unless you're only remove a handful of provinces (or you're doing a complete map overhaul, which is a massive undertaking) as it results in a lot of work regardless of what you do and might cause various issues for you.
 
Not sure if this one counts as complete map overhaul
20190606195940_1.jpg
As you see, I have removed 511+ provinces. I've processed(track down and modify ids referred )
Code:
│
├───common
│   ├───disease
│   │       00_disease.txt
│   │
│   ├───landed_titles
│   │       eastern_religion_holy_site_stub.txt
│   │       landed_titles.txt
│   │
│   └───trade_routes
│           00_silk_route.txt
│           01_trans_saharan_trade_route.txt
│
├───gfx
│    ├───interface
│       │   minimap_area.dds
│       │   minimap_area_bg.dds
│       │
│       ├───indian_interface
│       │       minimap_area.dds
│       │
│       └───muslim_interface
│               minimap_area.dds
│
│
├───interface
│       main.gui
│
└───map
    │   geographical_region.txt
    │   positions.txt
    │   provinces.bmp
    │   rivers.bmp
    │   terrain.bmp
    │   topology.bmp
    │   trees.bmp
    │   world_normal_height.bmp
    │
    ├───statics
    │       00_static.txt
    │
    └───terrain
            colormap.dds
            colormap_water.dds
# And lots of /history stuff
This mod is totally playable since 2.8.x, its first built time.
A problem is CK2 crashes when I find(hotkey: ?) a title. It seems the game can't handle bad index well.
So I'm here for an answer/enlightenment(?)/omen(!)

In this case, what's your advice then?
 
Last edited:
Not sure if this one counts as complete map overhaul
As you see, I have removed 511+ provinces. I've processed(track down and modify ids referred )
Code:
│
├───common
│   ├───disease
│   │       00_disease.txt
│   │
│   ├───landed_titles
│   │       eastern_religion_holy_site_stub.txt
│   │       landed_titles.txt
│   │
│   └───trade_routes
│           00_silk_route.txt
│           01_trans_saharan_trade_route.txt
│
├───gfx
│    ├───interface
│       │   minimap_area.dds
│       │   minimap_area_bg.dds
│       │
│       ├───indian_interface
│       │       minimap_area.dds
│       │
│       └───muslim_interface
│               minimap_area.dds
│
│
├───interface
│       main.gui
│
└───map
    │   geographical_region.txt
    │   positions.txt
    │   provinces.bmp
    │   rivers.bmp
    │   terrain.bmp
    │   topology.bmp
    │   trees.bmp
    │   world_normal_height.bmp
    │
    ├───statics
    │       00_static.txt
    │
    └───terrain
            colormap.dds
            colormap_water.dds
# And lots of /history stuff
This mod is totally playable since 2.8.x, its first built time.
A problem is CK2 crashes when I find(hotkey: ?) a title. It seems the game can't handle bad index well.
So I'm here for an answer/enlightenment(?)/omen(!)

In this case, what's your advice then?

You've definitely not modified all the necessary files if that's a complete (aside from the history stuff) list; I don't see adjacencies.csv, island_regions.txt, default.map, or 00_scripted_effects.txt, to name a few files off the top of my head (and there are many more files than those that you'll need to change). You need to basically go through everything in the common, decisions, events, history, and map directories to look for references to provinces, tittles, geographical regions, and characters (and you should remove various homeless characters, too...) you've removed, and you need to remove them properly (and just how that is done will vary a lot from one place to another; sometimes you'll need to rewrite or comment out entire events, which might require changing references to those events, which might require reworking whatever referenced (or got triggered by) the first event).

I'd also suggest that you re-index everything necessary if you have cut hundreds of provinces, even though that's more work. I'd probably do that after cleaning up the removed stuff, even though you'll then need to go through everything again to fix the references to old province ids, as doing it at the same time makes it somewhat likely that you'll mess something up as you're doing different things at the same time.

Of course, on the whole, I'd strongly advise against removing hundreds of provinces in the first place, since it is a lot of work to do so.
 
Is it possible to scope to the target title of a cb?
 
You've definitely not modified all the necessary files if that's a complete (aside from the history stuff) list; I don't see adjacencies.csv, island_regions.txt, default.map, or 00_scripted_effects.txt, to name a few files off the top of my head (and there are many more files than those that you'll need to change). You need to basically go through everything in the common, decisions, events, history, and map directories to look for references to provinces, tittles, geographical regions, and characters (and you should remove various homeless characters, too...) you've removed, and you need to remove them properly (and just how that is done will vary a lot from one place to another; sometimes you'll need to rewrite or comment out entire events, which might require changing references to those events, which might require reworking whatever referenced (or got triggered by) the first event).

I'd also suggest that you re-index everything necessary if you have cut hundreds of provinces, even though that's more work. I'd probably do that after cleaning up the removed stuff, even though you'll then need to go through everything again to fix the references to old province ids, as doing it at the same time makes it somewhat likely that you'll mess something up as you're doing different things at the same time.

Of course, on the whole, I'd strongly advise against removing hundreds of provinces in the first place, since it is a lot of work to do so.

Yeah I've also modified lots files under /decisions, /events, /common, just not making the list above too long.
They're not comprehensive surely and I'll keep to polish them. That's why I hold this mod unreleased muchly. Thanks for your guidance.
As for /history,
Code:
[titlehistory.cpp:161]: Invalid character %c_id%
[provincehistory.cpp:645]: Bad county title %title_id%
[provincehistory.cpp:691]: Bad capital title %title_id%
[characterhistory.cpp:1270]: Character history: Setting employer of X to Y who can't have a court
These errors did not crash the game so I put into low priority.
===
Re-index is the last thing I want since it will lose upstream capability, resulting really a lot of work to do (I do agree with that.) after every official patch released.
And now I will start thinking about this plan...heck...

Alas...I do not want to remove hundreds of provinces either. But even with performance drain caused by the mod, it's way faster than Vanilla map with India, Turkestan and Tibet. Anyway I'm playing Crusade Kings 2!
If I want to play as DaMing I could go EU4 or your great TianXia mod, not some stupid Crusade for Rajputana/ Jihad for Guge...
 
Last edited:
How would i go about creating a succession type that requires a certain trait to be eligible for inheritance? Would it be easier to do it elective or non-elective?

The only moddable succession law is elective, so you have to create something based on that. I don't have any experience with modding succession laws, so I can't help you beyond that.

[titlehistory.cpp:161]: Invalid character %c_id%
[provincehistory.cpp:645]: Bad county title %title_id%
[provincehistory.cpp:691]: Bad capital title %title_id%
[characterhistory.cpp:1270]: Character history: Setting employer of X to Y who can't have a court
[/code]
These errors did not crash the game so I put into low priority.

You have at least two kinds of errors that have to do with titles there, and you ran into trouble when searching for titles. I suspect that there might be some correlation there...
 
In which context? In CB modding, "Default scope for title scopes is the title the war is declared over." Do you want to scope to the target title of a war? Not sure how to do that.

Hey thanks for answering! Yes it is to modify a cb. I'm fairly new to this stuff so I wasn't able to wrap my head around how to do it. There doesn't seem to be a specific scope for it, however In the end I've used a scope that defaults to the target title and gone up the chain with PREVs to use it. So far I think it has worked.
 
What, if any, is the difference between the modifiers "garrison_growth" and "levy_reinforce_rate". Does garrison growth stop working when the garrison is full? Does levy reinforce rate only start working when the garrison is full? I am doing some great work modding and am making 3 versions of the fort, one that is primarily defensive, one that is primarily offensive, and one that is a mix. I am putting the levy growth on the offensive and mixed versions, but realized that it might be nice to increase the rate of garrison reinforcement.
 
Hey thanks for answering! Yes it is to modify a cb. I'm fairly new to this stuff so I wasn't able to wrap my head around how to do it. There doesn't seem to be a specific scope for it, however In the end I've used a scope that defaults to the target title and gone up the chain with PREVs to use it. So far I think it has worked.

Various amounts of PREVs seems to be how it's done in vanilla files. Hopefully, you can do what you want within the maximum of 4 PREVs.
 
Does anyone know why the ruler designer does not work with certain governments - or has experienced some problems with it too? For my theocracy mod I have a feudal "theocracy" government. When I attempt to use the ruler designer on a prince/arch bishop inside some larger realm, the button does nothing. It does however work for the Pope...

Oh, and does anyone know where the 1% chance of becoming a saint is in the code? The wiki lists all these things about canonization, but when looking at the sainthood events I cannot find a trigger for HF.40010 (which starts the canonization process). It is not called by on_action triggers and no other event calls it, so I'm a little confused. Is it hardcoded?
 
Last edited:
Yeah I've also modified lots files under /decisions, /events, /common, just not making the list above too long.
They're not comprehensive surely and I'll keep to polish them. That's why I hold this mod unreleased muchly. Thanks for your guidance.
As for /history,
Code:
[titlehistory.cpp:161]: Invalid character %c_id%
[provincehistory.cpp:645]: Bad county title %title_id%
[provincehistory.cpp:691]: Bad capital title %title_id%
[characterhistory.cpp:1270]: Character history: Setting employer of X to Y who can't have a court
These errors did not crash the game so I put into low priority.
===
Re-index is the last thing I want since it will lose upstream capability, resulting really a lot of work to do (I do agree with that.) after every official patch released.
And now I will start thinking about this plan...heck...

Alas...I do not want to remove hundreds of provinces either. But even with performance drain caused by the mod, it's way faster than Vanilla map with India, Turkestan and Tibet. Anyway I'm playing Crusade Kings 2!
If I want to play as DaMing I could go EU4 or your great TianXia mod, not some stupid Crusade for Rajputana/ Jihad for Guge...
Have you tried running the Validator on your mod? That finds a lot of these problems.
 
Could someone please tell me what I'm missing with province editing. So I edit the number of settlements that Dublin & Kildare can have to 7. That's fine. But when I use the Ancient Religions mod Dublin reverts to it's usual 4. Kildare still has 7 though. The modder replied to me on steam and told me that there must be a different province history .txt file but there actually isn't one for Dublin in the mod so there is no conflic that I can see. Now the mod DOES make a barony in Dublin a holy site so that must be what's causing the issue but, unfortunately, I can't see how/why

Thanks for any help