PDA

View Full Version : Dialogue Problems


darkwarrior
09-03-2005, 10:25 PM
I don't know if this is just a problem I'm missing through lack of experience or what. I'm using TK's DLG editor (Ive also used KOTOR tools editor) to try and alter some dialogue from a scene.

For some reason though, whenever I edit it, when it comes to the points in the dialogue for reactivating the script to continue, it restarts the script from scratch instead of continuing like it does with the unedited dialogue file.

Is it the editors Im using or anything else that can be taken care of?

I will post the dialogue in a moment once it is uploaded.

EDIT: http://dbzcenter.com/~ssv/sioncut.dlg

This is untouched, I won't bother posting the altered since the mod crashes using it. I only want to add a few lines in there which means massive editing using hte GUI since adding a node adds it underneath as a seperate entity instead of adding it to the current branch.

Darth333
09-04-2005, 12:52 AM
Before editign the dialogue with tk's editor , did you saved it with Kotor tool? If so, it's already too late as KT does noty support a number of fields in TSL's .dlg files.

You have to extract the dialogue with either Kotor tool without opening it or by using tk102's findrefs ( http://www.starwarsknights.com/tools/php )

Dak Vesser
09-04-2005, 06:31 AM
If so, it's already too late as KT does noty support a number of fields in TSL's .dlg files.


What's really odd is that if you re-open it in the GFF editor and save it again, it seems to get fixed, unless Kotor Tool already errored when you tried to press save.

I have have a very strange method. I always write the dialogue sentences in Kotor Tool, because it updates it fast. Then I'll save it and re-open it in GFF editor just to save it again, that way when I re-open it in Kotor Tool, It won't error when I save after writing more entries. When I'm done writing everthing I need, I'll save it and open it in TK's Dialog editor so I can start linking all the child lines with the parents and injecting the scripts. The reason I do this is because TK's Dialog editor runs way too slow on my*old* computer to do it all..

It's just strange method I got used to...

stoffe
09-04-2005, 07:07 AM
What's really odd is that if you re-open it in the GFF editor and save it again, it seems to get fixed, unless Kotor Tool already errored when you tried to press save.

I have have a very strange method. I always write the dialogue sentences in Kotor Tool, because it updates it fast. Then I'll save it and re-open it in GFF editor just to save it again, that way when I re-open it in Kotor Tool, It won't error when I save after writing more entries. When I'm done writing everthing I need, I'll save it and open it in TK's Dialog editor so I can start linking all the child lines with the parents and injecting the scripts. The reason I do this is because TK's Dialog editor runs way too slow on my*old* computer to do it all..


That would work fine if you create a new dialog, but not so fine if you edit an existing dialog file. A lot of new TSL fields will be stripped when you save the dialog file with KotorTool's conversation editor, and any values set in those fields will be lost.

Here's a screenshot (http://img123.imageshack.us/img123/4861/dialogstripped1qy.jpg) to demonstrate the problem. The file on the left shows one of the entries in a dialog file, and what fields it contains. The file on the right is exactly the same file showing the same dialog entry, the only difference is that it has been opened and saved in the KotorTool Conversation editor.

As you can see, quite a few fields have vanished...

darkwarrior
09-04-2005, 03:11 PM
I extracted it in KOTOR but I edited with KOTOR Tool so I can see where the problem is arising.

I tried using TK102's GUI editor but I'm not sure if thats any better.

Darth333
09-04-2005, 11:01 PM
If you extract the dialogue without opening it and edit it with tk102's editor you'll be fine.

What happens is that Kotor 2 allows you to pass parameters from a dialog to a script and Kotor tool's editor does not allow you to do this. If you ever open and save a .dlg file with kotor tool, even if you do not edit it, you'll loose all those fields. Since most conditional scripts that determine the availability of an entry/reply use those fields, you end up messing the .dlg files unless you use tk102's editor. Example:

If one of the pc replies is available only if your pc has a certain item , the dialogue will likely call c_hasitem.ncs which is as follow:

int StartingConditional()
{
string sTag = GetScriptStringParameter();
if ( GetIsObjectValid( GetItemPossessedBy( GetFirstPC(), sTag))) return TRUE;

return FALSE;
}

and the item is only specified in the .dlg file:

darkwarrior
09-05-2005, 04:37 PM
Ok, I'm using TK's and extracting through Kotor tool.

I think however I've localised where my problem lies. The script itself (here (http://dbzcenter.com/~ssv/a_sion_cs.nss)) uses a switch/case.

Now if I edit the dialogue one of two things can happen. It either resets to the beginning after a certain point while it stays at teh same point in the dialogue file and moves forward eventually finishing but doing it in an awful way.

OR

