• 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.
Problem:
I would like to make it so that Duchy and Kingdom titles cannot be created by a King or Emperor unless he/she is: a) de jure liege of the title, or b) has at least one of the de jure counties within his personal demesne. In other words, if a King has vassals that own land enough to create duchy that is not de jure part of his kingdom, he cannot create it, unless he owns personally one of the counties in his demesne

King Example:
Duke of Toulouse, as a vassal of the King of France, conquers 50% of the Duchy of Barcelona. The King of France cannot create the title D. of Barcelona (unless he were also King of Aragon), only the Duke of Toulouse can.
Empire Example:
Any HRE Duke conquers enough land to usurp the Kingdom of France. I want to make it so the HREmperor cannot usurp the Kingdom of France, only that Duke. Same for Duchies that are de jure part of France. (unless, again, HRE owned personally one of the counties in France)

However, my intent is that Kings or Emperors should still be able to create/usurp titles of their rank (i.e. the King of France could usurp King of Aragon if his vassals conquered 50% of K. of Aragon)

My question:
I am experienced in modding EU3, and am teaching my own way around CK2's files. Can anyone point me in the right direction as to what I can do to achieve this? (I don't need anyone to do it all for me, just need to know where to look). Or could this only be done by going through each title in landed_titles.txt and inserting "allow = { x }" with the necessary conditions specific to each title?

EDIT: Basically, I am asking if there is a way to modify something somewhere that could apply this sort of restriction based on tiers across all titles.

Thanks.
 
Last edited:
Another question: I modified common/landed_titles to reorganize Italy/HRE. I also changed the localisation of d_modena to "Piedmont", d_ancona to "Roma", d_lombardia to "Milan" along with adjectives, etc.. I reorganized de jure counties between Duchies and Kingdoms within the HRE accordingly.

Everything is completely WAD as far as de jure liege relationships go. However, 2 interesting things happened.

1. My new Duchies of Piedmont and Roma (still using the "d_modena/d_ancona" code, I changed only the localisation and what counties are de jure) seemingly magically have new "correct" flags/CoAs: Piedmont has the Savoyard white cross on a red field but with the little blue line across the top; Roma has a red field with a yellow cross in the upper left corner and the letters SPQR runningly diagonally to the bottom right. The new Duchy of Milan is different, see 2.

2. Many other counties and duchies in Italy and the HRE itself have gotten their flags/CoAs all rearranged: the Duchy of Milan now has Brescia's CoA, and Brescia has the Milan/Lombardia snake, but in black and white. Other counties and duchies have swapped CoAs (county of Modena has duchy of Toscana's CoA, etc), and the HRE appears to have the von Habsburg dynasty's lion. All other realms outside the HRE appear to be normal, and duchies and kingdoms within the HRE that I did not touch do not appear to be affected either.

How does this happen; are CK2's CoAs not linked to the code (i.e. "d_modena" etc) like in EU3? How do they work? (I have not touched /gfx folder)

Thanks in advance to any who can help
 
Last edited:
Have you deleted the gfx folder in My Documents/. . ./Crusader Kings II? Not the one in the game directory but in the savefile directory. If you alter landed_titles.txt, without deleting the gfx folder in My Documents, you will get errors like this, as the game assigns flags to titles based on the order they appear in landed_titles.
 
Have you deleted the gfx folder in My Documents/. . ./Crusader Kings II? Not the one in the game directory but in the savefile directory. If you alter landed_titles.txt, without deleting the gfx folder in My Documents, you will get errors like this, as the game assigns flags to titles based on the order they appear in landed_titles.

I don't like this My Documents directory one bit, I wish it were all in one place :(

But thank you! :D
 
On restricting title formation, you can easily add culture and culture_group and religion and religion_group, but I have not tried tier or anything like that. Law changes can be altered by requiring character flags so that might be an option.
 
How would I go about adding special characters to the localization?

For example I would like to put in "Jórvík" for the name of one of my kingdoms, but it comes out all garbled if I paste just this into it. Is there something special I have to do?
 
On restricting title formation, you can easily add culture and culture_group and religion and religion_group, but I have not tried tier or anything like that. Law changes can be altered by requiring character flags so that might be an option.

Yes, this I realize but this is what I was afraid of, having to go and put in the restrictions for every single kingdom and duchy title (which I think I could do). Essentially, I was wondering if there was a way to modify one line or something somewhere that could apply this sort of restriction based on tiers across all titles. I'm thinking now that this is unlikely, but hopefully someone out there knows something.
 
