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