Clone this wiki locally
The map scripting feature of OpenRA allows you to create custom shellmaps, minigames, single player/co-op missions and more.
The Lua scripting language is used in OpenRA for scripting maps. There is no need to download Lua from the website; a custom build of Lua is included with recent versions of the game.
A basic guide to Lua can be found on the
Programming in Lua (first edition) page.
You can use any programmers text editor or Lua supporting IDE (integrated development environment).
ZeroBrane Studio is cross-platform Open Source Lua IDE. Download the
openra.lua file and place it in in
HOME/.zbstudio/packages. Then restart and select
Lua Interpreter -
OpenRA. The file then gets code completion and tooltips based on the Lua-API definition.
You will then get syntax highlighting and templates for the .lua files referenced in the OpenRA.sln main project file.
Setting up Lua for your map
This guide assumes you have knowledge of creating and editing OpenRA maps (See Mapping).
Lua script code is to be contained in one or more
.lua files within the map archive, next to
map.bin. All script files for a particular map must be within the map's archive.
See Lua-API for more details.