Difference between revisions of "A beginner's guide, lesson 6 - Quest Dialogue"

wikified, no additional layout or headings yet
imported>Qazaaq
(ready to be wikified)
 
imported>Qazaaq
(wikified, no additional layout or headings yet)
Line 1: Line 1:
[url=http://www.elderscrolls.com/forums/index.php?showtopic=517001]Index Page[/url]
'''TES IV: Oblivion Modding for Beginners


[b]TES IV: Oblivion Modding for Beginners
'''B. Scripts, Quests and NPC’s
 
'''Lesson Six: Quest Focus; Dialogue
B. Scripts, Quests and NPC’s
Lesson Six: Quest Focus; Dialogue
[/b][b]
 
[b]Preamble[/b]


'''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 has been written for use on the forum. The RTF version contains additional material 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 has been written for use on the forum. The RTF version contains additional material left out due to formatting limitations


[b]Files[/b]
'''Files
 
I have uploaded some files in a zip which we will used to accompany the next few tutorials.  
I have uploaded some files in a zip which we will used to accompany the next few tutorials.  
It contains
It contains


[i]A. BGModTutBase.esp:  
A. BGModTutBase.esp:  
This contains a building, a farmhouse, and a dungeon that we will use as sets in lessons 6, 7 and 8. This file is referred to in the text as the BASE files
This contains a building, a farmhouse, and a dungeon that we will use as sets in lessons 6, 7 and 8. This file is referred to in the text as the BASE files


B BGModTutPlayTest.esp
B. BGModTutPlayTest.esp
This is the interim quest mod illustrating the stage you should have reached prior to polishing the mod. This is referred to in the text as the PLAYTEST files
This is the interim quest mod illustrating the stage you should have reached prior to polishing the mod. This is referred to in the text as the PLAYTEST files


B. BGModAnvilCheat.esp:  
C. BGModAnvilCheat.esp:
This is a small optional cheat mod to give users 5000 septims to allow them to follow this tutorial if they have not completed the quest. (See Introduction to lesson 4)
This is a small optional cheat mod to give users 5000 septims to allow them to follow this tutorial if they have not completed the quest. (See Introduction to lesson 4)


C. A RTF document containing the text for the first 7 lessons (as requested).
D. A RTF document containing the text for the first 7 lessons (as requested).
[/i]


[url=http://www.tessource.net/files/cache/4865.html]Mod Files are Here[/url]
[http://www.tessource.net/files/cache/4865.html Mod Files are Here]


or URL
or URL
Line 34: Line 28:
www.tessource.net/files/cache/4865.html
www.tessource.net/files/cache/4865.html


[b]Using this Tutorial[/b]
'''Using this Tutorial


Can I suggest you operate in the following way to make the most of these tutorials?
Can I suggest you operate in the following way to make the most of these tutorials?
Line 41: Line 35:
Open a second version with the[b]BASE[/b] version loaded. This is your working files. If you don’t want to use my version, and have your own buildings and dungeons then load this version here.
Open a second version with the[b]BASE[/b] version loaded. This is your working files. If you don’t want to use my version, and have your own buildings and dungeons then load this version here.


[b]Introduction[/b]
'''Introduction


Well, we come to it at last. It is time for us to begin to create our own quest, to design our own NPC’s, and to write our own scripts.  
Well, we come to it at last. It is time for us to begin to create our own quest, to design our own NPC’s, and to write our own scripts.  
Line 50: Line 44:
I have assumed, that you have completed lessons one to three, and that that you have at least read through the appendix section on the Quest Interface.
I have assumed, that you have completed lessons one to three, and that that you have at least read through the appendix section on the Quest Interface.


[b]Our Plot[/b]
'''Our Plot


Quests are the bedrock of Oblivion’s game mechanics. We established in the quest walkthrough a basic technique to progress quests
Quests are the bedrock of Oblivion’s game mechanics. We established in the quest walkthrough a basic technique to progress quests


[i]Action
''''Action
Set Stage
''''Set Stage
Set Conditions for next action.
''''Set Conditions for next action.
Hiatus[/i]
''''Hiatus


We will try to use this wherever possible.
We will try to use this wherever possible.
Line 76: Line 70:
So here is my clichéd ‘recover the item’ plot line.
So here is my clichéd ‘recover the item’ plot line.


[b]The player discovers that their uncle has sadly passed away. The terrible news is softened by the fact that the Uncle has left the player some property in his will. Unfortunately the courier bringing the details of where the property, is along with the key and deed has disappeared. The player has to investigate the disappearance. This will lead him to an encounter with a gang of thieves who the player will have to defeat to recover his house key and deed. [/b]
'''The player discovers that their uncle has sadly passed away. The terrible news is softened by the fact that the Uncle has left the player some property in his will. Unfortunately the courier bringing the details of where the property, is along with the key and deed has disappeared. The player has to investigate the disappearance. This will lead him to an encounter with a gang of thieves who the player will have to defeat to recover his house key and deed.


This is not the greatest plot ever, but it should allow us to cover all the main points. I have chosen to make this quest as close to the Bethusda ‘Oblivion’ model as I can.  
This is not the greatest plot ever, but it should allow us to cover all the main points. I have chosen to make this quest as close to the Bethusda ‘Oblivion’ model as I can.  
Line 83: Line 77:


This is at the extreme end of the hand holding scale. Please feel free to add or change any bit of the quest you feel is too helpful to the PC. Remember this is a way to write a quest, but it is NOT the ONLY way. This tutorial illustrates techniques. I do not intend it to be a click by click guide. In fact I will as the tutorial progresses, be feeding you less and less information, and asking you to ‘fill in the blanks’
This is at the extreme end of the hand holding scale. Please feel free to add or change any bit of the quest you feel is too helpful to the PC. Remember this is a way to write a quest, but it is NOT the ONLY way. This tutorial illustrates techniques. I do not intend it to be a click by click guide. In fact I will as the tutorial progresses, be feeding you less and less information, and asking you to ‘fill in the blanks’
[b]
 
Pre-Production
'''Pre-Production
[/b]
 
Let’s get started then. You can use the base files I have provided or you can create your own. Don’t forget to make the file active in the CS
Let’s get started then. You can use the base files I have provided or you can create your own. Don’t forget to make the file active in the CS


Line 100: Line 94:
The quest is set in 6 locations
The quest is set in 6 locations


1. In and around the Imperial City
#In and around the Imperial City
2. In and around Chorrol
#In and around Chorrol
3. The Courier Cottage close to Chorrol
#The Courier Cottage close to Chorrol
4. The Village of Aleswell
#The Village of Aleswell
5. The Hideout of the Baddies
#The Hideout of the Baddies
6. Our Reward Home.
#Our Reward Home.


We will also need 5 named NPC’s plus a few generic goons for our hero to fight.
We will also need 5 named NPC’s plus a few generic goons for our hero to fight.


[b]
'''Imperial City, Phase One.
Imperial City, Phase One.[/b]


For convenience we will split the quest into a series of phases. These are artificial divisions, and are not a technical requirement
For convenience we will split the quest into a series of phases. These are artificial divisions, and are not a technical requirement


Phase Objectives: - [i]In this phase we want to set up a dialogue which introduces the quest to the player character. We want the PC to visit an NPC called Vilanus Villa who will in turn give some exposition, before directing the PC to visit Chorrol. [/i]
Phase Objectives: - ''''In this phase we want to set up a dialogue which introduces the quest to the player character. We want the PC to visit an NPC called Vilanus Villa who will in turn give some exposition, before directing the PC to visit Chorrol.


If we breakdown the first section of the story to see what we need to do.
If we breakdown the first section of the story to see what we need to do.
Line 127: Line 120:
However, one thing to consider is that any reference objects we wish to use in condition statements or scripts must exist before we can use them. For this reason it is probably best to start by adding out NPC into the game, because we will be using him as reference in some conditions.
However, one thing to consider is that any reference objects we wish to use in condition statements or scripts must exist before we can use them. For this reason it is probably best to start by adding out NPC into the game, because we will be using him as reference in some conditions.


[b]
'''Adding an NPC
Adding an NPC[/b]


You can of course create an NPC from scratch. If you right click in the Actor section of the object menu and select NEW a new NPC interface pops up. However, I cannot see any good reason to do this, and since you will have to add every aspect of your NEW NPC, including animations, there are many good reasons not to do this.  
You can of course create an NPC from scratch. If you right click in the Actor section of the object menu and select NEW a new NPC interface pops up. However, I cannot see any good reason to do this, and since you will have to add every aspect of your NEW NPC, including animations, there are many good reasons not to do this.  
Line 144: Line 136:
ID -Editor ID for this NPC. Must be unique.  
ID -Editor ID for this NPC. Must be unique.  


Name  
;Name  
-NPC name as it will appear in-game
*NPC name as it will appear in-game


Script  
;Script  
-Scripts can be attached to NPCs here.
*Scripts can be attached to NPCs here.
   
   
Class  
;Class  
-Can be defined using the class interface from the menu bar.
*Can be defined using the class interface from the menu bar.


Summonable  
;Summonable  
-Mainly used for creatures and defines them  as able to be summoned.
*Mainly used for creatures and defines them  as able to be summoned.


Offset/PC Level Offset  
;Offset/PC Level Offset  
-Used to set NPC level. Either a fixed value, within a defined range or offset against PC level.
*Used to set NPC level. Either a fixed value, within a defined range or offset against PC level.


Calc Min/Max  
Calc Min/Max  
Line 174: Line 166:
Used for special loot items that we don't want to show up until after an NPC is dead.  
Used for special loot items that we don't want to show up until after an NPC is dead.  


Essential  
;Essential  
-Essential NPC’s cannot be killed and are only knocked unconscious.  
*Essential NPC’s cannot be killed and are only knocked unconscious.  


Respawn  
;Respawn  
-This NPC will respawn when the cell reloads if you check this
*This NPC will respawn when the cell reloads if you check this


Selecting  "PC Level Offset" will lock or unlock the details in the stats tab.
Selecting  "PC Level Offset" will lock or unlock the details in the stats tab.


First alter the NPC’s ID to [b]BGVilanusVilla[/b] and the name to [b]Vilanus Villa[/b].  
First alter the NPC’s ID to '''BGVilanusVilla''' and the name to '''Vilanus Villa'''.  


We tend to prefix all items added by a mod with a suitable prefix, like BG or BGM. This help avoid any conflicts, in the unlikely event that another mod adds a character called Vilanus Villa.
We tend to prefix all items added by a mod with a suitable prefix, like BG or BGM. This help avoid any conflicts, in the unlikely event that another mod adds a character called Vilanus Villa.
Line 207: Line 199:


Exit and create a new form by saying yes. We now have a brand new NPC. We will have to do some work on him later, but he is in the game.  
Exit and create a new form by saying yes. We now have a brand new NPC. We will have to do some work on him later, but he is in the game.  
[b]
 
Creating the Quest[/b]
'''Creating the Quest'''


In the top menu select CHARACTER.
In the top menu select CHARACTER.
Line 230: Line 222:
We want to give our quest a name. This is the name that appears in the in-game journal entries. You can call it pretty much what you like. You can even duplicate names, which although legal could be a bit confusing. I’ve chosen to call mine
We want to give our quest a name. This is the name that appears in the in-game journal entries. You can call it pretty much what you like. You can even duplicate names, which although legal could be a bit confusing. I’ve chosen to call mine


[i]The Inheritance Denied.[/i]
''''The Inheritance Denied.''''


If you remember from lesson 4 we need to choose an appropriate priority.  
If you remember from lesson 4 we need to choose an appropriate priority.  
Line 246: Line 238:
For now let’s go ahead and select the standard Start Game Enabled and leave blank  the repeat conversions or Stages. Now have a look at the table at the bottom which contains any quest conditions
For now let’s go ahead and select the standard Start Game Enabled and leave blank  the repeat conversions or Stages. Now have a look at the table at the bottom which contains any quest conditions


[b]Quest Conditions [/b]
'''Quest Conditions'''


At the moment this is blank. We are going to input a generic conditions which has the effect of limiting any conversations and dialogue topic we create in this quest to characters we would expect to speak, and exclude those we don’t like Goblins and Horses.
At the moment this is blank. We are going to input a generic conditions which has the effect of limiting any conversations and dialogue topic we create in this quest to characters we would expect to speak, and exclude those we don’t like Goblins and Horses.
Line 296: Line 288:
We now have the condition
We now have the condition


GetIsPlayableRace == 1.  
  GetIsPlayableRace == 1.  


This is in effect the equivalent to the instruction
This is in effect the equivalent to the instruction
Line 318: Line 310:
We are now ready to get down to the fun bit of mod building.
We are now ready to get down to the fun bit of mod building.


[b]Topics[/b]
'''Topics'''


Remember we have set this quest up as start enabled, but it has no content.  
Remember we have set this quest up as start enabled, but it has no content.  
Line 330: Line 322:
A pop-up appears listing all available topics for all the quests in the game. Again we use right click and again we use new to get another pop-up. We need to add a one word unique topic descriptor.  
A pop-up appears listing all available topics for all the quests in the game. Again we use right click and again we use new to get another pop-up. We need to add a one word unique topic descriptor.  


[i]( I will admit that I made a mistake here. It is good practice to use a set of common letters as a prefix for all mod items. I should have added a topic called BGMMessage4u, but I forgot the prefix. It’s not a disastrous mistake, but it does mean this mod might have a few conflict issues with other mods that add a topic called message4u as well. Sorry about that. Also while I‘m apologising, ignore the deleted empty info)[/i]
''''( I will admit that I made a mistake here. It is good practice to use a set of common letters as a prefix for all mod items. I should have added a topic called BGMMessage4u, but I forgot the prefix. It’s not a disastrous mistake, but it does mean this mod might have a few conflict issues with other mods that add a topic called message4u as well. Sorry about that. Also while I‘m apologising, ignore the deleted empty info)''''


You should add a topic called BGMMessage4u, to show how much better at this thing you are than me.
You should add a topic called BGMMessage4u, to show how much better at this thing you are than me.
Line 350: Line 342:
There are an awful lot of topics in the game list. If the game added every topic to every character the scrolling list of topics would be ridiculously long. So the game works like this. It only adds topic which  
There are an awful lot of topics in the game list. If the game added every topic to every character the scrolling list of topics would be ridiculously long. So the game works like this. It only adds topic which  


a) Have a valid response (one whose conditions are met)  
A) Have a valid response (one whose conditions are met)  


And
And
Line 360: Line 352:
So are you ready to write a script.
So are you ready to write a script.


[b]Our First Script[/b]
'''Our First Script


We are going to write a bit of script which will add a topic to the players learned list and thus allow NPC’s to use that topic when we activate them.
We are going to write a bit of script which will add a topic to the players learned list and thus allow NPC’s to use that topic when we activate them.
Line 420: Line 412:
Many functions accept or need you to include extra bits of information called a parameter.  
Many functions accept or need you to include extra bits of information called a parameter.  


Player.additem gold001 100
  Player.additem gold001 100


The 100 is a parameter that lets the game know how much gold to add.
The 100 is a parameter that lets the game know how much gold to add.
Line 426: Line 418:
Object ID: Several functions work by doing something to a game object. Remember all the objects are listed in the object window, so objects include Actors.  
Object ID: Several functions work by doing something to a game object. Remember all the objects are listed in the object window, so objects include Actors.  


Player.additem gold001 100
  Player.additem gold001 100


Here gold001 is the object id
Here gold001 is the object id
Line 442: Line 434:
The FUNCTION we will use is called AddTopic. Its syntax (the way the computer needs it to be written so it works) is this
The FUNCTION we will use is called AddTopic. Its syntax (the way the computer needs it to be written so it works) is this


[i]AddTopic TopicID[/i]
''''AddTopic TopicID


Firstly the use of capitals in any function is optional  
Firstly the use of capitals in any function is optional  
Line 457: Line 449:
Take a deep breath. Now go back to the quest Data tab. Next to the quest script box is a button with three dots … Click this and the script editing window opens up.
Take a deep breath. Now go back to the quest Data tab. Next to the quest script box is a button with three dots … Click this and the script editing window opens up.


[b]The Script Editing Window[/b]
'''The Script Editing Window


The script editor is in essence, a very basic text editor, used for writing and editing scripts. Many scripter use external text editors like, word, works, WordPad and notepad to develop long scripts. One reason for this is that the script editor will only save compiled scripts which must be 100% correct. It also allows you to keep a back-up version.  
The script editor is in essence, a very basic text editor, used for writing and editing scripts. Many scripter use external text editors like, word, works, WordPad and notepad to develop long scripts. One reason for this is that the script editor will only save compiled scripts which must be 100% correct. It also allows you to keep a back-up version.  
Line 526: Line 518:
We write this in the editor like this  
We write this in the editor like this  


Scriptname BGM001QuestScript
  Scriptname BGM001QuestScript


(We could also use a shorthand version
(We could also use a shorthand version


Scn BGM001QuestScript
  Scn BGM001QuestScript


Many functions and command have shorthand versions. In this tutorial I will always use the full version.)
Many functions and command have shorthand versions. In this tutorial I will always use the full version.)
Line 547: Line 539:
There are lots of BLOCK types available.
There are lots of BLOCK types available.


[url=http://cs.elderscrolls.com/constwiki/index.php/Begin]Wiki Block Types Page[/url]
[[Begin|Wiki Block Types Page]]


The vast majority of begin blocks run only once.  
The vast majority of begin blocks run only once.  
Line 555: Line 547:
So lets type  
So lets type  


Begin GameMode
  Begin GameMode


(Remember the capitals are purely for clarity)
(Remember the capitals are purely for clarity)
Line 561: Line 553:
Now let’s add the instruction
Now let’s add the instruction


AddTopic Message4U
  AddTopic Message4U


And finally the
And finally the


End
  End


Command
Command
Line 604: Line 596:
This uses an.
This uses an.


[b]If-EndIf Blocks.[/b]
'''If-EndIf Blocks.


No other command is more important to good quality functional scripts than the if command. Again those with programming experience will be at a slight advantage as you will have used these before.
No other command is more important to good quality functional scripts than the if command. Again those with programming experience will be at a slight advantage as you will have used these before.
Line 616: Line 608:
The structure of the if block can be summarised as this
The structure of the if block can be summarised as this


[b]If [/b](a set of mathematically based conditions)  
'''If'''(a set of mathematically based conditions)  


           RUN THE SCRIPT INSTRUCTIONS LOCATED HERE IF THE CONDITIONS ARE TRUE
           RUN THE SCRIPT INSTRUCTIONS LOCATED HERE IF THE CONDITIONS ARE TRUE


[b]ElseIf [/b](a second set of OPTIONAL conditions)
'''ElseIf'''(a second set of OPTIONAL conditions)


           SCRIPT THAT RUNS IF THE SECOND SET IS TRUE. THE CONDITION WILL ONLY BE TESTED IF THE ORIGINAL IF STATEMENT SET OF CONDITIONS ARE FALSE.
           SCRIPT THAT RUNS IF THE SECOND SET IS TRUE. THE CONDITION WILL ONLY BE TESTED IF THE ORIGINAL IF STATEMENT SET OF CONDITIONS ARE FALSE.


[b]Else[/b] (No Conditions)
'''Else''' (No Conditions)


             OPTIONAL SCRIPT THAT RUNS IF ALL OTHER CONDITIONS ARE FALSE.  
             OPTIONAL SCRIPT THAT RUNS IF ALL OTHER CONDITIONS ARE FALSE.  
IF THE ELSEIF AND ELSE COMMANDS ARE OMITTED THE BLOCK DOES NOTHING IF THE ORIGINAL CONDITIONS ATTACHED TO THE IF STAEMENT ARE NOT MET.
IF THE ELSEIF AND ELSE COMMANDS ARE OMITTED THE BLOCK DOES NOTHING IF THE ORIGINAL CONDITIONS ATTACHED TO THE IF STAEMENT ARE NOT MET.


[b]EndIf[/b]
'''EndIf'''
So all IF blocks, must contain an IF command, a set of conditions, some instructions and an EndIf command. The ElseIf and Else commands are optional, and add versatility to the block.
So all IF blocks, must contain an IF command, a set of conditions, some instructions and an EndIf command. The ElseIf and Else commands are optional, and add versatility to the block.


Line 649: Line 641:
So add the line
So add the line


Short DoOnce1
  Short DoOnce1


Just after the script name line. You can leave lines to help clarity. Again these are ignored by the program when it runs the script.
Just after the script name line. You can leave lines to help clarity. Again these are ignored by the program when it runs the script.
Line 657: Line 649:
Change the Begin block to look like this.
Change the Begin block to look like this.


Begin GameMode
  Begin GameMode
If (DoOnce1 == 0)
  If (DoOnce1 == 0)
AddTopic Message4U
  AddTopic Message4U
Set DoOnce1 to 1
  Set DoOnce1 to 1
EndIf
  EndIf
End
  End


This is perfectly fine but it can get a little hard to read, when these if statements get long and complex. So again we use an optional convention. We indent using the tab key all lines after an IF statement, to make clear what is going on. So
This is perfectly fine but it can get a little hard to read, when these if statements get long and complex. So again we use an optional convention. We indent using the tab key all lines after an IF statement, to make clear what is going on. So
Line 677: Line 669:


This can take the form of
This can take the form of
- A fixed number like our script.
*A fixed number like our script.
- The result of a mathematical calculation.
*The result of a mathematical calculation.
- The value of another variable
*The value of another variable
- Or the outcome of a comparison statement.  
*Or the outcome of a comparison statement.  


IF statements and Set statements both use standard mathematical comparisons  
IF statements and Set statements both use standard mathematical comparisons  
Line 725: Line 717:
The third major problem is that this topic has been added to every NPC in the game. It is just about conceivable that if you complete every quest in the game and then some that you might meet every NPC there is, but I don’t see how it’s logical to suggest that they all might know Vilanus Villa and know he has a message for you. We need to limit who speaks to you on this topic. We must set some response conditions.
The third major problem is that this topic has been added to every NPC in the game. It is just about conceivable that if you complete every quest in the game and then some that you might meet every NPC there is, but I don’t see how it’s logical to suggest that they all might know Vilanus Villa and know he has a message for you. We need to limit who speaks to you on this topic. We must set some response conditions.


[b]Conditions[/b]
'''Conditions


The conditions box in the Topic Tab is used to limit who gets to say a particular response.
The conditions box in the Topic Tab is used to limit who gets to say a particular response.
Line 823: Line 815:


Try this yourself
Try this yourself
[b]Adding Topics[/b]
'''Adding Topics


We also want to add a new topic as a result of this response.  
We also want to add a new topic as a result of this response.  
Line 852: Line 844:
I’ll use these summaries throughout these tutorials as a direction for you to use. I have used this table as a template when planning my own quests and found them really useful. Remember if you get stuck refer to the PLAY TEST version to see how it should look.
I’ll use these summaries throughout these tutorials as a direction for you to use. I have used this table as a template when planning my own quests and found them really useful. Remember if you get stuck refer to the PLAY TEST version to see how it should look.


[b]Stage Update[/b]
'''Stage Update


Now return to the quest stage tab.
Now return to the quest stage tab.
Line 862: Line 854:
I have been told a lawyer called Vilanus Villa is looking for me. I should find out where he is staying. He may have important news for me.
I have been told a lawyer called Vilanus Villa is looking for me. I should find out where he is staying. He may have important news for me.


Ok we have now added a topic called [b]Messgae4u.[/b]
Ok we have now added a topic called '''Messgae4u.


For now save and go test.  
For now save and go test.  
Line 893: Line 885:
Don’t forget to copy the conditions and alter the GetInCell parameter.
Don’t forget to copy the conditions and alter the GetInCell parameter.


[b]Using the GREETING topic[/b]
'''Using the GREETING topic


Another way to pass on information via dialogues is to use the GREETING topic. If you remember the discussion in lesson four about how conversations work, all dialogues begin with a GREETING, which is selected by the game from the GREETING topic.  
Another way to pass on information via dialogues is to use the GREETING topic. If you remember the discussion in lesson four about how conversations work, all dialogues begin with a GREETING, which is selected by the game from the GREETING topic.  
Line 904: Line 896:
Add this response first to the GREETING topic. Note this is blank because there are no GREETING responses added by this quest yet.
Add this response first to the GREETING topic. Note this is blank because there are no GREETING responses added by this quest yet.


[i]Hello, my name is Vilanus Villa and I've been looking for you. I'm afraid I have some bad news[/i]
''''Hello, my name is Vilanus Villa and I've been looking for you. I'm afraid I have some bad news''''


Now click OK to add the response.
Now click OK to add the response.
Line 910: Line 902:
Then in the centre response details box, not the upper info  box, right click and add a new response. You’ll get a new interface to write in.
Then in the centre response details box, not the upper info  box, right click and add a new response. You’ll get a new interface to write in.


[i]Your uncle has passed away peacefully in his sleep.[/i]
''''Your uncle has passed away peacefully in his sleep.


Then add another
Then add another


[i]I have been asked to look after his last will and testament[/i]
''''I have been asked to look after his last will and testament


We can go adding new lines to this response info if we wish. In the top box we can see the number of responses increments to 3. The text appears in the top box as.
We can go adding new lines to this response info if we wish. In the top box we can see the number of responses increments to 3. The text appears in the top box as.
Line 931: Line 923:
We need to have an NPC reference which is why we built BGVilanusVilla first. We will also restrict this response to the opening stage of our quest.
We need to have an NPC reference which is why we built BGVilanusVilla first. We will also restrict this response to the opening stage of our quest.


[b]QuestStage BGM001==10
'''QuestStage BGM001==10
GetIsID BGVilanusVilla==1
'''GetIsID BGVilanusVilla==1
[/b]


Now we want to add a new topic called BGWill. However, there is an issue, and many thanks to Hecks for pointing this out, when adding topics to the GREETING or indeed any existing Bethusda topic. For technical reasons, the topic might not get added if more than one plug-in is attempting to use GREETING to add a topic.
Now we want to add a new topic called BGWill. However, there is an issue, and many thanks to Hecks for pointing this out, when adding topics to the GREETING or indeed any existing Bethusda topic. For technical reasons, the topic might not get added if more than one plug-in is attempting to use GREETING to add a topic.
Line 942: Line 933:
Now add this by now familiar script function to the result script for this info response.
Now add this by now familiar script function to the result script for this info response.


AddTopic BGWill
  AddTopic BGWill


Job Done.
Job Done.
Line 950: Line 941:
We can stop this by setting up what I call a conditional pair of responses.
We can stop this by setting up what I call a conditional pair of responses.


[b]Conditional Pairs[/b]
'''Conditional Pairs


These are a very common device used throughout the official quests. We set up two response infos to the same topic. We then use a quest variable or a function condition to control which of the two responses is said.  
These are a very common device used throughout the official quests. We set up two response infos to the same topic. We then use a quest variable or a function condition to control which of the two responses is said.  
Line 971: Line 962:
This is automatically set at zero. We can use the response result box to bump this up to one after speech with this bit of script .
This is automatically set at zero. We can use the response result box to bump this up to one after speech with this bit of script .


[b]Set BGM001.MetVilla to 1[/b]
'''Set BGM001.MetVilla to 1


Don’t forget to click the compile button.  
Don’t forget to click the compile button.  
Line 987: Line 978:
Add to the Quest Stage a journal update
Add to the Quest Stage a journal update


[i]I have been told that I may have inherited some property, 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 details
''''I have been told that I may have inherited some property, 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 details
[/i]


We will also add a Quest Stage Result Script.
We will also add a Quest Stage Result Script.
Line 1,000: Line 990:
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 instructions.  
It uses standard HTML instructions.  
For now the key command is <br> which produces a line break, or new line. Leave the font face alone.
For now the key command is <nowiki><br></nowiki> which produces a line break, or new line. Leave the font face alone.


BGHubartLetter
BGHubartLetter
Line 1,007: Line 997:


Now type this in the results script box for Stage 20 and compile it using the button below.
Now type this in the results script box for Stage 20 and compile it using the button below.
[i]
 
Player.additem "BGHubartLetter" 1[/i]
  Player.additem "BGHubartLetter" 1


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
Line 1,017: Line 1,007:


We have completed phase one, now we move to Chorrol.
We have completed phase one, now we move to Chorrol.
This has been EDITED to take account of the add topic iss
Anonymous user