Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeGetWarJournalEntryData

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns the full data of an unlocked War Journal entry: story texts, activities with their tasks, and glyph activities.

entryData = TomeGetWarJournalEntryData(entryId)

Arguments

entryId
number – Entry id, as in the entries list of TomeGetWarJournalStorylineData.

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.
storylineId number Id of the storyline the entry belongs to.
storylineName wstring Storyline name (see Details).
displayIndex number Position of the entry within its storyline.
title wstring Entry title.
name wstring Entry name.
npcName wstring Name of the NPC of the entry.
locationText wstring Location text.
storyText wstring The story text.
influenceId number Influence id of the entry.
zoneId number Zone of the entry.
zoneAreaId number Zone area of the entry.
activities table Array of activities (see below).
glyphActivities table Array of glyph activities (see below).

Each activity in activities:

Key Type Meaning
id number Activity id.
type number Activity type.
typeName wstring Name of the activity type.
zoneId, zoneAreaId number Where the activity takes place.
name wstring Activity name.
text wstring Activity text.
tasks table Array of tasks, each with isComplete (boolean), name (wstring) and text (wstring). The name of a task that is not complete is a placeholder and its text is empty.

Each glyph activity in glyphActivities:

Key Type Meaning
id number Glyph activity id.
name wstring Name.
text wstring Text.
glyphLines table Array of glyph lines, each with id (number), name (wstring) and glyphs (table).

Each glyph in glyphLines[n].glyphs:

Key Type Meaning
id number Glyph id.
name wstring Glyph name.
tooltipText wstring Tooltip text.
isUnlocked boolean Whether the glyph is unlocked.
textureName string Name of the glyph's texture.
tooltipItems table Array of wstring lines for the tooltip. Missing when the client's tooltip text table is not loaded.

Details

  • Check with TomeIsWarJournalEntryUnlocked first, as the stock UI does.
  • An activity is only listed once the player's progress flag for it is set. The same kind of flag, per task, gives each task's isComplete.
  • storylineName is looked up in the storyline-name table with the entry id, not the storyline id, so it may not be the name of the entry's storyline. Use the name from TomeGetWarJournalStorylineData for storylineId instead.

Errors

These are written to the UI log, and the function returns nothing.

  • Error in function call 'TomeGetWarJournalEntryData': %d is not a valid entry id.
  • Error in function call 'TomeGetWarJournalEntryData': You have not yet unlocked entry # %d.

Example

From ea_tomeofknowledge/source/tomewindow_warjournal.lua:

local entryData  = TomeGetWarJournalEntryData( entryId )
-- If we are showing an entry that has a glyph activity have that be selected first
-- Instead of the story
if( entryData and
    entryData.glyphActivities and
    entryData.glyphActivities[1] )
then
    glyphActivityId = entryData.glyphActivities[1].id
end

The glyph display caches the result, from easystem_glyphdisplay/source/glyphdisplay.lua:

local entryData = TomeGetWarJournalEntryData( entryId )
if entryData ~= nil
then
    GlyphDisplay.cachedJournalEntries[entryId] = entryData
    return entryData
end

See also