From ZDoom Wiki
Jump to navigation Jump to search

DEFCVARS is a lump that allows to override the engine's default values for console variables with new defaults. It is only read from files loaded as the IWAD; the intent is to allow stand-alone games created with the GZDoom engine to be shipped with default settings that are more appropriate to them without having to modify the engine's source code for that. In files loaded as a mod, the lump is ignored.


The first line must always be the game's config LastRun version (219 as of the introduction of this feature), and then followed by the CVARs and their settings in the style of a console file (similar to DEFBINDS or KEYCONF).

Each line after the version uses this simple syntax:

[set] var "value"

It is preferred to use the word 'set' in front of every line, but that is optional. var is the name of the CVAR being changed, and "value" is its intended default value.

Any attempt to set a CVAR that does not exist will cause the parser to error out. The reason for the "version" directive is to allow migration of old and removed CVARs to avoid this causing problems in the future with older mods.


version 219
set freelook "true"
set vid_rendermode "0"
set name "Space Zombie"
set color "00 00 a0"

Forum links

  • Config converter: thread about a small utility that transforms a gzdoom.ini file into a set of DEFBINDS, DEFCVARS, and KEYCONF lumps.