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

→‎Conditional Pairs: Editing English, formatting, script logic
imported>Pyrocow2
(→‎Using the GREETING topic: Editing English, script logic)
imported>Pyrocow2
(→‎Conditional Pairs: Editing English, formatting, script logic)
Line 1,009: Line 1,009:


These might take the form
These might take the form
 
<pre>
Response 1: Long Explanation
Response 1: Long Explanation
Response 2: Short Explanation
Response 2: Short Explanation
Line 1,018: Line 1,018:
Response 1: ‘Ah you've found the widget my friend'
Response 1: ‘Ah you've found the widget my friend'
Response 2: ‘You must find the widget my friend'
Response 2: ‘You must find the widget my friend'
</pre>
Let's try this
Add a new variable called MetVilla to the top of the Quest Script (under the quest data tab). We should declare any variables used by the quest in the Quest-type script.


Let's try this
<pre>
SCN BGM001QuestScript
Short DoOnce1
Short MetVilla
 
Begin GameMode
 
If (DoOnce1 == 0)
AddTopic BGMMessage4U
Set DoOnce1 to 1
EndIf


Add a new variable called MetVilla to the top of the Quest Script (under the quest data tab). We need to declare any variables used in results scripts in the quest script . Think of the results scripts as children of the parent quest script. We declare the child-variables in the parent script.
End
</pre>


This is automatically set at zero. We can use the response result box to bump this up to one after speech with this bit of script.
This variable will be automatically set to zero. We can use the response result box to bump this up to one after the speech with a bit of script. Add this in after "AddTopic BGWill".


   Set BGM001.MetVilla to 1
   Set BGM001.MetVilla to 1


Don't forget to click the compile button.
Don't forget to click the compile button!


Summarising the first response
Summarising the first response:
{| class="wikitable" border="1" cellpadding="5"
{| class="wikitable" border="1" cellpadding="5"
!colspan=2| '''GREETING'''
|-
|-
!  TOPIC
!  TOPIC TEXT
|  GREETING
|  GREETING
|-
|-
!  RESPONSE
!  RESPONSE
|   
|   
* 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."
* Your uncle has passed away peacefully in his sleep.
* "Your uncle has passed away peacefully in his sleep."
* I have been asked to look after his last will and testament.
* "I have been asked to look after his last will and testament."
|-
|-
!  CONDITIONS
!  CONDITIONS
| GetStage BGM001==10<br>
|
GetIsID BGVilanusVilla==1<br>
*GetStage 'BGM001' <= 10
'''GetQuestVariable BGM001.MetVilla == 0'''<br>
*GetIsID 'BGVilanusVilla' == 1
*'''GetQuestVariable 'BGM001.MetVilla' == 0'''
|-
|-
!  ADD TOPICS
!  ADD TOPICS
| BGWill
|
*BGWill
|-
|-
!  RESULT SCRIPT
!  RESULT SCRIPT
|  Set BGM001.MetVilla to 1
|
AddTopic BGWill
  Set BGM001.MetVilla to 1
|}  
|}  
We can then add this alternative response info to the GREETING topic
 
 
We can then add this alternative response info to the GREETING topic:
 
{| class="wikitable" border="1" cellpadding="5"
{| class="wikitable" border="1" cellpadding="5"
!colspan=2| '''GREETING'''
|-
|-
!  TOPIC
!  TOPIC TEXT
|  GREETING
|  GREETING
|-
|-
!  RESPONSE
!  RESPONSE
|  Whenever you want to talk about your uncle's will, let me know
"Whenever you want to talk about your uncle's will, let me know."
|-
|-
!  CONDITIONS
!  CONDITIONS
| GetStage BGM001==10<br>
|
GetIsID BGVilanusVilla==1<br>
*GetStage 'BGM001' <= 10
'''GetQuestVariable BGM001.MetVilla == 1'''<br>
*GetIsID 'BGVilanusVilla' == 1
*'''GetQuestVariable 'BGM001.MetVilla' == 1'''
|-
|-
!  ADD TOPICS
!  ADD TOPICS
Line 1,072: Line 1,097:
|  ''No add topic''
|  ''No add topic''
|}  
|}  
The first time we greet him he gives the longer speech, the second time a shorter one.
The first time we greet him he gives the longer speech, the second time a shorter one.


We can now add another multi-line response info to the BGWill topic added by the first response.  
We can now add response info to the ''BGWill'' topic.


