Subject: Singlepayer scenario
Hi all,
I've been playing around with alzi "menu_refactoring" code branch, and hacked a singleplayer scenario editor.
That means you have a new menu entry in "singleplayer" games called scenarios, next screen will list available scenarios found in maxr/scenarios, next screen you are in the game with ennemy players ! Ok for now all is static, so you are going to attack a static player not moving, but all sentry are activated so watch out for turrets !
How it works, each scenario is a text file that describe the game, it features:
- Choose the map
- Choose game settings
- Add 1 to 7 opponents
- Add Buildings, units and landing units
It misses (for now...):
- Clans selection does not work on human and on ennemy landing units
- Handle unit upgrades
- End of game conditions
- Load/save
Here is an example of scenario file, it is scripted with Lua language :
DownloadSource code (Text):scenarioName = "Assault : destroy ennemy base"
description = "Watchout for anti aircrafts"
settings = LuaSettings()
settings:setBridgeHeadDefinite(true) -- default to mobile (no landing mining station)
game:setSettings(settings)
human = game:getHumanPlayer()
human:setLandingPosition(35, 60)
human:setClan(0)
for i=1,6 do human:addLandingUnit("bomber") end
human:addLandingUnit("awac")
mapName = "Iron Cross.wrl"
game:loadMap(mapName)
billy = game:addPlayer("Billy")
billy:setClan(6)
billy:setLandingPosition(50, 37)
for i=1,8 do billy:addLandingUnit("missel") end
for i=1,10 do billy:addBuilding("block", 43 + i, 33) end
for i=1,10 do billy:addBuilding("block", 43 + i, 43) end
for i=1,10 do billy:addBuilding("block", 44, 33 + i) end
for i=1,10 do billy:addBuilding("block", 54, 33 + i) end
billy:addBuilding("radar", 49, 39)
billy:addBuilding("gun_aa", 45, 34)
billy:addBuilding("gun_aa", 53, 34)
billy:addBuilding("gun_aa", 45, 42)
billy:addBuilding("gun_aa", 53, 42)
-- Start the game
game:start()
I attached a few demonstration scenarios.
To make this run, you will have to compile the "scenario" branch from git (once I'll have find out how to push the code!).,
add the scenario directory into your maxr directory and that's it.
Note: this is still work under progress and is based on menu refactoring branch of alzi (we encoutered some SDL crashes at least on windows);
Testing is welcome as it will test both branch all toghether
After all this is set, I'll try to make the scenario more reactive by scripting unit movements and attacks !
Have fun !
Attachments: