Firearm Settings
This page provides an in-depth explanation for all settings found on the BP_FPS_Firearm.
Last updated
This page provides an in-depth explanation for all settings found on the BP_FPS_Firearm.
Last updated
All settings described here can be easily tweaked using the details panel. Note that hovering over each variable in-engine also displays an explanation for each setting.
Defines the damage dealt per projectile that hits the target.
This damage might be amplified on a critical hit / headshot (refer to ).
Defines the fire rate of the weapon in shots per second.
More specifically, this defines how long it takes for a new cartridge to enter the chamber after firing. Firearms that have a cartridge in the chamber are always ready to be fired.
Defines how many projectiles are spawned per shot.
Increase this number to create a shotgun-style firearm.
Only one cartridge will be drained from the magazine per shot, regardless of the projectile count.
Defines the weapon's current fire mode.
There are 3 different fire modes to choose from:
Semi Automatic: Each pull of the trigger fires a single round.
Full Automatic: Holding down the trigger continuously fires rounds until the ammunition is depleted or the trigger is released.
Burst Fire: In burst fire mode, a single trigger pull fires a predetermined number of rounds. The player needs to release the trigger before they can fire another burst.
The weapon can only fire if there is a cartridge in the chamber of the firearm.
This value can be updated during runtime by calling the Change Fire Mode
Event.
Defines how many shots are fired per burst fire salve.
Defines the trace mode of the weapon. This influences the logic of all bullets fired by this firearm.
There are 2 different trace modes to choose from:
Hit Scan: Bullets use a line trace to determine the hit target. This means hits are instantaneous, with no simulated projectile.
Defines the damage multiplier that is applied to the base damage when a weak spot is hit.
Example: Base Damage = 10 Headshot Multiplier = 1,5 -> Headshot = 10 * 1,5 = 15 damage
Hits will count as a headshot if the hit component has the Head
tag.
Defines how long the weapon takes for a full reload (in seconds).
The reload animation will be sped up / slowed down if needed.
Defines the magazine size of the firearm.
Defines what ammunition type this weapon uses.
The ammunition reserves (used to reload weapons) are stored on the player character using the AC_FPS_Reserves
component.
By default, the reserves component stores rifle, pistol, and shotgun ammunition.
If the player was to own 2 rifles and 1 pistol, both rifles would share the rifle ammunition pool to reload, while the pistol uses the separate pistol ammunition pool.
If enabled, the gun will automatically start reloading if the fire button is pressed with an empty magazine (in case Realistic Chamber Mode
is enabled, the chamber must be empty as well).
Defines whether the player wastes ammunition when reloading with a non-empty magazine.
If this setting is enabled, any ammunition in the current magazine will be added back to the player reserves - no ammunition will be wasted.
If this setting is disabled, the player will lose ammunition when reloading with a non-empty magazine.
If enabled, the reload will be split into 3 stages:
Remove magazine
Insert new magazine
Cycle Action
The weapon can start/continue the reload at any stage.
For example, the player can remove the magazine, then cancel the reload. When the player reloads again, the reload will start with inserting a new magazine.
If enabled, the chamber can hold one cartridge by itself. This means that the weapon can still be ready to fire one shot even if the player removes the magazine. Furthermore, when a full magazine is inserted, the firearm can have one extra cartridge (1 above the magazine size).
When used in combination with staged reloads, reloading with a cartridge still in the chamber will be faster (the player does not need to manually cycle the action to move the first cartridge into the chamber).
If this setting is disabled, the chamber cannot hold a cartridge. Then, the shots available won't go over the magazine size limit. Reloads also won't be faster when reloading with a cartridge in the chamber.
If realism is the goal, it is recommended to enable this setting. However, most video games do not use this logic - some players might be confused by it.
When enabled, the firearm can fire infinitely without using up ammunition.
It defines the flight speed of any projectiles fired by this weapon in cm/s.
Defines the maximum range of the weapon in centimeters.
Defines the inaccuracy of the weapon in degrees.
For example, an inaccuracy of 10 means that the shots can be up to 10 degrees off where player actually aimed.
Note: The player inaccuracy is added on top of this value to calculate the total inaccuracy. This value should only be set to control the inaccuracy of the firearm.
The player accuracy is set on the player blueprint by calling the Update Player Inaccuracy
function on the active firearm.
Defines how much vertical recoil is applied after every fired shot.
Check out the Add Recoil
and Apply Aim Camera Offset
function on the BP_FPS_Firearm
blueprint to learn how this value is used in code.
How high you should set this value depends mostly on the weapon fire rate. It is recommended to simply try out different values in-game to get a feel for the recoil strength.
Value Range (fire rate of 12):
0.5 = Low Recoil
1.0 = Normal Recoil
2.5 = High Recoil
Note: While aiming down sights, all recoil is reduced by 25%.
Defines how much horizontal recoil is applied after every fired shot.
In short, the horizontal recoil value is multiplied by 0.5 and Perlin noise. This will make the weapon sway left and right while shooting. Increasing the 3x factor in the Add Recoil
function will make the firearm change sway direction more rapidly.
Value Range (fire rate of 12):
0.5 = Low Recoil
1.0 = Normal Recoil
2.5 = High Recoil
Note: While aiming down sights, all recoil is reduced by 25%.
Defines how much the player camera will sway around while aiming down sights.
Increasing this value will make it harder for the player to hold a steady aim while aiming down sights.
Value Range:
0.5 = Low Sway
1.0 = Normal Sway
2.5 = High Sway
The aim sway is generated using Perlin noise and fed to the player controller using the Add Yaw/Pitch Input
nodes.
Any added recoil will push the player camera upwards.
This value defines how fast/sudden this upwards movement happens.
Value Range:
15 = Slow Offset Speed
25 = Normal Offset Speed
50 = Near Instant Aim Offset
The firearm will automatically try to move the player crosshair back to the original position after recoil has been applied.
This value defines how fast/sudden the crosshair will return to its original position.
Value Range:
15 = Slow Return Speed
25 = Normal Return Speed
50 = Near Instant Aim Return
Make sure that all animation montages use notifies to play any required sounds / effects.
Defines the animation montage that will be played when the weapon fires.
Defines the animation montage that will be played when the weapon dry fires (player tries to shoot with an empty magazine).
Defines the animation montage that will be played when the player reloads their firearm.
Specifies the weapon name that is shown in the player UI when this firearm is equipped.
Specifies the icon that is shown in the player UI when this firearm is equipped.
This value is only relevant with the set to Burst Fire
.
Projectile: Bullets are simulated projectiles with a defined flight speed (refer to ) and possibly even gravity (disabled by default - open the BP_FPS_Bullet
blueprint and update the Projectile Gravity Scale
on the attached Projectile Movement
component to change this).
Note: If the is enabled, an additional cartridge can be stored in the weapon under certain circumstances (a full magazine is inserted while there is still a cartridge in the chamber).
This setting is only relevant if the is set to Projectile
.
=Hit Scan
-> The line trace will end after this distance.
= Projectile
-> Projectiles will despawn after traveling this distance.
In short, the vertical recoil value is multiplied by -0.5 and then given as a player controller as a pitch input over a short duration, defined by the .
As for the , check out the Add Recoil
and Apply Aim Camera Offset
function on the BP_FPS_Firearm
blueprint to learn how this value is used in code.
Head
tag to any component to mark them as a weak spot.Add Recoil
function on the BP_FPS_Firearm
blueprint.
Then, update the values in the multiply node (0.75x is the default).