ThemeCfg.wiki
author Wuzzy <almikes@aol.com>
Wed, 30 Oct 2019 11:59:37 +0100
changeset 2077 514babfbad9e
parent 1889 e6b16d2d7377
child 2084 7fe5cb216b02
permissions -rw-r--r--
Remove outdated legacy hints as clutter
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
83
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
     1
#summary Structure of the theme.cfg file
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
     2
1315
7368027d526f ThemeCfg: upd headers
Wuzzy
parents: 1314
diff changeset
     3
= Structure of `theme.cfg` =
1316
1a612c26c5f7 ThemeCfg: Ad intro
Wuzzy
parents: 1315
diff changeset
     4
1a612c26c5f7 ThemeCfg: Ad intro
Wuzzy
parents: 1315
diff changeset
     5
== Introduction ==
1a612c26c5f7 ThemeCfg: Ad intro
Wuzzy
parents: 1315
diff changeset
     6
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].
1a612c26c5f7 ThemeCfg: Ad intro
Wuzzy
parents: 1315
diff changeset
     7
1313
fa362f7bacbd ThemeCfg: Move TOC
Wuzzy
parents: 1312
diff changeset
     8
<wiki:toc max_depth="3" />
fa362f7bacbd ThemeCfg: Move TOC
Wuzzy
parents: 1312
diff changeset
     9
1310
c84f7dd4a919 ThemeCfg: add TOC
Wuzzy
parents: 1309
diff changeset
    10
== Syntax ==
1316
1a612c26c5f7 ThemeCfg: Ad intro
Wuzzy
parents: 1315
diff changeset
    11
A `theme.cfg` is a text file which is structured with a list of keys, each separated by line breaks. Each key is followed by an equals sign followed a value. Values can be numbers, strings, or comma-separated lists of these.
815
69b8476b4bb2 Theme: Better example
Wuzzy
parents: 814
diff changeset
    12
69b8476b4bb2 Theme: Better example
Wuzzy
parents: 814
diff changeset
    13
Example:
69b8476b4bb2 Theme: Better example
Wuzzy
parents: 814
diff changeset
    14
<code>sky = 23, 8, 33
69b8476b4bb2 Theme: Better example
Wuzzy
parents: 814
diff changeset
    15
border = 7, 72, 102
69b8476b4bb2 Theme: Better example
Wuzzy
parents: 814
diff changeset
    16
music = Art.ogg</code>
83
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
    17
814
f0c338d954cb Theme: grammar fix
Wuzzy
parents: 813
diff changeset
    18
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
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
    19
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
    20
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.
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
    21
1124
b37c99c55365 ThemeCfg: convert color numbers to hexadecimal form, consistently
Wuzzy
parents: 1123
diff changeset
    22
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
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
    23
463
35d43dbb99ad Clarified comments
almikes@aol.com
parents: 462
diff changeset
    24
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
    25
806
366d41a07472 Theme: More about default values
Wuzzy
parents: 805
diff changeset
    26
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.
366d41a07472 Theme: More about default values
Wuzzy
parents: 805
diff changeset
    27
1315
7368027d526f ThemeCfg: upd headers
Wuzzy
parents: 1314
diff changeset
    28
== General configuration keys ==
1317
3e33196a7312 ThemeCfg: remove version numbers from headers
Wuzzy
parents: 1316
diff changeset
    29
=== `hidden` ===
1266
427e63ea7539 ThemeCfg: Add hidden key
Wuzzy
parents: 1201
diff changeset
    30
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.
427e63ea7539 ThemeCfg: Add hidden key
Wuzzy
parents: 1201
diff changeset
    31
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
    32
=== `ice` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
    33
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.
806
366d41a07472 Theme: More about default values
Wuzzy
parents: 805
diff changeset
    34
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
    35
=== `snow` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
    36
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.
462
4416c2ed13d8 Clarify rq-sky.
almikes@aol.com
parents: 451
diff changeset
    37
1889
e6b16d2d7377 ThemeCfg: Add rope-step
Wuzzy
parents: 1884
diff changeset
    38
