author | Wuzzy |
Thu, 07 Apr 2016 19:39:40 +0100 | |
changeset 860 | a7ddaecf54f3 |
parent 816 | 08e347c81554 |
child 945 | c2f6ca98d8dc |
permissions | -rw-r--r-- |
83 | 1 |
#summary Structure of the theme.cfg file |
2 |
||
746 | 3 |
= `theme.cfg` = |
438 | 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]. |
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 |
||
434 | 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. The range are `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 |
||
746 | 22 |
== `sky` == |
83 | 23 |
The colour of the sky. |
24 |
||
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
25 |
<code>Values: red, green, blue</code> |
83 | 26 |
|
807 | 27 |
<code>Default: 0, 0, 0</code> |
806 | 28 |
|
746 | 29 |
== `rq-sky` == |
462 | 30 |
The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality. |
31 |
||
32 |
<code>Values: red, green, blue</code> |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
33 |
|
746 | 34 |
== `border` == |
83 | 35 |
The colour of the outline of explosions. |
36 |
||
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
37 |
<code>Values: red, green, blue</code> |
83 | 38 |
|
807 | 39 |
<code>Default: 80, 80, 80</code> |
806 | 40 |
|
746 | 41 |
== `water-top` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
42 |
The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death. |
806 | 43 |
This makes a gradient together with `water-bottom`. The default color |
44 |
is black which is usually not what you want. |
|
45 |
In combination with the default `BlueWater.png`, the recommended value is `$54, $5C, $9D`. |
|
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 |
|
807 | 49 |
<code>Default: 0, 0, 0</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. |
806 | 53 |
This makes a gradient together with `water-top`. The default color |
54 |
is black which is usually not what you want. |
|
55 |
In combination with the default `BlueWater.png`, the recommended value is `$34, $3C, $7D`. |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
56 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
57 |
<code>Values: red, green, blue</code> |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
58 |
|
807 | 59 |
<code>Default: 0, 0, 0</code> |
806 | 60 |
|
746 | 61 |
== `sd-water-bottom` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
62 |
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
|
63 |
This makes a gradient together with `sd-water-top`. |
806 | 64 |
The default color neatly matches the default `SDWater.png`. |
83 | 65 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
66 |
<code>Values: red, green, blue</code> |
83 | 67 |
|
807 | 68 |
<code>Default: 150, 112, 169</code> |
806 | 69 |
|
746 | 70 |
== `sd-water-top` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
71 |
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
|
72 |
This makes a gradient together with `sd-water-bottom`. |
806 | 73 |
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
|
74 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
75 |
<code>Values: red, green, blue</code> |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
76 |
|
807 | 77 |
<code>Default: 182, 144, 201</code> |
806 | 78 |
|
746 | 79 |
== `water-opacity` == |
806 | 80 |
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. |
81 |
||
82 |
In combination with the default `BlueWater.png`, the recommended value for this is `$80`, which also is the default. |
|
83 | 83 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
84 |
<code>Values: opacity</code> |
83 | 85 |
|
806 | 86 |
<code>Default: $80</code> |
87 |
||
746 | 88 |
== `sd-water-opacity` == |
807 | 89 |
The water opacity while in Sudden Death. By default, it has the same value as `water-opacity`, or `$80` if `water-opacity` is unspecified. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
90 |
|
803 | 91 |
<code>Values: opacity</code> |
92 |
||
806 | 93 |
<code>Default: $80</code> |
94 |
||
746 | 95 |
== `music` == |
812 | 96 |
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 | 97 |
|
804 | 98 |
<code>Values: filename</code> |
83 | 99 |
|
812 | 100 |
No music is played by default. |
101 |
||
746 | 102 |
== `sd-music` (0.9.21) == |
812 | 103 |
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
|
104 |
|
804 | 105 |
<code>Values: filename</code> |
106 |
||
812 | 107 |
Default: `sdmusic.ogg` (only if `music` was specified, no music otherwise) |
108 |
||
746 | 109 |
== `clouds` == |
807 | 110 |
The number of clouds to create, before Sudden Death. Uses `Clouds.png`. |
83 | 111 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
112 |
<code>Values: number</code> |
83 | 113 |
|
807 | 114 |
<code>Default: 9</code> |
115 |
||
746 | 116 |
== `sd-clouds` == |
807 | 117 |
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
|
118 |
|
803 | 119 |
<code>Values: number</code> |
120 |
||
807 | 121 |
<code>Default: 9</code> |
122 |
||
746 | 123 |
== `flatten-clouds` == |
464 | 124 |
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). |
125 |
||
746 | 126 |
== `flakes` == |
807 | 127 |
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
|
128 |
|
806 | 129 |
* `number`: Number of visible flakes. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
130 |
* `frames`: Number of frames used in `Flake.png` |
451 | 131 |
* `frame ticks`: Number of ticks a frame is shown, after that the next frame is shown (a tick currently equals 1 millisecond). |
132 |
Since 0.9.21: A value of 0 indicates that each flake should keep displaying the exact frame that was selected randomly when the flake was created. |
|
133 |
*Tip*: If you want to have multiple static flakes in 0.9.20 or earlier, you can set the animation length to a ridiculous high value. Sometimes, a flake will still change the displayed frame, but it will rarely happen. |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
134 |
* `speed`: Rotation speed of flake |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
135 |
* `fall speed`: Falling speed of flake |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
136 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
137 |
<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
|
138 |
|
807 | 139 |
No flakes are used by default. |
806 | 140 |
|
746 | 141 |
== `sd-flakes` == |
807 | 142 |
Sudden death version of `flakes`, the parameters are the same as in `flakes`. This uses `SDFlake.png`. If `flakes` was unspecified, then there are no Sudden Death flakes by default, the default shown below only applies if `flakes` has been specified. |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
143 |
|
803 | 144 |
<code>Values: number, frames, frame ticks, speed, fall speed</code> |
145 |
||
806 | 146 |
<code>Default: X, 4, 0, 15, 250</code> |
147 |
||
148 |
(The “X” means the default number of Sudden Death flakes is variable. It depends on the window size and the terrain width.) |
|
149 |
||
746 | 150 |
== `flatten-flakes` == |
464 | 151 |
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. |
152 |
||
746 | 153 |
== `object` == |
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
154 |
There may be multiple object keys in the file, each one representing one land object. |
83 | 155 |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
156 |
* `filename`: The object’s filename (without the “.png”). Case-sensitive. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
157 |
* `max`: The maximum number of this object that may be generated in a map |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
158 |
* `buriedrec`: A rectangle that must be buried in the terrain (`left, top, width, height`) |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
159 |
* `minvisible`: The minimum amount of rectangles that must be visible |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
160 |
* `visiblerec`: list of the rectangles for being visible (`left, top, width, height`) |
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
161 |
|
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
162 |
<code>Values: filename, max, buriedrec, minvisible, visiblerec</code> |
83 | 163 |
|
808 | 164 |
Here's an example where `visiblerec` and the `buriedrec` are visualized on an ancient picture: |
165 |
||
798
30c5f1ebd552
global replace of http with https for hedgewars.org wiki links
nemo
parents:
746
diff
changeset
|
166 |
https://hedgewars.org/images/avematantheme/hw-avematan.rects.png |
448 | 167 |
|
808 | 168 |
The large rectangle shows a `visiblerec` and the small one shows a `buriedrec`. |
169 |
||
746 | 170 |
== `spray` == |
83 | 171 |
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
|
172 |
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 | 173 |
|
464 | 174 |
<code>Values: name, number</code> |
175 |
||
746 | 176 |
== `ice` == |
803 | 177 |
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 | 178 |
|
746 | 179 |
== `snow` == |
813 | 180 |
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. |