The 'jump to next module' part in case 4 (Ignore those in 3 and 5 I was just trying to see if they'd make it work) won't fire. So somewhere along the line I'm missing something that passes the right paramater to make it hit the right case to jump to the next module.

Problem is, I cannot see any corresponding values at least in the dialogue editor. Any idea what I'm missing?

Darth333
09-05-2005, 05:06 PM
Problem is, I cannot see any corresponding values at least in the dialogue editor. Any idea what I'm missing?
You should see the values at Entry 0 (case 0 ), Entry 9 (case 1), Entry 12 (case 2) and Reply 11 (case 4). Example: http://img.photobucket.com/albums/v144/Darth333/siondlg.jpg

I have colored the parts of the script that correspond to the above pic (btw, your link doesn't work):

void main() {
int nParam1 = GetScriptParameter(1);
object oDarthSion = GetObjectByTag("DarthSion", 0);
object oNihilus = GetObjectByTag("nihilus", 0);
switch (nParam1) {
//{snip}
case 2:
ActionPauseConversation();
DelayCommand(2.0, SetLightsaberPowered(oDarthSion, 1, 1, 1));
//blablablaetcetcetc...

To find references to a script in the game, you can use tk102's findrefs. It will point you out at the exact .dlg entries/replies: http://img.photobucket.com/albums/v144/Darth333/findrefss.jpg

darkwarrior
09-07-2005, 07:15 PM
Ok I finally sorted it, thanks to your advice guys. Tahnks a lot.

I just want to ask one more question while I'm here. In the dialogue GUI i'm setting cameras but it obeys some and ignores others and I can't tell why. Any ideas?

Darth333
09-07-2005, 07:23 PM
What are you chenging? Camera ID or Camera Angles?

If you change the camera ID, you have to select a valid camera. For more details on cameras and camera angles, check this thread: http://lucasforums.com/showthread.php?t=145924

darkwarrior
09-07-2005, 07:25 PM
Yeah they're valid cameras, the one I want to use for a certain node worked once but now it doesn't, it shows Sion from the side instead of head on and it seems to default to this camera when ever anyone is talking or being talked to even though I removed the 'speaker' tag.

darkwarrior
09-07-2005, 09:40 PM
Ok sorry about this, really but one more, and I think, definetly final problem.

Where I've bolded, I'd like Nihilus to talk to Sion one final time before Sion limps away. Now the problem is that to jump to the right area in the script you need to use the case number.

Since this is taking place before actions, it can't jump properly so the obvious thing to do is to place the actions I want to happen in Case 3. But for some reason the nifty effect I have on Sion, where Sion has the death animation and effect death applied doesn't work. With these on, when I call 'Cancel All Actions' he collapses convincingly and quickly before struggling back up to continue his path.

It only works if it stays in the same case.

It might not be impossible but I imagine its something you need to get your head around. Its that or just make a sacrifice somewhere, either in conversation or having it take place earlier. That or sacrifice the collapse animation which I think works great in the scene.

I think the problem is that the conversation makes Sion stand up from his death animation. I tried using a seperate dialogue file but unfortunately when the first one ends to go back to the cut-scene, it reverts to the PC until the next dialogue fires.

Is there any way to resolve it ruining this animation or do I just have to make a sacrifice somewhere?



DelayCommand(14.8, AssignCommand(oDarthSion, ActionPlayAnimation(26, 1.0, (-1.0))));




DelayCommand(15.0, ApplyEffectToObject(0, EffectDeath(0, 1, 0), oDarthSion, -1.0));







DelayCommand(25.0, AssignCommand(oNihilus, ActionDoCommand(SetFacing(180.00))));

DelayCommand(27.0, SetDialogPlaceableCamera(24));
///////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////


//END OF ATTACK///////////////////////////


DelayCommand(35.0, SetDialogPlaceableCamera(24));

DelayCommand(38.0, AssignCommand(oDarthSion, ActionMoveToObject(GetObjectByTag("Kreia", 0), 0, 6.0)));

DelayCommand(42.0, ClearAllActions());


DelayCommand(43.6, SetDialogPlaceableCamera(18));

DelayCommand(44.0, AssignCommand(oDarthSion, ActionMoveToObject(GetObjectByTag("Kreia", 0), 0, 6.0)));

DelayCommand(46.0, SetDialogPlaceableCamera(26));

DelayCommand(50.0, ClearAllActions());
DelayCommand(49.0, ActionResumeConversation());
DelayCommand(48.0, SetGlobalFadeOut(0.1, 2.0, 0.0, 0.0, 0.0));


}
break;

/////////////////////////////////////////////////////////////////////////////////

case 3:


break;

/////////////////////////////////////////////////////////////////////////////////

case 4:
ExecuteScript("a_cleanup", OBJECT_SELF, 0xFFFFFFFF);
DelayCommand(0.2, StartNewModule("601DAN", "", "", "", "", "", "", ""));
break;

/////////////////////////////////////////////////////////////////////////////////

case 5:
break;
}
}