Skip to content
FMFallout Multiplayer Scripting APIScripting guides and API
Runtime classServer APIGenerated

Npc

Defined in: server/api.d.ts:2518

A non-player actor the server took over from the data files: the generic placed ones, not the unique, essential or quest actors, which stay each client’s own. A client near it runs it with the game’s own AI and reports its health; nobody near, the server walks it. It lives for the whole session and comes back on its own a while after it dies. A script also makes its own with Npc.spawn: those stay dead until respawn and leave with remove. Move it with teleport, not by setting position.

new Npc(id): Npc

Defined in: server/api.d.ts:2523

Wraps an existing NPC with this ID; it spawns nothing.

number

Network entity identifier.

Npc

Entity.constructor

attack(target): boolean

Defined in: server/api.d.ts:2829

Sets the NPC on someone, as FiveM’s TaskCombatPed does a ped: the game that runs it starts combat with the target, as Actor.StartCombat does, and keeps its aim on it whatever its own target choice would be. It fights with what it carries, and the hits go through npcAttack as any other. The order ends when the target dies or leaves, or with stopAttacking.

Player | Npc

Who to fight: a living player or NPC of its space.

boolean

True when sent; false when it is dead, or the target is itself or no living player or NPC of its space.


carryInMouth(item, to?): boolean

Defined in: server/api.d.ts:2692

Has a dog carry an item in its mouth to someone, as Dogmeat brings the player what he found: the game that runs it sets off on the command-mode trip toward them and takes the item in its mouth (Papyrus Actor.DogPlaceInMouth), and every player sees it carried. The game keeps an item in a dog’s mouth only for such a trip: once it arrives, the item is gone and npcMouthChange reports null, the moment for a script to hand it over (player.giveItem). Only actors with Dogmeat’s keyword (DogmeatKeyword_DO) take one, and never an item the game marks as one a dog cannot carry, weapons among them. Null drops what it holds, as Actor.DogDropItems does: a fetched item falls to the ground.

string | number | null

A base object (a misc item, a bone, a teddy bear), by form ID; null drops what it holds.

string | number | Player | Npc

Whom it carries it to: a player, an NPC, or a placed reference by form ID. Left out, its leader (setLeader).

boolean

True when sent; false when it is dead or gone, or it has no leader and no to.


command(command, target?): boolean

Defined in: server/api.d.ts:2684

Gives the NPC a companion command, as its leader does in the game’s command mode and FiveM’s TaskGoToEntity and friends task a ped: the game that runs it carries it out with the companion’s own command packages. retrieve sends a dog to fetch an item, attack sends it at a target, inspect has it use a door or a terminal, stay holds it in place. Meant for a companion (setLeader); npcCommand tells of the ones its leader gives.

string

"call", "follow", "move", "attack", "inspect", "retrieve", "stay", "release", "heal", "assign", "ride" or "enter".

string | number | Player | Npc | Item

Who or what it is aimed at: a player, an NPC, a loose item (Item.spawn), or a placed reference by form ID (an item to fetch, a door, a workbench). Left out, the NPC itself: stay waits where it is, follow goes back to following.

boolean

True when sent; false when it is dead or gone.


damage(amount): boolean

Defined in: server/api.d.ts:2655

Hits the NPC from nobody, as a shot would; npcHit is not raised.

number

Health to take, above 0.

boolean

True when sent; false when it is dead.


dismember(part, explode?): boolean

Defined in: server/api.d.ts:2879

Takes a body part off the NPC, as Papyrus Actor.Dismember does: every player’s game shows the stump and the severed piece, and the game’s own limb losses replicate the same way. The game only dismembers the dead: on a living NPC it waits for the death.

string

The body part, as hits name them: “Head1”, “LeftArm1”, “RightArm1”, “LeftLeg1”, “RightLeg1” and the rest of the first 16 types; which ones come off is the creature’s.

boolean

Blown off in gore rather than cut off; false when left out.

boolean

