Difference between revisions of "A beginner's guide - Appendix 3"

m
Undo revision 48236 by BentontRazo (talk). It's just a bot created junk injection.
imported>Juharfalvi
(adding new content)
 
imported>Jaime74
m (Undo revision 48236 by BentontRazo (talk). It's just a bot created junk injection.)
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
=='''Appendix Three: NPC Behaviour'''==
{{ABGContents}}
=='''Appendix Three: NPC Behavior'''==


In tutorial 6, when we begin to build our own quest, I am going to look at the main ideas behind NPC creation, and will spend a lot more time looking at this window and its tabs.
In tutorial 6, when we begin to build our own quest, I am going to look at the main ideas behind NPC creation, and will spend a lot more time looking at this window and its tabs.
Line 5: Line 6:
For this lesson, however, I want to focus on the AI window. Click on Velwyn's AI Button to open it.
For this lesson, however, I want to focus on the AI window. Click on Velwyn's AI Button to open it.


'''AI Button'''
[[AI Button|AI Button]]
<br>This window displays the AI screen for that creature or NPC. It contains a number of flags, boxes and tabs. Along the top are four boxes that are used to set NPC character behaviours.
<br>This window displays the AI screen for that creature or NPC. It contains a number of flags, boxes and tabs. Along the top are four boxes that are used to set NPC character behaviors.


'''Aggression'''
'''Aggression'''
Line 29: Line 30:
The actor cannot make the actual arrest though.  
The actor cannot make the actual arrest though.  


Below this are sequences of flags that control NPC/merchant behaviour.
Below this are sequences of flags that control NPC/merchant behavior.


'''Buys/Sells'''.  
'''Buys/Sells'''.  
Line 45: Line 46:
'''Training'''  
'''Training'''  
<br>Checkbox to allow the NPC to offer skills training as a service.  The drop down box is used to select the skill for training and the number field determines the maximum skill value the NPC can train you to.
<br>Checkbox to allow the NPC to offer skills training as a service.  The drop down box is used to select the skill for training and the number field determines the maximum skill value the NPC can train you to.


'''AI Package List'''
'''AI Package List'''
<br>This is the list of packages this actor will run. See '''Packages''' for more information.  
<br>This is the list of packages this actor will run. See [[AI Package]]s for more information.  


'''Packages'''
'''Packages'''
Line 56: Line 59:


Every hour unless we force an evaluation, the actor's package list is examined from the top to the bottom. The first package that has all its conditions (including a schedule) met, is executed regardless of the other packages. If you place an open ended wander package at the top of the list, the actor will keep using it.
Every hour unless we force an evaluation, the actor's package list is examined from the top to the bottom. The first package that has all its conditions (including a schedule) met, is executed regardless of the other packages. If you place an open ended wander package at the top of the list, the actor will keep using it.


'''Package Type'''  
'''Package Type'''  
<br>Sets the basic behaviour type for the package. Each type enables and disables appropriate fields in the tabs. The behaviour type determines the animations that the character performs.
<br>Sets the basic behavior type for the package. Each type enables and disables appropriate fields in the tabs. The behavior type determines the animations that the character performs.


'''Flags'''
'''Flags'''
<br>A set of flags that modify the behaviour of the package.  
<br>A set of flags that modify the behavior of the package.  


'''Door Flags'''
'''Door Flags'''
Line 76: Line 81:
   
   
'''- Near Reference:''' Select the reference from the render window or from the lists.  
'''- Near Reference:''' Select the reference from the render window or from the lists.  
<br>'''- In Cell:''' Not recommended. It can produce unexpected behaviour.  
<br>'''- In Cell:''' Not recommended. It can produce unexpected behavior.  


For example if you set an '''Eat package''' for a Tavern Cell, the actor can eat anywhere in that cell, which may not cause any odd problems. However, setting a '''sleep package''' to the same Tavern will see the Actor try to sleep in the first bed they can. Most bars have beds behind the bar for the '''innkeeper''' to sleep on. The actor may occupy this bed, forcing the Innkeeper to leave the premises to find a bed in other cell.
For example if you set an '''Eat package''' for a Tavern Cell, the actor can eat anywhere in that cell, which may not cause any odd problems. However, setting a '''sleep package''' to the same Tavern will see the Actor try to sleep in the first bed they can. Most bars have beds behind the bar for the '''innkeeper''' to sleep on. The actor may occupy this bed, forcing the Innkeeper to leave the premises to find a bed in other cell.
Line 86: Line 91:


'''Radius'''
'''Radius'''
<br>The distance from the package's centre that is considered valid.  
<br>The distance from the package's centre that is considered valid. Units are inches.


'''Target Tab'''
'''Target Tab'''
<br>Some packages types have a target (reference) that is independent of the location. This takes the actor to a precise point.
<br>Some packages types have a target (reference) that is independent of the location. This takes the actor to a precise point or supplies an additional argument object for the AI function.


'''Specific Reference'''
'''Specific Reference'''
Line 101: Line 106:


The Package types available are all context sensitive. Each has its own rules for what location means and what target means. The following is a re-jig of the instructions in the Wiki for the packages.
The Package types available are all context sensitive. Each has its own rules for what location means and what target means. The following is a re-jig of the instructions in the Wiki for the packages.


'''Accompany Package'''
'''Accompany Package'''
Line 108: Line 115:


'''- Location :''' Not applicable...
'''- Location :''' Not applicable...


'''Ambush Package'''
'''Ambush Package'''
Line 143: Line 152:
|Open it. Go through for load doors.  
|Open it. Go through for load doors.  
|}
|}


