API:TomeGetWarJournalStorylineData
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns a War Journal storyline with its list of entries (chapters).
storylineData = TomeGetWarJournalStorylineData(storylineId)
Arguments
- storylineId
number– Storyline id, from TomeGetWarJournalAvailiableStorylines.
Returns
- storylineData
table– The storyline's data, or nothing if the id is invalid or the storyline is still locked.
| Key | Type | Meaning |
|---|---|---|
id |
number |
Storyline id. |
name |
wstring |
Storyline name. |
summary |
wstring |
Summary text. |
entries |
table |
Array of the storyline's entries (see below). |
Each entry table in entries:
| Key | Type | Meaning |
|---|---|---|
id |
number |
Entry id, for TomeGetWarJournalEntryData. |
unlocked |
boolean |
Whether the player has unlocked the entry. |
title |
wstring |
Entry title. |
name |
wstring |
Entry name. A placeholder text while the entry is locked. |
influenceId |
number |
Influence id of the entry; 0 while the entry is locked.
|
Details
- Locked entries are listed too; note that the field is
unlockedhere, notisUnlockedas elsewhere in the Tome. - Entries whose
displayIndex(see TomeGetWarJournalEntryData) is0are not listed. - The argument check is shared with TomeIsWarJournalStorylineUnlocked: if the argument is missing or not a number, the Invalid Parameters message names that function.
Errors
These are written to the UI log, and the function returns nothing.
Error in function call 'TomeGetWarJournalStorylineData': %d is not a valid storyline id.Error in function call 'TomeGetWarJournalStorylineData': You have not yet unlocked storyline # %d.
Example
From ea_tomeofknowledge/source/tomewindow_warjournal.lua:
local function CacheStorylineData( storyId )
TomeWindow.WarJournal.StorylinesData[storyId] = TomeGetWarJournalStorylineData( storyId )
...
end
