Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

FindRefs Utility (Latest version: v4.4)

Page: 1 of 2
 tk102
10-04-2004, 8:13 AM
#1
FindRefs v4.4 6/23/2007
A file search and extraction tool for KoTOR and TSL resources

Download from starwarsknights.com (http://www.starwarsknights.com/tools.php)

Icon by svцsh!

v4.4 Extended the search to include the inventories of merchants, placeables, and creatures.
v4.3 Added ability to search/extract .2da files
If search term is numeric and TLK references are enabled, the utility will assume the search term is an index to dialog.tlk and will search accordingly.
Source code for .exe and .dll included
v4.2 Bug fix: Under certain search criteria, some .bif files were being searched twice needlessly.
Bug fix: Under certain search criteria, some resources in models.bif, templates.bif, and scripts.bif were being shown as found in multiple bifs.
DLL version numbering now in sync with EXE.
DLL compiled with Perl 5.8.8.
v4.1 Bug fix! Fixed searches in templates.bif and scripts.bif
v4.0 Search extended to .git/.mdl/.mdx/.tpc/.tga files
Added filename-only search toggle
Multiple selection/extraction now possible
 T7nowhere
10-04-2004, 8:21 AM
#2
I just went to pcgm for another reason and saw this posted :) Nice. I'll try it out and report back to ya as soon as I can. It looks very cool.
 tk102
10-04-2004, 8:32 AM
#3
I hope it does save people some time. I know that searching for these kinds of references can be frustrating.

The global variable detection was actually a side-effect... since .ncs files are not .gff files, I just do a full search of the files looking for strings. Since Global Variables are strings within .ncs, they are just as detectable as those scripts called by the ExecuteScript. Likewise, you can also search for tagnames within .ncs files for the same reason (that just now occurred to me...).

Anyway, I apologize somewhat for the command-line format of this utility -- but on the upside, it only took about 4 hours to write. :)
 Darth333
10-04-2004, 8:37 AM
#4
This is great :thumbsup: ( as I already commented at pcgamemods :) ) and as you say this will save us time and frustration...

I'll make a good use of it... once I find time to mod again :(
 tk102
10-04-2004, 10:46 AM
#5
v0.2 released already...

Increased the search speed (greatly) over v0.1.
 MTV2
10-04-2004, 2:45 PM
#6
Aw man is the great:D Real helpful tk102:cool: ;)
 beancounter
10-04-2004, 3:03 PM
#7
Very nice work TK, it will save a lot of time.
 RedHawke
10-04-2004, 8:09 PM
#8
Very cool utility TK! :D

And as others have said it will definately be a timesaver. :)
 tk102
10-04-2004, 9:30 PM
#9
Thank you for the positive responses. Like I said, I'm quite sorry I didn't make it sooner... like back in March. :rolleyes:
Better late than never, I suppose.

For those of you who simply detest command line utilities, I wrapped this one up into an ActiveX object and stuffed it into a simplistic Visual Basic form. You can now download the GUI version from the first post in this thread.
 Darth333
10-05-2004, 5:39 AM
#10
After the programmer who codes faster than his shadow, we now have the programmer who codes faster than lightspeed :p (err..that's about the same I think :D )

Thanks tk102 :)
 tk102
10-06-2004, 12:48 PM
#11
FindRefs GUI v1.1 released.

You can now extract the resource from the .rim/.bif file by double-clicking on it in the results listbox.
 Darth333
10-06-2004, 2:58 PM
#12
Nice one again!

The only thing you forgot is to mention that findrefs is case sensitive ;)
 svцsh
10-06-2004, 3:12 PM
#13
Thanks TK :D Another excellent tool of yours, this will come in handy. Keep it up :)

svцsh
 tk102
10-06-2004, 11:19 PM
#14
The only thing you forgot is to mention that findrefs is case sensitive
Oh, yeah.
Keep it up
Ok.
v1.2 released -- added case sensitivity and partial matching toggles
Screenshot (http://webpages.charter.net/krumsick/kotor/findrefs_gui12.jpg)
:)
 DarthBuzzard
10-06-2004, 11:21 PM
#15
Saveth by a nerf herder! :D

but really, nice stuff :D
 Fred Tetra
10-07-2004, 5:13 AM
#16
You're catching up on the features! ;) Now I have to get the BIF searching done :D
 tk102
10-07-2004, 6:38 AM
#17
I'm glad that we are helping each other reach our full potential. It keeps things interesting.

Edit:
Just realized something -- I had turned off the 'auto increment' of version control when I made v1.2 -- it still says v1.1 in the title bar. Doh! So if you're upgrading from v1.1 to v1.2 and you're not sure which is which, v1.2 has the Partial Match/Case Sensitive checkboxes and v1.1 does not. Sorry about that.
 tk102
