#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` or `Data/Graphics/SuddenDeath` of your Hedgewars installation.
To create a theme, you need a bunch of graphics and a `theme.cfg` (explained under [ThemeCfg]). 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. Start at [Themes].
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.
== Mandatory files ==
Only a very few files are mandatory, almost everything has a default image. Of course, using defaults only does not make a good theme, so you should add enough images for your theme until you got a decent theme.
All themes need at least `theme.cfg`.
`icon.png` or `icon@2x.png` are required for the theme to show up in the list of selectable themes in Hedgewars.
Full themes, that is, themes which can be used on random maps or hand-drawn maps, also require `LandTex.png` and `Border.png`.
But those files are not required if you only want to use a theme in combination with an [PresetMaps image map] or in fort mode, but not for random maps or hand-drawn maps.
== Basic files ==
=== `icon.png` and `icon@2x.png` ===
A preview icon for the theme. It is used in the frontend. This is not mandatory for the theme to work. But if the icon is missing, the theme will be automatically hidden from the theme selection dialog. 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 65×64 pixels.
=== `theme.cfg` ===
A text file which configures various aspects of the theme. The structure of this file is explained in [ThemeCfg].
== 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.
This file is mandatory for full themes but not for themes only to be used as background for maps.
=== `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. By default, no terrain background is used.
=== `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.
This file is mandatory for full themes but not for themes only to be used as background for maps.
=== `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 is optional. If missing, no chunks are used.
=== `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 “`