Yes, this I realize but this is what I was afraid of, having to go and put in the restrictions for every single kingdom and duchy title (which I think I could do). Essentially, I was wondering if there was a way to modify one line or something somewhere that could apply this sort of restriction based on tiers across all titles. I'm thinking now that this is unlikely, but hopefully someone out there knows something.

No, you'll have to do it the hard way.

The percentage needed for title creation is not moddable, unless that's been recently added to defines.lua. Of course you could look to the mods that add titles by decision. The basic syntax is <title name> = { grant_title = ROOT } IIRC.
 
How would I go about adding special characters to the localization?

For example I would like to put in "Jórvík" for the name of one of my kingdoms, but it comes out all garbled if I paste just this into it. Is there something special I have to do?

The tag has to be normal characters as far as I know (k_jorvik), but you should be able to include special characters in the names

k_jorvik;Jórvík;Jórvík;Jórvík;;Jórvík;;;;;;;;;x
 
What's the priority with localised titles?

Right now, Pagan and Christian titles overwrite cultural titles, so instead of Kazallah I get High Chief, but Muslim titles are overwritten by culture titles? (so instead of Sultan, I get Negus)
Or is it that culture groups overwrite religions, religions overwrite cultures?
 
You're probably saving the .csv with the wrong encoding. You have to save it in ANSI.

That was it thanks. At some point it must have switched without me noticing
 
Another question: I modified common/landed_titles to reorganize Italy/HRE. I also changed the localisation of d_modena to "Piedmont", d_ancona to "Roma", d_lombardia to "Milan" along with adjectives, etc.. I reorganized de jure counties between Duchies and Kingdoms within the HRE accordingly.

Everything is completely WAD as far as de jure liege relationships go. However, 2 interesting things happened.

1. My new Duchies of Piedmont and Roma (still using the "d_modena/d_ancona" code, I changed only the localisation and what counties are de jure) seemingly magically have new "correct" flags/CoAs: Piedmont has the Savoyard white cross on a red field but with the little blue line across the top; Roma has a red field with a yellow cross in the upper left corner and the letters SPQR runningly diagonally to the bottom right. The new Duchy of Milan is different, see 2.

2. Many other counties and duchies in Italy and the HRE itself have gotten their flags/CoAs all rearranged: the Duchy of Milan now has Brescia's CoA, and Brescia has the Milan/Lombardia snake, but in black and white. Other counties and duchies have swapped CoAs (county of Modena has duchy of Toscana's CoA, etc), and the HRE appears to have the von Habsburg dynasty's lion. All other realms outside the HRE appear to be normal, and duchies and kingdoms within the HRE that I did not touch do not appear to be affected either.

How does this happen; are CK2's CoAs not linked to the code (i.e. "d_modena" etc) like in EU3? How do they work? (I have not touched /gfx folder)

Thanks in advance to any who can help

Have you deleted the gfx folder in My Documents/. . ./Crusader Kings II? Not the one in the game directory but in the savefile directory. If you alter landed_titles.txt, without deleting the gfx folder in My Documents, you will get errors like this, as the game assigns flags to titles based on the order they appear in landed_titles.

I don't like this My Documents directory one bit, I wish it were all in one place :(

But thank you! :D

Actually, I've tried everything I can think of (deleted gfx folder, deleted parent gfx folder, deleted entire My Documents/.../CK2 folder, restarted) and still I get this:

flags.jpg

...with lots of other counties and duchies messed up

Plus, it doesn't explain how "d_modena" and "d_ancona" localised as Piedmont and Roma somehow get flags that actually fit with Piedmont and Rome that I didn't even know existed in the game
 
Did you add new flags for d_roma and d_piemonte or whatever you're calling them (you could just copy the ones you like and rename the copy to d_roma and d_piemonte). Then delete the gfx folder again and try a launch. That should fix it if I understand the problem.
 
Good news! Province variables are possible too.

I've done some event scripting with variables with mixed results. I've had some success checking variables and triggering province_events with them. So thank you again for your help! I'm working on an estates of the realm event series using variables (CTDs so far), but I think this will help me a great deal.
 
Actually, I've tried everything I can think of (deleted gfx folder, deleted parent gfx folder, deleted entire My Documents/.../CK2 folder, restarted) and still I get this:

flags.jpg

...with lots of other counties and duchies messed up

Plus, it doesn't explain how "d_modena" and "d_ancona" localised as Piedmont and Roma somehow get flags that actually fit with Piedmont and Rome that I didn't even know existed in the game

