Jump to content

Home

Different dialog


Recommended Posts

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.

Link to comment
Share on other sites

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:

 

dlgexample1.jpg

 

So your .dlg file will look something like this:

 

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. :)

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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, [color=Yellow]12[/color], TRUE);
}

 

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

 

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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, [color=Yellow]12[/color], TRUE);
}

 

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

 

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?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...