ThemeCfg.wiki
changeset 1310 c84f7dd4a919
parent 1309 e7d16d040f55
child 1311 8278a0b9e9c0
equal deleted inserted replaced
1309:e7d16d040f55 1310:c84f7dd4a919
     1 #summary Structure of the theme.cfg file
     1 #summary Structure of the theme.cfg file
     2 
     2 
     3 = `theme.cfg` =
     3 = `theme.cfg` =
       
     4 
       
     5 <wiki:toc max_depth="2" />
       
     6 
       
     7 == Syntax ==
     4 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 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].
     5 It is structured with a list of keys, each seperated by line breaks. Each key is followed by an equals sign followed a value. The value depends on the key.
     9 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.
     6 
    10 
     7 Example:
    11 Example:
     8 <code>sky = 23, 8, 33
    12 <code>sky = 23, 8, 33
     9 border = 7, 72, 102
    13 border = 7, 72, 102
    10 music = Art.ogg</code>
    14 music = Art.ogg</code>
    17 
    21 
    18 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    22 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    19 
    23 
    20 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 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.
    21 
    25 
    22 == General configuration ==
    26 == General configuration keys ==
    23 === `hidden` (0.9.24) ===
    27 === `hidden` (0.9.24) ===
    24 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.
    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.
    25 
    29 
    26 === `ice` ===
    30 === `ice` ===
    27 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.
    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.
    28 
    32 
    29 === `snow` ===
    33 === `snow` ===
    30 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.
    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.
    31 
    35 
    32 == Land ==
    36 == Land keys ==
    33 === `border` ===
    37 === `border` ===
    34 The colour of the outline of explosions.
    38 The colour of the outline of explosions.
    35 
    39 
    36 <code>Values: red, green, blue</code>
    40 <code>Values: red, green, blue</code>
    37 
    41 
    65 There may be several spray keys in the file, each one representing one spray object.
    69 There may be several spray keys in the file, each one representing one spray object.
    66 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.
    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.
    67 
    71 
    68 <code>Values: name, number</code>
    72 <code>Values: name, number</code>
    69 
    73 
    70 == Water ==
    74 == Water keys ==
    71 === `water-top` ===
    75 === `water-top` ===
    72 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
    76 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
    73 This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`.
    77 This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`.
    74 
    78 
    75 <code>Values: red, green, blue</code>
    79 <code>Values: red, green, blue</code>
   126 <code>Default: 1, 0, 1</code>
   130 <code>Default: 1, 0, 1</code>
   127 
   131 
   128 === `sd-water-animation` (0.9.23) ===
   132 === `sd-water-animation` (0.9.23) ===
   129 Sudden Death equivalent of `water-animation`, uses `SDWater.png`.
   133 Sudden Death equivalent of `water-animation`, uses `SDWater.png`.
   130 
   134 
   131 == Background ==
   135 == Background keys ==
   132 === `sky` ===
   136 === `sky` ===
   133 The colour of the sky.
   137 The colour of the sky.
   134 
   138 
   135 <code>Values: red, green, blue</code>
   139 <code>Values: red, green, blue</code>
   136 
   140 
   191 
   195 
   192 === `flatten-flakes` ===
   196 === `flatten-flakes` ===
   193 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.
   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.
   194 
   198 
   195 
   199 
   196 == Music ==
   200 == Music keys ==
   197 === `music` ===
   201 === `music` ===
   198 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!
   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!
   199 
   203 
   200 If you choose a custom music (i.e. a music which does not come with Hedgewars by default), you should also set `fallback-music`.
   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`.
   201 
   205