<?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%3ALoadResources</id>
	<title>API:LoadResources - 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%3ALoadResources"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:LoadResources&amp;action=history"/>
	<updated>2026-10-18T04:52:56Z</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:LoadResources&amp;diff=30565&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:LoadResources&amp;diff=30565&amp;oldid=prev"/>
		<updated>2026-10-16T19:46:37Z</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=Interface}}&lt;br /&gt;
Loads an interface definition XML file from a folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LoadResources(directory, xmlFile, flag)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;directory : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Folder the file and the files it refers to are read from, for example &amp;lt;code&amp;gt;&amp;quot;Interface/InterfaceCore&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
;xmlFile : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the XML file in that folder, for example &amp;lt;code&amp;gt;&amp;quot;InterfaceCore.xml&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
;flag : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – Passed on to the loader. The stock UI always passes &amp;lt;code&amp;gt;IsInternalBuild()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The client reads and processes the XML file. The stock UI uses it for the font definitions and for &amp;lt;code&amp;gt;InterfaceCore.xml&amp;lt;/code&amp;gt;, an &amp;lt;code&amp;gt;&amp;amp;lt;Interface&amp;amp;gt;&amp;lt;/code&amp;gt; file that pulls in the pre-game windows with &amp;lt;code&amp;gt;&amp;amp;lt;Include file=&amp;quot;...&amp;quot; /&amp;amp;gt;&amp;lt;/code&amp;gt; entries relative to &amp;lt;code&amp;gt;directory&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;flag&amp;lt;/code&amp;gt; must be a real boolean; &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt; or a number raises the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message.&lt;br /&gt;
* The function needs at least three arguments and only reads the last three.&lt;br /&gt;
* The stock UI only calls it from &amp;lt;code&amp;gt;interfacecore/interfacecore.lua&amp;lt;/code&amp;gt;, during start-up.&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 has the wrong type.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;interfacecore/interfacecore.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LoadResources( &amp;quot;interface/interfacecore/fonts&amp;quot;, fontDirectory..&amp;quot;/fonts.xml&amp;quot;, IsInternalBuild() )&lt;br /&gt;
LoadResources( &amp;quot;Interface/InterfaceCore&amp;quot;, &amp;quot;InterfaceCore.xml&amp;quot;, IsInternalBuild() )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:LoadStringTable|LoadStringTable]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>