Ninja Bear Studio Plugins Help

Configuring Firearms

The Firearms Module allows you to design weapons that operate using hitscans or projectiles. For more information, check the Firearms documentation.

This guide covers hitscan-based weapons. Projectile-based firearms follow the same general setup, but use projectile definitions instead of hitscan impact handling, similar to ranged combat.

Surfaces for Hitscans

Hitscan firearms use an Impact Table to represent surface impacts. This table defines the particles and sounds used for each surface configured in your project.

For more information, check the setup for Physical Materials.

Configure the Impact Table

Impact Table
  1. Create a new Data Table based on CombatImpactCosmeticsTableRow.

  2. Add a new row for each Physical Material relevant to your project.

    • Name each row after the corresponding Physical Material Data Asset.

    • Configure Particles and Sound Effects as needed.

Rifle Design

Rifles can be configured as single-shot, burst-fire, or fully automatic weapons. You can also extend the Firearm Component to switch between fire modes dynamically.

In this example, we will configure a fully automatic rifle.

Create the Rifle Data Asset

Rifle Data Asset
  1. In your Firearm Data folder, create a new Firearm Data Asset using the Content Browser contextual menu: Ninja Bear Studio → Ninja Combat → Firearm Definition.

  2. Configure the main properties for the rifle.

    • Set the Implementation to Hit Scan.

    • Set the Fire Mode to Automatic.

    • Set the Hit Scan Channel to Projectile.

    • Set the Fire Rate to a fast value, such as 7.

    • Set the Precision to 0.85.

    • Set the Base Pellet Damage to 20. This value is applied to the Firearm Damage Effect.

  3. Configure the Ammo Query to match the proper ammo in the Ammo Storage Component.

    Rifle Ammo
  4. Set both Ammo Limit and Initial Ammo to 30.

  5. Configure the Muzzle Socket Name if it is different from the default value.

  6. Add the muzzle particles and sound used when the weapon fires.

  7. Add the previously configured Impact Table.

Configure the Shoot Montage

Rifle Shoot Montage
  1. Create or open the Shoot Animation Montage used by the rifle.

  2. Add a section named Shoot. This section is used when the firearm plays its shooting animation.

    Keep this section short, only including the actual shooting part of the animation.

  3. Add the firing animation to the montage slots.

    • Use an Upper Body slot for shooting while the character is moving.

    • Use a Full Body slot for shooting while the character is standing still.

  4. Configure a short Blend-In Time, such as 0.05.

Configure the Reload Montage

Rifle Reload Montage
  1. Create or open the Reload Animation Montage used by the rifle.

  2. Add a section named Reload. This section is used when the firearm plays its reload animation.

  3. Add the reload animation to the montage slots.

    • Use an Upper Body slot for reloading while the character is moving.

    • Use a Full Body slot for reloading while the character is standing still.

  4. Add the Reload Ammo Animation Notify at the point where ammo should be restored.

Shotgun Design

A shotgun is also a hitscan-based weapon. It is configured as a single-shot firearm that fires multiple pellets per shot and uses a reload mode that adds one shell per animation loop.

Create the Shotgun Data Asset

Shotgun Data Asset
  1. In your Firearm Data folder, create a new Firearm Data Asset using the Content Browser contextual menu: Ninja Bear Studio → Ninja Combat → Firearm Definition.

  2. Configure the main properties for the shotgun.

    • Set the Implementation to Hit Scan.

    • Set the Fire Mode to Single Shot.

    • Set the Hit Scan Channel to Projectile.

    • Set the Fire Rate to 1.

    • Set the Pellets Per Shot to 8.

    • Set the Base Pellet Damage to 10. This value is applied to the Firearm Damage Effect.

  3. Configure the Ammo Query to match the proper shotgun ammo in the Ammo Storage Component.

    Shotgun Ammo
  4. Set both Ammo Limit and Initial Ammo to 8.

  5. Configure the reload settings.

    • Set the Reload Mode to Single.

    • Set Ammo Added to 1.

    • Set the Reload Loop Section to Loop.

    • Set the Reload End Section to End.

  6. Configure the shotgun spread.

    • Set the Precision to 0.65.

    • Set the Spread Angle to 8.

  7. Configure the Muzzle Socket Name if it is different from the default value.

  8. Add the muzzle particles and sound used when the weapon fires.

  9. Add the previously configured Impact Table.

Configure the Shoot Montage

Shotgun Shoot Montage
  1. Create or open the Shoot Animation Montage used by the shotgun.

  2. Add a section named Shot. This section is used when the firearm plays its shooting animation.

  3. Add a section named Exit. This section allows the montage to finish cleanly after the shot is fired.

  4. Add the firing animation to the montage slots.

    • Use an Upper Body slot for shooting while the character is moving.

    • Use a Full Body slot for shooting while the character is standing still.

  5. Configure a short Blend-In Time, such as 0.05.

Configure the Reload Montage

Shotgun Reload Montage
  1. Create or open the Reload Animation Montage used by the shotgun.

  2. Add a section named Reload. This section starts the reload animation.

  3. Add a section named Loop. This section is repeated while shells are being added to the firearm.

  4. Add a section named End. This section is played when the reload finishes.

  5. Add the reload animations to the montage slots.

    • Use an Upper Body slot for reloading while the character is moving.

    • Use a Full Body slot for reloading while the character is standing still.

  6. Add the Reload Ammo Animation Notify in the Loop section, at the point where one shell should be added.

    Since this shotgun uses a single-shell reload, this notify is triggered once per reload loop.

Firearm Operation

Firearm operation is split between two parts: Gameplay Abilities that execute weapon actions and Firearm Components that manage and update weapon data.

Ammo storage can also be integrated with Ninja Inventory. For more information, check the related Inventory Integration Guide.

Create the Shoot Ability

Firearm Shoot Ability
  1. Create a new Gameplay Ability based on CombatAbility_Shoot.

  2. Set the Animation Trigger to Blended In.

  3. Review the animation settings.

    • Set the Animation Provider to Firearm: Shoot. This provider retrieves the correct animation from the Firearm Component.

    • Set the Default Section Name to Shoot to match the montage section.

Create the Reload Ability

Firearm Reload Ability
  1. Create a new Gameplay Ability based on CombatAbility_Reload.

  2. Configure the reload settings.

    • Set the Reload Policy to Gameplay Event.

    • Set the Reloading Effect Class to your reload effect, such as CombatEffect_Reloading.

    • Configure the Weapon Query to find the equipped firearm.

  3. Review the animation settings.

    • Set the Animation Provider to Firearm: Reload. This provider retrieves the correct animation from the Firearm Component.

    • Set the Default Section Name to Reload to match the montage section.

  4. Add Ability.Activation.Reload so your input handling or AI can activate this ability by tag.

Add the Firearm Component

Firearm Component
  1. Open your Base Firearm Actor and browse to its Firearm Component.

  2. Assign the correct Aim based on your project's needs.

  3. Optionally, configure Aim Assist using the Gamepad Aim Assist implementation provided by the system.

    You need to provide a Targeting Preset that collects nearby targets for aim assist.

    Aim Assist Preset
  4. Open your Firearm Actor, such as the rifle or shotgun, and browse to its Firearm Component.

  5. Assign the correct Firearm Data Asset and Firearm Animations for shooting and reloading.

Add the Ammo Storage Component

Ammo Storage Component
  1. Open your base character and add the Ammo Storage Component.

  2. Browse to the Initial Ammo section and configure your Ammo Types and current amounts.

29 June 2026