Slot System 2
Following discussion on IRC and piratepad, this is a detailed description for another revision of the slot system.
Slots are currently subdivided into weapons, structure and utility types. We're going to add one more type to this, the "core" type. Each ship has exactly three core slots, and each core slot must at all times contain one outfit. The three core slots are:
- Engine core: this core slot contains the engine. The engine governs maximum speed, thrust, turn rate and energy generation.
- System core: this core slot contains the ship's main system. Energy generation, shield generation, base CPU and base ewarfare hide level are affected by this.
- Hull core: This core slot contains the ship's outer hull (paradoxically). It can be considered a collection of refits and modifications to the ship's own hull. Base armour strength, damage absorption, stealth factor, cargo space and the maximum number of weapon mounts are determined here.
A ship's base stats
The ship's base stats are determined as follows:
- Mass is the sum of the ship's own mass and the mass of its installed core outfits, as before.
- CPU is fully determined by the system core module.
- Shield strength is determined by the ship's own shield strength, modulated by the system core module.
- Shield regeneration is determined by the ship's own shield strength, modulated by the system core module.
- Turn rate is determined by the engine core module and the total ship mass.
- Thrust is determined by the engine core module and the total ship mass.
- Maximum speed is determined by the engine core module and the total ship mass.
- Fuel reserve is fully determined by the engine core module.
- Stealth factor is determined by the system core module and the total ship mass.
- Energy generation is determined by the system core module and the engine core module. Both generate power.
- Energy capacity is fully determined by the system core module.
- Armour is determined by the ship's own value, plus the hull core module.
- Damage absorption is determined by the ship's own value, plus the hull core module.
- Cargo space is determined by the ship's own value, plus the hull core module.
- The number of available weapon slots is determined by the ship's own weapon slots, but the hull core module may lock some of them. Heavier slots should always be locked first.
The core slots
As stated, each ship has exactly three core slots. Like all other slots, the core slots come in three flavors: small, medium and large. They are defined just like other slots, and have no special properties other than their type. The core slots should have a fixed location on the outfit screen (since they never vary), and can be ignored for weapon/outfit groups.
The slots will be implemented using slot properties. Specifically exclusive required slots this means we need two additional properties per slot:
- Exclusive slot property (makes it so you can't equip generic outfits)
- Required slot (makes it so you need it to fly the ship)
We also need to be able to specify default outfits as all ships will need these required slots to be able to fly. The syntax will be the following:
<utility prop="systems" exclusive="1" required="1">Default Systems Outfit</utility>
Where we can see prop="systems" indicates this is a systems outfit, exclusive="1" indicates that no other outfit types may be installed in this slot, required="1" indicates this outfit is required for the ship to work and Default Systems Outfit is the default outfit to be given to ships. We can see this falls into a utility slot category.
Outfits will need to have the matching property to be mounted. This would mean they would need something like:
Where the property="systems" indicates that the outfit can go into slots with the "systems" property.
The Llama's inherent ship stats:
<?xml version="1.0" encoding="UTF-8"?> <ship name="Llama"> <base_type>Llama</base_type> <GFX>llama</GFX> <GUI>slim</GUI> <sound>engine</sound> <class>Yacht</class> <price>120000</price> <fabricator>Melendez Corp.</fabricator> <description>One of the most widely used ships in the galaxy. Renowned for its stability and stubbornness. The design hasn't been modified much since its creation many many years ago. It was one of the first civilian use spacecrafts, first used by aristocracy and now used by everyone who cannot afford better.</description> <characteristics> <crew>2</crew> <mass>40</mass> <fuel>0</fuel> <cargo>15</cargo> </characteristics> <health> <absorb>0</absorb> <armour>20</armour> <armour_regen>0</armour_regen> </health> <slots> <weapon size="small" x="7" y="0" h="1"/> <weapon size="small" x="-3" y="0" h="2"/> <utility size="small" prop="systems" exclusive="1" required="1">Basic Small Systems</utility> <utility size="small"/> <utility size="small"/> <structure size="small" prop="engines" exclusive="1" required="1">Manufacturer Small Engine</structure> <structure size="small" prop="hull" exclusive="1" required="1">Unmodified Small Hull</structure> <structure size="small"/> <structure size="small"/> </slots> <stats> <speed_mod>-20</speed_mod> <cpu_mod>-20</cpu_mod> <turn_mod>-20</turn_mod> <thrust_mod>-20</thrust_mod> <armour_mod>-20</armour_mod> <shield_mod>-20</shield_mod> <cpu_mod>-20</cpu_mod> <cargo_mod>10</cargo_mod> <ew_detect>0</ew_detect> <ew_hide>-20</ew_hide> </stats> </ship>
Standard issue engine module:
<engine> <thrust>180</thrust> <turn>150</turn> <speed>200</speed> <fuel>400</fuel> <energy_regen>8.0</energy_regen> </engine>
Standard issue system module:
<system> <cpu>18</cpu> <energy_regen>8.7</energy_regen> <shield_mod>1.0</shield_mod> <shield_regen_mod>1.0</shield_regen_mod> </system>
Standard issue hull module:
<hull> <cargo_mod>1.0</cargo_mod> <weapon_slots>-1</weapon_slots> <armour_mod>1.0</armour_mod> <hide_mod>1.5</hide_mod> <absorption>0</absorption> <hull>