Hytale Asset ReferenceUnofficial
Versions / 0.5.3 / NPC / Roles / Void / Templates / Template_Eye.json

Template_Eye

Server/NPC/Roles/Void/Templates/Template_Eye.json, 23.1 KB

Fields

FieldType
Typestring
StartStatestring
Parametersobject
IsMemoryobject
MemoriesCategoryobject
MemoriesNameOverrideobject
Appearanceobject
DropListobject
DisableDamageGroupsarray[2]
DefaultNPCAttitudestring
DefaultPlayerAttitudestring
AttitudeGroupobject
BusyStatesarray[2]
KnockbackScalenumber
MotionControllerListarray[1]
MaxHealthobject
Instructionsarray[1]
NameTranslationKeyobject

Source

{
  "Type": "Abstract",
  "StartState": "Idle",
  "Parameters": {
    "Appearance": {
      "Value": "Eye_Void",
      "Description": "Model to be used"
    },
    "WanderRadius": {
      "Value": 15,
      "Description": "General wander radius"
    },
    "ViewRange": {
      "Value": 40,
      "Description": "View range"
    },
    "ViewSector": {
      "Value": 180,
      "Description": "View sector"
    },
    "HearingRange": {
      "Value": 8,
      "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_Eye_Void",
      "Description": "Drop Items"
    },
    "AttackSequence": {
      "Value": "Component_Instruction_Attack_Sequence_Eye_Void",
      "Description": "The attack sequence to use in combat"
    },
    "AttackDistance": {
      "Value": 10,
      "Description": "The distance at which an NPC will execute attacks"
    },
    "TargetSwitchTimer": {
      "Value": [ 5, 5 ],
      "Description": "Minimum time the NPC will be locked onto a single target before switching"
    },
    "TargetRange": {
      "Value": 15,
      "Description": "The distance the target needs to be within to maintain priority over other targets while in combat"
    },
    "RelativeChaseSpeed": {
      "Value": 0.8,
      "Description": "The relative chase speed when pursuing a target"
    },
    "AttitudeGroup": {
      "Value": "Empty",
      "Description": "This NPCs attitude group"
    },
    "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" },
  "DropList": { "Compute": "DropList" },
  "DisableDamageGroups": [ "Self", "Void" ],
  "DefaultNPCAttitude": "Ignore",
  "DefaultPlayerAttitude": "Hostile",
  "AttitudeGroup": { "Compute": "AttitudeGroup" },
  "BusyStates": [ "Alerted", "Chase" ],
  "KnockbackScale": 0.5,
  "MotionControllerList": [
    {
      "Type": "Fly",
      "MaxHorizontalSpeed": 6,
      "MaxSinkSpeed": 2,
      "MaxClimbSpeed": 2,
      "MinAirSpeed": 0,
      "Acceleration": 2,
      "MinHeightOverGround": 2,
      "MaxHeightOverGround": 15,
      "MaxRollAngle": 25,
      "MaxTurnSpeed": 180,
      "EpsilonAngle": 180
    }
  ],
  "MaxHealth": { "Compute": "MaxHealth" },
  "Instructions": [
    {
      "Instructions": [
        {
          "Sensor": {
            "Type": "State",
            "State": "Idle"
          },
          "Instructions": [
            {
              "Reference": "Component_Instruction_Intelligent_Idle",
              "Modify": {
                "_ExportStates": [ "Alerted", "Search", "Alerted" ],
                "ViewRange": { "Compute": "ViewRange" },
                "ViewSector": { "Compute": "ViewSector" },
                "HearingRange": { "Compute": "HearingRange" },
                "AlertedRange": { "Compute": "AlertedRange" },
                "MotionComponent": "Component_Instruction_Intelligent_Idle_Motion_Wander_Far"
              }
            }
          ]
        },
        {
          "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"
                }
              ]
            },
            {
              "Continue": true,
              "Sensor": {
                "Type": "Any"
              },
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "Target",
                    "Range": { "Compute": "AlertedRange" }
                  },
                  "HeadMotion": {
                    "Type": "Watch"
                  }
                }
              ]
            },
            {
              "Sensor": {
                "Type": "State",
                "State": ".Spawn"
              },
              "ActionsBlocking": true,
              "Actions": [
                {
                  "Type": "Timeout",
                  "Delay": [ 0.5, 0.5 ]
                },
                {
                  "Type": "Attack",
                  "Attack": "Eye_Void_Summon",
                  "AttackPauseRange": [ 1, 2 ]
                },
                {
                  "Type": "Timeout",
                  "Delay": [ 0.25, 0.25 ]
                },
                {
                  "Type": "Spawn",
                  "SpawnAngle": 180,
                  "Kind": "Crawler_Void",
                  "JoinFlock": true,
                  "CountRange": [ 2, 4 ],
                  "DelayRange": [ 0, 0 ]
                },
                {
                  "Type": "FlockBeacon",
                  "Message": "Kill_My_Pretties_KILL",
                  "SendTargetSlot": "LockedTarget"
                },
                {
                  "Type": "State",
                  "State": ".Default"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Self",
                "Filters": [
                  {
                    "Type": "Flock",
                    "FlockStatus": "NotMember"
                  }
                ]
              },
              "Actions": [
                {
                  "Type": "State",
                  "State": ".Spawn"
                }
              ]
            },
            {
              "Sensor": {
                "Reference": "Component_Sensor_Target_Hidden_Nearby",
                "Modify": {
                  "IntuitionRange": { "Compute": "AlertedRange" },
                  "HearingRange": { "Compute": "HearingRange + 1" },
                  "ViewRange": { "Compute": "ViewRange + 1" },
                  "ViewSector": { "Compute": "ViewSector" }
                }
              },
              "Actions": [
                {
                  "Type": "State",
                  "State": "Search"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Or",
                "Sensors": [
                  {
                    "Reference": "Component_Sensor_Sight_By_Attitude",
                    "Modify": {
                      "ViewRange": { "Compute": "AlertedRange" },
                      "ViewSector": { "Compute": "ViewSector" },
                      "Attitudes": [ "Hostile" ]
                    }
                  },
                  {
                    "Reference": "Component_Sensor_Sound_By_Attitude",
                    "Modify": {
                      "HearingRange": { "Compute": "HearingRange" },
                      "Attitudes": [ "Hostile" ]
                    }
                  }
                ]
              },
              "Actions": [
                {
                  "Type": "Timeout",
                  "Delay": [ 1, 1 ],
                  "Action": {
                    "Type": "State",
                    "State": "Chase"
                  }
                }
              ]
            },
            {
              "Actions": [
                {
                  "Type": "State",
                  "State": "Idle"
                }
              ]
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "Chase"
          },
          "Instructions": [
            {
              "Reference": "Component_Instruction_Clear_Status_Animation",
              "Modify": { }
            },
            {
              "$TODO": "Eventually change this when flying NPCs can use the maintain distance motion",
              "Reference": "Component_Instruction_Target_Adjusted_Attack_Melee",
              "Modify": {
                "TargetSwitchTimer": { "Compute": "TargetSwitchTimer" },
                "AttackSequence": { "Compute": "AttackSequence" },
                "AttackDistance": { "Compute": "AttackDistance" },
                "TargetRange": { "Compute": "TargetRange" },
                "CombatRelativeTurnSpeed": { "Compute": "CombatRelativeTurnSpeed" },
                "MaintainDistance": false
              }
            },
            {
              "Reference": "Component_Instruction_Simple_Soft_Leash",
              "Modify": {
                "_ExportStates": [ "Idle" ]
              }
            },
            {
              "Reference": "Component_Instruction_Intelligent_Chase",
              "Modify": {
                "_ExportStates": [ "Search", "Idle", "Search" ],
                "ViewRange": { "Compute": "AlertedRange" },
                "HearingRange": { "Compute": "HearingRange" },
                "RelativeSpeed": { "Compute": "RelativeChaseSpeed" }
              }
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "Search"
          },
          "Instructions": [
            {
              "$Comment": "Animations",
              "Continue": true,
              "Sensor": {
                "Type": "Any",
                "Once": true
              },
              "Actions": [
                {
                  "Type": "PlayAnimation",
                  "Slot": "Status"
                },
                {
                  "Type": "SpawnParticles",
                  "Offset": [ 0, 2.1, 0 ],
                  "ParticleSystem": "Question"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Or",
                "Sensors": [
                  {
                    "Type": "Damage",
                    "Combat": true,
                    "TargetSlot": "LockedTarget"
                  },
                  {
                    "Type": "Damage",
                    "Combat": false,
                    "Other": true
                  }
                ]
              },
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "Mob",
                    "GetPlayers": true,
                    "GetNPCs": true,
                    "ExcludeOwnType": true,
                    "Range": { "Compute": "AlertedRange" },
                    "LockOnTarget": true,
                    "Filters": [
                      {
                        "Type": "LineOfSight"
                      },
                      {
                        "Type": "ViewSector",
                        "ViewSector": { "Compute": "ViewSector" }
                      }
                    ],
                    "Prioritiser": {
                      "Type": "Attitude",
                      "AttitudesByPriority": [ "Hostile" ]
                    }
                  },
                  "Actions": [
                    {
                      "Type": "State",
                      "State": "Alerted"
                    }
                  ]
                },
                {
                  "Actions": [
                    {
                      "Type": "State",
                      "State": "FleeTimed"
                    }
                  ]
                }
              ]
            },
            {
              "Continue": true,
              "Sensor": {
                "Type": "Any"
              },
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "Eval",
                    "Expression": "blocked"
                  },
                  "BodyMotion": {
                    "Type": "Timer",
                    "Time": [ 2, 3 ],
                    "Motion": {
                      "Type": "Wander",
                      "MaxHeadingChange": 45,
                      "RelativeSpeed": 0.6
                    }
                  }
                },
                {
                  "Sensor": {
                    "Type": "Mob",
                    "Range": 1,
                    "ExcludeOwnType": false,
                    "LockOnTarget": false,
                    "Filters": [
                      {
                        "Type": "NPCGroup",
                        "IncludeGroups": [ "Self" ]
                      }
                    ]
                  },
                  "BodyMotion": {
                    "Type": "Wander",
                    "MaxHeadingChange": 45,
                    "RelativeSpeed": 1
                  }
                },
                {
                  "Sensor": {
                    "Type": "Any"
                  },
                  "BodyMotion": {
                    "Type": "Sequence",
                    "Motions": [
                      {
                        "Type": "Timer",
                        "Time": [ 2, 3 ],
                        "Motion": {
                          "Type": "Wander",
                          "MaxHeadingChange": 1,
                          "RelativeSpeed": 0.6
                        }
                      },
                      {
                        "Type": "Sequence",
                        "Looped": true,
                        "Motions": [
                          {
                            "Type": "Timer",
                            "Time": [ 1, 2 ],
                            "Motion": {
                              "Type": "WanderInCircle",
                              "Radius": 5,
                              "MaxHeadingChange": 60,
                              "RelativeSpeed": 0.6
                            }
                          },
                          {
                            "Type": "Timer",
                            "Time": [ 1, 2 ],
                            "Motion": {
                              "Type": "Nothing"
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
              ]
            },
            {
              "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": "Alerted"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Any"
              },
              "Actions": [
                {
                  "Type": "Timeout",
                  "Delay": [ 8, 10 ],
                  "Action": {
                    "Type": "State",
                    "State": "Idle"
                  }
                }
              ]
            }
          ]
        },
        {
          "Sensor": {
            "Type": "State",
            "State": "FleeTimed"
          },
          "Instructions": [
            {
              "$Comment": "Animations",
              "Continue": true,
              "Sensor": {
                "Type": "Any",
                "Once": true
              },
              "Actions": [
                {
                  "Type": "PlayAnimation",
                  "Slot": "Status"
                },
                {
                  "Type": "SpawnParticles",
                  "Offset": [ 0, 2.1, 0 ],
                  "ParticleSystem": "Alerted"
                }
              ]
            },
            {
              "Continue": true,
              "Sensor": {
                "Type": "Any"
              },
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "Eval",
                    "Expression": "blocked"
                  },
                  "BodyMotion": {
                    "Type": "Timer",
                    "Time": [ 2, 3 ],
                    "Motion": {
                      "Type": "Wander",
                      "MaxHeadingChange": 45,
                      "RelativeSpeed": 1
                    }
                  }
                },
                {
                  "Sensor": {
                    "Type": "Mob",
                    "Range": 1,
                    "ExcludeOwnType": false,
                    "LockOnTarget": false,
                    "Filters": [
                      {
                        "Type": "NPCGroup",
                        "IncludeGroups": [ "Self" ]
                      },
                      {
                        "Type": "ViewSector",
                        "ViewSector": { "Compute": "ViewSector" }
                      }
                    ]
                  },
                  "BodyMotion": {
                    "Type": "Wander",
                    "MaxHeadingChange": 45,
                    "RelativeSpeed": 1
                  }
                },
                {
                  "Sensor": {
                    "Type": "Any"
                  },
                  "BodyMotion": {
                    "Type": "Timer",
                    "Time": [ 2, 3 ],
                    "Motion": {
                      "Type": "Wander",
                      "MaxHeadingChange": 45,
                      "RelativeSpeed": 1
                    }
                  }
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Damage",
                "Combat": true,
                "TargetSlot": "LockedTarget"
              },
              "Instructions": [
                {
                  "Sensor": {
                    "Type": "Target",
                    "Range": { "Compute": "AlertedRange" },
                    "Filters": [
                      {
                        "Type": "LineOfSight"
                      }
                    ]
                  },
                  "Actions": [
                    {
                      "Type": "State",
                      "State": "Alerted"
                    }
                  ]
                },
                {
                  "Sensor": {
                    "Reference": "Component_Sensor_Target_Hidden_Nearby",
                    "Modify": {
                      "IntuitionRange": { "Compute": "AlertedRange" },
                      "HearingRange": { "Compute": "HearingRange" },
                      "ViewRange": { "Compute": "ViewRange" },
                      "ViewSector": { "Compute": "ViewSector" }
                    }
                  },
                  "Actions": [
                    {
                      "Type": "State",
                      "State": "Search"
                    }
                  ]
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Damage",
                "Combat": false,
                "Other": true
              },
              "Actions": [
                {
                  "Type": "State",
                  "State": "Search"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Mob",
                "GetPlayers": true,
                "GetNPCs": true,
                "ExcludeOwnType": true,
                "Range": { "Compute": "AlertedRange" },
                "LockOnTarget": true,
                "Filters": [
                  {
                    "Type": "LineOfSight"
                  },
                  {
                    "Type": "ViewSector",
                    "ViewSector": { "Compute": "ViewSector" }
                  }
                ],
                "Prioritiser": {
                  "Type": "Attitude",
                  "AttitudesByPriority": [ "Hostile" ]
                }
              },
              "Actions": [
                {
                  "Type": "State",
                  "State": "Alerted"
                }
              ]
            },
            {
              "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": "Alerted"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Any"
              },
              "Actions": [
                {
                  "Type": "Timeout",
                  "Delay": [ 2, 3 ],
                  "Action": {
                    "Type": "State",
                    "State": "Idle"
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "NameTranslationKey": { "Compute": "NameTranslationKey" }
}