True when sent; false when the NPC is gone.


flee(from): boolean

Defined in: server/api.d.ts:2777

Has the NPC run from a player or an NPC, as FiveM’s TaskSmartFleePed does a ped: the game that runs it puts it in combat with that body with its Confidence at Cowardly, so it runs and hides as a frightened settler does, and every player sees it. Its own Confidence comes back when it stops. It replaces an attack order, and attack replaces it. stopFleeing ends it.

Player | Npc

The body it runs from.

boolean

True when sent; false when it is dead or gone, or the body is not alive in its space.


getCombatTarget(): Player | Npc | null

Defined in: server/api.d.ts:2635

Who the NPC fights, as the game that runs it reports: its own choice, or the target attack gave it. The npcTarget event tells each change.

Player | Npc | null

Null while it fights nobody, or is dead.


getFactions(): object[]

Defined in: server/api.d.ts:2835

The memberships scripts changed on the NPC, each with its rank, or -1 for a faction it was taken out of. The factions its record gives it and no script touched are not listed.

object[]

One entry per faction, in the order they were first changed; empty when the NPC is gone.


getLeader(): Player | null

Defined in: server/api.d.ts:2641

The player the NPC follows as a companion.

Player | null

Null when it follows nobody.


getMouthItem(): number | null

Defined in: server/api.d.ts:2698

The base object a dog holds in its mouth, by form ID, as the game that runs it has it: what carryInMouth gave it, or what it fetched.

number | null

Null when it holds nothing.


getSimulator(): Player | null

Defined in: server/api.d.ts:2629

The player whose game runs the NPC.

Player | null

Null while nobody near does and the server walks it.


getSpace(): PlayerSpace | null

Defined in: server/api.d.ts:2623

Where the NPC is.

PlayerSpace | null

The worldspace or interior cell.


getValue(value): number | null

Defined in: server/api.d.ts:2727

The base setValue gave one of the NPC’s actor values.

string | number

An actor value by editor ID, such as "SpeedMult", "Aggression" or "Confidence", or by form ID. Not Health: setMaxHealth sets that.

number | null

Null when the script set none; the record’s own is in each player’s game alone.


giveWeapon(weapon): boolean

Defined in: server/api.d.ts:2927

Arms the NPC, as FiveM’s GiveWeaponToPed does a ped: every player’s copy carries the weapon with ammunition and wears it locked, so the game that runs it fights with it and everyone sees it. It lasts while the NPC does, through respawns.

string | number | null

A weapon (WEAP) by form ID or editor ID, such as "Minigun"; null hands the NPC back its own.

boolean

True when sent; false when the NPC is gone. Throws for a form no WEAP record has.


goTo(target): boolean

Defined in: server/api.d.ts:2669

Sends the NPC somewhere, as FiveM’s TaskGoToCoord does a ped: the game that runs it has it travel there as a commanded companion does, along the navmesh, and the server walks it there while nobody near runs it. npcArrive follows once it is there; it then stands there until stopGoing or the next goTo. Its fights still come first.

Vector3 | Player | Npc

A point of the NPC’s space, or a player or NPC to walk up to.

boolean

True when sent; false when it is dead or the target is itself.


heal(amount): boolean

Defined in: server/api.d.ts:2662

Gives the NPC health back, as FiveM’s SetEntityHealth raises a ped’s and Actor.RestoreValue does: the game that runs it restores it, and health follows with its next report. One nobody runs is healed on the server.

number

Health to give back, above 0; the NPC stops at its maximum.

boolean

True when sent; false when it is dead or gone.


kill(): boolean

Defined in: server/api.d.ts:2599

Kills it through the path a hit takes; npcDeath follows with a null killer. One no client has run yet dies when the next one takes it on.

boolean

True when sent; false when it is already dead.


knockDown(force?, from?): boolean

Defined in: server/api.d.ts:2763

