Firearm Settings

This page provides an in-depth explanation for all settings found on the BP_FPS_Firearm.

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.

Core

Damage

Defines the damage dealt per projectile that hits the target.

This damage might be amplified on a critical hit / headshot (refer to Headshot Multiplier).

Fire Rate

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.

Projectile Count

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.

Fire Mode

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.

Burst Fire Count

Defines how many shots are fired per burst fire salve.

This value is only relevant with the Fire Mode set to Burst Fire.

Trace Mode

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.

  • Projectile: Bullets are simulated projectiles with a defined flight speed (refer to Bullet Speed) 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).

Headshot Multiplier

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.

Ammunition

Reload Time

Defines how long the weapon takes for a full reload (in seconds).

The reload animation will be sped up / slowed down if needed.

Magazine Size

Defines the magazine size of the firearm.

Note: If the Realistic Chamber Mode 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).

Ammunition Type

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.

Auto Reload

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

Carry Over Cartridges

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.

Staged Reload

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.

Realistic Chamber Mode

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.

Infinite Ammo

When enabled, the firearm can fire infinitely without using up ammunition.

Projectile

Bullet Speed

This setting is only relevant if the Trace Mode is set to Projectile.

It defines the flight speed of any projectiles fired by this weapon in cm/s.

Maximum Range

Defines the maximum range of the weapon in centimeters.

  • Trace Mode =Hit Scan -> The line trace will end after this distance.

  • Trace Mode = Projectile -> Projectiles will despawn after traveling this distance.

Accuracy

Weapon Inaccuracy

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.

Vertical Recoil Strength

Defines how much vertical recoil is applied after every fired shot.

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 Aim Offset Speed.

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%.

Horizontal Recoil Strength

Defines how much horizontal recoil is applied after every fired shot.

As for the Vertical Recoil Strength, 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.

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%.

Scoped Aim Sway Strength

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.

Aim Offset Speed

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

Aim Return Speed

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

Animations

Make sure that all animation montages use notifies to play any required sounds / effects.

Fire Montage

Defines the animation montage that will be played when the weapon fires.

Dry Fire Montage

Defines the animation montage that will be played when the weapon dry fires (player tries to shoot with an empty magazine).

Reload Montage

Defines the animation montage that will be played when the player reloads their firearm.

User Interface

UI Name

Specifies the weapon name that is shown in the player UI when this firearm is equipped.

UI Icon

Specifies the icon that is shown in the player UI when this firearm is equipped.

Last updated