This article is a stub. You can help Stormworks: Build and Rescue Wiki by expanding it. |
Lua [ edit page ]
Subpages
Do you think a subpage is missing?
Lua is used in script components. It can read and write composite data, so it can do the same stuff other logic components can do, but in a programatic way.
It can also draw stuff on a monitor or over a camera feed.
If you need more assistance or have more questions, you can always join the Official Stormworks Discord and ask your questions in the #lua channel.
Please choose which kind of user you are
- You have no experience in programing? go to Learning Lua as a beginner
- You have experience in another language? go to Learning Lua as a programer
- You have experience in Lua? go to Exploring the Stormworks Lua API
- You have experience in Lua in Stormworks? go to Special advice and little known facts
Tools to program Lua scripts
PonyIDE
In case you already know a little bit, or watched one of those tutorials, you can use this website to program scripts.
https://lua.flaffipony.rocks
Advantages compared to the original editor in game
- undo/redo function
- autocompletion
- debug scripts with print()
- zooming
- simulate inputs and properties
- minifier
- UI Builder
- share scripts with other people
VSCode Extension
For those who wish to take their Lua further, an extension has been created for VSCode - a professional development environment.
You can use this to develop lua scripts on Windows (Note, Mac and Linux are not yet supported)
Download here, or search "Stormworks" in VSCode: https://marketplace.visualstudio.com/items?itemName=NameousChangey.lifeboatapi
Advantages over the ingame editor, and online editing tools:
- Full debugger support with breakpoints
- Full intellisense/code-hinting
- Ability to organise code into libraries and re-use functions across multiple scripts
- More powerful Stormworks Minifier
- More accurate Stormworks Simulator
- Multi-screen & Multi-MC simulation support
- As a desktop tool:
- Can more easily store code on github
- Can more easily chain build processes with other tools
- EmmyLua type hinting
- Redundancy Remover syntax
- Access to built-in utilities library, including Vector math library
See the quick feature rundown here: https://www.youtube.com/watch?v=2oroLYoOV_Q
Lua Video Tutorial