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
This section is based on research presented in YouTuber RedMage's video: "Fallout 4: VATS and AP Formula Solved!"10mm pistol

The Formula
Attacking from V.A.T.S. uses up Action Points (AP). There are three numbers that determine what the AP cost is for every type of modded weapon: the weapon's base AP cost, the weapon's AP multiplier, and the mod's AP effect, and they do it based on this formula:


 * weapon base AP cost + (weapon AP multiplier x mod AP effect)

Each weapon has a different base value of action points that it uses per shot. For instance, a 10mm bare receiver costs 21 AP per shot in V.A.T.S., so its AP base value is 21.

Each type of weapon also has an AP multiplier that determines how much effect mods have on the AP of that type of weapon. Combat shotguns, for instance have an AP multiplier of 1.75, while laser guns have an AP multiplier of 1.25, meaning mods applied to combat shotguns will have a greater impact on AP (up or down) than mods on laser guns.

Finally, each mod has an AP effect, which is how strongly it changes the weapon's AP cost. There are some general patterns to how strongly the mods affect all gun types, but it's inconsistent. For instance, the reflex sight has a consistent -3 effect on all gun types tested, but the long barrel mod has an effect of +1 on 10mm pistols, but +4 on hunting rifles.

Weapon and mod details
A combat rifle (base AP cost = 22.5; AP multiplier = 1.25) with reflex sight (AP effect = -3):
 * Example
 * ''22.5 + (1.25 x -3) = 18.75 AP cost per shot


 * 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)