Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Different dialog

Page: 1 of 1
 Mindtwistah
05-13-2007, 3:06 PM
#1
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
#2
Someone please?
 Master Zionosis
05-15-2007, 11:47 AM
#3
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
#4
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, 1:07 PM
#5
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, 1:15 PM
#6
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, 1:21 PM
#7
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, 1:22 PM
#8
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, 1:48 PM
#9
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, 2:00 PM
#10
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, 2:17 PM
#11
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, 2:19 PM
#12
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, 3:19 PM
#13
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?
Page: 1 of 1