Total War: WARHAMMER II

Total War: WARHAMMER II

63 beoordelingen
Portraits and Portholes for new custom characters.
Door Marthenil
This guide will walk you through adding portraits and portholes to new custom characters.
2
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Introduction
One of the major issues when making new custom characters has been the lack of working custom portraits. The portrait is the icon you see at the diplomacy screen, when recruiting a character, the skill window and more.

Well, no more. In this relatively simple guide, we'll go through the steps required to add a working portrait to your new custom character.
Things you will need
Setting up and understanding the XML
Extract selfie.exe and the XML template in a directory of your choice.
Open up the XML template with Notepad ++ or the text editor of your choice. The template is already configured for a custom vanilla male dreadlord.
The settings themselves are pretty straightforward. Let's ignore Distance, Theta, Phi and FOV for now.

Each art_set_id from the campaign_character_arts table requires its own entry.


The variant key from the variants table goes into the Variant ID= slot.


The link to your 2d portrait porthole is added in the <FileDiffuse></File> slot.


Filemasks, Season, Level, Age, Politician, and Faction Leader values should be left untouched.
Repeat for each campaign variant.

All of your characters in a single mod pack should use a single xml file. Just keep adding entries.


Distance, Theta, Phi, FOV
Those values essentially adjust the viewing angle of the porthole portrait. Unfortunately, there's no easy way to figure out what works best in each specific case. You can try the default values in the XML template, but they won't always work.
In that case, you will have to find a unit that uses a similar model/portrait and copy the values from that.
Extract either portrait_settings__.bin in ui/portraits in the data.pack or portrait_settings__2.bin in ui/portraits in data_2.pack. TW:W1 portraits are found in portrait_settings__.bin and TW:W2 in portrait_settings__2.bin.
Open the newly exported bin file with HXD. Make sure data inspector is on (right hand panel with value translations) by making sure it's ticked in View>Toolbars>Data Inspector.
Hit CTRL+F to search for the unit with the portrait settings you want to use.
Notice there's some text, and some giberish



The text is the art_set_id of the unit.
The first 16 gibberish characters, in groups of 4, are the actual values for Distance, Theta, Phi and FOV in Float.


Highlight the four first characters (bytes) and look at the data inspector (right panel) under float. This is your Distance value.


The next four are your Theta Value.



And, you guessed it, the next four are your Phi Value and the last four are your FOV value.

Finishing up and getting it into our game
After you've succesfully added your Distance Theta Phi and FOV values to your XML, save it as portrait_settings__[yourmodname].xml in the directory that you extracted selfie.exe in the previous steps.
Simply drag the file onto selfie.exe and a portrait_settings__[yourmodname].bin should appear in the same folder.
To get your .bin in the game, add it to the UI/Portraits/Porholes folder in your mod's pack, then add a second copy to the UI/Portraits/Units folder.



Voila! Your portraits and portholes are ready!
A word of warning:
Do not mess with the .bin files or filenames in HXD, other than reading the values for Distance,Theta, Phi and FOV.
Do not mess with the filename of the custom .bin too much, either.
Do not mess with the Filemasks, Season, Level, Age, Politician, and Faction Leader values in the XML either.
Failure to comply with the above can lead to severe game crashes, system-wide crashes and even the dreaded Blue Screen of Death.
You have been warned.
Some notes about selfie.exe
Decimals in your xml must use decimal points ( . ) and not commas ( , ) otherwise selfie will not recognise the float values.

Selfie also supports error reporting, if your returned file is not working properly, try running selfie through the command prompt.

Open up a command prompt in the folder you've got selfie and your xml, useage is

selfie.exe <filename>
Closing and Thanks
Feel free to comment if you have any issues/questions!


Major thanks to Crux3d for creating selfie.exe for Attila, without his tool it would be close to impossible to figure the values out.


Thanks to Crynsos and Cataph for their help with figuring some of the stuff out and testing the whole thing!

41 opmerkingen
Poljanan 2 mei 2022 om 7:18 
Hello, I'm not sure if this is related, but do you by chance know what's causing my hero to look really small in the equipment screen? This is for WH3 btw.
dr.makafui 13 apr 2022 om 23:37 
Found it thanks
Marthenil  [auteur] 13 apr 2022 om 23:27 
No. Visit the modding den discord, I've posted an updated exe and template there.
dr.makafui 13 apr 2022 om 23:17 
Does this work for WH3?
Septus 14 okt 2021 om 0:28 
I just published a mod with credits to you for this guide. Thank you!
https://steamcommunity.com/sharedfiles/filedetails/?id=2627531972
Karl Power 28 aug 2021 om 14:58 
nice. I can't wait for Estalia to field Super Mario and Luigi as engineer heroes

the Lizards will bring Bowser then
Wildcat™ 23 mrt 2021 om 17:06 
Thanks, @Marthenil . I can't seem to figure out what I'm doing wrong. Any suggestions? I deleted the .BIN from the mod just to see how it would run. The portrait is animated on campaign works, the 2D portrait during loading campaign battles is gone, and the animated portrait during campaign battles is working. With the .BIN in the mod, the animated portrait works, the 2D portrait during loading a campaign battle works, but the campaign battle portrait is static. No change to the custom battle portrait (base LL's portrait is static, but while it's on mount, it's animated ). It's such a manner problem in the grant scheme of things, but it's something I really just want to figure out.
Marthenil  [auteur] 23 mrt 2021 om 13:49 
It does affect the animated portraits too, yes. It's the Distance, Theta, Phi, FOV settings
Wildcat™ 23 mrt 2021 om 12:35 
@Marthenil , does this guide deal with animated portraits? I have a LL whose portrait isn't animated while on foot, but when he's using his mount, his portrait is animated (also, his portrait is animated on the campaign map). I can't figure out for the life of me how to fix this.