PDA

View Full Version : Question about Dialogs


Guts2
09-11-2005, 02:41 PM
Hello, I have a mod question, again :bounce1:.
I have writen some new Dialogs for Kotor1. And now I want to know how to bring them in the Game. The Dialogs have some starting Scrips. But what must I do so the Character starts the Dialog? Pleas Help me again

Lando Griffin
09-11-2005, 02:52 PM
i think u put the file u edited into ur override.

stoffe
09-11-2005, 04:51 PM
The Dialogs have some starting Scrips. But what must I do so the Character starts the Dialog? Pleas Help me again

That depends on how you want the dialog to be started. When you click on the character or when the character sees you, or something else?

If if it's an ordinary conversation that starts when you click on a non-hostile character you just assign the name of the conversation file (without the .DLG suffix) in the Conversation field in the creature template. Verify that the character has an OnDialogue AI script assigned in their template as well.

If it's the character who is supposed to initiate the conversation when they spot you the easiest way is probably to give them a custom OnNotice/Perception script which initiates conversation when the player is seen. I think something like this would work as a perception script:

void main() {
object oSeen = GetLastPerceived();
if (!GetLocalBoolean(OBJECT_SELF, 40)
&& GetLastPerceptionSeen()
&& (GetCurrentAction() != ACTION_MOVETOPOINT)
&& (oSeen == GetFirstPC()))
{
ActionMoveToObject(oSeen, TRUE, 3.0);
ActionDoCommand(SetLocalBoolean(OBJECT_SELF, 40, TRUE));
ActionStartConversation(oSeen);
}
else {
ExecuteScript("k_ai_master", OBJECT_SELF, 1002);
}
}

cry_of_paine
09-11-2005, 04:57 PM
If I'm reading this right, you want to have the character initiate the conversation right? I'm not sure how it works with the random ones - the ones that pop up saying "so and so seems distant, maybe you should talk to them". But you can also have a dialog initiated by a trigger. I'm not sure if that would work for you or not. It's area specific, so it's good if you want it to occur at a specific time/place. Otherwise, it wouldn't work.

Actually, looking at the dialogs and script for those kind of "random" conversations, those look like they're triggered as well. I'm not sure how that works, whether specific locations will trigger that prompt, or if there are different kinds of triggers. I haven't done anything with triggers yet.

brwarner
09-12-2005, 07:08 PM
I'm not sure if this is more of a module creation question but I made a new NPC in a room and assigned them a dialog and the told it to run a script in the PC response and instead of it starting a conversation something flashes on the screen really quick and the script activates.

tk102
09-12-2005, 07:13 PM
@brwarner: Usually you want the script to fire right before or right after a PC response.
Try attaching the script to an empty Entry node that responds to your PC response, or on an Entry node that precedes your PC's response. :)

brwarner
09-12-2005, 07:34 PM
After obsrving the response more I found what flashed on the screen was the entry text like when you talk to insegnifigant people and what they say just pops up in a little box. How do I change it to do an actual conversation not just a pop up.

tk102
09-13-2005, 11:34 AM
The pop up box is a normal conversation, but it is one that is terminating immediately. I dialog type of conversation that has at least one Reply following the first Entry. In DLGEditor and KotOR Tool's Conversation Editor, these should appear as branches in the treeview. Could it be that you have Conditional scripts attached to the Reply branch? If so, that could be why your conversation is aborting after the first Entry.

Guts2
09-14-2005, 03:26 PM
I want that Bastila or one of the other NPC┤s get new Dialogs. My Problem is that my Game is in German and the Dialog Editor make┤s some very bad errors because of this. This is the reason I write some new Dialogs so I don┤t have to change the old Dialogs.
And now I want the Bastila starts this new Dialog

Darth_Pavel
09-14-2005, 04:39 PM
My Problem is that my Game is in German and the Dialog Editor make┤s some very bad errors because of this.What type of Dialog Editor are you using? Freds', tk102s' or some other type?

tk102
09-14-2005, 05:47 PM
My Problem is that my Game is in German and the Dialog Editor make┤s some very bad errors because of this.
Assuming you mean DLGEditor...

If you mean problems with characters such as ÷ being displayed strangely, this has been fixed as of v2.1.7. Also be sure you have set the correct language settings using the Mode: Language Settings menu item.

The latest version can be downloaded here (http://www.starwarsknights.com/tools.php).
And you can critique DLGEditor directly in this (http://www.lucasforums.com/showthread.php?s=&threadid=135639) thread if you like. :)