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

→‎Quest Conditions: Editing English
imported>Pyrocow2
(→‎Creating the Quest: Editing English and content)
imported>Pyrocow2
(→‎Quest Conditions: Editing English)
Line 228: Line 228:
==Quest Conditions==
==Quest Conditions==


At the moment this as blank. We are going to input a generic [[condition]]s 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 [[condition]] which has the effect of limiting any conversations and dialogue topics we create in this quest to characters we would expect to speak, thereby excluding those we wouldn't (e.g. goblins and horses).


The conditions are applied to the person speaking the line, called the object. Click the NEW button at the bottom of the page.  
The conditions are applied to the person speaking the line, called the object. Click the NEW button at the bottom of the page.  


The interface to enter conditions is split into four areas and is surrounded by some flag selectors. (We will look at the flags later)
The interface to enter conditions is split into four areas: Condition Function, Function Parameters, Comparison, and Value. There are also some flag selectors, which we will look at later.


===Condition Function===
===Condition Function===
Line 246: Line 246:
:'''GET family:''' Retrieves information from game for comparison  
:'''GET family:''' Retrieves information from game for comparison  


Clearly I cannot go through each of these in turn. In truth most of their general functions are self explanatory even if their specific use is not.
Clearly I cannot go through each of these in turn. In truth most of their general functions are self explanatory, even if their specific use is not.


===Function parameters===
===Function parameters===


Several functions require a parameter to work. Several don't. It depends on the function.
Some functions require a parameter to work, and some don't. It depends on the function.


For Example the Function [[GetRace]] requires you to select a valid race from a drop down menu for it to make sense. While [[GetIsPlayableRace]] has no parameters.
For example, the function [[GetRace]] requires you to select a valid race from a drop down menu for it to make sense, while [[GetIsPlayableRace]] has no parameters.


===Comparison===
===Comparison===


All conditional statements are in effect arithmetical functions. They are all about comparing two numbers. This is because Functions produce or return numerical value when we use them. The function GetRace ‘Imperial' returns a numerical value of one if the speaker of the line is an Imperial. If not the value is set at zero.
All conditional statements result in boolean values: true or false. They are all about comparing values. Each "conditional function" returns some value which we can then compare to our own set value in a few different ways: less than, more than, equivalent to, not equivalent to, etc. The comparison of those two values will turn out to be either true or false. (e.g.: Either A is more than B, or it isn't. The player has less than or equal to 5000 gold, or he/she doesn't.)
 
We compare this using standard maths expressions like equals (==), not equals (!=), greater than (>), less than (<) etc.


===Value===
===Value===
Line 264: Line 262:
This is the value we compare the conditional function value with. This can be a number or a variable.
This is the value we compare the conditional function value with. This can be a number or a variable.


We want to set up a conditional function that check that the speaker is of the right type. I.e. it is one of the playable races.
===Our condition===
We want to set up a conditional function that checks whether the speaker is of the right type. I.e., that it is one of the playable races (Imperial, High Elf, etc.).


We select from the list, the Function GetIsPlayableRace.
From the ''Condition Function'' list, we choose [[GetIsPlayableRace]].


This has no valid function parameter. (The NPC is either of a playable race or not)
This function does not require a parameter, as it already knows exactly which races are or aren't valid player races. It will return a value of 1 if the object is a playable race, and a value of 0 if not.


From the list of comparisons we choose equals. This is represented by a double equals ==.  
From the list of comparisons we choose equals. This is represented by ==.  


In the value box we select 1.000.
In the value box we select 1.000.
Line 276: Line 275:
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


Find out if the actor is from a playable race. IF this is true carry on. If it is not true, stop the actor from speaking any lines in this quest.
Find out if the actor is from a playable race. IF this is true, carry on. IF NOT, stop the actor from speaking any of the lines from this quest.


We have completed the basic set up for our quest.
We have completed the basic set up for our quest.
Line 286: Line 285:
Now let's select the [[Quest Stages Tab]].
Now let's select the [[Quest Stages Tab]].


Again this is blank. We can add stages in the same way as we added the quest. In the column marked Quest Stages, right click and select new. The pop-up expects a number between 0-255. We tend to use 10, 20 30 etc to allow room for extra stages. Go ahead and enter 10.  
Again, this is blank. We can add stages in the same way as we added the quest. In the column marked ''Quest Stages'', right click and select new. The pop-up expects a number between 0-255. We tend to use 10, 20, 30, etc. to allow room for extra stages. Go ahead and enter 10.  
Now select new again and enter 100. We now have two stages 10 and 100. Right click and enter 20. Initially the list reads 10, 100, and 20.  
Now select new again, and enter 100. We now have two stages: 10 and 100. Now make one more stage and enter 20. Initially the list reads 10, 100, 20.  
But if you go back to the quest data tab, and then return to the stage tab again the list will have updated to read 10,20 100. The CS sorts them for us.
But if you go back to the quest data tab and then return to the stage tab again, the list will have updated to read 10, 20, 100. The CS sorted them for us.


(Note that although the CS lists the stages in numerical order, you do not have to work through the stages in that order. Each stage is discrete and exists in its own right without reference to the other stages)
(Note that although the CS lists the stages in numerical order, you do not have to work through the stages in that order. Each stage is discrete and exists in its own right without reference to the other stages.)


These three stages are blank. Don't worry about this. Until we set the game up to call these stages they do nothing. If we do call a blank stage nothing will happen.
These three stages are blank. Don't worry about this. Until we set the game up to call these stages, they do nothing. If we do call a blank stage nothing will happen.


The next tab is called TARGETS. We will add all the targets at the end of lesson 7. We can add them at any stage. I found it easier to do this at the end.  
The next tab is called TARGETS. We will add all the targets at the end of lesson 7. We can add them at any stage. I found it easier to do this at the end.  
Anonymous user