I recently had some issues with my north africa mod, it seems a new titular duchy was added in 1.05e (or I never noticed it before) that had the same tag as one of my own duchies and thus there was a duplicate title. Alternatively you may have deleted a .tga or renamed it, or you've added a new title but no new .tga. As for them having appropriate flags, that's just happy coincidence.
 
I'm trying my first humble steps in the world of modding and have run into a wall. The following event shows up in the validator as not triggering and it indeed does not seem to do so in the game. I've based it off the event in CK2plus and that one does work.

#A child is born
character_event = {
id = 190000
picture = "GFX_evt_pregnancy"

is_triggered_only = yes
hide_from = yes

trigger = {
NOT = { trait = twin }
mother = { is_alive = yes }
}

desc = "EVTDESC190000"

option = {
name = "EVTOPTA190000"
#check if mother dies
if = {
limit = {
mother = {
health = 6
}
}
random_list = {
10 = { set_character_flag = mother_died set_character_flag = child_died } #both die
10 = { set_character_flag = mother_died } #mother dies
10 = { set_character_flag = child_died } #child dies
70 = { } #nobody dies
}
}
if = {
limit = {
mother = {
NOT = { health = 6 }
health = 4
}
}
random_list = {
10 = { set_character_flag = mother_died set_character_flag = child_died } #both die
15 = { set_character_flag = mother_died } #mother dies
15 = { set_character_flag = child_died } #child dies
60 = { } #nobody dies
}
}
if = {
limit = {
mother = {
NOT = { health = 4 }
health = 2
}
}
random_list = {
10 = { set_character_flag = mother_died set_character_flag = child_died } #both die
20 = { set_character_flag = mother_died } #mother dies
20 = { set_character_flag = child_died } #child dies
50 = { } #nobody dies
}
}
if = {
limit = {
mother = {
NOT = { health = 2 }
}
}
random_list = {
20 = { set_character_flag = mother_died set_character_flag = child_died } #both die
20 = { set_character_flag = mother_died } #mother dies
20 = { set_character_flag = child_died } #child dies
40 = { } #nobody dies
}
}
#handle deaths
if = {
limit = {
has_character_flag = mother_died
}
mother = { character_event = { id = 190001 } }
}
if = {
limit = {
has_character_flag = child_died
}
character_event = { id = 190002 }
}
clr_character_flag = mother_died
clr_character_flag = child_died
}
}

#Mother dies in childbirth
character_event = {
id = 190001
picture = "GFX_evt_illness"

is_triggered_only = yes

desc = "EVTDESC190001"

immediate = {
death = { death_reason = death_dungeon } #actually childbirth
}

option = {
name = "EVTOPTA190001"
}
}

#Child is stillborn
character_event = {
id = 190002
picture = "GFX_evt_illness"

is_triggered_only = yes

desc = "EVTDESC190001"

immediate = {
death = { death_reason = death_dungeon } #actually childbirth
}

option = {
name = "EVTOPTA190001"
}
}

For the event I also added a *.scv file in the localisation folder of my mod.

#CODE;ENGLISH;FRENCH;GERMAN;;SPANISH;;;;;;;;;x;;;
EVTDESC190000;I have been born!;Je suis né!;Ich wurde geboren.;I have been born!;I have been born!;;;;;;;x;;;;;
EVTOPTA190000;Ok;Ok;Einverstanden;Ok;Ok;;;;;;;x;;;;;
EVTDESC190001;The birth was a difficult one. Though the midwife tried her best, [Root.GetName] did not survive.;La naissance fut difficile. Bien que la sage-femme est tout tenté, [Root.GetName] n'a pas survécu.;Die Geburt war schwierig, die Hebammen taten alles wa sie konnten , dennoch starb [Root.GetName];;;;;;;;;x;;;;;
EVTOPTA190001;A tragedy;Une tragédie;Eine Tragödie;A tragedy;A tragedy;;;;;;;x;;;;;
EVTDESC190002;Will I survive my birth?;Survivrais-je à ma naissance?;Werde ich meine Geburt überleben?;Will I survive my birth?;Will I survive my birth?;;;;;;;x;;;;;
EVTOPTA190002;I sure hope so!;J'ai bon espoir que si!;Ich hoffe es sehr !;I sure hope so!;I sure hope so!;;;;;;;x;;;;;

Could anyone please give me a pointer? I've probably missed something incredibly obvious but I've read wikis, faqs and lots of threads and still can't figure it out.

EDIT: Could it be that the trigger should point to the event that lets a child be born?
 
Last edited: