Skip to content

How To Assign DNAs (Portraits) To Characters

zumbak04 edited this page Jun 29, 2021 · 15 revisions

On this page, we will explain how to copy DNAs from the Ruler Designer and move them into the game files so the historical characters have pre-scripted look:

  1. Open the Ruler Designer and create the look of a historical character.
    • In the Debug mode, you will see SHOW UGROUPED button with hidden genes.
  2. Once done, hit Copy DNA.
Images

  1. Open any text editor like Notepad++.
  2. Paste your DNA there. You will see something like this:
Images

  1. Copy the genes enclosed block. If you use Notepad++, it will highlight where this block opens and closes once you click near a brace like on the screenshot above. YOU MUST COPY THE ENTIRE BLOCK, FROM THE genes TO THE CLOSING BRACE.
  2. Open suitable file (each race has its own file there) in Crusader Kings III\mod\Warcraft-Guardians-of-Azeroth-2\common\dna_data with any text editor.
  3. Create a new enclosed block there and copy the genes block inside the portrait_info block. Here is its basic template:
<Character_name_here>_dna = {
	portrait_info = {
		<Copy genes block here>
	}
	enabled=yes
}
Images

  1. Scroll down to the end of the genes block, you will find the clothes line there. Delete it. Otherwise, your character may end up wearing bedchamber clothes.
Images

  1. <Character_name_here>_dna is the name of your DNA data, we will use it soon. Open mod\Warcraft-Guardians-of-Azeroth-2\history\characters. That's where all the characters are listed. Search for your character name in these files either using Windows search or Total Commander.
  2. Find the block of your character and put dna = <Character_name_here>_dna inside. Remember the character ID. You will need it later.
Character ID

  1. Since 1.3.0, to assign hairs (or beards), you have to do a little scripting (to make it easier and cleaner, you may use Advanced Tools Like Notepad++. Visit Warcraft-Guardians-of-Azeroth-2\common\scripted_triggers\wc_his_character_triggers.txt and create a new trigger there with this format:
Format
is_<Character Name in Lower Case>_trigger = {
	exists = character:<Character ID>
	this = character:<Character ID>
}
  1. In the same file, put your new trigger in is_any_historical_character_trigger, inside the OR block.
  2. Visit these files in Warcraft-Guardians-of-Azeroth-2\gfx\portraits\portrait_modifiers: 00_beards_scripted_characters.txt and 00_hairstyles_scripted_characters.txt.
  3. Inside these files, find the beard/hairstyle section you want. Inside weight, put a modifier in this format where <Your Character Trigger> is the name of the trigger you created early.:
Format
modifier = {
	add = 200
	<Your Character Trigger> = yes
}
  1. Done! Open the game to see if the character looks right.
Clone this wiki locally