Skip to content

How To Assign DNAs (Portraits) To Characters

ercarp edited this page Sep 8, 2022 · 15 revisions

Documentation:

  • GoA2 Portraits, a spreadsheet of our historical characters, their DNAs, and other information. (Note: Character Designers need to contact @ercarp on Discord to gain access to editing the spreadsheet.)
  • PureRef is a useful tool for compiling reference images, especially if you have more than one monitor.

Guidelines:

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. Find a character in the GoA2 Portraits spreadsheet that you would like to create. You can also add new characters to the spreadsheet, just make sure they exist in-game. Follow the formatting used in the rest of the spreadsheet to keep things neat and tidy.
  2. Before you get to work, it is recommended to peruse the Tips section at the bottom of the page.
  3. 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.
  4. Once done, hit Copy DNA.
Images

  1. Open any text editor like Notepad++ or Visual Studio Code.
  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 the 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.
    • Notepad++ and Visual Studio Code also have a function to search through the files within an entire folder.
  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 and DNA data

image

  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.
  2. If everything looks correct, update the spreadsheet with all the essential information about the portrait you just created.

Tips:

  1. If you use the default CK3 Ruler Designer, it is recommended that you review your finished portraits using the Debug Portrait Editor to make sure they look correct from all angles. A character may look fine from the front but wonky from the side.
  2. When creating portraits of characters closely related to each other, it is recommended that you use their relative's DNA as a base. This ensures there's a general resemblance between the characters. (For example, Malfurion was created by working on top of Illidan's DNA.)
  3. It is recommended that you work on your portraits with hair and facial hair disabled to ensure you get the best possible view of their head shape and facial characteristics. These are all features that will be inherited by their children in-game, so it's important.
  4. When working using the Debug Portrait Editor, you can set the animation to pregnant:pregnant_basic to stop the character from moving around. This makes it easier to work on details.
  5. If you want, you can also change the Environment in Debug Portrait Editor to view your character under different lighting conditions. However, the default lighting is perfectly fine.