Theme.wiki
changeset 746 d53a01a00832
parent 490 2b4a9ccb6613
child 798 30c5f1ebd552
equal deleted inserted replaced
745:99da4e68bc64 746:d53a01a00832
     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 The file `theme.cfg` gives the engine the values associated with a certain theme, to complement the graphics. To learn more about the general file structure of themes, see [ThemeFiles].
     4 The file `theme.cfg` gives the engine the values associated with a certain theme, to complement the graphics. To learn more about the general file structure of themes, see [ThemeFiles].
     5 It is structured with a key followed by an equals sign followed a value. The value depends on the key.
     5 It is structured with a key followed by an equals sign followed a value. The value depends on the key.
     6  Example:
     6  Example:
     7 <code>sky = 120, 40, 80</code>
     7 <code>sky = 120, 40, 80</code>
     8 
     8 
    12 
    12 
    13 The values red, green, blue and opacity are in the range of one byte and can be specified in both decimal or hexadecimal form. The range are `0` - `255` or `$00` - `$FF`.
    13 The values red, green, blue and opacity are in the range of one byte and can be specified in both decimal or hexadecimal form. The range are `0` - `255` or `$00` - `$FF`.
    14 
    14 
    15 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    15 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    16 
    16 
    17 === `sky` ===
    17 == `sky` ==
    18 The colour of the sky.
    18 The colour of the sky.
    19 
    19 
    20 <code>Values: red, green, blue</code>
    20 <code>Values: red, green, blue</code>
    21 
    21 
    22 === `rq-sky` ===
    22 == `rq-sky` ==
    23 The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality.
    23 The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality.
    24 
    24 
    25 <code>Values: red, green, blue</code>
    25 <code>Values: red, green, blue</code>
    26 
    26 
    27 === `border` ===
    27 == `border` ==
    28 The colour of the outline of explosions.
    28 The colour of the outline of explosions.
    29 
    29 
    30 <code>Values: red, green, blue</code>
    30 <code>Values: red, green, blue</code>
    31 
    31 
    32 === `water-top` ===
    32 == `water-top` ==
    33 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
    33 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
    34 This makes a gradient together with `water-bottom`.
    34 This makes a gradient together with `water-bottom`.
    35 
    35 
    36 <code>Values: red, green, blue</code>
    36 <code>Values: red, green, blue</code>
    37 
    37 
    38 === `water-bottom` ===
    38 == `water-bottom` ==
    39 The colour of the lowest part of the water before Sudden Death.
    39 The colour of the lowest part of the water before Sudden Death.
    40 This makes a gradient together with `water-top`.
    40 This makes a gradient together with `water-top`.
    41 
    41 
    42 <code>Values: red, green, blue</code>
    42 <code>Values: red, green, blue</code>
    43 
    43 
    44 === `sd-water-bottom` ===
    44 == `sd-water-bottom` ==
    45 The colour of the lowest part of the water while in Sudden Death.
    45 The colour of the lowest part of the water while in Sudden Death.
    46 This makes a gradient together with `sd-water-top`.
    46 This makes a gradient together with `sd-water-top`.
    47 If unspecified, it has a default value.
    47 If unspecified, it has a default value.
    48 
    48 
    49 <code>Values: red, green, blue</code>
    49 <code>Values: red, green, blue</code>
    50 
    50 
    51 === `sd-water-top` ===
    51 == `sd-water-top` ==
    52 The colour of the topmost part of the water (under the `SDWater.png`) while in Sudden Death.
    52 The colour of the topmost part of the water (under the `SDWater.png`) while in Sudden Death.
    53 This makes a gradient together with `sd-water-bottom`.
    53 This makes a gradient together with `sd-water-bottom`.
    54 If unspecified, it has a default value.
    54 If unspecified, it has a default value.
    55 
    55 
    56 <code>Values: red, green, blue</code>
    56 <code>Values: red, green, blue</code>
    57 
    57 
    58 === `water-opacity` ===
    58 == `water-opacity` ==
    59 The water opacity before Sudden Death. Opacity of the water affects how visible gears in the water are. `0` makes it fully transparent, whereas `255` makes it fully opaque. If the water is fully opaque, the drowning animation is skipped when a hedgehog drowns.
    59 The water opacity before Sudden Death. Opacity of the water affects how visible gears in the water are. `0` makes it fully transparent, whereas `255` makes it fully opaque. If the water is fully opaque, the drowning animation is skipped when a hedgehog drowns.
    60 
    60 
    61 <code>Values: opacity</code>
    61 <code>Values: opacity</code>
    62 
    62 
    63 === `sd-water-opacity` ===
    63 == `sd-water-opacity` ==
    64 The water opacity while in Sudden Death. By default, it has the same value as `water-opacity`.
    64 The water opacity while in Sudden Death. By default, it has the same value as `water-opacity`.
    65 
    65 
    66 === `music` ===
    66 == `music` ==
    67 Name of the track 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!
    67 Name of the track 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!
    68 
    68 
    69 <code>Values: name</code>
    69 <code>Values: name</code>
    70 
    70 
    71 === `sd-music` (0.9.21) ===
    71 == `sd-music` (0.9.21) ==
    72 Name of the track to be played in the theme while in Sudden Death, e.g. `hell.ogg`. By default, no music is played. You find music tracks in `Data/Music` of the Hedgewars installation directory. The file name is case-sensitive!
    72 Name of the track to be played in the theme while in Sudden Death, e.g. `hell.ogg`. By default, no music is played. You find music tracks in `Data/Music` of the Hedgewars installation directory. The file name is case-sensitive!
    73 
    73 
    74 === `clouds` ===
    74 == `clouds` ==
    75 The number of clouds to create, before Sudden Death. Uses `Clouds.png`.
    75 The number of clouds to create, before Sudden Death. Uses `Clouds.png`.
    76 
    76 
    77 <code>Values: number</code>
    77 <code>Values: number</code>
    78 
    78 
    79 === `sd-clouds` ===
    79 == `sd-clouds` ==
    80 Number of clouds while in Sudden Death, uses the file `SDClouds.png`. By default it is the same number as `clouds`.
    80 Number of clouds while in Sudden Death, uses the file `SDClouds.png`. By default it is the same number as `clouds`.
    81 
    81 
    82 === `flatten-clouds` ===
    82 == `flatten-clouds` ==
    83 Normally, the clouds vary in size and are drawn on different layers. But if this key is present (any value) in `theme.cfg`, all clouds have the same size and are on the same layer (background).
    83 Normally, the clouds vary in size and are drawn on different layers. But if this key is present (any value) in `theme.cfg`, all clouds have the same size and are on the same layer (background).
    84 
    84 
    85 === `flakes` ===
    85 == `flakes` ==
    86 Values for the flakes of this theme before Sudden Death. Uses `Flake.png`. If this field is left out, then there are no flakes.
    86 Values for the flakes of this theme before Sudden Death. Uses `Flake.png`. If this field is left out, then there are no flakes.
    87 
    87 
    88  * `number`: Number of visible flakes
    88  * `number`: Number of visible flakes
    89  * `frames`: Number of frames used in `Flake.png`
    89  * `frames`: Number of frames used in `Flake.png`
    90  * `frame ticks`: Number of ticks a frame is shown, after that the next frame is shown (a tick currently equals 1 millisecond).
    90  * `frame ticks`: Number of ticks a frame is shown, after that the next frame is shown (a tick currently equals 1 millisecond).
    93  * `speed`: Rotation speed of flake
    93  * `speed`: Rotation speed of flake
    94  * `fall speed`: Falling speed of flake
    94  * `fall speed`: Falling speed of flake
    95 
    95 
    96 <code>Values: number, frames, frame ticks, speed, fall speed</code>
    96 <code>Values: number, frames, frame ticks, speed, fall speed</code>
    97 
    97 
    98 === `sd-flakes` ===
    98 == `sd-flakes` ==
    99 Sudden death version of `flakes`, the parameters are the same as in `flakes`. This uses `SDFlake.png`. By default, the flakes are skulls and bones.
    99 Sudden death version of `flakes`, the parameters are the same as in `flakes`. This uses `SDFlake.png`. By default, the flakes are skulls and bones.
   100 
   100 
   101 === `flatten-flakes` ===
   101 == `flatten-flakes` ==
   102 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.
   102 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.
   103 
   103 
   104 === `object` ===
   104 == `object` ==
   105 There may be multiple object keys in the file, each one representing one land object.
   105 There may be multiple object keys in the file, each one representing one land object.
   106 
   106 
   107  * `filename`: The object’s filename (without the “.png”). Case-sensitive.
   107  * `filename`: The object’s filename (without the “.png”). Case-sensitive.
   108  * `max`: The maximum number of this object that may be generated in a map
   108  * `max`: The maximum number of this object that may be generated in a map
   109  * `buriedrec`: A rectangle that must be buried in the terrain (`left, top, width,  height`)
   109  * `buriedrec`: A rectangle that must be buried in the terrain (`left, top, width,  height`)
   113 <code>Values: filename, max, buriedrec, minvisible, visiblerec</code>
   113 <code>Values: filename, max, buriedrec, minvisible, visiblerec</code>
   114 
   114 
   115 `visiblerec` and the `buriedrec` visualized on an ancient picture:
   115 `visiblerec` and the `buriedrec` visualized on an ancient picture:
   116 http://hedgewars.org/images/avematantheme/hw-avematan.rects.png
   116 http://hedgewars.org/images/avematantheme/hw-avematan.rects.png
   117 
   117 
   118 === `spray` ===
   118 == `spray` ==
   119 There may be several spray keys in the file, each one representing one spray object.
   119 There may be several spray keys in the file, each one representing one spray object.
   120 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.
   120 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.
   121 
   121 
   122 <code>Values: name, number</code>
   122 <code>Values: name, number</code>
   123 
   123 
   124 === `ice` ===
   124 == `ice` ==
   125 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.
   125 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.
   126 
   126 
   127 If this key is not present, the terrain is not slippery.
   127 If this key is not present, the terrain is not slippery.
   128 
   128 
   129 === `snow` ===
   129 == `snow` ==
   130 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.
   130 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.
   131 
   131 
   132 If this key is not present, the flakes are purely decorational.
   132 If this key is not present, the flakes are purely decorational.