GetArmorUpgrades: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Document armor catalogs and eight armor-upgrade Lua APIs from upcoming 0.1.9; public release unchanged
 
Release 0.1.9 / BUILD264 / Protocol42: availability and download setup; preserve experimental limits
 
Line 2: Line 2:
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;">
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;">
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.9</div>
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.9</div>
<div style="color:#111111; margin-top:0.25rem;">Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8.</div>
<div style="color:#111111; margin-top:0.25rem;">Available from 0.1.9.</div>
</div>
</div>


Line 33: Line 33:


== Notes ==
== Notes ==
* Server-side only; available from 0.1.9, not yet publicly released. Not included in public 0.1.8.
* Server-side only; available from 0.1.9.
* See [[Armor upgrades]], [[Armor catalog]] and [[Armor upgrade catalog]].
* See [[Armor upgrades]], [[Armor catalog]] and [[Armor upgrade catalog]].
* Equivalent alias: GetArmorUpgrades.
* Equivalent alias: GetArmorUpgrades.

Latest revision as of 13:27, 20 October 2026

getArmorUpgrades

AVAILABLE FROM UPDATE 0.1.9
Available from 0.1.9.

Lists the compatible parts for one exact base armor key.

Syntax

parts = getArmorUpgrades(armorKey)

Parameters

Name Type Required Description
armorKey string yes Exact lowercase base key from getPlayerArmorNames; not a part key or none.

Returns

A 1-based array of {key, slot, tier} tables. slot is top/mid/bottom and tier is integer 1..6. A known base with no pieces returns an empty table. An unknown/wrong-type key returns false.

Examples

local parts = getArmorUpgrades("mercenary")
if parts then
    for _, part in ipairs(parts) do
        outputDebugString(part.key .. " / " .. part.slot .. " / " .. tostring(part.tier))
    end
end

Notes