author | Wuzzy |
Sun, 27 Mar 2016 14:26:50 +0100 | |
changeset 803 | ef44649bd9df |
parent 801 | 9f89aaa0af76 |
child 804 | ed22ff58ac55 |
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]. |
434 | 5 |
It is structured with a key followed by an equals sign followed a value. The value depends on the key. |
6 |
Example: |
|
83 | 7 |
<code>sky = 120, 40, 80</code> |
8 |
||
434 | 9 |
There is 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 quality is reduced. These keys must be placed after the regular keys and they are all optional. |
83 | 10 |
|
11 |
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. |
|
12 |
||
434 | 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`. |
83 | 14 |
|
463 | 15 |
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
|
16 |
|
746 | 17 |
== `sky` == |
83 | 18 |
The colour of the sky. |
19 |
||
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
20 |
<code>Values: red, green, blue</code> |
83 | 21 |
|
746 | 22 |
== `rq-sky` == |
462 | 23 |
The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality. |
24 |
||
25 |
<code>Values: red, green, blue</code> |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
26 |
|
746 | 27 |
== `border` == |
83 | 28 |
The colour of the outline of explosions. |
29 |
||
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
30 |
<code>Values: red, green, blue</code> |
83 | 31 |
|
746 | 32 |
== `water-top` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
33 |
The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
34 |
This makes a gradient together with `water-bottom`. |
83 | 35 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
36 |
<code>Values: red, green, blue</code> |
83 | 37 |
|
746 | 38 |
== `water-bottom` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
39 |
The colour of the lowest part of the water before Sudden Death. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
40 |
This makes a gradient together with `water-top`. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
41 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
42 |
<code>Values: red, green, blue</code> |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
43 |
|
746 | 44 |
== `sd-water-bottom` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
45 |
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
|
46 |
This makes a gradient together with `sd-water-top`. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
47 |
If unspecified, it has a default value. |
83 | 48 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
49 |
<code>Values: red, green, blue</code> |
83 | 50 |
|
746 | 51 |
== `sd-water-top` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
52 |
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
|
53 |
This makes a gradient together with `sd-water-bottom`. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
54 |
If unspecified, it has a default value. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
55 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
56 |
<code>Values: red, green, blue</code> |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
57 |
|
746 | 58 |
== `water-opacity` == |
490
2b4a9ccb6613
Add info about special treatment of water-opacity=255
almikes@aol.com
parents:
472
diff
changeset
|
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. |
83 | 60 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
61 |
<code>Values: opacity</code> |
83 | 62 |
|
746 | 63 |
== `sd-water-opacity` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
64 |
The water opacity while in Sudden Death. By default, it has the same value as `water-opacity`. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
65 |
|
803 | 66 |
<code>Values: opacity</code> |
67 |
||
746 | 68 |
== `music` == |
801 | 69 |
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 | 70 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
71 |
<code>Values: name</code> |
83 | 72 |
|
746 | 73 |
== `sd-music` (0.9.21) == |
801 | 74 |
Name of the music file to be played in the theme while in Sudden Death, e.g. `hell.ogg`. By default, `sdmusic.ogg` is played. 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
|
75 |
|
746 | 76 |
== `clouds` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
77 |
The number of clouds to create, before Sudden Death. Uses `Clouds.png`. |
83 | 78 |
|
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
79 |
<code>Values: number</code> |
83 | 80 |
|
746 | 81 |
== `sd-clouds` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
82 |
Number of clouds while in Sudden Death, uses the file `SDClouds.png`. By default it is the same number as `clouds`. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
83 |
|
803 | 84 |
<code>Values: number</code> |
85 |
||
746 | 86 |
== `flatten-clouds` == |
464 | 87 |
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). |
88 |
||
803 | 89 |
The value of this key does not matter, the key must only be present to take effect. |
90 |
||
746 | 91 |
== `flakes` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
92 |
Values for the flakes of this theme before Sudden Death. Uses `Flake.png`. If this field is left out, then there are no flakes. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
93 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
94 |
* `number`: Number of visible flakes |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
95 |
* `frames`: Number of frames used in `Flake.png` |
451 | 96 |
* `frame ticks`: Number of ticks a frame is shown, after that the next frame is shown (a tick currently equals 1 millisecond). |
97 |
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. |
|
98 |
*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
|
99 |
* `speed`: Rotation speed of flake |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
100 |
* `fall speed`: Falling speed of flake |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
101 |
|
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
102 |
<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
|
103 |
|
746 | 104 |
== `sd-flakes` == |
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
105 |
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. |
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
106 |
|
803 | 107 |
<code>Values: number, frames, frame ticks, speed, fall speed</code> |
108 |
||
746 | 109 |
== `flatten-flakes` == |
464 | 110 |
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. |
111 |
||
803 | 112 |
The value of this key does not matter, the key must only be present to take effect. |
113 |
||
746 | 114 |
== `object` == |
319
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
115 |
There may be multiple object keys in the file, each one representing one land object. |
83 | 116 |
|
433
0661855ab04a
Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents:
320
diff
changeset
|
117 |
* `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
|
118 |
* `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
|
119 |
* `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
|
120 |
* `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
|
121 |
* `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
|
122 |
|
e5542ee81444
Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents:
83
diff
changeset
|
123 |
<code>Values: filename, max, buriedrec, minvisible, visiblerec</code> |
83 | 124 |
|
448 | 125 |
`visiblerec` and the `buriedrec` visualized on an ancient picture: |
798
30c5f1ebd552
global replace of http with https for hedgewars.org wiki links
nemo
parents:
746
diff
changeset
|
126 |
https://hedgewars.org/images/avematantheme/hw-avematan.rects.png |
448 | 127 |
|
746 | 128 |
== `spray` == |
83 | 129 |
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
|
130 |
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 | 131 |
|
464 | 132 |
<code>Values: name, number</code> |
133 |
||
746 | 134 |
== `ice` == |
803 | 135 |
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 | 136 |
|
803 | 137 |
The value of this key does not matter, the key must only be present to take effect. |
465 | 138 |
|
746 | 139 |
== `snow` == |
803 | 140 |
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. |
465 | 141 |
|
803 | 142 |
The value of this key does not matter, the key must only be present to take effect. |