Creating new game types is incredibly simple for Killbots, especially when starting from an existing ruleset file. Rulesets are stored as a single desktop file where the parameters and metadata are stored as simple key-value pairs.
Example 4.2. The Default Killbots Game Type
[KillbotsRuleset] Name=Killbots Name[gl]=Robots asasinos Author=Parker Coates AuthorContact=parker.coates@kdemail.net Description=<qt><p>The default Killbots game type.</p><p>Includes a medium size grid, safe teleports, fast enemies and pushable junkheaps.</p></qt> Description[gl]=<qt><p>O xogo tipo Killbots por omisión.</p><p>Inclúe unha grella mediana, teleportacións seguras, enemigos rápidos e chatarra que se pode empurrar.</p></qt> Rows=16 Columns=16 EnemiesAtGameStart=8.0 EnemiesAddedEachRound=4.0 FastEnemiesAtGameStart=-2.0 FastEnemiesAddedEachRound=2.0 EnergyEnabled=true EnergyAtGameStart=0 EnergyAddedEachRound=0 MaxEnergyAtGameStart=12.0 MaxEnergyAddedEachRound=0.0 SafeTeleportEnabled=true CostOfSafeTeleport=1 VaporizerEnabled=false CostOfVaporizer=0 PushableJunkheaps=Many SquaskKillsEnabled=true JunkheapsAtGameStart=0.0 JunkheapsAddedEachRound=0.0 PointsPerEnemyKilled=5 PointsPerFastEnemyKilled=10 WaitKillPointBonus=0 WaitKillEnergyBonus=1 SquashKillPointBonus=0 SquashKillEnergyBonus=1
Note that all text parameters should be entered in American English. As seen in the example above, translations can be added to the desktop file by repeating the key and appending the language code between square brackets. Also note that rich text can be given to the Description
field by wrapping the value in <qt> tags.
A ruleset file should contain all of the following parameters.
Name
The name of the ruleset as it will appear in the ruleset selector and the high score dialog.
Author
The creator of the ruleset.
AuthorContact
The contact information of the creator. This is usually an email address.
Description
A description of the ruleset. This should give a decent overview of the game type, but it doesn't need to list the value of each parameter as this information can been seen in the Details dialog.
Rows
The number of rows in the game grid.
Columns
The number of columns in the game grid.
EnemiesAtGameStart
The number of regular enemies added to the grid at the start of the first round.
EnemiesAddedEachRound
The number of additional regular enemies added to the grid at the start of each round.
FastEnemiesAtGameStart
The number of fast enemies added to the grid at the start of the first round.
FastEnemiesAddedEachRound
The number of additional fast enemies added to the grid at the start of each round.
EnergyEnabled
If set to “
false
” the hero will be enable to earn or spend energy.EnergyAtGameStart
The amount of energy awarded to the hero at the start of the first round.
EnergyAddedEachRound
The amount of energy awarded to the hero at the start of each round.
MaxEnergyAtGameStart
The maximum energy capacity of the hero at the start of the first round.
MaxEnergyAddedEachRound
The change in maximum energy capacity at the start of each round.
SafeTeleportEnabled
If set to “
false
” the safe teleport action will be disabled.CostOfSafeTeleport
The amount of energy consumed by teleporting safely.
VaporizerEnabled
If set to “
false
” the vaporizer action will be disabled.CostOfVaporizer
The amount of energy consumed by using the vaporizer.
PushableJunkheaps
The number of junkheaps that can be moved with a single push. Possible values are “
None
”, “One
” and “Many
”.SquaskKillsEnabled
If true, the hero can squash enemies by pushing junkheaps onto them.
JunkheapsAtGameStart
The number of junkheaps placed on the grid at the start of the first round.
JunkheapsAddedEachRound
The number of additional junkheaps placed on the grid at the start of each round.
PointsPerEnemyKilled
The number of points awarded for destroying a regular enemy.
PointsPerFastEnemyKilled
The number of points awarded for destroying a fast enemy.
WaitKillPointBonus
The number of bonus points awarded for destroying an enemy while waiting out the round.
WaitKillEnergyBonus
The number of bonus energy units awarded for destroying an enemy while waiting out the round.
SquashKillPointBonus
The number of bonus points awarded for squashing an enemy with a junkheap.
SquashKillEnergyBonus
The number of bonus energy units awarded for squashing an enemy with a junkheap.
In order for Killbots to detect and use a new game type, the ruleset file must be moved to an appropriate directory. To install the game type for only the current user, copy the file to killbots/rulesets
in the local folder in qtpaths
. To make the game type available system wide, move the file to --paths GenericDataLocation
killbots/rulesets
in the system folder (from the previous command, possibly /usr/share
or similar). Note that this will likely require administrative privileges.