Lua bindings for the Brood War API using the sol2 Lua bindings library, for the purposes of writing StarCraft AI using the Lua scripting language.
Currently supports BWAPI version 4.2.0 and Lua 5.1.5 (with planned support for Lua 5.3 and LuaJIT)
- Install Starcraft, BWAPI, and BWAPI-Lua according to the installation guide
- Download init.lua from examples/LuaExampleAI and move it to
Starcraft/bwapi-data/AI
- Run Chaoslauncher from the
Chaoslauncher
directory where BWAPI was installed (e.g.C:\Program Files (x86)\BWAPI\Chaoslauncher
) - In Chaoslauncher's Plugins tab, enable BWAPI Injector [RELEASE] and (optionally) W-MODE
- Start StarCraft (from Chaoslauncher) and create a new single player game. The AI should begin continuously mining and producing workers
- Installatation
- Your first Lua AI
- Documentation (work in progress)
local Broodwar = BWAPI.Broodwar
function BWAPI.onStart()
Broodwar:sendText("Hello world!")
end
- Install cmake and make sure it is available in the
PATH
- Clone this repository
- Run
make.bat
to build. The resulting files can be found inbuild/Release
- Run
make.bat test
to build and run the available tests of the Lua bindings
Running make.bat projects
will generate Visual Studio project/solution files inside the build
directory. Once that's finished, open build/BWAPI_Lua.sln
.
BWAPI-Lua is made available under the LGPLv3, the same license as BWAPI.
The licenses of all dependencies can be found in their respective directories within dependencies
.