Table of Contents

Crossfire Client configuration file gdefaults

The gdefaults file is usually located inside the .crossfire directory.
This file applies to the old gtk-1 client for crossfire,
The newer gtk-2 client uses the gdefaults2 file as configuration file.

This configuration file does not exist in a fresh installation of the client.
This file gets created by pressing the 'Save' button in the client configuration sub window
found in the Menubar > Client > Configure .

At the top of the file one reads :

# This file is generated automatically by gcfclient.
# Manually editing is allowed, however gcfclient may be a bit finicky about
# some of the matching it does.  all comparisons are case sensitive.
# 'True' and 'False' are the proper cases for those two values
# 'True' and 'False' have been replaced with 1 and 0 respectively

The code in function load_defaults() in file client/gtk/config.c parses as follows :

        if (inbuf[0]=='#') continue;
    /* IF no colon, then we certainly don't have a real value, so just skip */
    if (!(cp=strchr(inbuf,':'))) continue;
    *cp='\0';
    cp+=2;      /* colon, space, then value */
 
    val = -1;
    if (isdigit(*cp)) val=atoi(cp);
    else if (!strcmp(cp,"True")) val = TRUE;
    else if (!strcmp(cp,"False")) val = FALSE;

Meaning, that lines starting with # are ignored,
lines need to contain a colon : or are ignored,
and may have any content, but digits *not* -1 ,
and still recognizes True or False in case sensitive string comparison.


Entries

Sorted by alphabetical sort:

  1. cacheimages: < 0 | 1 >
  2. command_window: < 1 - 127 >
  3. darkness: < 0 | 1 >
  4. displaymode: < 0 | 1 > [ CFG_DM_PIXMAP , CFG_DM_SDL ]
  5. echo_bindings: < 0 | 1 >
  6. faceset: < standard | classic >
  7. fasttcpsend: < 0 | 1 >
  8. fog_of_war: < 0 | 1 >
  9. foodbeep: < 0 | 1 >
  10. grad_color_bars: < 0 | 1 >
  11. iconscale: < 25 - 200 >
  12. lighting: < 0 - 3 > [ CFG_LT_NONE , CFG_LT_TILE , CFG_LT_PIXEL , CFG_LT_PIXEL_BEST ]
  13. map_height: < 9 - 31 > [ MAP_MAX_SIZE ]
  14. map_width: < 9 - 31 > [ MAP_MAX_SIZE ]
  15. mapscale: < 25 - 200 >
  16. mapscroll: < 0 | 1 >
  17. nosplash: < 0 | 1 >
  18. popups: < 0 | 1 >
  19. port: 13327 [ EPORT , DEFPORT ]
  20. resistances: < 0 | 1 >
  21. server: (null)
  22. show_grid: < 0 | 1 >
  23. showicon: < 0 | 1 >
  24. sign_popups: < 0 | 1 >
  25. smoothing: < 0 | 1 >
  26. sound: < 0 | 1 >
  27. sound_server: < cfsndserv | cfsndserv_alsa9 >
  28. split: < 0 | 1 >
  29. splitinfo: < 0 | 1 >
  30. tooltips: < 0 | 1 >
  31. trim_info_window: < 0 | 1 >

auto_apply_container

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Automatically re-applies a container when you use apply to close it. \nIf off, when you use apply to close the container, it stays unapplied”
Command Line Parameter: None

cacheimages

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > Map & Image “Cache Images”
Command Line Parameter: -cache , -nocache

command_window

Range: 1 - 127
Default: 10
Menu Entry: Client > Configure > General “Command Window”
Command Line Parameter: None

Functions:

darkness

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > Map & Image “Enable darkness code - if off, all spaces will not be dimmed.”
Command Line Parameter: -darkness , -nodarkness

The darkness code is provided by the server handling the time , spells and maps with the archetype attribute darkness set.

