I would like to add several new NPC portraits to my module which is built with Project Q.
Can I simply put those into the override folder and add this package to the module download files to make them work for players or is there only the option of creating an additional top hak that includes all Project Q portraits as well as the new ones?
IIRC you’ll need to add the portraits to portraits.2da if you want them to show up in the toolset so you can assign them to NPCs.
For the top hak, you don’t need to have the Q portraits in the new hak; you just need to clone the portraits.2da it uses, add the lines for your portraits to it, and then put your portraits and the modified 2da file into your new hak, which needs to get loaded after the Q one so it can override that version of the 2da.
Just to make this a little clearer. The way you get your hak to load later than the Q ones is to make sure it is above them in the list you get in the module properties custom content tab.
Silly me. I’ve told you what you need to do but not why. Here goes. The way that NwN works is this. First the standard assets (tilesets, creatures, etc.) are loaded. After that everything in the override folder is loaded. If there are any files with names that match those already loaded, the ones from the override replace them. After that, any haks that the module uses are loaded, again replacing any file already loaded with a matching name. They are loaded in the reverse order (i.e. bottom to top) to the way they are listed in the module properties custom content tab. If a hak that is higher in the list has a file that has the same name as a file in a lower hak the file in the higher hak is used. That is why hak order is important. NwN is not alone when it comes to modification order being important. For example in Fallout 3 (and NV and 4) there are third party tools to ensure that all modifications are loaded in the right order.