lfnetwork.com mark read register faq members calendar

Thread: NWN2 FindRefs Utility & Gff editor
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 01-31-2007, 04:27 PM   #1
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
NWN2 FindRefs Utility & Gff editor

Download NWN2 FindRefs Utility v1.4
Download NWN2GFF v1.2.2


(note: you'll need to click the links rather than trying to paste the URLs into your browser)


NWN2 FindRefs Utility: For those of you enjoying Neverwinter Nights 2 but not the NWN2 Toolset's lack of search functions, feel free to try out this utility.

Those of you familiar with modding KotOR may notice the similarities to KotOR FindRefs.. There are some behavioral differences though:

- You can search the modules, data, or campaigns folder (the latter is searched recursively)
- You can select to search the TLK file itself for entries
- If you enter a number in the search field and uncheck the "Allow Partial Matches" box, it will be treated as a TLK reference. You can force it to be searched as a string by checking the "Allow Partial Matches" box.
- Extracting multiple files will bring up a Browse For Folder dialog. Extracting a single file will bring up a Save As dialog (where you can rename the file).
- Checkboxes and radio buttons enable/disable sections of the search criteria in what I hope is an intuitive manner.

NWN2GFF: A GFF Editor based on K-GFF. The main difference here is that NWN2GFF allows up to 32 characters for resource names (ResRefs).
tk102 is offline   you may: quote & reply,
Old 01-31-2007, 04:29 PM   #2
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,295
Awesome A good search function was seriously lacking from the toolset.

You deserve many cookies for this one! Thanks for doing this tk!
Darth333 is offline   you may: quote & reply,
Old 01-31-2007, 04:32 PM   #3
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by tk102
For those of you enjoying Neverwinter Nights 2 but not the NWN2 Toolset's lack of search functions, feel free to try out this utility.
Very nice, the search functions in the toolset are pretty much non-existent so this will likely come in useful.

Does it search inside hakpaks and custom TLK files associated with modules as well?
stoffe is offline   you may: quote & reply,
Old 01-31-2007, 04:45 PM   #4
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
Quote:
Originally Posted by stoffe
Does it search inside hakpaks and custom TLK files associated with modules as well?
Um, well, no. If I remember correctly, hakpaks are ERF-formatted files with a .hak extension. Would they be in the override folder or the campaigns folder?

And custom TLK files... ... just goes to show how newbie I am in relation to the NWN modding scene.
tk102 is offline   you may: quote & reply,
Old 01-31-2007, 05:01 PM   #5
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by tk102
Um, well, no. If I remember correctly, hakpaks are ERF-formatted files with a .hak extension. Would they be in the override folder or the campaigns folder?

And custom TLK files... ... just goes to show how newbie I am in relation to the NWN modding scene.
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).

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? )


mt
stoffe is offline   you may: quote & reply,
Old 01-31-2007, 05:17 PM   #6
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
Quote:
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?


Quote:
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,
Old 01-31-2007, 05:30 PM   #7
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
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.

Quote:
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.

Quote:
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.


mt
stoffe is offline   you may: quote & reply,
Old 01-31-2007, 06:49 PM   #8
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
Quote:
Originally Posted by stoffe
(Unrelated but, how about a version of K-GFF that works with NWN2? )
Shooting from the hip:
Edit: see link in first post
(supports CResRef fields to 32 chars)

Last edited by tk102; 06-07-2007 at 05:52 PM.
tk102 is offline   you may: quote & reply,
Old 01-31-2007, 08:06 PM   #9
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,295
Quote:
Originally Posted by tk102
Shooting from the hip:
NWN2GFF.rar
(supports CResRef fields to 32 chars)
Nice! I was just in need of this one

That was quick!
Darth333 is offline   you may: quote & reply,
Old 01-31-2007, 08:16 PM   #10
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by tk102
Shooting from the hip:
NWN2GFF.rar
(supports CResRef fields to 32 chars)
Thanks! Seems to work fine with the files I've used it with so far that were slightly corrupted by other GFF editors. Nice work tk102.
stoffe is offline   you may: quote & reply,
Old 01-31-2007, 05:51 PM   #11
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
If the modules contain references to the hak pak's by name, then I could add that a search criteria for FindRefs. The utility, as it is, only searches pre-defined fields within known file types. That is, it doesn't spider through the entire gff structure looking for CResRef, CExoStrings, and CExoLocStrings. That's a design trade-off for speed, but perhaps a spider mode could make the utility more robust if the user has the patience (or other good filters in place).
tk102 is offline   you may: quote & reply,
Old 01-31-2007, 06:03 PM   #12
Pavlos
Scruffy Englishman
 
Pavlos's Avatar
 
