GameText: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[File:TextEditorScreenshot.png|thumb| | |||
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. | 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 | 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 == | == Public Static Methods == |
Revision as of 21:21, 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