Index: binaries/system/readme.txt =================================================================== --- binaries/system/readme.txt +++ binaries/system/readme.txt @@ -13,7 +13,7 @@ -autostart-aidiff=PLAYER:DIFF sets the DIFFiculty of PLAYER's AI (0: sandbox, 5: very hard) -autostart-aiseed=AISEED sets the seed used for the AI random generator (default 0, use -1 for random) -autostart-player=NUMBER sets the playerID in non-networked games (default 1, use -1 for observer) --autostart-civ=PLAYER:CIV sets PLAYER's civilisation to CIV (skirmish and random maps only) +-autostart-civ=PLAYER:CIV sets PLAYER's civilisation to CIV (skirmish and random maps only; use -1 for random) -autostart-team=PLAYER:TEAM sets the team for PLAYER (e.g. 2:2). -autostart-ceasefire=NUM sets a ceasefire duration NUM (default 0 minutes) -autostart-nonvisual disable any graphics and sounds Index: source/ps/GameSetup/GameSetup.cpp =================================================================== --- source/ps/GameSetup/GameSetup.cpp +++ source/ps/GameSetup/GameSetup.cpp @@ -1090,7 +1090,7 @@ * generator (default 0, use -1 for random) * -autostart-player=NUMBER sets the playerID in non-networked games (default 1, use -1 for observer) * -autostart-civ=PLAYER:CIV sets PLAYER's civilisation to CIV - * (skirmish and random maps only) + * (skirmish and random maps only; use -1 for random) * -autostart-team=PLAYER:TEAM sets the team for PLAYER (e.g. 2:2). * -autostart-ceasefire=NUM sets a ceasefire duration NUM * (default 0 minutes) @@ -1382,6 +1382,11 @@ Script::CreateObject(rq, ¤tPlayer); } + if (civArgs[i].AfterFirst(":") == "-1") + { + std::string choices[] = {"athen", "brit", "cart", "gaul", "iber", "kush", "mace", "maur", "pers", "ptol", "rome", "sele", "spart"}; + Script::SetProperty(rq, currentPlayer, "Civ", civArgs[i] = choices[rand() % 13]); + } Script::SetProperty(rq, currentPlayer, "Civ", civArgs[i].AfterFirst(":")); Script::SetPropertyInt(rq, playerData, playerID-offset, currentPlayer); }