API:GetChapterName
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns the name of the War Journal chapter that belongs to an influence area.
name = GetChapterName(influenceId)
Arguments
- influenceId
number– Influence id of a chapter, for examplegroupLeaderData.influenceIDin the stock party window.
Returns
- name
wstring– Chapter name; empty if the name table is not loaded. Nothing is returned if the id is invalid.
Details
- GetChapterShortName returns the short form of the name.
- Exactly one argument must be passed.
Errors
Written to the UI log, and the function returns nothing.
Error in function call 'GetChapterName': %d is not a valid influence id.
Example
From default/ea_openpartywindow/source/openpartywindowtabnearby.lua:
LabelSetText (TOOLTIP_WIN.."ObjectiveText", GetChapterName(groupLeaderData.influenceID)..L": "..groupLeaderData.objectiveName)
From default/ea_alerttextwindow/source/alerttextwindow.lua:
if (infID > 0 and not hasPQButNoInfluence)
then
chapterName = GetChapterName( infID )
end
