Jump to content

Home

Question about Dialogs


Guts2

Recommended Posts

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

Link to comment
Share on other sites

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);
   }
}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

And you can critique DLGEditor directly in this thread if you like. :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...