Difference between revisions of "A beginner's guide, lesson 6 - Quest Dialogue"
A beginner's guide, lesson 6 - Quest Dialogue (edit)
Revision as of 03:58, 29 July 2010
, 03:58, 29 July 2010→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. | |||
<pre> | |||
SCN BGM001QuestScript | |||
Short DoOnce1 | |||
Short MetVilla | |||
Begin GameMode | |||
If (DoOnce1 == 0) | |||
AddTopic BGMMessage4U | |||
Set DoOnce1 to 1 | |||
EndIf | |||
End | |||
</pre> | |||
This | 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 | ||
| | | | ||
GetIsID BGVilanusVilla==1 | *GetStage 'BGM001' <= 10 | ||
'''GetQuestVariable BGM001.MetVilla == 0''' | *GetIsID 'BGVilanusVilla' == 1 | ||
*'''GetQuestVariable 'BGM001.MetVilla' == 0''' | |||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | | ||
*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 | ||
| | | | ||
GetIsID BGVilanusVilla==1 | *GetStage 'BGM001' <= 10 | ||
'''GetQuestVariable BGM001.MetVilla == 1''' | *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 | 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 | ||
| | | "My uncle's will" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | | ||
* Apparently your uncle | * "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 | * "I was expecting a courier to deliver the details, but she hasn't shown up." | ||
* Captain Hubart of the Chorrol Guard | * "Captain Hubart of the Chorrol Guard notified me that the courier never made it to her stop in Chorrol." | ||
* You will have to | * "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 | ||
| | | | ||
GetIsID BGVilanusVilla==1 | *GetStage 'BGM001' <= 10 | ||
*GetIsID 'BGVilanusVilla' == 1 | |||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | | ||
*BGHubart | |||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| SetStage BGM001 20 | | | ||
SetStage BGM001 20 | |||
|} | |} | ||
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 | 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 | 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 | 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 | |||
'''BGHubartLetter''' | '''BGHubartLetter''' | ||
Line 1,136: | Line 1,167: | ||
Captain Hubart | Captain Hubart | ||
</nowiki></pre> | </nowiki></pre> | ||
Save the letter | Save the letter, AND MAKE SURE YOU CLICK 'YES' TO CREATE A NEW FORM. | ||
Now, type this in the results script box for stage 20: | |||
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 | ||
| | | Captain Hubart | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| You’ll find him in Chorrol | | "You’ll find him in Chorrol." | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
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 | We have completed phase one. Now we move on to Chorrol. | ||
==Chorrol Phase== | ==Chorrol Phase== |