Note: Seems not to work to set the lighting value to CFG_LT_NONE when function applyconfig() is called.
The client handles the want_config[CONFIG_DARKNESS] value only at it's startup in load_defaults() .
If the CONFIG_LIGHTING is set to greater than zero, then the darkness code will be always enabled.
Since the user has no possibility to select CFG_LT_NONE in the configuration GUI, darkness will be always enabled.
:!: BUG: The only possibility to disable the darkness code, is to set lighting manually to False | 0 .
CONFIG_DARKNESS is not used anywhere else in the code except while checking commandline parameters and loading defaults;
while CONFIG_LIGHTING is applied in client/common/mapdata.c and client/gtk/sdl.c .

Functions:

displaymode

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > Map & Image “SDL Image Support (Take effect next run)”
Command Line Parameter: -sdl

The displaymode entry can have two values for drawing the map:

Any other numerical values than those above will still be “acknowledged” by the client, but will lead to error messages as
[ ERROR ] (Library::Gdk-CRITICAL) file gdkdraw.c: line 89 (gdk_draw_rectangle): assertion `drawable != NULL' failed.
and
[ ERROR ] (Library::Gdk-CRITICAL) file gdkdraw.c: line 379 (gdk_draw_pixmap): assertion `drawable != NULL' failed.
and
[ ERROR ] (Library::Gdk-CRITICAL) file gdkdraw.c: line 380 (gdk_draw_pixmap): assertion `src != NULL' failed.
, thus the map would not be drawn.

SDL

If the SDL libraries were not available at client compiling time, then the displaymode would fall back to Pixmap mode.
The client then does not print anything to stderr from function load_defaults() in client/gtk/config.c
to inform the user about it:

#ifndef HAVE_SDL
    /* If SDL is not built in, having SDL mode turned on causes many issues. */
    want_config[CONFIG_DISPLAYMODE] = CFG_DM_PIXMAP;
#endif

See also lighting modes for SDL.

download_all_images

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > Map & Image “Download All Image Information (Takes effect on next server connection)”
Command Line Parameter: -download_all_faces

echo_bindings

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Echo Bound Commands”
Command Line Parameter: -echo , -noecho

When set, should print the commands issued to the server by keypress in the informational window.

See also player_commands .

faceset

Range: standard | classic
Default: standard
Menu Entry: Client > Configure > Map & Image
Command Line Parameter: -faceset

fasttcpsend

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Fast TCP Send (May improve performance at expense\n of outgoing bandwidth)”
Command Line Parameter: -fasttcpsend , -nofasttcpsend

fog_of_war

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > Map & Image “Fog of War”
Command Line Parameter: -fog

The “Fog of War” is mere a “Line of Sight” handler, since cleared areas do not become covered by inscrutable “mist” again,
except for darkness may gray out cleared areas again.

foodbeep

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Beep When Food is Low”
Command Line Parameter: None

The client issues beep tones to the beep speaker of the computer, when the nourishing level gets below 200, and each time the nourishing level is decremented by 1.

grad_color_bars

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Gradually change stat bar color based on value of the stat.\nThis option will result in some extra CPU usage.”
Command Line Parameter: None

When unset, the status bars for HP, SP, GR, Food do not change coloration according to their current amount.

iconscale

Range: 25 - 200
Default: 100
Menu Entry: Client > Configure > Map & Image “Icon Scale (Takes effect next run)”
Command Line Parameter: -iconscale

Functions :

lighting

Range: 0 - 3
Default: 1
Menu Entry: Client > Configure > Map & Image “Lighting options, per pixel is prettier, per tile is faster.\nIf the darkness code is off, the pixel/tile options will be ignored.”

Command Line Parameter: None

Note: When not set (0, CFG_LT_NONE), should disable darkness code.

Functions:

SDL lighting in pictures

City of Navar around midnight ..

lighting 0 None lighting 1 Per Tile lighting 2 Fast per Pixel lighting 3 Best per Pixel
sdl_lightning_0_none.jpg sdl_lightning_1_per_tile.jpg sdl_lightning_2_fast_per_pixel.jpg sdl_lightning_3_best_per_pixel.jpg

map_height

Range: 9 - 31 ( see function load_defaults() in client/gtk/config.c )
Default: 11 ( see function init_client_vars() want_config[CONFIG_MAPHEIGHT] = 11; in client/common/init.c )
Menu Entry: Client > Configure > General “Map Size: Larger map lets you see more information, but takes more CPU\npower and bandwidth. Changing these will not take effect until the next time\nyou connect to a server”
“Map Height”
Command Line Parameter: -mapsize

Note: The server has a maximum map size hardcoded to send to the client set as 25 by default.
See topic mapsize for MAP_CLIENT_Y .

map_width

Range: 9 - 31 ( see function load_defaults() in client/gtk/config.c )
Default: 11 ( see function init_client_vars() want_config[CONFIG_MAPWIDTH] = 11; in client/common/init.c )
Menu Entry: Client > Configure > General “Map Width”
Command Line Parameter: -mapsize

Note: The server has a maximum map size hardcoded to send to the client set as 25 by default.
See topic mapsize for MAP_CLIENT_X .

mapscale

Range: 25 - 200
Default: 100
Menu Entry: Client > Configure > Map & Image “Map Scale (Takes effect next run)”
Command Line Parameter: -mapscale

Functions :

mapscroll

Range:
Default: 1
Menu Entry: not available
Command Line Parameter: -mapscroll , -nomapscroll

message_timestamping

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Timestamp Messages”
Command Line Parameter: None

when set, adds a HH:MM Hour:Minute tag to each message printed in the informational window.

nosplash

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Splash Window”
Command Line Parameter: -splash , -nosplash

popups

Values : 0 or 1 – 0 disables popup windows like a separate log-in window, 1 enables them.
Default: 0 ( disabled )
Menu Entry: Client > Configure > General “Popup Windows”
Command Line Parameter: -popups , -nopopups

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

Behaviour: Most popup-windows might be annoying, while playing the game, but the log-on to a server had been impossible for versions 1.11.0 and below of the GTK-1 client, if that was unset ( 0 ) . To enter a user-name was not possible in the “traditional” Info-Message and Cmd-Line Pane on the right side of the client.
See also

port

Range:
Default:
Menu Entry: not available
Command Line Parameter: -port

resistances

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Display resistances in two columns rather than only one.”
Command Line Parameter: -resists

The value 0 prints resistances in 1 column, the value 1 prints them in two columns.

server

Range:
Default:
Menu Entry: not available
Command Line Parameter: -server

show_grid

Range: 0 - 1 | False | True
Default: 0 Client Menu: Client > Configure > Map & Image > “Print Grid Overlay (SDL only, Slow, useful for debugging/development”
Command Line Parameter: None

This option is only available for the SDL displaymode .
Purpose: It draws a red tile grid-overlay onto the map.
Effect: The grid vanishes as soon as the player moves. The player has to apply it each move in the configuration sub window.
Implemented: gridline options available under the client config window. MSW 2001-06-17

The GTK-2 client does not have such a Menu option to choose anymore; but still has this parameter entry in it's gdefaults2 config file.

showicon

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Show Inventory Icon”
Command Line Parameter: -showicon

Adds a notebook tab to the inventory window, where the items in the inventory are just drawn without any text.

sign_popups

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Popup Sign Windows (need Popup Windows checked to be used)”
Command Line Parameter: None

smoothing

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > Map & Image “Enable smoothing - Use additionnal CPU (Take effect on next connection).”
Command Line Parameter: -smooth , -nosmooth

sound

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Sound”
Command Line Parameter: -sound , -nosound

When enabled, raises a sound server, but sound had been broken for a long time.
The server has to send sound effect commands to the client.

sound_server

Range:
Default: cfsndserv
Menu Entry: not available
Command Line Parameter: -sound_server

split

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Split Windows”
Command Line Parameter: -split

When set, the client GUI will be split into several small windows, instead of one single window.

splitinfo

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Split Information Window (Takes effect next run)”
Command Line Parameter: -splitinfo

The information window to the right side of the GUI can be split into two areas.
The upper area the usually draws coloured messages, while the lower part draws the common black messages.

tooltips

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Show Tooltips”
Command Line Parameter: None

Tooltips are the small text popups that appear when hoovering with the mouse pointer about areas.

trim_info_window

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Trims text in the information window - ”
“improves performance but bugs in\n gtk make the client unstable if this is used.”
“This may work better with gtk 2.0”
Command Line Parameter: -triminfowindow , -notriminfowindow

When set, limits the scrollback buffer of the information window to ~100 thousand chars.