User Tools

Site Tools


client:optional_parameters

This is an old revision of the document!


Crossfire Client launch Options

The default Crossfire x11, gtk, gtk-v2 client recognizes the following parameters or arguments when it starts.

See also the manpage and gdefaults configuration file.

-cache

Short: - Cache images for future use.

-nocache

Short: - Do not cache images (default action).

-darkness

Short: - Enables darkness code (default)

In length: Each of the three crossfire clients have their own map drawing code.
Variables are CONFIG_DARKNESS , the_map.cells[mx][my].have_darkness , the_map.cells[mx][my].darkness and CONFIG_FOGWAR .

  1. X11 cfclient: Function display_mapcell() in client/x11/x11.c
    • seems to do something …
  2. GTK-1 gcfclient: Function display_mapcell() in client/gtk/map.c just uses CONFIG_FOGWAR
    • and draws the_map.cells[mx][my].darkness anyway …
  3. GTK-2 gcfclient2: Functions opengl_gen_map() and opengl_light_space() in client/gtk-v2/src/opengl.c
    • are using it in a larger scale with code disabled by #if 0 .

Basically: Works (partly) for x11 cfclient and gtk2 gcfclient2 in -opengl mode, but does not do anything supplied to the gtk-1 gcfclient .
In -sdl mode, this commandline option will have no effect at all.

-nodarkness

Short: - Disables darkness code

-display

Short: -display <name> - Use <name> instead if DISPLAY environment variable.

-download_all_faces

Short: - Download all needed faces before play starts

-echo

Short: - Echo the bound commands

-noecho

Short: - Do not echo the bound commands (default)

-faceset

Sort: -faceset <name> - Use faceset <name> if available

-fasttcpsend

Short: - Send data immediately to server, may increase bandwidth

-nofasttcpsend

Short: - Disables fasttcpsend

-fog

Short: - Enable fog of war code

-help

Short: - Display this message.

-iconscale

Short: - Set icon scale percentage

-loglevel

Short: -loglevel <val> - Set default logging level (0 is most verbose)
Description: The client has 5 logging levels as 0-4 . In opposite to the server
that has just 4 logging levels, they are less talk-active when set to a high value.
gdefaults entry: No
Default : common/config.h /* Default logging level. */ #define MINLOGLEVEL 0
Defines: common/client.h , common/misc.c

typedef enum LogLevel {
  LOG_DEBUG = 0, LOG_INFO = 1, LOG_WARNING = 2, LOG_ERROR = 3, LOG_CRITICAL = 4
} LogLevel;
static const char *const LogLevelTexts[] = {
    " DEBUG  ",
    "  INFO  ",
    "WARNING ",
    " ERROR  ",
    "CRITICAL",
    "UNKNOWN ",
};

Functions: common/misc.c

  • void LOG(LogLevel level, const char *origin, const char *format, …)
  • char *getLogText(const LogEntry *le)
  • char *getLogTextRaw(LogLevel level, const char *origin, const char *message)
  • static const char *getLogLevelText(LogLevel level)
    • return LogLevelTexts[level>LOG_CRITICAL?LOG_CRITICAL+1:level];

-mapscale

Short: -mapscale %% - Set map scale percentage.
Default: 100
Range: (float) 25 - 200
Syntax: -mapscale 70 | -mapscale 70%
gdefaults Entry: mapscale
Description: Make tiles, players, items on maps appear smaller or larger.
Useful to chose smaller percentages when using a large -mapsize .

Source Code files and functions :

  • gtk-v2/src/main.c
    • parse_args()
  • gtk-v2/src/config.c
    • setup_config_window()

-mapsize

Short: -mapsize xXy - Set the mapsize to be X by Y spaces. (default 11×11)

-mapscroll

Short: Enable mapscrolling by bitmap operations
Used only in SDL map display mode.
Clients that understand this option : x11 cfclient and gtk-1 gcfclient. The gtk-v2 client throws the -help message and exits.
Purpose: UNKNOWN

      /* Mark all tiles as "need_update" that are overlapped by a big face 
       * from outside the view area. */ 

