Difference between revisions of "A beginner's guide, lesson 7 - Using Scripts in Quests"

Jump to navigation Jump to search
→‎At the Cottage: Changing the responses
imported>Pyrocow2
(→‎At the Cottage: Changing the scripts)
imported>Pyrocow2
(→‎At the Cottage: Changing the responses)
Line 30: Line 30:
We have seen how to use a limited amount of scripting to progress our quest. While there is loads more dialogue to include in this part of the quest, we will focus far more on the use of scripting.  
We have seen how to use a limited amount of scripting to progress our quest. While there is loads more dialogue to include in this part of the quest, we will focus far more on the use of scripting.  


===At the Cottage===
==At the Cottage==


We cannot rely on dialogue to progress our quest because the courier is dead.
We cannot rely on dialogue to progress our quest because the courier is dead.
Line 106: Line 106:


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
!colspan=2| '''BGCluesFound'''
|-
|-
!  TOPIC
!  TOPIC TEXT
|   
"Clues"
* BGCluesFound
|-
|-
!  RESPONSE
!  RESPONSE
|   
"I recognize this amulet! It bears the mark of a gang of thieves that call themselves the Red Rose Brigade."
* I recognise this amulet. It belongs to a gang of thieves called the Red Rose Brigade
|-
|-
!  CONDITIONS
!  CONDITIONS
|   
|   
* GetIsId  BGCptHubart == 1
* GetIsId  'BGCptHubart' == 1
* GetStage BGM001 == 50
* GetStage 'BGM001' == 50
|-
!  OPTIONS
|
*Say Once
|-
|-
!  ADD TOPICS
!  ADD TOPICS
Line 125: Line 128:
|-
|-
!  RESULT SCRIPT
!  RESULT SCRIPT
|
|
* (none)
<pre>
Player.RemoveItem "BGPartialLetter" 1
Player.RemoveItem "BGEmbossedAmulet" 1
Player.RemoveItem "BGCourierKey" 1
</pre>
|}
|}
The script simulates Cpt. Hubart taking the clues and key from us. The "Say Once" option should be checked because we only want this dialogue and script to run once (obviously), but our condition checks won't ensure that as is. We haven't changed the stage or anything like that.
If the player only has one of the clues, this response will be available:
{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
!colspan=2| '''BGCluesFound'''
|-
|-
!  TOPIC
!  TOPIC TEXT
|   
"Clues"
* BGCluesFound
|-
|-
!  RESPONSE
!  RESPONSE
|   
"I need more to work with."
* I need more clues to work with.
|-
|-
!  CONDITIONS
!  CONDITIONS
|   
|   
* GetIsId  BGCptHubart == 1
* GetIsId  'BGCptHubart' == 1
* GetStage BGM001 < 50
* GetStage 'BGM001' == 40
* GetQuestVariable 'BGM001.HasAmulet' == 1 ''OR''
* GetQuestVariable 'BGM001.HasPaper' == 1 ''OR''
|-
|-
!  ADD TOPICS
!  ADD TOPICS
|   
''No add topic''
* (none)
|-  
|-  
!  RESULT SCRIPT
!  RESULT SCRIPT
* (none)
''No script''
|}
|}
This is the first time we've checked the ''OR'' flag on a condition. If any of the ''OR'' conditions are true, we basically get a TRUE for that entire set of ''OR'' conditions. So if the player has either the amulet or the paper, the stage is 40, and the actor is Cpt. Hubart, this response will show up. The ''OR'' statements by themselves would also work if we had BOTH of the objects (both would be true), but because we already would have changed the stage to 50 in that case, the stage condition here fails and eliminates the response. (50 != 40)


For the Red Rose topic add this response and add a new topic called BGSmith.
For the Red Rose topic add this response and add a new topic called BGSmith.


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
!colspan=2| '''BGRedRose'''
|-
|-
!  TOPIC
!  TOPIC TEXT
|
| "Red Rose Brigade"
* BGRedRose (Red Rose Brigade)
|-
|-
!  RESPONSE
!  RESPONSE
|   
|   
* They are a nasty bunch led by a couple of villains called Blair and Brown.
* "They're a nasty bunch led by a couple of villains named Blair and Brown."
* I know they have a secret hide out in the mountains.
* "They have a hideout in the mountains."
* Your best bet is to talk to an ex gang member by the name of Smith.
* "If you want to find them, your best bet is to talk to an ex-member named Smith."
* I am surprised. I never took Brown for a killer.
* "I'm surprised... I never took Brown for a killer."
|-
|-
!  CONDITIONS
!  CONDITIONS
Line 176: Line 190:
|-
|-
!  RESULT SCRIPT
!  RESULT SCRIPT
|   
''No script''
* (none)
|}
|}


Line 185: Line 198:


{| border="1" cellpadding="5"
{| border="1" cellpadding="5"
!colspan=2| '''BGSmith'''
|-
|-
!  TOPIC
!  TOPIC
|   
"Smith"
* BGSmith (Smith)
|-
|-
!  RESPONSE
!  RESPONSE
|   
|   
* Yeah, he quit the gang a while back. you'll find him hanging out at the Aleswell Inn.
* "Yeah, he quit the gang a while back. you'll find him hanging out at the Aleswell Inn."
* He's partial to a drop of Brandy. That might help loosen his lips.
* "He's partial to a drop of brandy. Here, this might help loosen his lips."
* I take back the cottage key and hold on to this document.
|-
|-
!  CONDITIONS
!  CONDITIONS
|   
|   
* GetIsId BGCptHubart  == 1
* GetIsId BGCptHubart  == 1
* GetStage BGM001 == 50
* GetStage BGM001 == 50
|-
|-
!  ADD TOPICS
!  ADD TOPICS
|   
''No add topic''
* BGRedRoseBrigade
|-
|-
!  RESULT SCRIPT
!  RESULT SCRIPT
|   
|   
<pre>Player.Additem "PotionCyrodiilicBrandy" 1
<pre>
Player.RemoveItem "BGPartialLetter" 1
Player.Additem "PotionCyrodiilicBrandy" 1
Player.RemoveItem "BGCourierKey" 1
SetStage BGM001 60
Player.RemoveItem "BGEmbossedAmulet" 1
</pre>
SetStage BGM001 60</pre>
|}
|}


Line 218: Line 228:
Add this to the Stage 60 journal entry.
Add this to the Stage 60 journal entry.


''I should travel to Aleswell and talk to ex Red Rose Gang member Smith. He may be able to help me locate the gangs hide out''
''I should travel to Aleswell and talk to ex Red Rose Gang member Smith. He may be able to help me locate the gangs hide out''


==Aleswell Phase==
==Aleswell Phase==
Anonymous user

Navigation menu