Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:PregameHasROCChanged

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

Returns whether the Rules of Conduct file differs from the one the player last accepted.

changed = PregameHasROCChanged()

Arguments

None.

Returns

changed
boolean – true if the file's stamp differs from the value saved in the user settings.

Details

  • The client looks up data/strings/<LANG>/pregame/ROC.txt in the game archives, with <LANG> replaced by the client language, and reads a stamp value from its archive entry. A missing file gives 0.
  • That value is compared with the ROC value stored in the user settings. Any difference returns true.
  • The file name is the one PregameGetROCFileName returns.

Errors

None.

Example

From interfacecore/source/eularocwindow.lua, after the EULA was accepted:

BroadcastEvent( SystemData.Events.PREGAME_EULA_ACCEPTED )

if ( PregameHasROCChanged() )
then
    currentMode = MODE_ROC
    SetupWindowForCurrentMode( false )
else
    -- ...

See also