Knocks the NPC off its feet into its ragdoll, as FiveM’s SetPedToRagdoll does a ped: the game that runs it pushes its body, it lies a moment and gets up by itself, and every player’s copy falls and gets up with it. One that is down already, seated or held in place is left as it is.

number

How hard it is thrown, as ObjectReference.PushActorAway takes it: small numbers, 1 to 50 (600 threw an NPC 8,700 units); 0, the default, drops it where it stands.

Vector3

The point it is thrown away from; where it stands by default.

boolean

True when sent; false when it is dead, gone, or no player’s game runs it.


lookAt(target): boolean

Defined in: server/api.d.ts:2810

Turns the NPC’s head and eyes toward a player or another NPC and keeps them there, on every player’s copy, as FiveM’s TaskLookAtEntity does a ped and Actor.SetLookAt an actor: a shopkeeper watching his customer, a guard eyeing a stranger. It does not turn its body or stop what it does.

Player | Npc | null

Whose body to watch; null to look where it pleases again.

boolean

True when sent; false when the NPC is gone, the target is itself, or it looked at nobody and null was given.


playIdle(idle): boolean

Defined in: server/api.d.ts:2900

Plays an idle animation on the NPC, as FiveM’s TaskPlayAnim does a ped and Player.playIdle a player: every player’s copy plays it. The idle’s own conditions apply, so one meant for another skeleton, a piece of furniture or a state the NPC is not in does nothing, and the NPC’s own AI may cut it short. stopIdle ends it.

string | number

An idle animation (IDLE) by editor ID, such as "IdleWave", or form ID.

boolean

True when sent; false when the NPC is dead or gone. Throws for a form no IDLE record has.


remove(): boolean

Defined in: server/api.d.ts:2605

Takes an NPC a script spawned out of the session; every player’s game drops it at the next update. The handle resolves to nothing after.

boolean

True when it goes; false for one that stands for a placed reference, which lives for the whole session.


removeFromFaction(faction): boolean

Defined in: server/api.d.ts:2850

Takes the NPC out of a faction on every player’s copy, as Actor.RemoveFromFaction does, whether its record or a script put it there.

string | number

A TESFaction form ID, as a number or hex string.

boolean

True when sent; false when the NPC is gone or 16 of its factions are already changed.


resetValue(value): boolean

Defined in: server/api.d.ts:2734

Gives every copy its own base for one actor value back.

string | number

An actor value by editor ID, such as "SpeedMult", "Aggression" or "Confidence", or by form ID. Not Health: setMaxHealth sets that.

boolean

True when sent; false when the NPC is gone or the value was not set.


respawn(): boolean

Defined in: server/api.d.ts:2611

Puts it back at its placement, whole, dead or alive; npcRespawn follows.

boolean

True when done.


say(line): boolean

Defined in: server/api.d.ts:2907

Has the NPC speak, voice and subtitle, as FiveM’s PlayPedAmbientSpeechNative does a ped and Papyrus ObjectReference.Say an actor: every player near it hears the same line. A topic’s line is picked by the game running the NPC among those whose conditions pass for it (its voice type, its faction), and the others say that one; a topic with no line for this NPC says nothing. Most generic topics have no editor ID: give their form ID.

string | number

A dialogue topic (DIAL) by form ID or editor ID, such as 0x47895, a raider’s idle chatter, or one line of a topic (INFO) by form ID.

boolean

True when sent; false when the NPC is dead or gone. Throws for a form no DIAL or INFO record has.


setActivationBlocked(blocked): boolean

Defined in: server/api.d.ts:2864

Stops what the game does when a player activates the NPC (its greeting, its dialogue, a trade), as ObjectReference.BlockActivation does, on every player’s copy: npcActivate is still raised, so a script answers with its own interaction, as FiveM resources do for a ped.

boolean

True to stop the game’s own activation, false to give it back.

boolean

True when sent; false when the NPC is gone.


setAlpha(alpha): boolean

Defined in: server/api.d.ts:2770

