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.
Sorted by alphabetical sort:
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
Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > Map & Image “Cache Images”
Command Line Parameter: -cache , -nocache
Range: 1 - 127
Default: 10
Menu Entry: Client > Configure > General “Command Window”
Command Line Parameter: None
Functions:
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:
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.
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.
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
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 .
Range: standard | classic
Default: standard
Menu Entry: Client > Configure > Map & Image
Command Line Parameter: -faceset
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
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.
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.
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.
Range: 25 - 200
Default: 100
Menu Entry: Client > Configure > Map & Image “Icon Scale (Takes effect next run)”
Command Line Parameter: -iconscale
Functions :
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:
City of Navar around midnight ..
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 .
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 .
Range: 25 - 200
Default: 100
Menu Entry: Client > Configure > Map & Image “Map Scale (Takes effect next run)”
Command Line Parameter: -mapscale
Functions :
Range:
Default: 1
Menu Entry: not available
Command Line Parameter: -mapscroll , -nomapscroll
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.
Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Splash Window”
Command Line Parameter: -splash , -nosplash
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
Range:
Default:
Menu Entry: not available
Command Line Parameter: -port
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.
Range:
Default:
Menu Entry: not available
Command Line Parameter: -server
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.
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.
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
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
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.
Range:
Default: cfsndserv
Menu Entry: not available
Command Line Parameter: -sound_server
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.
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.
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.
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.