Difference between revisions of "Sandbox Package"

Jump to navigation Jump to search
603 bytes added ,  20:50, 5 January 2009
Document settings here instead of linking to individual pages for most settings. Link to ISandBoxPreventRepeatedActionTime documentation.
imported>Jwoodward
 
imported>SnakeChomp
(Document settings here instead of linking to individual pages for most settings. Link to ISandBoxPreventRepeatedActionTime documentation.)
 
Line 1: Line 1:
The '''Sandbox Package''' allows NPCs to exhibit autonomous ambient behavior without the need for explicit schedules.  When assigned to use a sandbox package, an NPC will automatically interact with food, furniture, [[Idle Markers]], and other characters in the world.
The '''Sandbox Package''' allows NPCs to exhibit autonomous ambient behavior without the need for explicit schedules.  When assigned to use a sandbox package, an NPC will automatically interact with food, furniture, [[Idle Markers]], and other characters in the world.


=='''Action Selection'''==
==Action Selection==
When a sandbox package starts up, it builds a list of nearby objects with which it could interact.  To select an action, it computes a score for each object, based on the specifics of that object.  That score will be set to zero if that object becomes an invalid target, or if it was the same object that the sandbox just selected previously.  Each object's score is then weighted by a relative "probability" value based on the ''type'' of the interaction (i.e. sleep, eat, use furniture, use idle markers, or dialogue).  The sandbox maintains these probability values over time, adjusting them each time it choses a target object.  It drops the probability to zero for the type that was just chosen, and increases the probability for the other types.  This ensures that the actor will not select the same kind of action repeatedly (unless it has no other options).  For example, after eating, the probability of eating again immediately will be zero, but will increase over time as the actor performs actions other than eating.
When a sandbox package starts up, it builds a list of nearby objects with which it could interact.  To select an action, it computes a score for each object, based on the specifics of that object.  That score will be set to zero if that object becomes an invalid target, or if it was the same object that the sandbox just selected previously.  Each object's score is then weighted by a relative "probability" value based on the ''type'' of the interaction (i.e. sleep, eat, use furniture, use idle markers, or dialogue).  The sandbox maintains these probability values over time, adjusting them each time it choses a target object.  It drops the probability to zero for the type that was just chosen, and increases the probability for the other types.  This ensures that the actor will not select the same kind of action repeatedly (unless it has no other options).  For example, after eating, the probability of eating again immediately will be zero, but will increase over time as the actor performs actions other than eating.


=='''Idle Markers'''==
Also see the [[ISandBoxPreventRepeatedActionTime]] setting.
 
==Idle Markers==
Much of the behavior of an NPC using the sandbox package results directly from data attached to objects in the world (idle markers, with collections of potential animation), or simply from the presence of objects in the word (furniture, food, other NPCs), with no extra data required.  
Much of the behavior of an NPC using the sandbox package results directly from data attached to objects in the world (idle markers, with collections of potential animation), or simply from the presence of objects in the word (furniture, food, other NPCs), with no extra data required.  


See [[Idle Markers]] for more information about what can be specified on a marker.
See [[Idle Markers]] for more information about what can be specified on a marker.


=='''Sleeping'''==
==Sleeping==
Sleep time and duration is calculated when the sandbox package starts, and then recalculated once per day as necessary.
Sleep time and duration is calculated when the sandbox package starts, and then recalculated once per day as necessary.


Sleeping is based on the following gamesettings:
Sleeping is based on the following gamesettings:
;[[iSandboxSleepStartMin]]: Min time to start sleeping. (Default = 19)
 
;[[iSandboxSleepStartMax]]: Max time to start sleeping. (Default = 1)
{{SettingGroupHeader}}
;[[iSandboxSleepDurationMin]]: Minimum duration for sleeping. (Default = 6)
{{SettingGroupSetting
;[[iSandboxSleepDurationMax]]: Maximum duration for sleeping. (Default = 10)
|Name = iSandboxSleepStartMin
|Default = 19
|Description = Min time to start sleeping.
}}
{{SettingGroupSetting
|Name = iSandboxSleepStartMax
|Default = 1
|Description = Max time to start sleeping.
}}
{{SettingGroupSetting
|Name = iSandboxSleepDurationMin
|Default = 6
|Description = Minimum duration for sleeping.
}}
{{SettingGroupSetting
|Name = iSandboxSleepDurationMax
|Default = 10
|Description = Maximum duration for sleeping.
}}
{{SettingGroupFooter}}


