Hytale Asset ReferenceUnofficial
Versions / 0.5.1 / NPC / Roles / _Core / Templates / Template_Beasts_Passive_Cactee.json

Template_Beasts_Passive_Cactee

Server/NPC/Roles/_Core/Templates/Template_Beasts_Passive_Cactee.json, 23.3 KB

Fields

FieldType
Typestring
KnockbackScalenumber
StartStatestring
Parametersobject
IsMemoryobject
MemoriesCategoryobject
MemoriesNameOverrideobject
Appearanceobject
DropListobject
DisableDamageGroupsobject
DefaultNPCAttitudestring
DefaultPlayerAttitudeobject
AttitudeGroupobject
DeathParticlesobject
DropDeathItemsInstantlyobject
DeathAnimationTimeobject
MotionControllerListarray[1]
StateTransitionsarray[2]
MaxHealthobject
Instructionsarray[1]
NameTranslationKeyobject

Source

{
  "Type": "Abstract",
  "KnockbackScale": 0.5,
  "StartState": "Idle",
  "Parameters": {
    "Appearance": {
      "Value": "Cactee",
      "Description": "Model to be used"
    },
    "ViewRange": {
      "Value": 15,
      "Description": "View range"
    },
    "ViewSector": {
      "Value": 180,
      "Description": "View sector"
    },
    "HearingRange": {
      "Value": 15,
      "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": "Empty",
      "Description": "Drop Items"
    },
    "MaxSpeed": {
      "Value": 10,
      "Description": "Maximum walking speed"
    },
    "IdleComponent": {
      "Value": "Component_Instruction_Generic_Idle",
      "Description": "The component to use for idle state"
    },
    "IdleMotionComponent": {
      "Value": "Component_Instruction_Cactee_Idle_Motion",
      "Description": "The component that controls how the NPC moves during idle state"
    },
    "SneakAttackSequence": {
      "Value": "Cactee_Swing_Up_Left",
      "Description": "The attack sequence to use for a sneak attack"
    },
    "RangedAttack": {
      "Value": "Cactee_Spike_Burst_Left",
      "Description": "Ranged attack"
    },
    "RangedAttack2": {
      "Value": "Cactee_Spike_Burst_Right",
      "Description": "Ranged attack"
    },
    "DesperateAttack": {
      "Value": "Cactee_Spike_Nova",
      "Description": "Attack to use when low HP before fleeing"
    },
    "AttackSequence": {
      "Value": "Component_Instruction_Attack_Sequence_Temp",
      "Description": "The attack sequence to use in combat"
    },
    "SneakAttackDistance": {
      "Value": 1,
      "Description": "The distance at which an NPC will execute attacks"
    },
    "AttackDistance": {
      "Value": 2,
      "Description": "The distance at which an NPC will execute attacks"
    },
    "RelativeChaseSpeed": {
      "Value": 0.8,
      "Description": "The relative chase speed when pursuing a target"
    },
    "AttitudeGroup": {
      "Value": "Cactee",
      "Description": "This NPCs attitude group"
    },
    "DefaultPlayerAttitude": {
      "Value": "Hostile",
      "Description": "Default attitude towards players"
    },
    "DisableDamageGroups": {
      "Value": [ "Self" ],
      "Description": "Groups not to take damage from"
    },
    "CombatRelativeTurnSpeed": {
      "Value": 1.5,
      "Description": "Modifier that decides turn speed difference in combat"
    },
    "MaxHealth": {
      "Value": 100,
      "Description": "Max health for the NPC"
    },
    "DeathParticles": {
      "Value": "Effect_Death",
      "Description": "The particle system that spawns when the NPC's corpse disappears."
    },
    "DropDeathItemsInstantly": {
      "Value": false,
      "Description": "Whether the NPC's drop list should be executed when the NPC dies. If set to false, items drop when the corpse disappears."
    },
    "DeathAnimationTime": {
      "Value": 2,
      "Description": "The time it takes for this NPC's corpse to disappear."
    },
    "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": { "Compute": "DisableDamageGroups" },
  "DefaultNPCAttitude": "Ignore",
  "DefaultPlayerAttitude": { "Compute": "DefaultPlayerAttitude" },
  "AttitudeGroup": { "Compute": "AttitudeGroup" },
  "DeathParticles": { "Compute": "DeathParticles" },
  "DropDeathItemsInstantly": { "Compute": "DropDeathItemsInstantly" },
  "DeathAnimationTime": { "Compute": "DeathAnimationTime" },
  "MotionControllerList": [
    {
      "Type": "Walk",
      "MaxWalkSpeed": { "Compute": "MaxSpeed" },
      "Gravity": 10,
      "RunThreshold": 0.3,
      "MaxFallSpeed": 15,
      "MaxRotationSpeed": 360,
      "Acceleration": 10
    }
  ],
  "StateTransitions": [
    {
      "States": [
        {
          "From": [ "Idle", "Sneak" ],
          "To": [ "Flee", "Chase", "Panic" ]
        }
      ],
      "Actions": [
        {
          "Type": "Crouch",
          "Crouch": false
        }
      ]
    },
    {
      "States": [
        {
          "From": [ "Chase" ],
          "To": [ "Flee" ]
        }
      ],
      "Actions": [
        {
          "Type": "Attack",
          "Attack": { "Compute": "DesperateAttack" },
          "AttackPauseRange": [ 0.5, 0.5 ]
        },
        {
          "Type": "Timeout",
          "Delay": [ 1.25, 1.25 ]
        }
      ]
    }
  ],
  "MaxHealth": { "Compute": "MaxHealth" },
  "Instructions": [
    {
      "Instructions": [
        {
          "Sensor": {
            "Type": "State",
            "State": "Idle"
          },
          "Instructions": [
            {
              "Reference": { "Compute": "IdleComponent" },
              "Interfaces": [ "Hytale.Instruction.Generic.Idle" ],
              "Modify": {
                "_ExportStates": [ "Sneak.Select", "Panic", "Chase" ],
                "ViewRange": { "Compute": "ViewRange" },
                "ViewSector": { "Compute": "ViewSector" },
                "HearingRange": { "Compute": "HearingRange" },
                "AlertedRange": { "Compute": "AlertedRange" },
                "MotionComponent": { "Compute": "IdleMotionComponent" },
                "SearchedForAttitudes": [ "Hostile" ]
              }
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "Sneak"
          },
          "Instructions": [
            {
              "Reference": "Component_Instruction_Damage_Check",
              "Modify": {
                "_ExportStates": [ "Chase", "Panic" ],
                "AlertedRange": { "Compute": "AlertedRange" }
              }
            },
            {
              "Sensor": {
                "Type": "State",
                "State": ".Select"
              },
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "Target",
                    "Filters": [
                      {
                        "Type": "NPCGroup",
                        "IncludeGroups": [ "Birds" ]
                      }
                    ]
                  },
                  "Actions": [
                    {
                      "Type": "State",
                      "State": ".BirdAttack"
                    }
                  ]
                },
                {
                  "Sensor": {
                    "Type": "Target",
                    "Filters": [
                      {
                        "Type": "NPCGroup",
                        "IncludeGroups": [ "Eats_Cactees" ]
                      }
                    ]
                  },
                  "Actions": [
                    {
                      "Type": "State",
                      "State": "Flee"
                    }
                  ]
                },
                {
                  "Actions": [
                    {
                      "Type": "State",
                      "State": ".Default"
                    }
                  ]
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Target",
                "Range": { "Compute": "ViewRange" }
              },
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "State",
                    "State": ".BirdAttack"
                  },
                  "Instructions": [
                    {
                      "Reference": "Component_Instruction_Damage_Check",
                      "Modify": {
                        "_ExportStates": [ "Chase", "Panic" ],
                        "AlertedRange": { "Compute": "AlertedRange" }
                      }
                    },
                    {
                      "Sensor": {
                        "Type": "Target",
                        "Range": { "Compute": "ViewRange" },
                        "AutoUnlockTarget": true
                      },
                      "ActionsBlocking": true,
                      "Actions": [
                        {
                          "Type": "Crouch",
                          "Crouch": false
                        },
                        {
                          "Type": "Attack",
                          "AimingTimeRange": [ 3, 3 ],
                          "Attack": { "Compute": "RangedAttack" },
                          "AttackPauseRange": [ 0.5, 0.5 ]
                        },
                        {
                          "Type": "Attack",
                          "AimingTimeRange": [ 3, 3 ],
                          "Attack": { "Compute": "RangedAttack2" },
                          "AttackPauseRange": [ 0.5, 0.5 ]
                        },
                        {
                          "Type": "Timeout",
                          "Delay": [ 0.5, 0.5 ]
                        },
                        {
                          "Type": "OverrideAttitude",
                          "Attitude": "Ignore",
                          "Duration": 60
                        },
                        {
                          "Type": "State",
                          "State": "Idle"
                        }
                      ],
                      "HeadMotion": {
                        "Type": "Aim",
                        "Spread": 1,
                        "HitProbability": 0.8
                      }
                    }
                  ]
                },
                {
                  "Sensor": {
                    "Type": "State",
                    "State": ".Default"
                  },
                  "Instructions": [
                    {
                      "Continue": true,
                      "Sensor": {
                        "Type": "Any",
                        "Once": true
                      },
                      "Actions": [
                        {
                          "Type": "Crouch"
                        }
                      ]
                    },
                    {
                      "Sensor": {
                        "Type": "Target",
                        "Filters": [
                          {
                            "Type": "SpotsMe",
                            "ViewAngle": 180
                          }
                        ]
                      },
                      "ActionsBlocking": true,
                      "Actions": [
                        {
                          "Type": "Timeout",
                          "Delay": [ 10, 15 ]
                        },
                        {
                          "Type": "State",
                          "State": "Flee"
                        }
                      ]
                    },
                    {
                      "Actions": [
                        {
                          "Type": "State",
                          "State": ".Follow"
                        }
                      ]
                    }
                  ]
                },
                {
                  "Sensor": {
                    "Type": "State",
                    "State": ".Follow"
                  },
                  "Instructions": [
                    {
                      "Sensor": {
                        "Type": "Target",
                        "Filters": [
                          {
                            "Type": "SpotsMe",
                            "ViewAngle": 60
                          }
                        ]
                      },
                      "Actions": [
                        {
                          "Type": "State",
                          "State": "Flee"
                        }
                      ]
                    },
                    {
                      "Sensor": {
                        "Type": "Target",
                        "Filters": [
                          {
                            "Type": "SpotsMe",
                            "ViewAngle": 180
                          }
                        ]
                      },
                      "ActionsBlocking": true,
                      "Actions": [
                        {
                          "Type": "Timeout",
                          "Delay": [ 0.05, 0.05 ]
                        },
                        {
                          "Type": "State",
                          "State": ".Default"
                        }
                      ]
                    },
                    {
                      "Sensor": {
                        "Type": "Target",
                        "Range": { "Compute": "SneakAttackDistance" }
                      },
                      "Actions": [
                        {
                          "Type": "State",
                          "State": ".Poke"
                        }
                      ]
                    },
                    {
                      "Sensor": {
                        "Type": "Target",
                        "Range": { "Compute": "ViewRange" }
                      },
                      "Actions": [
                        {
                          "Type": "Crouch",
                          "Crouch": false
                        }
                      ],
                      "BodyMotion": {
                        "Type": "Seek",
                        "SlowDownDistance": { "Compute": "SneakAttackDistance" },
                        "StopDistance": { "Compute": "SneakAttackDistance" }
                      }
                    }
                  ]
                },
                {
                  "Sensor": {
                    "Type": "State",
                    "State": ".Poke"
                  },
                  "Instructions": [
                    {
                      "Sensor": {
                        "Type": "Target",
                        "Range": { "Compute": "ViewRange" }
                      },
                      "ActionsBlocking": true,
                      "Actions": [
                        {
                          "Type": "Attack",
                          "Attack": { "Compute": "SneakAttackSequence" },
                          "AttackPauseRange": [ 1, 2 ]
                        },
                        {
                          "Type": "State",
                          "State": ".Wait"
                        }
                      ],
                      "BodyMotion": {
                        "Type": "Seek",
                        "SlowDownDistance": { "Compute": "SneakAttackDistance" },
                        "StopDistance": { "Compute": "SneakAttackDistance" }
                      }
                    }
                  ]
                },
                {
                  "Sensor": {
                    "Type": "State",
                    "State": ".Wait"
                  },
                  "Instructions": [
                    {
                      "Continue": true,
                      "Sensor": {
                        "Type": "Any",
                        "Once": true
                      },
                      "Actions": [
                        {
                          "Type": "Crouch"
                        }
                      ]
                    },
                    {
                      "Sensor": {
                        "Type": "Or",
                        "Sensors": [
                          {
                            "Type": "Target",
                            "Filters": [
                              {
                                "Type": "SpotsMe",
                                "ViewAngle": 180
                              }
                            ]
                          },
                          {
                            "Type": "Not",
                            "Sensor": {
                              "Type": "Target",
                              "Range": 5
                            }
                          }
                        ]
                      },
                      "Actions": [
                        {
                          "Type": "State",
                          "State": ".Default"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "Actions": [
                {
                  "Type": "State",
                  "State": "Idle"
                }
              ]
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "Chase"
          },
          "Instructions": [
            {
              "Reference": "Component_Instruction_Clear_Status_Animation"
            },
            {
              "Sensor": {
                "Type": "Self",
                "Filters": [
                  {
                    "Type": "Stat",
                    "StatTarget": "Value",
                    "RelativeTo": "Health",
                    "Stat": "Health",
                    "RelativeToTarget": "Max",
                    "ValueRange": [ 0, 0.5 ]
                  }
                ]
              },
              "Actions": [
                {
                  "Type": "State",
                  "State": "Flee"
                }
              ]
            },
            {
              "Reference": { "Compute": "AttackSequence" },
              "Interfaces": [ "Hytale.Instruction.AttackSequence" ],
              "Modify": {
                "AttackDistance": { "Compute": "AttackDistance" },
                "CombatRelativeTurnSpeed": { "Compute": "CombatRelativeTurnSpeed" }
              }
            },
            {
              "Reference": "Component_Instruction_Intelligent_Chase",
              "Modify": {
                "_ExportStates": [ "Idle", "Idle", "Idle" ],
                "ViewRange": { "Compute": "AlertedRange" },
                "HearingRange": { "Compute": "HearingRange" },
                "RelativeSpeed": { "Compute": "RelativeChaseSpeed" }
              }
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "Flee"
          },
          "Instructions": [
            {
              "Reference": "Component_Instruction_Play_Animation",
              "Modify": {
                "Animation": "Alerted"
              }
            },
            {
              "TreeMode": true,
              "Sensor": {
                "Type": "Self",
                "Filters": [
                  {
                    "Type": "Stat",
                    "StatTarget": "Value",
                    "RelativeTo": "Health",
                    "Stat": "Health",
                    "RelativeToTarget": "Max",
                    "ValueRange": [ 0.25, 1 ]
                  }
                ]
              },
              "Instructions": [
                {
                  "Reference": "Component_Instruction_Damage_Check",
                  "Modify": {
                    "_ExportStates": [ "Chase", "Panic" ],
                    "AlertedRange": { "Compute": "AlertedRange" }
                  }
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Target",
                "Range": { "Compute": "AlertedRange" },
                "AutoUnlockTarget": true
              },
              "BodyMotion": {
                "Type": "Flee",
                "StopDistance": { "Compute": "AlertedRange + 1" }
              }
            },
            {
              "Actions": [
                {
                  "Type": "State",
                  "State": "Idle"
                }
              ]
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "Panic"
          },
          "Instructions": [
            {
              "Reference": "Component_Instruction_Clear_Status_Animation"
            },
            {
              "Continue": true,
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "Eval",
                    "Expression": "blocked"
                  },
                  "BodyMotion": {
                    "Type": "Timer",
                    "Time": [ 2, 3 ],
                    "Motion": {
                      "Type": "Wander",
                      "MaxHeadingChange": 45,
                      "RelativeSpeed": 1
                    }
                  }
                },
                {
                  "Reference": "Component_Instruction_Spread_Out"
                },
                {
                  "BodyMotion": {
                    "Type": "Timer",
                    "Time": [ 2, 3 ],
                    "Motion": {
                      "Type": "Wander",
                      "MaxHeadingChange": 45,
                      "RelativeSpeed": 1
                    }
                  }
                }
              ]
            },
            {
              "Reference": "Component_Instruction_Damage_Check",
              "Modify": {
                "_ExportStates": [ "Chase", "Panic" ],
                "AlertedRange": { "Compute": "AlertedRange" }
              }
            },
            {
              "Sensor": {
                "Type": "Or",
                "Sensors": [
                  {
                    "Type": "Player",
                    "Range": 2,
                    "LockOnTarget": true,
                    "Filters": [
                      {
                        "Type": "LineOfSight"
                      }
                    ]
                  },
                  {
                    "Reference": "Component_Sensor_Sight_By_Attitude",
                    "Modify": {
                      "ViewRange": { "Compute": "ViewRange" },
                      "ViewSector": { "Compute": "ViewSector" },
                      "Attitudes": [ "Hostile" ]
                    }
                  },
                  {
                    "Reference": "Component_Sensor_Sound_By_Attitude",
                    "Modify": {
                      "HearingRange": { "Compute": "HearingRange" },
                      "Attitudes": [ "Hostile" ]
                    }
                  }
                ]
              },
              "Actions": [
                {
                  "Type": "State",
                  "State": "Flee"
                }
              ]
            },
            {
              "Actions": [
                {
                  "Type": "Timeout",
                  "Delay": [ 5, 6 ],
                  "Action": {
                    "Type": "State",
                    "State": "Idle"
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "NameTranslationKey": { "Compute": "NameTranslationKey" }
}