Draws the NPC more or less see-through on every player’s copy, as FiveM’s SetEntityAlpha does a ped and Actor.SetAlpha an actor: a ghost, a stalker, an NPC kept out of sight. Its collision and its AI are left as they are. It lasts while the NPC does.

number

0, invisible, to 1, solid.

boolean

True when sent; false when it is gone.


setCollision(enabled): boolean

Defined in: server/api.d.ts:2748

Takes the NPC’s collision away or gives it back on every player’s copy, as FiveM’s SetEntityCollision does a ped and the console’s tcl a selected actor: without it the NPC moves along where it looks, through walls and floors, without gravity. A ghost through a wall, a body walked out of a locked room. It lasts while the NPC does.

boolean

False to take its collision away, true to give it back.

boolean

True when sent; false when it is dead or gone.


setEssential(essential): boolean

Defined in: server/api.d.ts:2886

Makes the NPC essential, as Papyrus Actor.SetEssential and FiveM’s protected quest peds do: it can be hurt, but what would kill it drops it to its knees, bleeding out, and it gets up on its own a while later. Every player’s game holds it so, and one nobody runs keeps its last point of health. npcHit still hears each hit; npcDeath never comes. A quest-giver or a vendor scripts lean on stays alive this way while still reacting to a fight; setInvulnerable makes hits pass over it instead.

boolean

True to make it essential, false to make it mortal, even one its records make essential.

boolean

True when set; false when the NPC is gone.


setFactionRank(faction, rank?): boolean

Defined in: server/api.d.ts:2843

Puts the NPC in a faction at a rank, or re-ranks it, as Actor.SetFactionRank does and FiveM’s relationship groups do for a ped: every player’s copy holds the membership, so the game’s own hostility follows. A raider taken out of RaiderFaction and put in PlayerFaction (0x1C21C) treats players as its own. Up to 16 factions per NPC.

string | number

A TESFaction form ID, as a number or hex string.

number

0 to 127; 0 when left out.

boolean

True when set; false when the NPC is gone or 16 of its factions are already changed.


setInvulnerable(invulnerable): boolean

Defined in: server/api.d.ts:2893

Makes the NPC unhurtable by players and NPCs, as FiveM’s SetEntityInvincible does a ped: every player’s copy is a ghost (Actor.SetGhost), which shots, blows and explosions pass over, and the server drops any hit still reported on it. The script’s own damage and kill still go through.

boolean

True to make it unhurtable, false to make it hurtable again.

boolean

True when sent; false when the NPC is gone.


setLeader(player): boolean

Defined in: server/api.d.ts:2648

Makes the NPC a player’s companion, as the game’s own Followers quest makes one: the leader’s game runs it with the follow packages, command mode and trading of a vanilla companion, and every other player sees it follow. It is taken along when its leader goes to another space or far off, and let go when the leader leaves; npcLeaderChange follows.

Player | null

Who it follows; null lets it go.

boolean

True when done; false for a dead NPC or a player who is gone. Throws for anything but a Player or null.


setMaxHealth(value): boolean

Defined in: server/api.d.ts:2705

Sets the NPC’s health at full, as FiveM’s SetEntityMaxHealth does an entity: the game that runs it carries it as the NPC’s permanent Health, and every player’s copy takes it from there. The damage it took is kept, so an unhurt NPC stays at full. It lasts while the NPC does, through respawns.

number

Health at full, at least 1.

boolean

True when sent; false when it is dead or gone.


setName(name): boolean

Defined in: server/api.d.ts:2857

Names the NPC on every player’s copy, as a named ped in a FiveM resource: the crosshair, its health bar and its dialogue show the name in place of its record’s (“Settler”, “Raider”), as a reference’s ExtraTextDisplayData does.

string | null

What it is called, up to 47 bytes of UTF-8; null or an empty string gives it back its record’s own name.

boolean

True when sent; false when the NPC is gone.


setOutfit(armors): boolean

Defined in: server/api.d.ts:2920

