Spawning and editing NPCs
/npc spawn puts a Jedi Academy NPC into the map, and /npc edit changes it afterwards.
You need an admin rank that carries the NPC permission. That is the only gate.
/npcworks while you are dead or spectating, so you can run a scene from the free camera.
What it does
Every NPC gets a numeric id when it spawns. That id is how you talk to it for the rest of the map. A spawned NPC has no visible name until you set one, so the spawn reply reminds you to do it. Set the display name early, because dialogue silently does nothing without one.
Spawning an NPC
The only required argument is the NPC type. Everything after it is optional, in a fixed order.
The arguments are positional, so to set a later one you need a placeholder for the earlier ones. Type a single hyphen to skip an argument and keep its default:
targetnameis an internal label used by commands, and never appears above the NPC's headmodelreplaces the type's own model, and takes the samemodel/skinform the player models usescaleis a percentage from 25 to 400, and anything outside that is clamped into rangex y zplace the NPC exactly, and all three must be present or none of them countyawis the direction it faces in degrees
Leave the coordinates off and the NPC appears in front of you. So /npc spawn stormtrooper guard - - 128 64 72 90 names the NPC and places it exactly. The two hyphens keep the type's own model and its
default scale.
Spawning a vehicle
Vehicles use a separate form with no model or scale arguments.
Choosing which NPC a command acts on
Most /npc subcommands take an optional target as their first argument. StoryForce resolves it in this
order, and stops at the first match:
- a numeric id, as printed on spawn and by
/npc list - an exact targetname
- part of a display name, with colour codes ignored
- your crosshair, if you gave no target at all
Naming a target that matches nothing is an error rather than a fallback to your crosshair. That is deliberate, so a typo cannot delete whatever you happen to be aiming at.
Editing an NPC
/npc edit takes the target, then a field, then a value. Omit the target to edit whatever your
crosshair is on.
The display name floats above the NPC. none clears it again. The FYI field adds a second, smaller
line under the name, readable when a player puts their crosshair on the NPC. It holds up to 127
characters.
pauseontarg makes a patrolling NPC stop and turn towards a nearby player who is looking at it. Use it
for a guard who should acknowledge people as they pass.
route puts the NPC on one of the 10 patrol routes. The route needs at least 2 waypoints before an NPC
can be assigned to it. See routing.
/npc edit also carries a poi subtree for attaching skill-gated secrets to an NPC, covered in
points of interest.
Moving an NPC
4 bare numbers after the target move it and turn it. There is no field name.
Use a targetname or a display name here rather than an id, because of the grammar trap described under Things to note.
Listing, removing and killing
/npc remove unspawns an NPC with no death and no corpse.
/npc kill kills it properly instead, so the death animation plays and the body lies where it fell
until the game clears it away.
Things to note
/npc editwith exactly four numbers is always the crosshair form./npc edit 4 128 64 72does not move NPC 4 to those coordinates. It moves whatever your crosshair is on to 4, 128, 64 facing 72. Use a targetname or a display name when you are moving an NPC to coordinates./npc remove allhas no confirmation. It deletes every NPC on the map the moment you press enter.- Scale is clamped, not refused. A value below 25 becomes 25 and one above 400 becomes 400, with no message saying so.
- A partial display name can match more than one NPC. The first match in entity order wins, so prefer ids or targetnames when 2 or more NPCs share a name.
- Coordinates are all or nothing. Give 2 of the 3 and StoryForce ignores all 3, and the NPC appears in front of you instead.
- Spawning from a free camera spawns in front of the camera. Nothing checks that the spot is solid ground, so an NPC placed while you float above the map lands in the void. Give coordinates, or stand somewhere, when you are spectating.
- A killed NPC keeps its id only while the corpse lasts. Most corpses clear themselves away about 10 seconds after the death animation finishes, and the id is then free for reuse. Droid corpses go faster.
- Routes are wiped on a map change, along with the NPCs on them.