#summary File structure of themes
= File structure of themes =
== Introduction ==
This page explains the meaning of the several files which are used by themes. Please note that not all files are neccessary to create a theme, many files have default fallback versions with identical names in `Data/Graphics` of your Hedgewars installation.
To create a theme, you need a bunch of graphics and a `theme.cfg` (explained under [Theme]). All graphics mentioned here have to in the PNG format.
Please note that this is not a tutorial, it is a reference page designed to look up how to do stuff.
Careful! All file names are case-sensitive on case-sensitive platforms! Please ensure you used the correct casing if you want to share your theme online.
== Basic files ==
=== `icon.png` and `icon@2x.png` ===
A preview icon for the theme. It is used in the frontend. The presence of this file also determines wheather the theme is visible in Hedgewars for selection. The theme will only be visible if this file is present. The icon comes in two sizes.
==== `icon.png` ====
Small version of the icon. It must be of size 33×32 pixels.
==== `icon@2x.png` ====
Large version of the icon. It must be of size 59×54 pixels.
=== `theme.cfg` ===
A text file which configures various aspects of the theme. The structure of this file is explained in [Theme].
== Terrain ==
=== `LandTex.png` ===
This is the basic land texture for the main terrain. It is an image tile which will be simple repeated horizontally and vertically all over the landscape. Theoretically, there are no size constraints.
Ideally, you would want to make sure this texture tiles well and is seamless in both axes.
=== `LandBackTex.png` ===
This is similar to `LandTex.png`, but this image is for the terrain background. This texture becomes visible when a piece of landscape has been destroyed.
=== `Border.png` ===
Border of the landscape. 128×32 pixels in size. This is used to “paint over” the borders of the landscape. This image consists of two parts: the upper half is used for the floor, the lower half for the ceiling.
=== `Girder.png` ===
An optional image for the landscape girders, large horizontal constructions which are added to the landscape when it is enabled in the game scheme.
This image will be repeated horizontally, so for a better theme quality, make sure this image has no seams horizontally.
If unspecified, `Data/Graphics/Girder.png` is used.
=== `Chunk.png` ===
A sprite sheet of 4 images for “chunks”. These images appear and “fall off” when some piece of landscape has been blown away. The image has a size of 64×64 and the images are in a raster of 2×2 images.
This image has a default.
=== `Dust.png` ===
A dust particle animation which appear when something hits the ground hard. This is a sprite sheet with a size of 22×176 pixels, each image has a size of 22×22 pixels. The topmost image shows the start of the animation, the lowest image the end of the animation.
By default this is `Data/Graphics/Dust.png`.
=== Objects ===
Objects are single images of any size, they will be “attached” to the landscape and so become part of the landscape themselves. The name has to follow the following rules:
* It must have the suffix “`.png`”
* It must not end with “`_mask.png`”
* It must not be equal with any other file name mentioned on this page
Objects have to be configured in `theme.cfg`.
=== Object masks ===
Object masks are images which are applied to objects. They determine the terrain type of the pixels of an object. The image has to be of the same dimensions of the object in question. The masks work like `mask.png` of image maps, see [PresetMaps#mask.png].
The name of an object mask file has to follow the pattern “`