Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

Legend:

Unmodified
Added
Removed
Modified
  • code/howto/ConfigFile

    v1 v1  
     1= HowTo: Config-File =
     2[[TracNav(TracNav/TOC_Development)]]
     3
     4The config-file is usually located in {{{bin/orxonox.ini}}}.
     5
     6== Structure ==
     7Every config-file is subdivided into sections:
     8{{{
     9[Section1]
     10...
     11
     12[Section2]
     13...
     14
     15[AnotherSection]
     16...
     17}}}
     18The name between the brackets defines the sections name and is usually identical to a class name.
     19
     20After a sectionname follows a list of values belonging to the section:
     21{{{
     22[Sectionname]
     23varname1=value
     24varname2=value
     25varname3=value
     26...
     27}}}
     28
     29Every variable refers to a variable within Orxonox. See [wiki:ConfigValueIncludes] and [wiki:howto/ConfigValue] for more information about how to create and use those values.
     30
     31== Modifying a value in the config-file ==
     32To modify a value, just change the right side of the assignment
     33{{{
     34[Sectionname]
     35varname=oldvalue
     36}}}
     37into
     38{{{
     39[Sectionname]
     40varname=newvalue
     41}}}
     42
     43If you restart Orxonox, the new value will be assigned to all instances of "Sectionname". If you don't want to restart Orxonox, call '''reloadConfig''' in the [wiki:Shell].
     44
     45== Modifying a value in the Shell ==
     46To change a value wihtout leaving Orxonox, open the [wiki:Shell] and type:
     47{{{
     48config Sectionname varname newvalue
     49}}}
     50This will change the config-value in all existing instances of "Sectionname" and changes the entry in the config-file.
     51
     52Alternatively you can use
     53{{{
     54tconfig Sectionname varname newvalue
     55}}}
     56This 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.