Modding characters involves changing their appearance, data and behaviour. This can vary from small tweaks like adding gold or piety, to complex changes like scripting new visual effects and more.
Changing Appearance through Scripts
In Crusader Kings 3, there is a complicated system involving 'DNA' to define a character's appearance, which has changed from Crusader Kings 2. These changes allow for more specific and realistic appearances.
You can change a character's DNA through dna_modifiers. Create a file in gfx/portraits/portrait_modifiers with any filename and add this:
dna_change_example_modifier = {
usage = game
dna_change_example_modifier = {
dna_modifiers = {
accessory = {
mode = add
gene = headgear
template = western_imperial
value = 1.0
}
color = {
mode = modify
gene = hair_color
x = 0.5
y = -0.5
}
}
weight = {
base = 0
modifier = {
add = 100
has_character_flag = dna_change_example_modifier
}
}
}
}
This will add the western_imperial headgear and change the hair color of any character with the "dna_change_example_modifier" flag. You can add a flag to a character with the add_character_flag command, like this:
add_character_flag = {
flag = dna_change_example_modifier
}
If you encounter any issues, check the error.log of the game for any specific error messages and correct your script accordingly.