GameText

From SkyCorp Global
Revision as of 21:21, 29 December 2017 by SkyCorp (talk | contribs)
Jump to navigation Jump to search
An example of text key/value pairs from the text editor.

Game Text is a key-value dictionary that stores much of the game's text. Keys are all uppercase, containing no spaces, but do contain underscores.

There can be multiple dictionaries loaded, but it is expected that text keys are unique across all dictionaries, so multiple dictionaries are essentially one big dictionary. Currently there is one for private builds, one for public+privates builds, and an "override" dictionary which code can use to override dictionary values at run-time. In this way, AS3 or LUA code can change just about any string in the game. However, it is not recommended to change shared text in this way as multiple mods accessing the same text may conflict with each other, leading to unexpected results


Public Static Methods

static boolean hasText(string textKey)

Returns

static void printText(string textKey

static string getText(string textKey

static string getTextRaw(string textKey

static void setTextOverride(string textKey