Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 1,158 Lines • ▼ Show 20 Lines | if (it != nodes.end()) | ||||
mapElement = *it; | mapElement = *it; | ||||
} | } | ||||
// ... they contain a JSON document to initialize the game setup | // ... they contain a JSON document to initialize the game setup | ||||
// screen | // screen | ||||
return mapElement.GetText(); | return mapElement.GetText(); | ||||
} | } | ||||
/* | /* | ||||
* Command line options for autostart | * Commandline options are documented at binaries/system/readme.txt. | ||||
* (keep synchronized with binaries/system/readme.txt): | |||||
* | |||||
* -autostart="TYPEDIR/MAPNAME" enables autostart and sets MAPNAME; | |||||
* TYPEDIR is skirmishes, scenarios, or random | |||||
* -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 | |||||
* (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-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 | |||||
* -autostart-victory=SCRIPTNAME sets the victory conditions with SCRIPTNAME | |||||
* located in simulation/data/settings/victory_conditions/ | |||||
* (default conquest) | |||||
* -autostart-wonderduration=NUM sets the victory duration NUM for wonder victory condition | |||||
* (default 10 minutes) | |||||
* -autostart-relicduration=NUM sets the victory duration NUM for relic victory condition | |||||
* (default 10 minutes) | |||||
* -autostart-reliccount=NUM sets the number of relics for relic victory condition | |||||
* (default 2 relics) | |||||
* | |||||
* Multiplayer: | |||||
* -autostart-playername=NAME sets local player NAME (default 'anonymous') | |||||
* -autostart-host sets multiplayer host mode | |||||
* -autostart-host-players=NUMBER sets NUMBER of human players for multiplayer | |||||
* game (default 2) | |||||
* -autostart-client=IP sets multiplayer client to join host at | |||||
* given IP address | |||||
* Random maps only: | |||||
* -autostart-size=TILES sets random map size in TILES (default 192) | |||||
* -autostart-players=NUMBER sets NUMBER of players on random map | |||||
* (default 2) | |||||
* | |||||
* Examples: | |||||
* 1) "Bob" will host a 2 player game on the Arcadia map: | |||||
* -autostart="scenarios/Arcadia" -autostart-host -autostart-host-players=2 -autostart-playername="Bob" | |||||
* "Alice" joins the match as player 2: | |||||
* -autostart="scenarios/Arcadia" -autostart-client=127.0.0.1 -autostart-playername="Alice" | |||||
* The players use the developer overlay to control players. | |||||
* | |||||
* 2) Load Alpine Lakes random map with random seed, 2 players (Athens and Britons), and player 2 is PetraBot: | |||||
* -autostart="random/alpine_lakes" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=2:petra | |||||
* | |||||
* 3) Observe the PetraBot on a triggerscript map: | |||||
* -autostart="random/jebel_barkal" -autostart-seed=-1 -autostart-players=2 -autostart-civ=1:athen -autostart-civ=2:brit -autostart-ai=1:petra -autostart-ai=2:petra -autostart-player=-1 | |||||
*/ | */ | ||||
bool Autostart(const CmdLineArgs& args) | bool Autostart(const CmdLineArgs& args) | ||||
{ | { | ||||
CStr autoStartName = args.Get("autostart"); | CStr autoStartName = args.Get("autostart"); | ||||
if (autoStartName.empty()) | if (autoStartName.empty()) | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 423 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator