Scene files in SLIDGE are named according to the following format:
myFile+lang+fileExt;
This is done specifically to allow for localization (versions of your game in different languages) without haviong to re-create every kind of linking behavior for each language.
It works like this:
- You create your game in its native language
- You make a copy of the scene file or files and add an underscore (_) and a language suffix to the name
- You search for entries labelled “text”: in the scenes and replace the text with your translation
- When your game creates an engine object, set variable lang to the language suffix
For example, if I wish to add Spanish translations to my game, I might make a copy of Scenes.txt, name it Scenes_sp.txt and place my translated text into that file. My game might ask for the player's language and store it in a global variable. I would then launch the engine with something like this:
nnn = instance_create_depth(x, y, 0, obj_showDialog); nnn.lang = global.languageString;
I recommend making any edits in a JSON compatible text editor, such as Atom. If you break the {“structure”:“of things”}, the scene won't load!