<?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%3AModulesGetData</id>
	<title>API:ModulesGetData - 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%3AModulesGetData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:ModulesGetData&amp;action=history"/>
	<updated>2026-10-17T14:22:21Z</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:ModulesGetData&amp;diff=30610&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:ModulesGetData&amp;diff=30610&amp;oldid=prev"/>
		<updated>2026-10-16T19:47:19Z</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=Module}}&lt;br /&gt;
Returns information about every UI module (addon) the client has loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
modules = ModulesGetData()&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;
;modules : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – An array with one table per loaded module, in the client&amp;#039;s module order. Empty if no module has been loaded.&lt;br /&gt;
&lt;br /&gt;
Each module table has these fields, filled by the client:&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;wideStrName&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; || The module&amp;#039;s name, for display.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;moduleType&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || The &amp;lt;code&amp;gt;SystemData.UiModuleType&amp;lt;/code&amp;gt; the module was loaded with (1–5).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadStatus&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || A &amp;lt;code&amp;gt;SystemData.UiModuleLoadStatus&amp;lt;/code&amp;gt; value: not loaded, replaced, loading dependencies, one of the failure states, or succeeded with or without errors.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isEnabled&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || The enabled flag (see [[API:ModuleSetEnabled|ModuleSetEnabled]]).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isForCurrentGameVersion&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || Whether the game version in the module&amp;#039;s &amp;lt;code&amp;gt;.mod&amp;lt;/code&amp;gt; file matches the client&amp;#039;s.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isAutoDisabledOnGameVersionMismatch&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || Whether the module is turned off automatically when the versions do not match.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;replacedByModuleName&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || Name of the module that replaced this one, when &amp;lt;code&amp;gt;loadStatus&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;REPLACED&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;categories&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Array of category numbers from the &amp;lt;code&amp;gt;.mod&amp;lt;/code&amp;gt; file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;careers&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Array of career-line numbers from the &amp;lt;code&amp;gt;.mod&amp;lt;/code&amp;gt; file.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The table also contains the data from the module&amp;#039;s &amp;lt;code&amp;gt;.mod&amp;lt;/code&amp;gt; file. The keys the client writes are &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;autoenabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;f2pusable&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;replaces&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;author&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;warinfo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dependencies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;files&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;oninitialize&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;onupdate&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;onshutdown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;onmessage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;versionsettings&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;savedvariables&amp;lt;/code&amp;gt;. The stock UI reads these of them:&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;name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || The module&amp;#039;s name. This is the name [[API:ModuleSetEnabled|ModuleSetEnabled]] and [[API:ModuleInitialize|ModuleInitialize]] expect.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || The module&amp;#039;s version.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;author.name&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || The author&amp;#039;s name (&amp;lt;code&amp;gt;author&amp;lt;/code&amp;gt; is a table).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;description.text&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || The description (&amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; is a table).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;versionsettings.gameVersion&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || The game version the module was made for.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dependencies&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Array of dependency tables; &amp;lt;code&amp;gt;dependencies[i].name&amp;lt;/code&amp;gt; is the name of the required module.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The data is a snapshot. Changing a field in the returned table (the stock UI does this with &amp;lt;code&amp;gt;isEnabled&amp;lt;/code&amp;gt;) does not change the module; use [[API:ModuleSetEnabled|ModuleSetEnabled]].&lt;br /&gt;
* Text from the &amp;lt;code&amp;gt;.mod&amp;lt;/code&amp;gt; file is returned as ordinary strings; the stock UI converts it with &amp;lt;code&amp;gt;StringToWString&amp;lt;/code&amp;gt; before display.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;ea_uimodwindow/source/uimodwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
UiModWindow.modsListData = ModulesGetData()&lt;br /&gt;
&lt;br /&gt;
for modIndex, modData in ipairs( UiModWindow.modsListData )&lt;br /&gt;
do&lt;br /&gt;
    modData.modIndex = modIndex&lt;br /&gt;
    for _, category in ipairs( modData.categories )&lt;br /&gt;
    do&lt;br /&gt;
        ...&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reading the details of one module, also from &amp;lt;code&amp;gt;ea_uimodwindow/source/uimodwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LabelSetText( windowName..&amp;quot;ScrollChildName&amp;quot;, modData.wideStrName )&lt;br /&gt;
...&lt;br /&gt;
local version = StringToWString( modData.version )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:ModuleSetEnabled|ModuleSetEnabled]]&lt;br /&gt;
* [[API:ModuleInitialize|ModuleInitialize]]&lt;br /&gt;
* [[API:ModulesLoadFromDirectory|ModulesLoadFromDirectory]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>