author | Wuzzy |
Wed, 14 Feb 2018 12:07:24 +0000 | |
changeset 1198 | b29cfb69ac93 |
parent 1197 | a429f011e687 |
child 1199 | c56285e2cfce |
permissions | -rw-r--r-- |
83 | 1 |
#summary Structure of the theme.cfg file |
2 |
||
746 | 3 |
= `theme.cfg` = |
1019 | 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]. |
816 | 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. |
815 | 6 |
|
7 |
Example: |
|
8 |
<code>sky = 23, 8, 33 |
|
9 |
border = 7, 72, 102 |
|
10 |
music = Art.ogg</code> |
|
83 | 11 |
|
814 | 12 |
There are also keys that replace existing keys under certain conditions, all keys preceding with “`sd-`” are used during Sudden Death and all keys with “`rq-`” are used when the graphics quality is reduced. |
83 | 13 |
|
14 |
Following is the list of all current keys and their values, it is important to have the right number of values. Most keys may only be used once. |
|
15 |
||
1124
b37c99c55365
ThemeCfg: convert color numbers to hexadecimal form, consistently
Wuzzy
parents:
1123
diff
changeset
|
16 |
The values red, green, blue and opacity are in the range of one byte and can be specified in both decimal or hexadecimal form. A hexadecimal number must be prepended with a dollar sign. The range is `0` - `255` or `$00` - `$FF`. |
83 | 17 |
|
463 | 18 |
Any line can be made into a comment line by having a semicolon (“`;`”) at the beginning. Comments are ignored by Hedgewars. |
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
19 |
|
806 | 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 |
||
1195 | 22 |
Lines starting with the “#” character will be ignored by Hedgewars and can be used as comments. |
23 |
||
746 | 24 |
== `sky` == |
83 | 25 |
The colour of the sky. |
26 |
||
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
27 |
<code>Values: red, green, blue</code> |
83 | 28 |
|
1124
b37c99c55365
ThemeCfg: convert color numbers to hexadecimal form, consistently
Wuzzy
parents:
1123
diff
changeset
|
29 |
<code>Default: $00, $00, $00</code> |
806 | 30 |
|
746 | 31 |
== `rq-sky` == |
462 | 32 |
The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality. |
33 |
||
34 |
<code>Values: red, green, blue</code> |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
35 |
|
746 | 36 |
== `border` == |
83 | 37 |
The colour of the outline of explosions. |
38 |
||
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
39 |
<code>Values: red, green, blue</code> |
83 | 40 |
|
1124
b37c99c55365
ThemeCfg: convert color numbers to hexadecimal form, consistently
Wuzzy
parents:
1123
diff
changeset
|
41 |
<code>Default: $50, $50, $50</code> |
806 | 42 |
|
746 | 43 |
== `water-top` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
44 |
The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death. |
1123 | 45 |
This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`. |
83 | 46 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
47 |
<code>Values: red, green, blue</code> |
83 | 48 |
|
1123 | 49 |
<code>Default: $54, $5C, $9D</code> |
806 | 50 |
|
746 | 51 |
== `water-bottom` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
52 |
The colour of the lowest part of the water before Sudden Death. |
1123 | 53 |
This makes a gradient together with `water-top`. The default color is blue and matches the default `BlueColor.png`. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
54 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
55 |
<code>Values: red, green, blue</code> |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
56 |
|
1123 | 57 |
<code>Default: $34, $3C, $7D</code> |
806 | 58 |
|
746 | 59 |
== `sd-water-bottom` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
60 |
The colour of the lowest part of the water while in Sudden Death. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
61 |
This makes a gradient together with `sd-water-top`. |
806 | 62 |
The default color neatly matches the default `SDWater.png`. |
83 | 63 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
64 |
<code>Values: red, green, blue</code> |
83 | 65 |
|
1124
b37c99c55365
ThemeCfg: convert color numbers to hexadecimal form, consistently
Wuzzy
parents:
1123
diff
changeset
|
66 |
<code>Default: $96, $70, $A9</code> |
806 | 67 |
|
746 | 68 |
== `sd-water-top` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
69 |
The colour of the topmost part of the water (under the `SDWater.png`) while in Sudden Death. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
70 |
This makes a gradient together with `sd-water-bottom`. |
806 | 71 |
The default color neatly matches the default `SDWater.png`. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
72 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
73 |
<code>Values: red, green, blue</code> |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
74 |
|
1124
b37c99c55365
ThemeCfg: convert color numbers to hexadecimal form, consistently
Wuzzy
parents:
1123
diff
changeset
|
75 |
<code>Default: $B9, $72, $C9</code> |
806 | 76 |
|
746 | 77 |
== `water-opacity` == |
806 | 78 |
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. |
79 |
||
80 |
In combination with the default `BlueWater.png`, the recommended value for this is `$80`, which also is the default. |
|
83 | 81 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
82 |
<code>Values: opacity</code> |
83 | 83 |
|
806 | 84 |
<code>Default: $80</code> |
85 |
||
746 | 86 |
== `sd-water-opacity` == |
953 | 87 |
The water opacity while in Sudden Death. Syntax and default value is equivalent to `water-opacity`. |
88 |
||
89 |
== `water-animation` (0.9.23) == |
|
954 | 90 |
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. |
953 | 91 |
|
92 |
<code>Values: frames, frame ticks, movement speed</code> |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
93 |
|
954 | 94 |
* `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` |
955 | 95 |
* `frame ticks`: Duration of a single frame. Must be >0 if `frames`>1, otherwise it is ignored |
954 | 96 |
* `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 |
803 | 97 |
|
953 | 98 |
<code>Default: 1, 0, 1</code> |
99 |
||
100 |
== `sd-water-animation` (0.9.23) == |
|
101 |
Sudden Death equivalent of `water-animation`, uses `SDWater.png`. |
|
806 | 102 |
|
746 | 103 |
== `music` == |
812 | 104 |
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! |
83 | 105 |
|
1198 | 106 |
If you choose a custom music (i.e. a music which does not come with Hedgewars by default), you should also set `fallback-music`. |
1196 | 107 |
|
804 | 108 |
<code>Values: filename</code> |
83 | 109 |
|
812 | 110 |
No music is played by default. |
111 |
||
1141 | 112 |
== `sd-music` == |
812 | 113 |
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! |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
114 |
|
1196 | 115 |
If you choose a custom music, you should also set `fallback-sd-music`. |
116 |
||
804 | 117 |
<code>Values: filename</code> |
118 |
||
812 | 119 |
Default: `sdmusic.ogg` (only if `music` was specified, no music otherwise) |
120 |
||
1194 | 121 |
== `fallback-music` == |
122 |
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. |
|
1197 | 123 |
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. |
1194 | 124 |
|
125 |
Note that if Hedgewars fails to find a music, it defaults to silence. |
|
126 |
||
127 |
Fallback music is not yet supported in 0.9.23, but it will be supported in 0.9.24. You can already add this setting safely, Hedgewars 0.9.23 (and earlier) will just ignore it. |
|
128 |
||
129 |
== `fallback-sd-music` == |
|
130 |
Like `fallback-music`, except it's for `sd-music`. |
|
131 |
||
746 | 132 |
== `clouds` == |
807 | 133 |
The number of clouds to create, before Sudden Death. Uses `Clouds.png`. |
83 | 134 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
135 |
<code>Values: number</code> |
83 | 136 |
|
807 | 137 |
<code>Default: 9</code> |
138 |
||
746 | 139 |
== `sd-clouds` == |
807 | 140 |
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. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
141 |
|
803 | 142 |
<code>Values: number</code> |
143 |
||
807 | 144 |
<code>Default: 9</code> |
145 |
||
746 | 146 |
== `flatten-clouds` == |
464 | 147 |
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). |
148 |
||
746 | 149 |
== `flakes` == |
807 | 150 |
Values for the flakes of this theme before Sudden Death. Uses `Flake.png`. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
151 |
|
806 | 152 |
* `number`: Number of visible flakes. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
153 |
* `frames`: Number of frames used in `Flake.png` |
1122 | 154 |
* `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. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
155 |
* `speed`: Rotation speed of flake |
1122 | 156 |
* `fall speed`: Falling speed of flake. This can also be negative for rising flakes |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
157 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
158 |
<code>Values: number, frames, frame ticks, speed, fall speed</code> |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
159 |
|
807 | 160 |
No flakes are used by default. |
806 | 161 |
|
746 | 162 |
== `sd-flakes` == |
1145 | 163 |
Sudden Death version of `flakes`, the parameters are the same as in `flakes`. This uses `SDFlake.png`. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
164 |
|
803 | 165 |
<code>Values: number, frames, frame ticks, speed, fall speed</code> |
166 |
||
1146 | 167 |
If `sd-flakes` is unspecified, skulls and bones are used as images and the following default values are used: |
1145 | 168 |
|
806 | 169 |
<code>Default: X, 4, 0, 15, 250</code> |
170 |
||
171 |
(The “X” means the default number of Sudden Death flakes is variable. It depends on the window size and the terrain width.) |
|
172 |
||
1138 | 173 |
== `sd-tint` == |
1193 | 174 |
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. |
1138 | 175 |
|
176 |
<code>Values: red, green, blue, opacity</code> |
|
177 |
||
178 |
<code>Default: $80, $80, $80, $FF</code> |
|
179 |
||
746 | 180 |
== `flatten-flakes` == |
464 | 181 |
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. |
182 |
||
746 | 183 |
== `object` == |
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
184 |
There may be multiple object keys in the file, each one representing one land object. |
83 | 185 |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
186 |
* `filename`: The object’s filename (without the “.png”). Case-sensitive. |
1142 | 187 |
* `max`: The maximum number of this object that may be generated in a map (must by between 1 and 32) |
1121 | 188 |
* `buriedrects_num`: (optional): Number of rectangles that must be buried in the terrain. If this value is ommitted, a value of 1 is assumed |
189 |
* `buriedrects`: A rectangle that must be buried in the terrain (`left, top, width, height`). If all 4 values are 0, the object will be placed on top of the water |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
190 |
* `minvisible`: The minimum amount of rectangles that must be visible |
990 | 191 |
* `visiblerects`: List of the rectangles for being visible (`left, top, width, height`) |
192 |
||
1121 | 193 |
Syntax when you only need 1 buried rectangle: |
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
194 |
|
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
195 |
<code>Values: filename, max, buriedrec, minvisible, visiblerec</code> |
83 | 196 |
|
1121 | 197 |
Syntax when you want to use multiple buried rectangles: |
990 | 198 |
|
199 |
<code>Values: filename, max, buriedrects_num, buriedrects, minvisible, visiblerects</code> |
|
200 |
||
201 |
Here's an example where `visiblerects` and the `buriedrects` are visualized on an ancient picture: |
|
808 | 202 |
|
798
30c5f1ebd552
global replace of http with https for hedgewars.org wiki links
nemo
parents:
746
diff
changeset
|
203 |
https://hedgewars.org/images/avematantheme/hw-avematan.rects.png |
448 | 204 |
|
990 | 205 |
The large rectangle shows a `visiblerects` and the small one shows a `buriedrects`. |
808 | 206 |
|
746 | 207 |
== `spray` == |
83 | 208 |
There may be several spray keys in the file, each one representing one spray object. |
472
52bd8ea08f4f
Better explanation for the number of sprays.
almikes@aol.com
parents:
466
diff
changeset
|
209 |
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. |
83 | 210 |
|
464 | 211 |
<code>Values: name, number</code> |
212 |
||
746 | 213 |
== `ice` == |
803 | 214 |
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. |
464 | 215 |
|
746 | 216 |
== `snow` == |
813 | 217 |
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. |