Advanced Quest Tutorial


This tutorial is designed to pick up and add onto where the Quest Tutorial left off. It will also provide some alternative ideas and values compared to those used in the first Quest Tutorial. It should also be noted that this tutorial will assume that the individual already has the skills needed to duplicate items, create worldspaces, and exteriors without causing unnecessary changes to existing objects already in Oblivion.

Decide on your QuestEdit

A quest idea should be approached as a logical progression of occurences in a story line. A haphazard approach will at best be semi-entertaining and at worst be boring or confusing to the player. For purposes of this tutorial, I am going to use part of a quest I wrote involving a mysterious group of mages that disappeared when the Imperial Battlemage, Jagar Tharn, usurped the throne from the Emperor, Uriel Septim VII.

Creating the props for your QuestEdit

Our first step is going to be the creation of the physical items involved in the quest which consist of:

  • A key which will open a door
  • An NPC to give us information leading us on the quest

I chose a random key and edited the ID. When you close the box for the key it will ask "Create a new form?" at which point I clicked "Yes" to create a new instance of a key that I can alter however I wish without altering some other object in the game. Next, I edited the new form of the key that I just made and checked the Quest Item box, gave it a new Name, and then closed the box again. We now have a key to use in the quest.

Rather than creating a new NPC like was done in the Quest Tutorial, I chose to take an existing MGMageScholar NPC and duplicate her since I am going to be dropping her into The Arcane University in the Imperial City. I did the same things for the NPC that I did with the key, with the exception that when I opened up the new form of the NPC, I also changed the facial characteristics of the NPC to create an NPC that didn't look like a clone of the original one. Additionally, since the NPC is not going to be a quest item, I did not check the Quest Item box on the NPC.

Creating your QuestEdit

Next on our list is creating a new quest. Open up the Quest window and right-click in the EditorID section of the window, then click New. A box will pop up with the title New Form Editor ID. This is where you are going to create a new instance of a quest, which in my case was ShadowMages. When you hit Enter, it takes you right to your new quest and shows you the Quest Data tab.

The Quest Data tab has items that we need to make some changes to. The first change I made was putting The Shadow Mages in the Quest Name box. However, my next change is a departure from the original Quest Tutorial. Instead of setting the Priority to 100, I chose to stick to Bethesda's Dialogue Priorities that can be found on the Quest Data Tab page and set Priority to 50. The other changes I made were checking the Start Game Enabled box and setting conditions that will remain constant (and be evaluated) throughout the quest. This is where the real differences between this tutorial and the Quest Tutorial begin.


Note:

  • The first thing to be aware of is that Quest Conditions are 2nd party to the Player in almost every instance and first party to the Actors involved in the quest. What this means is that most of the time when you are running conditions dealing with the Player or objects the Player possesses (which we will be doing with the key), the Run On Target box needs to be checked. Anything that runs on an Actor involved in the quest (such as Topics for that Actor) does not have the Run on Target box checked. Quest Targets are an exception to this since the Player is considered the Actor seeking the Quest Target.

For the Quest Conditions on the Quest Data tab I chose the following two conditions:

Target Function Name Function Info Comp Value
yes GetItemCount Key: 'ShadowfallManorKey' == 1.00 AND
yes GetIsID NPC: 'Player' == 1.00 AND


When setting up these conditions, I clicked on the Function Parameter button that said INVALID for each of these conditions and then chose the appropriate item (ShadowfallManorKey or Player) and set the appropriate Value (in this case 1.00) for my conditions. These conditions must always be met in order for anything set up in the quest to actually happen.

Lastly, I wrote a startup script for the quest which consisted of:

Scriptname ShadowMagesSCRIPT

short Key


Begin GameMode

   If Key == 0 && GetStage ShadowMages == 0 && Player.GetItemCount ShadowfallManorKey == 1
      SetStage ShadowMages 10
      Set Key to 1
   EndIf 

End

