PDA

View Full Version : Tools for searching for dialogs


tk102
03-20-2004, 05:32 PM
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 (http://www.pcgamemods.com/5279)
DLGSearch command-line tool (http://www.pcgamemods.com/5277/)

tk102
03-21-2004, 05:47 AM
Rather than switch between GUI and console all the time, I created a console version of the TLK search tool.

You can use the -? argument to see the options.

KTLK - Command line TLK search tool. (http://www.pcgamemods.com/5279/)

Weiser_Cain
03-21-2004, 06:08 AM
Awww, I was hoping for a gui package.

Juriel
03-21-2004, 08:40 AM
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...

tk102
03-21-2004, 04:18 PM
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 (http://www.perldoc.com/perl5.8.0/pod/perlre.html).


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?

Darth333
03-24-2004, 01:50 PM
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.

tk102
03-24-2004, 04:56 PM
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...

Darth333
03-24-2004, 05:09 PM
Right, this is exactly what happened. I did not capitalized the "M". Don't know why i didn't think of that.

Darth333
03-24-2004, 07:19 PM
Oh! I forgot. Just to let you know that I wasn't able to use the cursor to scroll down. Only the arrow keys. (I'm using Windows XP).

Darth333
03-26-2004, 12:56 PM
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!

tk102
03-26-2004, 03:10 PM
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.

tk102
04-25-2004, 07:14 PM
Hmm, I guess I never officially anounced the release of DLGEdit...

DLGEdit is a text-based dialog editing tool available here (http://www.pcgamemods.com/5853/).

Darth333
04-25-2004, 10:24 PM
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. :)

tk102
04-25-2004, 10:55 PM
Thank you for the positive feedback. I appreciate that you're able to test it out for me (and for your improvement suggestions). I think I'll just keep this thread for updates to dialog tools.

tk102
04-29-2004, 02:39 AM
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.

Obex
04-29-2004, 09:32 AM
very cool work tk102.

now i can go in and change mission's age to 18 so i dont feel like such a creep.

tk102
04-29-2004, 10:33 AM
Let me guess, you have Mission is wearing some "custom" attire.

messkell
04-29-2004, 11:10 AM
hmmm, doesn't mission state her age in one of her .wav files?
You might want to change that too.

however, I foresee the selkath authority busting someone for a "no-no" :)

tk102
05-12-2004, 12:27 AM
DLGEdit v0.0.3.0 released
Added AnimList to Entry menu.

Darth333
05-12-2004, 12:38 AM
Originally posted by tk102
DLGEdit v0.0.3.0 released
Added AnimList to Entry menu.

Just tried it. Good job! :) (as always)

tk102
05-12-2004, 12:41 AM
I guess the logical extension of this is to try it out in the ReplyList as well...

tk102
06-24-2004, 12:50 AM
DLGEdit v0.0.3.5 available at pcgamemods (link (http://www.pcgamemods.com/5853/)).

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