<?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%3AGetGroupData</id>
	<title>API:GetGroupData - 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%3AGetGroupData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetGroupData&amp;action=history"/>
	<updated>2026-10-17T14:22:13Z</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:GetGroupData&amp;diff=30391&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:GetGroupData&amp;diff=30391&amp;oldid=prev"/>
		<updated>2026-10-16T19:43:48Z</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=Game}}&lt;br /&gt;
Returns a table describing the other members of the player&amp;#039;s group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
members = GetGroupData()&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;
;members : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Array of member tables, indexed from 1. One entry per groupmate slot; the player is not included.&lt;br /&gt;
&lt;br /&gt;
Each member table has these fields:&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;wstring&amp;lt;/code&amp;gt; || Character name. &amp;lt;code&amp;gt;L&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; for an empty slot.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;careerName&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; || Career name.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;careerLine&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Career line id.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;level&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Character level.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;battleLevel&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Battle (bolstered) level. Equal to &amp;lt;code&amp;gt;level&amp;lt;/code&amp;gt; when the client has no separate battle level.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;worldObjNum&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || World object number of the member.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;healthPercent&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Health, 0–100.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;actionPointPercent&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Action points, 0–100.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;moraleLevel&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Morale rank, 0–4, derived from the member&amp;#039;s morale percentage.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isGroupLeader&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isRVRFlagged&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isInSameRegion&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isMainAssist&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isMasterLooter&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isAssistant&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if the member is in the warband&amp;#039;s assistant list.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;zoneNum&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Zone id.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;online&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isDistant&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; || —&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Pet&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Table with one field, &amp;lt;code&amp;gt;healthPercent&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;), the health of the member&amp;#039;s pet.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* &amp;lt;code&amp;gt;battleLevel&amp;lt;/code&amp;gt; falls back to &amp;lt;code&amp;gt;level&amp;lt;/code&amp;gt; when the stored battle level is 0.&lt;br /&gt;
* &amp;lt;code&amp;gt;moraleLevel&amp;lt;/code&amp;gt; is converted from a percentage to a rank (0–4) with the client&amp;#039;s fixed morale thresholds.&lt;br /&gt;
* If there is no player object, or the Lua state is not available, the function returns nothing.&lt;br /&gt;
* A new table is built on every call. The stock UI caches it in &amp;lt;code&amp;gt;PartyUtils.GetPartyData()&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;easystem_utils/source/partyutils.lua&amp;lt;/code&amp;gt;) and refreshes single members with [[API:GetGroupMemberStatusData|GetGroupMemberStatusData]]. Its comments ask addons to prefer the &amp;lt;code&amp;gt;PartyUtils&amp;lt;/code&amp;gt; functions.&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;easystem_utils/source/partyutils.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function PartyUtils.GetPartyData()&lt;br /&gt;
    if( GameData.Party.partyDirty )&lt;br /&gt;
    then&lt;br /&gt;
        partyData = GetGroupData()&lt;br /&gt;
        GameData.Party.partyDirty = false&lt;br /&gt;
    end&lt;br /&gt;
    return partyData&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing for an empty slot, from the same file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( member ~= nil and member.name ~= nil and member.name ~= L&amp;quot;&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetNumGroupmates|GetNumGroupmates]]&lt;br /&gt;
* [[API:GetGroupMemberStatusData|GetGroupMemberStatusData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>