<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://starmadepedia.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jojomo</id>
	<title>StarMade Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://starmadepedia.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jojomo"/>
	<link rel="alternate" type="text/html" href="https://starmadepedia.net/wiki/Special:Contributions/Jojomo"/>
	<updated>2026-05-12T02:02:07Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.3</generator>
	<entry>
		<id>https://starmadepedia.net/index.php?title=Defense_Systems&amp;diff=5133</id>
		<title>Defense Systems</title>
		<link rel="alternate" type="text/html" href="https://starmadepedia.net/index.php?title=Defense_Systems&amp;diff=5133"/>
		<updated>2017-01-19T02:22:18Z</updated>

		<summary type="html">&lt;p&gt;Jojomo: /* Shield Rules */ Regen under fire percentage was wrong, also made the language of that sentence a little clearer - part 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
In [[StarMade]], players will often face a variety of threats to the safety of themselves and their entities (ships, stations, turrets or otherwise). Regardless of whether the attackers are players, NPCs, or both at once, the ways in which a player can ensure their survival are the same. This page details these mechanics by which a player can ensure the safety of their entities.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
Here is a brief breakdown of the various mechanics which are relevant to defense.&lt;br /&gt;
*'''Shields:''' A regenerating HP pool which absorbs all incoming damage until depleted. When depleted, they enter a brief &amp;quot;outage&amp;quot; phase (wherein they do not recharge) before beginning to regenerate again.&lt;br /&gt;
**'''Defensive Ion Effect:''' Decreases damage dealt to shields by up to 60% when active.&lt;br /&gt;
*'''Hit Points (HP):''' Every block has a set HP value, representing its own structural integrity. When the HP of a block is reduced to 0, it is destroyed.&lt;br /&gt;
*'''Armor:''' A flat percentage value granted to a range of blocks, which reduces damage dealt to that block by the stated percentage. Applied before AHP absorption.&lt;br /&gt;
*'''Armor HP (AHP):''' A non-regenerating HP pool which absorbs 50% (without defensive effects) of all damage dealt to any block which contributes to the AHP pool (in short, all tiers of hull and doors). Applied after armor reduction, and stacks multiplicatively with it.&lt;br /&gt;
**'''Defensive Piercing Effect:''' Increases the amount of damage absorbed by AHP to a maximum of 75% (from 50%) &lt;br /&gt;
**'''Defensive Punch-Through Effect:''' Reduces damage taken by AHP by up to 25%. Does not change amount of damage absorbed, but rather acts as an Armor value for the AHP pool itself.&lt;br /&gt;
*'''Structure HP (SHP):''' A non-regenerating HP pool which serves as a measure of an entity's integrity. As it decreases, various penalties are applied to the entity. When it is reduced to 50%, the entity will overheat: this ejects any pilot in its [[Ship Core]] and renders it inoperable. An overheating entity has a countdown, proportional to the entity's size, before it collapses, disappearing altogether. This countdown can be stopped, and the entity rendered operable again, by &amp;quot;rebooting&amp;quot; it.&lt;br /&gt;
*'''Turrets:''' Although not exclusively defensive in nature, AI-controlled turrets still play key roles in entity defense:&lt;br /&gt;
**Shooting down incoming missiles, neutralizing damage which would otherwise have to be mitigated by shields or armor.&lt;br /&gt;
**Allowing heavy, slow-turning ships to apply damage to smaller, more maneuverable vessels.&lt;br /&gt;
&lt;br /&gt;
==Shields==&lt;br /&gt;
&lt;br /&gt;
Shields are the first layer of an entity's defenses. A shield system relies on two blocks: the [[Shield Capacitor]] and the [[Shield-Recharger]]. The capacity of the shield is dependent on the number of Shield Capacitors, and its rate of regeneration is dependent on the number of Shield-Rechargers. While an entity has any shield remaining, it will not take block damage. Once the shield is depleted, it is rendered temporarily vulnerable. &lt;br /&gt;
&lt;br /&gt;
Once a ship's shields have reached 0 HP, they will stop recharging for 10 seconds. After this 10 seconds has elapsed, the shields will begin recharging once more. However, if the ship is still taking damage, it is likely that they will be rapidly depleted again, and another 10 second recovery time will begin, leaving the ship open to continued damage.&lt;br /&gt;
&lt;br /&gt;
Unlike most other ship systems, shield systems require no controller, nor do they have any placement rules which affect efficiency. This often serves to make them an ideal filler block, being used in small spaces where other blocks, which require efficient placement, would go to waste. The only design consideration is deciding what values of shield capacity and regeneration are desirable; bearing in mind the power demands the [[Shield-Recharger]]s will make on the ship's [[Power_Systems|power system]].&lt;br /&gt;
&lt;br /&gt;
The strength of a shield can be increased using the [[Ion Effect Computer|Ion Effect system]]: this will reduce damage taken by shields by up to 60%, effectively functioning as an Armor value for shields. This is explained in more detail in the [[#Defensive Effects|Defensive Effects]] section below.&lt;br /&gt;
&lt;br /&gt;
===Shield Rules===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''LEGEND'''&lt;br /&gt;
|-&lt;br /&gt;
| '''C''' || Shield Capacity&lt;br /&gt;
|-&lt;br /&gt;
| '''N&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt;''' || Number of Shield Capacitators&lt;br /&gt;
|-&lt;br /&gt;
| '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' || Number of Shield-Rechargers&lt;br /&gt;
|-&lt;br /&gt;
| '''R''' || Shield Regeneration per Second&lt;br /&gt;
|-&lt;br /&gt;
| '''S''' || Current amount of shields&lt;br /&gt;
|-&lt;br /&gt;
| '''P''' || Power Usage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The exact capacity, regeneration, and power consumption of a shield system can be calculated by using a few different formulas.&lt;br /&gt;
Any decimal results produced by these formulas should be rounded down to the nearest whole number. &lt;br /&gt;
&lt;br /&gt;
The shield capacity, '''C''', of a ship with '''N&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt;''' number of [[Shield Capacitor]]s, can be found by the formula:      &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''C''' = '''N&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt;'''&amp;lt;sup&amp;gt;0.9791797578&amp;lt;/sup&amp;gt; * '''110''' + '''220'''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The shield regeneration per second, '''R''', of a ship with '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' number of [[Shield-Recharger]]s, can be found by the formula:     &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''R''' = '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' * '''5.5'''&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon taking a hit, the shield regeneration per second drops to &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''R''' = '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' * '''5.5''' * '''0.25''' * ('''1''' - '''0.5''' * '''S''' / '''C''')&amp;lt;/tt&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
for one minute, where '''S''' is the current amount of remaining shields (effectively reducing the shield regeneration to 12.5% when shields are at max capacity,  increasing as shield levels drop, reaching 25% when your ship's shields are depleted)&lt;br /&gt;
&lt;br /&gt;
The power usage per second, '''P''', for a given number of [[Shield-Recharger]]s changes depending on whether or not the ship's shields are fully charged. &lt;br /&gt;
&lt;br /&gt;
If the shields are fully charged:  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''P''' = '''R''' &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the shields are not fully charged:    &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''P''' = '''10''' * '''R''' &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Armor==&lt;br /&gt;
All blocks have an armor value, although in the majority of cases it is 0%. Non-0% armor values decrease damage dealt to that block by the given percentage. For example, consider a 400-damage cannon projectile striking a block of Advanced Armor (250HP, 75% armor reduction). 400  reduced by 75% is 100, and so the Advanced Armor block takes only 100HP of damage. &lt;br /&gt;
&lt;br /&gt;
==Hit Points==&lt;br /&gt;
All blocks also have a Hit Points (HP) value, representative of that block's durability and integrity (stronger blocks, like armor, have higher HP). When the HP of a block reaches 0, it is destroyed. &lt;br /&gt;
&lt;br /&gt;
Damaged blocks can be repaired by [[Astrotech Computer|Astrotech Beams]]. This is not common practice, however, as most significant battle damage destroys blocks altogether. Furthermore, the amount of effort required (piloting a repair vessel and firing at every damaged block) is not proportional to the reward received (minor cosmetic repairs, with no effect on missile craters or other significant damage).&lt;br /&gt;
&lt;br /&gt;
As the HP of a block decreases, it appears progressively more dented and darkened, with almost-broken blocks approaching black in colouration and being very visibly crumpled. Destroyed blocks break into fragments which will bounce around for a duration before disappearing altogether.&lt;br /&gt;
&lt;br /&gt;
As well as individual block HP, entities have two overall HP pools: Structure HP and Armor HP, both of which are detailed below.&lt;br /&gt;
&lt;br /&gt;
===Structure HP===&lt;br /&gt;
Structure HP, abbreviated to &amp;quot;SHP&amp;quot;, is a measure of the overall structural integrity of a ship. Its maximum value is the sum of each block in the ship's individual SHP contribution: systems blocks such as power, shields, and weapons are the primary contributors to the SHP total. Armor and miscellaneous blocks provide very small SHP contributions. Any block that is intangible, or can become intangible (such as door blocks) provide no SHP: this prevents the creation of effectively-invulnerable pools of hitpoints.&lt;br /&gt;
&lt;br /&gt;
SHP, being the measure of a ship's integrity, also defines when it is destroyed. When blocks on a ship are destroyed, the ship loses SHP proportional to both the SHP contribution of the block, and the overall size of the ship (the maximum SHP value remains unchanged, so that how damaged the ship is can be measured). As SHP decreases, various penalties are applied to the ship. &lt;br /&gt;
&lt;br /&gt;
Once SHP has decreased to 50% of its maximum, the ship enters an &amp;quot;overheating&amp;quot; state. When a ship begins overheating, any player who is piloting it, or in a block such as a weapon computer or [[Build Block]], will be ejected: there are no direct penalties to the pilot or crew, but they will likely be threatened by whatever force has overheated their ship. An overheating ship has a countdown, proportional to its size,  before it &amp;quot;collapses&amp;quot;, disappearing altogether: this countdown can be stopped by [[#Rebooting|rebooting]] the ship. Overheating ships are inoperable, and the core cannot be entered until rebooted.&lt;br /&gt;
&lt;br /&gt;
While a ship's structure HP is at 100%, it can be edited normally, with no negative effect. However, when its SHP is below 100%, it cannot be edited without consequences: removing blocks will only remove their SHP value from the current HP amount, and adding blocks will only add their SHP value to the maximum SHP amount. In this way, any change made to a damaged ship will cause its current SHP% to decrease, eventually causing it to overheat if too many changes are made.&lt;br /&gt;
&lt;br /&gt;
The table below displays the penalties applied to an entity as structure HP decreases. To ensure clarity, the definition of each term is explained beforehand:&lt;br /&gt;
&lt;br /&gt;
*'''SHP %''': When the entity's current SHP % is less than this, the stated penalties are in effect.&lt;br /&gt;
*'''Power Recharge''': The percentage, of the normal value, which power regenerates at. Does not have any effect on [[Power Auxiliary|Power Auxiliaries]].&lt;br /&gt;
*'''Shield Recharge''': The percentage, of the normal value, which shields regenerate at.&lt;br /&gt;
*'''Thrust''': The percentage, of the normal value, which maximum speed is set to (thrust output, power cost, and thrust:mass ratio are seemingly unchanged) &lt;br /&gt;
*'''Control Loss''': Makes the entity unresponsive to player input of any sort, besides rebooting. Particularly harmful if the ship is part-way through a rotation, as the pilot will be unable to stop the rotation.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+SHP Damage Penalties&lt;br /&gt;
|-&lt;br /&gt;
!SHP %&lt;br /&gt;
!Power Recharge&lt;br /&gt;
!Shield Recharge&lt;br /&gt;
!Thrust&lt;br /&gt;
!Control Loss&lt;br /&gt;
!Overheating&lt;br /&gt;
|-&lt;br /&gt;
|90%&lt;br /&gt;
|90%&lt;br /&gt;
|90%&lt;br /&gt;
|90%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|80%&lt;br /&gt;
|80%&lt;br /&gt;
|80%&lt;br /&gt;
|80%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|70%&lt;br /&gt;
|70%&lt;br /&gt;
|70%&lt;br /&gt;
|70%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|60%&lt;br /&gt;
|50%&lt;br /&gt;
|50%&lt;br /&gt;
|50%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|- style=&amp;quot;background-color:#e69500&amp;quot; &lt;br /&gt;
|55%&lt;br /&gt;
|50% &lt;br /&gt;
|50% &lt;br /&gt;
|50% &lt;br /&gt;
|Yes &lt;br /&gt;
|No&lt;br /&gt;
|- style=&amp;quot;background-color:#e60000&amp;quot; &lt;br /&gt;
|50%&lt;br /&gt;
|0%&lt;br /&gt;
|0%&lt;br /&gt;
|50%&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|}&lt;br /&gt;
===Armor HP===&lt;br /&gt;
Armor HP, abbreviated AHP, is a damage mitigation pool which applies only to armored blocks. As with SHP, its maximum value is the sum of individual blocks' AHP values. Comparatively few blocks contribute to AHP: Only door blocks (Glass Doors, Plex Doors, Blast Doors, and Forcefields) and all types of hull/armor (Basic, Standard, Advanced and Crystal). AHP absorbs 50% of damage dealt to any block which contributes to the AHP pool; this absorption takes place after per-block armor reduction. Note that AHP will only apply its absorption to blocks which have an AHP value themselves, and will not affect damage dealt to systems such as power or shields.&lt;br /&gt;
&lt;br /&gt;
For example, consider a 400-damage cannon projectile striking a block of Advanced Armor (as mentioned in the Armor section), but this time factoring in AHP as well. The Advanced Armor block reduces the 400 damage by 75%, to 100 damage, but this is not actually dealt to the block yet. Armor HP absorbs 50% of this reduced amount, and so 50 damage is dealt to the Advanced Armor block, with the other 50 damage being taken by the AHP pool instead. &lt;br /&gt;
&lt;br /&gt;
The amount which armor HP absorbs can be increased by using the Piercing Effect defensively, and Punch-Through Effect will reduce the damage taken by the AHP pool, effectively negating up to 25% of all damage which it absorbs. These are explained in more detail in the [[#Defensive Effects|Defensive Effects]] section.&lt;br /&gt;
&lt;br /&gt;
Because AHP takes damage based on incoming damage, ''not'' block destruction (Like SHP), it can often be depleted far in advance of all armor blocks on a ship being destroyed. When AHP reaches 0, it will no longer be able to absorb any of the damage dealt to armor blocks.&lt;br /&gt;
&lt;br /&gt;
===Effective HP===&lt;br /&gt;
An important concept to understand, when designing a ship's defenses, is that of Effective HP (EHP). This is the amount of damage it takes to destroy a block, accounting for armor and armor HP reductions. For a given block, its EHP can be found by the following formula. ''Note that percentages should be expressed as their decimal forms, in order to produce correct results. Armor HP reduction is 50% (0.5) by default, and reaches a maximum of 75% (0.75) with 25% Piercing Effect.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''EHP''' = '''BlockHP''' / ( '''1''' - '''Armor%''' ) / ( '''0.5''' - '''Piercing%''' )&amp;lt;/big&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The table below lists effective HP values for hull, standard armor and advanced armor. EHP values are displayed for 3 distinct states of damage reduction: AHP+25% Piercing Effect, AHP, and no AHP.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Armor EHP&lt;br /&gt;
! Armor Tier !! AHP+Piercing !! AHP Only !! No AHP&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Hull|Hull]] ||style=&amp;quot;text-align:right&amp;quot;| 300 ||style=&amp;quot;text-align:right&amp;quot;| 150 ||style=&amp;quot;text-align:right&amp;quot;| 75&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Standard|Standard Armor]] ||style=&amp;quot;text-align:right&amp;quot;| 1,000 ||style=&amp;quot;text-align:right&amp;quot;| 500 ||style=&amp;quot;text-align:right&amp;quot;| 250&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Advanced|Advanced Armor]] ||style=&amp;quot;text-align:right&amp;quot;| 4,000 ||style=&amp;quot;text-align:right&amp;quot;| 2,000 ||style=&amp;quot;text-align:right&amp;quot;| 1,000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A simple [https://www.desmos.com/calculator/scuhccyzn5 Desmos graph] displays the change in an armor block's EHP as Piercing Effect is added to AHP absorption.&lt;br /&gt;
&lt;br /&gt;
===Rebooting===&lt;br /&gt;
A ship can be &amp;quot;rebooted&amp;quot; to reset its current SHP to 100%, also stopping it from overheating, if it currently is. Specifically, this sets the maximum SHP value of the ship to the sum of every remaining block's SHP value. Rebooting is accomplished by pressing {{K|Reboot}}, if in the ship, or simply activating the core by pressing {{K|Activate module}}. Rebooting takes a minimum of 30 seconds, with larger ships taking proportionally longer to reboot.&lt;br /&gt;
&lt;br /&gt;
The formula below is believed to accurately express the reboot time, in seconds, of a given ship. This value is partially dependent on the current SHP, as a percentage, of the ship being rebooted. Mass is the most significant driver of reboot time, and very large ships can take exceedingly long periods to reboot. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''RebootTime''' = '''40''' - '''CurrentSHP%''' * '''10''' + '''ShipMass''' * '''0.0002'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that rebooting a ship will not reset its AHP value. AHP must be repaired at any station with shop capabilities; this includes player-made stations with [[Shop Module|Shop Modules]]. Repairs cost 1 credit per AHP repaired.&lt;br /&gt;
&lt;br /&gt;
==Turrets==&lt;br /&gt;
Any entity can have turrets docked to it; separate entities which rotate freely about a [[Rail Turret Axis]], usually working in pairs to provide both axes of motion. Although not exclusively a defensive weapon, turrets play some key roles in defending an entity, both in shooting down missiles, and in protecting large, lumbering ships from more nimble harrassers.&lt;br /&gt;
&lt;br /&gt;
===Anti-Missile===&lt;br /&gt;
The foremost defensive use of turrets is in shooting down enemy missiles, readily negating often significant amounts of potential damage. Turrets used for this purpose are referred to as point-defense (PD), point-defense turrets (PDT), or sometimes anti-missile turrets (AMT). The term CIWS (Close-In Weapon System) also sees some use, as this is the real-world equivalent of such systems.&lt;br /&gt;
&lt;br /&gt;
For a turret to shoot down missiles, it must be equipped with [[Cannon Computer|cannons]]: these are the only type of weapon which can damage missiles. Missiles have only 1 HP, and are therefore destroyed by any hit. Although a player operating a point-defense turret is technically possible, it is not advisable, as missiles do not have navigation markers, and players cannot reasonably match the rate at which AI can track and destroy them. Therefore, a point defense turret should also be equipped with a [[BOBBY AI Module]] set to behave as a turret, and ordered to target missiles in particular. &lt;br /&gt;
&lt;br /&gt;
The weapons utilized by a point-defense turret have a few peculiarities, due to their specialized role. First and foremost, one must note that all [[Effects|tertiary effects]] are of no use on a point-defense turret: all it needs to do is deal 1 damage to each missile, and every tertiary effect simply modifies the effect of a weapon's damage, which is redundant when the target will die in one hit. As cannons are the only weapon type which can damage missiles, options are somewhat limited. The most important characteristic of a point-defense turret is to produce a great volume of fire, therefore increasing the chance of the turret hitting its target. The preeminent weapon combination, therefore, is cannon/cannon, due to its high rate of fire. &lt;br /&gt;
&lt;br /&gt;
A useful supplementary (but not primary, especially for-point defense) choice of weapon is cannon/missile, owing to its shotgun-like effect (producing a spread of 10 projectiles per firing of the weapon). This spread can prove useful against missile/missile systems (which also launch many projectiles), as the large area of a cannon/missile spread makes them more likely to collide with such clusters of missiles. However, it has a lower rate of fire than cannon/cannon, and, due to its arbitrary and non-centered spread (none of the projectiles fired fire directly forwards), is unsuited for use in most cases, particularly with AI. This is because an AI does not recognize the pattern which cannon/missile fires in, and simply aims as though the projectile will fire directly forwards.&lt;br /&gt;
&lt;br /&gt;
===Anti-Ship===&lt;br /&gt;
Turrets are, of course, of particular use in defending slow or stationary targets against faster-moving entities which a large ship cannot neccessarily bring its main guns to bear on. This is a fairly broad topic, of course, and design varies significantly as it is not such a specific role as point-defense. There are no particular specifications to be upheld, as long as the turret is effective within the relevant context. &lt;br /&gt;
&lt;br /&gt;
A designer should, however, pay particular attention to the area which their turrets are able to target, and work to eliminate blind-spots where possible.&lt;br /&gt;
&lt;br /&gt;
==Defensive Effects==&lt;br /&gt;
&lt;br /&gt;
As well as modifying the behavior of weapons systems, [[Effects|effects]] can be used defensively, by simply placing the effect computer in the hotbar, instead of linking it to a weapon. All effects have some use within a defensive context, but the ones highlighted here are of the utmost importance.&lt;br /&gt;
&lt;br /&gt;
[[Ion Effect Computer|Ion Effect]], used defensively, reduces damage dealt to shields by a maximum of 60%. This functions in the same way as Armor values do for blocks: For example, what might normally do 400 damage to a shield will, when reduced by 60% Ion, deal only 160 damage.&lt;br /&gt;
&lt;br /&gt;
[[Piercing Effect Computer|Piercing Effect]], used defensively, increases how much damage the AHP pool of an entity absorbs, by up to 25% (resulting in a total absorption rate of 75%). In the previously-used example of a 400-damage projectile hitting an unshielded block, the 400 damage that might otherwise be dealt to the block is reduced to 100 rather than 200, with AHP taking the remaining 300 damage.&lt;br /&gt;
&lt;br /&gt;
[[Punch-Through Effect Computer|Punch-Through Effect]] reduces the damage taken by the AHP pool when it absorbs damage, by a maximum amount of 25%. This does not affect the rate of absorption, and can be thought of as an Armor or Ion value for the AHP pool itself. Consider the above example: the 300 damage absorbed by Piercing-reinforced AHP is then reduced by 25% before being applied to the AHP pool, resulting in only 225 damage being dealt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the [[Effects#Defensive Use|Defensive Use]] section of the Effects page for more information.&lt;br /&gt;
&lt;br /&gt;
[[Category:Ship]]&lt;br /&gt;
[[Category:Game Mechanics]]&lt;/div&gt;</summary>
		<author><name>Jojomo</name></author>
		
	</entry>
	<entry>
		<id>https://starmadepedia.net/index.php?title=Defense_Systems&amp;diff=5132</id>
		<title>Defense Systems</title>
		<link rel="alternate" type="text/html" href="https://starmadepedia.net/index.php?title=Defense_Systems&amp;diff=5132"/>
		<updated>2017-01-19T02:19:35Z</updated>

		<summary type="html">&lt;p&gt;Jojomo: /* Shield Rules */ Regen under fire percentage was wrong, also made the language of that sentence a little clearer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WIP}}&lt;br /&gt;
&lt;br /&gt;
In [[StarMade]], players will often face a variety of threats to the safety of themselves and their entities (ships, stations, turrets or otherwise). Regardless of whether the attackers are players, NPCs, or both at once, the ways in which a player can ensure their survival are the same. This page details these mechanics by which a player can ensure the safety of their entities.&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
Here is a brief breakdown of the various mechanics which are relevant to defense.&lt;br /&gt;
*'''Shields:''' A regenerating HP pool which absorbs all incoming damage until depleted. When depleted, they enter a brief &amp;quot;outage&amp;quot; phase (wherein they do not recharge) before beginning to regenerate again.&lt;br /&gt;
**'''Defensive Ion Effect:''' Decreases damage dealt to shields by up to 60% when active.&lt;br /&gt;
*'''Hit Points (HP):''' Every block has a set HP value, representing its own structural integrity. When the HP of a block is reduced to 0, it is destroyed.&lt;br /&gt;
*'''Armor:''' A flat percentage value granted to a range of blocks, which reduces damage dealt to that block by the stated percentage. Applied before AHP absorption.&lt;br /&gt;
*'''Armor HP (AHP):''' A non-regenerating HP pool which absorbs 50% (without defensive effects) of all damage dealt to any block which contributes to the AHP pool (in short, all tiers of hull and doors). Applied after armor reduction, and stacks multiplicatively with it.&lt;br /&gt;
**'''Defensive Piercing Effect:''' Increases the amount of damage absorbed by AHP to a maximum of 75% (from 50%) &lt;br /&gt;
**'''Defensive Punch-Through Effect:''' Reduces damage taken by AHP by up to 25%. Does not change amount of damage absorbed, but rather acts as an Armor value for the AHP pool itself.&lt;br /&gt;
*'''Structure HP (SHP):''' A non-regenerating HP pool which serves as a measure of an entity's integrity. As it decreases, various penalties are applied to the entity. When it is reduced to 50%, the entity will overheat: this ejects any pilot in its [[Ship Core]] and renders it inoperable. An overheating entity has a countdown, proportional to the entity's size, before it collapses, disappearing altogether. This countdown can be stopped, and the entity rendered operable again, by &amp;quot;rebooting&amp;quot; it.&lt;br /&gt;
*'''Turrets:''' Although not exclusively defensive in nature, AI-controlled turrets still play key roles in entity defense:&lt;br /&gt;
**Shooting down incoming missiles, neutralizing damage which would otherwise have to be mitigated by shields or armor.&lt;br /&gt;
**Allowing heavy, slow-turning ships to apply damage to smaller, more maneuverable vessels.&lt;br /&gt;
&lt;br /&gt;
==Shields==&lt;br /&gt;
&lt;br /&gt;
Shields are the first layer of an entity's defenses. A shield system relies on two blocks: the [[Shield Capacitor]] and the [[Shield-Recharger]]. The capacity of the shield is dependent on the number of Shield Capacitors, and its rate of regeneration is dependent on the number of Shield-Rechargers. While an entity has any shield remaining, it will not take block damage. Once the shield is depleted, it is rendered temporarily vulnerable. &lt;br /&gt;
&lt;br /&gt;
Once a ship's shields have reached 0 HP, they will stop recharging for 10 seconds. After this 10 seconds has elapsed, the shields will begin recharging once more. However, if the ship is still taking damage, it is likely that they will be rapidly depleted again, and another 10 second recovery time will begin, leaving the ship open to continued damage.&lt;br /&gt;
&lt;br /&gt;
Unlike most other ship systems, shield systems require no controller, nor do they have any placement rules which affect efficiency. This often serves to make them an ideal filler block, being used in small spaces where other blocks, which require efficient placement, would go to waste. The only design consideration is deciding what values of shield capacity and regeneration are desirable; bearing in mind the power demands the [[Shield-Recharger]]s will make on the ship's [[Power_Systems|power system]].&lt;br /&gt;
&lt;br /&gt;
The strength of a shield can be increased using the [[Ion Effect Computer|Ion Effect system]]: this will reduce damage taken by shields by up to 60%, effectively functioning as an Armor value for shields. This is explained in more detail in the [[#Defensive Effects|Defensive Effects]] section below.&lt;br /&gt;
&lt;br /&gt;
===Shield Rules===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''LEGEND'''&lt;br /&gt;
|-&lt;br /&gt;
| '''C''' || Shield Capacity&lt;br /&gt;
|-&lt;br /&gt;
| '''N&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt;''' || Number of Shield Capacitators&lt;br /&gt;
|-&lt;br /&gt;
| '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' || Number of Shield-Rechargers&lt;br /&gt;
|-&lt;br /&gt;
| '''R''' || Shield Regeneration per Second&lt;br /&gt;
|-&lt;br /&gt;
| '''S''' || Current amount of shields&lt;br /&gt;
|-&lt;br /&gt;
| '''P''' || Power Usage&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The exact capacity, regeneration, and power consumption of a shield system can be calculated by using a few different formulas.&lt;br /&gt;
Any decimal results produced by these formulas should be rounded down to the nearest whole number. &lt;br /&gt;
&lt;br /&gt;
The shield capacity, '''C''', of a ship with '''N&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt;''' number of [[Shield Capacitor]]s, can be found by the formula:      &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''C''' = '''N&amp;lt;sub&amp;gt;C&amp;lt;/sub&amp;gt;'''&amp;lt;sup&amp;gt;0.9791797578&amp;lt;/sup&amp;gt; * '''110''' + '''220'''&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The shield regeneration per second, '''R''', of a ship with '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' number of [[Shield-Recharger]]s, can be found by the formula:     &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''R''' = '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' * '''5.5'''&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon taking a hit, the shield regeneration per second drops to &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''R''' = '''N&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;''' * '''5.5''' * '''0.25''' * ('''1''' - '''0.5''' * '''S''' / '''C''')&amp;lt;/tt&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
for one minute, where '''S''' is the current amount of remaining shields (effectively reducing the shield regeneration by 87.5% when shields are at max capacity,  to 75% when your ship's shields are depleted)&lt;br /&gt;
&lt;br /&gt;
The power usage per second, '''P''', for a given number of [[Shield-Recharger]]s changes depending on whether or not the ship's shields are fully charged. &lt;br /&gt;
&lt;br /&gt;
If the shields are fully charged:  &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''P''' = '''R''' &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the shields are not fully charged:    &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;tt style=&amp;quot;font-size: large&amp;quot;&amp;gt;'''P''' = '''10''' * '''R''' &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Armor==&lt;br /&gt;
All blocks have an armor value, although in the majority of cases it is 0%. Non-0% armor values decrease damage dealt to that block by the given percentage. For example, consider a 400-damage cannon projectile striking a block of Advanced Armor (250HP, 75% armor reduction). 400  reduced by 75% is 100, and so the Advanced Armor block takes only 100HP of damage. &lt;br /&gt;
&lt;br /&gt;
==Hit Points==&lt;br /&gt;
All blocks also have a Hit Points (HP) value, representative of that block's durability and integrity (stronger blocks, like armor, have higher HP). When the HP of a block reaches 0, it is destroyed. &lt;br /&gt;
&lt;br /&gt;
Damaged blocks can be repaired by [[Astrotech Computer|Astrotech Beams]]. This is not common practice, however, as most significant battle damage destroys blocks altogether. Furthermore, the amount of effort required (piloting a repair vessel and firing at every damaged block) is not proportional to the reward received (minor cosmetic repairs, with no effect on missile craters or other significant damage).&lt;br /&gt;
&lt;br /&gt;
As the HP of a block decreases, it appears progressively more dented and darkened, with almost-broken blocks approaching black in colouration and being very visibly crumpled. Destroyed blocks break into fragments which will bounce around for a duration before disappearing altogether.&lt;br /&gt;
&lt;br /&gt;
As well as individual block HP, entities have two overall HP pools: Structure HP and Armor HP, both of which are detailed below.&lt;br /&gt;
&lt;br /&gt;
===Structure HP===&lt;br /&gt;
Structure HP, abbreviated to &amp;quot;SHP&amp;quot;, is a measure of the overall structural integrity of a ship. Its maximum value is the sum of each block in the ship's individual SHP contribution: systems blocks such as power, shields, and weapons are the primary contributors to the SHP total. Armor and miscellaneous blocks provide very small SHP contributions. Any block that is intangible, or can become intangible (such as door blocks) provide no SHP: this prevents the creation of effectively-invulnerable pools of hitpoints.&lt;br /&gt;
&lt;br /&gt;
SHP, being the measure of a ship's integrity, also defines when it is destroyed. When blocks on a ship are destroyed, the ship loses SHP proportional to both the SHP contribution of the block, and the overall size of the ship (the maximum SHP value remains unchanged, so that how damaged the ship is can be measured). As SHP decreases, various penalties are applied to the ship. &lt;br /&gt;
&lt;br /&gt;
Once SHP has decreased to 50% of its maximum, the ship enters an &amp;quot;overheating&amp;quot; state. When a ship begins overheating, any player who is piloting it, or in a block such as a weapon computer or [[Build Block]], will be ejected: there are no direct penalties to the pilot or crew, but they will likely be threatened by whatever force has overheated their ship. An overheating ship has a countdown, proportional to its size,  before it &amp;quot;collapses&amp;quot;, disappearing altogether: this countdown can be stopped by [[#Rebooting|rebooting]] the ship. Overheating ships are inoperable, and the core cannot be entered until rebooted.&lt;br /&gt;
&lt;br /&gt;
While a ship's structure HP is at 100%, it can be edited normally, with no negative effect. However, when its SHP is below 100%, it cannot be edited without consequences: removing blocks will only remove their SHP value from the current HP amount, and adding blocks will only add their SHP value to the maximum SHP amount. In this way, any change made to a damaged ship will cause its current SHP% to decrease, eventually causing it to overheat if too many changes are made.&lt;br /&gt;
&lt;br /&gt;
The table below displays the penalties applied to an entity as structure HP decreases. To ensure clarity, the definition of each term is explained beforehand:&lt;br /&gt;
&lt;br /&gt;
*'''SHP %''': When the entity's current SHP % is less than this, the stated penalties are in effect.&lt;br /&gt;
*'''Power Recharge''': The percentage, of the normal value, which power regenerates at. Does not have any effect on [[Power Auxiliary|Power Auxiliaries]].&lt;br /&gt;
*'''Shield Recharge''': The percentage, of the normal value, which shields regenerate at.&lt;br /&gt;
*'''Thrust''': The percentage, of the normal value, which maximum speed is set to (thrust output, power cost, and thrust:mass ratio are seemingly unchanged) &lt;br /&gt;
*'''Control Loss''': Makes the entity unresponsive to player input of any sort, besides rebooting. Particularly harmful if the ship is part-way through a rotation, as the pilot will be unable to stop the rotation.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+SHP Damage Penalties&lt;br /&gt;
|-&lt;br /&gt;
!SHP %&lt;br /&gt;
!Power Recharge&lt;br /&gt;
!Shield Recharge&lt;br /&gt;
!Thrust&lt;br /&gt;
!Control Loss&lt;br /&gt;
!Overheating&lt;br /&gt;
|-&lt;br /&gt;
|90%&lt;br /&gt;
|90%&lt;br /&gt;
|90%&lt;br /&gt;
|90%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|80%&lt;br /&gt;
|80%&lt;br /&gt;
|80%&lt;br /&gt;
|80%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|70%&lt;br /&gt;
|70%&lt;br /&gt;
|70%&lt;br /&gt;
|70%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|60%&lt;br /&gt;
|50%&lt;br /&gt;
|50%&lt;br /&gt;
|50%&lt;br /&gt;
|No&lt;br /&gt;
|No&lt;br /&gt;
|- style=&amp;quot;background-color:#e69500&amp;quot; &lt;br /&gt;
|55%&lt;br /&gt;
|50% &lt;br /&gt;
|50% &lt;br /&gt;
|50% &lt;br /&gt;
|Yes &lt;br /&gt;
|No&lt;br /&gt;
|- style=&amp;quot;background-color:#e60000&amp;quot; &lt;br /&gt;
|50%&lt;br /&gt;
|0%&lt;br /&gt;
|0%&lt;br /&gt;
|50%&lt;br /&gt;
|Yes&lt;br /&gt;
|Yes&lt;br /&gt;
|}&lt;br /&gt;
===Armor HP===&lt;br /&gt;
Armor HP, abbreviated AHP, is a damage mitigation pool which applies only to armored blocks. As with SHP, its maximum value is the sum of individual blocks' AHP values. Comparatively few blocks contribute to AHP: Only door blocks (Glass Doors, Plex Doors, Blast Doors, and Forcefields) and all types of hull/armor (Basic, Standard, Advanced and Crystal). AHP absorbs 50% of damage dealt to any block which contributes to the AHP pool; this absorption takes place after per-block armor reduction. Note that AHP will only apply its absorption to blocks which have an AHP value themselves, and will not affect damage dealt to systems such as power or shields.&lt;br /&gt;
&lt;br /&gt;
For example, consider a 400-damage cannon projectile striking a block of Advanced Armor (as mentioned in the Armor section), but this time factoring in AHP as well. The Advanced Armor block reduces the 400 damage by 75%, to 100 damage, but this is not actually dealt to the block yet. Armor HP absorbs 50% of this reduced amount, and so 50 damage is dealt to the Advanced Armor block, with the other 50 damage being taken by the AHP pool instead. &lt;br /&gt;
&lt;br /&gt;
The amount which armor HP absorbs can be increased by using the Piercing Effect defensively, and Punch-Through Effect will reduce the damage taken by the AHP pool, effectively negating up to 25% of all damage which it absorbs. These are explained in more detail in the [[#Defensive Effects|Defensive Effects]] section.&lt;br /&gt;
&lt;br /&gt;
Because AHP takes damage based on incoming damage, ''not'' block destruction (Like SHP), it can often be depleted far in advance of all armor blocks on a ship being destroyed. When AHP reaches 0, it will no longer be able to absorb any of the damage dealt to armor blocks.&lt;br /&gt;
&lt;br /&gt;
===Effective HP===&lt;br /&gt;
An important concept to understand, when designing a ship's defenses, is that of Effective HP (EHP). This is the amount of damage it takes to destroy a block, accounting for armor and armor HP reductions. For a given block, its EHP can be found by the following formula. ''Note that percentages should be expressed as their decimal forms, in order to produce correct results. Armor HP reduction is 50% (0.5) by default, and reaches a maximum of 75% (0.75) with 25% Piercing Effect.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''EHP''' = '''BlockHP''' / ( '''1''' - '''Armor%''' ) / ( '''0.5''' - '''Piercing%''' )&amp;lt;/big&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The table below lists effective HP values for hull, standard armor and advanced armor. EHP values are displayed for 3 distinct states of damage reduction: AHP+25% Piercing Effect, AHP, and no AHP.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Armor EHP&lt;br /&gt;
! Armor Tier !! AHP+Piercing !! AHP Only !! No AHP&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Hull|Hull]] ||style=&amp;quot;text-align:right&amp;quot;| 300 ||style=&amp;quot;text-align:right&amp;quot;| 150 ||style=&amp;quot;text-align:right&amp;quot;| 75&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Standard|Standard Armor]] ||style=&amp;quot;text-align:right&amp;quot;| 1,000 ||style=&amp;quot;text-align:right&amp;quot;| 500 ||style=&amp;quot;text-align:right&amp;quot;| 250&lt;br /&gt;
|-&lt;br /&gt;
| [[:Category:Advanced|Advanced Armor]] ||style=&amp;quot;text-align:right&amp;quot;| 4,000 ||style=&amp;quot;text-align:right&amp;quot;| 2,000 ||style=&amp;quot;text-align:right&amp;quot;| 1,000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A simple [https://www.desmos.com/calculator/scuhccyzn5 Desmos graph] displays the change in an armor block's EHP as Piercing Effect is added to AHP absorption.&lt;br /&gt;
&lt;br /&gt;
===Rebooting===&lt;br /&gt;
A ship can be &amp;quot;rebooted&amp;quot; to reset its current SHP to 100%, also stopping it from overheating, if it currently is. Specifically, this sets the maximum SHP value of the ship to the sum of every remaining block's SHP value. Rebooting is accomplished by pressing {{K|Reboot}}, if in the ship, or simply activating the core by pressing {{K|Activate module}}. Rebooting takes a minimum of 30 seconds, with larger ships taking proportionally longer to reboot.&lt;br /&gt;
&lt;br /&gt;
The formula below is believed to accurately express the reboot time, in seconds, of a given ship. This value is partially dependent on the current SHP, as a percentage, of the ship being rebooted. Mass is the most significant driver of reboot time, and very large ships can take exceedingly long periods to reboot. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''RebootTime''' = '''40''' - '''CurrentSHP%''' * '''10''' + '''ShipMass''' * '''0.0002'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that rebooting a ship will not reset its AHP value. AHP must be repaired at any station with shop capabilities; this includes player-made stations with [[Shop Module|Shop Modules]]. Repairs cost 1 credit per AHP repaired.&lt;br /&gt;
&lt;br /&gt;
==Turrets==&lt;br /&gt;
Any entity can have turrets docked to it; separate entities which rotate freely about a [[Rail Turret Axis]], usually working in pairs to provide both axes of motion. Although not exclusively a defensive weapon, turrets play some key roles in defending an entity, both in shooting down missiles, and in protecting large, lumbering ships from more nimble harrassers.&lt;br /&gt;
&lt;br /&gt;
===Anti-Missile===&lt;br /&gt;
The foremost defensive use of turrets is in shooting down enemy missiles, readily negating often significant amounts of potential damage. Turrets used for this purpose are referred to as point-defense (PD), point-defense turrets (PDT), or sometimes anti-missile turrets (AMT). The term CIWS (Close-In Weapon System) also sees some use, as this is the real-world equivalent of such systems.&lt;br /&gt;
&lt;br /&gt;
For a turret to shoot down missiles, it must be equipped with [[Cannon Computer|cannons]]: these are the only type of weapon which can damage missiles. Missiles have only 1 HP, and are therefore destroyed by any hit. Although a player operating a point-defense turret is technically possible, it is not advisable, as missiles do not have navigation markers, and players cannot reasonably match the rate at which AI can track and destroy them. Therefore, a point defense turret should also be equipped with a [[BOBBY AI Module]] set to behave as a turret, and ordered to target missiles in particular. &lt;br /&gt;
&lt;br /&gt;
The weapons utilized by a point-defense turret have a few peculiarities, due to their specialized role. First and foremost, one must note that all [[Effects|tertiary effects]] are of no use on a point-defense turret: all it needs to do is deal 1 damage to each missile, and every tertiary effect simply modifies the effect of a weapon's damage, which is redundant when the target will die in one hit. As cannons are the only weapon type which can damage missiles, options are somewhat limited. The most important characteristic of a point-defense turret is to produce a great volume of fire, therefore increasing the chance of the turret hitting its target. The preeminent weapon combination, therefore, is cannon/cannon, due to its high rate of fire. &lt;br /&gt;
&lt;br /&gt;
A useful supplementary (but not primary, especially for-point defense) choice of weapon is cannon/missile, owing to its shotgun-like effect (producing a spread of 10 projectiles per firing of the weapon). This spread can prove useful against missile/missile systems (which also launch many projectiles), as the large area of a cannon/missile spread makes them more likely to collide with such clusters of missiles. However, it has a lower rate of fire than cannon/cannon, and, due to its arbitrary and non-centered spread (none of the projectiles fired fire directly forwards), is unsuited for use in most cases, particularly with AI. This is because an AI does not recognize the pattern which cannon/missile fires in, and simply aims as though the projectile will fire directly forwards.&lt;br /&gt;
&lt;br /&gt;
===Anti-Ship===&lt;br /&gt;
Turrets are, of course, of particular use in defending slow or stationary targets against faster-moving entities which a large ship cannot neccessarily bring its main guns to bear on. This is a fairly broad topic, of course, and design varies significantly as it is not such a specific role as point-defense. There are no particular specifications to be upheld, as long as the turret is effective within the relevant context. &lt;br /&gt;
&lt;br /&gt;
A designer should, however, pay particular attention to the area which their turrets are able to target, and work to eliminate blind-spots where possible.&lt;br /&gt;
&lt;br /&gt;
==Defensive Effects==&lt;br /&gt;
&lt;br /&gt;
As well as modifying the behavior of weapons systems, [[Effects|effects]] can be used defensively, by simply placing the effect computer in the hotbar, instead of linking it to a weapon. All effects have some use within a defensive context, but the ones highlighted here are of the utmost importance.&lt;br /&gt;
&lt;br /&gt;
[[Ion Effect Computer|Ion Effect]], used defensively, reduces damage dealt to shields by a maximum of 60%. This functions in the same way as Armor values do for blocks: For example, what might normally do 400 damage to a shield will, when reduced by 60% Ion, deal only 160 damage.&lt;br /&gt;
&lt;br /&gt;
[[Piercing Effect Computer|Piercing Effect]], used defensively, increases how much damage the AHP pool of an entity absorbs, by up to 25% (resulting in a total absorption rate of 75%). In the previously-used example of a 400-damage projectile hitting an unshielded block, the 400 damage that might otherwise be dealt to the block is reduced to 100 rather than 200, with AHP taking the remaining 300 damage.&lt;br /&gt;
&lt;br /&gt;
[[Punch-Through Effect Computer|Punch-Through Effect]] reduces the damage taken by the AHP pool when it absorbs damage, by a maximum amount of 25%. This does not affect the rate of absorption, and can be thought of as an Armor or Ion value for the AHP pool itself. Consider the above example: the 300 damage absorbed by Piercing-reinforced AHP is then reduced by 25% before being applied to the AHP pool, resulting in only 225 damage being dealt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See the [[Effects#Defensive Use|Defensive Use]] section of the Effects page for more information.&lt;br /&gt;
&lt;br /&gt;
[[Category:Ship]]&lt;br /&gt;
[[Category:Game Mechanics]]&lt;/div&gt;</summary>
		<author><name>Jojomo</name></author>
		
	</entry>
	<entry>
		<id>https://starmadepedia.net/index.php?title=Blueprint_File_Formats&amp;diff=3934</id>
		<title>Blueprint File Formats</title>
		<link rel="alternate" type="text/html" href="https://starmadepedia.net/index.php?title=Blueprint_File_Formats&amp;diff=3934"/>
		<updated>2016-09-10T06:30:04Z</updated>

		<summary type="html">&lt;p&gt;Jojomo: /* smd3.bt */ Size of 'data' array in Region was wrong - it's less than 4096 if 4096 SegmentDatas aren't needed.  The size of this array is now calculated automatically.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below are the details of the blueprint data files.  This information is intended for those who are interested in writing external tools to inspect and modify blueprints.&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
As '''StarMade''' is under active development, file formats and layouts could change with each version.  As a result, the information on this page may become inaccurate over time.  If you find errors in this information, please provide corrections and note the version and changes in the [[#Changelog|Changelog]] section at the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
==File Layout==&lt;br /&gt;
Blueprints are comprised of several files arranged in the blueprints directories in the StarMade installation directory.  There are three such directories:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Directory !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| blueprints || Player-saved blueprints (the local catalog) as well as the initial pirate ship blueprints&lt;br /&gt;
|-&lt;br /&gt;
| blueprints-default || Also contains pirate blueprints&lt;br /&gt;
|-&lt;br /&gt;
| blueprints-stations || Station blueprints, organized into directories for each of the NPC factions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Within each blueprint directory are directories for each ship or station.  Within each of those directories are the following files:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! File Name !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| header.smbph || The [[#header|header]] file.&lt;br /&gt;
|-&lt;br /&gt;
| meta.smbpm || The [[#meta|metadata]] file.&lt;br /&gt;
|-&lt;br /&gt;
| logic.smbpl || The [[#logic|logic]] file.&lt;br /&gt;
|-&lt;br /&gt;
| DATA/ || A directory containing the *.smd2 block [[#data|chunk data]] files.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Header==&lt;br /&gt;
&lt;br /&gt;
The header file describes the following basic bits of information about the blueprint: &lt;br /&gt;
&lt;br /&gt;
; Entity Type : Indicates whether the blueprint is for a Ship, Shop, Space Station, Asteroid or Planet.&lt;br /&gt;
; Bounding Box : A pair of three-dimensional coordinates providing the minimum and maximum block coordinates for the blueprint.  These are relative to a 0,0,0 base, so the minimum coordinates will be negative and the maximum coordinates will be positive.  The size of the blueprint is determined by subtracting the minimum coordinates from the maximum ones in each dimension.&lt;br /&gt;
; Element Map: An array of structures describing the number and types of each block in the blueprint.&lt;br /&gt;
&lt;br /&gt;
With the information from the header, it's possible to calculate the size and composition of the blueprint to, for example, produce a list of materials needed for construction or determine if a ship can fit in a particular space.&lt;br /&gt;
&lt;br /&gt;
==Metadata==&lt;br /&gt;
&lt;br /&gt;
The metadata file contains all the other information about a blueprint except for block positions.  This includes things like docked turrets, contents of storage boxes on the ship, etc.  It is arranged in two sections: docking and Tags.&lt;br /&gt;
&lt;br /&gt;
; Docking : This section contains an array of structures describing the name of the blueprint for the docked entity, its size and position, the docking style and its docked orientation.&lt;br /&gt;
; Tags : This is a hierarchical data format which may contain binary information of several types, optionally named.  See the file format section for additional details.&lt;br /&gt;
&lt;br /&gt;
The Tags section may be compressed, requiring zlib compression functionality to work with.  Each Tag contains the following information:&lt;br /&gt;
; Type : The type of data contained in the payload.&lt;br /&gt;
; Name (optional): If present this is the name of this tag&lt;br /&gt;
; Payload : A variable format data structure which describes one of the following values:&lt;br /&gt;
:* Byte (8-bit value)&lt;br /&gt;
:* Short (16-bit value)&lt;br /&gt;
:* Int (32-bit value)&lt;br /&gt;
:* Long (64-bit value)&lt;br /&gt;
:* Float (32-bit single-precision value)&lt;br /&gt;
:* Double (64-bit double-precision value)&lt;br /&gt;
:* Byte Array&lt;br /&gt;
:* String (UTF-encoded with a length prefix)&lt;br /&gt;
:* Vector3f (a vector of 3 floats)&lt;br /&gt;
:* Vector3i (a vector of 3 integers)&lt;br /&gt;
:* Vector3b (a vector of 3 bytes)&lt;br /&gt;
:* List (A list of Payloads which all contain the same type of data)&lt;br /&gt;
:* Structure (A list of Tags of varying types)&lt;br /&gt;
:* FactoryId (a 8-bit value used for factory registration)&lt;br /&gt;
:* Vector4f (A vector of 4 floats)&lt;br /&gt;
&lt;br /&gt;
==Logic==&lt;br /&gt;
&lt;br /&gt;
The logic file describes all of the [[Linking|linked]] module groups in the ship.  It is structured as an array or arrays of block information.&lt;br /&gt;
&lt;br /&gt;
; Controller Map : An array of Controller Entity structures, one for each linked master.&lt;br /&gt;
; Controller Entity : Contains the position of the controller (master) block and an array of Controller Group structures describing the master and slaved blocks.&lt;br /&gt;
; Controller Group : Contains the type of block and an array of positions of each slaved block of that type&lt;br /&gt;
&lt;br /&gt;
There is a hierarchy of groups, starting with the Controller Entity with controller position 8, 8, 8 (corresponding to the [[Ship Core]]) which will contain a list of Controller Groups containing the master blocks (such as the various computers.)  Within each of these groups will be the positions of those master blocks, and those positions will correspond to the Controller Entity positions of the other Entities in the Controller Map.&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
&lt;br /&gt;
Data files are contained within the DATA directory for a given blueprint.  These files contain the actual block data - types, positions and orientations, organized into segments and further organized into regions.  Each region will be in its own file named with the following format &amp;lt;blueprintname&amp;gt;.&amp;lt;regionX&amp;gt;.&amp;lt;regionY&amp;gt;.&amp;lt;regionZ&amp;gt;.smd2.  For a blueprint called Alpha, the data file for region 0, 0, 0 would be called Alpha.0.0.0.smd2.&lt;br /&gt;
&lt;br /&gt;
The region file contains the following information:&lt;br /&gt;
; Segment Index : A 16x16x16 array of segment indexes, pointing to Segment Data in the data array&lt;br /&gt;
; Segment Timestamps : A 16x16x16 array of timestamps.&lt;br /&gt;
; Segment Data : An array of up to 16x16x16 (4096) entries containing the data pointed to by the Segment Index.  Each Segment Data contains the segment timestamp, the segment position within the region, the type of segment and a compressed array of Block Data.&lt;br /&gt;
; Block Data : A bit-packed structure describing the block id, orientation, hitpoints and whether the block is active.&lt;br /&gt;
&lt;br /&gt;
===Block Data===&lt;br /&gt;
The Block Data structure consists of three bytes which contain a bit-packed representation of each block in the blueprint.&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! ||MSB !! colspan=22 | Bit Offsets !! LSB&lt;br /&gt;
|-&lt;br /&gt;
! Type !! 23 !! 22 !! 21 !! 20 !! 19 !! 18 !! 17 !! 16&lt;br /&gt;
! 15 !! 14 !! 13 !! 12 !! 11 !! 10 !! 9 !! 8 !! 7 !! 6 !! 5 !! 4 !! 3 !! 2 !! 1 !! 0&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2 | Type 1&lt;br /&gt;
| colspan=3 bgcolor=red align=center | Orientation &lt;br /&gt;
| bgcolor=teal align=center | Active &lt;br /&gt;
| colspan=9 bgcolor=blue align=center | Hit Points&lt;br /&gt;
| colspan=12 bgcolor=green align=center | Block ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=24 | For blocks with an activation status, like a [[Standard Factory]] or [[Activation Module]] &amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2 | Type 2&lt;br /&gt;
| colspan=4 bgcolor=red align=center | Orientation &lt;br /&gt;
| colspan=9 bgcolor=blue align=center | Hit Points&lt;br /&gt;
| colspan=12 bgcolor=green align=center | Block ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=24 | For all other blocks except [[Grey Standard Armor Corner|corners]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2 | Type 3&lt;br /&gt;
| colspan=5 bgcolor=red align=center | Orientation &lt;br /&gt;
| colspan=8 bgcolor=blue align=center | Hit Points&lt;br /&gt;
| colspan=12 bgcolor=green align=center | Block ID&lt;br /&gt;
|-&lt;br /&gt;
| colspan=24 | For [[Grey Standard Armor Corner|corner]] blocks&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Orientation field represents how the block is facing in the blueprint.  When all the bits in this field are zero, the block will be in its default orientation.  The bits are interpeted as follows - if the bit is not part of the orientation :&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable padding=2&lt;br /&gt;
! Type !! colspan=3 | Bits !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Type1 || 23 || 22 || 21 || The block facing&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2 | Type 2 || 23 || 22 || || The axis of rotation.&lt;br /&gt;
*00 : +Y&lt;br /&gt;
*01 : -Y&lt;br /&gt;
*10 : -Z&lt;br /&gt;
*11 : +Z&lt;br /&gt;
|-&lt;br /&gt;
| 21 || 20 || || The amount of clockwise rotation around the axis of rotation, in 90-degree steps&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=2 | Type 3 || 19 || 23 || 22 || The axis of rotation.&lt;br /&gt;
*000 : +Y&lt;br /&gt;
*001 : -Y&lt;br /&gt;
*010 : -Z&lt;br /&gt;
*011 : +Z&lt;br /&gt;
*100 : -X&lt;br /&gt;
*101 : +X&lt;br /&gt;
|-&lt;br /&gt;
| 21 || 20 || || The amount of clockwise rotation around the axis of rotation, in 90-degree steps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Additional Resources==&lt;br /&gt;
In order to assist developers, the following files are provided to help understand and work with blueprint files.&lt;br /&gt;
&lt;br /&gt;
===010 Editor===&lt;br /&gt;
The following *.bt files are format definitions for the [http://www.sweetscape.com/010editor 010 Hex Editor].  Their format is largely similar to C structures and should be easily translatable to your language of choice.&lt;br /&gt;
&lt;br /&gt;
====smbph.bt====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
//--- 010 Editor v6.0 Binary Template&lt;br /&gt;
//&lt;br /&gt;
// File: smbph.bt&lt;br /&gt;
// Author: Cliff Hudson&lt;br /&gt;
// Revision: 0.1867&lt;br /&gt;
// Purpose: StarMade Blueprint Header file&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
&lt;br /&gt;
struct Vector3f&lt;br /&gt;
{&lt;br /&gt;
    float x;&lt;br /&gt;
    float y;&lt;br /&gt;
    float z;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
enum &amp;lt;unsigned int&amp;gt; EntityType&lt;br /&gt;
{&lt;br /&gt;
    Ship = 0,&lt;br /&gt;
    Shop = 1,&lt;br /&gt;
    SpaceStatiion = 2,&lt;br /&gt;
    Asteroid = 3,&lt;br /&gt;
    Planet = 4&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    Vector3f min;&lt;br /&gt;
    Vector3f max;&lt;br /&gt;
} BoundingBox;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    short blockId;&lt;br /&gt;
    int blockCount;&lt;br /&gt;
} Element;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int numElements;&lt;br /&gt;
    Element elements[numElements];&lt;br /&gt;
} ElementCountMap;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int version; &lt;br /&gt;
    EntityType entityType;&lt;br /&gt;
    BoundingBox boundingBox;&lt;br /&gt;
    ElementCountMap elementCountMap;&lt;br /&gt;
} Header;&lt;br /&gt;
&lt;br /&gt;
Header header;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====smbpl.bt====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
//--- 010 Editor v6.0 Binary Template&lt;br /&gt;
//&lt;br /&gt;
// File: smbpl.bt&lt;br /&gt;
// Author: Cliff Hudson&lt;br /&gt;
// Revision: 0.1867&lt;br /&gt;
// Purpose: StarMade Blueprint Logic file&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
&lt;br /&gt;
struct Vector3s&lt;br /&gt;
{&lt;br /&gt;
    short x;&lt;br /&gt;
    short y;&lt;br /&gt;
    short z;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    short blockId;&lt;br /&gt;
    int numBlocks;&lt;br /&gt;
    Vector3s blockPositions[numBlocks];&lt;br /&gt;
} ControllerGroup &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    Vector3s controllerPosition;&lt;br /&gt;
    int numGroups;&lt;br /&gt;
    ControllerGroup groups[numGroups];&lt;br /&gt;
} ControllerEntity &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int version;&lt;br /&gt;
    int numControllers;&lt;br /&gt;
    ControllerEntity entities[numControllers];&lt;br /&gt;
} ControllerMap &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
ControllerMap controllerMap;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====smbpm.bt====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
//--- 010 Editor v6.0 Binary Template&lt;br /&gt;
//&lt;br /&gt;
// File: smbpm.bt&lt;br /&gt;
// Author: Cliff Hudson&lt;br /&gt;
// Revision: 0.1867&lt;br /&gt;
// Purpose: StarMade Blueprint Meta file&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
enum &amp;lt;byte&amp;gt; TagType&lt;br /&gt;
{&lt;br /&gt;
    Finish = 1,&lt;br /&gt;
    SegManager = 2,&lt;br /&gt;
    Docking = 3&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
struct TagList;&lt;br /&gt;
struct TagStructure;&lt;br /&gt;
struct Payload;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    byte x;&lt;br /&gt;
    byte y;&lt;br /&gt;
    byte z;&lt;br /&gt;
} Vector3b;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int x;&lt;br /&gt;
    int y;&lt;br /&gt;
    int z;&lt;br /&gt;
} Vector3i;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    float x;&lt;br /&gt;
    float y;&lt;br /&gt;
    float z;&lt;br /&gt;
} Vector3f;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    float x;&lt;br /&gt;
    float y;&lt;br /&gt;
    float z;&lt;br /&gt;
    float w;&lt;br /&gt;
} Vector4f;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    short nameLen;&lt;br /&gt;
    char name[nameLen];&lt;br /&gt;
    Vector3i dockingPos;&lt;br /&gt;
    Vector3f dockingSize;&lt;br /&gt;
    short dockingStyle;&lt;br /&gt;
    byte dockingOrientation;&lt;br /&gt;
} DockedEntry &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int dockedCount;&lt;br /&gt;
    DockedEntry dockedEntry[dockedCount];&lt;br /&gt;
} DockedBlueprints &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    unsigned short stringLen;&lt;br /&gt;
    char str[stringLen];&lt;br /&gt;
} String &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int length;&lt;br /&gt;
    byte data[length];&lt;br /&gt;
} ByteArray &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct (byte type)&lt;br /&gt;
{&lt;br /&gt;
    switch(type)&lt;br /&gt;
    {&lt;br /&gt;
        case 0:&lt;br /&gt;
            break;&lt;br /&gt;
        case 1: // Byte&lt;br /&gt;
            byte dataByte;&lt;br /&gt;
            break;&lt;br /&gt;
        case 2: // Short&lt;br /&gt;
            short dataShort;&lt;br /&gt;
            break;&lt;br /&gt;
        case 3: // Int&lt;br /&gt;
            int dataInt;&lt;br /&gt;
            break;&lt;br /&gt;
        case 4: //Long&lt;br /&gt;
            int64 dataLong;&lt;br /&gt;
            break;&lt;br /&gt;
        case 5: // Float&lt;br /&gt;
            float dataFloat;&lt;br /&gt;
            break;&lt;br /&gt;
        case 6: // Double&lt;br /&gt;
            double dataDouble;&lt;br /&gt;
            break;&lt;br /&gt;
        case 7: // Byte array&lt;br /&gt;
            ByteArray byteArray;&lt;br /&gt;
            break;&lt;br /&gt;
        case 8: // String&lt;br /&gt;
            String dataString;&lt;br /&gt;
            break;&lt;br /&gt;
        case 9: // Float vector&lt;br /&gt;
            Vector3f floatVector;&lt;br /&gt;
            break; &lt;br /&gt;
        case 10: // int vector&lt;br /&gt;
            Vector3i intVector;&lt;br /&gt;
            break;&lt;br /&gt;
        case 11: // Byte vector&lt;br /&gt;
            Vector3b byteVector;&lt;br /&gt;
            break;&lt;br /&gt;
        case 12: // List&lt;br /&gt;
            TagList list;&lt;br /&gt;
            break;&lt;br /&gt;
        case 13: // Struct&lt;br /&gt;
            TagStructure structure;&lt;br /&gt;
            break;&lt;br /&gt;
        case 14: // Factory registration&lt;br /&gt;
            byte factoryId;&lt;br /&gt;
            break;&lt;br /&gt;
        case 15: // Float4 vector&lt;br /&gt;
            Vector4f float4Vector;&lt;br /&gt;
            break;&lt;br /&gt;
    }&lt;br /&gt;
} Payload &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    byte type;&lt;br /&gt;
    if(type &amp;gt; 0)&lt;br /&gt;
    {&lt;br /&gt;
        String name;&lt;br /&gt;
    }&lt;br /&gt;
    if(type != 0)&lt;br /&gt;
    {&lt;br /&gt;
        Payload payload(Abs(type));&lt;br /&gt;
    }&lt;br /&gt;
} Tag &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    byte listType;&lt;br /&gt;
    int listLength;&lt;br /&gt;
    Payload payload(listType)[listLength]; &lt;br /&gt;
} TagList &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{    &lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        Tag tag;&lt;br /&gt;
    }&lt;br /&gt;
    while(tag.type != 0);    &lt;br /&gt;
} TagStructure&amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{    &lt;br /&gt;
    short version; // Current unused.  If this value is 0x1f8b, then from here &lt;br /&gt;
                   // forward - including these bytes - is a gzip compressed stream &lt;br /&gt;
                   // whose contents follow the same structure as the uncompressed &lt;br /&gt;
                   // version.&lt;br /&gt;
    Tag tag;&lt;br /&gt;
} TagRoot &amp;lt;optimize=false&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    unsigned int version;&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        byte tagType;&lt;br /&gt;
        switch(tagType)&lt;br /&gt;
        {&lt;br /&gt;
            case Finish:&lt;br /&gt;
                break;&lt;br /&gt;
&lt;br /&gt;
            case SegManager:&lt;br /&gt;
                TagRoot segmentManager;&lt;br /&gt;
                return;                &lt;br /&gt;
&lt;br /&gt;
            case Docking:&lt;br /&gt;
                DockedBlueprints dockedBlueprints;&lt;br /&gt;
                break;&lt;br /&gt;
        }&lt;br /&gt;
    } while(tagType != Finish);    &lt;br /&gt;
} Metadata;&lt;br /&gt;
&lt;br /&gt;
Metadata metadata;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====smd2.bt====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
//--- 010 Editor v6.0 Binary Template&lt;br /&gt;
//&lt;br /&gt;
// File: smd2.bt&lt;br /&gt;
// Author: Cliff Hudson&lt;br /&gt;
// Revision: 0.1867&lt;br /&gt;
// Purpose: Starmade Region Data file&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    BitfieldDisablePadding();&lt;br /&gt;
    BitfieldLeftToRight();&lt;br /&gt;
    byte orientation : 3;&lt;br /&gt;
    byte hitpoints: 8;        &lt;br /&gt;
    byte isActive: 1;&lt;br /&gt;
    ushort blockId: 12;   &lt;br /&gt;
} BlockData;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int x;&lt;br /&gt;
    int y;&lt;br /&gt;
    int z;&lt;br /&gt;
} Vector3i;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int segmentId;&lt;br /&gt;
    int segmentSize;&lt;br /&gt;
} SegmentIndex;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int version;&lt;br /&gt;
    SegmentIndex indices[16*16*16];&lt;br /&gt;
    int64 timestamps[16*16*16];&lt;br /&gt;
} RegionHeader;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    // NOTE: This struct will always come out to 5120 bytes total, even if the &lt;br /&gt;
    //       data field ends up being shorter (it will simply be padded out.)&lt;br /&gt;
    //       This allows the SegmentIndex to trivially find the data on disk without&lt;br /&gt;
    //       loading the entire file.&lt;br /&gt;
    //       No longer the newest format, though this format may apply to blueprints with&lt;br /&gt;
    //       an SMD file version of 0.&lt;br /&gt;
    int64 timestamp;&lt;br /&gt;
    Vector3i segmentPosition;&lt;br /&gt;
    int dataLength;  &lt;br /&gt;
    unsigned byte segmentType;    &lt;br /&gt;
    byte data[5120-25];  // zlib compressed array of BlockData&lt;br /&gt;
} SegmentDataOld;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    byte version;&lt;br /&gt;
    // NOTE: This struct will always come out to 5120 bytes total, even if the &lt;br /&gt;
    //       data field ends up being shorter (it will simply be padded out.)&lt;br /&gt;
    //       This allows the SegmentIndex to trivially find the data on disk without&lt;br /&gt;
    //       loading the entire file.&lt;br /&gt;
    //       Valid as of 0.1867, smd file version 1 (RegionHeader.version).&lt;br /&gt;
    int64 timestamp;&lt;br /&gt;
    Vector3i segmentPosition;   &lt;br /&gt;
    unsigned byte dataByte; // If 1, there is valid data here    &lt;br /&gt;
    int compressedSize;&lt;br /&gt;
    byte data[5120-26];  // zlib compressed array of BlockData&lt;br /&gt;
} SegmentData;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    RegionHeader header;&lt;br /&gt;
    SegmentData data[4096];&lt;br /&gt;
} Region;&lt;br /&gt;
&lt;br /&gt;
Region region;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====smd3.bt====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
//--- 010 Editor v6.0 Binary Template&lt;br /&gt;
//&lt;br /&gt;
// File: smd3.bt&lt;br /&gt;
// Revision: 0.199.159&lt;br /&gt;
// Purpose: Starmade Region Data file&lt;br /&gt;
//--------------------------------------&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    BitfieldDisablePadding();&lt;br /&gt;
    BitfieldLeftToRight();&lt;br /&gt;
    byte orientation : 3;&lt;br /&gt;
    byte isActive: 1;&lt;br /&gt;
    byte hitpoints: 9;&lt;br /&gt;
    ushort blockId: 11;   &lt;br /&gt;
} BlockData;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int32 x;&lt;br /&gt;
    int32 y;&lt;br /&gt;
    int32 z;&lt;br /&gt;
} Vector3i;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int16 segmentId;&lt;br /&gt;
    int16 segmentSize;&lt;br /&gt;
} SegmentIndex;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    int32 version;&lt;br /&gt;
    SegmentIndex indices[16*16*16];&lt;br /&gt;
} RegionHeader;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    // NOTE: This struct will always come out to 49152 bytes total, even if the &lt;br /&gt;
    //       data field ends up being shorter (it will simply be padded out.)&lt;br /&gt;
    //       This allows the SegmentIndex to trivially find the data on disk without&lt;br /&gt;
    //       loading the entire file.&lt;br /&gt;
    byte version;&lt;br /&gt;
    int64 timestamp;&lt;br /&gt;
    Vector3i segmentPosition;   &lt;br /&gt;
    unsigned byte dataByte; // If 1, there is valid data here    &lt;br /&gt;
    int compressedSize;&lt;br /&gt;
    byte data[49152-26];  // zlib compressed array of (32x32x32) BlockData&lt;br /&gt;
} SegmentData;&lt;br /&gt;
&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    RegionHeader header;&lt;br /&gt;
    SegmentData data[ ( FileSize() - 16388 ) / 49152 ];&lt;br /&gt;
} Region;&lt;br /&gt;
&lt;br /&gt;
Region region;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
Added SegmentDataOld to smd2 format, reflecting the previous format for block data for this file.  It changed somewhere prior to v0.1867, but this is verified correct on 0.1867.&lt;br /&gt;
Initial creation for version 0.1867.&lt;/div&gt;</summary>
		<author><name>Jojomo</name></author>
		
	</entry>
</feed>