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

unmerged(127999)

Captain
3 Badges
Dec 6, 2008
392
1
  • Crusader Kings II
  • Heir to the Throne
  • Europa Universalis: Rome
How do I modify one of my save games? I want to add a character who shows up after the 1066 scenario, but I have no idea how to open up a save game file.

Also, I understand how to create a dynasty, but how do I create a single character?
 
How do I modify one of my save games? I want to add a character who shows up after the 1066 scenario, but I have no idea how to open up a save game file.

Also, I understand how to create a dynasty, but how do I create a single character?

You can open/edit a save-game with Wordpad or Notepad

Here in the CK Modding Guide you can see how you can add a character

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.
 
Okay, so how would I add a character with the name "Bertram" surname "of Zürich" with the traits Tough Soldier, Selfish, and Valorous? (I.e., what would be the combination of code, and where would I put it in the save file?)
 
Okay, so how would I add a character with the name "Bertram" surname "of Zürich" with the traits Tough Soldier, Selfish, and Valorous? (I.e., what would be the combination of code, and where would I put it in the save file?)

Code:
character = {
	id = { type = 10 id = [COLOR="orange"]Create unique number, it can not match any other number in the game[/COLOR]}
	name = "Bertram"
	gender = male
	dynasty = { type = 12 id = [COLOR="Orange"]whatever dynasty tag is "of Zürich"[/COLOR] }
	country = [COLOR="orange"]whatever county/duchy you want him in[/COLOR]
	religion = catholic
	culture = german
	score = { gold = 25 prestige = 100 piety = 100 }
	birthdate = { year = [COLOR="Orange"]whatever year you want him born in[/COLOR] month = january day = 0 }
	dna = "52491039781472"
	attributes = {
		martial = 5
		diplomacy = 7
		intrigue = 6
		stewardship = 7
		health = 6
		fertility = 6
	}
	traits = {
		martial_education = yes 
		tough_soldier = yes 
		selfish = yes
		valorous = yes  
	}
}

You will need to add this character to your save game or whatever scenario file you wish him to be in. You can manipulate his attributes if you wish. I am not at my home computer so i can not verify if there is an Of Zurich, or Von Zurich, so you will have to do this.

I believe of Zürich or von Zurich is already has a dynasty tag, do a search for it in the dynasty files and whatever that particular dynasty id is, and place it where the dynasty id is supposed to be in the above template. Also, add his birthdate and where he is supposed to be.

I would place the character at the end of the other characters, or at the top. It doesnt matter so long as you remember where you placed it.
 
Last edited:
I'm trying to edit my savegame to redistribute titles and lands in the wake of a German collapse. Because the AI's peace deals made no sense what-so-ever. For the most part it's been a success, but my attempt to give Forez to France and Franken to Franconia don't seem to have worked. Now it appears that no one owns those provinces, though both are controlled. I've given the claims to the appropriate characters, but still this:

leproblem.png


What the deuce?
 
Rabid Bogling said:
Now it appears that no one owns those provinces, though both are controlled. I've given the claims to the appropriate characters.
Ownership and control are different things, I think you only gave the title to each ruler and did not change the control of the province. At the end of the save there are all the countries, to go to this area do a CTRL+F of stability for example then do a search for tag = FRAN for example and then in the controlled provinces add the one you want to give them, then find the tag of the previous owner and removed the province from his controlled provinces.
 
Thanks for the quick answer, Kadvael. Provided I've understood correctly, that doesn't seem to be the problem. After trudging through every single instance of 224 and 254 they're only listed in the controlled provinces of FRAC and FRAN. Likewise C254 and C224 belong solely to the appropriate characters; 7746 and 214, respectively. They aren't listed as claimants. Nor are there any left-over courtiers from the former Saxon vassal, Forez.
 
Thanks for the quick answer, Kadvael. Provided I've understood correctly, that doesn't seem to be the problem. After trudging through every single instance of 224 and 254 they're only listed in the controlled provinces of FRAC and FRAN. Likewise C254 and C224 belong solely to the appropriate characters; 7746 and 214, respectively. They aren't listed as claimants. Nor are there any left-over courtiers from the former Saxon vassal, Forez.
If you can upload the file somewhere I can have a look at it and I may find what is not working.
 
I have found the problem, for C224, you have:
holder = { character = { type = 4712 id = 214 } startdate = { year = 1071 month = august day = 2 } }
The king of France is type = 10 id =214.

For C254, you have:
holder = { character = { type = 10 id = 7746 } startdate = { year = 1071 month = july day = 22 } }
The archbishop of Franconia is type = 4712 id = 7746.

The game tried to find characters who did not exist, the provinces were well shown as controlled by France for Forez and Franconia for Franken but the owner was unknown.

Have fun :).