=== `rope-step` (1.0.0) ===
e6b16d2d7377 ThemeCfg: Add rope-step
Wuzzy
parents: 1884
diff changeset
    39
Changes the rope appearance. This changes the distance between rope pieces. This only makes sense if you also use a custom rope image.
e6b16d2d7377 ThemeCfg: Add rope-step
Wuzzy
parents: 1884
diff changeset
    40
e6b16d2d7377 ThemeCfg: Add rope-step
Wuzzy
parents: 1884
diff changeset
    41
Default: 4
e6b16d2d7377 ThemeCfg: Add rope-step
Wuzzy
parents: 1884
diff changeset
    42
1877
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
    43
== Land object keys ==
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
    44
Land objects are images that are placed randomly on the map. Objects become part of the terrain.
806
366d41a07472 Theme: More about default values
Wuzzy
parents: 805
diff changeset
    45
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
    46
=== `object` ===
319
e5542ee81444 Fixed the object entry, as well as some minor fixes.
Caironater@gmail.com
parents: 83
diff changeset
    47
There may be multiple object keys in the file, each one representing one land object.
83
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
    48
433
0661855ab04a Reorganize the page, improve typography, add sd-music.
almikes@aol.com
parents: 320
diff changeset
    49
 * `filename`: The object’s filename (without the “.png”). Case-sensitive.
1142
eba210749526 ThemeCfg: fix bracket
Wuzzy
parents: 1141
diff changeset
    50
 * `max`: The maximum number of this object that may be generated in a map (must by between 1 and 32)
1121
0a7925ca59e3 ThemeCfg: update buried rects
Wuzzy
parents: 1019
diff changeset
    51
 * `buriedrects_num`: (optional): Number of rectangles that must be buried in the terrain. If this value is ommitted, a value of 1 is assumed
