Table of Contents

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 the gdefaults configuration file.

-cache

Short: - Cache images for future use.

gdefaults Entry: cacheimages 1

-nocache

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

gdefaults Entry: cacheimages 0

-keepcache

Short: - Keep already cached images even if server has different ones.

X11 cfclient only.

-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.

gdefaults Entry: darkness 1

-nodarkness

Short: - Disables darkness code

gdefaults Entry: darkness 0

-display

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

-download_all_faces

Short: - Download all needed faces before play starts

gdefaults Entry: download_all_images 1

-echo

Short: - Echo the bound commands

gdefaults Entry: echo_bindings 1

-noecho

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

gdefaults Entry: echo_bindings 0

-faceset

Sort: -faceset <name> - Use faceset <name> if available
Names : classic | standard

gdefaults Entry: faceset

The X11 cfclient does not use <name> as argument, but <number> ( likely 0 and 1 for classic and standard ) .

-fasttcpsend

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

gdefaults Entry: fasttcpsend 1

-nofasttcpsend

Short: - Disables fasttcpsend

gdefaults Entry: fasttcpsend 0

-fog

Short: - Enable fog of war code

gdefaults Entry: fog_of_war 1

-help

Short: - Display this message.

-iconscale

Short: -iconscale % % - Set icon scale percentage

gdefaults Entry: iconscale

-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

-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 :

gdefaults Entry: mapscale

-mapsize

Short: -mapsize xXy - Set the mapsize to be X by Y spaces.
gdefaults Entries: map_width , map_height
Default: gtk1: 11×11; gtk-2: old 15×15, new 25×25

For a new installation of the GTK-1 client without any configuration files, the default map size of 11×11 might lead to a slightly distorted GUI.
-mapsize 9×9 might be a better first impression without stat bars / resistances column overlapping the bottom of the map:

mapsize default mapsize 9 x 9
gcfclient_mapsize_default.jpg gcfclient_mapsize_9x9.jpg

-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 )

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

Functions :

gdefaults Entry: mapscroll 1

-nomapscroll

Short: Disable mapscrolling by bitmap operations

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

gdefaults Entry:mapscroll 0

-noautorepeat

Short: - Auto repeat on directional keys is ignored.

X11 cfclient only.

-opengl

Short: - Use opengl drawing code

gdefaults Entry: displaymode 2

Only available for the GTK-2 client.

Though the OpenGL drawing mode apparently works even without the GLX extension switched on for the XServer,
the older GTK-2 clients will crash at startup if the GLX extension would be not available:

# gcfclient2-1.10.0 -opengl
Xlib:  extension "GLX" missing on display ":0.0".
Segmentation fault

The newer GTK-2 clients will work still, if the necessary libraries libGL.so.1 , libGLU.so.1 and libglut.so.3 are available on the system:

# crossfire-client-gtk2-1.70.0 -opengl
[  INFO  ] (gtk-v2::init_glx_opengl) Direct rendering is not available!
[  INFO  ] (gtk-v2::opengl_common) Maximum texture size is 2048
[  INFO  ] (gtk-v2::init_image_cache_data) Init Image Cache

When OpenGL had not been available at client compiling time, then the client will fall back to Pixmap mode, and prints to stderr

# crossfire-client-gtk2-1.70.0 -opengl
[WARNING ] (main.c::init_windows) client not compiled with opengl support.  Ignoring -opengl

-pixmap

Short: - Use pixmap drawing code

gdefaults Entry: displaymode 0

Only available for the GTK-2 client.

-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 Entry: popups 1

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

gdefaults Entry: popups 0

-port

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

gdefaults Entry: port 13327

-pngfile

Short: -pngfile <name> - Use <name> for source of images

X11 cfclient only.

-resists

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

gdefaults Entry: resistances

GTK-1 client gcfclient only.

-scrolllines

Short: -scrolllines <number> - number of lines for scrollback
Default: #define INFOLINES 36 in client/x11/x11.c

X11 cfclient only.
This default value of 36 is much too small when identifying many books at once.

-sdl

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

gdefaults Entry: displaymode 1

-server

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

gdefaults Entry: server

-showicon

Short: - Print status icons in inventory window

gdefaults Entry: showicon 1

-smooth

Short: - Enable smooth

gdefaults Entry: smoothing 1

If one likes it … Wolfsburg harbour quays and Stoneville north-east …
smooth-dmode0-wolfsburg_beach.jpg smooth_stoneville_countryside2.jpg

-nosmooth

Short: - Disable smooth

gdefaults Entry: smoothing 0

-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

gdefaults Entry: sound 1

-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 desirable to disable the usage of that child process,
when there are other sound programs running in parallel.

gdefaults Entry: sound 0

-sound_server

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

gdefaults Entry: sound_server

-splash

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

gdefaults Entry: nosplash 0

-nosplash

Short: - Don't display the splash screen

gdefaults Entry: nosplash 1

-split

Short: - Use split windows.

gdefaults Entry: split

-splitinfo

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

gdefaults Entry: splitinfo

-sync

Short: - Synchronize on display

X11 cfclient only.

-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.