Difference between revisions of "A beginner's guide, lesson 6 - Quest Dialogue"
A beginner's guide, lesson 6 - Quest Dialogue (edit)
Revision as of 06:35, 28 July 2010
, 06:35, 28 July 2010→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. | ||
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 | |||
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 | 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. | ||
These conditions are just like the ones we used in Quest Data before. | |||
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. | |||
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 | |||
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. | ||
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 | Select New in the condition box with the response "I hear a lawyer named..." highlighted. | ||
In the | In the ''Condition Function'' drop down menu, scroll down to the function [[GetIsRace]]. | ||
Click on the ''Function Parameter'' box and a list of races will be displayed. These are the valid parameters for this function. | |||
Click on | Select "Argonian" from the list. | ||
Select Argonian from the list. | The comparison reads == by default, so you can leave that unchanged. | ||
The comparison reads == | 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. | We want to change this to the negative response: 0.0000. | ||
We want to change this to the | |||
In English this means: | In English this means: | ||
Look at the Actor who might | Look at the Actor who might use this response. Check what race they are. If they are not an Argonian, then carry on. | ||
Otherwise, they are an Argonian and should not be able to use this line. | |||
(Note the condition Argonian == 0 is | (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 | Right-click on the condition we just created and copy it using the Copy option from 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. | ||
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, Imperialsm and Nords (i.e. the Human races). | |||
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 | We call these conditions "exclusive conditions" because they exclude a group or individual from using that response. | ||
We also want to limit the in-game locations where these lines are valid. | |||
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''. | |||
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. | |||
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 | |||
In the condition box select | In the condition box select New. | ||
Now select condition function GetInCell. | Now select condition function [[GetInCell]]. | ||
The parameter for this is | 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 | 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 | 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 | 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 | 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. |