Skip to content

NPC Assets

NPC assets define the visual appearance, animations, behavior, and spawning rules for non-player characters. This page covers the asset files that configure NPCs, while NPC System Overview covers the programming API.

DirectoryPurpose
Assets/Server/Models/[Category]/NPC model definitions (hitbox, animations)
Assets/Server/NPC/Roles/[Category]/NPC behavior roles
Assets/Server/NPC/Groups/NPC group memberships
Assets/Server/NPC/Spawn/Spawning configurations
Assets/Server/NPC/Attitude/Attitude relationships
Assets/Common/NPC/[Category]/Visual models and textures

Hytale organizes NPCs into 20 categories:

Beast

45+ hostile/neutral creatures (Wolf, Bear, Spider, etc.)

Livestock

34+ farm animals (Cow, Sheep, Pig, Chicken, etc.)

Wildlife

Ambient wild animals (Deer, Rabbit, etc.)

Intelligent

24+ humanoid NPCs (Kweebec, Trork, Outlander, etc.)

CategoryTypeDescription
BeastHostileLarge predatory creatures
BossHostileBoss encounters
CritterNeutralSmall ambient creatures
ElementalHostileElemental beings
Flying_BeastHostileAirborne predators
Flying_CritterNeutralBirds, bats
Flying_WildlifeNeutralAmbient flying creatures
HumanVariesHuman NPCs
IntelligentVariesHumanoid species
LivestockNeutralFarm animals
PetsFriendlyTameable companions
ScifiVariesScience fiction creatures
StatuesNeutralAnimated statues
Swimming_BeastHostileAquatic predators
Swimming_CritterNeutralSmall aquatic creatures
Swimming_WildlifeNeutralFish, etc.
UndeadHostileUndead creatures
VoidHostileVoid creatures
WildlifeNeutralForest animals
MISCVariesMiscellaneous NPCs

Model definitions in Assets/Server/Models/ configure the server-side representation of NPCs.

FieldTypeDescription
ModelstringPath to .blockymodel file
TexturestringPath to texture file
EyeHeightnumberHeight of eye position
CrouchOffsetnumberCrouch height offset
MinScalenumberMinimum random scale
MaxScalenumberMaximum random scale
HitBoxobjectCollision hitbox
AnimationSetsobjectAnimation configurations
CameraobjectCamera tracking settings
IconPropertiesobjectUI icon rendering
HitBox structure
{
"HitBox": {
"Min": { "X": -0.45, "Y": 0, "Z": -0.45 },
"Max": { "X": 0.45, "Y": 1.6, "Z": 0.45 }
}
}
Wolf_Black.json
{
"Model": "NPC/Beast/Wolf/Models/Model.blockymodel",
"Texture": "NPC/Beast/Wolf/Models/Model_Textures/Black.png",
"EyeHeight": 1,
"HitBox": {
"Max": { "X": 0.45, "Y": 1.6, "Z": 0.45 },
"Min": { "X": -0.45, "Y": 0, "Z": -0.45 }
},
"MinScale": 0.8,
"MaxScale": 0.9,
"AnimationSets": {
"Idle": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Default/Idle.blockyanim",
"Speed": 0.5
}]
},
"Walk": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Default/Walk.blockyanim",
"Speed": 1
}]
},
"Run": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Default/Run.blockyanim",
"SoundEventId": "SFX_Wolf_Run",
"Speed": 0.8
}]
},
"Jump": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Default/Jump.blockyanim",
"BlendingDuration": 0.1,
"Looping": false,
"Speed": 0.8
}]
},
"Hurt": {
"Animations": [
{
"Animation": "NPC/Beast/Wolf/Animations/Damage/Hurt.blockyanim",
"BlendingDuration": 0.1,
"Looping": false,
"SoundEventId": "SFX_Wolf_Hurt"
},
{
"Animation": "NPC/Beast/Wolf/Animations/Damage/Hurt2.blockyanim",
"BlendingDuration": 0.1,
"Looping": false,
"SoundEventId": "SFX_Wolf_Hurt"
}
]
},
"Death": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Damage/Death.blockyanim",
"Looping": false,
"SoundEventId": "SFX_Wolf_Death"
}]
},
"Sleep": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Default/Sleep.blockyanim",
"SoundEventId": "SFX_Wolf_Sleep"
}]
},
"Howl": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Flavor/Howl.blockyanim",
"Looping": false
}]
},
"Swim": {
"Animations": [{
"Animation": "NPC/Beast/Wolf/Animations/Swim/Swim.blockyanim"
}]
}
}
}

Animation sets define which animations play for different NPC states.

