Weapons

----
Weapons are used by colonists and raiders alike to fight each other (and sometimes to put down enraged animals). Weapons have several characteristics that make them useful in different combat situations. They currently do not consume any ammunition, but instead take time to aim and additional cooldown time for subsequent shots.
If left exposed with no roof, a weapon on the ground will deteriorate until it disintegrates without a trace. Weapons stored in a shelf will not deteriorate, even if left outside.
Weapons of quality Excellent or higher have an engraving that can be read by clicking the Art tab from the inspect pane.
== Ranged weapons ==
Range weapons consist mostly of firearms, as well as explosives, other non-gunpowder weapons like bows and throwing spears, and more advanced weapons like the charge rifle. A ranged weapon's accuracy and damage are also affected by its quality level.
=== Firing cycle ===
Once a target is selected, and the shooter is in range, the firing cycle of ranged weapons can be broken down into three phases. 
# Aiming time. Sometimes referred to as warm-up. During this period the shooter will remain stationary and aim at the target before firing. The time this takes depends on the aiming time of the weapon, multiplied by the aiming time stat of the shooter. The remaining time until firing is displayed by a translucent white wedge displayed in front of the shooter. The wedge slowly thins until it disappears and the shot or burst is fired. During this time, the firing action can be canceled.
# Firing. Once aiming has finished, the pawn will fire the weapon. Ranged weapons either fire a single shot or a number of shots in sequence called a burst. The number of shots in a burst is determined by the weapon type and cannot be changed. Once begun, firing can't be interrupted manually, however it can be interrupted, such as by stunning. A burst will also end early if the target dies or is destroyed. There is a short delay, called "burst ticks", after every shot in the burst but the last. 
# Cooldown. Once firing is complete, a cooldown occurs. During this period the shooter will remain stationary. The time this takes depends on the cooldown time of the weapon, multiplied by the Ranged Cooldown Multiplier stat of the shooter.
Once this cycle is complete, the process repeats.
Thus optimum is determined by the following equation:
Max DPS = (Damage × Burst Shot Count) ÷ ((Ranged Cooldown (ticks) + Warm-up (ticks) + (Burst Time (ticks) * (Burst Count - 1)) ÷ 60)
This optimum DPS is then affected by accuracy to determine the actual DPS on target.
=== Range ===
The ranges are measured in tiles and correspond to:
* Touch = 3 tiles.
* Short = 12 tiles.
* Medium = 25 tiles.
* Long = 40 tiles.
Every ranged weapon has an accuracy for each range point. Between those ranges, the accuracy of the weapon is linearly interpolated. A weapon will never fire past its range stat, even if it has an accuracy value listed for longer ranges. For example, a pump shotgun, with a maximum range of tiles, a Short range accuracy of % and a Medium range accuracy of %. It will never fire at a target tiles away, but at a range of 14 tiles, its accuracy will be 2/13 of the way between the Short and Medium range accuracy values, or %.
Ranged weapons wielders cannot fire at targets that are in melee range of themselves, but can target more distant enemies while engaged in melee. Note that NPCs will never target another pawn while engaged in melee.
=== Accuracy ===
Ranged weapon accuracy follows the following equation:
Accuracy = (Shooting AccuracyRange × Weapon Accuracy × Weather × Smoke × Cover) + Combat in Darkness
Where:
* Shooting Accuracy: Is the stat of the shooting pawn.
* Range: Is the distance in tiles between the shooter and the target.
* Weapon Accuracy: Is the weapon accuracy of the weapon at that range. If it is not one of the listed values at 3, 12, 25, or 40 tiles, it is linearly interpolated between the nearest point above and the nearest point below the current range.
* Weather: Is the accuracy modifier for a given weather ranging from 50% for Fog, to 100% on a clear day.
* Smoke: If smoke occupies any tile directly between the shooter and target, it applies a 30% modifier (otherwise 100%).
* Cover: Cover modifier for the target, based on cover objects and shooting angle.
* Body size: A modifier based on the body size of the target. 0.5x for body sizes of 0.5 or lower, equal to body size for body size between 0.5 and 2.0, and 2.0x for body sizes of 2.0x or higher.
* Combat in Darkness Preferred Precept: If the shooter has the precept and the target is in darkness, +25% accuracy. If the shooter has the precept and target is not in darkness, -20% accuracy. Otherwise, 0%. For this precept, "darkness" is considered: 1. "Indoors" with 0% light level, 2. "Indoors" lit by only dark light, or 3. Outdoors or Unroofed, only if the sun is at 0% light level. 
Related to accuracy, there are also friendly fire mechanics that prevent misses from hitting nearby allies within a certain radius.
=== Stopping power ===
Stopping power is the ability of ranged weapons to cause stagger when hitting a target, slowing them down for a short period. The size of the number relates directly to the body size of the pawn that can be staggered by the weapon - thus, to stagger humans a stopping power of or higher is required while to stagger an elephant a stopping power of would be needed.
A typical ranged weapon has a stopping power of 0.5, however the following weapons have higher stopping powers:
, all weapons with a stopping power above 0.5, have a stopping power of at least 1 and are able to stagger humans.
=== Ranged weapons comparison table === 
Stats listed in the table below are for weapons that are of normal quality; better/worse quality will raise/lower the % to hit as appropriate.
DPS (Optimal) refers to the theoretical DPS if every single shot were to hit the target. DPS for the various ranges takes into account the weapon's accuracy at the start of the defined range.
Technical limitations prevent the display of a more comprehensive table on this page. For a complete comparison table, see Weapon comparison table.
Name	Name	Damage		Stopping Power	Warm-Up(ticks)	Cooldown(ticks)	Range(tiles)	Burst Count	Burst (ticks)	Bullet Speed	Accuracy(Touch)	Accuracy(Short)	Accuracy(Medium)	Accuracy(Long)	Miss Radius	Blast Radius	DPS(Optimal)	DPS(Touch)	DPS(Short)	DPS(Medium)	DPS(Long)	Value
 
: At normal game speed, there are 60 ticks to one real world second. See: Time.
: This DPS assumes a single target - weapons with a blast radius may have higher effective DPS by virtue of hitting multiple targets.
=== Quality modifiers ===
Quality 	Accuracy Modifier	Base Damage Modifier	Armor Penetration Modifier
Awful 	0.80 	0.90 	0.90
Poor 	0.90 	1.00 	1.00
Normal 	1.00 	1.00 	1.00
Good 	1.10 	1.00 	1.00
Excellent 	1.20 	1.00 	1.00
Masterwork	1.35 	1.25 	1.25
Legendary 	1.50 	1.50 	1.50
== Melee weapons ==
These are touch-range weapons. Besides dedicated melee weapons, all ranged weapons can also be used as makeshift melee weapons.
The exact damage of a melee weapon is based on its quality level, with a low quality weapon dealing less damage and a high quality weapon dealing more.
Note that melee accuracy is determined by a colonist's melee skill and further modified by health stats of manipulation and sight, as well as the opponent's dodge chance.
Weapons of quality Excellent or higher have an engraving that can be read by clicking the Art tab from the inspect pane.
=== Base melee stats ===
The following stats are for a baseline human wielding weapons that are of normal quality and made out of steel (the baseline material). Other materials may do more or less average damage per second (DPS), as will better/worse qualities.
=== Material / Quality modifiers ===
Material	Cooldown speed factor	Damage factor (Blunt)	Damage factor (Sharp)	Max HP factor	DPS factor (Blunt)	DPS factor (Sharp)
Quality 	Base Damage Modifier
Awful 	0.80
Poor 	0.90
Normal 	1.00
Good 	1.10
Excellent 	1.20
Masterwork	1.45
Legendary 	1.65
Do note that stone blocks can only be used with clubs.
=== Melee formulas ===
==== General formulas ====
Damage for any melee weapon is Base Damage x Material Modifier x Quality Modifier
Cooldown is calculated as Weapon melee cooldown / Material melee cooldown
DPS (damage per second) is calculated as Damage / Cooldown. Note that you must use Cooldown (seconds) to get DPS, otherwise if you use Cooldown (Ticks) you'll calculate DPT (Damage Per Tick) which you probably don't want.
AP (armor piercing) defaults to 0.015 x Damage if no value is specified
Chance Factor defaults to 1 if no value is specified
==== Listed DPS on weapons ====
The DPS listed on the info tab for weapons is deceiving as it is no longer used when a pawn equips the item (see below). Regardless this is how it is computed based on the melee attack options the weapon has:
# For each attack option compute the Selection Weight = Damage x Damage
# For each attack option compute the Selection Chance = Selection Weight / SumOfAll(Selection Weights)
# Compute the Average Damage = SumOfAll(Damage x Selection Chance)
# Compute the Average Cooldown = SumOfAll(Cooldown x Selection Chance)
# Compute the Average DPS = Average Damage / Average Cooldown
Note that this is mathematically incorrect (see below for more details). Below is an example with a Normal Persona Zeus Hammer:
Attack	Damage	Cooldown	Selection Weight	Selection Chance
head 	31 	2.2 	961 	81%
handle	15 	1.6 	225 	19%
Average Damage = 31 x 81% + 15 x 19% = 27.965
Average Cooldown = 2.2 x 81% + 1.6 x 19% = 2.086
Average DPS = 27.965 / 2.086 = 13.40
You can find more of these values in Dev mode >> Logging Menu >> Tools. There are also values listed for pawns and these are computed the same as above except that in step 1 you also multiply by 0.3 and the Chance Factor if one is specified. Note that just like the item values these are not actually used in the game anymore (see below).
==== Listed DPS on pawns ====
This is a system used since version 1.1.2610 and it is based on a category system. It is based on the attack options available however now we take both the options from the weapon as well as the options from the pawn (eg. fists) into account:
# For each attack option compute the Initial Selection Weight = Damage x (1 + AP) x Chance Factor / Cooldown
# For each attack option determine the Category based on the highest weight value we just computed:
#* Best if Initial Selection Weight >= 0.95 x MAX(Initial Selection Weight)
#* Worst if Initial Selection Weight < 0.25 x MAX(Initial Selection Weight)
#* Mid Otherwise
# For each attack option compute the Final Selection Weight based on the categories:
#* 0.75 / NumberOfOptionsIn(Best) if the option is in the Best category
#* 0.25 / NumberOfOptionsIn(Mid) if the option is in the Mid category
#* 0.0 if the option is in the Worst category
# For each attack option compute the Selection Chance = Final Selection Weight / SumOfAll(Final Selection Weights)
# Compute the Average Damage = SumOfAll(Damage x Selection Chance)
# Compute the Average Cooldown = SumOfAll(Cooldown x Selection Chance)
# Compute the Average DPS = Average Damage / Average Cooldown
Below is an example with a pawn carrying a Normal Persona Zeus Hammer (note that AP is not specified and therefore is defined as Damage x 0.015):
Attack 	Damage	Cooldown	Armor Piercing	Chance Factor	Initial Selection Weight	Category	Final Selection Weight	Selection Chance
head 	31 	2.2 	 	 	20.64 	Best 	0.75 	75.0%
handle 	15 	1.6 	 	 	11.48 	Mid 	0.125 	12.5%
left fist (archotech arm)	14 	2 	 	 	8.47 	Mid 	0.125 	12.5%
right fist 	8.2 	2 	 	 	4.60 	Worst 	0.00 	0.0%
teeth 	8.2 	2 	 	0.07 	0.32 	Worst 	0.00 	0.0%
head 	5 	2 	 	0.2 	0.54 	Worst 	0.00 	0.0%
Average Damage = 31 x 75% + 15 x 12.5% + 14 x 12.5% = 26.875
Average Cooldown = 2.2 x 75% + 1.6 x 12.5% + 2 x 12.5% = 2.100
Average DPS = 26.875 / 2.100 = 12.80
Note that in this case upgrading the left arm actually decreased the average DPS (from 13.17 to 12.80) by moving an inferior attack option from Worst to Mid.
There is a peculiarity in the description above as it seems that the AccuracyTouch properties of ranged weapons is not used. This may be a bug as it seems intended that it should have been used.
== Biocoding ==
Any weapons carried by non-colonists can arrive on the map "biocoded", meaning that weapon is only usable by the specific pawn that the weapon is biocoded to. Biocoding on weapons cannot be changed or erased, but pawns recruited as colonists will still be able to use weapons biocoded to them. These weapons are occasionally found on raiders, guests and other pawns, and cannot be sold. They can be smelted and have a specific option in both the bill menu and in stockpiles to allow their sorting.
== Unobtainable weapons ==
Certain weapons are equipped exclusively by mechanoids or turrets. These cannot be obtained independently from their regular users without the use of dev mode. When a normal pawn equips a debug-spawned weapon and then drops it, the weapon will disappear.
== Gallery ==
UnfinishedWeapon.png|Unfinished melee weapon
UnfinishedGun.png|Unfinished gun
== Version history ==
* 0.0.245 - Shooting accuracy split into misses due to equipment and misses due to skill.
* 0.0.250 - Melee attacks incap more than guns and explosives. N.b. That this change may or may not be represented in the current version. It was only added in this previous version.
* 0.8.657 - Melee weapons have a quality. Can now craft any kind of melee weapon from appropriate materials.
* 0.9.722 - High-quality weapons have art engraved into them. All weapons now have quality levels, including guns and bows. Quality affects accuracy. 
* Beta 19/1.0 - Debuffed ranged weapon melee attacks to be in line with fists in terms of DPS. Serious melee weapons (knife on upward) across the board 5%-10% DPS buff. Pawns hit by ranged attacks now stagger the same way as pawns hit by melee attacks. This effect only happens if the weapon's stopping power stat is equal or greater than the target's body size. Missed shots now have a 50% extra chance of hitting nothing; this will make missed shots less likely to hit random things (but doesn’t change the chance of missing).
* 1.1.0 - Biocoding added
#Weapons