Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 1 and Version 2 of code/howto/ConfigFile


Ignore:
Timestamp:
Oct 8, 2008, 1:49:50 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/howto/ConfigFile

    v1 v2  
    11= HowTo: Config-File =
    22[[TracNav(TracNav/TOC_Development)]]
     3[[TOC]]
    34
    45The config-file is usually located in {{{bin/orxonox.ini}}}.
     
    5556}}}
    5657This will only change the value in all existing instances, but not changing the config-file. Therefore the change will be lost if you restart Orxonox.
     58
     59== Formatting of special types ==
     60Until now we denoted the new value just as ''newvalue''. For primitive types like {{{int}}} or {{{float}}} it's really that easy. But there exist more complex formattings for non-primitive types:
     61 * std::string: " my text with trailing spaces "
     62  * Put strings into quotes if you don't want trailing spaces to be striped
     63
     64 * Vector2: (10, 20)
     65 * Vector3: (10, 20, 50)
     66 * Vector4: (10, 20, 50, 100)
     67 * Quaternion: (1, 2, 3, 4)
     68 * ColourValue: (0.1, 0.2, 0.3, 1.0)
     69
     70 * bool: true and false (or just 1 and 0 as usual)
     71
     72== Comments ==
     73It's possible to add comments into the config-file. They will be kept even if the file changes.
     74
     75Comments are introduces by one of the following symbols:
     76 1. '''#'''comment in script-language style
     77 1. '''%'''comment in matlab style
     78 1. ''';'''comment in unreal tournament config-file style
     79 1. '''//'''comment in code style
     80
     81== Whitespaces ==
     82If you add whitespaces to your config-file, for example like this:
     83{{{
     84[Sectionname]
     85
     86varname = value
     87}}}
     88instead of
     89{{{
     90[Sectionname]
     91varname=value
     92}}}
     93this will have no effect, but if the file gets saved, Orxonox will strip the whitespaces.