'''Cast Magic Package'''
'''Cast Magic Package'''
Line 152: Line 163:


'''NOTE:''' The '''Target''' of the '''package''' is the spell you want to cast - not who or what you want it cast it on.
'''NOTE:''' The '''Target''' of the '''package''' is the spell you want to cast - not who or what you want it cast it on.


'''Eat Package'''
'''Eat Package'''
<br>In order to eat the actor must have an ingredient that restores fatigue in his container. If he/she does not have the food item, they will attempt to gain the object by buying, killing, stealing or finding it. No actor with a responsibility above 30 will steal or kill for food unless it is a creature. If they can not find food they can use, they will go into a wander state (acts just like wander behaviour) and search for food again periodically. Remember there is no physical reason for an Actor to eat. He will not die. This is used to add life-like behaviour to actors, not as an essential part of the game mechanics.
<br>In order to eat the actor must have an ingredient that restores fatigue in his container. If he/she does not have the food item, they will attempt to gain the object by buying, killing, stealing or finding it. No actor with a responsibility above 30 will steal or kill for food unless it is a creature. If they can not find food they can use, they will go into a wander state (acts just like wander behavior) and search for food again periodically. Remember there is no physical reason for an Actor to eat. He will not die. This is used to add life-like behavior to actors, not as an essential part of the game mechanics.


'''- Location:''' Where to sit, which can be as specific as a particular chair in the tavern or as general as the town tavern cell. In general, NPCs will attempt to find somewhere to sit while eating.  
'''- Location:''' Where to sit, which can be as specific as a particular chair in the tavern or as general as the town tavern cell. In general, NPCs will attempt to find somewhere to sit while eating.  


'''- Target:''' If the eat package has a target, the actor must have or find that target to eat it. This must be an ingredient.
'''- Target:''' If the eat package has a target, the actor must have or find that target to eat it. This must be an ingredient.


'''Escort Package'''
'''Escort Package'''
Line 168: Line 183:


'''- Location:''' is the destination of the escort package. A location is required to make an escort package.  
'''- Location:''' is the destination of the escort package. A location is required to make an escort package.  


'''Find Package'''
'''Find Package'''
Line 205: Line 222:


'''- Target:''' The NPC will Travel towards the target until it gets within Target Radius, then it activates the target. The count setting determines how many of these the actor will attempt to find.  
'''- Target:''' The NPC will Travel towards the target until it gets within Target Radius, then it activates the target. The count setting determines how many of these the actor will attempt to find.  


'''Flee Package'''
'''Flee Package'''
Line 212: Line 231:


'''- Target:''' Who or what to flee from. '''Distance''' is the distance the actor will try to stay away from his flee target.  
'''- Target:''' Who or what to flee from. '''Distance''' is the distance the actor will try to stay away from his flee target.  


'''Follow Package'''
'''Follow Package'''
Line 219: Line 240:


'''- Location:''' The destination of the follow is not required, but can be applied. A follow can end by reaching the '''destination''' or if the '''duration''' runs out. A Duration of 0 means this package will not end until '''a package of higher precedence''' needs to start.  
'''- Location:''' The destination of the follow is not required, but can be applied. A follow can end by reaching the '''destination''' or if the '''duration''' runs out. A Duration of 0 means this package will not end until '''a package of higher precedence''' needs to start.  


'''Sleep Package'''
'''Sleep Package'''
Line 227: Line 250:


- If they can not find a bed they will go into a wander state, periodically checking for a bed.  
- If they can not find a bed they will go into a wander state, periodically checking for a bed.  


'''Travel Package'''
'''Travel Package'''
Line 251: Line 276:


'''--- Duration &gt; 0:''' '''Must Reach Location'''. Travel until you reach location. Will not re-evaluate to any other package until location is reached.  If the NPC reaches the location before end of duration, it may re-evaluate to higher priority package if applicable.  
'''--- Duration &gt; 0:''' '''Must Reach Location'''. Travel until you reach location. Will not re-evaluate to any other package until location is reached.  If the NPC reaches the location before end of duration, it may re-evaluate to higher priority package if applicable.  


'''UseItemAt Package'''
'''UseItemAt Package'''
Line 259: Line 286:


If the idle animation is set up properly, the actor will play the idle associated with the item. (See Later for an example in this quest)
If the idle animation is set up properly, the actor will play the idle associated with the item. (See Later for an example in this quest)


'''Wander Package'''
'''Wander Package'''
Anonymous user