<?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%3AGetHeraldryBestOptions</id>
	<title>API:GetHeraldryBestOptions - 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%3AGetHeraldryBestOptions"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetHeraldryBestOptions&amp;action=history"/>
	<updated>2026-10-18T04:53:44Z</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:GetHeraldryBestOptions&amp;diff=30400&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:GetHeraldryBestOptions&amp;diff=30400&amp;oldid=prev"/>
		<updated>2026-10-16T19:43:56Z</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=Guild}}&lt;br /&gt;
Returns the heraldry emblems, patterns and colours available for a race filter and banner shape.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options = GetHeraldryBestOptions(filterId, shape)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;filterId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Race filter. The stock heraldry editor uses 20 (all Destruction), 21 (Chaos), 22 (Dark Elf), 23 (Greenskin), 30 (all Order), 31 (Dwarf), 32 (Empire), 33 (High Elf).&lt;br /&gt;
;shape : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Banner shape. Only patterns for this shape are returned.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;options : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – A table with three arrays, each 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;emblemList&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Array of emblem ids (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;patternList&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Array of pattern ids (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;) for the given shape.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;colorList&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Array of colour ids (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Each &amp;quot;all&amp;quot; filter (20, 30) returns the union of the three race filters of that realm.&lt;br /&gt;
* Any other &amp;lt;code&amp;gt;filterId&amp;lt;/code&amp;gt; matches no race group.&lt;br /&gt;
* The lists come from the client&amp;#039;s heraldry data; the server is not contacted.&lt;br /&gt;
* If there is no player object, or the Lua state is not available, the function returns nothing.&lt;br /&gt;
* The function needs at least two arguments and only reads the last two.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when an argument is not a number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_guildwindow/source/heraldryeditor.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HeraldryEditor.BestOptionsFiltered = GetHeraldryBestOptions(filterID, HeraldryEditor.CurrentShapeChoice)&lt;br /&gt;
&lt;br /&gt;
HeraldryEditor.MaxPatternChoices = #HeraldryEditor.BestOptionsFiltered.patternList&lt;br /&gt;
HeraldryEditor.MaxEmblemChoices = #HeraldryEditor.BestOptionsFiltered.emblemList&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetHeraldryConfigurationData|GetHeraldryConfigurationData]]&lt;br /&gt;
* [[API:SendHeraldryConfigurationData|SendHeraldryConfigurationData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>