Not logged in

Creating your own themes

CreepTD enables developers to create their very own custom theme sets for the game. This page will cover all neccessary information you need to get started with custom theme development.

1. Theme structure

Basically a theme is a set of graphics and/or sounds with their behaviour defined in a 'theme.ini'. What you need to do is to create all the graphics and sounds you want to include in your theme and specify how these are meant to behave inside the game.

To make your theme work inside the game you will then need to package all required files into a single ZIP archive. You can also start off with one of the example themes. The ZIP archive must contain a 'theme.ini' file in its root. Example:

your-theme-archive.zip
˫ theme.ini
˫ towers/
  ˪ ...
˫ creeps/
  ˪ ...
˪ sounds/
  ˪ ...

2. Graphics and animations

The game uses a custom format on top of PNG24 to store animated sequences but it's entirely optional to use this. Plain images without animations will work, too (but animations really look better!). To make this possible every graphics may contain a sequence of frames aligned horizontally. Every frame needs to be exactly the same size. On the bottom left of each frame there is a frame descriptor pixel that contains the display length (0-255) in its blue color value. An example:

Example

As you can see the animation is put together of 19x19 px frames plus one line below that contains the descriptor pixels. Let's go through this frame by frame:

1Blue color value in the descriptor pixel is 0. This is a stop frame.
2Blue color value in the descriptor pixel is 6. This frame will show for 6 ticks.
3Blue color value in the descriptor pixel is 6. This frame will show for 6 ticks.
4Blue color value in the descriptor pixel is 35. This frame will show for 35 ticks.
5Blue color value in the descriptor pixel is 6. This frame will show for 6 ticks.
6Blue color value in the descriptor pixel is 6. This frame will show for 6 ticks.

More precisely: The second frame will start to play when the tower shots (and then reloads). When frame 6 is reached, the animation will continue with frame 1 and stop.

However, it is not required to create an animation as I already mentioned. You can simply use a plain image without any animation that simply does not contain the additional frame descriptor line.

