View Single Post
Old 01-31-2007, 04:17 PM   #6
Well past expiration date
tk102's Avatar
Join Date: Jan 2004
Posts: 5,768
Current Game: FTL
10 year veteran!  Forum Veteran  Helpful!  Notable contributor 
Originally Posted by stoffe
Hakpaks go in the "hak" folder (within the game folder or my documents\gamefolder) and are referenced by the hak-list field swithin a module.ifo file of a module. They are repositories for custom content (models, textures, 2DA's etc) that's unique to the modules using that hakpak. Hakpaks should be ERF files unless they've changed how they work from NWN1 (haven't checked the formats yet).
Then would a suitable strategy for NWN2FindRefs to discover the hakpaks be to search for a folder named 'hak' within the game folder or the My Documents, and gather a list of *.hak files, and parse them as I do with the *.mod files?

Originally Posted by stoffe
Custom TLK files are also associated to a module and contain all StrRefs above a certain threshold (I can't remember which right now). They reside within the "tlk" folder (either in the game folder on in the My Documents + game folder).

(Unrelated but, how about a version of K-GFF that works with NWN2? )
Assuming the strategy for discovering .hak files is valid, I would do something similar with the TLK files -- only here, I would gather up all the TLK references that match the search term and keep track also of what TLK file they came from.

But you say that Index 0 of a custom TLK file is really 0+some offset as it pertains to StringRefs in-game? I guess I'll need to find out what that offset is before I can search against it. I think I've found it: 0x1000000 (16777216)

But it begs the question: how can you know which TLK file sting 0x1000001 comes from if you have two custom TLK files? I guess I'm answering my own questions now -- the .mod or .hak files' module.ifo references the custom TLK. That adds a whole other level of complexity.
tk102 is offline   you may: quote & reply,