Crusader Kings II

Crusader Kings II

34 ratings
Making a mod: Titles
By Kellen
This short guide will teach you how to make a new mod that adds a unlanded title to the game.
(please note that the current branding image is temporary and will be replaced by a proper one in due time)
   
Award
Favorite
Favorited
Unfavorite
Step 1: Flippin' Folders
first, open up Documents, and then Paradox Interactive. you should see Crusader Kings 2; open that folder, then open the folder called "mod". create a .txt with the following text in it:

name="My Mod"
path="mod/MyMod"
tags=
{
your tag here }
picture="banner.png" #only used on the workshop
}

then change that .txt into a .mod file. If you do not know how to, heres a link[www.mediacollege.com].
then create a folder called MyMod and open it up. create another folder inside that called common, and additonally gfx, and localisation.
open up gfx and make a folder called flags.
open up common and make a folder called landed_titles.
this concludes step 1. check to make sure you've gotten capitalisation and spelling down to the letter, as ck2 is very picky about folder names.
Step 2: Consistantly Coding Curiously
now here is the easy part; tossing in a few lines of text.

well, maybe not that easy. anyways, go into the landed_titles folder that is inside common. make a .txt file and name it whatever you like. this could be anything from 1337 to stupidtitle. now, open it up with notepad or notepad++. i will be using notepad for demonstration purposes.

d_stupidland = {

color={ 255 2 90 } # this is the RGB value that detirmines the color of the land owned by this.

}

you can change the "stupidland" part harmlessly, but the "d_" means it is a duchy. heres a short list of useable ones:

b_ - barony. causes the game to end if it is your only title and crashes the game.
c_ - county. the lowest playable rank. can rule over baronies.
d_ - duchy. first rank where your subjects can make factions. can rule over counties.
k_ - kingdom. the first rank where you can change laws. can rule over duchies.
e_ - empire. can rule over every other title. gives you a nice big crown.

this is basically all you need to make a county. however, it will not be formable and will have the name "d_stupidland". lets make it formable. to do this, we add a few more lines:

d_stupidland = {

color={ 255 2 90 } # this is the RGB value that detirmines the color of the land owned by this.
allow = {
ai = no # this makes it so only the player can make this.
}
}

now, this title is formable. however, it still shows up as a black flag (not the pirate kind sadly) and is called d_stupidland. time to solve that!
Step 3: Fancy Flags Flapping and Flying
if you thought ck2 was picky about capitalisation and spelling, well prepare to have your mind blown. go to gfx and then the folder called flags (make a folder called flags inside gfx if you havent allready) and open up paint.net (or photoshop; normal paint will not do). make a new 128x128 24-bit TGA file, and make sure it isn't being compressed. (i know right? so specific!) and create your flag. you could also copy & paste a flag you allready have made into it. name it d_stupidland (or whatever you called your title in the previous section).
example:

now, start up ck2 and test the mod, and see if the title has a flag. if it does, all went well. if it does not, then repeat the earlier process. you probably misstyped the size or didnt save it as 24-bit.

now, about that name....
Step 4: Names That I Couldn't Come up With a Funny Title For
welcome to your worst nightmare. localisation.

and im not kidding; thats actually what it looks like. so lets get to it before you pass out.
so your supposed to do this with Microsoft Exel or some other spreadsheet program, but nobody's got time or money for that, so thank goodness there is notepad.
make a new txt file in localisation and type this junk in there:

#CODE;ENGLISH;FRENCH;GERMAN;;SPANISH;;;;;;;;;x
d_stupidland;Stupidland;Terresstupide;Dummlunde;;Tierraestúpido;;;;;;;;;x
d_stupidland_adj;Stupid;Stupide;Dumm;;Estúpido;;;;;;;;;x

Replace d_stupidland with your title's name in the code, and Stupidland with the name. Stupid should be replaced with a adjective for it, you get the idea. save it as mymod.csv, then start ck2 and see if it has a proper name. if it did, congratulations! you now have a functioning titular title!

the next section is optional, and will require reworking existing code (in other words, annoyingly difficult stuff!), so you might want to skip that.

woops.... so i messed something up when i was making the next section and it just vanished. Sorry folks!

Step 5: Adding De Jure (optional)
This is not neccessary. However, if you are trying to pull a alternative history kind of thing, it could be useful.
Note: for the time being this will lack images due to time constraints.
First, in your mod's common folder, make a new landed_titles folder, then a txt and name it landed_titles as well. leave it blank.
[Image would go here]

Next, find the empire you want your title to be in, in your ck2 landed titles folder. (\Crusader Kings II\common\landed_titles\landed_titles\)
[Image would go here]

Now, copy the empire and everything under it into your mod's landed_titles.txt.
[Image would go here]

Put your title under the one you want to be above it in its entirety. delete its old txt.
[image would go here]

Congratulations, you did a do!
[Dank Meme goes here]
[WIP] Step 5/6: Adding Historical History (Optional)
So you want your title to exist at the start of the game eh? i don't blame you.
Note: Images wont be added here yet due to time constraints.

First, make a new history folder in the mod folder, and then a characters folder inside it, along with a titles folder.
[Images would go here]



Next: Do you want a custom ruler, or a pre-existing one? if you want a pre-existing one, skip down to the part in this where i cover them.

Custom Ruler
The name really doesn't matter.


Pre-Existing Ruler
Conclusion
if you happen to need some help, leave it in the comments and i or somebody else will glady solve your problem!
Finished Titular Mod:

Mod made with this guide:
http://steamcommunity.com/sharedfiles/filedetails/?id=485645973
Trait Guide:
http://steamcommunity.com/sharedfiles/filedetails/?id=485541402
1 Comments
Flesh Lich Nov 1, 2018 @ 11:04am 
Understandable, easy to follow, and useful. Keep up the great work!