Jump to content

Home

Tools for searching for dialogs


tk102

Recommended Posts

I don't have the NWNToolset, so I may be reinventing the wheel, but...

 

A lot of times modders need to find a certain .dlg file in order to insert a script into the game. Maybe you know some keywords that are normally found in the dialog. Here are two tools that make it easier to find that dialog.

 

The first is a TLK search/edit tool that I made a couple months ago. It's not quite as fast as Nerwen's TLKEdit tool, but it provides some search features that the other lacks. Plus you can jump to a specific dialog entry, which is handy if you want to lookup a certain resref.

 

The second tool is a command line app that allows you to search for a specific dialog entry among the rim module files and template.bif file.

 

Here's an example of how you might use these tools:

 

Say you want to tweak Canderous' Ebon Hawk dialog so he gives you more stims. You know he normally says something like "I think you've got enough there" blah blah. So you can open up kotorTLK.exe and enter 'enough there' into the search phrase. You find that entry number is 2406.

 

Now at the command line you can use the other tool by typing

dlgsearch 2406
After a bit of searching, it lists
templates.bif : k_hcan_dialog : Entry 15

 

So now you can go tweak the dialog as you like, dump it in the Override folder and there you go.

 

KotorTLK search/edit tool

DLGSearch command-line tool

Link to comment
Share on other sites

These are very cool programs, making modifying existing dialog much easier. I was getting tired of cross-referencing all the time to see if I was in the correct entry.

 

Not to say that I wouldn't like an actual graphical dialog editor...

Link to comment
Share on other sites

Just wanted to mention something about the search-pattern field used in KotorTLK and KTLK. These are perl regular expressions, and as such, you can build more complex searches than just simple word phrases.

 

Oh, and it's case sensitive.

 

You can find more info on using regular expressions in perl here.

 

 

Briefly though, the most useful metacharacters are:

  • '.' - matches any character
  • '*' - match zero or more times
  • '+' - match one or more times
  • '\\' - escape a metacharater
  • '?' - match 1 or 0 times
  • '()' - grouping; treat as unit
  • '^' - start anchor
  • '$' - end anchor

 

Examples:

ktlk --find Bastila.*Carth --max 2

 

10180: Bastila is dead, Carth. Malak killed her.

16478: I'm sorry, Bastila, but I couldn't just let Carth be tortured!

ktlk --find ^Hey --max 2

 

382: Hey, over here! By the door. Come talk to me.

2043: Hey, you started this.

ktlk --find Can.*now\?$ --max 2

 

3247: Resignation: You have no idea, master. No idea at all. Can we please go and shoot something now?

11595: Can I ask you if anything is happening now?

Link to comment
Share on other sites

Nice work TK102!

 

Just a few comments concerning the TLK search/edit tool:

1. It was not a big problem since I was able to use the arrow keys but the scrolling bar (or whatever you call that in English) doesn't work for me.

 

2. Something strange happened to me: i tried searching various entries and had not problem until I tried searching "maybe later" for my Yuka Laka small mod. The maybe later dialogue was not in the results. there was only another line "No, maybe later " which was not what i was searching for.

 

Apart this, thanks for finally giving us tools with search functions.

Link to comment
Share on other sites

Darth333:

 

In Windows XP, Perl/Tk scrollbars do not bind to the mousewheel effectively. The scrollbars should still be dragable using the cursor however. Hopefully this will be fixed soon.

 

Remember that the search pattern is case sensitive so you could try "Maybe later" or "aybe later" to find more results. (Or if you're really fancy: "[M|m]aybe later".)

 

Btw, your English is very fluent...

Link to comment
Share on other sites

Just a little more feedback : I used your TLK search/edit tool a couple of times now and i just want to let you know that sometimes i can scroll down using the cursor and other times it seems to be completely blocked.

 

But even with this, your the LK search/edit tool is very practical and saves me a lot of time!

Link to comment
Share on other sites

KotorTLK is a rusty tool that should be sharpened up. I wrote originally just for my own use.

 

Actually nowadays I just use the ktlk command line tool. No quirky controls that way. Plus you can go right to dlgsearch after you get what you're looking for from ktlk.

Link to comment
Share on other sites

  • 5 weeks later...
Originally posted by tk102

Hmm, I guess I never officially anounced the release of DLGEdit...

 

Not to my knowledge. Would be worth a new thread!

 

Update: Apr 25, 2004 -- Added "output to text file" functionality.

 

Nice addition to your DLGedit: allowed me to spot bad references in the entry/reply list of a dlg file very quickly. :)

Link to comment
Share on other sites

DLGEdit Update: v0.0.2.1

 

- Fixed bug: Test Drive would not latch up on the first StartingList entry that

had no script requirement.

- Fixed bug: Trying to edit the Script requirement for EntriesList and RepliesList

would cause the script's resref to be entered into the Index field instead of the

Active field.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

DLGEdit v0.0.3.5 available at pcgamemods (link).

 

Added the ability to modify ConversationType and ComputerType in the General Properties.

 

ConversationType: 0=Normal, 1=Computer

 

ComputerType: 0=Normal, 1=Old-style

(if ConversationType=1).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...