StateDescriptionRequired
IdleStanding stillYes
WalkNormal movementYes
WalkBackwardBackward movementNo
RunFast movementYes
JumpJump initiationYes
JumpWalkJump while walkingNo
JumpRunJump while runningNo
FallFallingYes
HurtDamage receivedYes
DeathDeath animationYes
SpawnSpawn animationNo
StateDescription
AlertedNoticed threat
ThreatenWarning posture
SleepSleeping
LaydownLie down transition
WakeWake up transition
CrouchCrouching idle
CrouchWalkCrouching movement
StateDescription
HowlHowling/calling
SitSitting
GreetGreeting
TrackTracking/sniffing
TiltHeadHead tilt
DigDigging
SniffAirSniffing air
StateDescription
SwimIdleFloating idle
SwimNormal swimming
SwimFastFast swimming
SwimBackwardBackward swimming
SwimFloatFloating on surface
SwimSinkSinking
SwimDiveDiving underwater
StateDescription
FlyIdleHovering
FlyNormal flight
FlyFastFast flight
FlyBackwardBackward flight
PropertyTypeDefaultDescription
AnimationstringRequiredPath to .blockyanim file
Speednumber1.0Playback speed multiplier
LoopingbooleantrueWhether animation loops
BlendingDurationnumber0.2Blend transition time
SoundEventIdstring-Sound to play with animation

Roles in Assets/Server/NPC/Roles/ define NPC behavior, stats, and AI.

TypeDescription
GenericBase role with full configuration
VariantInherits from another role via Reference
FieldTypeDescription
Typestring"Generic" or "Variant"
ReferencestringParent role (for Variant type)
AppearancestringModel definition ID
MaxHealthnumber/objectHealth value or compute
MotionControllerListarrayMovement controllers
InstructionsarrayBehavior tree instructions
ParametersobjectConfigurable parameters
NameTranslationKeystringLocalization key
Wolf_Black.json (Role)
{
"Type": "Variant",
"Reference": "Template_Predator",
"Parameters": {
"Appearance": {
"Value": "Wolf_Black",
"Description": "Model to be used."
},
"DropList": {
"Value": "Drop_Wolf_Black",
"Description": "Drop Items."
},
"MaxHealth": {
"Value": 70,
"Description": "Max health for the NPC"
},
"FlockArray": {
"Value": ["Wolf_Black"],
"Description": "The NPC's flock array"
}
},
"Modify": {
"Appearance": { "Compute": "Appearance" },
"AttitudeGroup": "PredatorsBig",
"MaxHealth": 103,
"MaxSpeed": 10,
"WanderRadius": 15,
"ViewRange": 10,
"HearingRange": 12,
"AbsoluteDetectionRange": 2,
"AlertedRange": 18,
"Attack": "Root_NPC_Wolf_Attack",
"AttackDistance": 2.5,
"IsMemory": true,
"MemoriesCategory": "Predator",
"_InteractionVars": {
"Bite_Damage": {
"Interactions": [{
"Parent": "Wolf_Bite_Damage",
"DamageCalculator": {
"Type": "Absolute",
"BaseDamage": { "Physical": 27 },
"RandomPercentageModifier": 0.1
},
"DamageEffects": {
"Knockback": { "Force": 1 }
}
}]
}
}
}
}
PropertyTypeDescription
WanderRadiusnumberWandering distance from spawn
ViewRangenumberVisual detection range
HearingRangenumberSound detection range
AbsoluteDetectionRangenumberAlways-detect range
AlertedRangenumberAlert trigger range
ChaseRelativeSpeednumberSpeed multiplier when chasing
LeashDistancenumberMax distance from spawn point
HardLeashDistancenumberAbsolute max distance
PropertyTypeDescription
AttackstringAttack interaction ID
AttackDistancenumberAttack range
CombatBehaviorDistancenumberEngage combat range
CombatDirectWeightnumberDirect approach weight
CombatStrafeWeightnumberStrafing weight
CombatBackOffAfterAttackbooleanRetreat after attacking
CombatBackOffDistanceRangearrayRetreat distance [min, max]
PropertyTypeDescription
AlertedTimearrayAlert duration [min, max]
ChanceToBeAlertedWhenFlockAlertednumberGroup alert chance (0-100)
MaintainDistanceWhileAlertedbooleanKeep distance when alerted
ThreatenDelayRangearrayThreaten delay [min, max]
ThreatenAnimationstringAnimation during threat
FleeIfNotThreatenedbooleanFlee when not directly threatened
FleeRangenumberDistance to flee

Groups in Assets/Server/NPC/Groups/ categorize NPCs for AI interactions.

Prey.json
{
"IncludeRoles": [
"Chicken",
"Chicken_Chick",
"Rabbit",
"Mouse",
"Penguin"
]
}
Predators.json
{
"IncludeRoles": [
"Fox*",
"Hyena*",
"Spark*",
"Toad*"
]
}

Note: Asterisk (*) acts as wildcard for role variants.

GroupPurpose
PreyPrey animals
PreyBigLarge prey
PredatorsSmall predators
PredatorsBigLarge predators
CrittersSmall critters
LivestockFarm animals
BirdsFlying birds
AquaticSwimming creatures
UndeadUndead NPCs
VoidVoid creatures
PlayerPlayer group
SelfSelf reference