As you can see from the script above, the key that is going to be the kickoff point that activates this Quest. That leaves the only other thing that needs to be done on this page for this quest is to choose an icon for the quest by clicking on the Add Icon Image button (doing it this way requires the quest icons to be pulled out of the BSA file or the creation of a new icon).

Quest StagesEdit

Again, I am going to go with Bethesda's standard for the Index on the Quest Stages tab which is to use units of 10 for each stage. Right-click in the Index box and then click New to add the stages. For now all we need are 10 and 20. Once you create the particular stage, you want to then right-click in the Quest Stage Items section in the top box and again click on New to create a new log entry. Then click on the Log Entry window and type in what you want to appear for the log entry for that stage in your quest windows in the game. For the 10 stage, add AddTopic SCKey in the Result Script box so that when we have the key and the quest starts, we can immediately go and talk to the NPC about the quest.

TopicsEdit

Now it is time to set up some topics for the NPC we created earlier. Since I duplicated an NPC rather than creating a new one, my NPC already has a GREETING and a Rumors incorporated into it. Due to this, on the Topics tab, we are only going to create 5 topics consisting of:

  • SCJagarTharn
  • SCKey
  • SCNo
  • SCShadowMages
  • SCYes

We will start by right-clicking on the EditorID portion of the Topics tab and then clicking on Add Topic to open the Select Topic window. Then right-click in the Select Topic window and click New to create a new topic. Once the topic is made, click OK to add it to the EditorID box. At this point, we can change the Topic Text for each of these items to what we want to appear as a choice in the dialogue that is displayed to the player. Then in the Info window right-click and click on New to open the New Response window, type in the response text, choose an Emotion and its Emotion Value, and then click the OK button.

My items consist of:

EditorID Topic Text Info/Response Details Emotion Result Scripts Add Topics Choices Checkboxes
SCJagarTharn Jagar Tharn Jagar Tharn was the Imperial Battlemage that imprisoned Uriel Septim VII in an attempt to usurp the Imperial Throne of Tamriel for himself.

He lost the key when battling the Shadow Mages.

Anger (90) None SCShadowMages None None
SCKey I found this key... Oh! You found the key that Jagar Tharn lost! Surprise (50) None None SCYes, SCNo None
SCNo I lied, I didnt find any key. Suit yourself. Although it won't do you any good to have it and know not what it is. Disgust (80) None None None Goodbye
SCShadowMages The Shadow Mages There is little that I can tell you of the Shadow Mages, other than that they all disappeared when Jagar Tharn usurped the Imperial Throne. Neutral (60) None None None Info Refusal
SCShadowMages The Shadow Mages The only thing I can say for sure is that the last openly known Shadow Mage, Fasriel, headed north towards Skyrim. Sad (50) SetStage ShadowMages 20 None None None
SCYes Yes, I found this key in a well. It is widely believed that his desire to obtain that key was one of the reasons that Jagar Tharn killed his apprentice in the first place. Anger (90) None SCJagarTharn None None

Each of the above items also has a condition consisting of:

Target Function Name Function Info Comp Value
no GetIsID NPC: 'SCMageScholar' == 1.00 AND

This condition means that only this particular NPC (the SCMageScholar) will have these topics. Some additional items that should be noted are the check boxes on the Topics tab. In the SCNo topic, I checked the Goodbye choice so that choosing that topic automatically ends the conversation with the NPC. The other thing to note is that there are two SCShadowMages topics because there are two seperate Info/Responses that appear under that topic. The top one has a check in the Info Refusal choice and has an additional condition of:

Target Function Name Function Info Comp Value
no GetDisposition [ TARGET ] < 75.00 AND

The other SCShadowMages topic has an additional condition of:

Target Function Name Function Info Comp Value
no GetDisposition [ TARGET ] >= 75.00 AND

These additional conditions are there so that the NPC will only give the Player the direction that the last known Shadow Mage went if she likes the Player. The Info Refusal being checked results in the SCShadowMages topic staying gold until the NPC likes the Player enough to tell the rest of the information about the last known Shadow Mage.

