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

→‎Conditions: Editing English
imported>Pyrocow2
m (→‎If-EndIf Blocks: adding section)
imported>Pyrocow2
(→‎Conditions: Editing English)
Line 723: Line 723:
==Conditions==
==Conditions==


The conditions box in the Topics Tab is used to limit who gets to say a particular response.
The conditions box in the Topics Tab is used to limit who gets to say a particular response. We can limit this in many ways.


We can limit this in many ways
For example, Restrict by group ([[GetInFaction]]), race ([[GetRace]]) or limit to only one NPC ([[GetIsID]]), Restrict by Worldspace, City, Cell or distance from a particular chair, Restrict by Game Time, Season, Weather or progress of quest.


For example, Restrict by group ([[GetInFaction]]), race ([[GetRace]]) or limit to only one NPC ([[GetIsID]]),Restrict by Worldspace, City, Cell or distance from a particular chair, Restrict by Game Time, Season, Weather or progress of quest.
Open up the topics tab, select the BGMMessage4u topic and highlight the response we added earlier.
 
Open up the topics tab, select the BGMMessage4u topic and highlight the response we have added earlier.


At the bottom of the window is the condition box.  
At the bottom of the window is the condition box.  
Again we can use Right Click-New to add conditions or we can click on the new button at the bottom of the tab page.
Again we can use Right-click + New to add conditions, or we can click on the New button at the bottom of the tab page.


The organization of these is the same as the quest conditions we set before.
These conditions are just like the ones we used in Quest Data before.


The default position is to add a topic to all NPCs and we need to use the conditions to reduce this number.  
By default, all NPCs will have our new topic available. We need to use conditions to choose which NPCs can or can't display our topic.
 
Again what conditions you apply is up to you, and the nature of the topic and response.
This particular topic is a general one and we want to set some general conditions just to reduce the number of NPCs that can use it.  
This particular topic is a general one and we want to set some general conditions just to reduce the number of NPCs that can say it.  


First let's get rid of a number of races. Why?  
First let's get rid of a number of races. Why?  
Well in the middle part of the window is the response box.  
Well, in the middle part of the window is the response box.  
Double click on the response to the BGMMessage4u topic to re-open the pop-up response dialog box.  
Double click on the response to the BGMMessage4u topic to re-open the pop-up response dialog box.  
Have a look at the lower section and you can see a long list.
Have a look at the lower section and you can see a long list.
   
   
This is the list of expected MP3 files which we would need to create. It is very long.
This is the list of expected MP3 files which we would need to create. It is very long; it expects both a male and female response for every single race.  
It expects both a male and female response for every race.  


We can remove some of these to make our life easier later on
We can remove some of these to make our life easier later on, when it's time to record.


Select new in the condition box with this response highlighted.
Select New in the condition box with the response "I hear a lawyer named..." highlighted.


In the function drop down menu, scroll down to the function GetIsRace.
In the ''Condition Function'' drop down menu, scroll down to the function [[GetIsRace]].  
The function parameter box now reads invalid.  
Click on the ''Function Parameter'' box and a list of races will be displayed. These are the valid parameters for this function.  
Click on this and a list of playable races is display.  
Select "Argonian" from the list.  
Select Argonian from the list.  
The comparison reads == by default, so you can leave that unchanged.
The comparison reads == which is correct.  
The value current reads 1.0000. This is value the function [[GetIsRace]] would give if the character's race was in fact "Argonian".  
The value current reads 1.000. This is mathematical speak for a true response.  
We want to change this to the negative response: 0.0000.
We want to change this to the false response 0.000.


In English this means:  
In English this means:  


Look at the Actor who might say this response. Check what race they are in. If they are not an Argonian (Argonian == 0.000) then carry on.  
Look at the Actor who might use this response. Check what race they are. If they are not an Argonian, then carry on.
If they are an Argonian they fail this condition and they cannot say this line.
Otherwise, they are an Argonian and should not be able to use this line.


(Note the condition Argonian == 0 is mathematically the same as Argonian != 1)
(Note that the condition Argonian == 0 is logically equivalent to Argonian != 1)


Now, let's add a few more Race conditions.  
Now, let's add a few more Race-based conditions.  
Right click in the condition box.
Right-click on the condition we just created and copy it using the Copy option from the menu.
Select the condition and copy it using the options in the menu.  
Now right-click again and paste.  
Now right click and paste.  
We now have an exact copy of our condition.  
We now have an exact copy of our condition.  


In the parameter box click on it and change the race to Elf.  
Click on the parameter box and now choose "Elf".
We now have two races excluded.  
We now have two races excluded.
 
Repeat this process to exclude the other races, until we are left with Bretons, Redguards Imperials and Nords. (I.e. the Human Races).
 
Is this some sort of cultural imperialism on my part?


No It's just I reckon I could add an MP3 file which might sound passable in these races. Orcs, Argonians, and Khajiits have unique voice types that are harder to replicate. It is a matter of style and choice. If you want to extend the range do so.  
Repeat this process to exclude the other races, until we are left with Bretons, Redguards, Imperialsm and Nords (i.e. the Human races).


