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.
Namethe name of the ruleset as it will appear in the ruleset selector and the high score dialog.
AuthorThe creator of the ruleset
AuthorContactThe contact information of the creator. This is usually an email address.
DescriptionA 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.
RowsThe number of rows in the game grid.
ColumnsThe number of columns in the game grid.
EnemiesAtGameStartThe number of regular enemies added to the grid at the start of the first round.
EnemiesAddedEachRoundThe number of additional regular enemies added to the grid at the start of each round.
FastEnemiesAtGameStartThe number of fast enemies added to the grid at the start of the first round.
FastEnemiesAddedEachRoundThe number of additional fast enemies added to the grid at the start of each round.
EnergyEnabledIf set to “
false” the hero will be enable to earn or spend energy.EnergyAtGameStartThe amount of energy awarded to the hero at the start of the first round.
EnergyAddedEachRoundThe amount of energy awarded to the hero at the start of each round.
MaxEnergyAtGameStartThe maximum energy capacity of the hero at the start of the first round.
MaxEnergyAddedEachRoundThe change in maximum energy capacity at the start of each round.
SafeTeleportEnabledIf set to “
false” the safe teleport action will be disabled.CostOfSafeTeleportThe amount of energy consumed by teleporting safely.
VaporizerEnabledIf set to “
false” the vaporizer action will be disabled.CostOfVaporizerThe amount of energy consumed by using the vaporizer.
PushableJunkheapsThe number of junkheaps that can be moved with a single push. Possible values are “
None”, “One” and “Many”SquaskKillsEnabledIf true, the hero can squash enemies by pushing junkheaps onto them.
JunkheapsAtGameStartThe number of junkheaps placed on the grid at the start of the first round.
JunkheapsAddedEachRoundThe number of additional junkheaps placed on the grid at the start of each round.
PointsPerEnemyKilledThe number of points awarded for destroying a regular enemy.
PointsPerFastEnemyKilledThe number of points awarded for destroying a fast enemy.
WaitKillPointBonusThe number of bonus points awarded for destroying an enemy while waiting out the round.
WaitKillEnergyBonusThe number of bonus energy units awarded for destroying an enemy while waiting out the round.
SquashKillPointBonusThe number of bonus points awarded for squashing an enemy with a junkheap.
SquashKillEnergyBonusThe 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 $. To make the game type available system wide, move the file to KDEHOME/share/apps/killbots/rulesets`kde-config --prefix`/share/apps/killbots/rulesets. Note that this will likely require administrative privileges.