Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetLiveEventData

From RoR Wiki
Revision as of 19:44, 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 · LiveEvent functions
Version: WAR 1.4.8

Returns the texts, picture and sound of a live event.

eventData = GetLiveEventData(eventId)

Arguments

eventId
number – Event id, as in GetLiveEventList.

Returns

eventData
table – The event's data, or nothing if the event is unknown or inactive.
Key Type Meaning
title wstring Event title.
subTitle wstring Subtitle.
description wstring Summary text.
loreText wstring Lore text.
textureName string Name of the event's picture texture. The stock UI passes it to DynamicImageSetTexture.
soundId number Sound to play for the event; 0 for none. The stock UI plays it with Sound.Play.

Details

  • The table has no id field.
  • Exactly one argument must be passed.

Errors

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

  • Error in function call 'GetLiveEventData': Event %d not found. (also for an event that exists but is inactive)

Example

From default/ea_tomeofknowledge/source/tomewindow_liveevent.lua:

local eventData = GetLiveEventData( TomeWindow.CurrentLiveEventId )
...
LabelSetText( PARENT_WINDOW.."Title", wstring.upper( eventData.title ) )
LabelSetText( PARENT_WINDOW.."SubTitle", eventData.subTitle )
LabelSetText( PARENT_WINDOW.."SummaryText", eventData.description )
LabelSetText( PARENT_WINDOW.."LoreText", eventData.loreText )
...
DynamicImageSetTexture( PARENT_WINDOW.."Image", eventData.textureName, 0, 0)

See also