<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetPlayerVariation</id>
	<title>API:GetPlayerVariation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3AGetPlayerVariation"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetPlayerVariation&amp;action=history"/>
	<updated>2026-10-17T11:51:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:GetPlayerVariation&amp;diff=30450&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetPlayerVariation&amp;diff=30450&amp;oldid=prev"/>
		<updated>2026-10-16T19:44:46Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Appearance}}&lt;br /&gt;
Returns the player character&amp;#039;s appearance variation values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
variations = GetPlayerVariation()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;variations : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – A table with the field below, plus one entry per variation slot, indexed from 1.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;maxVariations&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Number of variation slots the player&amp;#039;s model has. The array part has this many entries.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[1]&amp;lt;/code&amp;gt; … &amp;lt;code&amp;gt;[maxVariations]&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || One table per slot with a single field, &amp;lt;code&amp;gt;variation&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The &amp;lt;code&amp;gt;variation&amp;lt;/code&amp;gt; value of a slot is the value stored in the player&amp;#039;s appearance data for that slot. It is 0 when the player&amp;#039;s appearance data is marked as not set, and for slot numbers above 15.&lt;br /&gt;
* The function returns nothing if there is no player or the player&amp;#039;s data is not available.&lt;br /&gt;
* [[API:SetPlayerVariation|SetPlayerVariation]] changes these values for a preview.&lt;br /&gt;
* The stock UI never calls this function.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
A minimal example built from the return value described above:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local variations = GetPlayerVariation()&lt;br /&gt;
if ( variations ~= nil )&lt;br /&gt;
then&lt;br /&gt;
    for slot = 1, variations.maxVariations&lt;br /&gt;
    do&lt;br /&gt;
        DEBUG( L&amp;quot;slot &amp;quot;..slot..L&amp;quot;: &amp;quot;..variations[slot].variation )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:SetPlayerVariation|SetPlayerVariation]]&lt;br /&gt;
* [[API:RevertPlayerVariation|RevertPlayerVariation]]&lt;br /&gt;
* [[API:ApplyPlayerVariation|ApplyPlayerVariation]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>