Test_Pack_Tame
Server/NPC/Roles/_Core/Tests/Flocking/Test_Pack_Tame.json, 8.6 KB
Fields
| Field | Type |
|---|---|
Type | string |
Debug | string |
Appearance | string |
DisplayNames | array[1] |
ApplyAvoidance | boolean |
ApplySeparation | boolean |
FlockAllowedNPC | array[1] |
FlockCanLead | boolean |
FlockInfluenceRange | number |
CollisionViewAngle | number |
SeparationDistance | number |
SeparationWeight | number |
SeparationDistanceTarget | number |
SeparationNearRadiusTarget | number |
SeparationFarRadiusTarget | number |
MotionControllerList | array[1] |
TestType | string |
MaxHealth | object |
Parameters | object |
Instructions | array[2] |
NameTranslationKey | string |
Source
{
"Type": "Generic",
"Debug": "Flock",
"Appearance": "Wolf_White",
"DisplayNames": [ "Tame Me!" ],
"ApplyAvoidance": false,
"ApplySeparation": true,
"FlockAllowedNPC": [ "Test_Wolf_Pack" ],
"FlockCanLead": true,
"FlockInfluenceRange": 4,
"CollisionViewAngle": 0,
"SeparationDistance": 3,
"SeparationWeight": 1,
"SeparationDistanceTarget": 0.5,
"SeparationNearRadiusTarget": 2,
"SeparationFarRadiusTarget": 7,
"MotionControllerList": [
{
"Type": "Walk",
"MaxWalkSpeed": 7,
"Gravity": 10,
"MaxFallSpeed": 8,
"Acceleration": 10
}
],
"TestType": "Normal",
"MaxHealth": { "Compute": "MaxHealth" },
"Parameters": {
"MaxHealth": {
"Value": 100,
"Description": "Max health for the NPC"
}
},
"Instructions": [
{
"Continue": true,
"Instructions": [
{
"Sensor": {
"Type": "Eval",
"Expression": "blocked"
},
"BodyMotion": {
"Type": "Timer",
"Time": [ 2, 5 ],
"Motion": {
"Type": "Wander"
}
}
},
{
"$Comment": "Turn into target",
"Sensor": {
"Type": "Mob",
"Range": 2.1,
"GetPlayers": true,
"OnlyLockedTarget": true
},
"Tag": "Seeking target",
"HeadMotion": {
"Type": "Watch"
}
},
{
"$Comment": "Seek locked target",
"Sensor": {
"Type": "Mob",
"Range": 32,
"GetPlayers": true,
"OnlyLockedTarget": true
},
"Tag": "Seeking target",
"BodyMotion": {
"Type": "Seek",
"SlowDownDistance": 4,
"StopDistance": 2
}
},
{
"$Comment": "Seek flock leader when in flock",
"Sensor": {
"Type": "And",
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockStatus": "Follower"
}
]
}
]
},
"Tag": ";Seeking leader",
"BodyMotion": {
"Type": "Seek",
"SlowDownDistance": 7,
"StopDistance": 4
}
},
{
"$Comment": "Flock leader wolf just walks around or attacks",
"Sensor": {
"Type": "And",
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockStatus": "Leader"
}
]
}
]
},
"Instructions": [
{
"Sensor": {
"Type": "Any"
},
"Tag": "wandering",
"BodyMotion": {
"Reference": "Wander_Circle",
"Modify": { }
}
}
]
}
]
},
{
"Instructions": [
{
"Sensor": {
"Type": "And",
"Once": true,
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockStatus": "Follower"
}
]
}
]
},
"Tag": "Changing followers to black",
"Actions": [
{
"Type": "Appearance",
"Appearance": "Wolf_Black"
}
]
},
{
"Sensor": {
"Type": "And",
"Once": true,
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockPlayerStatus": "Member"
}
]
}
]
},
"Tag": "Clearing flock target",
"Actions": [
{
"Type": "FlockTarget",
"Clear": true
}
]
},
{
"Sensor": {
"Type": "And",
"Once": true,
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockPlayerStatus": "Member"
}
]
}
]
},
"Tag": "Clearing local target",
"Actions": [
{
"Type": "ReleaseTarget"
}
]
},
{
"Sensor": {
"Type": "And",
"Once": true,
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockPlayerStatus": "Member"
}
]
}
]
},
"Tag": "Setting name",
"Actions": [
{
"Type": "DisplayName",
"DisplayName": "*Tamed*"
}
]
},
{
"Sensor": {
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockPlayerStatus": "NotMember"
}
]
},
"Tag": ";Not in flock",
"Instructions": [
{
"$Comment": "Join with player with a special item",
"Sensor": {
"Type": "Player",
"Range": 5,
"Filters": [
{
"Type": "Flock",
"FlockStatus": "NotMember"
},
{
"Type": "ViewSector",
"ViewSector": 270
},
{
"Type": "ItemInHand",
"Items": [ "Farming_Collar" ]
}
]
},
"Tag": ";Joining player",
"Actions": [
{
"Type": "JoinFlock",
"ForceJoin": true
}
]
},
{
"$Comment": "Attack any locked target",
"Sensor": {
"Type": "Mob",
"GetPlayers": true,
"Range": 2.5,
"OnlyLockedTarget": true
},
"Tag": ";Attacking",
"Actions": [
{
"Type": "Attack",
"Attack": "Root_NPC_Attack_Melee"
}
]
},
{
"$Comment": "Can't join - may pick as new target",
"Sensor": {
"Type": "Player",
"Range": 20,
"LockOnTarget": true,
"Filters": [
{
"Type": "ViewSector",
"ViewSector": 270
}
]
},
"Tag": ";leader wolf set target",
"Actions": [
{
"Type": "FlockTarget"
}
]
}
]
},
{
"Sensor": {
"Type": "InflictedDamage",
"Target": "FlockLeader"
},
"Tag": ";Setting flock target",
"Actions": [
{
"Type": "FlockTarget"
}
]
},
{
"Sensor": {
"Type": "Mob",
"GetPlayers": true,
"Range": 2.5,
"OnlyLockedTarget": true,
"Filters": [
{
"Type": "ViewSector",
"ViewSector": 30
}
]
},
"Tag": "Attacking",
"Actions": [
{
"Type": "Attack",
"Attack": "Root_NPC_Attack_Melee"
}
]
}
]
}
],
"NameTranslationKey": "server.npcRoles.Test_Pack_Tame.name"
}