ThemeCfg.wiki
changeset 1308 c92c204db09f
parent 1307 6953b8800355
child 1309 e7d16d040f55
equal deleted inserted replaced
1307:6953b8800355 1308:c92c204db09f
    17 
    17 
    18 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    18 Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars.
    19 
    19 
    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.
    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.
    21 
    21 
       
    22 == General configuration ==
    22 == `hidden` (0.9.24) ==
    23 == `hidden` (0.9.24) ==
    23 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.
    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.
    24 
    25 
    25 == `sky` ==
    26 === `ice` ===
    26 The colour of the sky.
    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.
    27 
    28 
    28 <code>Values: red, green, blue</code>
    29 === `snow` ===
    29 
    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.
    30 <code>Default: $00, $00, $00</code>
    31 
    31 
    32 == Land ==
    32 == `rq-sky` ==
    33 === `border` ===
    33 The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality.
       
    34 
       
    35 <code>Values: red, green, blue</code>
       
    36 
       
    37 == `border` ==
       
    38 The colour of the outline of explosions.
    34 The colour of the outline of explosions.
    39 
    35 
    40 <code>Values: red, green, blue</code>
    36 <code>Values: red, green, blue</code>
    41 
    37 
    42 <code>Default: $50, $50, $50</code>
    38 <code>Default: $50, $50, $50</code>
    43 
    39 
    44 == `water-top` ==
    40 === `object` ===
    45 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
       
    46 This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`.
       
    47 
       
    48 <code>Values: red, green, blue</code>
       
    49 
       
    50 <code>Default: $54, $5C, $9D</code>
       
    51 
       
    52 == `water-bottom` ==
       
    53 The colour of the lowest part of the water before Sudden Death.
       
    54 This makes a gradient together with `water-top`. The default color is blue and matches the default `BlueColor.png`.
       
    55 
       
    56 <code>Values: red, green, blue</code>
       
    57 
       
    58 <code>Default: $34, $3C, $7D</code>
       
    59 
       
    60 == `sd-water-bottom` ==
       
    61 The colour of the lowest part of the water while in Sudden Death.
       
    62 This makes a gradient together with `sd-water-top`.
       
    63 The default color neatly matches the default `SDWater.png`.
       
    64 
       
    65 <code>Values: red, green, blue</code>
       
    66 
       
    67 <code>Default: $96, $70, $A9</code>
       
    68 
       
    69 == `sd-water-top` ==
       
    70 The colour of the topmost part of the water (under the `SDWater.png`) while in Sudden Death.
       
    71 This makes a gradient together with `sd-water-bottom`.
       
    72 The default color neatly matches the default `SDWater.png`.
       
    73 
       
    74 <code>Values: red, green, blue</code>
       
    75 
       
    76 <code>Default: $B9, $72, $C9</code>
       
    77 
       
    78 == `water-opacity` ==
       
    79 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` or `$FF` makes it fully opaque. If the water is fully opaque, the drowning animation is skipped when a hedgehog drowns.
       
    80 
       
    81 In combination with the default `BlueWater.png`, the recommended value for this is `$80`, which also is the default.
       
    82 
       
    83 <code>Values: opacity</code>
       
    84 
       
    85 <code>Default: $80</code>
       
    86 
       
    87 == `sd-water-opacity` ==
       
    88 The water opacity while in Sudden Death. Syntax and default value is equivalent to `water-opacity`.
       
    89 
       
    90 == `water-animation` (0.9.23) ==
       
    91 Specified a custom water animation and flowing speed before Sudden Death. By default, the water just moves to the right and has no special animation.
       
    92 
       
    93 <code>Values: frames, frame ticks, movement speed</code>
       
    94 
       
    95  * `frames`: Number of frames in `BlueWater.png`. The frames in this image should be stacked horizontally. The height of this image must be divisible by `frames`
       
    96  * `frame ticks`: Duration of a single frame. Must be >0 if `frames`>1, otherwise it is ignored
       
    97  * `movement speed`: How fast the water moves to the right. Higher values means faster movement. If negative, it moves to the left. Use 0 to stop movement
       
    98 
       
    99 <code>Default: 1, 0, 1</code>
       
   100 
       
   101 == `sd-water-animation` (0.9.23) ==
       
   102 Sudden Death equivalent of `water-animation`, uses `SDWater.png`.
       
   103 
       
   104 == `music` ==
       
   105 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!
       
   106 
       
   107 If you choose a custom music (i.e. a music which does not come with Hedgewars by default), you should also set `fallback-music`.
       
   108 
       
   109 <code>Values: filename</code>
       
   110 
       
   111 No music is played by default.
       
   112 
       
   113 Example:
       
   114 <code>music = Nature.ogg</code>
       
   115 
       
   116 == `sd-music` ==
       
   117 Name of the music file to be played in the theme while in Sudden Death, e.g. `hell.ogg`. If `music` was not specified, the Sudden Death has no default music as well. You find music tracks in `Data/Music` of the Hedgewars installation directory. The file name is case-sensitive!
       
   118 
       
   119 If you choose a custom music, you should also set `fallback-sd-music`.
       
   120 
       
   121 <code>Values: filename</code>
       
   122 
       
   123 Default: `sdmusic.ogg` (only if `music` was specified, no music otherwise)
       
   124 
       
   125 == `fallback-music` ==
       
   126 Fallback music for the `music` setting. This setting should be added whenever you use a custom music which is not part of the official Hedgewars install. Otherwise you don't need to set this.
       
   127 If the music specified in `music` is missing, Hedgewars attempts to use this fallback music istead. *Only* use tracks which come with the official Hedgewars install.
       
   128 
       
   129 Note that if Hedgewars fails to find a music, it defaults to silence.
       
   130 
       
   131 Example usage (in combination with `music`):
       
   132 <code>music = My_Custom_Music.ogg
       
   133 fallback-music = Nature.ogg</code>
       
   134 
       
   135 == `fallback-sd-music` ==
       
   136 Like `fallback-music`, except it's for `sd-music`.
       
   137 
       
   138 == `clouds` ==
       
   139 The number of clouds to create, before Sudden Death. Uses `Clouds.png`.
       
   140 
       
   141 <code>Values: number</code>
       
   142 
       
   143 <code>Default: 9</code>
       
   144 
       
   145 == `sd-clouds` ==
       
   146 Number of clouds while in Sudden Death, uses the file `SDClouds.png`. By default it is the same number as `clouds` or `9` if `clouds` was not specified as well.
       
   147 
       
   148 <code>Values: number</code>
       
   149 
       
   150 <code>Default: 9</code>
       
   151 
       
   152 == `flatten-clouds` ==
       
   153 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).
       
   154 
       
   155 == `flakes` ==
       
   156 Values for the flakes of this theme before Sudden Death. Uses `Flake.png`.
       
   157 
       
   158  * `number`: Number of visible flakes.
       
   159  * `frames`: Number of frames used in `Flake.png`
       
   160  * `frame ticks`: Number of ticks a frame is shown, after that the next frame is shown (a tick currently equals 1 millisecond). A value of 0 indicates that each flake should keep displaying the exact frame that was selected randomly when the flake was created.
       
   161  * `rotation speed`: How fast the flakes rotate. `0` = no rotation, and all flakes spawn unrotated. With any other value, flakes also spawn with a random rotation
       
   162  * `vertical speed`: Vertical speed of the flakes. A positive value makes the flakes fall, while a negative value makes them rise
       
   163 
       
   164 <code>Values: number, frames, frame ticks, rotation speed, vertical speed</code>
       
   165 
       
   166 No flakes are used by default.
       
   167 
       
   168 == `sd-flakes` ==
       
   169 Sudden Death version of `flakes`, the parameters are the same as in `flakes`. This uses `SDFlake.png`.
       
   170 
       
   171 <code>Values: number, frames, frame ticks, rotation speed, vertical speed</code>
       
   172 
       
   173 If `sd-flakes` is unspecified, skulls and bones are used as images and the following default values are used:
       
   174 
       
   175 <code>Default: X, 4, 0, 15, 250</code>
       
   176 
       
   177 (The “X” means the default number of Sudden Death flakes is variable. It depends on the window size and the terrain width.)
       
   178 
       
   179 == `sd-tint` ==
       
   180 Custom tinting of the background in Sudden Death. The background color will be multiplied by the RGB and opacity values. With `$FF, $FF, $FF, $FF`, there is no change, while with `$00, $00, $00, $FF`, the backgroun turns completely black. The opacity value controls how visible the background image will still be. With an opacity of `$00`, the background image is not visible, only the `sd-tint` color can be seen.
       
   181 
       
   182 <code>Values: red, green, blue, opacity</code>
       
   183 
       
   184 <code>Default: $80, $80, $80, $FF</code>
       
   185 
       
   186 == `flatten-flakes` ==
       
   187 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.
       
   188 
       
   189 == `object` ==
       
   190 There may be multiple object keys in the file, each one representing one land object.
    41 There may be multiple object keys in the file, each one representing one land object.
   191 
    42 
   192  * `filename`: The object’s filename (without the “.png”). Case-sensitive.
    43  * `filename`: The object’s filename (without the “.png”). Case-sensitive.
   193  * `max`: The maximum number of this object that may be generated in a map (must by between 1 and 32)
    44  * `max`: The maximum number of this object that may be generated in a map (must by between 1 and 32)
   194  * `buriedrects_num`: (optional): Number of rectangles that must be buried in the terrain. If this value is ommitted, a value of 1 is assumed
    45  * `buriedrects_num`: (optional): Number of rectangles that must be buried in the terrain. If this value is ommitted, a value of 1 is assumed
   208 
    59 
   209 https://hedgewars.org/images/avematantheme/hw-avematan.rects.png
    60 https://hedgewars.org/images/avematantheme/hw-avematan.rects.png
   210 
    61 
   211 The large rectangle shows a `visiblerects` and the small one shows a `buriedrects`.
    62 The large rectangle shows a `visiblerects` and the small one shows a `buriedrects`.
   212 
    63 
   213 == `spray` ==
    64 === `spray` ===
   214 There may be several spray keys in the file, each one representing one spray object.
    65 There may be several spray keys in the file, each one representing one spray object.
   215 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.
    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.
   216 
    67 
   217 <code>Values: name, number</code>
    68 <code>Values: name, number</code>
   218 
    69 
   219 == `ice` ==
    70 == Water ==
   220 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.
    71 === `water-top` ===
   221 
    72 The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
   222 == `snow` ==
    73 This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`.
   223 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.
    74 
       
    75 <code>Values: red, green, blue</code>
       
    76 
       
    77 <code>Default: $54, $5C, $9D</code>
       
    78 
       
    79 === `water-bottom` ===
       
    80 The colour of the lowest part of the water before Sudden Death.
       
    81 This makes a gradient together with `water-top`. The default color is blue and matches the default `BlueColor.png`.
       
    82 
       
    83 <code>Values: red, green, blue</code>
       
    84 
       
    85 <code>Default: $34, $3C, $7D</code>
       
    86 
       
    87 === `sd-water-bottom` ===
       
    88 The colour of the lowest part of the water while in Sudden Death.
       
    89 This makes a gradient together with `sd-water-top`.
       
    90 The default color neatly matches the default `SDWater.png`.
       
    91 
       
    92 <code>Values: red, green, blue</code>
       
    93 
       
    94 <code>Default: $96, $70, $A9</code>
       
    95 
       
    96 === `sd-water-top` ===
       
    97 The colour of the topmost part of the water (under the `SDWater.png`) while in Sudden Death.
       
    98 This makes a gradient together with `sd-water-bottom`.
       
    99 The default color neatly matches the default `SDWater.png`.
       
   100 
       
   101 <code>Values: red, green, blue</code>
       
   102 
       
   103 <code>Default: $B9, $72, $C9</code>
       
   104 
       
   105 === `water-opacity` ===
       
   106 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` or `$FF` makes it fully opaque. If the water is fully opaque, the drowning animation is skipped when a hedgehog drowns.
       
   107 
       
   108 In combination with the default `BlueWater.png`, the recommended value for this is `$80`, which also is the default.
       
   109 
       
   110 <code>Values: opacity</code>
       
   111 
       
   112 <code>Default: $80</code>
       
   113 
       
   114 === `sd-water-opacity` ===
       
   115 The water opacity while in Sudden Death. Syntax and default value is equivalent to `water-opacity`.
       
   116 
       
   117 === `water-animation` (0.9.23) ===
       
   118 Specified a custom water animation and flowing speed before Sudden Death. By default, the water just moves to the right and has no special animation.
       
   119 
       
   120 <code>Values: frames, frame ticks, movement speed</code>
       
   121 
       
   122  * `frames`: Number of frames in `BlueWater.png`. The frames in this image should be stacked horizontally. The height of this image must be divisible by `frames`
       
   123  * `frame ticks`: Duration of a single frame. Must be >0 if `frames`>1, otherwise it is ignored
       
   124  * `movement speed`: How fast the water moves to the right. Higher values means faster movement. If negative, it moves to the left. Use 0 to stop movement
       
   125 
       
   126 <code>Default: 1, 0, 1</code>
       
   127 
       
   128 === `sd-water-animation` (0.9.23) ===
       
   129 Sudden Death equivalent of `water-animation`, uses `SDWater.png`.
       
   130 
       
   131 == Background ==
       
   132 === `sky` ===
       
   133 The colour of the sky.
       
   134 
       
   135 <code>Values: red, green, blue</code>
       
   136 
       
   137 <code>Default: $00, $00, $00</code>
       
   138 
       
   139 === `rq-sky` ===
       
   140 The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality.
       
   141 
       
   142 <code>Values: red, green, blue</code>
       
   143 
       
   144 === `sd-tint` ===
       
   145 Custom tinting of the background in Sudden Death. The background color will be multiplied by the RGB and opacity values. With `$FF, $FF, $FF, $FF`, there is no change, while with `$00, $00, $00, $FF`, the backgroun turns completely black. The opacity value controls how visible the background image will still be. With an opacity of `$00`, the background image is not visible, only the `sd-tint` color can be seen.
       
   146 
       
   147 <code>Values: red, green, blue, opacity</code>
       
   148 
       
   149 <code>Default: $80, $80, $80, $FF</code>
       
   150 
       
   151 === `clouds` ===
       
   152 The number of clouds to create, before Sudden Death. Uses `Clouds.png`.
       
   153 
       
   154 <code>Values: number</code>
       
   155 
       
   156 <code>Default: 9</code>
       
   157 
       
   158 === `sd-clouds` ===
       
   159 Number of clouds while in Sudden Death, uses the file `SDClouds.png`. By default it is the same number as `clouds` or `9` if `clouds` was not specified as well.
       
   160 
       
   161 <code>Values: number</code>
       
   162 
       
   163 <code>Default: 9</code>
       
   164 
       
   165 === `flatten-clouds` ===
       
   166 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).
       
   167 
       
   168 === `flakes` ===
       
   169 Values for the flakes of this theme before Sudden Death. Uses `Flake.png`.
       
   170 
       
   171  * `number`: Number of visible flakes.
       
   172  * `frames`: Number of frames used in `Flake.png`
       
   173  * `frame ticks`: Number of ticks a frame is shown, after that the next frame is shown (a tick currently equals 1 millisecond). A value of 0 indicates that each flake should keep displaying the exact frame that was selected randomly when the flake was created.
       
   174  * `rotation speed`: How fast the flakes rotate. `0` = no rotation, and all flakes spawn unrotated. With any other value, flakes also spawn with a random rotation
       
   175  * `vertical speed`: Vertical speed of the flakes. A positive value makes the flakes fall, while a negative value makes them rise
       
   176 
       
   177 <code>Values: number, frames, frame ticks, rotation speed, vertical speed</code>
       
   178 
       
   179 No flakes are used by default.
       
   180 
       
   181 === `sd-flakes` ===
       
   182 Sudden Death version of `flakes`, the parameters are the same as in `flakes`. This uses `SDFlake.png`.
       
   183 
       
   184 <code>Values: number, frames, frame ticks, rotation speed, vertical speed</code>
       
   185 
       
   186 If `sd-flakes` is unspecified, skulls and bones are used as images and the following default values are used:
       
   187 
       
   188 <code>Default: X, 4, 0, 15, 250</code>
       
   189 
       
   190 (The “X” means the default number of Sudden Death flakes is variable. It depends on the window size and the terrain width.)
       
   191 
       
   192 === `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.
       
   194 
       
   195 
       
   196 == Music ==
       
   197 === `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!
       
   199 
       
   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`.
       
   201 
       
   202 <code>Values: filename</code>
       
   203 
       
   204 No music is played by default.
       
   205 
       
   206 Example:
       
   207 <code>music = Nature.ogg</code>
       
   208 
       
   209 === `sd-music` ===
       
   210 Name of the music file to be played in the theme while in Sudden Death, e.g. `hell.ogg`. If `music` was not specified, the Sudden Death has no default music as well. You find music tracks in `Data/Music` of the Hedgewars installation directory. The file name is case-sensitive!
       
   211 
       
   212 If you choose a custom music, you should also set `fallback-sd-music`.
       
   213 
       
   214 <code>Values: filename</code>
       
   215 
       
   216 Default: `sdmusic.ogg` (only if `music` was specified, no music otherwise)
       
   217 
       
   218 === `fallback-music` ===
       
   219 Fallback music for the `music` setting. This setting should be added whenever you use a custom music which is not part of the official Hedgewars install. Otherwise you don't need to set this.
       
   220 If the music specified in `music` is missing, Hedgewars attempts to use this fallback music istead. *Only* use tracks which come with the official Hedgewars install.
       
   221 
       
   222 Note that if Hedgewars fails to find a music, it defaults to silence.
       
   223 
       
   224 Example usage (in combination with `music`):
       
   225 <code>music = My_Custom_Music.ogg
       
   226 fallback-music = Nature.ogg</code>
       
   227 
       
   228 === `fallback-sd-music` ===
       
   229 Like `fallback-music`, except it's for `sd-music`.