<?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%3ATomeGetPlayerTitleData</id>
	<title>API:TomeGetPlayerTitleData - 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%3ATomeGetPlayerTitleData"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:TomeGetPlayerTitleData&amp;action=history"/>
	<updated>2026-10-18T04:54:03Z</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:TomeGetPlayerTitleData&amp;diff=30814&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:TomeGetPlayerTitleData&amp;diff=30814&amp;oldid=prev"/>
		<updated>2026-10-16T19:50:35Z</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=Tome}}&lt;br /&gt;
Returns the data of a player title: its display name, description and where it is unlocked.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
titleData = TomeGetPlayerTitleData(titleId)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;titleId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Title id, for example &amp;lt;code&amp;gt;GameData.Player.activeTitle&amp;lt;/code&amp;gt; or an &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; from [[API:TomeGetPlayerTitlesTypeData|TomeGetPlayerTitlesTypeData]].&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;titleData : &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; – The title&amp;#039;s data. Empty if the title is locked or the id is invalid.&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;id&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || Title id.&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; || The title as displayed, with the player&amp;#039;s name filled in. If no name is available, &amp;lt;code&amp;gt;Title #&amp;lt;/code&amp;gt; followed by a number.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; || Description of the title.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; || A number stored with the title.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;unlockInfo&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;table&amp;lt;/code&amp;gt; || Where the title is unlocked: &amp;lt;code&amp;gt;section&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;entry&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;section&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;entry&amp;lt;/code&amp;gt; are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; when there is no unlocking entry.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* For a title the player has not unlocked, the returned table is empty. The stock UI checks &amp;lt;code&amp;gt;titleData.name ~= nil&amp;lt;/code&amp;gt;.&lt;br /&gt;
* If the id is unknown, an error is logged and an empty table is returned.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
These are written to the UI log; the call returns normally.&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;TomeGetPlayerTitleData&amp;#039;: %d is not a valid title id.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;ea_tomeofknowledge/source/tomewindow_rewards.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local titleId = GameData.Player.activeTitle&lt;br /&gt;
if( titleId ~= 0 ) then&lt;br /&gt;
    local titleData = TomeGetPlayerTitleData( titleId )&lt;br /&gt;
    if( titleData ) then&lt;br /&gt;
        titleText = titleData.name&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From &amp;lt;code&amp;gt;ea_tomeofknowledge/source/tomewindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local titleData = TomeGetPlayerTitleData( rewardData.rewardId )&lt;br /&gt;
if( titleData.name ~= nil ) then&lt;br /&gt;
    name = titleData.name&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:TomeGetPlayerTitlesTypeData|TomeGetPlayerTitlesTypeData]]&lt;br /&gt;
* [[API:TomeIsPlayerTitleUnlocked|TomeIsPlayerTitleUnlocked]]&lt;br /&gt;
* [[API:TomeSetActivePlayerTitle|TomeSetActivePlayerTitle]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>