Dresses the NPC, as FiveM’s SetPedComponentVariation does a ped: every player’s copy wears the pieces, locked, each over what the NPC’s record gives it in the same body slots. It lasts while the NPC does, through respawns.

(string | number)[] | null

Up to 12 armor pieces or clothes (ARMO) by form ID or editor ID, such as "Armor_Raider_Underarmor"; null or an empty list gives it back its own clothes.

boolean

True when sent; false when the NPC is gone. Throws for a piece no ARMO record has.


setRespawnDelay(seconds?): boolean

Defined in: server/api.d.ts:2871

Sets how long this NPC stays dead before it is back at its placement, whole, as the game’s cell respawn does for an area and FiveM scripts do for their peds: a boss that returns in an hour, a guard back in ten seconds, a raider camp that stays cleared. npcRespawn follows each return. It is the NPC’s own timer: one spawned by a script comes back only with one.

number | null

How long it lies dead before it is back, 0 to a year; null for never; left out, the server-wide delay again.

boolean

True when set; false when the NPC is gone.


setRestrained(restrained): boolean

Defined in: server/api.d.ts:2803

Freezes the NPC in place on every player’s copy, as FiveM’s FreezeEntityPosition does a ped and Actor.SetRestrained an actor: it stands where it is and neither walks, fights nor talks, its head still free to turn (lookAt). A shopkeeper behind his counter, a prisoner. It lasts through respawns.

boolean

True to freeze it where it stands, false to let it go.

boolean

True when sent; false when the NPC is gone.


setScale(scale): boolean

Defined in: server/api.d.ts:2712

Scales the NPC on every player’s copy, as ObjectReference.SetScale does: its body, its collision and its reach grow or shrink together. It lasts while the NPC does, through respawns.

number

1 for its record’s size, from 0.01 to 10: 1.5 a hulking boss, 0.5 a runt.

boolean

True when sent; false when it is gone.


setSneaking(sneaking): boolean

Defined in: server/api.d.ts:2755

Has the NPC sneak, as FiveM’s SetPedStealthMovement does a ped: the game that runs it holds it in the sneak stance (the console’s SetForceSneak) wherever its AI takes it, and every player’s copy crouches with it. isSneaking reports the stance its game runs.

boolean

True to crouch into sneak, false to stand up.

boolean

True when sent; false when it is dead or gone.


setValue(value, base): boolean

Defined in: server/api.d.ts:2720

Sets one of the NPC’s actor values on every player’s copy, as FiveM’s ped natives tune a ped: SpeedMult (100 is its own speed) for SetPedMoveRateOverride, Aggression, Confidence and Assistance for SetPedCombatAttributes. Each copy holds the base, its own coming back with resetValue. A value the game derives from something else keeps its own: DamageResist comes from the armor worn, so dress the NPC (setOutfit) instead. An attack or flee order holds Aggression or Confidence while it runs. Up to 16 values per NPC; it lasts while the NPC does.

string | number

An actor value by editor ID, such as "SpeedMult", "Aggression" or "Confidence", or by form ID. Not Health: setMaxHealth sets that.

number

The base every copy holds.

boolean

True when sent; false when the NPC is gone or 16 values are already set. Throws for a name or form no actor value has, and for Health.


setVirtualWorld(world): void

Defined in: server/api.d.ts:4292

Moves this entity into another virtual world.

number

Virtual-world identifier used to partition replication and visibility.

void

Entity.setVirtualWorld


setVisibleTo(player): void

Defined in: server/api.d.ts:4298

Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.

Entity | null

Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.

void

Entity.setVisibleTo


setWeaponDrawn(drawn): boolean

Defined in: server/api.d.ts:2741

Holds the NPC’s weapon out or away, as FiveM’s SetCurrentPedWeapon draws a ped’s: the game that runs it draws or holsters it (Actor.DrawWeapon) and keeps it so when its AI would change it, and every player’s copy follows. A guard on watch, a trader with nothing in hand. It does not start or end a fight.

