Jump to content

Advanced Dialogue


GayLeonianNerd

Recommended Posts

Generally, yes, the engine tests it's way down the list of topics until it finds the first one where all the conditions on the topic are "true". It then checks the conditions of the various responses available under that topic in the same manner.

 

If you are referring to how to only have certain responses available once certain conditions are met, then that is usually done by setting some condition's "test variable" to an initial "false" value in your quest script and then to "true" when appropriate. The response then becomes available when that "test variable" is "true", usually in an "IF ... THEN" statement.

 

Please see the 'Dialogue & Lip-synch' section of the wiki "Getting started creating mods using GECK" article. There are several tutorials in various formats on the basic and advanced forms of dialog.

-Dubious-

Link to comment
Share on other sites

Could someone show me an example of a "test variable"? I'm having a hard time wrapping my head around the concept. And how one would be used in dialogue? I've reviewed Caesar's Dialogue to figure out how the devs did it.

I did find this, however, in the quest script.

 

int FirstMeeting ;# = number of valid reactive statements said
Might this be what I'm looking for?
Edited by GayLeonianNerd
Link to comment
Share on other sites

"Test variable" is a general term for any variable you (or the game engine) create for the purpose of saving a value for later testing in a "conditional statement" like an "IF ... THEN ... ELSE" structure.

 

A common use would be a variable you create (such as "CurrQuestStep") with the current intermediate "quest stage" value. (The variable name is not important. You choose it for suitability to remind you of it's purpose.) The "SetStage" command has no effect if called with a StageIndex that doesn't exist in the specified quest, so you might want to test if some necessary sub-step has been completed that is not a "quest stage index". So when you complete a "QuestStage" and use the "SetStage" command, you might then use "GetStage" to initialize your test variable "CurrQuestStep". After the necessary sub-step has been completed (entered a building, picked up a note, triggered an activator, whatever), you then update your test variable "CurrQuestStep" in some fashion (such as increment by one). You would then test the value of "CurrQuestStep" to determine if a particular dialog response should then be available.

 

This is just as example; similar in nature to the use of "X-Markers" in the "Tip: Random NPC Comments" under "Dialogue & Lip-synch" in the wiki "Getting started creating mods using GECK" article. There "GetDistance to that XmarkerRef" would be stored in a similar "test variable".

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

Actually there is no condition field for topics that would cover every new "info" initial response under it. The condition field on that page is specific to each info that is highlighted. However the condition field on the first tab "Quest Data" will act as an umbrella for anything within that quest.

 

You could put conditional statements in the result script (begin/end) fields ... but these would only keep code after them from executing. And maybe the begin field would keep a line from being said ... but might as well just use the condition field for that. Result scripts are typically only used to execute commands , which function pretty much like a "Begin OnActivate" script. 1 prior to the dialogue , and 1 post dialogue.

 

The response field where it says you can add a new response , is not for giving multiple choice response.

It is only for extending a response when you need more than the 150 char limit.

And functions under all the other pertinent info to its initial response. Except of course adding the voice/lip file and any animations.

Edited by Mktavish
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...