Our game engine uses Lua to build game logic. Lua is a widely-used lightweight scripting system focused on speed and ease-of-use. Lua is widely documented and googling “How do I do X in Lua” usually returns useful results.
To write lua scripts you should first install Visual Studio Code, an excellent, free, cross-platform code editor. When installing VS Code, be sure to check the “Add ‘Open with Code’ to Windows Explorer” option, as it will make your life easier in the future.
You may have a preferred code editor; but we only support our DreamEditor extension for VS Code.
We also recommend Code Spell Checker (or a similar alternative).
Next we’re going to modify VS Code’s file associations so it recognizes our trigger files as Lua script. You can likely skip this step if you have the DreamEditor extension added to VS Code as it should setup the file extensions automatically. The DreamEditor extension is automatically installed and updated whenever you install a new version of the editor. You can check if you already have installed in the “Extensions” icon in VS Code.
To manually set up your file associations, go to “File > Preferences > Settings”. Then on the left go to “Text Editor > Files”. Finally, under “Associations” click “Add Item”. On the Item box write "*.lua.txt“, and on Value write”lua", without quotation marks.
It should now look like this:
Alternatively, you add this to settings.json via
"files.associations": {
"*.lua.txt": "lua"
}