PDA

View Full Version : Scripting or Dialog Editor?


backtoTHErep.
08-03-2007, 02:00 PM
New to this forum, and new to KOTOR editing (and practically game editing in general).

Question is: trying to change the dialog (type) for the main character--so no sound. Is that called scripting or dialog, and what program should be downloaded and installed (and how should it be installed--so a particular folder?). Have already downloaded dlgeditor and moved the application to the SWkotor2 folder (in the LucasArts folder which is in the Program Files folder) from the desktop, but it doesn't seem to work. Trying to change one of the most repeated dialog phrases in the game for the main character, so does it have to be changed each time?

Any hep here would be hot (for those very few Jar Jar fans).

Oh, one other thing: this is a PC version of Kotor 2, not a video game.

rgdelta
08-03-2007, 02:15 PM
dialog type are in the dialog or dlg files to extract those files you need to install Kotor tools as the dialogs are in the bif and rim files read this to help you get started http://www.lucasforums.com/showthread.php?t=143421

backtoTHErep.
08-03-2007, 02:38 PM
dialog type are in the dialog or dlg files to extract those files you need to install Kotor tools as the dialogs are in the bif and rim files read this to help you get started http://www.lucasforums.com/showthread.php?t=143421

Appreciated.

Looked at that link already, and downloaded the DLGeditor by tk102 since it seems that what is being attempt to edit is in the dlg files. The DLGeditor was downloaded to the desktop, and then extracted, also to a folder on the desktop. The main application icon was then moved to the SWkotor2 folder next to other icons and files, including the dialog.tlk file. When selected, a window pops up stating that the Kotor 2 dialog.tlk was not detected. Furthermore, when trying to open the files in the Modules folder, the program does not recognize the files there as being dialog files. Does GFF editor need to also be downloaded? Also, say what is trying to be edited (mainly) is the common "be going now." and it is trying to be edited to "'bye." Since that phrase occurs a LOT in the dialog, is there some way to edit all the times it occurs?

rgdelta
08-03-2007, 02:44 PM
No the dlg files are inside those files you need to install Kotor tool so you can extract the dlg files. Kotor tool is the main tool every modder uses as it is the only one that can extract files and other things.