Default : TRUE ( apparently )
gdefaults file entry : mapscroll: <0|1> ( guessed TRUE | FALSE )
Client Menu entry : UNKNOWN
Bugs : x11/x11.c: Fix display_mapscroll() to handle scrolling by greater than 1 tile at a time. Fixes bug #1564584.
Implemented : x11/x11.c: Implement map scrolling by using XCopyArea(). Add config options -mapscroll/-nomapscroll to enable/disable this. 2005-08-31

Defines: common/client.h

  • #define CONFIG_MAPSCROLL 29 /* Use bitmap operations for map scrolling */
  • #define CONFIG_NUMS 32 /* This should always be the last value in the list */

Functions :

  • init_client_vars in comon.init.c , calls want_config[CONFIG_MAPSCROLL] = TRUE;
  • display_mapscroll in gtk/map.c , returns either 0 or sdl_mapscroll, called by mapdata_scroll in common/mapdata.c
  • sdl_mapscroll in gtk/sdl.c , returns always '1' , called by display_mapscroll

-nomapscroll

Short: Disable mapscrolling by bitmap operations

Function common/mapdata.c mapdata_scroll says: /* Emulate map scrolling by redrawing all tiles. */

-popups

Short: - Use pop up windows for input (default)
Result: Many messages, that normally occur in the info message pane, now are shown in separate popping up windows; like book entries and the login.
Reality: The -help message claims, that popup would be the default, but that is apparently not true.
The default is set to 0 inside the source code
in function init_client_vars() in file common/init.c as variable want_config[CONFIG_POPUPS] = FALSE; since version 1.10.0 .
See also ChangeLog entry : Popups not the default anymore

gdefaults settings file entry : popups

The GTK-v1 gcfclient when configured to partly use GTK-2 features by the -–enable-cfgtk2 configure option, had a bug in the 1.9.1, 1.10.0 and 1.11.0 versions, that made new players impossible to log-on to a crossfire server , because a log-in required the popup-login-GUI to function.

See also

-nopopups

Short: - Don't use pop up windows for input

-port

Short: -port <number> - Use port <number> instead of the standard port number

-resists

Short: -resists <val> - Control look of resistances.

-sdl

Short: - Use sdl for drawing png (may not work on all hardware

-server

Short: -server <name> - Connect to <name> instead of localhost.

-showicon

Short: - Print status icons in inventory window

-smooth

Short: - Enable smooth

-nosmooth

Short: - Disable smooth

-sound

Short: - Enable sound output (default).
Description: The crossfiire client uses an external sound server binary,
launched through the init_sounds() function.
The sound serer is the only external program launched by the client.
The code is in the function raiseChild() found in client/common/misc.c .
The LOG function prints to standard error :

[ INFO ] (common::raiseChild) Raising /usr/local/bin/cfsndserv with flags 7

-nosound

Short: - Disable sound output.
Description: The client uses an external soundserver binary, usually the cfsndserv . This sound server gets raised by the function init_sounds() in the source file client/gtk-v2/src/sound.c .
The function would return early if if (!want_config[CONFIG_SOUND]) return -1; .

Comment in the source code :

    /* Easy trick - global nosound is set in the arg processing - if set, just
     * return -1 - this way, the calling function only needs to check the value
     * of init_sounds, and not worry about checking nosound.
     */

Benefits: The cfsndserv binary blocks the audio device for other users.
It is therefore likely desireable to disable the usage of that child process,
when there are other sound programs running in parallel.

-sound_server

Short: -sound_server <path> - Executable to use to play sounds.

-splash

Short: - Display the splash screen (startup logo) (default)

-nosplash

Short: - Don't display the splash screen

-split

Short: - Use split windows.

-splitinfo

Short: - Use two information windows, segregated by information type.

-timemapredraw

Short: - Print out timing information for map generation

-triminfowindow

Short: - Trims size of information window(s)

-notriminfowindow

Short: - Do not trims size of information window(s) (default)

-updatekeycodes

Short: - Update the saved bindings for this keyboard.

client/optional_parameters.1522714706.txt.gz · Last modified: 2018/04/02 19:18 by karl