Skip to content

NPC Command Reference

Commands from NPCPlugin - uses hytale.command.npc.* namespace

Note: The internal permission namespace is server.commands.npc. Several NPC commands use view cone targeting instead of entity IDs - they affect NPCs within the player’s view cone (8 block distance, 30 degree angle, 2 block height tolerance).

Spawn an NPC.

Permission: hytale.command.npc.spawn

/npc spawn
/npc spawn <role> [options...]

Usage Variants:

  • /npc spawn (no args) - Opens the Entity Spawn UI page
  • /npc spawn <role> [options...] - Spawn NPC via command
ArgumentTypeRequiredDefaultValidationDescription
roleNpcRoleYes--NPC role/type asset
--countIntegerNo1> 0Number to spawn
--radiusFloatNo8.0> 0Spawn radius
--flagsStringNo--Debug flags
--speedFloatNo-> 0Initial velocity
--nonrandomFlagNo--Use seed 0 for determinism
--positionStringNo--Absolute position x,y,z
--posOffsetStringNo--Position offset x,y,z
--headRotationStringNo--Head rotation pitch,yaw,roll
--bodyRotationStringNo--Body rotation pitch,yaw,roll
--randomRotationFlagNo--Random rotation
--facingRotationFlagNo--Face spawning player
--flockStringNo1-Flock size or asset ID
--testFlagNo--Test spawn validity only
--spawnOnGroundFlagNo--Snap to ground
--frozenFlagNo--Spawn frozen/inactive
--randomModelFlagNo--Use random skin variant
--scaleFloatNo--Model scale multiplier
--bypassScaleLimitsFlagNo--Ignore scale limits

Examples:

/npc spawn Wolf # Spawn one wolf
/npc spawn Wolf --count=5 --radius=10 # Spawn 5 wolves in 10 block radius
/npc spawn Skeleton_Archer --frozen # Spawn frozen skeleton
/npc spawn Wolf --scale=2.0 # Spawn large wolf
/npc spawn Trork --facingRotation # Spawn facing player

Spawn all NPC roles in a grid.

Permission: hytale.command.npc.all

/npc all [--distance=?]
ArgumentTypeRequiredDefaultDescription
--distanceDoubleNo4.0Spacing between NPCs

Remove all NPCs.

Permission: hytale.command.npc.clean

/npc clean

Freeze NPCs (stop AI/physics).

Permission: hytale.command.npc.freeze

/npc freeze [--all] [--toggle] [--entity=?]
ArgumentTypeRequiredDescription
--allFlagNoFreeze all NPCs and items in world
--toggleFlagNoToggle freeze state (unfreeze if frozen)
--entityEntityIdNoTarget specific NPC (default: looked-at)

Notes:

  • Without --all, targets a single NPC
  • --toggle with a frozen NPC will thaw it instead

Unfreeze NPCs (resume AI/physics).

Aliases: unfreeze

Permission: hytale.command.npc.thaw

/npc thaw [--all] [--entity=?]
ArgumentTypeRequiredDescription
--allFlagNoThaw all NPCs in world
--entityEntityIdNoTarget specific NPC (default: looked-at)

Dump NPC role data.

Permission: hytale.command.npc.dump

/npc dump [--entity=?] [--json]
ArgumentTypeRequiredDescription
--entityEntityIdNoTarget NPC (default: looked-at)
--jsonFlagNoOutput as JSON format

NPC appearance management.

Permission: hytale.command.npc.appearance

/npc appearance <model> [--entity=?]
ArgumentTypeRequiredDescription
modelModelAssetYesModel asset to apply
--entityEntityIdNoTarget specific NPC (default: looked-at entity)

NPC attack behavior override.

Permission: hytale.command.npc.attack

/npc attack [attack...] [--entity=?]
/npc attack clear [--entity=?]
SubcommandArgumentsDescription
(default)[attack...] [--entity]Set attack interaction overrides
clear[--entity]Clear attack overrides
ArgumentTypeRequiredDescription
attackInteraction[]NoList of attack interaction assets
--entityEntityIdNoTarget NPC (default: looked-at)

NPC blackboard (AI state) data.

Permission: hytale.command.npc.blackboard

/npc blackboard chunks
/npc blackboard chunk <position>
/npc blackboard drop
/npc blackboard views
/npc blackboard view <chunk>
/npc blackboard blockevents
/npc blackboard entityevents
/npc blackboard resourceviews
/npc blackboard resourceview <chunk>
/npc blackboard reserve <reserve> [--entity=?]
/npc blackboard reservation [--entity=?]
SubcommandArgumentsDescription
chunks-Show all blackboard chunk info
chunk<position>Show specific chunk entry
drop-Clear blackboard data
views-Show all partial views
view<chunk>Show specific view info
blockevents-Show block event subscriptions
entityevents-Show entity event subscriptions
resourceviews-Show all resource views
resourceview<chunk>Show specific resource view
reserve<reserve> [--entity]Set/clear NPC reservation
reservation[--entity]Show NPC reservation status
ArgumentTypeRequiredDescription
positionRelativePositionYesBlock position
chunkChunkPositionYesChunk coordinates
reserveBooleanYestrue to reserve, false to release
--entityEntityIdNoTarget NPC (default: looked-at)

NPC flocking behavior.

Permission: hytale.command.npc.flock.*

