Skip to content
FMFallout Multiplayer Scripting APIScripting guides and API
Global objectServer APIGenerated

Objects

const Objects: object

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

Doors, locks and containers, by the form ID of their placed reference. The server knows only what changed this session; the rest is as the data files place it, which only a client loads.

getContainer(ref): InventoryItem[] | null

What a container holds.

string | number

The placed reference’s form ID.

InventoryItem[] | null

Null until a player or a script set its contents this session; before that, each client rolls its own.

getContainerHolder(ref): Player | null

The player whose menu has a container open; nobody else can take from it meanwhile.

string | number

The placed reference’s form ID.

Player | null

Null when nobody holds it.

getMovedPosition(ref): Vector3 | null

Where a player’s build mode or a script last put a placed reference.

string | number

The placed reference’s form ID.

Vector3 | null

Null while it stands where the data files place it.

isActivationBlocked(ref): boolean | null

Whether a script blocked activating a reference.

string | number

The placed reference’s form ID.

boolean | null

Null when no script decided this session: the game’s own state stands, which blocks a settlement’s workbench until its quest gives it to the player.

isDoorOpen(ref): boolean | null

Whether a door stands open.

string | number

The placed reference’s form ID.

boolean | null

Null when nobody moved it this session.

isEnabled(ref): boolean | null

Whether a script left a reference in the world or took it out.

string | number

The placed reference’s form ID.

boolean | null

Null when no script decided this session: the game’s own state stands.

isLocked(ref): boolean | null

Whether a door or container is locked.

string | number

The placed reference’s form ID.

boolean | null

Null when nobody changed its lock this session.

move(ref, position, angle?): boolean

Moves a placed reference for everyone, players who join later included, as a player moving it in a settlement’s build mode does: the power it receives through the air and its wires follow it.

string | number

The placed reference’s form ID.

Vector3

Where it stands now.

Vector3

Its rotation, radians.

boolean

False for a reference the session scrapped or a pose that is not finite.

setActivationBlocked(ref, blocked): void

Blocks or allows activating a reference for everyone, players who join later included. Allowing a settlement’s workbench lets players enter its build mode.

string | number

The placed reference’s form ID.

boolean

Blocked or allowed.

void

setContainer(ref, items): boolean

Fills a container for everyone.

string | number

The placed reference’s form ID.

object[]

Exactly what it should hold.

boolean

False past 1024 kinds of item.

setDoorOpen(ref, open): void

Opens or closes a door for everyone, players who join later included.

string | number

The placed reference’s form ID.

boolean

Open or closed.

void

setEnabled(ref, enabled): void

Takes a reference the data files place out of every player’s world, as ObjectReference.Disable does, or puts it back, players who join later included: a barricade torn down, a door bricked up, a prop shown for an event. Held against the game’s own scripts and cell loads, which put references back as they please.

string | number

The placed reference’s form ID.

boolean

In the world, or out of it.

void

setLocked(ref, locked): void

Locks or unlocks a door or container for everyone.

string | number

The placed reference’s form ID.

boolean

Locked or not.

void