Join Date: Sep 2005
Location: The real world/ivory towers
Posts: 1,974
Current Game: Viking Warrior Poets
tk102 == God!

It will be nice to have a proper search tool for Neverwinter Nights 2 .
Pavlos is offline   you may: quote & reply,
Old 01-31-2007, 08:16 PM   #13
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
NWN2 FindRefs current version is now 1.2. I fixed a couple issues with the results/feedback panels when searching dialogs and the campaigns folder. It should be a bit more responsive to the halt button too.

Edit: Glad to hear the KGFF, err.. NWN2GFF editor is behaving. I was hoping it was as simple as it appeared.
tk102 is offline   you may: quote & reply,
Old 02-13-2007, 01:07 PM   #14
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
Updated to v1.3 a couple days ago. Added Deep GFF Search (full GFF tree search -- it's thorough but a little slower), the ability to recursively search the Override folder, and more generic file searches within the modules and data folder. .hak files are now recognized as ERF files as are .erf but I've not yet implemented custom TLK searches.
tk102 is offline   you may: quote & reply,
Old 06-07-2007, 05:55 PM   #15
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
NWN2GFF v1.2.1 released

NWN2GFF v1.2.1 released

I had a little catching up to do with some recent features I had added to KGFF to get NWN2GFF up to date.

- Better navigation through up/down left/right keys (left/right: folds/expands up/down: keeps selection anchor under control)
- Eliminated a bug where a non-existent file in the most recently used list would cause NWN2GFF to croak
- Fixed an XML bug involving strange copy/paste effects with empty Structs or empty Lists
tk102 is offline   you may: quote & reply,
Old 06-10-2007, 06:19 AM   #16
stoffe
Mostly dormant
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,834
Helpful! 10 year veteran! Notable contributor 
Quote:
Originally Posted by tk102
NWN2GFF v1.2.1 released

- Fixed an XML bug involving strange copy/paste effects with empty Structs or empty Lists
There still seems to be something weird with this. While copy/pasting a list from one GFF file to another now seemingly works (it gets added to the treeview) at first, doing so appears to prevent any changes to the GFF file from taking place when you save it. When closing and opening the file again the list I just pasted is gone, along with changes to the values of a few existing fields I made.

(Chosing "Save As..." won't create any file at all either after having pasted a list field.)
stoffe is offline   you may: quote & reply,
Old 06-10-2007, 01:19 PM   #17
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
Quote:
Originally Posted by stoffe
There still seems to be something weird with this.
Aha, yes it seems so. The XML fix exposed a vulnerability in my GFF library where empty Lists and Lists with a single struct were making certain assumptions...

v1.2.2 has been released (recompiled with a fixed GFF library). Thanks for the heads up stoffe.
tk102 is offline   you may: quote & reply,
Old 01-09-2008, 03:33 AM   #18
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,767
Current Game: FTL
Forum Veteran Helpful! Notable contributor 
NWN2FindRefs v1.2.4 released

NWN2FindRefs v1.2.4 released

- Fixed a long standing bug where non .dlg files were not being extracted from .mod files correctly. Thanks Darth333 for the heads-up on this.


tk102 is offline   you may: quote & reply,
Old 06-08-2007, 09:48 AM   #19
Pavlos
Scruffy Englishman
 
Pavlos's Avatar
 
Join Date: Sep 2005
Location: The real world/ivory towers
Posts: 1,974
Current Game: Viking Warrior Poets
Hey, that's great, tk, thanks!

You may want to post the links over on the BioWare forums to get a greater amount of exposure... I think someone was looking for a GFF editor the other day, too . But I've no idea if you've already done this or not - the BioWare forums move so fast it's difficult to keep track of them.
Pavlos is offline   you may: quote & reply,
Old 06-08-2007, 10:38 AM   #20
ChAiNz.2da
Leave Everything to Me!
 
ChAiNz.2da's Avatar
 
Join Date: Oct 2004
Location: Tennessee (USA)
Posts: 6,848
Very nice tk!

Since it's a tool thread, and I'd hate for it to be lost in the mix... this thread graduates to Sticky


"Eagles May Soar, But Weasels Don't Get Sucked Into Jet Engines"


| Mods (FF) (DS) | Folding | SWK.com | FB: (LF) (Me) | Steam | The Herd |
ChAiNz.2da is offline   you may: quote & reply,
Old 03-20-2008, 03:17 AM   #21
best_predator
Lurker
 
Join Date: Oct 2005
Posts: 2
Can someone tell me how to edit eye color? I can't find the right parameter to change.
best_predator is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Community > The Outlander Club > NWN2 FindRefs Utility & Gff editor

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:38 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.