Hytale Asset ReferenceUnofficial
Versions / 0.5.1 / NPC / Roles / _Core / Tests / Test_Attitude_Sensor.json

Test_Attitude_Sensor

Server/NPC/Roles/_Core/Tests/Test_Attitude_Sensor.json, 2.2 KB

Fields

FieldType
DefaultSubStatestring
Typestring
Appearancestring
DefaultPlayerAttitudestring
MotionControllerListarray[1]
TestTypestring
MaxHealthobject
Parametersobject
Instructionsarray[1]
NameTranslationKeystring

Source

{
  "DefaultSubState": "Start",
  "Type": "Generic",
  "Appearance": "Sheep",
  "DefaultPlayerAttitude": "Neutral",
  "MotionControllerList": [
    {
      "Type": "Walk",
      "MaxWalkSpeed": 3,
      "RunThreshold": 0.7,
      "RunThresholdRange": 0.1,
      "Gravity": 10,
      "MaxFallSpeed": 20,
      "Acceleration": 10
    }
  ],
  "TestType": "Normal",
  "MaxHealth": { "Compute": "MaxHealth" },
  "Parameters": {
    "MaxHealth": {
      "Value": 100,
      "Description": "Max health for the NPC"
    }
  },
  "Instructions": [
    {
      "Instructions": [
        {
          "Sensor": {
            "Type": "Damage",
            "Combat": true
          },
          "Actions": [
            {
              "Type": "OverrideAttitude",
              "Attitude": "Hostile",
              "Duration": 5
            }
          ]
        },
        {
          "Enabled": true,
          "Sensor": {
            "Type": "Mob",
            "Range": 10,
            "ExcludeOwnType": false,
            "GetNPCs": true,
            "Prioritiser": {
              "Type": "Attitude",
              "AttitudesByPriority": [ "Neutral", "Hostile" ]
            },
            "GetPlayers": true
          },
          "HeadMotion": {
            "Type": "Watch"
          }
        },
        {
          "Sensor": {
            "Type": "Player",
            "Range": 10,
            "LockOnTarget": true
          },
          "Instructions": [
            {
              "Sensor": {
                "Type": "Target",
                "Filters": [
                  {
                    "Type": "Attitude",
                    "Attitudes": [ "Neutral" ]
                  }
                ]
              },
              "HeadMotion": {
                "Type": "Watch"
              }
            },
            {
              "Sensor": {
                "Type": "Target",
                "Filters": [
                  {
                    "Type": "Attitude",
                    "Attitudes": [ "Hostile" ]
                  }
                ]
              },
              "BodyMotion": {
                "Type": "Flee"
              }
            }
          ]
        }
      ]
    }
  ],
  "NameTranslationKey": "server.npcRoles.Test_Attitude_Sensor.name"
}