Map scripting
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 programmer's text editor or Lua supporting IDE (integrated development environment).
Download the OpenRA Visual Studio Code Lua extension to get Lua-API auto-completion and map globals (requires pressing the Reload
button in the popup at the bottom). You can then leverage the Lua language server for enhanced error detection.
๐ก Pro-Tip: On an empty .lua
file, press CTRL + SPACE then select New OpenRA mission script
and press ENTER to get a skeleton of the required functions.
ZeroBrane Studio is cross-platform Open Source Lua IDE. Download the
openra.lua file and place it in ZBS/packages/
or HOME/.zbstudio/packages
. Then restart and select Project
- Lua Interpreter
- OpenRA
. The file then gets code completion and tooltips based on the Lua-API definition.
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.yaml
and map.bin
. All script files for a particular map must be within the map's archive.
See Lua-API for more details.
- Mapping
- Custom Paradrops on a Map
- Triggers
- Setting a patrol
- Making Production Buildings on a Map
- Tiberian Dawn Mission Manual and The Red Alert Single Player Mission Creation Guide for Details on the original ini Missions (explaining Triggers, Teamtypes, ...)
Players ๐ฒ
- FAQ โ
- Installation ๐ฆ
- Game Content ๐ฟ
- Hotkeys and Stances ๐ฎ
- Strategies ๐
- Settings ๐ง
- Dedicated Server โพ
- RaspberryPi ๐
- Badges & Icons ๐ฅ
- Changelog ๐
Modders โ๏ธ
- Audio guide ๐
- Traits ๐
- Palettes and Remaps ๐จ
- World Coordinate System ๐
- Map scripting
- Lua-API ๐
- Conditions ๐
- Mapping ๐ง
- Pixelart ๐
Developers ๐ง
- Contributing โค๏ธ
- Compiling
- Hacking
- Coding Standard ๐
- Branches and Releases ๐
- Release Checklist โ
- Sequences
- Glossary
- Reverse engineering ๐
- License ยฉ๏ธ