CK Modding Guide
I thought that this would be a good idea as many people would want to mod but they just don't know how.
Character editing guide
This is quite simple. A character looks something like this:
Code:
#a sample comment.
character = {
id = { type = 10 id = 11060 }
name = "Otto"
gender = male
dynasty = { type = 12 id = 217 }
father = { type = 10 id = 20257 }
mother = { type = 10 id = 4257 }
country = C361
religion = catholic
culture = german
score = { gold = 25 prestige = 100 piety = 100 }
birthdate = { year = 1058 month = january day = 0 }
deathdate = { year = 1110 month = january day = 0 }
dna = "52491039781472"
attributes = {
martial = 5
diplomacy = 7
intrigue = 6
stewardship = 7
health = 6
fertility = 6
}
traits = {
martial_education = yes
}
}
What does this mean? The line with a hash at the start is a comment. Everything on that line is ignored. Then you get to the character. The character = { line just shows the start of a character. The next line shows the characters type and ID. The type should always be 10. The ID has to be unique. Generally, anything above 100000 is fine, although always check. The next line shows the name. This has to be in quotes. The next line is the gender, either male or female. The next line is dynasty. The type should always be 12. The ID again has to be unique. The dynasties are stored in db\dynasties.txt. The next line is the father. Again, stick with type 10. The ID is the ID of the character who is this character's father. The next line is the same, but it should be for the mother. The next line is the country tag for the character. If you only know the countries name, open up world_names.csv in notepad and search for the name. On the left is the tag. The next line is religion. This can be either catholic, orthodox, pagan, moslem or jewish. The next line is culture. This mainly determines what their children will be named. Look in world_names.csv to see the cultures. The next line is birthdate. Just stick to the format shown here. The deathdate tells you when the character died. The next line is a string of 14 digits enclosed in quotes saying what the portrait will look like. Just use whatever value you like. The next line just opens the attribute block. The next 6 lines are self explanatory. If you have a character with 0 fertility, they should never have a child. Then come the traits. You should check in the traits.txt file in the db folder to see the correct names; some of them are different in-game. Just make sure you put = yes after the trait.
Father, mother, score and deathdate are not needed to make the character work.
Creating dynasties
An example of a dynasty :
Code:
dynasty = {
id = ( type = 12 id = 111125 }
name = "von Winterthur"
province = { 241 242 244 245 246 247 }
The first line just says that there is a dynasty coming. The ID line gives a unique ID. The type should always be 12. Again, IDs over 200000 tend to be okay. The next line gives the name in quotes. The province = {} line specifies which provinces the dynasty appears in randomly.
Changing relations
This means changing starting wars, marriages and truces. Example:
Code:
relations = {
marrige = {
primary = { type = 10 id = 20286 }
secondary = { type = 10 id = 4286 }
startdate = { year = 1065 month = january day = 1 }
}
alliance = {
primary = { type = 10 id = 3040 }
secondary = { type = 10 id = 3084 }
startdate = { year = 1066 month = november day = 0 }
}
alliance = {
primary = { type = 10 id = 626 }
secondary = { type = 10 id = 686 }
startdate = { year = 1066 month = november day = 0 }
}
truce = {
primary = { type = 10 id = 1732 }
secondary = { type = 10 id = 3040 }
startdate = { year = 1066 month = january day = 1 }
}
}
You must have the relations line or you will get lots of strange errors. For the marriages, the primary line is the male character with their ID. Secondary is female with ID. Startdate is when the marriage started. Deathdate is when it ended. Alliances are similar. They are made between two rulers though. I don't think there is a difference between primary and secondary. Truce means that the rulers shouldn't fight each other. Otherwise pretty much identical to alliances.
Here is the start. Other parts will come.