PDA

View Full Version : Dialog or script?


sekan
06-20-2007, 04:02 PM
How to i change in a dialog so the first time a npc talk to me it says "who are you?"
But the second time you talk to the npc it's says "so your back".
Do i need to do a script or just change something in the dialog editior?

The Source
06-20-2007, 04:08 PM
How to i change in a dialog so the first time a npc talk to me it says "who are you?"
But the second time you talk to the npc it's says "so your back".
Do i need to do a script or just change something in the dialog editior?
I used Journal Entry states to control this action. When the Exile meets up with an NPC for the first time, the dialouge would check what Journal Entry level you are at.

Example::
When you first activate an NPC's dialouge, the script with check to see if you are below 10. After you finish your first time through the dialouge, you have a script fire off to change to level 11. When you revisit the NPC, any dialouge that activates to a <11 value will not be activated.

I wish I had my scripts, so I can tell you exactly how to do this. Give me a few moments, so I can find it here in the forums.

Quick Edit::
You place the script within the dialouge by using the DLGEditor. Tools Here (http://www.starwarsknights.com/tools.php).

Master Zionosis
06-20-2007, 04:12 PM
Assuming this is for KotOR II, there is already a script in the game files that you can use.

Create two opening dialog node's place the one that says the "who are you?" line first then the "so your back" line second

On the node you only want to appear once (in this case "who are you?") place "c_talkedto" (Without the quotes) in the conditional #1 field in TK-102's dialog editor.

And place "a_talkedtrue" (Without the quotes) in the Script #1 field in TK-102's dialog editor.

Now when the dialog node that the scripts and conditionals are set on that node will only appear the first time you speak to him.

sekan
06-20-2007, 04:14 PM
this is for k1

The Source
06-20-2007, 04:17 PM
Since I used Journal Entries, I chose to have the dialouge scripts test values. When it comes to how KotOR I handles the dialogue, I never tried to create KI mod that tests for instances. Sorry man.

Master Zionosis
06-20-2007, 04:18 PM
this is for k1

Ahh well unfortunatly conditionals in the dialog editor cannot be set for K1. Yes they can. ~tk102

And also to prevent confusion from anyone posting a K2 procedure when your after a K1 way, state in your first post weather it is for K1 or K2, it always helps ;)

tk102
06-20-2007, 04:28 PM
this is for k1
In that case, for the dialog node that you want to be spoken the first time only,
use k_con_talkedto (returns TRUE if you haven't spoken yet) in the "Script that determines availability" and k_act_talktrue (sets the flag that you've talked) in the "Script that fires when spoken".

For an example, look at danm13_shuma.dlg

Pavlos
06-20-2007, 04:34 PM
this is for k1

Same method as master zionosis suggested :). Use k_con_talkedto in the conditional field to check if the player hasn't spoken to the NPC yet and then use k_act_talktrue to set a local variable to tell the game that you have spoken to the NPC - place it in the action script field. Both of these scripts should go in the initial node of your dialogue :).

Edit: Bah! tk beat me to it :xp:

Master Zionosis
06-20-2007, 04:39 PM
I really am not thinking today, lol