We call conditions set to == 0 as exclusive conditions since they exclude a group or individual from being in that response.
Is this some sort of cultural imperialism on my part? No, it's just that I reckon I could add an MP3 file which might sound passable for those races. Orcs, Argonians, and Khajiits have unique voice types that are harder to replicate. It is a matter of style and choice. If you want to extend the range, do so.  


We also want to limit the places that these lines are valid.  
We call these conditions "exclusive conditions" because they exclude a group or individual from using that response.


Again I could have chosen any number of locations.  
We also want to limit the in-game locations where these lines are valid.  


I choose the Imperial City because it is after all the Capital, and most PC's will at some time visit the City. It is as ever about style rather than technique and you are free to choose your own path. All major locations, including the cities have special cells created to allow us to do conditions easier.  
All major locations, including the cities, have special "dummy cells" created to allow us to use a single condition on many individual locations. The game searches for cells with a given text string at the beginning of its name. So if we select a cell called "IC", it actually triggers every cell that begins with "IC". Everything from ''ICPalaceLibrary'' to ''ICTalosPlazeTheTiberSeptimHotelUpstairs''.


The game then searches for cells with that text string at the beginning. So by selecting a cell called IC, it actually triggers every cell which begins IC even if that cell then has a lot of other text after it.  
If you called a cell Icnatta or something else that also begins with "IC", even though this cell might have nothing to do with the Imperial City, the catch all nature of the "IC" description means that that cell will also be triggered. This would conflict with the Imperial City's naming prefix. This means we do need to be careful when naming cells.
It also means that we can use this trick ourselves. If we create huge mods that add towns or cities, we can use prefixes in the same way. By carefully naming all my external and interior cells VeronaHouseSomethingorOther, we could then create a "dummy" (i.e., completely empty and unused) cell called VeronaHouse, which would allow us to use VeronaHouse in condition statements and identify if something was anywhere in the Verona House area.


If you called a cell Icnatta or some such, even though this cell might be nothing to do with the Imperial City the catch all nature of the ‘IC' description means it will be considered as part of the Imperial City. This means we do need to be careful when naming cells.
I choose the Imperial City (again, I could have chosen any number of locations) because it is the Capital, and most players will at one point or another visit the City. It is as ever about style rather than technique and you are free to choose your own path.  
It also means of course that we can use this trick if we create huge mods that add towns or cities. By carefully naming all my external and interior cells VeronaHouseSomethingorOther, I could then create a dummy, or completely empty cell called VeronaHouse, which would allow me to use VeronaHouse in condition statements and identify if an event or character was taking place in the Verona House area.


In the condition box select new.  
In the condition box select New.  


Now select condition function GetInCell.  
Now select condition function [[GetInCell]].  
The parameter for this is again initially invalid until we click on it and from the drop down menu select a cell. You can only select cells that are named and unique. Notice all those exterior cells called wilderness don't show up.If you wish to use an exterior cell you must give it a unique name.  
The parameter for this is initially invalid until we click on it select a cell from the menu. You can only select cells that are named and unique. Notice that all those exterior cells called "Wilderness" don't show up. If you wish to use an exterior cell, you must give it a unique name.  


Set the condition to test.  
Set the condition to test. (This is an inclusive condition, since it includes a group in that response.)  
(This is an inclusive condition, since it includes a group in that response.)  


Another way to select groups is by using [[faction]]s (see lesson 7 for more details on creating a Faction)
Another way to select groups is by using [[faction]]s (see lesson 7 for more details on creating a Faction)
   
   
One such faction is the ICFaction. It groups all the NPCs who are considered citizens of this city. It is a useful way to distinguish between the merchants', soldiers, and workers of the capital and a tourist from Chorrol who is passing through. We can use this to again include or exclude factions
One such faction is the ICFaction. It groups all the NPCs who are considered citizens of this city. It is a useful way to distinguish between the merchants, soldiers, and workers of the capital and a tourist from Chorrol who is passing through.


Set up a NEW condition.  
Set up a new condition.  


Choose the [[GetInFaction]] function, and then choose the ICFaction from the list to get a new condition
Choose the [[GetInFaction]] function, and then choose the ''ICFaction'' from the list to get a new condition.
Finally we want to exclude our NPC Vilanus Villa from saying these lines. This is why we added him to the game first.
Finally, we want to exclude our NPC Vilanus Villa from using these lines. It would be awfully silly if Vilanus himself told us, "I hear a lawyer named Vilanus Villa is looking for you."
To do this we use the condition function [[GetIsID]].  
To do this we use the condition function [[GetIsID]].  
Then from the parameter list select BGVilanusVilla.   
Then from the parameter list we select BGVilanusVilla.   
Remember to set the value to 0 so that your condition doesn't include him.
Remember to set the value to == 0 (or != 1) so that your condition EXCLUDES him.


Finally, we want to set a condition that removes this topic from all potential speakers once we have met Villa.
Finally, we want to set a condition that removes this topic from all potential speakers once we have met Villa.
Anonymous user