Open77.npcs

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

client runtime5 functionsMarkdown

all

GAME

Open77.npcs.all()

Lists server-owned NPCs currently known by this client.

Canonical creation, tasks, health and removal are server-only; see wiki/npcs.md.

Returns

  • array of NPC snapshots

Registered in ResourceHost.cpp as LuaNpcsAll (line 6853).

Open77.npcs.currentTask(id)

Returns the canonical active task ID for an NPC.

Returns the last Open77 NPC task snapshot currently presented for a network NPC. It requires npcs.read; task state is ephemeral and can disappear when the NPC leaves the streaming set.

Parameters

  • idintegerrequired

Returns

  • task id, or nil

Registered in ResourceHost.cpp as LuaNpcCurrentTask (line 6856).

entity

GAME

Open77.npcs.entity(id)

Returns the ephemeral local Open77 entity handle for an NPC projection.

Returns nil before readiness and after stream-out. Never cache this handle across lifecycle changes.

Parameters

  • idintegerrequired

Returns

  • entity, or nil

Registered in ResourceHost.cpp as LuaNpcEntity (line 6855).

get

GAME

Open77.npcs.get(id)

Reads one server-owned NPC currently known by this client.

Read-only and guarded by npcs.read. The local entity handle is generation-checked and becomes invalid after stream-out.

Parameters

  • idintegerrequired

Returns

  • NPC snapshot, or nil

Registered in ResourceHost.cpp as LuaNpcGet (line 6852).

Open77.npcs.isStreamedIn(id)

Whether an NPC projection is attached and ready locally.

Reports whether a network NPC currently has a live client proxy in this player's streaming scope. It does not request streaming or prove that the server NPC record no longer exists.

Parameters

  • idintegerrequired

Returns

  • boolean

Registered in ResourceHost.cpp as LuaNpcIsStreamedIn (line 6854).

For agents and LLMs: this page as Markdown · llms.txt · llms-full.txt