diff --git a/binaries/system/readme.txt b/binaries/system/readme.txt index df2c1947c1..12ef19618c 100644 --- a/binaries/system/readme.txt +++ b/binaries/system/readme.txt @@ -8,6 +8,7 @@ Basic gameplay: Autostart: -autostart="TYPEDIR/MAPNAME" enables autostart and sets MAPNAME; TYPEDIR is skirmishes, scenarios, or random +-autostart-biome=BIOME sets BIOME for a random map -autostart-seed=SEED sets randomization seed value (default 0, use -1 for random) -autostart-ai=PLAYER:AI sets the AI for PLAYER (e.g. 2:petra) -autostart-aidiff=PLAYER:DIFF sets the DIFFiculty of PLAYER's AI (default 3, 0: sandbox, 5: very hard) diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index d046f9a4fc..b418ec3b69 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -800,6 +800,7 @@ CParamNode GetTemplate(const std::string& templateName) * * -autostart="TYPEDIR/MAPNAME" enables autostart and sets MAPNAME; * TYPEDIR is skirmishes, scenarios, or random + * -autostart-biome=BIOME sets BIOME for a random map * -autostart-seed=SEED sets randomization seed value (default 0, use -1 for random) * -autostart-ai=PLAYER:AI sets the AI for PLAYER (e.g. 2:petra) * -autostart-aidiff=PLAYER:DIFF sets the DIFFiculty of PLAYER's AI @@ -958,6 +959,12 @@ bool Autostart(const CmdLineArgs& args) Script::SetProperty(rq, settings, "Size", mapSize); // Random map size (in patches) + if (args.Has("autostart-biome")) + { + CStr biome = args.Get("autostart-biome"); + Script::SetProperty(rq, settings, "Biome", biome); + } + // Get optional number of players (default 2) size_t numPlayers = 2; if (args.Has("autostart-players"))