Guns and throws that spend rounds from the bag, with a magazine that has to reload.
Ammo
An ability can spend rounds of an item each time it is used: a pistol shot spends one 9mm round, a shotgun blast spends a shell, a grenade throw spends a grenade. The rounds come out of the player's bag; with too few left, the use is refused with Out of ammo.
A weapon type can also give its guns a magazine: a number of shots before the player has to reload. When the magazine is empty, the next press starts the reload and the gun fires again once it finishes.
Where to author it#
- Database → Abilities, open the ability, Costs & Effects → Ammo per use and Ammo item.
- Database → Items → Weapon Types, open the type, Ammo & magazine.
Set up a pistol with a magazine#
- Make the ammo item (Database → Items): for example "9mm Rounds", type Component, with a
large Max Stack (say 200).
- Open Items → Weapon Types → Pistol. Under Ammo & magazine pick 9mm Rounds as the
Ammo item, set Magazine size to 12 and Reload time to 1.5 s.
- Open the pistol's attacks (its normal attack and its Q/W abilities) in Database → Abilities.
On each, set Ammo per use (1 for a single shot, 2 for a double tap) and leave Ammo item on Weapon type's ammo.
- Save and publish. Sell the rounds in a shop or put them in loot tables.
Set up a throw that spends itself#
- Make the "Grenade" item and the "Throw Grenade" ability.
- On the ability set Ammo per use to 1 and Ammo item to Grenade. A named item never uses
a magazine.
The fields#
On an ability:
| Field | What it does |
|---|---|
| Ammo per use | Rounds one use spends. 0 = the ability uses no ammo |
| Ammo item | Which item it spends. Weapon type's ammo = the ammo item of the weapon the player has equipped; only then does the magazine apply |
On a weapon type:
| Field | What it does |
|---|---|
| Ammo item | What guns of this type fire. None = no ammo |
| Magazine size | Shots before a reload. 0 = no magazine: fire until the bag runs dry |
| Reload time | Seconds a reload takes. It starts when the player presses with an empty magazine |
How it plays#
- The rounds stay in the bag until they are fired, so dropping or selling ammo leaves fewer shots.
The magazine only counts how many shots are left before the next reload.
- A shot that is interrupted before it lands (moved during a cast, target died) gives its rounds back.
- Basic attacks spend ammo too, so a gun's normal attack stops when the player runs dry.
- The shots left in each magazine are saved with the character, so logging out does not refill it. A reload in progress is not saved: the next press starts it again.
- While a gun with a magazine is equipped, a small ammo counter sits above the bottom-right of the HUD: the item, shots left of the magazine size, the spare rounds in the bag, and Reloading… during a reload.
- Players can reload early with the Reload action: the ' key (quote) by default, rebindable under World → Player Controls. A full magazine, a reload already running or an empty bag does nothing.
Gotchas#
- Only players spend ammo. NPC and monster abilities never do, so an NPC police officer's Taser
works without rounds.
- An item that casts the ability for free (Items → Use Ability with Bypass ability cost) spends no
ammo.
- Weapon type's ammo with no ammo item on the equipped weapon's type means the ability is free.
The content check warns when an ability or weapon type names an ammo item that no longer exists.
- The counter appears once the server has told the client about the gun: on equipping it, firing it
or reloading. A gun with no magazine (Magazine size 0) shows no counter.
- Behind the Ammo flag (on by default). Off = ammo costs are ignored and nothing reloads.