set_loadout

Sets or clears a player’s personal-combat loadout.

Function

Synopsis

btech.player.set_loadout( player, loadout )

Arguments

DbRef|Object player
The player.
BtechPersonalCombatLoadout|nil loadout
The new loadout, or nil to clear it.

A loadout contains a required armor table:

FieldTypeRange
headinteger0 to 2
torsointeger0 to 8
handsinteger0 to 2
feetinteger0 to 2

It may also contain right and left equipment tables. Each equipment table has these fields:

BtechPartRef weapon
A personal-combat weapon.
integer|nil ammunition
Optional ammunition from 0 to 255. This field is valid only for a weapon that uses ammunition. If omitted, the weapon receives its ammunition_per_ton amount; pass 0 explicitly to equip the weapon without ammunition.

Returns

None.

See Also