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

Korbah

Ratel
137 Badges
Mar 3, 2011
4.758
1.272
  • Europa Universalis IV
  • Crusader Kings II: Holy Knight (pre-order)
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Campus
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Victoria 3 Sign Up
  • Hearts of Iron IV: No Step Back
[Tutorial] Creating a Kingdom Title

Every so often I see people asking about creating Kingdoms or Empires, the methods behind which are exactly the same (and can also for the most part be applied to Duchies). I thought I'd take a shot at posting a tutorial on how to go about creating a Kingdom as a reference for others. I'm not sure if this has already been done somewhere, so apologies if it has, and if anyone would like to improve upon this or notices any mistakes please feel free to let me know (or just go ahead and make a better one :eek:o)

Requirements: Basic knowledge of windows navigation and directory structure, a basic text editor (such as notepad, I personally use a free opensource one called notepad++) and an image program of some kind capable of saving .TGA (I use Photoshop CS5, however Paint.net or Gimp are suitable, free alternatives).

Step 1: Navigate to your Crusader Kings 2 Directory (where the ck2game.exe is located), and locate the mod directory.
View attachment 52784

Step 2: Inside the mod directory create a new text file and a new folder.
View attachment 52785
Open the text file and write the following text
Code:
name = "Kingdom Tutorial"
path = "mod/KingdomTutorial"
Save it, and then rename the txt document to "KingdomTutorial.mod" and the New Folder to "KingdomTutorial".
View attachment 52786

Step 3: Inside KingdomTutorial Folder create the following folders; "common", "localisation" and "gfx".
View attachment 52787
Then inside "gfx" create the folder "flags".
View attachment 52788
 
Last edited:
Step 4: Navigate back to the CK2 main directory (where ck2game.exe is located)
View attachment 52789
Then go into common and copy the file "landed_titles.txt"
View attachment 52790
then navigate back to mod\KingdomTutorial\common and paste landed_titles.txt there.
View attachment 52791

Step 5: Navigate to mod\KingdomTutorial\localisation folder and create a new text file
View attachment 52792

open it and write the following
Code:
k_yorvik;Yorvik;Yorvik;Yorvik;;Yorvik;;;;;;;;;x
k_yorvik_adj;Yorkish;Yorkish;Yorkish;;Yorkish;;;;;;;;;x
Save, and then rename the file to "KingdomTutorial.csv" (Note: the name of this file is unimportant, only the extension, you can call it mugwump.csv or anything else you wish).
View attachment 52793
 
Step 6: Navigate to mod\KingdomTutorial\common and open landed_titles.txt
View attachment 52794
Then scroll all the way to the bottom of the file, where you should see the entry for the titular latin empire.
View attachment 52795
Click after the last } and hit return twice, then write the following
Code:
# Kingdom Tutorial
k_yorvik = {
	color = { 200 200 200 }
	capital = 57 # York
	culture = danish
	
	allow = {
		culture_group = north_germanic
		religion_group = christian
	}

	d_york = { # Kingdom of Yorvik
		color={ 255 90 15 }
		color2={ 255 255 255 }
		
		c_york = {
			color={ 255 80 5 }
			color2={ 255 255 255 }

			b_york = {
			}
			b_richmond = {
			}
			b_st_peters = {
			}
			b_scarborough = {
			}
			b_skipton = {
			}
			b_pontefract = {
			}
			b_hull = {
			}
			b_conisbrough = {
			}
		}
		c_leicester = {
			color={ 255 85 10 }
			color2={ 255 255 255 }
		
			b_leicester = {
			}
			b_nottingham = {
			}
			b_southwell = {
			}
			b_newark = {
			}
			b_hucknall = {
			}
			b_tickhill = {
			}
			b_worksop = {
			}
			b_newstead = {
			}
		}
		c_lincoln = {
			color={ 255 90 20 }
			color2={ 255 255 255 }
			
			b_gainsborough = {
			}
			b_lincoln = {
			}
			b_boston = {
			}
			b_spalding = {
			}
			b_stamford = {
			}
			b_grantham = {
			}
			b_louth = {
			}
			b_bardney = {
			}
		}
	}	
}