10-07-2004, 8:36 AM
#18
FindRefs v0.3 (command line) released.

Adds case sensitivity and partial matching just like the GUI version.

Also adds the ability to search the Tag field in the *.ut* files and expands the search to include *.uti files. (The GUI version does not yet offer that.)

The new command line options are:
-I (search .uti files)
-C (search is case sensitive)
-P (allow partial matching)
 Darth333
10-07-2004, 9:11 AM
#19
Thanks :) This new function will be very useful to verify if our npc, item or placeable has a "clone" somewhere in another module :thmbup1:

Edit: And here are some news concerning findrefs: http://www.starwarsknights.com/)
 tk102
10-07-2004, 12:39 PM
#20
And thank you: for the nice write up in starwarsknights.com and for the suggestion regarding Tags! :D

The GUI will be enhanced with the .uti search/Tag field search tonight.
 tk102
10-08-2004, 11:20 AM
#21
FindRefs GUI 1.3 released.
- Adds .uti to list of file types to be searched
- Adds "Tag" to list of fields searched
- Output more readable, using fixed with font in listbox

FindRefs (command line) 0.4 released.
- Added -q (quiet mode) which makes output more readable when multiple results are found.
 tk102
12-08-2004, 12:29 PM
#22
Updated both the console and GUI versions of FindRefs to fix a bug that ignored .utp-only searches.
 RedHawke
12-08-2004, 5:15 PM
#23
Very cool TK, thanks for the hard work! :D
 Darth333
12-09-2004, 5:01 AM
#24
Thansk again :) I love this utility. It's very useful!
 tk102
12-14-2004, 6:11 PM
#25
FindRefs v2.1 has been released (command-line). The important addition to this utility is the -T option which will extend your search to TLK references as well (ExoLocStrings). Examples of this include Item Descriptions, Area Names, and Dialog text.

So the following command:findrefs -DTq Sleheyron will find all Dialogs that have Sleheyron will return

korr_m35aa_s.rim kor35_yuthuraban.dlg Entry 12 Text
'Let's see... after escaping from Sleheyron I was found by the Jedi. They took me in and trained me eve
n though I was a bit older than most Padawans.'

The -T option slows the search noticeably, especially when used in conjunction with the -D option. However, this function in essence merges my KTLK, DLGSearch, and FindRefs utility in one tool.
 Darth333
12-15-2004, 5:09 AM
#26
Thanks for the hard work tk102 :) . This new feature is going to be very useful. I used FindRefs countless times and now I'm going to loose the count even more :D
 Darkkender
12-15-2004, 6:24 AM
#27
So should we expect this update feature being added to the findrefs gui edition as well sometime soon?
 tk102
12-15-2004, 6:35 AM
#28
Yes you should Darkkender. :)
 Darkkender
12-15-2004, 7:08 AM
#29
Originally posted by tk102
Yes you should Darkkender. :)
:elephant: YES! :sheepdanc
 tk102
12-15-2004, 2:05 PM
#30
FindRefs GUI v2.1 released.

- Added ability to search TLK file references

I added a separate scrolling TextBox to the right of the Listbox to contain the references found. In the case of Dialog and Descriptions, this was necessary to preserve the readability of the results.

I'd recommend uninstalling the old version of FindRefs GUI if you have one. Probably will work either way, but it's safer.


Yay! 1000 posts! 950 of them on this forum!
 tk102
03-12-2005, 3:39 AM
#31
The command line version of this utility has been updated to v3.0.

Two new option switches have been added.

-2 This switch will tell Findrefs to search for TSL files instead of KotOR files.

-f This switch tells findrefs that what follows is a file pattern that will be searched from instead of searching the entire gambit of game files. This can be useful if you know for example that you want search a particular .erf, .rim, or .bif file. Because this switch accepts a value, it should separated from the other switches like so:

findrefs -AqP2 killblaster -f *.bif

The GUI version has not been updated yet to support TSL. I expect to have it updated within the week.
 Darkkender
03-12-2005, 3:41 AM
#32
Originally posted by tk102
The command line version of this utility has been updated to v3.0.

Two new option switches have been added.

-2 This switch will tell Findrefs to search for TSL files instead of KotOR files.

-f This switch tells findrefs that what follows is a file pattern that will be searched from instead of searching the entire gambit of game files. This can be useful if you know for example that you want search a particular .erf, .rim, or .bif file. Because this switch accepts a value, it should separated from the other switches like so:

findrefs -AqP2 killblaster -f *.bif

