User Tools

Site Tools


client:gdefaults

This is an old revision of the document!


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”

cacheimages

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > Map & Image “Cache Images”

command_window

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

Functions:

  • init_client_vars()
    • File: client/common/init.c
    • want_config[CONFIG_CWINDOW] = COMMAND_WINDOW;
    • File: client/common/client.h #define COMMAND_WINDOW 10
  • CButtons cbuttons[MAX_BUTTONS] = {
    • File: client/gtk/config.c
    • {NULL, SPIN_CWINDOW, CONFIG_CWINDOW, FLAG_UPDATE, “Command Window”},
  • configdialog(GtkWidget *widget)
    • File: client/gtk/config.c
    • else if (cbuttons[i].type == SPIN_CWINDOW) adj = (GtkAdjustment *) gtk_adjustment_new(want_config[cbuttons[i].config], 1, 127, 1, 5, 5);
  • load_defaults()
    • File client/gtk/config.c
    • Warning: No check for upper and lower limit, might work beyond 127 and uncertain if set < 1

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

See also lighting

displaymode

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

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

  • 0 : Pixmap
  • 1 : SDL ; command line option -sdl

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

echo_bindings

Range: 0 - 1 | False | True
Default: 0
Menu Entry: Client > Configure > General “Echo Bound Commands”

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

See also player_commands .

faceset

Range:
Default: standard
Menu Entry: Client > Configure > Map & Image

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

fog_of_war

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

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”

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

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

Functions :

  • init_client_vars()
    • File: client/common/init.c
    • want_config[CONFIG_ICONSCALE] = 100;
  • configdialog(GtkWidget *widget)
    • File: client/gtk/config.c
    • if (cbuttons[i].type == SPIN_SCALE) adj = (GtkAdjustment *) gtk_adjustment_new(want_config[cbuttons[i].config], 25, 200, 1, 5, 5);
  • load_defaults()
    • File client/gtk/config.c
    • if (want_config[CONFIG_ICONSCALE]< 25 || want_config[CONFIG_ICONSCALE]>200)

lighting

Range:
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.”

  • “Best Per Pixel Lighting (slowest)”
  • “Fast Per Pixel Lighting”
  • “Per Tile Lighting”

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 Height”

“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_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”

mapscale

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

Functions :

  • init_client_vars()
    • File: client/common/init.c
    • want_config[CONFIG_MAPSCALE] = 100;
  • CButtons cbuttons[MAX_BUTTONS] = {
    • File: client/gtk/config.c
    • {NULL, SPIN_SCALE, CONFIG_MAPSCALE, FLAG_MAPPANE, “Map Scale (Takes effect next run)”},
  • configdialog(GtkWidget *widget)
    • File: client/gtk/config.c
    • if (cbuttons[i].type == SPIN_SCALE) adj = (GtkAdjustment *) gtk_adjustment_new(want_config[cbuttons[i].config], 25, 200, 1, 5, 5);
  • load_defaults()
    • File client/gtk/config.c
    • if (want_config[CONFIG_MAPSCALE]< 25 || want_config[CONFIG_MAPSCALE]>200)

mapscroll

Range:
Default: 1
Menu Entry: not available

message_timestamping

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

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”

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”

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

Command-line options : -popups and -nopopups

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

resistances

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

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

server

Range:
Default:
Menu Entry: not available

show_grid

Range: 0 - 1 | False | True
Default: 0

This option is only available for the SDL displaymode .
Purpose: It draws a red tile grid-overlay onto the map.
Effect: But this grid vanishes as soon as the player moves.
Implemented: gridline options available under the client config window. MSW 2001-06-17
Client Menu: Client > Configure > Map & Image > “Print Grid Overlay (SDL only, Slow, useful for debugging/development”

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”

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

smoothing

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

sound

Range: 0 - 1 | False | True
Default: 1
Menu Entry: Client > Configure > General “Sound”

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

split

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

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

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”

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”

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

client/gdefaults.1524051833.txt.gz · Last modified: 2018/04/18 06:43 by karl