boolean | null

True to hold its weapon out, false to keep it away, null to leave it to its AI.

boolean

True when sent; false when it is dead or gone.


stopAttacking(): boolean

Defined in: server/api.d.ts:2933

Drops the order attack gave: the NPC stops fighting, as Actor.StopCombat does.

boolean

True when it had one.


stopFleeing(): boolean

Defined in: server/api.d.ts:2783

Ends a flee order: the NPC’s fight ends and its own Confidence comes back.

boolean

True when sent; false when it is dead, gone or not fleeing.


stopGoing(): boolean

Defined in: server/api.d.ts:2822

Drops the order goTo gave: the NPC goes back to its own business.

boolean

True when it had one.


stopIdle(): boolean

Defined in: server/api.d.ts:2913

Ends the idle animation the NPC plays, on every player’s copy.

boolean

True when sent; false when the NPC is dead or gone.


stopUsing(): boolean

Defined in: server/api.d.ts:2816

Drops the order use gave: the NPC gets up and goes back to its own business.

boolean

True when it had one.


stopWandering(): boolean

Defined in: server/api.d.ts:2796

Ends a wander order: the NPC goes back to its own packages.

boolean

True when sent; false when it is dead, gone or not wandering.


teleport(position, heading?): boolean

Defined in: server/api.d.ts:2941

Moves the NPC within its space. Left alone, it wanders back toward its placement over time.

Vector3

Where to, in the NPC’s own space.

number

Facing in radians; the current one when left out.

boolean

True when done. Throws for a position that is not a finite Vector3.


toString(): string

Defined in: server/api.d.ts:2617

Formats this handle for logging.

string

The NPC’s network ID, reference and form.

Entity.toString


use(ref): boolean

Defined in: server/api.d.ts:2676

Has the NPC use a piece of furniture, as FiveM’s TaskStartScenarioAtPosition puts a ped to a scenario and a companion obeys the player’s command: the game that runs it walks it there and activates it, sitting down or getting to work, and sends it back if it gets up on its own. It replaces a goTo order, and goTo replaces it. stopUsing lets it go.

string | number

A placed piece of furniture, by its reference’s form ID: a chair, a bench, a workstation.

boolean

True when sent; false when it is dead or gone.


wander(center?): boolean

Defined in: server/api.d.ts:2790

Has the NPC live around a point, as FiveM’s TaskWanderInArea does a ped: the game that runs it idles, sits, leans and walks about within 512 units of the center, as Fallout 4’s settlers sandbox, and every player sees it do so. It replaces a goTo or use order, and either replaces it. stopWandering gives it back its own packages.

Vector3

The middle of the area, in the NPC’s space; where it stands when left out.

boolean

True when sent; false when it is dead or gone.


static all(): Npc[]

Defined in: server/api.d.ts:2971

Every NPC the server took over.

Npc[]

One handle per NPC; empty when the server could not read the game’s data files.


static getById(id): Npc | null

Defined in: server/api.d.ts:2978

Looks an NPC up by network ID.

number

Network entity identifier.

Npc | null

The handle, or null when no NPC has that ID.


static getByRef(ref): Npc | null

Defined in: server/api.d.ts:2985

Looks an NPC up by the placed reference it stands for.

string | number

The placed reference’s form ID.

Npc | null

The handle, or null when the server did not take that reference over.


static getInRange(center, radius, options?): Npc[]

Defined in: server/api.d.ts:2950

The NPCs around a point or a player, nearest first, as FiveM scripts walk the ped pool or ask GetClosestPed: where a script finds the shopkeeper by a door or the raiders near a camp. Positions are the ones the simulators last reported.

Vector3 | Player

A point, or a player, whose position and space are then the search’s.

number

How far from it, in game units.

space: where a point is, the Commonwealth when left out. limit: how many at most, 32 by default, never more than 512. includeDead: count the dead too.

boolean

number