Then press CTRL+F and search for d_york. If you find d_york = { # Kingdom of Yorvik, search again until you find the d_york without the Kingdom of yorvik comment. Select it from d_york = { all the way until it's end bracket, which should be 3 } after b_bardney (after the third } should be d_norfolk). Press Delete, then press ctrl + s to save.
View attachment 52796

Step 7: Open your image software (Photoshop in my case) and create a new image with the dimensions 128x128, then paint whatever you wish inside and save it as a .tga 24bit into mod\KingdomTutorial\gfx\flags as "k_yorvik.tga", the name of the coa must ALWAYS match the title's tag (k_yorvik in this case). By some quirk of the game, you should always shift your coa a little off centre upwards, around 10pixels or so if you want them to roughly be "centre" on the ingame shields.

Step 8: Run Crusader Kings 2, start a new game and then pan your view to England, put on de jure kingdom view and, if done correctly, marvel at your new (potential) kingdom title, which in this case is only creatable by christian norsemen (swedish, danish or norwegian).
 
Last edited:
Also, here is a kind of reference snippet for Kingdom titles (which can also be applied to empire titles) based on my own research.

Code:
# Kingdom Setup
k_yorvik = { # Kingdom Tag, should match entry in localisation file exactly. Avoid special characters such as umlauts.
	
	color = { 5 76 194 } # Defines the colour of the Kingdom on the world map, and the colour of the army sprite.
	color2={ 255 255 255 } # This doesn't seem to have any noticeable effect and can be safely ignored.
	
	capital = 57 # Defines the county that serves as the default Capital for the Kingdom. This is important for Titular Kingdoms as control of the default Capital is a requirement in their creation, for de jure Kingdoms it's importance is less so. You can find a list of counties in the definition.csv of the map folder.
	
	culture = italian # Defines the default culture of the Kingdom, as far as I can tell it's not particularly important and can be safely ignored if you wish.
	
	# The following allows you to define different titles to this specific Kingdom and isn't necessary unless you want to add a little flavour to your new Kingdoms.
	title = "HIGH_CHIEF" # The King of this Kingdom will be called High Chief of Yorvik instead of King of Yorvik.
	foa = "HIGH_CHIEF_FOA" # This is how the King will be addressed in messages, in this case it will be High Chief, if it were ECUMENICAL_PATRIARCH_FOA the address would be Your Holiness
	title_prefix = "TRIBE_OF" # This is how the Kingdom itself will be titled, in this case it will be the Tribe of Yorvik.
	
	short_name = yes # This statement will force the game to report only what is found in the relevant localisation file for your Kingdom's name. So instead of Tribe of Yorvik or Kingdom of Yorvik, it will simply read Yorvik. One example where I have used this in my own mod is for the Polish-Lithuanian Commonwealth.

	controls_religion = norse_pagan # By including this you can make the King or High Chief of Yorvik the head of the Norse Pagan religion. Inclusion is only necessary if you actually want the title to be the head of a religion.

	primary = yes # In practice this is meant to force this title to always be the primary title of the holder, however it doesn't appear to work properly as both the player and the AI are capable of overriding it in play. You don't need to include a = no statement.

	landless = yes # Theoretically the title will always exist. This is only relevant to the AI and has no real effect on players who hold the title (if you lose your last county you still lose the game).
	
	location_ruler_title = yes # Not entirely sure if this has any effect on titles other than the Pope.
	
	religion=norse_pagan # Sets the default religion for the Kingdom to norse_pagan, although I am unsure if it has any real effect upon gameplay.
	
	holy_order = yes # If included this will make the Kingdom of Yorvik a holy order, which will place it into the holy order tab in the military screen and I believe makes the title uncreatable.
	tribe = yes # Like above except it tells the game this title is a tribe. I think it makes the title uncreatable.
	caliphate = yes # Again like above, except for caliphates, and again untested, I don't know if it works for creatable titles.
	mercenary = yes # Designates the title as a mercenary title and will make it appear in the mercenary tab in the military screen, not relevant to creatable player titles.
	modifier = blank # I believe this is only relevant to holy orders and mercenary titles. It links the title with a modifier in the static_modifiers.txt file which determines troop sizes for holy orders and mercenaries.
	
	allow = { # Including this allows you to restrict who can create the Kingdom based on certain factors.

			prestige = 100 # Title can only be created if the creator has prestige of 100+
			piety = 100 # Title can only be created if the creator has piety of 100+
			wealth = 100 # Title can only be created if the creator has wealth of 100+

			ai = no # Prevents AI Characters from creating the title.
	
			is_republic = yes # Prevents the Kingdom from being created unless the creator is a Republic (eg Venice or Genoa at game start in 1066)
			
			is_feudal = yes # The Creator must be a feudal lord, not a republic.
			
			always = no # This will prevent the Kingdom from being created by anything other than an event or at game start using history files.

			primary_title = { # Creator's primary title must meet these requirements.
				OR = {
					tier = king # Creator has to be of King rank to create the title.
					tier = emperor # Creator has to be of Emperor rank to create the title.
					NOT = { has_landed_title = e_hre } # Creator can't create the title if they hold a landed title within the HRE (I think).
					has_landed_title = e_latin # Creator can create the title so long as they hold the latin empire (although this is a guess and untested by me right now).
				}
			
			OR = { # This is an OR statement, effectively you can place in here two or more requirements, if the creator meets one or the other requirement, it can create the title.
				religion_group = pagan_group # The creator must be a member of one of the pagan religions.
				religion = catholic # The creator must be catholic.
				is_heresy_of = catholic # The creator must be a heresy of catholocism.
				# Each of the above can be set to any of the religions or religion_groups (muslim, christian, druze etc) found in religions.txt in the common folder.
			}
			OR = {
				culture_group = north_germanic # The Creator must be from the north_germanic culture group (Swedish, Norwegian or Danish).
				culture = basque # Or the Creator can be of the Basque culture. You can find cultures and culture groups in the cultures.txt in the common folder.
				NOT = { culture_group = arabic } # This will prevent anyone from the Arabic culture group from creating the title.
			}
	}
	
	# If you include the following, any male ruler that creates or gains the title will be randomly given one of these names, overwriting their original name, like with the Pope.
	male_names = {
		John Gregory Benedict Clement Innocent Leo Pius Stephen Boniface Urban Alexander Adrian Paul
		Celestine Martin Nicholas Sixtus Felix Sergius Anastasius Honorius Eugene Sylvester Victor
		Lucius Callixtus Julius Pelagius Adeodatus Theodore Marinus Agapetus Damasus Paschal
		Gelasius Marcellus "John*Paul" Anacletus Evaristus Telesphorus Hyginus Anicetus Mark Hilarius 
		Simplicius Symmachus Hormisdas Silverius Vigilius Sabinian Severinus Vitalian Donus Agatho
		Conon Sisinnius Constantine Zachary Valentine Formosus Romanus Lando
	}	
	
# For De Jure titles this is where the Duchies go. Titular Titles don't need any duchies.
	d_york = { # Duchy tag (should match the localisation entry)
		color={ 255 90 15 }
		color2={ 255 255 255 }
		
		c_york = {
			color={ 255 80 5 }
			color2={ 255 255 255 }

			b_york = {
			}
			b_richmond = {
			}
			b_st_peters = {
			}
			b_scarborough = {
			}
			b_skipton = {
			}
			b_pontefract = {
			}
			b_hull = {
			}
			b_conisbrough = {
			}
		}
		c_leicester = {
			color={ 255 85 10 }
			color2={ 255 255 255 }
		
			b_leicester = {
			}
			b_nottingham = {
			}
			b_southwell = {
			}
			b_newark = {
			}
			b_hucknall = {
			}
			b_tickhill = {
			}
			b_worksop = {
			}
			b_newstead = {
			}
		}
		c_lincoln = {
			color={ 255 90 20 }
			color2={ 255 255 255 }
			
			b_gainsborough = {
			}
			b_lincoln = {
			}
			b_boston = {
			}
			b_spalding = {
			}
			b_stamford = {
			}
			b_grantham = {
			}
			b_louth = {
			}
			b_bardney = {
			}
		}
	}
}
 
Last edited:
Is there anything you can do to make it so a particular titular kingdom doesn't require two duchy's to create?
 
Is there anything you can do to make it so a particular titular kingdom doesn't require two duchy's to create?

Not that I'm aware of, it may be a value in defines.lua, though I never checked. You can make decisions to create the titles instead.
 
Not that I'm aware of, it may be a value in defines.lua, though I never checked. You can make decisions to create the titles instead.

I looked through defines and surprisingly when I did ctr+f and searched kingdom_creation it went to the exact thing I wanted: "REQ_DUCHIES_FOR_KINGDOM_CREATION = 2" Would I be able to use this in landed_titles to lower the amount needed for the particular title?
 
I looked through defines and surprisingly when I did ctr+f and searched kingdom_creation it went to the exact thing I wanted: "REQ_DUCHIES_FOR_KINGDOM_CREATION = 2" Would I be able to use this in landed_titles to lower the amount needed for the particular title?

I don't think so, defines.lua are global, I don't think you can use them on a local level. If you don't mind a little extra work, you can set that value to 1 and then put "num_of_duke_titles = 2" (i *think* that is the correct line) in all duchies you still want to require 2 ducal titles.

Actually, I wonder if you put "num_of_duke_titles = 1" into the allow = {} if that would override the defines value?
Experiment and report back? :ninja:
 
I looked through defines and surprisingly when I did ctr+f and searched kingdom_creation it went to the exact thing I wanted: "REQ_DUCHIES_FOR_KINGDOM_CREATION = 2" Would I be able to use this in landed_titles to lower the amount needed for the particular title?

no, it will be applied to all titles. (you can only alter it in defines.lua)
 
I don't think so, defines.lua are global, I don't think you can use them on a local level. If you don't mind a little extra work, you can set that value to 1 and then put "num_of_duke_titles = 2" (i *think* that is the correct line) in all duchies you still want to require 2 ducal titles.

Actually, I wonder if you put "num_of_duke_titles = 1" into the allow = {} if that would override the defines value?
Experiment and report back? :ninja:
It won't take too long, i'm creating a mini-mod that adds in a bit of historical irish city-state ish "kingdom" duchy's that only require you to hold certain county's in ireland to create them. Anyways, i'll check that code and tell you.

update: No, didn't end up working unfortunately.
 
Last edited:
I've got a question, apparently "tier =" and "has_primary_title =" aren't valid nodes for landed_titles. Is there anything I can do then to restrict certain titular duchy's from being created if the holder has another particular duchy without making a decision?
 
I've got a question, apparently "tier =" and "has_primary_title =" aren't valid nodes for landed_titles. Is there anything I can do then to restrict certain titular duchy's from being created if the holder has another particular duchy without making a decision?

tier = should probably be "primary_title = { tier = BARON/COUNT/DUKE/KING/EMPEROR }". has_primary_title should probably also be "primary_title = { has_landed_title = d_brittany }"
 
tier = should probably be "primary_title = { tier = BARON/COUNT/DUKE/KING/EMPEROR }". has_primary_title should probably also be "primary_title = { has_landed_title = d_brittany }"

OK, thanks for clearing that up, I've been forgetting a few things recently because new ideas for the mod come into my head and I rush them into code then get frustrated when they don't work, and come across minor mistakes like has_primary_title and primary_title.

edit: I just tried primary_title = { tier = count } and apparently primary_title is invalid? maybe it's just landed_titles

edit2: Sorry for another question but this again has confused me
Code:
d_dubh_linn = {
        color={ 55 250 85 }
        capital = 11 # dublin
        culture = irish
        independent = yes
        title = "IRISH_SPECIAL_TITLE"
        title_female = "FEMALE_IRISH_TITLE"
        foa = "SPECIAL_FOA"
        title_prefix = "KINGDOM_OF_IRISH"
        primary_title = { tier = count }
}
d_connaught = {
        color={ 45 230 70 }
        capital = 9 # connacht
        culture = irish
        independent = yes
        title = "IRISH_SPECIAL_TITLE"
        title_female = "FEMALE_IRISH_TITLE"
        foa = "SPECIAL_FOA"
        title_prefix = "KINGDOM_OF_IRISH"
        primary_title = { tier = count }
}
The problem here is that for some reason in game, only d_dubh_linn is creatable, i played as a count in dublin and I was able to create the kingdom of dublin, when I tried connacht it just didn't appear as an option to create, also it's not the primary_title = { tier = count } thing because it wasn't working before that either.
 
Last edited:

Code:
d_dubh_linn = {
	color={ 55 250 85 }
	capital = 11 # dublin
	culture = irish
		
	# - #
	title = "IRISH_SPECIAL_TITLE"
	title_female = "FEMALE_IRISH_TITLE"
	foa = "SPECIAL_FOA"
	title_prefix = "KINGDOM_OF_IRISH"
	# - #
	# Is the above block required? If you're just adding cultural irish titles, it'd be easier to do it through localisations
	# that way it applies for all irish titles, using it in here will mean anyone who gets this duchy will take the title
	# IRISH_SPECIAL_TITLE.

	allow = {
		independent = yes
		primary_title = { tier = COUNT }
	}
}
 
Maybe a work around could be an event or decision, which grants a certain title?

A more effective one would be a decision.

*edit* facepalm moment, I scanned your post, didn't see the "or decision". lol, either way I think lokomoko gave up on trying to get his decisions to work.
 
A more effective one would be a decision.

*edit* facepalm moment, I scanned your post, didn't see the "or decision". lol, either way I think lokomoko gave up on trying to get his decisions to work.

No, I ended up getting the decisions for that principalities mod working, I've just started on another mod so I'll get that one done later.

Also, thanks for clearing up that title korbah but it still doesn't change the fact that, I stress, in-game the "d_connaught" title is obsolete, even though it's code is essentially the same as d_dubh_linn and for some reason dubh_linn works and connacht or connaught doesn't?
 
No, I ended up getting the decisions for that principalities mod working, I've just started on another mod so I'll get that one done later.

Also, thanks for clearing up that title korbah but it still doesn't change the fact that, I stress, in-game the "d_connaught" title is obsolete, even though it's code is essentially the same as d_dubh_linn and for some reason dubh_linn works and connacht or connaught doesn't?

Duplicate the code i used for dubh_linn for connacht/connaught and it should work.

Also, 1.06 added the line name_tier =, which you can use to specificy if a duchy, kingdom or empire should use a different form (so you can add name_tier = KING). (i think that's the correct line)
 
Last edited:
Duplicate the code i used for dubh_linn for connacht/connaught and it should work.

Also, 1.06 added the line name_tier =, which you can use to specificy if a duchy, kingdom or empire should use a different form (so you can add name_tier = KING). (i think that's the correct line)

Wow, so those two sets of # - # above and under each other really make that much of a difference? anyway that completely fixed the problem, thanks :)
 
Wow, so those two sets of # - # above and under each other really make that much of a difference? anyway that completely fixed the problem, thanks :)

Oh, the #-# lines can be removed, that's just me putting in comments to show the block i meant >.<