Movement

Movement

View as Markdown ·

On this page

circle-info

Every option on this page is saved to the NPC's own file in the npcs folder. Open it from the NPC editor's Movement button, or use /pnpc path.

A moving NPC walks on the ground. It steps up stairs, slabs, carpets, snow and single blocks, falls down drops with normal gravity, and walks around anything taller than one block, fences and walls included. Water is avoided unless Walk Through Water is on; lava, fire, magma, cactus, berry bushes and powder snow always are. The route is planned around obstacles, up to 48 blocks from where the NPC is.

An NPC only moves while a player can see it and its chunk is loaded. It never loads a chunk to move. Where it got to is not saved: after a restart, a reload or an edit that rebuilds the NPC, it starts again from where it was placed.

While it walks, it faces where it is going. Look at players takes over again when it stops.

#Mode

Mode The NPC
Stand Still Stays where it was placed.
Path Once Walks the waypoints in order and stops at the last one.
Path Loop Walks the waypoints in order, then back to the first, forever.
Path Back And Forth Walks to the last waypoint, then back to the first, forever.
Wander Strolls to random spots within the Wander Radius of where it was placed, or inside a WorldGuard region.

A path mode without waypoints stands still. Adding the first waypoint with /pnpc path add switches a standing NPC to Path Loop.

#Speed

How fast the NPC walks, in blocks per second, from 0.2 to 10. A player walks at about 4.3.

#Waypoints

The points the NPC walks between, up to 200. Add one where you stand, move it, reorder it or remove it from the list. A waypoint you cannot reach on foot is skipped by teleporting the NPC there.

Each waypoint has:

Option Description
Pause Seconds the NPC waits there, facing the way you looked when you added it.
Arrival Actions Actions run when it arrives, once for every player who can see it.

#Record Route

Starts recording, closes the menu and lets you walk the route. A waypoint is added every 3 blocks, and every block of climb. Standing still for 2 seconds or more adds a waypoint there with a pause of that length, facing the way you looked. Stop with right-click on the button or /pnpc path record <id> stop: the recording replaces the NPC's waypoints and a standing or wandering NPC switches to Path Loop. Logging out stops and saves it too.

#Wander Radius and Rest

How far from where it was placed the NPC strolls, from 1 to 64 blocks, and about how many seconds it rests between strolls. Each rest is between half and one and a half times that.

#Wander Region

A WorldGuard region the NPC wanders inside instead of the radius. It picks random spots within the region where it can stand, so a region away from where the NPC was placed makes it walk there first. Empty, a region that does not exist in the NPC's world, or a server without WorldGuard falls back to the Wander Radius.

#Pause Near Players

When a player clicks a walking NPC, or comes within this many blocks of it, the NPC stops and looks at them for the Pause Time, then walks on. A player has to leave the radius before coming closer stops it again. A radius of 0 leaves only clicks; a Pause Time of 0 never stops.

#Follow

The [FOLLOW] action makes the NPC follow the player who clicked it; [STOP_FOLLOW] ends it. /pnpc path follow <id> [player] does the same from a command.

Option Description
Follow Distance How close the NPC stays to the player, from 1 to 16 blocks.
Follow Range How far the player can get, from 4 to 128 blocks.
Teleport When Too Far Past the range, the NPC teleports to the player instead of giving up.

Following ends when the player logs out, changes world, or gets out of range without Teleport When Too Far. A standing NPC then walks back to where it was placed; a path or wandering NPC carries on with its route.

#Send Home

The Home button of the Movement screen puts the NPC back where it was placed and starts its path from the first waypoint. /pnpc path stop <id> freezes it where it is until /pnpc path start <id> or the next restart.

#Mount

Makes the NPC ride something. Ride An NPC puts it on another NPC and it moves with that NPC. Ride A Mob puts it on a mob that walks wherever the NPC walks; riding an NPC takes priority. Name Height moves the name while it rides.

Players can ride an NPC too: with Players Can Ride on, a right click seats them and sneaking gets them off. Seat Height moves the seat, a ride permission and a ride condition limit who can, and Get Players Off ejects whoever is riding.

#Guard

Turns the NPC into a guard. It is split into five screens.

Screen Holds
Targets The guard radius, and whether it attacks hostile mobs, players, or anyone who hit it in the last 30 seconds. A target permission and a target condition pick which players. Respect PvP Regions leaves players alone in WorldGuard regions where PvP is denied.
Combat The damage of each hit, 2 being one heart, and the seconds between two hits.
Health & Respawn The NPC's health, 0 meaning it cannot be hurt, where players see it (hidden, above the name or in the attacker's action bar), and the seconds before it comes back at its home.
Chase Whether it walks after its targets, and how far from home it goes before walking back.
Death The actions run for the player who killed it, and the items it drops.

The health display needs PhoenixHolograms for the option above the name. The hurt and death sounds are the NPC's own.

#Models

ModelEngine and BetterModel NPCs move the same way. A ModelEngine model plays its walking state while it moves.

My Cart
Spider

Your cart is empty

Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping