racer home

Ini file basics

 

Home Almost all settings for Racer are stored in 'ini' files, all with a similar structure.


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

 

WHAT ARE INI FILES?

Ini files (files ending with '.ini') are tree-type ASCII files which are used throughout Racer. They contain settings for the program, for the cars, etc. They can be edited with regular ASCII editors. There is a small tool which allows you to modify INI files using a small executable. More information on that here.

On this website, the syntax used to indicate keys in INI file is with dots inbetween tree levels; for example: output.enable=1 (see the example below).

AN EXAMPLE

;
; Audio system (for Racer)
;
output
{
  enable=1
  ; Output quality
  ; Currently, only 22050/8/1 is supported
  frequency=22050
  bits=8
  channels=1
  ; 3D rolloff factor; 1=default, nearing 0 means volumes don't roll off
  ; as quickly, while >1 means sounds will fade very quickly
  rolloff_factor=0.1
}

The file has a tree-like structure; the output tree could have a subtree. The notation used is dot notation, like for the above file, output.enable=1. This is easier to write when talking about settings, and is in fact used inside the program to name values.

TREE REFERENCES

Since v0.4.9, references to earlier defined subtrees are possible. This is done with the '~' operator. An example will clarify this:

;
; Tree reference
;
defaults
{
  pacejka
  {
    a0=1.5
    a1=2
    ...
  }
}
wheel0
{
  pacejka~defaults.pacejka
  {
    a1=3
  }
}

Here, the wheel0.pacejka tree refers back to 'defaults.pacejka' for its settings. However, you can overrule the variables by declaring them in the tree nevertheless. So in the above example, wheel0.pacejka.a0 will have the value '1.5', and wheel0.pacejka.a1 will have the value '3'. This enables you to declare defaults to most common settings, but overrule those you wish to modify.

 


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated November 13, 2012 )