GameText: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Public Static Methods == === static Map getMap(string mapName) === Gets map object from map name (string). Returns null if map with that name can not be found. == Publi...") |
No edit summary |
||
Line 1: | Line 1: | ||
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 Methods == | == 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 === | ||
[[Category:LUA Class Reference]] | [[Category:LUA Class Reference]] |
Revision as of 21:19, 29 December 2017
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