Jump to content

Home

Question about Journal and Dialog


pablo_fett

Recommended Posts

Hi,

 

I read Darth333's tutorial on Journal editing, and everything went really well. But now I'm trying to change the dialog with an NPC depending upon which stage of the quest the PC is in. For example:

 

This NPC wants me to do something for him. 10 indicates that I have heard the quest, 20 indicates that I have done the thing, 30 indicates that I have told him and finished the quest.

 

Upon first meeting:

"Hey, maybe you could help with these 2 things."

After this meeting:

"Have you done the thing I've asked?"

After telling him I did the thing:

"Hey thanks again for doing that thing."

 

How do I make sure the node that appears is the correct one for the stage?

 

Thanks for any help.

Link to comment
Share on other sites

Hi, which game is this for? Rule #8

 

(It makes a big difference when talking about scripting conditionals for dialogs.)

 

For KotOR1, you'll have to write individual scripts that check specific values of the journal and return TRUE or FALSE.

 

Example:

int StartingConditional() {
 return (GetJournalEntry("my_quest_name")==10);
}

 

For TSL, you can write a generic script that you use multiple times but just change the P1 parameter in DLGEditor.

 

Example:

int StartingConditional() {
 return (GetJournalEntry("my_quest_name")==GetScriptParameter(1));
}

or even more generic (to use for different plots) by making use of String Param in DLGEditor

int StartingConditional() {
 return (GetJournalEntry( GetScriptStringParameter() )==GetScriptParameter(1));
}

Link to comment
Share on other sites

So your dialog would appear something like this in DLGEditor (with conditionals turned on)

[+]<myquest0> Hey I've got a quest for you...

[+]<myquest10> I've told you what you need to do already...

[+]<myquest20> Oh you've finished the quest! Great!

[+]<myquest30> Thanks for your help with the quest.

And myquest0.nss would be

int StartingConditional() {
 return (GetJournalEntry("my_quest_name")==0);
}

And myquest10.nss would be

int StartingConditional() {
 return (GetJournalEntry("my_quest_name")==10);
}

And myquest20.nss would be

int StartingConditional() {
 return (GetJournalEntry("my_quest_name")==20);
}

And myquest30.nss would be

int StartingConditional() {
 return (GetJournalEntry("my_quest_name")==30);
}

Link to comment
Share on other sites

Glad you asked. :) 16 characters is the limit not including the file extension. The same goes for the Tag and any other resource reference you come across.

 

Well, the Tag can technically be 32 characters in length (unless they removed the engine limit from NWN), but it's usually a good idea to set it to the same as the resource/file name unless you have a very good reason not to. :p

 

Resource names should also only contain alphanumerical characters or underscores (a-z, 0-9, _) to work properly.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...