Note: These commands use view cone targeting (8 block distance, 30 degree angle) instead of entity IDs.

/npc flock leave
/npc flock grab
/npc flock join
/npc flock playerleave

Subcommands:

SubcommandPermissionDescription
leavenpc.flock.leaveRemove NPCs in view cone from their flocks
grabnpc.flock.grabPull flockless NPCs in view cone into player’s flock
joinnpc.flock.joinJoin flock of NPC in view cone
playerleavenpc.flock.playerleaveLeave current flock

NPC pathfinding.

Permission: hytale.command.npc.path

/npc path <instructions> [--entity=?]
/npc path polygon <sides> [--length=?] [--entity=?]
SubcommandArgumentsDescription
(default)<instructions>Set path from instruction string
polygon<sides> [--length]Create polygon path
ArgumentTypeRequiredDefaultDescription
instructionsStringYes-Pairs of rotation,distance (e.g., “45,5,90,3”)
sidesIntegerYes-Number of polygon sides
--lengthDoubleNo5.0Side length
--entityEntityIdNoLooked-atTarget NPC

NPC role management.

Permission: hytale.command.npc.role

/npc role <role> [--entity=?]
/npc role [--entity=?]
ArgumentTypeRequiredDescription
roleNpcRoleNoNew role asset (omit to get current role)
--entityEntityIdNoTarget NPC (default: looked-at)

Give items to NPC.

Permission: hytale.command.npc.give

/npc give <item> [--entity=?]
/npc give nothing [--entity=?]
SubcommandArgumentsDescription
(default)<item>Give item (armor or hand item)
nothing-Remove item from hand
ArgumentTypeRequiredDescription
itemItemYesItem asset ID
--entityEntityIdNoTarget NPC (default: looked-at)

Send message to NPC (for scripted behavior via BeaconSupport).

Permission: hytale.command.npc.message

/npc message <message> [--expiration=?] [--entity=?] [--all]
ArgumentTypeRequiredDefaultDescription
messageStringYes-Message to send
--expirationDoubleNo1.0Message expiration time
--entityEntityIdNoLooked-atTarget NPC
--allFlagNo-Send to all NPCs

NPC benchmarking.

Permission: hytale.command.npc.benchmark

/npc benchmark [--roles] [--sensorsupport] [--seconds=?]
ArgumentTypeRequiredDefaultDescription
--rolesFlagNo*-Benchmark role execution times
--sensorsupportFlagNo*-Benchmark sensor support
--secondsDoubleNo30.0Benchmark duration

One of --roles or --sensorsupport must be specified.


NPC sensor statistics.

Permission: hytale.command.npc.sensorstats

/npc sensorstats

Outputs statistics about NPC sensor usage.


Step NPC behavior (when frozen).

Permission: hytale.command.npc.step

/npc step [--entity=?] [--all] [--dt=?]
ArgumentTypeRequiredDefaultDescription
--entityEntityIdNoLooked-atTarget NPC
--allFlagNo-Step all NPCs
--dtFloatNo1/TPSDelta time for step

NPC debug flag management.

Permission: hytale.command.npc.debug

/npc debug show [targeting-options...]
/npc debug set <flags> [targeting-options...]
/npc debug toggle <flags> [targeting-options...]
/npc debug defaults [targeting-options...]
/npc debug clear [targeting-options...]
/npc debug presets [preset]
SubcommandArgumentsDescription
show[targeting]Show current debug flags
set<flags> [targeting]Set debug flags
toggle<flags> [targeting]Toggle debug flags
defaults[targeting]Reset to default flags
clear[targeting]Clear all debug flags
presets[preset]List presets or show preset info
ArgumentTypeRequiredDescription
flagsStringYesComma-separated flag names
presetStringNoPreset name to inspect

Multi-Select Targeting Options (for show/set/toggle/defaults/clear):

OptionTypeDefaultDescription
--angleFloat30.0View cone angle (0-180 degrees)
--rangeFloat8.0Targeting range (0-2048 blocks)
--rolesString-Filter by role names (comma-separated)
--nearestFlag-Only affect nearest matching NPC
--coneFlag-Preset: 30° cone, nearest only
--coneAllFlag-Preset: 30° cone, all matching
--sphereFlag-Preset: 180° (sphere), all matching
--rayFlag-Preset: 0° ray, nearest

Run interactive NPC behavior tests.

Permission: hytale.command.npc.runtests

/npc runtests [--roles=?] [--preset] [--pass] [--fail] [--abort]
ArgumentTypeRequiredDescription
--rolesStringNo*Comma-separated role list (format: RoleName or RoleName#flockSize)
--presetFlagNo*Use preset coverage test NPCs
--passFlagNoMark current test as passed, proceed to next
--failFlagNoMark current test as failed, proceed to next
--abortFlagNoAbort testing and show results

*One of --roles or --preset required to start new test session.

Workflow:

  1. Start with /npc runtests --roles=Wolf,Trork#3 or /npc runtests --preset
  2. Each NPC spawns and displays expected test criteria
  3. Mark results with /npc runtests --pass or /npc runtests --fail
  4. Results shown after all NPCs tested or --abort used

NPC position testing utilities.

Permission: hytale.command.npc.test

/npc test probe

Subcommands:

SubcommandDescription
probeTest position validity (air, water, collision) at player location

Outputs position validation info useful for debugging NPC spawn/movement issues.