Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeGetTacticRewardsList

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns the tactic rewards the player has unlocked through the Tome of Knowledge.

tacticsList = TomeGetTacticRewardsList()

Arguments

None.

Returns

tacticsList
table – Array of tactic rewards. Nothing is returned when there is no local player.

Each entry:

Key Type Meaning
rewardId number Id of the reward, for TomeGetTacticRewardData.
rewardType number 3 for the entries from the first reward list, 6 for those from the second.
name wstring Name of the tactic. If no name is available, Tactic # followed by the ability id.
abilityId number Ability id of the tactic.
iconNum number Icon number for GetIconData.

Details

  • Only rewards the player has unlocked are listed.

Errors

None.

Example

From ea_tomeofknowledge/source/tomewindow_rewards.lua:

local tacticsList = TomeGetTacticRewardsList()
TomeWindow.Rewards.currentTacticData = tacticsList
...
for index, entryData in ipairs( tacticsList ) do
    ButtonSetText( entryWindowName.."Text", entryData.name )
    local texture, x, y = GetIconData( entryData.iconNum )
    DynamicImageSetTexture( entryWindowName.."IconIconBase", texture, x, y )
end

See also