Skip to content

Firearms

Four guns ship: a pistol, a revolver, a pump shotgun and a bolt-action rifle. Ammunition is ordinary inventory, reloading takes time, and every shot is heard far away.

In the game

The four guns

Gun Asset Feed Damage Range Noise
Pistol DA_Weapon_Pistol 12-round magazine, plus a round in the chamber 80 1400 uu Noise.Gunshot.Pistol, loudness 3
Revolver DA_Weapon_Revolver six rounds, loaded one by one 60 1500 uu as quiet as the pistol
Pump shotgun DA_Weapon_Shotgun five shells, six pellets a shot 110 1200 uu Noise.Gunshot.Shotgun, loudness 9
Bolt-action rifle DA_Weapon_BoltRifle five rounds 140 2400 uu as loud as the shotgun

The pistol kills a 100-point zombie in two rounds, one on a critical. The shotgun kills one zombie per shell, spread over at most 4 targets.

A shot stops at the first wall, door or barricade in its path. Chain-link and bar fences and the metal bars barricade let shots through. Each shot draws a thin tracer that fades with the distance, and a muzzle flash at the front end of the held gun. Both are gone after 0.05 s. The pellets of a shotgun share one flash. Firing an empty gun clicks.

Noise

Loudness multiplies each zombie's own hearing range. Against a slow zombie listening at its average 900 uu, a pistol shot reaches 2700 uu and a shotgun blast 8100 uu, about a sixth of the width of Pine Hollow (51,200 uu). The loudness of a gun is its row of the noise table.

Ammunition

Each calibre has a loose round, which stacks in the bag, and a box: 50 rounds for the pistol and for the revolver, 25 shells for the shotgun and 20 rounds for the rifle. Open box and Pack into a box, in the item menu, turn one into the other in 1.5 s.

Loading a gun

Each gun keeps its own rounds, magazine, chambered round, jam and attachments. They follow it into a weapon position, a container, onto the floor, into a co-op character sheet and into the world save, so swapping guns loses nothing.

