Versions / 0.6.0-pre.3 / NPC / Roles / Intelligent / Aggressive / Scarak / Templates / Template_Scarak_Louse.json
Template_Scarak_Louse
Server/NPC/Roles/Intelligent/Aggressive/Scarak/Templates/Template_Scarak_Louse.json, 21.2 KB
Fields
| Field | Type |
|---|---|
Type | string |
Parameters | object |
IsMemory | object |
MemoriesCategory | object |
MemoriesNameOverride | object |
Appearance | object |
StartState | string |
DropList | object |
DisableDamageGroups | array[1] |
DefaultNPCAttitude | string |
DefaultPlayerAttitude | string |
AttitudeGroup | object |
FlockSpawnTypes | object |
FlockAllowedNPC | object |
BusyStates | array[1] |
KnockbackScale | number |
MotionControllerList | array[1] |
MaxHealth | object |
Instructions | array[2] |
NameTranslationKey | object |
Source
{
"Type": "Abstract",
"Parameters": {
"Appearance": {
"Value": "Scarak_Louse",
"Description": "Model to be used"
},
"WanderRadius": {
"Value": 6,
"Description": "General wander radius"
},
"ViewRange": {
"Value": 12,
"Description": "View range"
},
"ViewSector": {
"Value": 180,
"Description": "View sector"
},
"HearingRange": {
"Value": 8,
"Description": "Hearing range"
},
"FleeRange": {
"Value": 15,
"Description": "How far to try and get away when fleeing"
},
"AlertedRange": {
"Value": 30,
"Description": "A range within which the player can be seen/sensed when the NPC is alerted to their presence"
},
"DropList": {
"Value": "Drop_Scarak_Louse",
"Description": "Drop Items"
},
"MaxSpeed": {
"Value": 8,
"Description": "Maximum walking speed"
},
"Attack": {
"Value": "Root_NPC_Attack_Melee",
"Description": "The attack to use"
},
"AttackDistance": {
"Value": 3,
"Description": "The distance to attack from"
},
"AttitudeGroup": {
"Value": "Predators",
"Description": "This NPCs attitude group"
},
"FlockArray": {
"Value": [ "Template_Scarak_Louse" ],
"Description": "Array containing NPCs for this flock type"
},
"CombatRelativeTurnSpeed": {
"Value": 1.5,
"Description": "Modifier that decides turn speed difference in combat"
},
"MaxHealth": {
"Value": 100,
"Description": "Max health for the NPC"
},
"IsMemory": {
"Value": false,
"Description": "Defines if the NPC is a memory"
},
"MemoriesCategory": {
"Value": "Other",
"Description": "Defines the category of the memory"
},
"MemoriesNameOverride": {
"Value": "",
"Description": "Overrides the memory name if set"
},
"NameTranslationKey": {
"Value": "server.npcRoles.Template.name",
"Description": "Translation key for NPC name display"
}
},
"IsMemory": { "Compute": "IsMemory" },
"MemoriesCategory": { "Compute": "MemoriesCategory" },
"MemoriesNameOverride": { "Compute": "MemoriesNameOverride" },
"Appearance": { "Compute": "Appearance" },
"StartState": "Idle",
"DropList": { "Compute": "DropList" },
"DisableDamageGroups": [ "Self" ],
"DefaultNPCAttitude": "Ignore",
"DefaultPlayerAttitude": "Neutral",
"AttitudeGroup": { "Compute": "AttitudeGroup" },
"FlockSpawnTypes": { "Compute": "FlockArray" },
"FlockAllowedNPC": { "Compute": "FlockArray" },
"BusyStates": [ "Chase" ],
"KnockbackScale": 0.5,
"MotionControllerList": [
{
"Type": "Walk",
"MaxWalkSpeed": { "Compute": "MaxSpeed" },
"Gravity": 10,
"RunThreshold": 0.3,
"MaxFallSpeed": 15,
"MaxRotationSpeed": 360,
"Acceleration": 10
}
],
"MaxHealth": { "Compute": "MaxHealth" },
"Instructions": [
{
"Continue": true,
"$Comment": "This is separate so I can run it all the time regardless of the rest of the script",
"Instructions": [
{
"Sensor": {
"Type": "Beacon",
"Message": "Kill_My_Pretties_KILL",
"TargetSlot": "LockedTarget"
},
"Actions": [
{
"Type": "State",
"State": "Chase"
}
]
},
{
"Enabled": { "Compute": "!isEmptyStringArray(FlockArray)" },
"Continue": true,
"Sensor": {
"Type": "And",
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockStatus": "Follower"
}
]
}
]
},
"Actions": [
{
"Type": "Timeout",
"Delay": [ 0.5, 2 ],
"Action": {
"Type": "SetLeashPosition",
"ToTarget": true
}
}
]
},
{
"Enabled": { "Compute": "!isEmptyStringArray(FlockArray)" },
"Sensor": {
"Type": "Mob",
"Range": 20,
"ExcludeOwnType": false,
"LockOnTarget": true,
"Filters": [
{
"Type": "NPCGroup",
"IncludeGroups": [ "Self" ]
},
{
"Type": "Flock",
"FlockStatus": "NotMember"
}
]
},
"Actions": [
{
"Type": "JoinFlock"
}
]
}
]
},
{
"Instructions": [
{
"Sensor": {
"Type": "State",
"State": "Idle"
},
"Instructions": [
{
"Reference": "Component_Instruction_Clear_Status_Animation"
},
{
"Enabled": { "Compute": "!isEmptyStringArray(FlockArray)" },
"Sensor": {
"Type": "Beacon",
"Message": "Flock_Attack",
"TargetSlot": "LockedTarget"
},
"Actions": [
{
"Type": "State",
"State": "Chase"
}
]
},
{
"Reference": "Component_Instruction_Damage_Check",
"Modify": {
"_ExportStates": [ "Chase", "Panic" ],
"AlertedRange": { "Compute": "AlertedRange" }
}
},
{
"Sensor": {
"Type": "Or",
"Sensors": [
{
"Reference": "Component_Sensor_Sight_By_Attitude",
"Modify": {
"ViewRange": { "Compute": "ViewRange" },
"ViewSector": { "Compute": "ViewSector" },
"Attitudes": [ "Hostile", "Neutral" ]
}
},
{
"Reference": "Component_Sensor_Sound_By_Attitude",
"Modify": {
"HearingRange": { "Compute": "HearingRange" },
"Attitudes": [ "Hostile", "Neutral" ]
}
}
]
},
"Actions": [
{
"Type": "State",
"State": "Alerted"
}
]
},
{
"Instructions": [
{
"Sensor": {
"Type": "Mob",
"Range": 2,
"ExcludeOwnType": false,
"LockOnTarget": false,
"Filters": [
{
"Type": "NPCGroup",
"IncludeGroups": [ "Self" ]
}
]
},
"BodyMotion": {
"Type": "Wander",
"MaxHeadingChange": 45,
"RelativeSpeed": 0.8
}
},
{
"Enabled": { "Compute": "!isEmptyStringArray(FlockArray)" },
"Sensor": {
"Type": "And",
"Sensors": [
{
"Type": "And",
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockStatus": "Follower"
}
]
}
]
},
{
"Type": "Leash",
"Range": { "Compute": "WanderRadius" }
}
]
},
"BodyMotion": {
"Type": "Seek",
"SlowDownDistance": 5,
"StopDistance": 3,
"RelativeSpeed": 1,
"AbortDistance": 100
}
},
{
"Sensor": {
"Type": "Any"
},
"BodyMotion": {
"Type": "Sequence",
"Looped": true,
"Motions": [
{
"Type": "Timer",
"Time": [ 1, 5 ],
"Motion": {
"Type": "WanderInCircle",
"Radius": { "Compute": "WanderRadius" },
"MaxHeadingChange": 60,
"RelativeSpeed": 0.43
}
},
{
"Type": "Timer",
"Time": [ 3, 8 ],
"Motion": {
"Type": "Nothing"
}
}
]
}
}
]
}
]
},
{
"Sensor": {
"Type": "State",
"State": "Alerted"
},
"Instructions": [
{
"Sensor": {
"Type": "State",
"State": ".Evaluate"
},
"Instructions": [
{
"Sensor": {
"Type": "And",
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockStatus": "Member"
}
]
}
]
},
"Actions": [
{
"Type": "State",
"State": "Chase"
}
]
},
{
"Actions": [
{
"Type": "State",
"State": "Flee"
}
]
}
]
},
{
"Continue": true,
"Sensor": {
"Type": "Any",
"Once": true
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status",
"Animation": "Alerted"
},
{
"Type": "SpawnParticles",
"Offset": [ 0, 0.8, 0 ],
"ParticleSystem": "Alerted"
}
]
},
{
"Reference": "Component_Instruction_Damage_Check",
"Modify": {
"_ExportStates": [ "Alerted.Evaluate", "Alerted.Evaluate" ],
"AlertedRange": { "Compute": "AlertedRange" }
}
},
{
"Sensor": {
"Type": "Target",
"Range": 3,
"Filters": [
{
"Type": "LineOfSight"
}
]
},
"Actions": [
{
"Type": "Timeout",
"Delay": [ 0.1, 0.1 ],
"Action": {
"Type": "State",
"State": ".Evaluate"
}
}
],
"HeadMotion": {
"Type": "Watch"
}
},
{
"Sensor": {
"Type": "Target",
"Range": { "Compute": "ViewRange" }
},
"Actions": [
{
"Type": "Timeout",
"Delay": [ 1, 1 ],
"Action": {
"Type": "State",
"State": ".Evaluate"
}
}
],
"HeadMotion": {
"Type": "Watch"
}
},
{
"ActionsAtomic": true,
"Actions": [
{
"Type": "Timeout",
"Delay": [ 2, 2 ]
},
{
"Type": "ReleaseTarget"
},
{
"Type": "State",
"State": "Idle"
}
]
}
]
},
{
"Sensor": {
"Type": "State",
"State": "Chase"
},
"Instructions": [
{
"Reference": "Component_Instruction_Clear_Status_Animation"
},
{
"Enabled": { "Compute": "!isEmptyStringArray(FlockArray)" },
"Continue": true,
"Sensor": {
"Type": "Any",
"Once": true
},
"Actions": [
{
"Type": "FlockBeacon",
"Message": "Flock_Attack",
"SendTargetSlot": "LockedTarget"
}
]
},
{
"Sensor": {
"Type": "Target",
"Range": { "Compute": "AttackDistance" },
"Filters": [
{
"Type": "LineOfSight"
}
]
},
"Actions": [
{
"Type": "Attack",
"Attack": { "Compute": "Attack" },
"AttackPauseRange": [ 1, 2 ]
}
],
"HeadMotion": {
"Type": "Aim",
"RelativeTurnSpeed": { "Compute": "CombatRelativeTurnSpeed" }
}
},
{
"Reference": "Component_Instruction_Intelligent_Chase",
"Modify": {
"_ExportStates": [ "Idle", "Idle", "Idle" ],
"ViewRange": { "Compute": "AlertedRange" },
"HearingRange": { "Compute": "HearingRange" },
"StopDistance": { "Compute": "AttackDistance" },
"RelativeSpeed": 0.67
}
}
]
},
{
"Sensor": {
"Type": "State",
"State": "Flee"
},
"Instructions": [
{
"Continue": true,
"Sensor": {
"Type": "Any",
"Once": true
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status"
}
]
},
{
"Reference": "Component_Instruction_Damage_Check",
"Modify": {
"_ExportStates": [ "Chase", "Panic" ],
"AlertedRange": { "Compute": "AlertedRange" }
}
},
{
"Continue": true,
"Instructions": [
{
"Sensor": {
"Type": "Mob",
"Range": 2,
"ExcludeOwnType": false,
"LockOnTarget": false,
"Filters": [
{
"Type": "NPCGroup",
"IncludeGroups": [ "Self" ]
}
]
},
"BodyMotion": {
"Type": "Wander",
"MaxHeadingChange": 45,
"RelativeSpeed": 0.8
}
},
{
"Sensor": {
"Type": "Target",
"Range": { "Compute": "FleeRange" },
"Filters": [
{
"Type": "LineOfSight"
}
]
},
"BodyMotion": {
"Type": "Flee",
"SlowDownDistance": { "Compute": "ViewRange" },
"StopDistance": { "Compute": "FleeRange + 1" },
"RelativeSpeed": 0.68
}
}
]
},
{
"Sensor": {
"Type": "Target",
"Range": 2,
"Filters": [
{
"Type": "LineOfSight"
}
]
},
"Actions": [
{
"Type": "State",
"State": "Chase"
}
]
},
{
"Sensor": {
"Type": "Not",
"Sensor": {
"Type": "Target",
"Range": { "Compute": "FleeRange" },
"Filters": [
{
"Type": "LineOfSight"
}
]
}
},
"Actions": [
{
"Type": "ReleaseTarget"
},
{
"Type": "State",
"State": "Idle"
}
]
}
]
},
{
"Sensor": {
"Type": "State",
"State": "Panic"
},
"Instructions": [
{
"Continue": true,
"Sensor": {
"Type": "Any",
"Once": true
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status"
},
{
"Type": "SpawnParticles",
"Offset": [ 0, 0.8, 0 ],
"ParticleSystem": "Alerted"
}
]
},
{
"$Comment": "Motions",
"Continue": true,
"Instructions": [
{
"Sensor": {
"Type": "Or",
"Sensors": [
{
"Type": "Player",
"Range": { "Compute": "ViewRange / 2" }
},
{
"Type": "Mob",
"GetPlayers": true,
"Range": { "Compute": "ViewRange / 2" },
"Filters": [
{
"Type": "NPCGroup",
"IncludeGroups": [ "Aggressive" ]
}
]
}
]
},
"BodyMotion": {
"Type": "Flee",
"SlowDownDistance": { "Compute": "ViewRange" },
"StopDistance": { "Compute": "FleeRange + 1" },
"RelativeSpeed": 1
}
},
{
"Sensor": {
"Type": "Any"
},
"BodyMotion": {
"Type": "WanderInCircle",
"Radius": { "Compute": "WanderRadius * 2" },
"MaxHeadingChange": 90,
"RelativeSpeed": 1
}
}
]
},
{
"Sensor": {
"Type": "Or",
"Sensors": [
{
"Reference": "Component_Sensor_Sight_By_Attitude",
"Modify": {
"ViewRange": { "Compute": "AlertedRange" },
"ViewSector": { "Compute": "ViewSector" },
"Attitudes": [ "Hostile", "Neutral" ]
}
},
{
"Reference": "Component_Sensor_Sound_By_Attitude",
"Modify": {
"HearingRange": { "Compute": "HearingRange" },
"Attitudes": [ "Hostile", "Neutral" ]
}
}
]
},
"Actions": [
{
"Type": "State",
"State": "Alerted"
}
]
},
{
"Actions": [
{
"Type": "Timeout",
"Delay": [ 5, 8 ],
"Action": {
"Type": "State",
"State": "Idle"
}
}
]
}
]
}
]
}
],
"NameTranslationKey": { "Compute": "NameTranslationKey" }
}