I’ve followed the tutorial for adding custom portraits for NPCs - it said to make the batch of various sizes, name them and all that, to add them to the portraits.2da file, and then to make a hak of the .2da together with the portrait files.
So I did all that.
But I still can’t give the chosen portrait to an NPC. I can use it to make a player character with it, but I can’t find it anywhere when choosing an NPC portrait. I’ve checked everywhere, it just doesn’t work. Did the method change, or what?
Everything works as per the tutorial. Probably worth checking that the NPC’s race and gender match the values in portraits.2da (or, if the portraits are flagged as plot, try choosing a plot character portrait for the NPC).
I’ve looked for the portrait everywhere, in every category, every gender, even among the placeables and doors. It just doesn’t show up in there anywhere.
(It does show up for character creation in the game proper. No idea if this is relevant - but it does at least show that the file format and dimensions are all right.
I made some new portraits and they all worked fine.
Sounds like it could be a filename situation.
Anyway here is a visual of Proleric’s explanation.
and a guide to check your work…
almost all the portraits (including original content) in my game have been customized so it should work
1 Like
This is the line I put in the portraits.2da file:
Added as the last line in the file, with parameters copied from a matching (male elf) portrait, as per the tutorial. The letters “po_” at the beginning of the file name are omitted, as per tutorial.
This is my toolset when I look for the portrait:
No portrait anywhere in the selection has the name “qg_rhil”. The portrait I want to add is nowhere in the toolset portrait selection whatsoever at all. I would have seen it if it were there. There are only a handful of them and I’ve done and redone it over and over again.
I’ve made a hak file with all the portrait sizes and the .2da file as per tutorial. I have added it to my custom content in the module as per tutorial.
The portrait is not friggin there.
Am I supposed to do something else with the .2da file, apart from adding it to the hak, or what?
Your hak should be above CEP. Cep has a portraits 2da so its overwriting your modified one. Move your hak to the top and it should work.
1 Like
This is correct but… If you are using your own 2da, you will lose all the cep portraits because your 2da will have precedence over the cep one. If you want to keep the cep ones as well as add your own, you will need to extract the cep portraits.2da, edit it to include your portrait(s) and place that in your hak file instead of the current custom portraits.2da.
TR
2 Likes
Hah! I actually almost-tried this! As in, I put my hack almost all the way up, but below the cep-top file, because I figured it has to be named this way for a reason and if I put anything above it, it will explode or something.
Now I tried putting it all the way up, above the cep-top thingy, and yes, the portrait is there, in the proper male elf category. However, as Tarot said, I’ve lost all the cep portraits, and not just that - all the expansion portraits as well.
I hope they will come back automatically and I won’t have to do this manually.
So… how do I extract the cep portraits .2da…?
You use nwhak.exe. For 1.69 it’s in NWN/utils and in EE it’s in utils/win32. Open the cep top hak. Find their version of portraits.2da and highlight it. From the menu at the top of nwhak, select Resource/Export and save it wherever you want. Don’t worry, you are actually making a copy of the 2da and not actually removing it from the cep.
TR
1 Like
YESSSS! It works! It finally works! Thank you so, so much.
As a side note - hopefully of use to someone in the future, I guess:
When the portraits finally became available, one of them worked properly and the other one displayed upside down. The upside down one was a portrait the files of which I created manually in GIMP, as opposed to having the game convert it to the five required sizes through the ConvertPortrait console command.
Once I converted the original artwork through the game, it displayed normally.
Thank you everyone for your amazing help and for being patient with my frustration.
2 Likes
Re. the upside down portrait thing. This is such a well known little problem that there is a very useful tiny tool for correcting it. In the future try TGA Flipper. As a side effect it will also strip out certain things (including but not limited to RLE compression) that NwN doesn’t like.
TR
2 Likes
Side question: how many, and what kinds, of different things can I pack into one .hak file? For instance, if I have the .hak I made with a modified ranger class, can I also drop custom portraits in there? I’ve noticed most of these things are separated thematically…