Difference between revisions of "A beginner's guide, lesson 7 - Using Scripts in Quests"
Jump to navigation
Jump to search
A beginner's guide, lesson 7 - Using Scripts in Quests (edit)
Revision as of 10:05, 31 July 2010
, 10:05, 31 July 2010→Aleswell Phase: Redoing this section.
imported>Pyrocow2 (Changing topic name. Unecessary and conflicts with the faction name.) |
imported>Pyrocow2 (→Aleswell Phase: Redoing this section.) |
||
Line 230: | Line 230: | ||
==Aleswell Phase== | ==Aleswell Phase== | ||
This is the last section prior to the big show down. We want to set up a disposition based dialogue in which Smith, once he likes you enough, will give you the location and key to the hidden Red Rose Brigade cave system. | |||
We need to create | We need to create: | ||
* Hideout Key | * Hideout Key | ||
Line 239: | Line 239: | ||
* The Cave system (if you are not using the base files) | * The Cave system (if you are not using the base files) | ||
First we want set up our NPC. | First we want set up our NPC. | ||
I used a member of the Thieves Guild as a base. I stripped out his AI, but I left him as a faction member of the Thieves Guild. This will help fellow guild members get a bit of a boost to their disposition. | |||
I | I have chosen Aleswell as the location for this part of the quest because it is actually a lousy location to use. Aleswell is the setting for an interesting Miscellaneous Quest. In this quest all the inhabitants of the town are invisible. If the user has completed this quest before they load this mod, there will be no problem. However, if this is the first time a player has entered the inn, they will find themselves immediately involved in this quest. We need to make sure our mod interacts with this quest. | ||
We could use some scripts (see lesson 8) to make Smith invisible along with the rest of the citizens. But, as is so often the case, the simplest solution is to just brush over it with a quick bit of dialogue. | |||
We can set up a GREETING for Smith. Here we use the quest stage for the miscellaneous quest called MS47 Zero Visibility. This is the stage where the people of Aleswell become visible. | |||
We can set up a GREETING for Smith. Here we use the quest stage for the miscellaneous quest called MS47 | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
!colspan=2| '''GREETING''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | GREETING | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | "This is so weird. Everyone here is invisible. I came here to blend in with the crowd.. just my luck." | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
* GetIsId BGMSmith == 1 | * GetIsId 'BGMSmith' == 1 | ||
* GetStage MS47 < 50 | * GetStage 'MS47' < 50 | ||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topic'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | ''No script'' | ||
|} | |} | ||
Line 288: | Line 281: | ||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
!colspan=2| '''BGRedRose''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | "Red Rose Brigade" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | "Hey, I'm done with them. That's all I have to say about that." | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
* GetIsId | * GetIsId 'BGMSmith' == 1 | ||
* GetDisposition < 90 | * GetDisposition [TARGET] < 90 | ||
|- | |||
! OPTIONS | |||
| | |||
*Info Refusal | |||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
Line 307: | Line 303: | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | ''No script'' | ||
|} | |} | ||
The "Info Refusal" flag will make sure that the topic text does not get grayed out, so that the player knows there is still more information available for that topic. | |||
As long as the disposition to the player is less than 90, Smith will give us the brush off when we talk about the Red Rose Brigade. | As long as the disposition to the player is less than 90, Smith will give us the brush off when we talk about the Red Rose Brigade. | ||
Somehow we will need to get that disposition up. If the PC is a member of the | Somehow we will need to get that disposition up. If the PC is a member of the Thieves Guild, that will help. We can also bribe the NPC or play the disposition game with him. Of course if the player is good with speech craft, that will also get them a bonus. However, I have deliberately set the threshold high because I want to use the brandy idea we set up in Chorrol. | ||
=== | ===Using choices in dialogue=== | ||
To do this we will set up a bit of dialogue where the player can choose give Smith some brandy. | |||
First, create the choice topics: BGBrandyYes, and BGBrandyNo. | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
!colspan=2| '''BGBrandyNo''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | "No, sorry." | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | "Aw, that's a shame..." | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
* GetIsId | * GetIsId 'BGMSmith' == 1 | ||
* GetStage BGM001 == 60 | * GetStage 'BGM001' == 60 | ||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topics'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | ''No result script'' | ||
|} | |} | ||
This is just a simple piece of dialogue. | |||
The "Yes" choice will be more complicated. We will have to check the player's inventory to see if they have any brandy, and if they do, run a script to change the player's disposition. | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
!colspan=2| '''BGBrandyYes''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | "I sure do. Here, have some!" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | "Wonderful! Uh.. what? Oh no! Has the brandy turned invisible, too?!" | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
* GetIsId | * GetIsId 'BGMSmith' == 1 | ||
* GetStage BGM001 == 60 | * GetStage 'BGM001' == 60 | ||
* | * '''GetItemCount 'PotionCyrodiilicBrandy' == 0 (RUN ON TARGET)''' | ||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topics'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | ''No result script'' | ||
|} | |} | ||
The | This is the response that the player will get if they have no brandy. You MUST check the "Run on Target" box for the [[GetItemCount]] condition in order for this to work. Otherwise, the GetItemCount will check the Smith NPC's inventory! (The player is the target in this case.) | ||
Before making the next response, quickly go back the Smith NPC that you dropped in AleswellInn. Open up the details for the one you dropped - the reference, not the base NPC itself - and name it ''BGMSmithREF''. The ''Persistent Reference'' box should also be checked already. | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
!colspan=2| '''BGBrandyYes''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | "I sure do. Here, have some!" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | "Wonderful! Cheers!" | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
* GetIsId | * GetIsId 'BGMSmith' == 1 | ||
* GetStage BGM001 == 60 | * GetStage 'BGM001' == 60 | ||
* | * '''GetItemCount 'PotionCyrodiilicBrandy' >= 1 (RUN ON TARGET)''' | ||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topics'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | | ||
<pre> | <pre> | ||
BGMSmithREF.ModDisposition Player 15 | |||
Player.RemoveItem "PotionCyrodiilicBrandy" 1 | |||
</pre> | |||
|} | |} | ||
The ModDisposition function will simply increase the NPCs disposition towards the player by 15. Then one bottle of brandy will be taken from the player's inventory. Then we'll set up the dialogue that leads to these two choices: | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
!colspan=2| '''BGBrandy''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | "Brandy" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | "Yeah, I love the stuff. Have you any to spare?" | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
* GetIsId | * GetIsId 'BGMSmith' == 1 | ||
* GetStage BGM001 == 60 | * GetStage 'BGM001' == 60 | ||
|- | |||
! CHOICES | |||
| | |||
*BGBrandyYes | |||
*BGBrandyNo | |||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topics'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | ''No result script'' | ||
|} | |} | ||
By a combination of speech craft, factions, bribes disposition games and brandy gifts the Player should be able to raise the disposition to 90 eventually. This will trigger the next bit of dialogue and send us towards the quest climax. Return to the BGRedRose topic and add this | The ''Choices'' list is right under the ''Add Topics'' list. Add the choice topics in the same way you would add an add topic in. | ||
By a combination of speech craft, factions, bribes disposition games and brandy gifts the Player should be able to raise the disposition to 90 eventually. This will trigger the next bit of dialogue and send us towards the quest climax. Return to the BGRedRose topic and add this: | |||
{| border="1" cellpadding="5" | {| border="1" cellpadding="5" | ||
!colspan=2| '''BGRedRose''' | |||
|- | |- | ||
! TOPIC | ! TOPIC | ||
| | | "Red Rose Brigade" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | | ||
* Ok, the truth is I've fallen out with the gang. They've threatened to kill me for leaving. | * Ok, the truth is I've fallen out with the gang. They've threatened to kill me for leaving." | ||
* You look like you can take care of them. | * "You look like you can take care of them." | ||
* Watch out for Blair he | * "Watch out for Blair, though, he's a nasty bit of work." | ||
* | * "I'll mark the hideouts location on your map. And here's my old key... I hope it still works." | ||
* Mind you I | * "Mind you, I'm surprised at Brown. He was a decent chap when I was in the gang..." | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
* GetIsId | * GetIsId 'BGMSmith' == 1 | ||
* GetStage BGM001 == 60 | * GetStage 'BGM001' == 60 | ||
* GetDisposition >= 90 | * GetDisposition [TARGET] >= 90 | ||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topic'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
Line 679: | Line 463: | ||
Drop in a MapMarker and give it a Suitable reference name like BGCaveMapMarker. | Drop in a MapMarker and give it a Suitable reference name like BGCaveMapMarker. | ||
Journal entry | Journal entry: | ||
''Smith has given me a key for the Red Rose Brigades hideout. I should go to the hideout and see if I can recover my uncle's | ''Smith has given me a key for the Red Rose Brigades hideout. I should go to the hideout and see if I can recover my uncle's key and house deed.'' | ||
Result Script: | |||
<pre> | |||
ShowMap BGCaveMapMarker</pre | Player.Additem "BGHideoutKey" 1 | ||
ShowMap BGCaveMapMarker | |||
</pre> | |||
==Red Rose Hideout Phase== | ==Red Rose Hideout Phase== |