0a7925ca59e3 ThemeCfg: update buried rects
Wuzzy
parents: 1019
diff changeset
    52
 * `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
    53
 * `minvisible`: The minimum amount of rectangles that must be visible
990
606b2d0c5a09 Theme: Explain multiple buried rectangles in 0.9.23
Wuzzy
parents: 955
diff changeset
    54
 * `visiblerects`: List of the rectangles for being visible (`left, top, width, height`)
606b2d0c5a09 Theme: Explain multiple buried rectangles in 0.9.23
Wuzzy
parents: 955
diff changeset
    55
1121
0a7925ca59e3 ThemeCfg: update buried rects
Wuzzy
parents: 1019
diff changeset
    56
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
    57
1875
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    58
<code>Values: filename, max, buriedrect, minvisible, visiblerec</code>
83
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
    59
1121
0a7925ca59e3 ThemeCfg: update buried rects
Wuzzy
parents: 1019
diff changeset
    60
Syntax when you want to use multiple buried rectangles:
990
606b2d0c5a09 Theme: Explain multiple buried rectangles in 0.9.23
Wuzzy
parents: 955
diff changeset
    61
606b2d0c5a09 Theme: Explain multiple buried rectangles in 0.9.23
Wuzzy
parents: 955
diff changeset
    62
<code>Values: filename, max, buriedrects_num, buriedrects, minvisible, visiblerects</code>
606b2d0c5a09 Theme: Explain multiple buried rectangles in 0.9.23
Wuzzy
parents: 955
diff changeset
    63
606b2d0c5a09 Theme: Explain multiple buried rectangles in 0.9.23
Wuzzy
parents: 955
diff changeset
    64
Here's an example where `visiblerects` and the `buriedrects` are visualized on an ancient picture:
808
a6c6a92dc83f Theme: fix image align
Wuzzy
parents: 807
diff changeset
    65
798
30c5f1ebd552 global replace of http with https for hedgewars.org wiki links
nemo
parents: 746
diff changeset
    66
https://hedgewars.org/images/avematantheme/hw-avematan.rects.png
448
e419fde32f07 Adding picture (blashphemy?)
sheepyluva@gmail.com
parents: 438
diff changeset
    67
990
606b2d0c5a09 Theme: Explain multiple buried rectangles in 0.9.23
Wuzzy
parents: 955
diff changeset
    68
The large rectangle shows a `visiblerects` and the small one shows a `buriedrects`.
808
a6c6a92dc83f Theme: fix image align
Wuzzy
parents: 807
diff changeset
    69
1875
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    70
=== `overlays` ===
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    71
An overlay is an extension of an object. It is an image that is drawn relative to the position of an object that was already placed. Overlays create land just like objects do, but unlike objects, they are drawn on top of the main landmass, instead of behind it. An object can have multiple overlays.
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    72
1876
329784030e91 ThemeCfg: typo fix
Wuzzy
parents: 1875
diff changeset
    73
This key allows you to assign 1 or more overlays to a given object. If multiple overlays are used, all overlays will be drawn for each object. This key must be added after the definition of the object you want to add overlays for.
1875
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    74
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    75
<code>Values: object_filename, overlay_count, x_offset_1, y_offset_1, overlay_filename_1, ...</code>
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    76
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    77
 * `object_filename`: File name of the object to which this overlay applies
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    78
 * `overlay_count`: Number of overlays for this object
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    79
 * `x_offset_1`: X position offset of the overlay image relative to the object. Note: The top left corner acts as the image origin
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    80
 * `y_offset_1`: Y position offset of the overlay
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    81
 * `overlay_filename_1`: File name of the overlay image to use
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    82
 * You must repeat the last 3 arguments if `overlay_count` is greater than 1; each overlay needs its own offset and file name.
f55ea5b6a00d ThemeCfg: Add documentation of overlays
Wuzzy
parents: 1871
diff changeset
    83
1879
686923e40b80 ThemeCfg: Add anchors help (stub)
Wuzzy
parents: 1878
diff changeset
    84
=== `anchors` ===
1883
5e5b098885ca ThemeCfg: More anchor explanation
Wuzzy
parents: 1882
diff changeset
    85
An anchor does not create land itself, but instead is a setting that alters the positioning of an object. Each object can have multiple anchors. An anchor is a rectangle that is similar to a `buriedrect`, but it can be outside of the object boundaries. Anchors are useful for objects that spawn on the water.
1879
686923e40b80 ThemeCfg: Add anchors help (stub)
Wuzzy
parents: 1878
diff changeset
    86
1884
80ca22fbd97c ThemeCfg: Update anchors: matching against objects
Wuzzy
parents: 1883
diff changeset
    87
For an object with anchors to be placed, at least one of the anchors has to “match” in order for the object to be placed. Anchors can “match” in regular land and other land objects. This is different from normal land objects, which can only be buried inside land.
1883
5e5b098885ca ThemeCfg: More anchor explanation
Wuzzy
parents: 1882
diff changeset
    88
5e5b098885ca ThemeCfg: More anchor explanation
Wuzzy
parents: 1882
diff changeset
    89
This key needs an object file name, an anchor count and a rectangle for each anchor. This key needs to be defined after the object definition.
1879
686923e40b80 ThemeCfg: Add anchors help (stub)
Wuzzy
parents: 1878
diff changeset
    90
1881
fd18a4f39905 ThemeCfg: Fix typo
Wuzzy
parents: 1880
diff changeset
    91
<code>Values: object_filename, anchor_count, anchor_rect1, anchor_rect2, ...</code>
1879
686923e40b80 ThemeCfg: Add anchors help (stub)
Wuzzy
parents: 1878
diff changeset
    92
686923e40b80 ThemeCfg: Add anchors help (stub)
Wuzzy
parents: 1878
diff changeset
    93
 * `object_filename`: File name of the object to which this overlay applies
1881
fd18a4f39905 ThemeCfg: Fix typo
Wuzzy
parents: 1880
diff changeset
    94
 * `anchor_count`: Number of anchor for this object
1879
686923e40b80 ThemeCfg: Add anchors help (stub)
Wuzzy
parents: 1878
diff changeset
    95
 * `anchor_rect1`, etc.: A rectangle defining the anchor (`left, top, width, height`)
686923e40b80 ThemeCfg: Add anchors help (stub)
Wuzzy
parents: 1878
diff changeset
    96
1878
e19e8b5cbf5a ThemeCfg: Edited via web interface
Wuzzy
parents: 1877
diff changeset
    97
== Land decoration keys ==
e19e8b5cbf5a ThemeCfg: Edited via web interface
Wuzzy
parents: 1877
diff changeset
    98
Land decorations alter the appearance of the main terrain without adding any terrain. They are purely decorational.
1877
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
    99
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   100
=== `border` ===
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   101
The colour of the outline of explosions.
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   102
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   103
<code>Values: red, green, blue</code>
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   104
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   105
<code>Default: $50, $50, $50</code>
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   106
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   107
=== `spray` ===
1877
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   108
A spray is an image that is simply drawn on top of the land.
0f4635ed8797 ThemeCfg: restructure land objects
Wuzzy
parents: 1876
diff changeset
   109
83
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
   110
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
   111
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
b9fe713d7c27 Created wiki page through web user interface.
henrik.rostedt
parents:
diff changeset
   112
464
9a18697ec4ad Add flatten-clouds and flatten-flakes
almikes@aol.com
parents: 463
diff changeset
   113
<code>Values: name, number</code>
9a18697ec4ad Add flatten-clouds and flatten-flakes
almikes@aol.com
parents: 463
diff changeset
   114
1315
7368027d526f ThemeCfg: upd headers
Wuzzy
parents: 1314
diff changeset
   115
== Water keys ==
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   116
=== `water-top` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   117
The colour of the topmost part of the water (under the `BlueWater.png`) before Sudden Death.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   118
This makes a gradient together with `water-bottom`. The default color is blue and matches the default `BlueColor.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   119
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   120
<code>Values: red, green, blue</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   121
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   122
<code>Default: $54, $5C, $9D</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   123
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   124
=== `water-bottom` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   125
The colour of the lowest part of the water before Sudden Death.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   126
This makes a gradient together with `water-top`. The default color is blue and matches the default `BlueColor.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   127
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   128
<code>Values: red, green, blue</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   129
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   130
<code>Default: $34, $3C, $7D</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   131
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   132
=== `sd-water-bottom` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   133
The colour of the lowest part of the water while in Sudden Death.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   134
This makes a gradient together with `sd-water-top`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   135
The default color neatly matches the default `SDWater.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   136
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   137
<code>Values: red, green, blue</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   138
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   139
<code>Default: $96, $70, $A9</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   140
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   141
=== `sd-water-top` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   142
The colour of the topmost part of the water (under the `SDWater.png`) while in Sudden Death.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   143
This makes a gradient together with `sd-water-bottom`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   144
The default color neatly matches the default `SDWater.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   145
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   146
<code>Values: red, green, blue</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   147
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   148
<code>Default: $B9, $72, $C9</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   149
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   150
=== `water-opacity` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   151
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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   152
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   153
In combination with the default `BlueWater.png`, the recommended value for this is `$80`, which also is the default.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   154
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   155
<code>Values: opacity</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   156
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   157
<code>Default: $80</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   158
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   159
=== `sd-water-opacity` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   160
The water opacity while in Sudden Death. Syntax and default value is equivalent to `water-opacity`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   161
1317
3e33196a7312 ThemeCfg: remove version numbers from headers
Wuzzy
parents: 1316
diff changeset
   162
=== `water-animation` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   163
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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   164
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   165
<code>Values: frames, frame ticks, movement speed</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   166
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   167
 * `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`
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   168
 * `frame ticks`: Duration of a single frame. Must be >0 if `frames`>1, otherwise it is ignored
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   169
 * `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
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   170
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   171
<code>Default: 1, 0, 1</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   172
1317
3e33196a7312 ThemeCfg: remove version numbers from headers
Wuzzy
parents: 1316
diff changeset
   173
