Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:IsScenarioF2PServer

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

Returns whether the client has the "scenario free-to-play server" flag set.

isF2P = IsScenarioF2PServer()

Arguments

None.

Returns

isF2P
boolean – true if the client's flag has the value 1.

Details

  • The function only reads a value stored by the client. It sends nothing to the server.
  • The only stock caller is the character creation screen (interfacecore/source/characterselectwindow.lua): when the result is false (or the build is internal), it adds a "no template" entry to the character template list. Its comment calls such servers "template-enforced".

Errors

None.

Example

From interfacecore/source/characterselectwindow.lua:

if(IsScenarioF2PServer() == false or IsInternalBuild())
then
    -- Not a template-enforced server, so display the no-template option
    CharacterSelectWindow.numTemplates = 1
    CharacterSelectWindow.bNoTemplateOptionDisplayed = true
    ComboBoxAddMenuItem("CharacterSelectTemplateOptionsComboBox", GetPregameString( StringTables.Pregame.LABEL_NO_TEMPLATE ))
end

See also