[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Configuration File

Most applications have an accompanying configuration file which describes configuration options particular to that application. Similarly, most plug-in modules have have their config file. Configuration files are named with the file extension `.cfg' and are typically located within the virtual directory `/config/' which is most usually mounted at the physical location `CS/data/config'.

The format of these files is simple. They consist of a number of keys, each of which consists of a name, a value and an optional comment. Key names contain dots to create some kind of hierarchy, similar to a file system: `Video.OpenGL.EnableDither'. This should be interpreted at the key `EnableDither' in the sub-section `OpenGL.', which resides in section `Video.' (note that the dots are part of the section names).

The file itself looks like this:
 
; This is the comment for Section.Keyname
Section.Keyname = Value
; Comments may be
; several lines long
; The option 'Section.TestOption' has no comment attached to it.
Video.OpenGL.EnableDither = true
Section.TestOption = false
; Comments at the end of the file do not belong to any configuration
; key. When a config file is loaded and saved again later this
; end-of-file comment is put back at the end of the config file.

When you run an application, all configuration domains are combined to one big database of options. When this happens, options from higher-priority domains override options from lower-priority domains. These domains are (from low to high priority):

Thus you can set any option in your application's config file to override options from the plug-in config files. And you can again override those options with a line in the user configuration.

If the application tries to change options in the config file, these changes are always applied to the user-specific, application-specific domain. The only exception are applications that disable the user configuration altogether, in which case the changes are applied to the user-neutral, application-specific configuration.

3.2.1 System Configuration  
3.2.2 Graphics Configuration  
3.2.3 Engine Configuration  
3.2.4 Sound Configuration  
3.2.5 Console Configuration  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html