
The meaning of properties and components in blueprints derived from BP_Firearm_Master
.
A rundown is given below of the meaning and usage of the properties that you will see in blueprints derived from BP_Firearm_Master
. Just as you will have derived your custom firearm from a specific firearm master blueprint, all firearm master blueprints are child classes of BP_Firearm_Master
. Individual firearm master blueprints will generally have different properties, different meshes, and different components possibly, but a vast majority of the properties of individual firearm master blueprints will be shared.
If in doubt, just stick to the default values for properties. |
Only the most relevant sections are shown below, and only the most relevant properties within those sections are described.
Properties whose purpose and content are deemed relatively self-explanatory are also omitted below.
In some cases, properties are working variables, which is to say that they are set and used at runtime.
For example, |
Camera Shake Class
this specifies a type of camera shake that will be played whenever the weapon is fired.
No More Ammo Text
this text is displayed when the weapon is out of ammo and the player tries to fire it.
Max Dry Fire Trigger Pulls
this is how many times to play the ‘dry fire’ animation if the player attempts to shoot the weapon without any ammo in it.
Alpha Difference Threshold
0.3 is fine. Let’s go with 0.3.
Type
This is simply Handgun
for sidearms, or it can be one of six predetermined types for primary weapons, determining the subcategory the weapon is displayed under when selecting primary weapons in the character editor:
AssaultRifle
BattleRifle
LightMachineGun
Shotgun
SubmachineGun
Marksman
Firing Modes
each firing mode has a separate entry in this table, defining the number of shots fired (so long as the trigger is held down) and the rate of fire (measured in seconds between shots).
Burst Count
A value of 0 is considered full-auto
; a value of 1 is considered semi-auto
; and a value greater then 1 is considered a burst
(and the fire selector options when pressing X will be created automatically in accordance with this table).
Rate of Fire
The time between shots in seconds. For example: for 600 rounds per minute, set this to 60/600 = 0.1.
Barrel Aim Angle Threshold
This is the maximum angle difference between the barrel and the forward view of the player in order to fire when the instigator is not in the ready or engaged weapon position.
Min Sight Relative X
This value is used to determine when to disallow placing a sight too far back. It compares the relative X location of the sight/"Back" socket against this arbitrary configurable value. If the sight/"Back" socket has a relative X location less than this, it is considered invalid.
Max Grip Relative X
This value is used to determine when to disallow placing a grip too far forward. It compares the relative X location of the grip against this arbitrary configurable value. If the grip has a relative X location greater than this, it is considered invalid.
These properties are common to every ‘GB Item’ in game, and define inventory properties of the item (in this case weapon).
Item Asset Type
This should be PrimaryFirearm or Sidearm, depending on what you are making.
Item Weight
This is the weight of the rifle (without any attachments) in kilograms. The M16A4 stock rifle has a weight of 3.257, for example.
Display Name
This is the name that should be used for the weapon in-game.
Icon
This should be set to a UI texture (Texture2D type) with an icon of the weapon.
Left and Right Equip/Equipped tags: it is highly recommended to leave these as-is, as defined in the specific weapon class master blueprint.
These properties are set at runtime and are used to convey information from Ground Branch and the weapon blueprint to the animation blueprint.
Weight No Cover Advance
Determines relatively how likely it is that an AI using this weapon will advance towards the enemy when taking fire. This may be weighted relatively highly for assault style weapons, for example.
Weight No Cover Go Prone
Determines relatively how likely it is that an AI using this weapon will drop to prone when taking fire. This may be weighted relatively highly for light machine guns, for example.
Weight No Cover Go Crouch
Determines relatively how likely it is that an AI using this weapon will crouch down when taking fire.
Recoil Montage
This is the animation montage to display when a shot is fired.
Prone Recoil Montage
This is the animation montage to display when a shot is fired from prone.
For a choice of in-built recoil animation montages for different weapons and calibres, search for AM_XXX_Recoil_YYY
montages in GBCore/Character/Animations/...
For all the other settings, it is highly recommended to just use the default values in the relevant weapon master blueprint.
Again, it is highly recommended to use the default audio setup for the specific weapon type master blueprint. You can swap in different individual events (wwise terminology for 'sounds') from other banks, but you will then need to make sure the new banks are included in the Audio Banks list as well, and that will take up more memory and load a little slower.
Flash FXNiagara
This is the Niagara effect to use when a muzzle flash occurs
Smoke FXNiagara
This is the Niagara effect to use for muzzle smoke (after each shot)
Shell FXNiagara
This is the Niagara effect to use for spawning used shells (after each shot)
Recoil Impulse Time
This variable doesn’t have a very well defined physical meaning. A higher value means recoil will be more severe.
Recoil Recovery Time
This variable doesn’t have a very well defined physical meaning. A higher value means recoil will be more severe.
Recoil per shot
These properties define the extent of the deflection (up and down) caused by each shot, in degrees, and in engaged position (Engaged Recoil Per Shot) and otherwise (Recoil Per Shot). A random value for the pitch and yaw is chosen within the specified ranges on each shot.
Firearm Sound Type
This is the name of the sound bank that should be used for firearm sounds. You will most likely want to use one of the built-in weapon sound banks. If you are feeling brave, you can check out modding with Wwise.
These properties are relatively finely tuned and should not be altered if possible. These are unitless constants that have fairly self-evident effects. High recovery values mean a quick recovery, and high exhaustion values mean a quicker stamina exhaustion when holding the weapon in engaged or ready posture.
Customisation Widget
This is a widget class (UI element, essentially) which handles the customisation of the firearm. The default WBP_FirearmCustomisation widget should normally suffice, but some weapons need a custom widget to handle quirks in the weapon setup.
The more specific weapon blueprints listed here will usually have a more detailed component list. Regardless, the firearm components that you can add (and in some cases have to add) to a custom blueprint include:
GBBarrelComponent
('Barrel'): barrel component
GBExternalMagazineComponent
('MagWell'): magwell component
GBInternalMagazineComponent
('InternalMagazine'): internal magazine component
GBTubeMagComponent
('TubeMag'): tube mag component
GBEjectComponent
('EjectionPort'): eject component
GBSightComponent
('Sight'): sight component
GBRailComponent
('Rail'): rail component