NPC Builder

JSON Preview
{
  "$Comment": "Debug: DisplayState",
  "Debug": "DisplayState",
  "Type": "Abstract",
  "Parameters": {
    "Appearance": {
      "Value": "Bear_Grizzly",
      "Description": "Model to be used"
    },
    "DropList": {
      "Value": "Empty",
      "Description": "Drop Items"
    },
    "MaxHealth": {
      "Value": 100,
      "Description": "Max health for the NPC"
    },
    "EatItem": {
      "Value": "Food_Beef_Raw",
      "Description": "The item this NPC will find when it rummages for food"
    },
    "ViewRange": {
      "Value": 15,
      "Description": "View range in blocks"
    },
    "ViewSector": {
      "Value": 180,
      "Description": "View sector in degrees"
    },
    "HearingRange": {
      "Value": 8,
      "Description": "Hearing range in blocks"
    },
    "AlertedRange": {
      "Value": 30,
      "Description": "A range within which the player can be seen/sensed when the NPC is alerted to their presence"
    },
    "AttackDistance": {
      "Value": 2,
      "Description": "The distance at which an NPC will execute attacks"
    },
    "LeashDistance": {
      "Value": 20,
      "Description": "The range after which an NPC will start to want to return to their spawn point."
    },
    "NameTranslationKey": {
      "Value": "server.npcRoles.Template.name",
      "Description": "Translation key for NPC name display"
    }
  },
  "Appearance": {
    "Compute": "Appearance"
  },
  "DropList": {
    "Compute": "DropList"
  },
  "MaxHealth": {
    "Compute": "MaxHealth"
  },
  "StartState": "Idle",
  "DefaultPlayerAttitude": "Hostile",
  "DefaultNPCAttitude": "Ignore",
  "KnockbackScale": 0.5,
  "MotionControllerList": [
    {
      "Type": "Walk",
      "MaxWalkSpeed": 3,
      "Gravity": 10,
      "MaxFallSpeed": 8,
      "Acceleration": 10
    }
  ],
  "InteractionVars": {
    "Melee_Damage": {
      "Interactions": [
        {
          "Parent": "NPC_Attack_Melee_Damage",
          "DamageCalculator": {
            "Type": "Absolute",
            "BaseDamage": {
              "Physical": 10
            },
            "RandomPercentageModifier": 0.1
          }
        }
      ]
    }
  },
  "StateTransitions": [
    {
      "States": [
        {
          "From": [
            "Idle"
          ],
          "To": [
            "Sleep"
          ]
        }
      ],
      "Actions": [
        {
          "Type": "PlayAnimation",
          "Slot": "Status",
          "Animation": "Laydown"
        },
        {
          "Type": "Timeout",
          "Delay": [
            1,
            1
          ]
        }
      ]
    }
  ],
  "Instructions": [
    {
      "Sensor": {
        "Type": "State",
        "State": "Idle"
      },
      "Instructions": [
        {
          "Continue": true,
          "Sensor": {
            "Type": "Any",
            "Once": true
          },
          "Actions": [
            {
              "Type": "Inventory",
              "Operation": "EquipHotbar",
              "Slot": 0,
              "UseTarget": false
            }
          ]
        }
      ]
    }
  ],
  "NameTranslationKey": {
    "Compute": "NameTranslationKey"
  }
}