Hytale Asset ReferenceUnofficial
Versions / 0.6.0-pre.7 / NPC / Roles / _Core / Tests_Development / Test_InteractionVars_Template.json

Test_InteractionVars_Template

Server/NPC/Roles/_Core/Tests_Development/Test_InteractionVars_Template.json, 3.3 KB

Fields

FieldType
Typestring
Appearancestring
HotbarItemsarray[1]
StartStatestring
MotionControllerListarray[1]
MaxHealthobject
Parametersobject
InteractionVarsobject
Instructionsarray[1]
NameTranslationKeystring

Source

{
  "Type": "Generic",
  "Appearance": "Goblin",
  "HotbarItems": [ "Weapon_Club_Crude" ],
  "StartState": "Idle",
  "MotionControllerList": [
    {
      "Type": "Walk",
      "MaxWalkSpeed": 3,
      "Gravity": 10,
      "MaxFallSpeed": 20,
      "Acceleration": 10
    }
  ],
  "MaxHealth": { "Compute": "MaxHealth" },
  "Parameters": {
    "MaxHealth": {
      "Value": 100,
      "Description": "Max health for the NPC"
    }
  },
  "InteractionVars": {
    "Melee_Start": {
      "Interactions": [
        {
          "Parent": "Wolf_Bite",
          "$Comment": "Sets animations and delay before hit",
          "Effects": {
            "ItemPlayerAnimationsId": "Wolf_Black_Default",
            "ItemAnimationId": "Bite"
          },
          "RunTime": 0.167
        }
      ]
    },
    "Bite_Damage": {
      "Interactions": [
        {
          "Parent": "Wolf_Bite_Damage",
          "DamageCalculator": {
            "Type": "Absolute",
            "BaseDamage": {
              "Physical": 50
            }
          },
          "DamageEffects": {
            "Knockback": {
              "Force": 1
            }
          }
        }
      ]
    }
  },
  "Instructions": [
    {
      "Instructions": [
        {
          "Sensor": {
            "Type": "State",
            "State": "Idle"
          },
          "Instructions": [
            {
              "Sensor": {
                "Type": "Player",
                "Range": 8
              },
              "Actions": [
                {
                  "Type": "State",
                  "State": "Attack"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Any"
              },
              "BodyMotion": {
                "Type": "Nothing"
              }
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "Attack"
          },
          "Instructions": [
            {
              "Sensor": {
                "Type": "Player",
                "Range": 2,
                "Filters": [
                  {
                    "Type": "ViewSector",
                    "ViewSector": 90
                  }
                ]
              },
              "Actions": [
                {
                  "Type": "Timeout",
                  "Delay": [ 0, 0.5 ],
                  "Action": {
                    "Type": "Attack",
                    "Attack": "Root_NPC_Attack_Melee"
                  }
                }
              ],
              "HeadMotion": {
                "Type": "Watch"
              },
              "BodyMotion": {
                "Type": "MatchLook"
              }
            },
            {
              "Sensor": {
                "Type": "Player",
                "Range": 10
              },
              "BodyMotion": {
                "Type": "Seek",
                "SlowDownDistance": 3,
                "StopDistance": 2,
                "AbortDistance": 15
              }
            },
            {
              "Sensor": {
                "Type": "Any"
              },
              "BodyMotion": {
                "Type": "Nothing"
              }
            }
          ]
        }
      ]
    }
  ],
  "NameTranslationKey": "server.npcRoles.Test_InteractionVars_Template.name"
}