<?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%3AGameData.GetScenarioPlayers</id>
	<title>API:GameData.GetScenarioPlayers - 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%3AGameData.GetScenarioPlayers"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GameData.GetScenarioPlayers&amp;action=history"/>
	<updated>2026-10-26T17:32:43Z</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:GameData.GetScenarioPlayers&amp;diff=30308&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:GameData.GetScenarioPlayers&amp;diff=30308&amp;oldid=prev"/>
		<updated>2026-10-16T19:42:31Z</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=Scenario}}&lt;br /&gt;
Returns the scoreboard of the current scenario (or city siege instance): one entry per player with their stats.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
players = GameData.GetScenarioPlayers()&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;
;players : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – Array of player tables, indexed from 1, or nothing if the client has no scenario data.&lt;br /&gt;
&lt;br /&gt;
Each player 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.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;career&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;careerId&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Career id. The stock UI turns it into an icon with &amp;lt;code&amp;gt;Icons.GetCareerIconIDFromCareerNamesID&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;rank&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Character rank.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;realm&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Realm of the player.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;solokills&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;groupkills&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deathblows&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;deaths&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;damagedealt&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;healingdealt&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;renown&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;renownbonus&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;experience&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;experiencebonus&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || –&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;isplayer&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; for the local player&amp;#039;s own entry.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Players of both realms are included.&lt;br /&gt;
* When &amp;lt;code&amp;gt;GameData.Player.isInSiege&amp;lt;/code&amp;gt; is true the client reads the city instance&amp;#039;s player list; otherwise it reads the scenario&amp;#039;s list. If the list it needs does not exist, the function returns nothing.&lt;br /&gt;
* The stat keys are all lower case.&lt;br /&gt;
* A new table is built on every call. The stock scenario summary window rebuilds its data from it on the &amp;lt;code&amp;gt;SCENARIO_PLAYERS_LIST_UPDATED&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SCENARIO_PLAYERS_LIST_STATS_UPDATED&amp;lt;/code&amp;gt; events.&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;default/ea_scenariosummarywindow/scenariosummarywindow.lua&amp;lt;/code&amp;gt; (shortened):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local interimPlayerData = GameData.GetScenarioPlayers()&lt;br /&gt;
if( interimPlayerData ~= nil ) then&lt;br /&gt;
    for key, value in ipairs( interimPlayerData ) do&lt;br /&gt;
        ScenarioSummaryWindow.playersData[key] = {}&lt;br /&gt;
        ScenarioSummaryWindow.playersData[key].name = value.name&lt;br /&gt;
        ScenarioSummaryWindow.playersData[key].solokills = value.solokills&lt;br /&gt;
        ScenarioSummaryWindow.playersData[key].isplayer = value.isplayer&lt;br /&gt;
        ScenarioSummaryWindow.playersData[key].careerIcon = Icons.GetCareerIconIDFromCareerNamesID(value.careerId)&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:GameData.GetScenarioPlayerGroups|GameData.GetScenarioPlayerGroups]]&lt;br /&gt;
* [[API:GetCityInstanceId|GetCityInstanceId]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>