Ship Mod Creation

To create a ship mod, you'll need to do the following things:

First, create an XML file with the ship description.
The file should be created inside my_custom_mod/ships/player folder. XML is a text markup format which the game can process. Name the file [shipname].xml. The basic ship XML looks like this:

0                    Red Rhino fighter  125 2 2 240 30 2000 1.045 8000</base_metal_cost> <metal_cost_multiplier>1.05</metal_cost_multiplier> <base_upgrade_cost>100</base_upgrade_cost> <upgrade_cost_multiplier>1.075</upgrade_cost_multiplier> 3                	 composite <base_dmg>8</base_dmg> ballistic <dmg_increase_per_level>1</dmg_increase_per_level> <dmg_per_25_levels_multiplier>3</dmg_per_25_levels_multiplier> <reload_time>6</reload_time> <speed_up_time>0.5</speed_up_time> <projectile_speed>750</projectile_speed> <x>10</x> <y>-2</y> <bullet_anim>2</bullet_anim> True <base_angle>45</base_angle> <projectile_rotation_speed>120</projectile_rotation_speed> <base_dmg>8</base_dmg> ballistic <dmg_increase_per_level>1</dmg_increase_per_level> <dmg_per_25_levels_multiplier>3</dmg_per_25_levels_multiplier> <reload_time>6</reload_time> <speed_up_time>0.5</speed_up_time> <projectile_speed>750</projectile_speed> <x>10</x> <y>-15</y> <bullet_anim>2</bullet_anim> True <base_angle>45</base_angle> <projectile_rotation_speed>120</projectile_rotation_speed> <base_dmg>8</base_dmg> ballistic <dmg_increase_per_level>1</dmg_increase_per_level> <dmg_per_25_levels_multiplier>3</dmg_per_25_levels_multiplier> <reload_time>6</reload_time> <speed_up_time>0.5</speed_up_time> <projectile_speed>750</projectile_speed> <x>-10</x> <y>-2</y> <bullet_anim>2</bullet_anim> True <base_angle>315</base_angle> <projectile_rotation_speed>120</projectile_rotation_speed> <base_dmg>8</base_dmg> ballistic <dmg_increase_per_level>1</dmg_increase_per_level> <dmg_per_25_levels_multiplier>3</dmg_per_25_levels_multiplier> <reload_time>6</reload_time> <speed_up_time>0.5</speed_up_time> <projectile_speed>750</projectile_speed> <x>-10</x> <y>-15</y> <bullet_anim>2</bullet_anim> True <base_angle>315</base_angle> <projectile_rotation_speed>120</projectile_rotation_speed> <ability type="speed_up" unlock_level="15" cooldown="10" percent="200" duration="2"> <ability type="self_mend" unlock_level="25" cooldown="12" percent="25" trigger-percent="30"> redrhino1.png redrhino2.png redrhino3.png redrhino4.png redrhino5.png

Basic Parameters
It looks much bigger than item mod, but don't be intimidated :) We'll go through ship parameters one by one:
 * hull - hull type identifier. For now: always leave as zero
 * name - ship name
 * type - ship type. used to determine AI behavior (and there's a chance it will happen later on again), so use battleship for bigger ships and fighter for smaller ships
 * bbox - bounding box. Somewhat tricky now. Additional parameters: x and y parameters indicate bounding box shift according to sprite center. Can be negative. So if your ship is perfectly centered on sprite - leave as zero. in case of red rhino: the ship itself is moved to the right (a bit) due to huge flames. Therefore the bounding box is located 18 pixels to the right of the center. w and h indicate bounding box width and height
 * base_hp - hp on first level
 * hp_increase_per_level - how much hp is increased on every level
 * hp_per_25_levels_multiplier - how much hp is multiplied every 25 levels. i.e. level 25 hp will be (base_hp + hp_increase_per_level * current_level) * hp_per_25_levels_multiplier
 * base_fuel_cost - ship fuel cost on first level
 * fuel_cost_multiplier - by how much does the fuel cost increases on every level (i.e. level 2 ship will be base_fuel_cost * fuel_cost_multiplier ^ 2)
 * base_metal_cost  - ship metal cost on first level
 * metal_cost_multiplier - by how much does the metal cost grows on every level (similar to fuel formula)
 * base_upgrade_cost  - how much exp does upgrade cost on the first level
 * upgrade_cost_multiplier - by how much does upgrade cost increases on every next level
 * crew - specimen cost of the ship
 * armor - armor type of the ship. can be composite, energy, kinetic, generic
 * sprites - list of ship sprites, each written under own tag sprite. Those are played one after another.

Ship Weapons
After that, there is the list of different weapons that ships have. Don't make more than 8 weapons. All weapons are located under tag. There are three weapon types at the moment.

1)
Normal projectile weapon. Example:

