Fallout 4 weapon mods

Overview
Weapon mods can be built from raw materials and attached to weapons at weapons workbenches. There are over 700 mods, generally including sights, barrels, stocks, receivers, magazines and more. The Gun Nut perk is required to create better modifications for guns. The Science! perk is used to create better modifications for energy weapons and create advanced modifications for bullet based firearms. The Blacksmith perk is used to create better modifications for melee weapons.

Perks and weapon mods
Most firearms, including energy weapons, offer the option to customize the grip/stock, receiver and sight, changing which perks affect the weapon.
 * A firearm with an automatic receiver gets bonuses from the Commando perk.
 * A firearm with a non-automatic receiver and pistol grip get bonuses from the Gunslinger perk.
 * A firearm with a non-automatic receiver and a stock mod get bonuses from the Rifleman perk.
 * The Sniper perk only works with a non-automatic firearm with a scope, which use the "hold breath" mechanic.

Grip mods create pistol weapons, while stock mods create rifle weapons. This allows for almost any ranged firearm to be customized to fit the player's character build.

Action Points and weapon mods
Weapons and Mods utilize a "multiple step value system" when consuming action points per shot
 * Actual formula = Base AP cost + (Mod value x Step Amount)


 * 10mm pistol base multiple: 1.4 (bv 21)
 * Combat shotgun base multiple: 1.75 (bv 31.5)
 * Hunting rifle base multiple: 1.4 (bv 25.2)
 * Combat rifle base multiple: 1.25 (bv 22.5)
 * Laser base multiple: 1.25 (bv 21)

Combat rifle base value of 22.5 + (reflex sight [-3] x Weapon Mod [1.25]) = 18.75 AP cost per shot
 * Example


 * 10mm Receiver Mods AP Cost  Multiple Step Values


 * Basic:                 21      (0: default)
 * Light:                 14      (-5)
 * Heavy:                 28      (+5)
 * Calibrated:            21      (0)
 * Hardened:              21      (0)
 * Auto:                  28      (+5)
 * AP Auto:               28      (+5)
 * Hair Trigger:          18.5    (-2)
 * Powerful:              21      (0)
 * Hardened Auto:         28      (+5)
 * Rapid Auto:            28      (+5)
 * Calibrated Powerful:   21      (0)
 * Hardened Piercing Auto: 30.8   (+7)
 * Advanced:              18.2    (-2)
 * Powerful Auto:         28      (+5)


 * Barrel Mods AP Cost  Multiple Step Values


 * Short:                 21      (0: default)
 * Long:                  22.4    (+1)
 * Long Light:            28      (+0)
 * Long Ported:           22.4    (+1)
 * Long Light Ported:     21      (0)


 * Grip Mods AP Cost  Multiple Step Values


 * Standard:              21      (0)
 * Comfort:               21      (0)
 * Sharpshooter:          19.6    (-1)


 * Magazine Mods AP Cost  Multiple Step Values


 * Standard:              21      (0)
 * Large:                 23.8    (+2)
 * Quick Eject:           19.6      (-1)
 * Large Quick Eject:     21      (0)