View Single Post
Old 01-31-2007, 04:30 PM   #7
Mostly dormant
stoffe's Avatar
Status: Administrator
Join Date: Apr 2002
Posts: 5,850
Helpful!  10 year veteran!  Notable contributor 
Originally Posted by tk102
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?
Probably, though keep in mind that hakpak content only is used for modules that link to them, so there may be multiple versions of the same files in different hakpaks.

Originally Posted by tk102
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.
You'd probably need to check which module uses the custom TLK as well since all custom TLK files start at the same ResRef searching for StrRef alone is pointless if you won't know which file to search in. I.e. when searching for StrRefs in a special module or its associated hakpaks you should check for the relevant StrRefs in the custom TLK file associated with that module.

Originally Posted by tk102
But you say that Index 0 of a custom TLK file is really 0+some offset as it pertains to StringRefs in-game?
Yes, I think you OR bit 7 in the StrRef DWORD to 1 to signify that it refers to the module's custom TLK file. Was a while ago I did anything with custom TLK files though.

stoffe is offline   you may: quote & reply,