Difference between revisions of "A beginner's guide, lesson 6 - Quest Dialogue"

→‎Using the GREETING topic: Editing English, script logic
imported>Pyrocow2
(→‎Stage Update: Editing English, tables)
imported>Pyrocow2
(→‎Using the GREETING topic: Editing English, script logic)
Line 952: Line 952:
==Using the GREETING topic==
==Using the GREETING topic==


Another way to pass on information via dialogues is to use the GREETING topic. If you remember the discussion in lesson four about how conversations work, all dialogues begin with a GREETING, which is selected by the game from the GREETING topic.  
Another way to pass on information via dialogues is to use the GREETING topic. If you remember the discussion in Lesson 4 about how conversations work, all dialogues begin with a GREETING, which is selected by the game from the GREETING topic.  
If we add our own greeting and set the right conditions we can force a start to a dialogue.  
If we add our own greeting and set the right conditions we can force a start to a dialogue.  
In the topics tab select Right Click-Add and add GREETING. This already exists so you will not need to create a new topic when the list appears.
In the topics tab add GREETING. This topic already exists, so you will not need to create a new topic when the list appears.


We can now add Vilanus Villa's little speech.  
We can now add Vilanus Villa's little speech.  
This is quite a long response so we should split it up.
This is quite a long response so we should split it up to reduce the amount of text that appears on the screen at any given time.  
This reduces the amount of text that appears on the screen at any one time.  
Add this response first to the GREETING topic. Note this is blank because there are no GREETING responses added by this quest yet.
Add this response first to the GREETING topic. Note this is blank because there are no GREETING responses added by this quest yet.


:''Hello, my name is Vilanus Villa and I've been looking for you. I'm afraid I have some bad news
''Hello, my name is Vilanus Villa and I've been looking for you. I'm afraid I have some bad news.''


Now click OK to add the response.
Now click OK to add the response.


Then in the center response details box, not the upper info box, right click and add a new response. You'll get a new interface to write in.
Then in the ''Response Details'' box (not the upper info box), add a new line of response text. You'll get a new interface to write in.


:''Your uncle has passed away peacefully in his sleep.
''Your uncle passed away peacefully in his sleep.''


Then add another
Then add another:


:''I have been asked to look after his last will and testament
''I have been asked to look after his last will and testament.''


We can go adding new lines to this response info if we wish. In the top box we can see the number of responses increments to 3. The text appears in the top box as:
We can go on adding new lines to this response info if we wish. In the top box we can see the number of responses increments to 3. The text appears in the top box as:


''
''Hello, my name is Vilanus Villa and I've been looking for you. I'm afraid I have some bad news. || Your uncle passed away peacefully in his sleep. || I have been asked to look after his last will and testament.''
Hello, my name is Vilanus Villa and I've been looking for you. I'm afraid I have some bad news || Your uncle has passed away peacefully in his sleep. || I have been asked to look after his last will and testament.''


With the || indicating separate lines of this single response.


With the || indicating the separate lines of this single response info
We need to add some conditions, to control who says these lines. This is very important when using the GREETINGS topic as this is so wide spread within the game. While it is silly that every character could respond to ''BGMMessage4u'', it is dangerous to have an unconditional greeting, as this might override every other greeting in the game and prevent other quests from working properly.
 
We need to add some conditions, to control who says these lines. This is very important when using the GREETINGS topic as this is so wide spread within the game. While it is silly that every character could respond to BGMMessage4u, it is dangerous to have an unconditional greeting as this might override every other Greeting in the game and prevent other quests from running as intended.


Limiting a response to just one character is easier than using groups.  
Limiting a response to just one character is easier than using groups.  


We can use the GetIsID function.  
We can use the [[GetIsID]] function for this.  


We need to have an NPC reference which is why we built BGVilanusVilla first. We will also restrict this response to the opening stage of our quest.
We need to have an NPC reference, which is why we built ''BGVilanusVilla'' first. We will also restrict this response to the opening stage of our quest.


* '''GetStage BGM001==10'''
* '''GetStage 'BGM001' <= 10'''
* '''GetIsID BGVilanusVilla==1'''
* '''GetIsID 'BGVilanusVilla' == 1'''


Now we want to add a new topic called BGWill. However, there is an issue (and many thanks to Hecks for pointing this out) when adding topics to the GREETING or indeed any existing Bethesda topic. For technical reasons, the topic might not get added if more than one plug-in is attempting to use GREETING to add a topic.
Now we want to add a new topic called ''BGWill''. However, there is an issue (and many thanks to Hecks for pointing this out) when adding topics to the GREETING or indeed any existing Bethesda topic. For technical reasons, the topic might not get added if more than one plug-in is attempting to use GREETING to add a topic.
I'll be honest and say I don't know why this happens. It's not difficult to work around once you know the issue exists. When I found out it took me thirty seconds in the CS to fix.
I'll be honest and say I don't know why this happens. It's not difficult to work around once you know the issue exists. When I found out it took me thirty seconds in the CS to fix.


First create a new topic which we can reference called BGWill (Right Click, etc).  
First create a new topic called ''BGWill''.  


Now add this by now familiar script function to the result script for this info response.
Now add this to the result script for the GREETING response.


  AddTopic BGWill
  AddTopic BGWill
Line 1,005: Line 1,002:
The speech that Villa gives contains a lot of exposition, and we don't want to force the player to repeat this every time.  
The speech that Villa gives contains a lot of exposition, and we don't want to force the player to repeat this every time.  


We can stop this by setting up what I call a conditional pair of responses.
We can stop this by setting up a pair of conditional responses.


==Conditional Pairs==
==Conditional Pairs==
Anonymous user