{ worldSpace: number; } | { interiorCell: number; }

Npc[]

Empty when none is in range, or the player is gone. Throws for a center that is neither, or a negative radius.


static setDefaultRespawnDelay(seconds): void

Defined in: server/api.d.ts:2965

Sets how long every placed NPC without a delay of its own (setRespawnDelay) stays dead before it is back at its placement, whole: the server’s answer to the game’s cell respawn time. Null leaves the dead where they fell until a script calls respawn, so cleared areas stay cleared.

number | null

How long a dead NPC lies before it is back, 0 to a year; null for never. Two minutes until set.

void


static spawn(base, position, options?): Npc | null

Defined in: server/api.d.ts:2959

Makes a new NPC, as a FiveM script creates a ped: every player’s game builds it, a client near it runs it with the game’s own AI and the server walks it while nobody is near, as it does the placed ones. Unique, essential and quest actors are each player’s own: spawn generic ones. It stays dead when killed (npcDeath is raised) until respawn puts it back where it was spawned.

string | number

What to make: an NPC record (NPC_) or a leveled list of them (LVLN, rolled here), by form ID or editor ID, such as "LCharRaider" or "EncRaider01".

Vector3

Where it stands, in game units.

heading in radians around Z (0 faces +Y); space the worldspace or interior cell, the Commonwealth when left out.

number

{ worldSpace: number; } | { interiorCell: number; }

Npc | null

The new NPC; null when a leveled list rolled to nothing. Throws for a base that is no NPC_ or LVLN record.

readonly editorId: string

Defined in: server/api.d.ts:2538

The editor ID of its TESNPC record, such as “EncRaider01”; empty when the record has none. The game’s display names are localized in each player’s own files, so the server has none to give.


readonly form: number

Defined in: server/api.d.ts:2533

The TESNPC every client builds it from; the server rolled any leveled list.


readonly heading: number

Defined in: server/api.d.ts:2593

Facing, in radians around Z.


readonly health: number

Defined in: server/api.d.ts:2548

Current health, as its simulator last measured it. 0 until a client has run it: the server cannot work it out from the records.


readonly id: number

Defined in: server/api.d.ts:4260

Immutable network entity identifier.

Entity.id


readonly isActivationBlocked: boolean

Defined in: server/api.d.ts:2573

Whether setActivationBlocked stopped the game’s own activation of it.


readonly isDead: boolean

Defined in: server/api.d.ts:2558

Whether it is dead.


readonly isEssential: boolean

Defined in: server/api.d.ts:2583

Whether setEssential made it essential. One only its records make essential reads false.


readonly isInvulnerable: boolean

Defined in: server/api.d.ts:2588

Whether setInvulnerable made it unhurtable.


readonly isRestrained: boolean

Defined in: server/api.d.ts:2563

Whether setRestrained froze it in place.


readonly isSneaking: boolean

Defined in: server/api.d.ts:2568

Whether the game that runs it has it in the sneak stance, as its last report says.


readonly level: number

Defined in: server/api.d.ts:2543

The level its TESNPC record gives it. A record that scales with the player’s level has none of its own: the lowest level it can have is given.


readonly maxHealth: number

Defined in: server/api.d.ts:2553

Health at full; 0 until a client has run it.


readonly name: string

Defined in: server/api.d.ts:2578

The name setName gave it; empty while it shows its record’s own.


position: Vector3

Defined in: server/api.d.ts:4270

Authoritative world-space position; assignment forces replicated state.

Entity.position


readonly ref: number

Defined in: server/api.d.ts:2528

The form ID of the placed reference (ACHR) it stands for; 0 for one a script spawned.


rotation: Vector3 | Quaternion

Defined in: server/api.d.ts:4275

Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.

Entity.rotation


readonly state: StateBag

Defined in: server/api.d.ts:4280

Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.

Entity.state


readonly virtualWorld: number

Defined in: server/api.d.ts:4265

Current virtual-world identifier.

Entity.virtualWorld