As to what you are trying to do yes they are in the dialog or dlg files in the module bifs and in the erf's-> Modules (I notice you said this is Kotor 2) so you need to install Kotor tools so you can extract those .dlg files from the bifs and erf's (the erf's have the module specific dialogs and the bif has the the general ones like your party).

Hope you understood what I was saying

For Dialog editing here is a good Tutorial http://www.lucasforums.com/showthread.php?t=180845

But before you can do that you need to extract the dlg files and you need Kotor Tool for that in the previous link re-read the section 1. Getting started - KotOR Tool that is the only tool to extract with.

backtoTHErep.
08-03-2007, 02:51 PM
No the dlg files are inside those files you need to install Kotor tool so you can extract the dlg files. Kotor tool is the main tool every modder uses as it is the only one that can extract files and other things.

As to what you are trying to do yes they are in the dialog or dlg files in the module bifs and in the erf's-> Modules (I notice you said this is Kotor 2) so you need to install Kotor tools so you can extract those .dlg files from the bifs and erf's (the erf's have the module specific dialogs and the bif has the the general ones like your party).

Hope you understood what I was saying

For Dialog editing here is a good Tutorial http://www.lucasforums.com/showthread.php?t=180845

But before you can do that you need to extract the dlg files and you need Kotor Tool for that in the previous link re-read the section 1. Getting started - KotOR Tool that is the only tool to extract with.

Once again, appreciated.

Will go and download the Kotor Tool (does the GFF editor also need to be downloaded, and do they have to be downloaded to the SWkotOR2 folder--does the tk102 DLGeditor have to be REinstalled to that folder since it was just moved from the desktop there)?

And, in an attempt to get the DLGeditor to work, right selected one of the module files and chose 'Open with....' then browsed to open with the DLGeditor. Now some of the dlg files have the same icon as the DLGeditor while others have remained there normal paper icon with a picture of a computer window and three blobs of color in the middle. Have the files been corrupted/messed up?

-- Finished downloading and installing the Kotor Tool (C:/ProgramFiles/KotorTool).

It still does not detect the dialog TLK file (which was also right selected with the mouse and changed to 'open with' the DLGeditor, and its icon image has changed to that of the dlgeditor (though it is still a tlk file).

The Tool was used to extract the bif dialog files to the module folder. But where to go from there (should that have even been done?)? Also, when the conversation editing thing (the head) is selected, a window pops up given the option of continuing or stopping the program.

Apologies if this seems very stupid. This kind of stuff is personally very difficult; it's as if there is a neuron disconnect. It just doesn't come naturally much at all.

rgdelta
08-03-2007, 02:54 PM
First you don't need a GFF editor for doing dialogs dlgeditor will do it dlgeditor can be run from any directory I have it in it's own directory it does not install it is a standalone exe.

No the file association you discribe just associates the file to that application in windows for quick opening it does not corrupt or mess up the files.

stoffe
08-03-2007, 03:07 PM
Trying to change one of the most repeated dialog phrases in the game for the main character, so does it have to be changed each time?

Oh, one other thing: this is a PC version of Kotor 2, not a video game.

It depends on how you want to change it if you need to modify all the dialog files where it occurs. If you just want to change the current phrase to something else at all places it's probably quicker to modify the dialog.tlk file which contains all text from the standard game. If, however, you want to change the phrase to something different at each place you'll need to modify all the DLG files.

As mentioned above the DLG files can be found inside the game data, some are global and can be found inside the dialogs.bif, while many others are module/area specific and are found inside the modulename_dlg.erf file associated with the module where the dialog takes place (where modulename is the name of the module file, e.g. 301NAR_dlg.erf for the Nar Shaddaa landing pad area).

The files can most easily be extracted using KotorTool, which requires you to have the Microsoft .NET Framework installed on your computer to function. If you do use KotorTool, keep in mind that its built-in Dialog editor will not work with Kotor 2 DLG files. It will load them, but if you modify and save them with it the files will be ruined.

(You can also use an ERF editor to extract DLG files from the module MOD/ERF/RIM archives, though it won't work with the dialogs inside the BIF files.)

tk102
08-03-2007, 03:19 PM
Kotor tool is the main tool every modder uses as it is the only one that can extract files and other things.The only besides FindRefs (http://www.lucasforums.com/showthread.php?t=137588) you mean. :D

The reason I mention FindRefs is because KotOR Tool's search function is a little odd when it comes to string references within dialogs -- at least I can't figure out how to search for something as simple as "Carth Onasi".

FindRefs will also tell you the dialog node where such references occur, which can be handy when used in conjunction with DLGEditor's Ctrl+G hotkey.

Besides that little bitty, everything rgdelta and stoffe said is right on the money.

rgdelta
08-03-2007, 03:27 PM
lol yeah forgot about findrefs lol I have it and use it but forgot about it in the main tool statement lol

Thanks for mentioning that Stoffe I know how to do it but I don't articulate it that well heh.

backtoTHErep.
08-03-2007, 04:22 PM
"It depends on how you want to change it if you need to modify all the dialog files where it occurs. If you just want to change the current phrase to something else at all places it's probably quicker to modify the dialog.tlk file which contains all text from the standard game. If, however, you want to change the phrase to something different at each place you'll need to modify all the DLG files."

"As mentioned above the DLG files can be found inside the game data, some are global and can be found inside the dialogs.bif, while many others are module/area specific and are found inside the modulename_dlg.erf file associated with the module where the dialog takes place (where modulename is the name of the module file, e.g. 301NAR_dlg.erf for the Nar Shaddaa landing pad area)."

"The files can most easily be extracted using KotorTool, which requires you to have the Microsoft .NET Framework installed on your computer to function. If you do use KotorTool, keep in mind that its built-in Dialog editor will not work with Kotor 2 DLG files. It will load them, but if you modify and save them with it the files will be ruined."

"(You can also use an ERF editor to extract DLG files from the module MOD/ERF/RIM archives, though it won't work with the dialogs inside the BIF files.)"

Appreciated.

Kotor Tool was installed and appears to work--the.NET thing was also downloaded and COULD have been installed (it goes from extracting, to preparing to install, to configuring, above the progress bar it has 'gathering required information' and goes about 40% percent of the way. Then it flickers and comes back for less than a second before disappearing. It is in the control panel's add/remove programs, but it has no size labelled. Also, there is .NET framework 1.1 Hotfix (KB928366) installed, also with no size labelled. There also isn't a remove/change button.

The tool seems to work. The conversations can be edited and saved. (though there isn't confirmation that the files were saved). However, when go back into the game, the edits don't seem to show up. They revert to the original.

Does a new game have to be played for the edits to appear?

Or did the editing simply not work/take hold?
After editing, saving, going onto KOTOR2, and then initiating the dialog--the dialog ends up being the default, then stopping the game, return to KOTOR tool, and look at the dialog. The dialog which was edited has reverted to the original.

-- "its [KOTOR Tool's] built-in Dialog editor will not work with Kotor 2 DLG files. It will load them, but if you modify and save them with it the files will be ruined."

So how are Kotor 2 dlg files modified, saved, and made to work?

Basically all that is being attempted is changing a few words in the game's dialog.

tk102
08-03-2007, 04:37 PM
The tool seems to work. The conversations can be edited and saved.I hope you're referring to DLGEditor here because as stoffe said, KotOR Tool's conversation editor will corrupt KotOR2 dialogs.

The edited .dlg files should be saved in the Override folder (if one doesn't exist in your KotOR2 installation path, create one). Load up a savegame where you can initiate the dialog and you should be able to see your edits.

What you are seeing when you reopen KotOR tool is the original .dlg file still tucked inside its .erf. The extracted file is the one you are editing.

stoffe
08-03-2007, 04:40 PM
Kotor Tool was installed and appears to work--the.NET thing was also downloaded and COULD have been installed

If KotorTool starts then the Framework either installed properly, or you already had it installed since before. KotorTool wouldn't run at all without the .NET Framework installed, you'd just get a message that KotorTool.exe failed to initialize properly when you clicked the icon. :)


The tool seems to work. The conversations can be edited and saved. (though there isn't confirmation that the files were saved). However, when go back into the game, the edits don't seem to show up. They revert to the original.

Where did you save the DLG files you modified? In the override folder? In the ERF file you extracted them from (if a module-specific dialog)?


Does a new game have to be played for the edits to appear?


No, dialogs are static resources that aren't stored in the savegame, changes to them should take effect immediately.


So how are Kotor 2 dlg files modified, saved, and made to work?

You'll have to extract them (using KotorTool, ERF/RIM Editor or FindRefs) to some place on your hard drive and then use tk102's DLG Editor to modify them. It is capable of handling Kotor 2's dialog format properly, unlike the Conversation Editor in KotorTool which only supports Kotor 1 DLG files.

backtoTHErep.
08-03-2007, 05:20 PM
I hope you're referring to DLGEditor here because as stoffe said, KotOR Tool's conversation editor will corrupt KotOR2 dialogs.

The edited .dlg files should be saved in the Override folder (if one doesn't exist in your KotOR2 installation path, create one). Load up a savegame where you can initiate the dialog and you should be able to see your edits.

What you are seeing when you reopen KotOR tool is the original .dlg file still tucked inside its .erf. The extracted file is the one you are editing.

Actually, did use KotOR Tool's conversation editor. Luckily, the modifications didn't seem to take purchase. Your DLGEditor (v. 2.3.0). was also tried. But so far haven't been able to get the program to bring up one segment of already-made dialog, including the dlg files (i.e. atton.dlg). The program does not recognize any file in the module and data files as a dialog file. Also, there's the thing about it not detecting the dialog.tlk file, which IS there, in the same folder. If a conversation dlg file could be opened in the DLGEditor, would use it, but so far what has been accomplished is making conversations from scratch.


Can you explain more about loading up a savegame? And the dialog change is for dialog that takes place after the savegame (this could be very stupid, so be kind; need more explanation, remember).

tk102
08-03-2007, 05:25 PM
Also, there's the thing about it not detecting the dialog.tlk fileWell the dialog.tlk is essential for getting DLGEditor to work. You shouldn't need to move the dialog.tlk out of the KotOR2 main folder. Note that if you have only KotOR2 installed, and not KotOR, you will see a message saying no KotOR dialog.tlk (which you can ignore.)

Here's an excerpt from dlgeditor_readme.txt regarding DLGEditor's behavior:Upon startup DLGEditor will attempt to locate dialog.tlk files for both KotOR
and TSL. If it detects both files, startup will occur without any message box.
If only one of the two dialog.tlk files is found, a message box will appear
indicating this and suggesting that you choose File: Change TLK File Paths...
(Ctrl+T) to manually select the missing TLK file if necessary. If neither
dialog.tlk file is found, DLGEditor will bring up the
[File: Change TLK File Paths...] dialog box immediately. If the user is not
able to specify the location of at least one dialog.tlk, DLGEditor will exit.
(If you are trying to work completely offline on a fully custom dialog with no
dialog.tlk references, simply fool DLGEditor by renaming any file to dialog.tlk
and pointing DLGEditor at it for both KotOR and TSL paths.) The current
dialog.tlk file is always displayed in the lower left corner of the lower panel.
Can you explain more about loading up a savegame?When you launch KotOR2 you get the option of "New Game" or "Load Game"... I'm referring to the latter, where you load a game near the point in the game where you can test the dialog.

backtoTHErep.
08-03-2007, 05:26 PM
If KotorTool starts then the Framework either installed properly, or you already had it installed since before. KotorTool wouldn't run at all without the .NET Framework installed, you'd just get a message that KotorTool.exe failed to initialize properly when you clicked the icon. :)

It was removed (both) and reinstalled.



Where did you save the DLG files you modified? In the override folder? In the ERF file you extracted them from (if a module-specific dialog)?


Using the Kotor Tool, the files were (they came under the bif selection, then dialog, then the files were selected and the conversation editor came up) saved by replacing their originals. It didn't seem to work.


No, dialogs are static resources that aren't stored in the savegame, changes to them should take effect immediately.

Apparently it didn't save then.



You'll have to extract them (using KotorTool, ERF/RIM Editor or FindRefs) to some place on your hard drive and then use tk102's DLG Editor to modify them. It is capable of handling Kotor 2's dialog format properly, unlike the Conversation Editor in KotorTool which only supports Kotor 1 DLG files.

Ahhhh.... Things could be becoming clearer now. Will go try to use KotorTool and save the extractions to someplace.

backtoTHErep.
08-03-2007, 05:40 PM
Have extracted the bif files using KotorTool to the desktop, and have opened a file using DLGEditor. The list of dialog comes up.

However, how can the text be edited? In the box on the right with the selected sentence, the text is not being deleted, nor is typed text being put in.

How is this done?

And is it normal for the program to move kind of slowly and the font to be small? No offense intended. This computer could be old or not up to running things which use a lot of....the things computers use to run fast.

stoffe
08-03-2007, 05:52 PM
However, how can the text be edited? In the box on the right with the selected sentence, the text is not being deleted, nor is typed text being put in.

Text the DLG Editor fetches from the dialog.tlk file is displayed in a dimmed down box since it won't edit it directly. To edit the text, select it in the box, copy it (CTRL-C) and then change the value in the StrRef field (just above the text box) to -1 to disconnect the text from dialog.tlk and store the text internally in the DLG file. The text box should now be writeable, and you can paste the text (CTRL-V) you just copied back into the box to edit it.

After you are done editing click on another node in the dialog tree view to make sure everything is committed before you save, and then save your modified file in either the override folder, or into the module ERF file you extracted it from (unless it was a global dialog). To do the latter you'll need to use an ERF editor, the DLG Editor will only save the DLG files to your hard drive directly.

The override folder is usually preferable since it's easier, but if you do this you'll need to watch out for naming conflicts. If there are dialog files in different modules that are named the same, and you put one of them in the override folder, it will replace the DLG files with that name in all modules (which is trouble if the files are named the same but have different content). You can use FindRefs to detect naming conflicts, or put the DLG files back into the module data directly to avoid the conflicts entirely.


And is it normal for the program to move kind of slowly and the font to be small?

You can change Screen Resolution in the Mode menu. This will make the text bigger or smaller. (You may need to restart the DLG Editor after changing resolution for it to take effect.)

Depending on the size of the dialog file you edit the DLG Editor can be fairly slow.

tk102
08-03-2007, 05:53 PM
However, how can the text be edited? In the box on the right with the selected sentence, the text is not being deleted, nor is typed text being put in. How is this done?
Put a -1 in the StrRef field. This will make it customizable.


- StrRef: If this value is 0 or greater, this value is a pointer to a
dialog.tlk entry. If the value is -1, then the text is stored
within the .dlg file itself (so most custom dialogs will have -1 in
this field).

- Text: The text to be spoken. This will be a read-only field if StrRef is
not -1.



And is it normal for the program to move kind of slowly
Yes, unfortunately, for large dialogs it is. Sorry about that. You can improve performance a little by choosing Edit: Disable Undo (or toggle it by pressing Ctrl+Shift+Z).

and the font to be small?
Mode: Screen Resolution will help with that (but you'll have to relaunch DLGEditor to see the effect)

backtoTHErep.
08-03-2007, 06:13 PM
rgdelta; tk102; stoffe;

Appreciated for your help. Have gotten the dialog edited (at least one line).

And for all of you being so patient. It is quite a rarity when questions asking over the internet about computer things actually get answered. As stated, sort of stupid when it comes to things such as this.

tk102, very much appreciated for making the program in the first place.

tk102
08-03-2007, 06:21 PM
No problem backtoTHErep.. I hope modding the game ends up being as fun as playing the game for you. :)

rgdelta
08-03-2007, 06:24 PM
Great to hear you got things going. Thanks I try to help as much as I can I know how to do things but I don't articulate them well to people learning so I tried :-)

And yes tk102 along with Fred Tetra (creator of Kotor Tool) are my favorite people (along with everyone else at holowan labs. :-))