PDA

View Full Version : Different dialog


Mindtwistah
05-13-2007, 03:06 PM
How do I make this:

I walk to a NPC and start a dialog:

Hello there (NPC)

Hi (PC)

The dialog ends.
I talk to the npc again but now the dialog is different:

Hello again (NPC)

You still here? (PC)


So the dialoge will be different after you like asked the npc what his name is.

Or so it will be different dialouges for your party members after every level up.

Mindtwistah
05-15-2007, 10:14 AM
Someone please?

Master Zionosis
05-15-2007, 11:47 AM
I recently wanted to do a similar thing to this with my Kreia's Mechanical Hand Mod.

What you can do is set a global so if the dialog line has been spoken already it'll move onto the next line in the .dlg file, like below:

http://i121.photobucket.com/albums/o226/masterzionosis/dlgexample1.jpg

So your .dlg file will look something like this:

http://i121.photobucket.com/albums/o226/masterzionosis/dlgexample2.jpg

Remember to put "c_local_notset" in the "Conditional #1" box and "a_local_set" in the "Script #1".

And also remember the "Hello again" line must not have "c_local_notset" or "a_local_set" in any of the script or conditional boxes.

Any more help just ask. :)

stoffe
05-15-2007, 12:11 PM
Be careful what local variable indexes you use to set values on NPCs though, depending on how those NPCs are used. Some indexes are used by the AI scripts and may not be reliable to use for other things unless the NPC has no AI scripts assigned.

(If the NPC is a party member bear in mind that the game also uses some local variable indexes to keep track of dialog stages and other plot related info.)

Mindtwistah
05-15-2007, 01:07 PM
Umm... my dlgeditor don't have all that options.
It looks like this:
http://i186.photobucket.com/albums/x164/Mindtwistah/th_DLGeditor.jpg (http://i186.photobucket.com/albums/x164/Mindtwistah/DLGeditor.jpg)


Mod note: Changed image to clickable thumbnail to prevent page stretching. ~M

Master Zionosis
05-15-2007, 01:15 PM
You need to click the line in the dialog that you will attach the script and conditional to, like in my picture.

ChAiNz.2da
05-15-2007, 01:21 PM
Umm... my dlgeditor don't have all that options.
It looks like this:

Is your NPC for K1 or K2?

Only K2 (TSL) has conditionals available to be set for dialogs. If it is for K2, then you need to change the mode in tk102's DLGEditor to TSL. Make sure there is a check mark next to it.

I can't tell from your screenie if it's tk's editor or Fred's... though I'd recommend tk's..

Make sure you have the latest version (2.3.0) here:
http://www.starwarsknights.com/tools.php#de

Also, keep in mind.. if it is for K2, DON'T use Fred's KotOR Tool for dialogue editing. It'll muck things up ;)

EDIT: Duuuuh... If I had actually looked at the bottom of your taskbar I would've known.. :xp: Definitely check to make sure you have your mode set to TSL if it's for K2...

stoffe
05-15-2007, 01:22 PM
Umm... my dlgeditor don't have all that options.
It looks like this:


I'd guess you're trying to edit a KOTOR1 dialog, while master zionosis' screenshot shows a KOTOR2:TSL dialog. The DLG files contain a lot more features in TSL than in the first game.

It's always helpful to say which game you are working on when asking a question to get relevant help. :)

Since KOTOR1 does not support dialog parameters to scripts you'll need to make a separate script for each situation where you want to make a dialog branch only appear once, like:


// ST: Action script to run to set that a dialog node has been accessed.
void main() {
SetLocalBoolean(OBJECT_SELF, 12, TRUE);
}



// ST: Conditional script to check if the above dialog node has not been accessed.
int StartingConditional() {
return !GetLocalBoolean(OBJECT_SELF, 12);
}


Where the yellow number need to be unique for each such script pair if the NPC has multiple dialog branches that should only be accessible once.

Keep in mind that the local variable index range is much smaller in KOTOR1 than in TSL as well, when picking numbers. If you pick an out-of-range index it will always return FALSE no matter what when you check for its value.

Mindtwistah
05-15-2007, 01:48 PM
Wohoo... To much info to take in at once :P Can't say I understand scripts...
So, do I insert the script in a node? And where should I insert the second?

Pavlos
05-15-2007, 02:00 PM
In this situation would it not just be better to use the global scripts? Why do more work than you have to? I know, I know, I'm being lazy again.

For KotOR I: place "k_act_talktrue" in the script to run for your initial line of "Hello there." Also add in "k_con_talkedto" to the conditional field.

Same thing for KotOR II only the script to run is "a_talktrue" and the conditional is "c_talkedto."

I couldn't help noticing that the "Frequently used script functions" thread, which includes the script names for adding dark side or light side points does not include these scripts - perhaps a moderator could add them?

stoffe
05-15-2007, 02:17 PM
In this situation would it not just be better to use the global scripts? Why do more work than you have to? I know, I know, I'm being lazy again.

For KotOR I: place "k_act_talktrue" in the script to run for your initial line of "Hello there." Also add in "k_con_talkedto" to the conditional field.


They only work once for one particular NPC. If you have multiple branches of dialog you only want to be available to pick once you'll need your own scripts in KOTOR 1.

But if you only need one controlled dialog branch I agree it is preferable to use those standard scripts.

Pavlos
05-15-2007, 02:19 PM
They only work once for one particular NPC. If you have multiple branches of dialog you only want to be available to pick once you'll need your own scripts in KOTOR 1.

Ah, I didn't realise that he wanted to do multiple nodes. Apologies if I confused anyone - I should really learn to pay more attention when reading through things.

Mindtwistah
05-15-2007, 03:19 PM
I'd guess you're trying to edit a KOTOR1 dialog, while master zionosis' screenshot shows a KOTOR2:TSL dialog. The DLG files contain a lot more features in TSL than in the first game.

It's always helpful to say which game you are working on when asking a question to get relevant help. :)

Since KOTOR1 does not support dialog parameters to scripts you'll need to make a separate script for each situation where you want to make a dialog branch only appear once, like:


// ST: Action script to run to set that a dialog node has been accessed.
void main() {
SetLocalBoolean(OBJECT_SELF, 12, TRUE);
}



// ST: Conditional script to check if the above dialog node has not been accessed.
int StartingConditional() {
return !GetLocalBoolean(OBJECT_SELF, 12);
}


Where the yellow number need to be unique for each such script pair if the NPC has multiple dialog branches that should only be accessible once.

Keep in mind that the local variable index range is much smaller in KOTOR1 than in TSL as well, when picking numbers. If you pick an out-of-range index it will always return FALSE no matter what when you check for its value.


Where do I put the first and the second script? Which node?