ThemeCfg.wiki
changeset 1315 7368027d526f
parent 1314 fa3ef0be3f4e
child 1316 1a612c26c5f7
equal deleted inserted replaced
1314:fa3ef0be3f4e 1315:7368027d526f
     1 #summary Structure of the theme.cfg file
     1 #summary Structure of the theme.cfg file
     2 
     2 
     3 = `theme.cfg` =
     3 = Structure of `theme.cfg` =
     4 <wiki:toc max_depth="3" />
     4 <wiki:toc max_depth="3" />
     5 
     5 
     6 == Syntax ==
     6 == Syntax ==
     7 The file `theme.cfg` gives the engine the values associated with a certain theme, to complement the graphics. To understand themes in general, start at [Themes]. To learn more about the general file structure of themes, see [ThemeFiles].
     7 The file `theme.cfg` gives the engine the values associated with a certain theme, to complement the graphics. To understand themes in general, start at [Themes]. To learn more about the general file structure of themes, see [ThemeFiles].
     8 It is structured with a list of keys, each separated by line breaks. Each key is followed by an equals sign followed a value. The value depends on the key.
     8 It is structured with a list of keys, each separated by line breaks. Each key is followed by an equals sign followed a value. The value depends on the key.
    20 
    20 
    21 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    21 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    22 
    22 
    23 Literally all lines in the `theme.cfg` file are optional, thus an empty file is valid. Everything has a default value. However, some default values are not really useful (e.g. the water or sky color) and you should therefore explicitly specify enough values.
    23 Literally all lines in the `theme.cfg` file are optional, thus an empty file is valid. Everything has a default value. However, some default values are not really useful (e.g. the water or sky color) and you should therefore explicitly specify enough values.
    24 
    24 
    25 == Keys ==
    25 == General configuration keys ==
    26 == General configuration ==
       
    27 === `hidden` (0.9.24) ===
    26 === `hidden` (0.9.24) ===
    28 If this key is present in `theme.cfg` (the value does not matter), the theme will be hidden from the theme selection menu. Background themes *must* be hidden.
    27 If this key is present in `theme.cfg` (the value does not matter), the theme will be hidden from the theme selection menu. Background themes *must* be hidden.
    29 
    28 
    30 === `ice` ===
    29 === `ice` ===
    31 If this key is present (any value), girders become slippery like ice. This also applies to placed girders. This significantly changes the gameplay of your theme, so use wisely. If this key is not present, the terrain is not slippery.
    30 If this key is present (any value), girders become slippery like ice. This also applies to placed girders. This significantly changes the gameplay of your theme, so use wisely. If this key is not present, the terrain is not slippery.
    32 
    31 
    33 === `snow` ===
    32 === `snow` ===
    34 If this key is present (any value), the flakes which are normally purely decorational now behave like snowflakes. When they collide with terrain, they become a part of the landscape. This significantly changes the gameplay of your theme, so use wisely. If this key is not present, the flakes are purely decorational.
    33 If this key is present (any value), the flakes which are normally purely decorational now behave like snowflakes. When they collide with terrain, they become a part of the landscape. This significantly changes the gameplay of your theme, so use wisely. If this key is not present, the flakes are purely decorational.
    35 
    34 
    36 == Land ==
    35 == Land keys ==
    37 === `border` ===
    36 === `border` ===
    38 The colour of the outline of explosions.
    37 The colour of the outline of explosions.
    39 
    38 
    40 <code>Values: red, green, blue</code>
    39 <code>Values: red, green, blue</code>
    41 
    40 
    69 There may be several spray keys in the file, each one representing one spray object.
    68 There may be several spray keys in the file, each one representing one spray object.
    70 The `name` is the case-sensitive name of the PNG file (without the file name suffix) of the graphics file, and `number` is the rough number of instances of this spray that may be added to the map. The number is the average number of sprays that are normally placed on a random medium-sized island. For larger and smaller landscapes, this number will be automatically scaled up or down. Please note that this number only specifies a rough goal, the actual number of created sprays may vary and you may have to play a bit with this number in order to find a good value.
    69 The `name` is the case-sensitive name of the PNG file (without the file name suffix) of the graphics file, and `number` is the rough number of instances of this spray that may be added to the map. The number is the average number of sprays that are normally placed on a random medium-sized island. For larger and smaller landscapes, this number will be automatically scaled up or down. Please note that this number only specifies a rough goal, the actual number of created sprays may vary and you may have to play a bit with this number in order to find a good value.
    71 
    70 
    72 <code>Values: name, number</code>
    71 <code>Values: name, number</code>
    73 
    72 
    74 == Water ==
    73 == Water keys ==
    75 === `water-top` ===
    74 === `water-top` ===
    76 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
    75 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
    77 This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`.
    76 This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`.
    78 
    77 
    79 <code>Values: red, green, blue</code>
    78 <code>Values: red, green, blue</code>
   130 <code>Default: 1, 0, 1</code>
   129 <code>Default: 1, 0, 1</code>
   131 
   130 
   132 === `sd-water-animation` (0.9.23) ===
   131 === `sd-water-animation` (0.9.23) ===
   133 Sudden Death equivalent of `water-animation`, uses `SDWater.png`.
   132 Sudden Death equivalent of `water-animation`, uses `SDWater.png`.
   134 
   133 
   135 == Background ==
   134 == Background keys ==
   136 === `sky` ===
   135 === `sky` ===
   137 The colour of the sky.
   136 The colour of the sky.
   138 
   137 
   139 <code>Values: red, green, blue</code>
   138 <code>Values: red, green, blue</code>
   140 
   139 
   195 
   194 
   196 === `flatten-flakes` ===
   195 === `flatten-flakes` ===
   197 Normally, the flakes vary in size and are drawn on different layers, some of them even in front of the terrain. But if this key is present (any value) in `theme.cfg`, all flakes have the same size and are on the same layer: In front of the sky and horizont and behind the terrain.
   196 Normally, the flakes vary in size and are drawn on different layers, some of them even in front of the terrain. But if this key is present (any value) in `theme.cfg`, all flakes have the same size and are on the same layer: In front of the sky and horizont and behind the terrain.
   198 
   197 
   199 
   198 
   200 == Music ==
   199 == Music keys ==
   201 === `music` ===
   200 === `music` ===
   202 Name of the music file to be played in the theme before Sudden Death, e.g. `Nature.ogg`. You find music tracks in `Data/Music` of the Hedgewars installation directory. The file name is case-sensitive!
   201 Name of the music file to be played in the theme before Sudden Death, e.g. `Nature.ogg`. You find music tracks in `Data/Music` of the Hedgewars installation directory. The file name is case-sensitive!
   203 
   202 
   204 If you choose a custom music (i.e. a music which does not come with Hedgewars by default), you should also set `fallback-music`.
   203 If you choose a custom music (i.e. a music which does not come with Hedgewars by default), you should also set `fallback-music`.
   205 
   204