API:TomeGetAchievementsEntryData
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns one unlocked achievement entry of the Tome of Knowledge, with the type and subtype it belongs to.
entryData = TomeGetAchievementsEntryData(entryId)
Arguments
- entryId
number– Achievement entry id.
Returns
- entryData
table– The entry's data, or nothing if the id is invalid or the entry is still locked.
| Key | Type | Meaning |
|---|---|---|
id |
number |
Entry id. |
typeId |
number |
Id of the achievement type of the entry's subtype; 0 if the subtype is not found.
|
subTypeId |
number |
Id of the entry's subtype. Pass it to TomeGetAchievementsSubTypeData. |
name |
wstring |
Entry name. |
desc |
wstring |
Entry description. |
rewards |
table |
Array of reward tables with rewardType, rewardId and rewardDesc, built the same way as in TomeGetAchievementsSubTypeData.
|
Details
- Unlike the entries in TomeGetAchievementsSubTypeData, this table has no
isUnlocked,unlockEventIdorcardIdfields. - Exactly one argument must be passed.
Errors
These are written to the UI log, and the function returns nothing.
Error in function call 'TomeGetAchievementsEntryData': %d is not a valid Achievements Entry id.Error in function call 'TomeGetAchievementsEntryData': You have not yet unlocked any Entry # %d.
Example
From default/ea_tomeofknowledge/source/tomewindow_achievements.lua, opening the subtype page of an entry:
local entryData = TomeGetAchievementsEntryData( entryId )
if( entryData ) then
TomeWindow.ShowAchievementsSubType( entryData.subTypeId )
end