I guess I should have waited a hour or 2 before crafting my newbit at RPGdot.com. Especially since this is a handy tool.
 tk102
03-12-2005, 3:45 AM
#33
:lol: Or I should've started an hour earlier. Thanks DK. :D
 Darth333
03-12-2005, 10:52 AM
#34
Thanks tk! I think this is the tool I use most often! :)
 tk102
03-12-2005, 1:45 PM
#35
v3.1 released (command line).
Added TemplateResRef as another searchable field for template files (*.ut*)

This should prove helpful to avoid the problems outlined by Darth333 in this (http://www.lucasforums.com/showthread.php?s=&threadid=145353) thread.

An example of how FindRefs can be used to detect the potential for overriding other templates by accident can be seen here. (http://www.lucasforums.com/showthread.php?s=&postid=1774570#post1774570)
 T7nowhere
03-12-2005, 8:08 PM
#36
Thanks man, Now go play TSL!!!
 Mav
03-12-2005, 8:11 PM
#37
^^^
Lol :lol:, agreed.
 tk102
03-13-2005, 3:25 PM
#38
Findrefs GUI v3.1 released

- Added support for TSL files
- Added TemplateResRef as a seached field
- Added NSS files for search/extraction
- Added File Pattern to Search textbox to help speed up search when the resource is known to be in a certain file (wildcards also accepted)


@T7, Mav: Yeah that's on the list. :)
 tk102
03-13-2005, 8:08 PM
#39
v3.2 (command line) released
- Added -N: search .nss files
- Added -v: view output in color

Note that if you are redirecting the output of the findrefs to a file, you should not use the -v switch becuase nothing will be output.
 tk102
03-13-2005, 10:43 PM
#40
v3.2 releaed (GUI)

- Fixed bug where .nss files were not being searched if a file pattern was specified.

- Fixed tab-key selection order so that controls highlight in an intuitive order
 tk102
03-14-2005, 1:53 AM
#41
v3.3 (command line and GUI) released

Command line version
- Fixed a bug where .erf dialogs weren't getting searched correctly

GUI version
- Fixed a bug where .erf dialogs weren't getting searched correctly
- Fixed a bug where .dlg files weren't extracting correctly.
 tk102
03-18-2005, 12:13 AM
#42
Findrefs GUI v3.5 released
A lot of changes:
- Search is non-blocking (you can interact with the form as you search)
- Halt button added
- Feedback textbox added to show search progress
- Results are now displayed as soon as they are found instead of displaying them all at the end
- Seach Timer added
- Added ability to exclusively search for TLK references (now a radio button selection)
- Eliminated duplicated search of .erf files if file search pattern was set.
 Darth333
03-18-2005, 12:20 AM
#43
Perfect! :)
 tk102
03-23-2005, 11:35 PM
#44
Findrefs GUI v3.6 released

- Added file name as a searched criteria.

(You'd think that would've been there before.)
 Darkkender
03-23-2005, 11:45 PM
#45
Originally posted by tk102
Findrefs GUI v3.6 released

- Added file name is a searched criteria.

(You'd think that would be there before.)

It's SOK Tk we don't expect you to be 100% perfect. But thank you for this.
 tk102
04-05-2005, 12:51 AM
#46
GUI v3.7, CmdLine v3.5 released

- Added Conversation to the list of fields searched for .utc, .utd, and .utp searches
 tk102
07-30-2005, 9:56 AM
#47
FindRefs GUI 4.0

- Now searches for .git/.mdl/.mdx/.tpc/.tga files (by filename)

- Toggle filename-only search mode (fast)

- Multiple selection/extraction feature added
 tk102
08-01-2005, 2:00 AM
#48
v4.1

- Bug fix! Version 4.0 had a bug that prevented searches within templates.bif and scripts.bif from being fully searched.
 tk102
03-15-2006, 2:36 AM
#49
FindRefs GUI v4.2 released
- Fixed a bug where some .bif files were being searched twice
- Fixed bug where some resoruces in models.bif/templates.bif/scripts.bif were being reported as found in multiple .bifs
- Updated findrefs.dll to v4.2 to keep .exe and .dll in sync
- DLL now compiled with ActivePerl 5.8.8
 tk102
09-06-2006, 3:46 PM
#50
v4.3 released

Added the ability to search and extract .2da files
If the search term is numeric and TLK references are enabled, FindRefs will now assume the search term is an index into dialog.tlk and will search files accordingly. (For Dashus)


I've included the VB6 source code for the .exe and the Perl source code for the .dll for those interested. I've discontinued support for the command line utility at this point and have removed its link from swk.com.
Page: 1 of 2