GetNpcArmorUpgrades

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 21:46, 18 October 2026 by QCherry (talk | contribs) (Document armor catalogs and eight armor-upgrade Lua APIs from upcoming 0.1.9; public release unchanged)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getNpcArmorUpgrades

AVAILABLE FROM UPDATE 0.1.9
Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8.

Reads the canonical selected armor pieces for a scripted NPC.

Syntax

parts = getNpcArmorUpgrades(npcId)

Parameters

Name Type Required Description
npcId number yes Existing scripted human NPC ID: finite integer 1..4294967295, not a numeric string.

Returns

A table with top, mid and bottom strings; empty slots are "". Returns false for an invalid/unavailable ID or invalid argument count/type. A valid character with no selected parts returns three empty strings, not false.

Examples

local parts = getNpcArmorUpgrades(npcId)
if parts then outputDebugString(parts.top) end

Notes

  • Server-side only; available from 0.1.9, not yet publicly released. Not included in public 0.1.8.
  • See Armor upgrades, Armor catalog and Armor upgrade catalog.
  • Read-only; reading does not require NPC ownership.
  • Equivalent alias: GetNpcArmorUpgrades.