===Start Time===
===Start Time===
Line 26: Line 47:
Rolls randomly for sleep duration using iSandboxSleepDurationMin and iSandboxSleepDurationMax.
Rolls randomly for sleep duration using iSandboxSleepDurationMin and iSandboxSleepDurationMax.


=='''Eating Meals'''==
==Eating Meals==
Sandboxing actors calculate their mealtimes when the sandbox package starts, and then recalculate them once per day as necessary.
Sandboxing actors calculate their mealtimes when the sandbox package starts, and then recalculate them once per day as necessary.


The meal times are based on the following gamesettings:
The meal times are based on the following gamesettings:
;[[iSandboxBreakfastMin]]: Min time to start eating breakfast. (Default = 6)
;[[iSandboxBreakfastMax]]: Max time to start eating breakfast. (Default = 9)
;[[iSandboxLunchMin]]: Min time to start eating lunch. (Default = 11)
;[[iSandboxLunchMax]]: Max time to start eating lunch. (Default = 14)
;[[iSandboxDinnerMin]]: Min time to start eating dinner. (Default = 17)
;[[iSandboxDinnerMax]]: Max time to start eating dinner. (Default = 20)


;[[iSandboxMealDurationMin]]: Min duration for eating a meal. (Default = 0)
{{SettingGroupHeader}}
;[[iSandboxMealDurationMax]]: Max duration for eating a meal. (Default = 2)
{{SettingGroupSetting
|Name = iSandboxBreakfastMin
|Default = 6
|Description = Min time to start eating breakfast.
}}
{{SettingGroupSetting
|Name = iSandboxBreakfastMax
|Default = 9
|Description = Max time to start eating breakfast.
}}
{{SettingGroupSetting
|Name = iSandboxLunchMin
|Default = 11
|Description = Min time to start eating lunch.
}}
{{SettingGroupSetting
|Name = iSandboxLunchMax
|Default = 14
|Description = Max time to start eating lunch.
}}
{{SettingGroupSetting
|Name = iSandboxDinnerMin
|Default = 17
|Description = Min time to start eating dinner.
}}
{{SettingGroupSetting
|Name = iSandboxDinnerMax
|Default = 20
|Description = Max time to start eating dinner.
}}
{{SettingGroupSetting
|Name = iSandboxMealDurationMin
|Default = 0
|Description = Min duration for eating a meal.
}}
{{SettingGroupSetting
|Name = iSandboxMealDurationMax
|Default = 2
|Description = Max duration for eating a meal.
}}
{{SettingGroupFooter}}


=='''Other Behaviors'''==
==Other Behaviors==


When not sleeping or eating a meal, the actor can engage in other activities -- if allowed by the package and available within the package radius.
When not sleeping or eating a meal, the actor can engage in other activities -- if allowed by the package and available within the package radius.


===Behaviors:===
===Behaviors===
* Conversation -- no duration, the behavior is done when the conversation is finished.
* Conversation -- no duration, the behavior is done when the conversation is finished.
* Furniture (chairs, etc.) -- pick duration as below
* Furniture (chairs, etc.) -- pick duration as below
Line 55: Line 110:




=='''Package Specific data'''==
==Package Specific data==
*'''Starting Location:'''
*'''Starting Location:'''
** '''Near Reference:''' The actor will Sandbox at this location. If the specified location is the start of a linked patrol route, the actor will Sandbox at each patrol point for a duration specified by Patrol Idle Time, then move on to the next linked location after it completes its current action.
** '''Near Reference:''' The actor will Sandbox at this location. If the specified location is the start of a linked patrol route, the actor will Sandbox at each patrol point for a duration specified by Patrol Idle Time, then move on to the next linked location after it completes its current action.
Line 68: Line 123:
** Wandering
** Wandering


=='''Flags'''==
==Flags==
*'''Must Complete:''' Invalid.
*'''Must Complete:''' Invalid.


[[Category:Packages]]
[[Category:Packages]]
Anonymous user

Navigation menu