Attitudes in Assets/Server/NPC/Attitude/ define how NPCs react to each other.

AttitudeDescription
FriendlyWill not attack
NeutralIgnores unless provoked
HostileAttacks on sight
FearfulFlees from target

Attitudes are configured per group-to-group relationship.

Spawn files in Assets/Server/NPC/Spawn/ control where and when NPCs spawn.

PropertyTypeDescription
Rolesstring[]Roles that can spawn
MinCountnumberMinimum spawn count
MaxCountnumberMaximum spawn count
SpawnChancenumberSpawn probability (0-1)
TimeOfDaystringTime restriction
Biomesstring[]Allowed biomes
LightLevelobjectLight level requirements

NPCs can have camera tracking for player control:

Camera configuration
{
"Camera": {
"Pitch": {
"AngleRange": { "Max": 45, "Min": -45 },
"TargetNodes": ["Head"]
},
"Yaw": {
"AngleRange": { "Max": 45, "Min": -45 },
"TargetNodes": ["Head"]
}
}
}
MyPlugin_Wolf_Custom.json
{
"Model": "MyPlugin/NPC/Wolf/Model.blockymodel",
"Texture": "MyPlugin/NPC/Wolf/Texture.png",
"EyeHeight": 1.0,
"HitBox": {
"Min": { "X": -0.5, "Y": 0, "Z": -0.5 },
"Max": { "X": 0.5, "Y": 1.5, "Z": 0.5 }
},
"MinScale": 0.9,
"MaxScale": 1.1,
"AnimationSets": {
"Idle": {
"Animations": [{
"Animation": "MyPlugin/NPC/Wolf/Animations/Idle.blockyanim",
"Speed": 0.6
}]
},
"Walk": {
"Animations": [{
"Animation": "MyPlugin/NPC/Wolf/Animations/Walk.blockyanim",
"Speed": 1.0
}]
},
"Run": {
"Animations": [{
"Animation": "MyPlugin/NPC/Wolf/Animations/Run.blockyanim",
"Speed": 0.9
}]
},
"Hurt": {
"Animations": [{
"Animation": "MyPlugin/NPC/Wolf/Animations/Hurt.blockyanim",
"Looping": false,
"BlendingDuration": 0.1
}]
},
"Death": {
"Animations": [{
"Animation": "MyPlugin/NPC/Wolf/Animations/Death.blockyanim",
"Looping": false
}]
}
}
}
MyPlugin_Wolf_Custom_Role.json
{
"Type": "Variant",
"Reference": "Template_Predator",
"Parameters": {
"Appearance": {
"Value": "MyPlugin_Wolf_Custom",
"Description": "Custom wolf model"
},
"MaxHealth": {
"Value": 80,
"Description": "Max health"
},
"DropList": {
"Value": "MyPlugin_Wolf_Drops",
"Description": "Loot drops"
}
},
"Modify": {
"Appearance": { "Compute": "Appearance" },
"AttitudeGroup": "Predators",
"MaxHealth": { "Compute": "MaxHealth" },
"MaxSpeed": 9,
"WanderRadius": 20,
"ViewRange": 12,
"Attack": "MyPlugin_Wolf_Attack",
"AttackDistance": 2.0,
"_InteractionVars": {
"Bite_Damage": {
"Interactions": [{
"DamageCalculator": {
"Type": "Absolute",
"BaseDamage": { "Physical": 15 }
}
}]
}
},
"NameTranslationKey": "myplugin.npc.wolf_custom.name"
}
}
MyPlugin_Predators.json
{
"IncludeRoles": [
"MyPlugin_Wolf_Custom"
]
}
  • Directorymy-plugin/
    • Directoryassets/
      • Directoryserver/
        • Directorymodels/
          • Directorybeast/
            • MyPlugin_Wolf_Custom.json
        • Directorynpc/
          • Directoryroles/
            • Directorycreature/
              • MyPlugin_Wolf_Custom.json
          • Directorygroups/
            • MyPlugin_Predators.json
      • Directorycommon/
        • Directorynpc/
          • Directorybeast/
            • Directorymy_wolf/
              • Model.blockymodel
              • Texture.png
              • Directoryanimations/
                • Idle.blockyanim
                • Walk.blockyanim
                • Run.blockyanim
  1. Use role variants: Inherit from templates like Template_Predator rather than creating from scratch
  2. Group related NPCs: Use groups for AI relationships
  3. Configure appropriate ranges: Balance view/hearing ranges for gameplay
  4. Include all required animations: At minimum: Idle, Walk, Run, Hurt, Death
  5. Scale hitboxes appropriately: Match hitbox to visual model size
  6. Use descriptive Parameters: Document values for maintainability
  7. Prefix IDs: Use plugin name prefix for all custom NPCs
  8. Test combat values: Playtest attack damage and ranges