Quest TargetsEdit

My quest starts out with the player not knowing anything about the key that was found. Since the player doesn't have a clue about the key, there was no target set up for stage 10 on the Quest Target tab. Now that the player can get a direction to travel from the NPC, its time to set up a Quest Target so that the player knows where to head in order to continue on the quest.

For this part of the quest I chose to create a new DeadSkeleton the same way that I created a new key. I decided to drop the skeleton behind a rock at the end of the road by DragonClawRockExterior since it is the only major road heading towards Skyrim (like the player is told by the NPC), put FasrielsSkeleton in the Reference Editor ID box, and check the Initially Disabled checkbox so it isn't found too early. When you initially place the skeleton, it is upright even though the skeleton is dead. Running the Havok Sim for a couple of seconds takes care of this nicely by letting the skeleton fall down. Any adjustments can be made at this point if the skeleton parts do something you don't want like sliding down the terrain and into the open. I also placed an XMarkerHeading at the end of the road with an added Reference Editor ID of FasrielGhostMarker where it disappears into the terrain. Once the skeleton and XMarkerHeading are placed, its time to go to the Quest Target tab of your quest.

Since I am going to use the FasrielGhostMarker as the quest target, the easiest way to select it is to click the Select in Render Window button and then double-click on the FasrielGhostMarker. Now its time to add some conditions so that this target only shows up when the quest is in stage 20 and the Player is at a distance greater than 150. For this to occur I added the conditions:

Target Function Name Function Info Comp Value
no GetStage Quest: 'ShadowMages' == 20 AND
no GetDistance Reference: 'FasrielGhostMarker' > 150 AND


Note:

  • As stated above, the Player is considered to be the Actor for conditions on the Quest Targets tab.


Expanding the QuestEdit

Now it is time to add another NPC, some creatures, and some more scripting to the quest. I decided that this would make a good location for a small battle with some undead creatures. First I duplicated Hannibal Traven the same way that I duplicated the other NPC to create a ghost of Fasriel. Since I don't want anything to happen before the Player shows up, I also check the Initially Disabled checkbox and place the ghost in front of the stone that his body is hidden behind. Then I duplicated the LL1UndeadLvl100 LeveledCreature list by changing the ID to SC1UndeadLvl100, checking the Initially Disable checkbox, and removed the skeletons and zombies. I placed five of these to each side of Fasriel's ghost with the the Reference Editor ID being UndeadX where X is a number from 1 through 10. With Fasriel's ghost and the SC1UndeadLvl100 markers placed, its time to move on to the scripting part of this expansion of the quest.

Going back into the main script for the quest, I add three Short variables named Counter, DoOnce and EnableRef as well as the additional scripting just before the End of the GameMode block:

   If Player.GetDistance FasrielGhostMarker > 500 && GetStage ShadowMages == 20 && EnableRef == 0
      Return
   ElseIf Player.GetDistance FasrielGhostMarker < 500 && GetStage ShadowMages == 20 && EnableRef == 0
      Messagebox "An eerie chill runs up your spine as if some unseen force is watching you."
      Set EnableRef to 1
      SetEssential SCGhostFasriel 1
      SCGhostFasrielRef.Enable
      SCGhostFasrielRef.SetActorAlpha 0.5
      Undead1.Enable
      Undead2.Enable
   EndIf

   If SCGhostFasrielRef.GetDisabled == 0
      If SCGhostFasrielRef.IsInCombat == 1 && DoOnce == 0
         Set DoOnce to 1
         If Counter == 0
            Undead1.Disable
            Undead2.Disable
         ElseIf Counter == 1
            Undead3.Disable
            Undead4.Disable
         ElseIf Counter == 2
            Undead5.Disable
            Undead6.Disable
         ElseIf Counter == 3
            Undead7.Disable
            Undead8.Disable
         ElseIf Counter == 4
            Undead9.Disable
            Undead10.Disable
         EndIf
         Set Counter to Counter + 1
      EndIf

      If SCGhostFasrielRef.IsInCombat == 0 && DoOnce == 1 && Counter < 5
         If Counter == 1
            Undead3.Enable
            Undead4.Enable
         ElseIf Counter == 2
            Undead5.Enable
            Undead6.Enable
         ElseIf Counter == 3
            Undead7.Enable
            Undead8.Enable
         ElseIf Counter == 4
            Undead9.Enable
            Undead10.Enable
         EndIf
         Set DoOnce to 0
      EndIf
   EndIf

   If SCGhostFasrielRef.IsInCombat == 0 && Counter == 5
      SCGhostFasrielRef.SetGhost 1
      Set Counter to 6
      SCGhostFasrielRef.StartConversation Player
   EndIf