The pistol takes a magazine, an item with its own count of 12 rounds. Fill magazine loads it at 0.5 s a round. Insert (Insert into the gun in the magazine's item menu) puts it into the gun in hand in 1.5 s and racks the slide for you. Eject takes 1.2 s and sends the magazine back to the bag, or to the floor when the bag is full.

The revolver, the shotgun and the rifle Load and Unload round by round, at 0.95 s, 0.8 s and 0.6 s a round. The pump and the bolt are worked after each shot by the next press of the trigger (Rack).

Reloading

With a gun in hand, a short press of R queues the whole reload: eject the magazine, fill the fullest one that has room, insert it, rack; or rounds one by one. Each step is a timed action that a hit or a move interrupts, keeping what was done. When nothing can be done the game says why: No magazine when there is none in the gun and none in the bag, No ammunition left or The gun is full.

Holding R for 0.5 s opens the reload ring: Eject magazine, Insert magazine, Fill magazine, Load, Unload, Rack. Each entry shows its count and is greyed when it cannot run, and its reason is written under the ring while you point at it. Every step is also an entry of the item menu. Panic slows reloading, and the Firearms skill shortens it.

The counter of the gun in hand and of its weapon row reads ready + chamber: "11+1", "6" for a revolver, "JAM" when jammed. A loaded magazine or gun shows its count on its icon, and its tooltip gives calibre, count, chamber, jam and attachments. A melee row of the weapon bar shows no counter.

Inserting and ejecting a magazine have their own clip, and so does racking the pistol and the pump shotgun. A round loaded one at a time, into a gun or a magazine, plays one clip, looped and fitted to the length of a round.

Jams

A shot may jam the gun: 1 % of the time for the pistol and the rifle, 2 % for the shotgun, never for the revolver. A worn-out gun jams up to five times as often, and the world option Firearm jams, set per world from 0 to 2 in the game options, multiplies the chance.

A jammed gun refuses to fire and says "The gun is jammed - press R to reload". Rack clears it with a chance of 60 %, plus 4 % per Firearms level, and the stuck round is lost.

Attachments

Attachment Asset Effect Fits Time to attach
Rifle scope DA_Attachment_Scope range x1.5, aimed spread x0.5 rifle 3 s
Laser sight DA_Attachment_Laser hip spread x0.6, and a red dot on the target in the line of fire while you aim pistol, revolver 2 s
Rifle sling DA_Attachment_Sling draw time x0.6, and a long gun on the back without a backpack shotgun, rifle 1 s

Attach is an entry of the attachment's item menu (Attach to Pistol), Detach one of the gun's (Detach Laser Sight). The scope and the laser need a screwdriver in the bag. The effects are stat modifiers, counted while the gun is in hand. The attachment shows on the gun, in hand and on the body, and every player sees it.

The assets

Each gun is a PDA_WeaponDef with bIsFirearm ticked, in Content/ZombieSurvival/DataAssets/Weapons/Childs/. Its model is in Meshes/Weapons/: SM_Weapon_Pistol, SM_Weapon_Revolver, SM_Weapon_Shotgun and SM_Weapon_BoltRifle. Each calibre is a PDA_CaliberDef: DA_Caliber_Pistol, DA_Caliber_Revolver, DA_Caliber_Shotgun and DA_Caliber_Rifle. The reload ring is DataAssets/UI/Childs/DA_RadialMenu_Reload.

The meshes of the attachments sit on the gun's Scope and Barrel sockets. The rack clips of the pistol and the pump shotgun are A_Survivor_Rack_Pistol and A_Survivor_Rack_Pump.

Asset Property Default What it does
DataAssets/Weapons/Childs/DA_Firearm_Default JamWearFactor 4 how much wear raises the jam chance
DA_Firearm_Default UnjamBase, UnjamPerLevel 0.6, 0.04 chance that a rack clears a jam, and its gain per Firearms level
DA_Firearm_Default ReloadHoldSeconds 0.5 s how long R is held to open the ring
DA_Firearm_Default bAutoRack on inserting a magazine racks the slide
world options Sandbox.Weapons.JamMultiplier set per world, 0 to 2 the Firearm jams option, which multiplies the jam chance
DA_Weapon_* (guns) Damage, Range see the table of the four guns damage per hit and range
DA_Weapon_* (guns) JamChance 1, 2 or 0 % jam chance per shot, before wear and the option
DA_Weapon_Shotgun PelletCount, MaxHitCount 6, 4 pellets per shot, and most targets per shot
DA_Weapon_* (guns) ShotNoise a Noise.Gunshot.* row how far zombies hear the shot
DA_Weapon_* (guns) PerRoundSeconds, InsertSeconds, EjectSeconds, RackSeconds per gun, see Loading a gun time of each reload step of the gun: a round loaded or unloaded, a magazine inserted or ejected, a rack
DA_Caliber_Pistol, _Revolver, _Shotgun, _Rifle RoundsPerBox 50, 50, 25, 20 rounds in a box
DA_Caliber_* OpenSeconds, PackSeconds 1.5 s time to open or pack a box
DA_Magazine_Pistol Capacity, PerRoundSeconds 12, 0.5 s magazine size, and the time to fill the magazine per round
the four per-round actions bLoopAnimation, bFitAnimationToDuration on loop the round clip and fit it to the length of a round
DA_Attachment_* Modifiers see the table of attachments the stat modifiers an attachment gives
BP_Tracer LifeSeconds 0.05 s how long the tracer and the muzzle flash show
BP_Tracer Thickness 0.05 width of the tracer beam, as a scale of a 100 uu cylinder (5 cm)
M_Tracer FadeInDistance, FadeDistance 1.5 m, 450 uu the beam comes up over its first metre and a half, then fades with the distance
BP_Tracer FlashMergeDistance 30 uu a pellet's tracer that starts this close to a flash already showing uses that flash: a shotgun lights one flash, not six
BP_Survivor (Class Defaults) MuzzleSocket Muzzle the socket of the held mesh the shot is drawn from; without it, the front end of the mesh along X
DataAssets/Noise/Childs/DA_NoiseSettings_Default pistol and shotgun rows 3, 9 loudness of a shot

Change it

  • To rebalance a gun, edit its DA_Weapon_*: damage, range, jam chance, pellets, reload step times (PerRoundSeconds, InsertSeconds, EjectSeconds, RackSeconds) and ShotNoise.
  • To make guns louder or quieter, change the loudness of their rows in DA_NoiseSettings_Default.
  • To change jams and unjamming, edit DA_Firearm_Default, or set the Firearm jams option of a world.
  • To add a gun, a calibre, a magazine or an attachment, follow Add a firearm or the tutorial Add a firearm. It takes data only.