Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeGetNoteworthyPersonsTOC

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns the table of contents of the Tome of Knowledge Noteworthy Persons section: the zone pairings, split into tiers, with their zones.

pairings = TomeGetNoteworthyPersonsTOC()

Arguments

None.

Returns

pairings
table – Array of zone pairings.

Each pairing table:

Key Type Meaning
id number Pairing id.
name wstring Pairing name.
tiers table Array of exactly four tier tables, for tiers 1 to 4. Each has one key, zones.

Each zone table in tiers[n].zones:

Key Type Meaning
id number Zone id, as used by TomeGetNoteworthyPersonsZoneData.
name wstring Zone name.

Details

  • All pairings and zones of the section are listed, whether or not the player has unlocked anything there.
  • A tier with no zones has an empty zones table.
  • If the name tables are not loaded, names are empty wide strings.

Errors

None.

Example

From ea_tomeofknowledge/source/tomewindow_noteworthypersons.lua:

TomeWindow.NoteworthyPersons.TOCData = TomeGetNoteworthyPersonsTOC()

-- Sorth the pairing and zones lists by their names
for pairingIndex, pairingData in ipairs( TomeWindow.NoteworthyPersons.TOCData ) do
    for tierIndex, tierData in ipairs( pairingData.tiers ) do
        table.sort( tierData.zones, DataUtils.AlphabetizeByNames )  
    end
end

See also