Hint: Most image editing programs (Photoshop for example) 'optimize' images when saving them. This will usually result in every frame descriptor pixel to have a color value of 000000 (that's bad), so make sure to deactivate optimizations when saving the file.

3. Sounds

Sound effect files need to be in WAV format (OGG and MP3 are still experimental and seem under some circumstances not to play the whole sound) and require to be cut accordingly to be played without a delay.

Example

So if you want to do this right, cut away all the silence before the first noise so that the sound's waveform looks similar to the image above.

Hint: Use WAV files with 22050 kbit (if this sounds too bad 44100 kbit), 16 bit, mono (1 channel) to make the theme small. It's also always a good idea to keep sound files as short as possible because only a couple of sounds can be played simultaneously. So the shorter the sound, the more sound effects can be played at the same time.

4. The theme.ini

The theme.ini specifies what exact graphics are used for which tower or creep and allows you to specify lots of options for every single entity. The first few lines always define your theme's name, you as its author and what customisations it actually provides. Example:

name=My Cool Theme
author=MyPlayerName
providesTowers=yes
providesTowerSounds=yes
providesCreeps=yes
providesCreepSounds=yes

Optionally, a custom theme may extend one of the default themes (default or classicplus) as a starting point. However, it will only extend the theme.ini (effects, file names) and has no access to the actual contents of the extended theme (like images or sounds). You need to add those to your custom theme also, if you want to re-use them. Example:

extends=default

Afterwards the theme.ini contains the specifications of towers and creeps accoriding to the customisations it provides.


4.1 Tower specifications

Each tower is described by a tower specification section and you need to define a set of settings for each one. The start of a section is always indicated by its name in brackets like this: [TOWER1]. Towers available:

TOWER1Gun TurretLevel 1
TOWER11Gun TurretLevel 2
TOWER12Gun TurretLevel 3
TOWER13Gun TurretLevel 4
TOWER2EMP EmitterLevel 1
TOWER21EMP EmitterLevel 2
TOWER22EMP EmitterLevel 3
TOWER23EMP EmitterLevel 4
TOWER3Cannon TowerLevel 1
TOWER31Cannon TowerLevel 2
TOWER32Cannon TowerLevel 3
TOWER33Cannon TowerLevel 4
TOWER4Missile SiloLevel 1
TOWER41Missile SiloLevel 2
TOWER42Missile SiloLevel 3
TOWER43Missile SiloLevel 4
TOWER5Tesla TowerLevel 1
TOWER51Tesla TowerLevel 2
TOWER52Tesla TowerLevel 3
TOWER53Tesla TowerLevel 4
TOWER6Ion CannonLevel 1
TOWER61Ion CannonLevel 2

For every tower you have to define a set of parameters (some of them are optional) on how the tower is supposed to behave and what content to use for this. Parameters are defined like this: name=Cool Tower Name. Available parameters are:

If graphics are provided:
nameThe tower's textual name (yes, you can change that)
rotationThe tower's turret rotation (see)
shotThe tower's shot type (see)Not available for TOWER4*
shotInnerStrokeInner stroke of the shot beam (see)Optional, Not available for TOWER4*
shotInnerColorInner color of the shot beam (see)Optional, Not available for TOWER4*
shotOuterStrokeOuter stroke of the shot beam (see)Optional, Not available for TOWER4*
shotOuterColorOuter color of the shot beam (see)Optional, Not available for TOWER4*
splashInnerStrokeInner stroke of the splash arc (see)Optional, Only available for towers with splash damage
splashInnerColorInner color of the splash arc (see)Optional, Only available for towers with splash damage
splashOuterStrokeOuter stroke of the splash arc (see)Optional, Only available for towers with splash damage
splashOuterColorOuter color of the splash arc (see)Optional, Only available for towers with splash damage
targetInnerStrokeInner stroke of the targeting beam (see)Optional, Only available for shot=ORBIT
targetInnerColorInner color of the targeting beam (see)Optional, Only available for shot=ORBIT
targetOuterStrokeOuter stroke of the targeting beam (see)Optional, Only available for shot=ORBIT
targetOuterColorOuter color of the targeting beam (see)Optional, Only available for shot=ORBIT
aniTower graphics / animation (19x19px frames) (see)
turretAniTower turret graphics / animation (19x19px frames) (see)Optional
projectileAniTower projectile graphics / animation (7x7px frames) (see)Optional, Only available for TOWER4*
buildAniTower building animation (overlay, 19x19px frames, 50 ticks) (see)Optional
upgradeAniTower upgrading animation (overlay, 19x19px frames, 50 ticks) (see)Optional, Only available if upgradeable
changestrategyAniTower changing strategy animation (overlay, 19x19px frames, 50 ticks) (see)Optional
sellAniTower selling animation (overlay, 19x19px frames, 50 ticks) (see)Optional
If sounds are provided:
soundTower shoting sound (battlefield) (see)
projectileSoundProjectile hit sound (battlefield) (see)Optional, Only available for TOWER4*
buildSoundTower starts building sound (see)Optional
upgradeSoundTower starts upgrading sound (see)Optional, Only available if upgradeable
changestrategySoundTower starts changing strategy sound (see)Optional
sellSoundTower starts selling sound (see)Optional

If you leave an optional parameter empty, it will show, draw or play nothing.

If an animation's tick length is given, the animation can be composed of this number of frames (e.g. a fancy building animation that gets more complete over time). An 'ani' animation always begins with a stop frame showing the idle tower and can contain an additional number of frames that matches the tower's cooldown time (see the Missile Silo example above).


4.2 Creep specifications

Like towers, also creeps are descripted by a creep specification section and you need to define a set of settings for each one. The start of a section is always indicated by its name in brackets like this: [CREEP1]. Creeps available:

CREEP1Mercury
CREEP2Mako
CREEP3Fast Nova
CREEP4Large Manta
CREEP5Demeter
CREEP6Ray
CREEP7Speedy Raider
CREEP8Big Toucan
CREEP9Vulture
CREEP10Shark
CREEP11Racing Mamba
CREEP12Huge Titan
CREEP13Zeus
CREEP14Phoenix
CREEP15Express Raptor
CREEP16Mothership

For every creep you have to define a set of parameters (some of them are optional) on how the creep is supposed to behave and what content to use for this. Parameters are defined like this: name=Cool Creep Name. Available parameters are:

If graphics are provided:
nameThe creeps's textual name (yes, you can change that also)
rotationThe creep's rotation (see)
aniCreep graphics / animation (19x19px frames) (see)
dieAniCreep die animation (19x19px frames) (see)Optional
effectBuilt-in creep effect to use (see)Optional
If sounds are provided:
dieSoundCreep dies sound (battlefield) (see)Optional
incomingSoundCreep incoming sound (see)Optional
escapeSoundCreep escaped sound (see)Optional

If you leave an optional parameter empty, it will show, draw or play nothing.


4.3 Rotation values

AUTOThe tower's turret automatically aims at creeps / the creep automatically rotates according to the path
float valueIndependent rotation between -PI (anti-clockwise) and +PI (clockwise) per tick (50ms). For a random direction append "R".

4.4 Color values

RGBHexadecimal red/green/blue values in short notation (0-F)
RRGGBBHexadecimal red/green/blue values (00-FF)
RGBAHexadecimal red/green/blue/alpha values in short notation (0-F)
RRGGBBAAHexadecimal red/green/blue/alpha values (00-FF)

4.5 Stroke values

solid[:thickness]A solid strokesolid:1
dashed[:thickness[:dashlength[:spacelength]]A dashed strokedashed:1:10:10
zigzac[:thickness[:amplitude[:wavelength]]]A zigzag stokezigzag:1:1:3
wobble[:thickness[:amplitude[:detail]]]A wobble stokewobble:1:3:1

4.6 Tower shot types

DIRECTThe tower shots on creeps with a direct beam
ORBITThe tower shots on creeps via the orbit (like the Ion Cannon)

4.7 Creep effect values

REGENERATEThe creep's healthbar will fade in and out
SLOWIMMUNEThere will be a shield effect around the creep

Of course you do not need to use the built-in effects and are free to include custom effects inside of the creep's graphics instead.

5. Testing your theme

To test your theme select "Install new theme" from the theme select boxes at the options screen. Now just start a Sandbox game and try if everything is working out like intended. Once everything is working out well, go ahead and distribute your theme.

Hint: A good place to distribute your theme might be to post it to the forums for everyone.

Enjoy!

5. Example themes

You are free to start off your custom theme development from the default themes provided below. However, all contents of the default themes must only be used to create other content for CreepTD. It's not allowed to take the contents for something else.