Versions / 0.6.0-pre.1 / NPC / Roles / Intelligent / Neutral / Kweebec / Templates / Template_Kweebec_Youngling.json
Template_Kweebec_Youngling
Server/NPC/Roles/Intelligent/Neutral/Kweebec/Templates/Template_Kweebec_Youngling.json, 20.8 KB
Fields
| Field | Type |
|---|---|
Type | string |
StartState | string |
Parameters | object |
IsMemory | object |
MemoriesCategory | object |
MemoriesNameOverride | object |
Appearance | object |
DropList | object |
DisableDamageGroups | array[1] |
HotbarItems | object |
DefaultNPCAttitude | string |
DefaultPlayerAttitude | string |
AttitudeGroup | object |
KnockbackScale | number |
MotionControllerList | array[1] |
MaxHealth | object |
CombatConfig | object |
Instructions | array[2] |
NameTranslationKey | object |
Source
{
"Type": "Abstract",
"StartState": "Idle",
"Parameters": {
"Appearance": {
"Value": "Kweebec_Seedling",
"Description": "Model to be used"
},
"ViewRange": {
"Value": 15,
"Description": "View range"
},
"ViewSector": {
"Value": 180,
"Description": "View sector"
},
"HearingRange": {
"Value": 10,
"Description": "Hearing range"
},
"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_Kweebec_Seedling",
"Description": "Drop Items"
},
"MaxSpeed": {
"Value": 5,
"Description": "Maximum walking speed"
},
"IdleMotionComponent": {
"Value": "Component_Instruction_Intelligent_Idle_Motion_Wander",
"Description": "The component that controls how the NPC moves during idle state"
},
"AttitudeGroup": {
"Value": "Kweebec",
"Description": "This NPCs attitude group"
},
"Weapons": {
"Value": [ ],
"TypeHint": "String",
"Description": "NPC Weapons"
},
"HideWhenScared": {
"Value": false,
"Description": "Whether this NPC will hide rather than fleeing when afraid"
},
"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" },
"DropList": { "Compute": "DropList" },
"DisableDamageGroups": [ "Self" ],
"HotbarItems": { "Compute": "Weapons" },
"DefaultNPCAttitude": "Ignore",
"DefaultPlayerAttitude": "Neutral",
"AttitudeGroup": { "Compute": "AttitudeGroup" },
"KnockbackScale": 0.5,
"MotionControllerList": [
{
"Type": "Walk",
"MaxWalkSpeed": { "Compute": "MaxSpeed" },
"Gravity": 10,
"RunThreshold": 0.3,
"MaxFallSpeed": 15,
"MaxRotationSpeed": 360,
"Acceleration": 10
}
],
"MaxHealth": { "Compute": "MaxHealth" },
"CombatConfig": {
"EntityEffect": "Immunity_Environmental"
},
"Instructions": [
{
"Continue": true,
"$Comment": "This is separate so I can run it all the time regardless of the rest of the script",
"Instructions": [
{
"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
}
}
]
},
{
"Sensor": {
"Type": "Mob",
"Range": 20,
"ExcludeOwnType": false,
"LockOnTarget": true,
"Filters": [
{
"Type": "NPCGroup",
"IncludeGroups": [ "Kweebec_Civilian" ]
},
{
"Type": "Flock",
"FlockStatus": "NotMember"
}
]
},
"Actions": [
{
"Type": "JoinFlock"
}
]
}
]
},
{
"Instructions": [
{
"Sensor": {
"Type": "State",
"State": "Idle"
},
"Instructions": [
{
"Reference": "Component_Instruction_Clear_Status_Animation"
},
{
"Reference": "Component_Instruction_Damage_Check",
"Modify": {
"_ExportStates": [ "Flee", "Panic" ],
"AlertedRange": { "Compute": "AlertedRange" }
}
},
{
"Sensor": {
"Type": "Beacon",
"Message": "Kweebec_All_Danger",
"TargetSlot": "LockedTarget"
},
"Actions": [
{
"Type": "State",
"State": "Flee"
}
]
},
{
"Sensor": {
"Type": "Beacon",
"Message": "Kweebec_All_Axe",
"TargetSlot": "LockedTarget"
},
"Actions": [
{
"Type": "State",
"State": "AxeFlee"
}
]
},
{
"Sensor": {
"Type": "Player",
"Range": { "Compute": "ViewRange" },
"LockOnTarget": true,
"Filters": [
{
"Type": "LineOfSight"
},
{
"Type": "ViewSector",
"ViewSector": { "Compute": "ViewSector" }
},
{
"Type": "ItemInHand",
"Items": [ "*_Axe*", "*_Hatchet*" ]
}
]
},
"ActionsAtomic": true,
"Actions": [
{
"Type": "Timeout",
"Delay": [ 0, 0.2 ]
},
{
"Type": "State",
"State": "Alerted"
}
]
},
{
"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" ]
}
}
]
},
"ActionsAtomic": true,
"Actions": [
{
"Type": "Timeout",
"Delay": [ 0, 0.2 ]
},
{
"Type": "State",
"State": "Alerted"
}
]
},
{
"Type": "Random",
"Name": "Kweebec_Idle_Random_Day",
"Instructions": [
{
"Weight": 50,
"Instructions": [
{
"Continue": true,
"ActionsAtomic": true,
"Actions": [
{
"Type": "Timeout",
"Delay": [ 15, 20 ]
},
{
"Type": "ResetInstructions",
"Instructions": [ "Kweebec_Idle_Random_Day" ]
}
]
},
{
"Sensor": {
"Type": "And",
"Sensors": [
{
"Type": "And",
"Sensors": [
{
"Type": "FlockLeader"
},
{
"Type": "Self",
"Filters": [
{
"Type": "Flock",
"FlockStatus": "Follower"
}
]
}
]
},
{
"Type": "Leash",
"Range": 10
}
]
},
"BodyMotion": {
"Type": "Seek",
"SlowDownDistance": 5,
"StopDistance": 3,
"RelativeSpeed": 0.8
}
},
{
"Reference": { "Compute": "IdleMotionComponent" },
"Interfaces": [ "Hytale.Instruction.Intelligent.Idle.Motion" ]
}
]
}
]
}
]
},
{
"Sensor": {
"Type": "State",
"State": "Alerted"
},
"Instructions": [
{
"$Comment": "Animations",
"Continue": true,
"Sensor": {
"Type": "Any",
"Once": true
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status",
"Animation": "Alerted"
},
{
"Type": "SpawnParticles",
"Offset": [ 0, 2.1, 0 ],
"ParticleSystem": "Alerted"
}
]
},
{
"Sensor": {
"Type": "Beacon",
"Message": "Kweebec_All_Danger",
"TargetSlot": "LockedTarget"
},
"Actions": [
{
"Type": "State",
"State": "Flee"
}
]
},
{
"Sensor": {
"Type": "Beacon",
"Message": "Kweebec_All_Axe",
"TargetSlot": "LockedTarget"
},
"Actions": [
{
"Type": "State",
"State": "AxeFlee"
}
]
},
{
"Reference": "Component_Instruction_Damage_Check",
"Modify": {
"_ExportStates": [ "Flee", "Panic" ],
"AlertedRange": { "Compute": "AlertedRange" }
}
},
{
"Sensor": {
"Type": "Player",
"Range": { "Compute": "ViewRange" },
"LockOnTarget": true,
"Filters": [
{
"Type": "LineOfSight"
},
{
"Type": "ViewSector",
"ViewSector": { "Compute": "ViewSector" }
},
{
"Type": "ItemInHand",
"Items": [ "*_Axe*", "*_Hatchet*" ]
}
]
},
"ActionsAtomic": true,
"Actions": [
{
"Type": "Timeout",
"Delay": [ 0.5, 0.8 ]
},
{
"Type": "State",
"State": "AxeFlee"
}
]
},
{
"Sensor": {
"Type": "Target",
"Range": { "Compute": "AlertedRange" },
"Filters": [
{
"Type": "LineOfSight"
}
]
},
"Instructions": [
{
"Sensor": {
"Type": "Target",
"Filters": [
{
"Type": "Attitude",
"Attitudes": [ "Hostile" ]
}
]
},
"ActionsAtomic": true,
"Actions": [
{
"Type": "Timeout",
"Delay": [ 1, 2 ]
},
{
"Type": "State",
"State": "Flee"
}
],
"HeadMotion": {
"Type": "Watch"
}
},
{
"Sensor": {
"Type": "Target",
"Filters": [
{
"Type": "Attitude",
"Attitudes": [ "Neutral", "Friendly", "Revered" ]
}
]
},
"ActionsBlocking": true,
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status",
"Animation": "Wave"
},
{
"Type": "Timeout",
"Delay": [ 1, 2 ]
},
{
"Type": "Sequence",
"Actions": [
{
"Type": "OverrideAttitude",
"Attitude": "Ignore",
"Duration": 600
},
{
"Type": "State",
"State": "Idle"
}
]
}
],
"HeadMotion": {
"Type": "Watch"
}
}
]
},
{
"Sensor": {
"Type": "Not",
"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": "Idle"
}
]
}
]
},
{
"Sensor": {
"Type": "State",
"State": "Flee"
},
"Instructions": [
{
"Reference": "Component_Instruction_Clear_Status_Animation"
},
{
"Continue": true,
"Sensor": {
"Type": "Any",
"Once": true
},
"Actions": [
{
"Type": "Beacon",
"Message": "Kweebec_All_Danger",
"Range": 30,
"TargetGroups": [ "Kweebec" ],
"SendTargetSlot": "LockedTarget"
}
]
},
{
"Enabled": { "Compute": "HideWhenScared" },
"Sensor": {
"Type": "Target",
"Range": { "Compute": "AlertedRange" }
},
"Instructions": [
{
"Sensor": {
"Type": "Target",
"Once": true
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status",
"$TODO": "Hide animation",
"Animation": "Wave"
},
{
"Type": "OverrideAttitude",
"Attitude": "Hostile",
"Duration": 600
}
]
}
]
},
{
"Enabled": { "Compute": "!HideWhenScared" },
"Continue": true,
"Sensor": {
"Once": true,
"Type": "Target",
"Range": { "Compute": "AlertedRange" }
},
"Actions": [
{
"Type": "OverrideAttitude",
"Attitude": "Hostile",
"Duration": 600
}
]
},
{
"Enabled": { "Compute": "!HideWhenScared" },
"Sensor": {
"Type": "Target",
"Range": { "Compute": "AlertedRange" }
},
"BodyMotion": {
"Type": "Flee",
"SlowDownDistance": { "Compute": "AlertedRange - 5" },
"StopDistance": { "Compute": "AlertedRange + 1" }
}
},
{
"Actions": [
{
"Type": "State",
"State": "Panic"
}
]
}
]
},
{
"Sensor": {
"Type": "State",
"State": "AxeFlee"
},
"Instructions": [
{
"Reference": "Component_Instruction_Clear_Status_Animation"
},
{
"Continue": true,
"Sensor": {
"Type": "Any",
"Once": true
},
"Actions": [
{
"Type": "Beacon",
"Message": "Kweebec_All_Axe",
"Range": 30,
"TargetGroups": [ "Kweebec" ],
"SendTargetSlot": "LockedTarget"
}
]
},
{
"Enabled": { "Compute": "HideWhenScared" },
"Sensor": {
"Type": "Target",
"Range": { "Compute": "AlertedRange" }
},
"Instructions": [
{
"Sensor": {
"Type": "Target",
"Once": true
},
"Actions": [
{
"Type": "PlayAnimation",
"Slot": "Status",
"$TODO": "Hide animation",
"Animation": "Wave"
},
{
"Type": "OverrideAttitude",
"Attitude": "Hostile",
"Duration": 600
}
]
}
]
},
{
"Enabled": { "Compute": "!HideWhenScared" },
"Sensor": {
"Type": "Target",
"Range": { "Compute": "AlertedRange" }
},
"BodyMotion": {
"Type": "Flee",
"SlowDownDistance": { "Compute": "AlertedRange - 5" },
"StopDistance": { "Compute": "AlertedRange + 1" }
}
},
{
"Actions": [
{
"Type": "State",
"State": "Panic"
}
]
}
]
},
{
"Sensor": {
"Type": "State",
"State": "Panic"
},
"Instructions": [
{
"Reference": "Component_Kweebec_Instruction_Panic",
"Modify": {
"_ExportStates": [ "Alerted", "Flee", "Panic", "Idle" ],
"ViewRange": { "Compute": "ViewRange" },
"ViewSector": { "Compute": "ViewSector" },
"HearingRange": { "Compute": "HearingRange" },
"AlertedRange": { "Compute": "AlertedRange" }
}
}
]
}
]
}
],
"NameTranslationKey": { "Compute": "NameTranslationKey" }
}