applied patch by allefant to add --turns= parameter

streamlined and (hopefully) completed the --help output

streamlined and (hopefully) completed the wesnoth man page
This commit is contained in:
Gunter Labes 2006-05-07 05:16:53 +00:00
parent b1bce9495b
commit a304087894
4 changed files with 107 additions and 96 deletions

View file

@ -87,6 +87,7 @@ SVN trunk (1.1.2+svn):
* new /help command in mp lobby to get info on available commands
* :mute command to silent observers
* host changes automatically if game creator leaves => no disconnections
* new --turns= commandline parameter
Version 1.1.2:
* campaigns

View file

@ -12,70 +12,64 @@
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.\"
.TH WESNOTH 6 "June 2005" "wesnoth" "Battle for Wesnoth"
.
.TH WESNOTH 6 "2006" "wesnoth" "Battle for Wesnoth"
.
.SH NAME
Battle for Wesnoth \- fantasy turn-based strategy game
wesnoth \- Battle for Wesnoth, a turn-based fantasy strategy game
.
.SH SYNOPSIS
.
.B wesnoth
[\fIOPTION\fR]
[\fIOPTIONS\fR]
[\fIPATH_TO_DATA\fR]
.
.SH DESCRIPTION
.
Battle for
.B Wesnoth
is a turn-based fantasy strategy game.
Defeat all enemy leaders using a well-chosen cadre of troops, taking
care to husband your resources of gold and villages. All units have
their own strengths and weaknesses; to win, you must deploy your forces
to their best advantage while denying your foes the chance to do the
same. As units gain experience, they acquire new abilities and become
more powerful. You can play in your own language, and even create your
own custom units, scenarios or campaigns. Test your skill against a
smart computer opponent, or join Wesnoth's large community of on-line
players.
Defeat all enemy leaders using a well-chosen cadre of troops, taking
care to manage your resources of gold and villages. All units have
their own strengths and weaknesses; to win, deploy your forces to
their best advantage while denying your foes the chance to do the
same. As units gain experience, they acquire new abilities and
become more powerful. Play in your own language and test your skill
against a smart computer opponent, or join Wesnoth's large community
of on-line players. Create your own custom units, scenarios or
campaigns, and share them with others.
.
.SH OPTIONS
.
.TP
.B --bpp
.BI --bpp \ number
sets BitsPerPixel value. Example: --bpp 32
.TP
.B --compress \ <infile> \ <outfile>
.BI --compress \ <infile> \ <outfile>
compresses a savefile (infile) that is in text WML format into binary WML format (outfile).
.TP
.BR -d , \ --debug
.B -d, \ --debug
shows extra debugging information and enables additional command mode
options in-game (see the Wiki at http://www.wesnoth.org/ for more
information about command mode).
.TP
.B --decompress \ <infile> \ <outfile>
.BI --decompress \ <infile> \ <outfile>
decompresses a savefile (infile) that is in binary WML format into text
WML format (outfile).
.TP
.BR -f , \ --fullscreen
.B -f, \ --fullscreen
runs the game in full screen mode.
.TP
.B --fps
displays the number of frames per second the game is currently running
at, in a corner of the screen.
.TP
.BR -h , \ --help
.B -h, \ --help
displays a summary of command line options to standard output, and exits.
.TP
.BR --load FILE
runs the game saved in FILE in the standard save game directory.
.BI --load \ savegame
loads the file savegame from the standard save game directory.
.TP
.BR --log-error="domain1,domain2,..." , \ --log-warning=... , \ --log-info=...
sets the severity level of the debug domains. "all" can be used to match
@ -86,103 +80,94 @@ shows all messages,
only warnings and errors, and
.B --log-error
just errors.
.TP
.B --multiplayer
runs a multiplayer game. There are additional options that can be used
together with
.B --multiplayer
as explained below.
.TP
.BR --nocache
.B --nocache
disables caching of game data.
.TP
.BR --nosound
runs game without sounds and music.
.B --nosound
runs the game without sounds and music.
.TP
.BR --path
prints the name of the game data directory and exits.
.TP
.BR -r , \ --resolution
sets screen resolution. Example: -r 800x600
.BI -r, \ --resolution \ XxY
sets the screen resolution. Example: -r 800x600
.TP
.BR -t , \ --test
.B -t, \ --test
runs the game in a small test scenario.
.TP
.BR -v , \ --version
shows version number and exits.
.B -v, \ --version
shows the version number and exits.
.TP
.BR -w , \ --windowed
.B -w, \ --windowed
runs the game in windowed mode.
.
.SH Options for --multiplayer
.
The side-specific multiplayer options are marked with <number>. <number>
has to be replaced by a side number. It usually is 1 or 2 but depends on
the number of players possible in the chosen scenario.
.TP
.BR --era=value
.B --algorithm<number>=value
selects a non-standard algorithm to be used by the AI controller for
this side. Available values: "idle_ai" and "sample_ai".
.TP
.B --controller<number>=value
selects the controller for this side. Available values: "human" and "ai".
.TP
.B --era=value
use this option to play in the selected era instead of the "Default"
era. The era is chosen by an id. Eras are described in the
data/multiplayer.cfg file.
.TP
.B --nogui
runs the game without the GUI. Must appear before
.B --multiplayer
to have the desired effect.
.TP
.BR --scenario=value
selects a multiplayer scenario. The default scenario is "multiplayer_test".
.TP
.BR --algorithm<number>=value
selects a non-standard algorithm to be used by the AI controller for
this side. Available values: "idle_ai" and "sample_ai".
.TP
.BR --controller<number>=value
selects the controller for this side. Available values: "human" and "ai".
.TP
.BR --parm<number>=name:value
.B --parm<number>=name:value
sets additional parameters for this side. This parameter depends on the
options used with
.B --controller
.B --controller
and
.B --algorithm.
It should only be useful for people designing their own AI. (not yet
documented completely)
.TP
.BR --side<number>=value
.B --scenario=value
selects a multiplayer scenario. The default scenario is "multiplayer_Charge".
.TP
.B --side<number>=value
selects a faction of the current era for this side. The faction is
chosen by an id. Factions are described in the data/multiplayer.cfg
file.
.TP
.B --turns=value
sets the number of turns for the chosen scenario. The default is "50".
.TP
Example to test your own AI:
wesnoth --multiplayer --controller2=python_ai --algorithm2=python_ai --parm2=python_script:py/my_own_python_ai.py --side2=Rebels
.
.SH AUTHOR
Written by David White <davidnwhite@verizon.net>.
.br
Edited by Nils Kneuper <crazy-ivanovic@gmx.net> and ott <ott@gaon.net>.
Edited by Nils Kneuper <crazy-ivanovic@gmx.net>, ott <ott@gaon.net> and Soliton <soliton@sonnenkinder.org>.
.br
This manual page was originally written by Cyril Bouthors <cyril@bouthors.org>.
.br
Visit the official homepage: http://www.wesnoth.org/
.
.SH COPYRIGHT
Copyright \(co 2003-2006 David White <davidnwhite@verizon.net>
.br
This is Free Software; this software is licensed under the GPL version 2, as published by the Free Software Foundation.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
.SH SEE ALSO
wesnoth_editor(6), wesnothd(6)

View file

@ -60,7 +60,7 @@ binds the server to the specified port. If no port is specified, port
15000 will be used.
.TP
.BI -t,\ --threads \ number
sets the number of worker threads for network I/O to n (default: 5).
sets the number of worker threads for network I/O to n (default: 5, max: 30).
.TP
.B -V,\ --version
shows version number and exits.

View file

@ -439,6 +439,7 @@ bool game_controller::play_multiplayer_mode()
std::string scenario = "multiplayer_Charge";
std::map<int,std::string> side_types, side_controllers, side_algorithms;
std::map<int,string_map> side_parameters;
std::string turns = "50";
size_t sides_counted = 0;
@ -468,6 +469,8 @@ bool game_controller::play_multiplayer_mode()
if(name == "--scenario") {
scenario = value;
} else if(name == "--turns") {
turns = value;
} else if(name == "--era") {
era = value;
} else if(last_digit && name_head == "--controller") {
@ -509,6 +512,8 @@ bool game_controller::play_multiplayer_mode()
std::cerr << "Could not find era '" << era << "'\n";
return false;
}
level["turns"] = turns;
const config* const side = era_cfg->child("multiplayer_side");
if(side == NULL) {
@ -1528,24 +1533,44 @@ int play_game(int argc, char** argv)
if(val == "--help" || val == "-h") {
std::cout << "usage: " << argv[0]
<< " [options] [data-directory]\n"
<< " -d, --debug Shows debugging information in-game\n"
<< " -f, --fullscreen Runs the game in full-screen\n"
<< " -h, --help Prints this message and exits\n"
<< " --path Prints the name of the game data directory and exits\n"
<< " -t, --test Runs the game in a small example scenario\n"
<< " --load FILE Runs the game, loading FILE\n"
<< " -w, --windowed Runs the game in windowed mode\n"
<< " -v, --version Prints the game's version number and exits\n"
<< " [OPTIONS] [DATA-DIRECTORY]\n"
<< " --bpp number sets BitsPerPixel value. Example: --bpp 32\n"
<< " --compress INFILE OUTFILE compresses a savefile (INFILE) that is in text WML\n"
<< " format into binary WML format (OUTFILE).\n"
<< " -d, --debug shows extra debugging information and enables\n"
<< " additional command mode options in-game.\n"
<< " --decompress INFILE OUTFILE decompresses a savefile (INFILE) that is in binary\n"
<< " WML format into text WML format (OUTFILE).\n"
<< " -f, --fullscreen runs the game in full screen mode.\n"
<< " --fps displays the number of frames per second the game\n"
<< " is currently running at, in a corner of the screen.\n"
<< " -h, --help prints this message and exits.\n"
<< " --load SAVEGAME loads the file SAVEGAME from the standard save\n"
<< " game directory.\n"
<< " --log-error=\"domain1,domain2,...\", --log-warning=..., --log-info=...\n"
<< " Set the severity level of the debug domains\n"
<< " \"all\" can be used to match any debug domain\n"
<< " --nocache Disables caching of game data\n"
<< " --nosound Disables sounds\n"
<< " --compress file1 file2 Compresses the text-WML file file1 into the\n"
<< " binary-WML file file2\n"
<< " --decompress file1 file2 Uncompresses the binary-WML file file1 into\n"
<< " the text-WML file file2\n"
<< " sets the severity level of the debug domains.\n"
<< " \"all\" can be used to match any debug domain.\n"
<< " --nocache disables caching of game data.\n"
<< " --nosound runs the game without sounds and music.\n"
<< " --path prints the name of the game data directory and exits.\n"
<< " -r, --resolution XxY sets the screen resolution. Example: -r 800x600\n"
<< " -t, --test runs the game in a small test scenario.\n"
<< " -v, --version prints the game's version number and exits.\n"
<< " -w, --windowed runs the game in windowed mode.\n"
<< " --multiplayer runs a multiplayer game. There are additional\n"
<< " options that can be used as explained below:\n"
<< " --algorithm<number>=value selects a non-standard algorithm to be used by the\n"
<< " AI controller for this side.\n"
<< " --controller<number>=value selects the controller for this side.\n"
<< " --era=value selects the era to be played in by its id.\n"
<< " --nogui runs the game without the GUI. Must appear before\n"
<< " --multiplayer to have the desired effect.\n"
<< " --parm<number>=name:value sets additional parameters for this side.\n"
<< " --scenario=value selects a multiplayer scenario. The default\n"
<< " scenario is \"multiplayer_Charge\".\n"
<< " --side<number>=value selects a faction of the current era for this side\n"
<< " by id.\n"
<< " --turns=value sets the number of turns. The default is \"50\".\n"
;
return 0;
} else if(val == "--version" || val == "-v") {