CyberM.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

CyberM.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 6716).

CyberM.npcs.currentTask(id)

Returns the canonical active task ID for an NPC.

Returns the last CyberM 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 6719).

entity

GAME

CyberM.npcs.entity(id)

Returns the ephemeral local CyberM 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 6718).

get

GAME

CyberM.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 6715).

CyberM.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 6717).

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