This additional script initiates and runs the battle as soon as the Player shows up at the FasrielGhostMarker activating and deactivating two of the SC1UndeadLvl100 leveled lists at a time until all ten have been activated and deactivated. It also makes Fasriel's Ghost come up to the Player afterwards and initiate a conversation. Fasriel's Ghost is set to ghost state so that the Player can't pickpocket the ghost (who ever heard of pickpocketing a ghost?). Now its time to add some more Topics for Fasriel's Ghost so that we can find out more about the quest.

Fasriel's TopicsEdit

Since the Topics of SCShadowMages and SCJagarTharn have already been added to the Player from talking to the first NPC, I decided to reuse them for the conversation with Fasriel's Ghost. The five new Topics I added are as follows:

  • SCBody
  • SCGhostNo
  • SCGhostYes
  • SCLocation
  • SCShadowfall

My Topics items look like this:

EditorID Topic Text Info/Response Details Emotion Result Scripts Add Topics Choices Checkboxes
SCBody Where is your body? Before I can tell you where my body lies, you must swear to use the knowledge within Shadowfall to further the ends of the Empire.

Do you so swear?

Neutral (50) None None SCGhostYes

SCGhostNo

None
SCGhostNo No, not at this time. Then I can not tell you where my body lies. Sad (70) None None None Goodbye
SCGhostYes Yes, I swear. My body lies to the north of the boulder at the end of the road you followed here. Happy (70) SetStage ShadowMages 30

Player.SetFactionRank ShadowMageFaction 0 FasrielsSkeleton.Enable

None None None
SCJagarTharn Jagar Tharn Jagar Tharn sought the key to Shadowfall in order to gain access to it. Neutral (50) None SCShadowfall None None
SCLocation Where is Shadowfall? Shadowfall Manor is located on an island to the south of the Imperial City. Neutral (50) None None None Info Refusal
SCLocation Where is Shadowfall? You will need the amulet that is on my physical body. When you wear the amulet, the location of Shadowfall shall become known to you. Neutral (50) None SCBody None None
SCShadowfall Shadowfall Shadowfall is the manor that we used for the studies and research that was not to be known by the Mages Guild.

It was hidden with spells and enchantments so that only the Shadow Mages could find it.

Neutral (50) None SCLocation None None
SCShadowMages The Shadow Mages The Shadow Mages were a secret group of mages who only answered to the Emperor himself. Neutral (50) None None None None

Each of the above items also has a condition consisting of:

Target Function Name Function Info Comp Value
no GetIsID NPC: 'SCGhostFasriel' == 1.00 AND

This is so only Fasriel's Ghost can give this information to the Player. The two SCLocation topics also have additional conditions like the SCShadowMages topics earlier. The SCLocation topic with the Info Refusal checkbox checked has:

Target Function Name Function Info Comp Value
no GetDisposition [ TARGET ] < 75.00 AND

The other SCLocation topic has an additional condition of:

Target Function Name Function Info Comp Value
no GetDisposition [ TARGET ] >= 75.00 AND


                              (*to be continued*)