Try this one yourself using this summary to guide you.  
Try this one yourself using this summary to guide you.  
Line 1,080: Line 1,107:
You will need to add a new topic called BGHubart.
You will need to add a new topic called BGHubart.
{| class="wikitable" border="1" cellpadding="5"
{| class="wikitable" border="1" cellpadding="5"
!colspan=2| '''BGWill'''
|-
|-
!  TOPIC
!  TOPIC TEXT
BGWill
"My uncle's will"
|-
|-
!  RESPONSE
!  RESPONSE
|   
|   
* Apparently your uncle has some property here in Cyradiil. I am not sure where though.
* "Apparently your uncle had some property here in Cyrodiil. I'm not sure where, though."
* I was expecting a courier to deliver the details but he has not shown up.
* "I was expecting a courier to deliver the details, but she hasn't shown up."
* Captain Hubart of the Chorrol Guard has written to explain the courier did not make it to his Chorrol rendezvous.
* "Captain Hubart of the Chorrol Guard notified me that the courier never made it to her stop in Chorrol."
* You will have to go to Chorrol to check with him what is going on. Here is a copy of his letter.
* "You will have to visit him in Chorrol to find out more about what's going on. Here's the letter he sent me."
|-
|-
!  CONDITIONS
!  CONDITIONS
| GetStage BGM001==10<br>
|
GetIsID BGVilanusVilla==1
*GetStage 'BGM001' <= 10
*GetIsID 'BGVilanusVilla' == 1
|-
|-
!  ADD TOPICS
!  ADD TOPICS
| BGHubart
|
*BGHubart
|-
|-
!  RESULT SCRIPT
!  RESULT SCRIPT
|  SetStage BGM001 20
|
  SetStage BGM001 20
|}  
|}  
Again we have a stage bump, this time to Stage 20
Add to the Quest Stage a journal update


:''I have been told that I may have inherited some property, but the courier carrying the details has gone missing. I will need to go to Chorrol and speak to a Captain Hubart of the Chorrol guard to get more details
Again we have a stage bump, this time to stage 20.
In the Quest Stages tab, add a journal entry for stage 20.
 
''I've been told that I may have inherited some property from my late uncle, but the courier carrying the details has gone missing. I will need to go to Chorrol and speak to a Captain Hubart of the Chorrol Guard to get more information.''


We will also add a Quest Stage Result Script.
We will also add a Quest Stage Result Script.
Line 1,110: Line 1,142:
But first we need to create a prop letter, so we can refer to it in the script.
But first we need to create a prop letter, so we can refer to it in the script.


Again we can create a ‘new' item, but it means trying to add artwork to the game, and unless we want the letter or scroll to look completely unique, and have some talent in that direction, it is a chore we don't need to do.
Again we can create a new item from scratch, but it means trying to add artwork to the game. Unless we want the letter or scroll to look completely unique, and have some talent in that direction, it is a chore we don't need to do.


Instead select any letter from the object/items/books list in the object window, change its ID to something meaningful like ‘BGHubartLetter'  
Instead, select any letter from the Items->Book list in the object window, change its ID to something meaningful like 'BGHubartLetter'.


The text on the right hand side indicates the content of the letter. We can edit this. I will look at the precise details and syntax needed to produce text in  another lesson.  
The text on the right hand side indicates the content of the letter. We can edit this. I will look at the precise details and syntax needed to produce text in  another lesson. It uses standard HTML tags.  
It uses standard HTML instructions.  
For now, the key command is <nowiki><br></nowiki>, which produces a 'line break' or 'new line'. The font face can be left alone.
For now the key command is <nowiki><br></nowiki> which produces a line break, or new line. Leave the font face alone.


'''BGHubartLetter'''
'''BGHubartLetter'''
Line 1,136: Line 1,167:
Captain Hubart
Captain Hubart
</nowiki></pre>
</nowiki></pre>
Save the letter as a new form.
Save the letter, AND MAKE SURE YOU CLICK 'YES' TO CREATE A NEW FORM.
Of course you are free to use your own text instead.
 
Now, type this in the results script box for stage 20:


Now type this in the results script box for Stage 20 and compile it using the button below.
  Player.AddItem "BGHubartLetter" 1


  Player.additem "BGHubartLetter" 1
Then click the "Compile Result" button.


We can also add a new response info to the topic called BGHubart, to direct the player to Chorrol
We can also add a new response info to the topic called BGHubart, to direct the player to Chorrol:
{| class="wikitable" border="1" cellpadding="5"
{| class="wikitable" border="1" cellpadding="5"
!colspan=2| '''BGHubart'''
|-
|-
!  TOPIC
!  TOPIC TEXT
BGHubart (Captain Hubart)
|  Captain Hubart
|-
|-
!  RESPONSE
!  RESPONSE
|  You’ll find him in Chorrol
"You’ll find him in Chorrol."
|-
|-
!  CONDITIONS
!  CONDITIONS
| GetStage BGM001==20<br>
|
GetIsID BGVilanusVilla==1
*GetStage 'BGM001' == 20
*GetIsID 'BGVilanusVilla' == 1
|-
|-
!  ADD TOPICS
!  ADD TOPICS
Line 1,165: Line 1,199:
Try this for yourself. You can always refer to the PLAYTEST version if you get stuck.  
Try this for yourself. You can always refer to the PLAYTEST version if you get stuck.  


We have completed phase one, now we move to Chorrol.
We have completed phase one. Now we move on to Chorrol.


==Chorrol Phase==
==Chorrol Phase==
Anonymous user