SetPlayerArmorPreset
setPlayerArmorPreset
AVAILABLE FROM UPDATE 0.1.9
Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8.
Selects an authored armor preset for the currently equipped base.
Syntax
accepted = setPlayerArmorPreset(playerId, preset)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
number |
yes | Existing connected player ID: finite integer 1..4294967295, not a numeric string. |
preset |
string |
yes | light_1, light_2, medium_1, medium_2, heavy_1, heavy_2, or none to clear selected parts. |
Returns
Boolean: true when accepted; false for invalid/unavailable ID, unknown/inapplicable preset, or failed validation/ownership/requirements. none clears parts without removing the base.
Examples
-- Player already wears mercenary and owns the heavy_2 parts.
assert(setPlayerArmorPreset(playerId, "heavy_2"))
-- Keep the base, remove all selected parts:
assert(setPlayerArmorPreset(playerId, "none"))
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.
- The player must own the equipped base and every selected part, and satisfy the server equipment requirements. No items or attributes are granted.
- Uses the already equipped base; never selects a different base. The part must match its family and slot.
- true confirms server acceptance, not completed native rendering. No automatic healing/refill or database save.
- Treat remote requests as untrusted; authorize the action in your server resource.
- Sparse families use only existing parts up to the requested tier, so different presets may select the same pieces. Query getArmorUpgradePresets first.
- Equivalent alias: SetPlayerArmorPreset.