Skip to content

SetTextOverride

Shows the mode’s own text for one of the game’s texts, for every language or one.

key is the key without its @, in any case. The text replaces the game’s own on every player’s screen whose game runs in language - or every player’s when it is left out (a language’s own text wins over it). nil or "" takes the override away: the game’s own text again.

Refused for a key that is not one (letters, digits, _ - ., at most 128), a language that is none, a text over 16 KB, or when the server holds 8 MB of texts already.

SetTextOverride(key, text [, language])
Parameter Type
key string the game’s key ("location_opatovice")
text string|nil the text shown for it; nil or "" = the game’s own again
language string "de", "german" … - only for players whose game runs in it; left out = every language (optional)

boolean - false when refused

function OnGameModeInit()
SetTextOverride("location_opatovice", "Kingsbridge") -- the map, the fast travel, the Codex title
SetTextOverride("location_opatovice", "Königsbrück", "de")
SetTextOverride("ui_fasttravel_kut_opatovice_question", "Ride to <h>Kingsbridge</h>?")
end

LoadTextOverrides · SetPlayerTextOverride · GetTextOverride · ClearTextOverrides · the The game’s texts group of the index