Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetPlayerVariation

From RoR Wiki
Revision as of 19:44, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Appearance functions
Version: WAR 1.4.8

Returns the player character's appearance variation values.

variations = GetPlayerVariation()

Arguments

None.

Returns

variations
table – A table with the field below, plus one entry per variation slot, indexed from 1.
Key Type Meaning
maxVariations number Number of variation slots the player's model has. The array part has this many entries.
[1] … [maxVariations] table One table per slot with a single field, variation (number).

Details

  • The variation value of a slot is the value stored in the player's appearance data for that slot. It is 0 when the player's appearance data is marked as not set, and for slot numbers above 15.
  • The function returns nothing if there is no player or the player's data is not available.
  • SetPlayerVariation changes these values for a preview.
  • The stock UI never calls this function.

Errors

None.

Example

A minimal example built from the return value described above:

local variations = GetPlayerVariation()
if ( variations ~= nil )
then
    for slot = 1, variations.maxVariations
    do
        DEBUG( L"slot "..slot..L": "..variations[slot].variation )
    end
end

See also