Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeGetTacticCounter

From RoR Wiki
Revision as of 19:50, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns a Tome of Knowledge tactic counter: its name, the player's progress, and the tactics it unlocks.

name, progress, rewards = TomeGetTacticCounter(counterId)

Arguments

counterId
number – Tactic counter id, for example the rewardId of a Tome reward of type GameData.Tome.REWARD_ABILITY_COUNTER.

Returns

Nothing if the id is unknown. Otherwise:

name
wstring – Name of the tactic line; empty if the name table is not loaded.
progress
number – The player's current count for this counter.
rewards
table – Array of exactly 3 tables, each with rewardId (number, the tactic, for TomeGetTacticCounterRewardData) and threshold (number, the count needed).

Details

  • The id must match a counter exactly.
  • No error is logged for an unknown id.
  • Exactly one argument must be passed.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From default/ea_interactionwindow/source/interactiontometraining.lua:

local tacticLineName, progress, rewardData = TomeGetTacticCounter( advanceData.requiredActionCounterID )
if (dependencyText == nil) and (progress < advanceData.requiredActionCounterCount)
then
    dependencyText = GetStringFormatFromTable("TrainingStrings", StringTables.Training.LABEL_REQUIRES_DEPENDENT_COUNT_X_Y_Z, { tacticLineName, towstring(progress), towstring(advanceData.requiredActionCounterCount) } )
end

From default/ea_tomeofknowledge/source/tomewindow.lua, passing all three results to a tooltip builder:

BuildTacticCounterTooltip( TomeGetTacticCounter( rewardData.rewardId ) )

See also