Difference between revisions of "A beginner's guide, lesson 6 - Quest Dialogue"
A beginner's guide, lesson 6 - Quest Dialogue (edit)
Revision as of 14:28, 21 December 2023
, 14:28, 21 December 2023no edit summary
imported>Pyrocow2 (→Stage Update: Fixing incorrect topic names) |
Tag: Manual revert |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Featured}} | {{Featured}} | ||
{{ABGContents}} | |||
==Preamble== | |||
This is the Sixth in a proposed series of Tutorial Lessons aimed at teaching how to mod TES IV: Oblivion aimed at beginners. It will build up into a complete modding course. Don't worry, there are no exams (though, there is some homework). This version was written for use on the forum. The RTF version contains additional material that was left out due to formatting limitations. | This is the Sixth in a proposed series of Tutorial Lessons aimed at teaching how to mod TES IV: Oblivion aimed at beginners. It will build up into a complete modding course. Don't worry, there are no exams (though, there is some homework). This version was written for use on the forum. The RTF version contains additional material that was left out due to formatting limitations. | ||
===Files=== | |||
I have uploaded some files in a .zip which will be used to accompany the next few tutorials. | I have uploaded some files in a .zip which will be used to accompany the next few tutorials. | ||
Line 27: | Line 23: | ||
===Using this Tutorial=== | |||
I suggest that you modify the CS configuration file to allow you to open multiple copies at the same time. (See [[A_beginner's_guide,_lesson_3_-_The_external_world#Introduction|Introduction to Lesson 3]]) | I suggest that you modify the CS configuration file to allow you to open multiple copies at the same time. (See [[A_beginner's_guide,_lesson_3_-_The_external_world#Introduction|Introduction to Lesson 3]]) | ||
Line 577: | Line 573: | ||
It expects to find for each dialogue response files, which we have not created. One is an MP3 which contains the sound files, and the others are lip synch files used to animate the actor's face as we carry out the dialogue. The text is supposed to appear on screen for the duration of these files. | It expects to find for each dialogue response files, which we have not created. One is an MP3 which contains the sound files, and the others are lip synch files used to animate the actor's face as we carry out the dialogue. The text is supposed to appear on screen for the duration of these files. | ||
Since we don't have them yet, the text runs very quickly. In later tutorials we will look at polishing this mod to include these files. For now, these are cosmetic problems. It's irritating not to see the text for any length of time, but it can't be helped until we add those MP3's. | Since we don't have them yet, the text runs very quickly. In later tutorials we will look at polishing this mod to include these files. For now, these are cosmetic problems. It's irritating not to see the text for any length of time, but it can't be helped until we add those MP3's. | ||
It doesn't stop the quest running. You can repeatedly play the on-screen text by selecting the topic message for you until you get the message | It doesn't stop the quest running. You can repeatedly play the on-screen text by selecting the topic message for you until you get the message. (Alternatively, you could install a mod like [http://www.tesnexus.com/downloads/file.php?id=16622 Universal Silent Voice].) | ||
The second problem deals with the script as it currently stands and may not be so obvious to a non-scripter. A quest script runs every 5 seconds. That means that every 5 seconds this script tries to add the topic BGMMessage4u to the players topic list. I don't honestly know what the effect of repeatedly adding a topic to the player's list is, but I suspect that extra requests to add the topic are simply ignored. | The second problem deals with the script as it currently stands and may not be so obvious to a non-scripter. A quest script runs every 5 seconds. That means that every 5 seconds this script tries to add the topic BGMMessage4u to the players topic list. I don't honestly know what the effect of repeatedly adding a topic to the player's list is, but I suspect that extra requests to add the topic are simply ignored. | ||
Line 1,064: | Line 1,060: | ||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topic'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
Line 1,092: | Line 1,087: | ||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| ''No | | ''No add topic'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| ''No | | ''No script'' | ||
|} | |} | ||
Line 1,105: | Line 1,100: | ||
Try this one yourself using this summary to guide you. | Try this one yourself using this summary to guide you. | ||
Don't forget the quest bump script. | Don't forget the quest bump script. | ||
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''' | !colspan=2| '''BGWill''' | ||
Line 1,127: | Line 1,122: | ||
| | | | ||
*BGHubart | *BGHubart | ||
*BGMVilanusVilla (In case the player talked to Vilanus before using the "Message for you" topic) | |||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
Line 1,144: | Line 1,140: | ||
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. | 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 Items->Book 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. It uses standard HTML tags. | 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. | ||
Line 1,175: | Line 1,171: | ||
Then click the "Compile Result" button. | 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''' | !colspan=2| '''BGHubart''' | ||
Line 1,199: | Line 1,195: | ||
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. You should stop to test everything out before moving on. Just test a few conditions to make sure that everything is working, and that you haven't made any small mistakes. | ||
==Chorrol Phase== | ==Chorrol Phase== | ||
In this phase of the quest we want to use a new NPC called Captain Hubart to direct the player to solve a mystery. He will direct the player to a cottage, where they will discover a mysterious medallion and the dead body of the courier. Hubart will then be able to help us move on to Aleswell and the next phase. | |||
For this phase, we will need to create: | |||
*NPC Captain Hubart | *NPC Captain Hubart | ||
*NPC Dead Courier | *NPC Dead Courier | ||
Line 1,214: | Line 1,209: | ||
*A cottage to house courier. | *A cottage to house courier. | ||
Again we need to add the NPC first so we can reference him in conditions. | Again, we need to add the NPC first so we can reference him in conditions. | ||
As always, we could use a new NPC object, but it really saves a lot of time and effort if we simply change the name and ID of an existing one. This time we can just copy a Chorrol Guard NPC, such as ''ChorrolGuardPatrolNight01''. Change the ID to ''BGCptHubart'', and save it as a new form. | |||
Strip out the AI, but leave his inventory as is, since the Chorrol guard's inventory already contains all we need. We can also leave the factions alone. I placed Hubart outside the Fire and Steel shop in Chorrol (worldspace ''ChorrolWorld'').<br /> | |||
This is only his starting position. We can add AI | ''Hint: a fast way to get to an exterior cell is to select the interior cell, and then click on the teleport marker by the door.''<br /> | ||
This is only his starting position. We can add AI packages later to move the character about. | |||
We have to set up a new | We have to set up a new response to the ''BGHubart'' topic. | ||
We could add a new topic but it is always a good idea to try to limit how many new topics we add | We could add a new topic but it is always a good idea to try to limit how many new topics we add. This reduces the ‘footprint' of the mod, and helps avoid possible conflicts with other mods. | ||
We want to set up a response that when any Chorrol based NPCs are questioned they will direct the PC toward the likely location of the | We want to set up a response so that when any Chorrol based NPCs are questioned they will direct the PC toward the likely location of the captain. Add conditions to limit the race to human again (saving all that MP3 work), and the location to the ''Chorrol'' dummy cell (thereby including all cells within Chorrol). We can also limit the ‘timescale' to the current quest stage (20). Try this yourself. You can always refer to the PLAYTEST version if you get stuck. | ||
{| class="wikitable" border="1" cellpadding="5" | {| class="wikitable" border="1" cellpadding="5" | ||
!colspan=2| '''BGHubart''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | "Captain Hubart" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | "He's usually on duty near the Fire and Steel." | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
GetInCell | *GetIsRace 'Argonian' == 0, etc. | ||
GetInFaction | *GetInCell 'Chorrol' == 1 | ||
GetIsID BGCptHubart == 0 | *GetInFaction 'ChorrolFaction' == 1 | ||
GetStage BGM001>= 20 | *GetIsID 'BGCptHubart' == 0 | ||
*GetStage 'BGM001' >= 20 | |||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
Line 1,252: | Line 1,250: | ||
The first can be attached to Vilanus Villa topic, to reduce the ‘footprint'. | The first can be attached to Vilanus Villa topic, to reduce the ‘footprint'. | ||
First, add a TOPIC called ''BGCourier''. | |||
{| class="wikitable" border="1" cellpadding="5" | {| class="wikitable" border="1" cellpadding="5" | ||
!colspan=2| '''BGMVilanusVilla''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | "Missing courier" | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| Vilanus has sent you to investigate the | | "Vilanus has sent you to investigate the courier's disappearance?" | ||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
GetStage BGM001== 20 | *GetIsID 'BGCptHubart' == 1 | ||
*GetStage 'BGM001' == 20 | |||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| BGCourier | | | ||
*BGCourier | |||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
Line 1,273: | Line 1,274: | ||
|} | |} | ||
Stop to test this out, and then refer to the PLAYTEST version if you are stuck. | |||
Before we go any | Before we go any farther, we need to set the scene at the cottage. | ||
==Locating the Cottage== | ==Locating the Cottage== | ||
Line 1,287: | Line 1,288: | ||
We want to set the internal scene in readiness for the PC's arrival. I have used a copy of the White Stallion Lodge as a base. We want to customise this. Again we can work on this in more detail when we polish the quest prior to release. | We want to set the internal scene in readiness for the PC's arrival. I have used a copy of the White Stallion Lodge as a base. We want to customise this. Again we can work on this in more detail when we polish the quest prior to release. | ||
We want to remove some of the clutter. We also want to give the impression a fight has taken place. Tips some chairs and tables over (Y=90). Remember this set will be locked at the start and you will only use it for a short time, so don't go overboard. We also want to place some props. We need an amulet to trigger the next phase. Why an amulet | We want to remove some of the clutter. We also want to give the impression a fight has taken place. Tips some chairs and tables over (Y=90). Remember this set will be locked at the start and you will only use it for a short time, so don't go overboard. We also want to place some props. We need an amulet to trigger the next phase. Why an amulet? It's small enough that you have to look for it, but not so small that it becomes hard to find. Copy an existing item of jewelry from Items->Clothing->Amulet as a base and edit it. Change the ID to ''BGEmbossedAmulet''. Check off the ''Quest Item'' box. The player can not drop or sell quest items. | ||
We also want to create a custom letter | We also want to create a custom letter called ''BGPartialLetter''. Set the letter as a quest item. We will refer to it in some scripts. | ||
<pre><nowiki> | <pre><nowiki> | ||
<br> | <br> | ||
Line 1,296: | Line 1,297: | ||
<br> | <br> | ||
<br> | <br> | ||
The client wishes his only living heir in Cyrodiil | The client wishes his only living heir in Cyrodiil to inherit his house. I have enclosed the deed and key. The location of the house is registered at the Imperial City Land Offices...<br> | ||
the deed and key. the | |||
<br> | <br> | ||
<br> | <br> | ||
Line 1,305: | Line 1,305: | ||
<br> | <br> | ||
</nowiki></pre> | </nowiki></pre> | ||
Of course | Of course it would look really cool if we could create a custom texture for a torn scroll, but that is beyond the scope of this tutorial. | ||
Finally we need to place the body of the unfortunate courier. | |||
Bodies are NPCs who just happen to be dead. You will need to create another NPC. Use ''Courier1'' as the base. | |||
Place this character in the render window, set its ID to ''BGDeadCourierRef'', and position the corpse in a suitable place. I put her in a side room so you don't see her right away. I also left a nice blood trail to lead you to her. Initially, the NPC will be standing up. | |||
Next click ''Edit Base'' to open the NPC window. Change the NPC's ID to ''BGDeadCourier''. Edit the NPC's health to read zero (0). (To access this stat, uncheck the ''PC Level Offset'' and ''Auto calc stats'' boxes.) | |||
Down she goes. | Now, the awkward thing is the fact that she is just standing there. She will stay standing in the game unless we make her fall first. To get her to fall, click on the WORLD menu and select ''Run Havok Sim'' (with the bouncing red ball). Down she goes. | ||
We can now drag her about to get the position right. | We can now drag her about to get the position right. | ||
I also placed a sword which pointed directly at the amulet. | |||
Next, we have to add the letter to the dead courier's inventory. Open the NPC window for ''BGDeadCourier'' and click on the ''Inventory'' tab. Then drag ''BGPartialLetter'' from the objects window over into the inventory list. You will be warned that the letter is a quest item. Just click OK. | |||
Another useful technique is to create an NPC called something like BGDummyPlayer | Another useful technique is to create an NPC called something like ''BGDummyPlayer''. We will not place this NPC in the world, so don't bother to edit anything other than the object ID. | ||
We can now set the ownership of the door and cell ( | We can now set the ownership of the door and cell ([[A_beginner's_guide,_lesson_3_-_The_external_world#Matching_Interiors|Lesson 3]]) to ''BGDummyPlayer''. This means that all items in the cottage will display the red hand, with the exception of the embossed amulet. This is a handy way to set ownership without having to create detailed NPCs. We can use ''BGDummyPlayer'' to set the ownership of all the doors and sets we want to prohibit our player from entering. | ||
Now create a key called ''BGCourierKey''. Select an existing key and change the editor ID. Also check the ''Quest Item'' box. Edit the cottage door to set its lock status to "Needs a key", and use our new object as the key. | |||
We need to add two other items to the cottage. | We need to add two other items to the cottage. | ||
We need to add an [[XMarker]] to the interior and | We need to add an [[XMarker]] to the interior, and a [[map marker]] to the exterior. | ||
We will find these under the Static Objects. | We will find these under the Static Objects. | ||
Drop an | Drop an XMarker or an [[XMarkerHeading]] object inside the cottage and give it a reference name like ''BGCourierLodgeXMarker''. | ||
Now select a MapMarker and drop it just outside the cottage door, in the exterior cell. | Now select a MapMarker and drop it just outside the cottage door, in the exterior cell. It looks a bit like a door teleport marker, but it's pink rather than yellow. | ||
It looks a bit like a door teleport marker but | |||
Edit its details to give it a reference name like | Edit its details to give it a reference name like ''BGCourierLodgeMapMarker''. | ||
Open up the MapMarker Data tab, check the marker data tick box and select settlement. | Open up the MapMarker Data tab, check the marker data tick box and select settlement. | ||
Theses flags control what type of icon appears on the players map. | Theses flags control what type of icon appears on the players map. | ||
Finally in the name box call it Courier Cottage. | Finally in the name box call it Courier Cottage. This is the name that will appear on the map. | ||
We need to add a bit of script to enable it. First we need to add a bit more conversation. | We need to add a bit of script to enable it. First we need to add a bit more conversation. | ||
Add | Add stage 30 in the stage tab, and create a topic named ''BGCluesFound'' (which we won't be editing just yet). | ||
Then create the following topic. | |||
{| class="wikitable" border="1" cellpadding="5" | |||
!colspan=2| '''BGCourier''' | |||
|- | |||
! TOPIC TEXT | |||
| Courier | |||
|- | |||
! RESPONSE | |||
| | |||
* "She's usually very reliable, but she failed to turn up for our usual meeting." | |||
* "She sometimes stays in a small cottage just west of here. I'll mark it on your map." | |||
* "Here's a key to get you in. Let me know what you find out." | |||
|- | |||
! CONDITIONS | |||
| | |||
*GetIsId 'BGCptHubart' == 1 | |||
*'''GetStage 'BGM001' == 20''' | |||
|- | |||
! ADD TOPICS | |||
| | |||
*BGCluesFound | |||
|- | |||
! RESULT SCRIPT | |||
| | |||
SetStage BGM001 30 | |||
|} | |||
Add one more response to this topic in case the player tries to talk to Hubart again after they've been given the key to the cottage, but before they've found it. | |||
{| class="wikitable" border="1" cellpadding="5" | {| class="wikitable" border="1" cellpadding="5" | ||
!colspan=2| '''BGCourier''' | |||
|- | |- | ||
! TOPIC | ! TOPIC TEXT | ||
| | | Courier | ||
|- | |- | ||
! RESPONSE | ! RESPONSE | ||
| | | | ||
"Did you check out the cottage?" | |||
|- | |- | ||
! CONDITIONS | ! CONDITIONS | ||
| | | | ||
GetStage BGM001 | *GetIsId 'BGCptHubart' == 1 | ||
*'''GetStage 'BGM001' == 30''' | |||
|- | |- | ||
! ADD TOPICS | ! ADD TOPICS | ||
| | | ''No add topic'' | ||
|- | |- | ||
! RESULT SCRIPT | ! RESULT SCRIPT | ||
| | | ''No script'' | ||
|} | |} | ||
Now in the stage tab for stage 30, add this to the journal: | |||
''Hubart told me that the courier sometimes stays in a small cottage just west of Chorrol. He marked its location on my map and gave me a key to the door. I should go check it out.'' | |||
And add this to the stage result script: | |||
And add this to the stage result script | |||
Player.AddItem "BGCourierKey" 1 | |||
ShowMap BGCourierLodgeMapMarker | |||
This | This gives the player the key to the cottage and activates the map marker. | ||
The | The syntax for the [[ShowMap]] Function is | ||
ShowMap MapMarkerID, enableFastTravel (optional) | ShowMap MapMarkerID, enableFastTravel (optional) | ||
The MapMarker ID is the reference id for the map marker. | The MapMarker ID is the reference id for the map marker. | ||
The enableFastTravel is an optional parameter which takes the value 1 if you want to be able to fast travel immediately. | The enableFastTravel is an optional parameter which takes the value 1 if you want to be able to fast travel immediately to that location. | ||
If | If enableFastTravel is not given (or set to 0) then you can not fast travel to that location until you've found it once. | ||
We still need to add all the quest targets, and we'll use the XMarkerHeading for that. | |||
Up | Up 'til now we have been using dialogue to control progression, but now we need to begin using scripts more continue. | ||
In [[A beginner's guide, lesson 7 - Using Scripts in Quests|Lesson 7]] we will complete the quest and focus on SCRIPTING. | In [[A beginner's guide, lesson 7 - Using Scripts in Quests|Lesson 7]] we will complete the quest and focus on SCRIPTING. | ||
[[Category:A beginner's guide]] | [[Category:A beginner's guide]] |