<base_dmg>10</base_dmg> heat <dmg_increase_per_level>0.5</dmg_increase_per_level> <dmg_per_25_levels_multiplier>4</dmg_per_25_levels_multiplier> <reload_time>1</reload_time> <spread_angle>4</spread_angle> <shot_interval>0.1</shot_interval> <clip_size>3</clip_size> <projectile_speed>1500</projectile_speed> <x>0</x> <y>14</y> <bullet_anim>1</bullet_anim> Parameters:
 * base_dmg - base weapon damage on level 0 ship
 * type - weapon type. determines the damage versus different weapon types. can be energy, proton, plasma, heat, ballistic, acidic, chaotic
 * dmg_increase_per_level - how much damage per level grows
 * dmg_per_25_levels_multiplier - by how much the damage is multiplied every 25 levels
 * reload_time - how quickly the weapon reloads
 * spread_angle - the angle at which bullets can fly from the weapon (bigger angle = less accuracy)
 * shot_interval - the time between shots
 * clip_size - how many bullets can weapon fire before it needs to reload
 * projectile_speed - how fast is the bullet. battlefield width = 1920, therefore projectile_speed of 1500 would mean that the bullet traverses ~3/4 of the screen per second
 * x, y - the location of weapons relative to the ship sprite (0,0) is the center
 * bullet_anim - from 0 to 7. determines how the bullet looks (see gallery below)

2)
A laser weapon that shoots continuous ray, heating and then damaging the enemy. Example:

<base_dmg>4</base_dmg> proton <dmg_increase_per_level>0.4</dmg_increase_per_level> <dmg_per_25_levels_multiplier>5</dmg_per_25_levels_multiplier> <fire_time>2</fire_time> <reload_time>1</reload_time> <x>42</x> <y>-22</y> 0 Parameters:
 * base_dmg - base weapon damage on level 0 ship
 * type - weapon type. determines the damage versus different weapon types. can be energy, proton, plasma, heat, ballistic, acidic, chaotic
 * dmg_increase_per_level - how much damage per level grows
 * dmg_per_25_levels_multiplier - by how much the damage is multiplied every 25 levels
 * reload_time - how quickly the weapon reloads
 * fire_time - how long is the laser beam firing before damaging the enemy
 * x, y - the location of weapons relative to the ship sprite (0,0) is the center
 * color - color of the laser. number from a preset list of colors [0-6]. default is 0

3)
Flying rocket weapon. Can be homing. Usually quite slow to turn. Example:

<base_dmg>10</base_dmg> ballistic <dmg_increase_per_level>2</dmg_increase_per_level> <dmg_per_25_levels_multiplier>4</dmg_per_25_levels_multiplier> <reload_time>6</reload_time> <speed_up_time>0.5</speed_up_time> <projectile_speed>750</projectile_speed> <x>15</x> <y>10</y> <bullet_anim>2</bullet_anim> True <base_angle>45</base_angle> <projectile_rotation_speed>120</projectile_rotation_speed>

Parameters:
 * base_dmg - base weapon damage on level 0 ship
 * type - weapon type. determines the damage versus different weapon types. can be energy, proton, plasma, heat, ballistic, acidic, chaotic
 * dmg_increase_per_level - how much damage per level grows
 * dmg_per_25_levels_multiplier - by how much the damage is multiplied every 25 levels
 * reload_time - how quickly the weapon reloads
 * projectile_speed - how fast is the bullet. battlefield width = 1920, therefore projectile_speed of 1500 would mean that the bullet traverses ~3/4 of the screen per second
 * speed_up_time - torpedos start at zero speed. This parameter sets how quickly the rocket speeds up from 0 to projectile_speed
 * homing- is torpedo homing or will it fly directly, disregarding enemy position change? can be true or false
 * base_angle - the base angle at which the weapon is fired (relative to current ship turn angle)
 * projectile_rotation_speed - how quick will homing torpedo turn (degrees / second)
 * x, y - the location of weapons relative to the ship sprite (0,0) is the center
 * bullet_anim - from 0 to 3. determines how the rocket looks (see gallery below)

==== ====

Ship Abilities
Each ship can have up to 2 abilities. Those are listed under tag. Each ability tag has the following parameters:


 * type - ability type, listed below
 * unlock_level - at which level will this ability become available
 * cooldown - ability cooldown (in seconds)

In addition to that, each ability has its own separate parameters

List of current abilities and their parameters:

2) Put the ship sprites into the sprites folder
For ships to be displayed in the game properly, you need to put their images into sprites folder of your mod folder. For the previous item, there would be five sprites, their paths:


 * my_sample_mod/sprites/redrhino1.png
 * my_sample_mod/sprites/redrhino2.png
 * my_sample_mod/sprites/redrhino3.png
 * my_sample_mod/sprites/redrhino4.png
 * my_sample_mod/sprites/redrhino5.png

The image should be in png format, any size you want. They should be facing right (zero degrees) The screen is 1920x1080, you can put any sprite according to the size that you want it to take on the screen.

Rhino is about 78x80 (For reference)

After that - you can go back to Modding Guide to verify/upload/enable your mod.

You can also download the sample ship mod here: red rhino sample mod