=== `sd-water-animation` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   174
Sudden Death equivalent of `water-animation`, uses `SDWater.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   175
1315
7368027d526f ThemeCfg: upd headers
Wuzzy
parents: 1314
diff changeset
   176
== Background keys ==
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   177
=== `sky` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   178
The colour of the sky.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   179
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   180
<code>Values: red, green, blue</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   181
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   182
<code>Default: $00, $00, $00</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   183
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   184
=== `rq-sky` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   185
The sky color in reduced quality mode. If present, it is used instead of `sky` on low quality.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   186
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   187
<code>Values: red, green, blue</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   188
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   189
=== `sd-tint` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   190
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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   191
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   192
<code>Values: red, green, blue, opacity</code>
464
9a18697ec4ad Add flatten-clouds and flatten-flakes
almikes@aol.com
parents: 463
diff changeset
   193
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   194
<code>Default: $80, $80, $80, $FF</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   195
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   196
=== `clouds` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   197
The number of clouds to create, before Sudden Death. Uses `Clouds.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   198
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   199
<code>Values: number</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   200
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   201
<code>Default: 9</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   202
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   203
=== `sd-clouds` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   204
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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   205
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   206
<code>Values: number</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   207
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   208
<code>Default: 9</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   209
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   210
=== `flatten-clouds` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   211
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).
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   212
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   213
=== `flakes` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   214
Values for the flakes of this theme before Sudden Death. Uses `Flake.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   215
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   216
 * `number`: Number of visible flakes.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   217
 * `frames`: Number of frames used in `Flake.png`
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   218
 * `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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   219
 * `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
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   220
 * `vertical speed`: Vertical speed of the flakes. A positive value makes the flakes fall, while a negative value makes them rise
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   221
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   222
<code>Values: number, frames, frame ticks, rotation speed, vertical speed</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   223
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   224
No flakes are used by default.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   225
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   226
=== `sd-flakes` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   227
Sudden Death version of `flakes`, the parameters are the same as in `flakes`. This uses `SDFlake.png`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   228
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   229
<code>Values: number, frames, frame ticks, rotation speed, vertical speed</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   230
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   231
If `sd-flakes` is unspecified, skulls and bones are used as images and the following default values are used:
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   232
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   233
<code>Default: X, 4, 0, 15, 250</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   234
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   235
(The “X” means the default number of Sudden Death flakes is variable. It depends on the window size and the terrain width.)
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   236
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   237
=== `flatten-flakes` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   238
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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   239
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   240
1315
7368027d526f ThemeCfg: upd headers
Wuzzy
parents: 1314
diff changeset
   241
== Music keys ==
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   242
=== `music` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   243
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!
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   244
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   245
If you choose a custom music (i.e. a music which does not come with Hedgewars by default), you should also set `fallback-music`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   246
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   247
<code>Values: filename</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   248
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   249
No music is played by default.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   250
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   251
Example:
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   252
<code>music = Nature.ogg</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   253
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   254
=== `sd-music` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   255
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!
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   256
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   257
If you choose a custom music, you should also set `fallback-sd-music`.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   258
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   259
<code>Values: filename</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   260
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   261
Default: `sdmusic.ogg` (only if `music` was specified, no music otherwise)
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   262
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   263
=== `fallback-music` ===
1308
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   264
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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   265
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.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   266
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   267
Note that if Hedgewars fails to find a music, it defaults to silence.
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   268
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   269
Example usage (in combination with `music`):
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   270
<code>music = My_Custom_Music.ogg
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   271
fallback-music = Nature.ogg</code>
c92c204db09f ThemeCfg: add a new header layer
Wuzzy
parents: 1307
diff changeset
   272
1314
fa3ef0be3f4e ThemeCfg: flatten headers
Wuzzy
parents: 1313
diff changeset
   273
=== `fallback-sd-music` ===
1870
6679e0e8a7b4 ThemeCfg: Add more text to fallback-sd-music
Wuzzy
parents: 1318
diff changeset
   274
Like `fallback-music`, except it's for `sd-music`. If you have set a custom `sd-music`, you should also set `fallback-sd-music`, otherwise there will be silence if the track in `sd-music` is missing.
1871
7fd3c3635755 ThemeCfg: Mention sdmusic.ogg
Wuzzy
parents: 1870
diff changeset
   275
2077
514babfbad9e Remove outdated legacy hints as clutter
Wuzzy <almikes@aol.com>
parents: 1889
diff changeset
   276
In version 1.0.0, this will default to `sdmusic.ogg` instead of silence.