Skip to content

Pickups & Inventory ​

Pickups are server-authoritative — the server decides who gets what and when. Your client only renders the world objects and shows the HUD prompts.

Inventory Model ​

Washiki Washoi uses a 3-slot COD-style inventory:

SlotDefaultSwappable?
1Blade (melee)No — always equipped
2(empty)Yes — picked up
3(empty)Yes — picked up

You can carry the Blade plus up to two other weapons. Picking up a fourth weapon prompts for a swap (see below). Ammo is tracked per-type (not per-weapon):

Ammo types
Shells, bullets, rockets, cells, grenades, bolts and lasers
Blade uses no finite ammo pool

The total ammo pool is shared across weapons of the same ammo type. Ammo pickups add to your pool; capacity defaults to 200 (per type).

Pickup Types ​

TypeEffectExamples
WeaponAdds the weapon to your inventory if you have room; otherwise prompts you to swap.weapon_rocketlauncher, weapon_riotgun
AmmoAdds to your ammo pool. Auto-pickup on touch.ammo_rockets, ammo_shells
HealthRestores HP (see below).item_health_small/medium/large/mega/ultra
ArmorAdds armor plates (see below).item_armor_shard/ga/ya/ra

Armor — plate model ​

Armor is one 0–100 pool presented as four plates × 25. Armor absorbs about 66% of incoming damage until depleted. At pickup time, each inserted plate advances armor to the next multiple of 25; all pickups cap armor at 100.

PickupClassnameEffect
Sharditem_armor_shard+5 flat
Green Armoritem_armor_gaAdvance to the next multiple of 25 — e.g. 58 → 75 or 50 → 75
Yellow Armoritem_armor_yaAdvance by two plate boundaries — e.g. 58 → 100 or 25 → 75
Red Armoritem_armor_rafill to 100

Health ​

PickupClassnameEffect
Smallitem_health_small+5 overhealing to 200, so it is taken at full health too; above 100 it decays like mega
Mediumitem_health_medium (or bare item_health)+25, capped at 100
Largeitem_health_large+50, capped at 100
Mega / Ultraitem_health_mega / _ultra+100 overhealing to 200, then decaying 1 HP/s back toward 100

Walking Over a Weapon Pickup ​

The client checks proximity every frame (cylindrical region around the pickup: 96 unit radius, -24 to +88 vertical band). When you enter the region:

  • You don't have the weapon, and you have a free slot → server auto-gives you the weapon. No prompt.
  • You already have the weapon → server auto-gives you the weapon's default ammo. No prompt.
  • All three slots are full + you don't have this weapon + your equipped weapon is the Blade → server still auto-swaps. No prompt (the Blade is always free to drop).
  • All three slots full + you don't have this weapon + your equipped weapon is NOT the Blade → HUD prompt: PRESS [F] TO SWAP TO <WEAPON>. The server waits for your USE button (default F). On press, it drops your currently equipped weapon and gives you the new one.

Walking Over an Ammo Pickup ​

Server auto-gives the ammo on touch. The HUD ammo counter updates immediately. No prompt.

Dropped Weapons ​

When a player dies, their non-Blade weapons drop, and a weapon swapped for one on the ground drops too. The game server throws each one as a Havok rigid body the size of the gun. It tumbles, bounces off the map and off other dropped guns, and comes to rest lying as it fell. Everyone sees the server's throw, and demos record it, so a paused demo holds the gun still in the air. Dropped weapons carry the ammo their owner had at the moment of death.

Map weapons land the same way: when the map loads, each is tossed a little from where the mapper put it and lies where it comes to rest. The pickup is where the gun lies.

Pickup Respawn ​

Map-spawned pickups respawn on a per-type timer, the same in every gametype:

PickupRespawn
Weapons15 s
Ammo15 s
Armor25 s
Health (small / medium / large)20 s
Mega / ultra health60 s
Quad Damage120 s

Armor and mega/ultra health are also absent for the first 15s of a match so nobody grabs a power item off spawn. Dropped weapons do not respawn — they're one-and-done.

Implementation note

The weapon timer is set by the server launcher (setPickupRespawnTime(15) in the dedicated-server CLI) and overrides the 30 s each gametype declares in getItemSpawnRules(). The other timers come from ItemRespawn.ts, with powerup respawn durations defined in Powerups.ts; server timers and bot item timing use this shared lookup. Unrecognized powerup kinds use a 120 s fallback. The per-gametype ammo, armor, health and mega-health values in getItemSpawnRules() are not read.

A gametype can also change when items return (respawnMode):

  • timed — after the timer above. This is the default and is what every mode except Search & Destroy uses.
  • round — not until the next round. Search & Destroy works this way: one Red Armor per round, and whoever takes it keeps it.
  • alternating — not until the round after next. Experimental; no shipped mode uses it.

Search & Destroy also leaves the Quad Damage out of the map entirely.

Powerups ​

Timed pickups that modify you until they run out. There is one:

PowerupEffectDurationRespawn
Quad Damage×4 damage and knockback on everything you deal30 s120 s

Things worth knowing:

  • Quad scales everything, including self-damage. A quad rocket jump throws you four times as far and usually kills you. That trade is the point.
  • Re-taking extends, it does not reset. Picking up a quad you already hold adds a full 30 seconds to what is left.
  • Every shipped map places exactly one item_quad, so the 120-second respawn is the whole map-control rhythm — long enough that holding it is worth fighting over.
  • Expiry is stored as an absolute server tick, not a countdown. That is what keeps it exact through rollback and demo re-simulation, and it means the HUD timer is a read of authoritative state rather than a local guess.

item_warshell and item_regen exist in the map data and in the pk3 icon and sound banks, but are deliberately not implemented.

Loadouts ​

In Search & Destroy, Amphi and FFA, you spawn with a chosen kit of blade + one primary + one secondary. Map weapons are excluded in these modes; ammo, health and armor pickups remain available.

ModeSpawn armorWhen a changed kit applies
Search & Destroy100Next spawn (at the next round)
Amphi100Next spawn, including within the current round
FFA0Next spawn

Your first choice supplies your initial kit. Later changes apply on spawn and leave your live inventory unchanged. Pick a kit from the HUD's loadout picker or from the console:

loadout rlauncher machinegun

In Duel, you spawn with the blade and collect other weapons from the map.

Server-Authoritative Active Set ​

Pickups are fully server-authoritative and convergent. Rather than one-shot "you took it" events, every snapshot carries a packed bitmask of which pickups are currently active (pickupActiveMask, bit index = pickup id). The client reconciles each pickup's visibility to the mask every frame.

Two properties fall out of this:

  • Self-healing. A dropped packet can't cause a "ghost weapon" (visible but ungrantable) — the next snapshot re-states the truth and the client converges.
  • Provably matching ids. Both server and client derive the pickup list and its ids from the same BSP entity table (extractPickups in this game's shared/bsp/PickupTable.ts), so pickup id N means the same object on both sides with no handshake. Unresolved ids fail closed (no phantom pickup) rather than guessing by position.

Only registered pickup classnames with valid origins receive IDs. Unknown map entities are skipped and consume no pickup ID. An origin contains exactly three finite numbers separated by whitespace; surrounding or repeated whitespace is accepted. Malformed origins are skipped before IDs are assigned.

Items for one mode ​

A map can place an item for some modes only, with the gametype keys Warsow and Quake 3 maps use. The item keeps its id in every mode; in a mode it is left out of, the server never makes it active, so it is never drawn or picked up.

KeyEffect
gametypeThe item is only in the modes listed (space- or comma-separated)
notduelNot 0: left out of Duel and Amphi
notteamNot 0: left out of Search & Destroy
notfreeNot 0: left out of free-for-all

The names a gametype list may use for each mode:

ModeNames
Duelduel
Amphiamphi, duel
Free-for-alldm, ffa
Search & Destroybomb, snd

washoi_dm1, for example, puts a megahealth ("gametype" "duel") and an ultra health ("notduel" "1") on the same spot: duels get the megahealth, every other mode the ultra health.

Inventory API (for developers) ​

InventoryManager lives at src/games/fps/world/InventoryManager.ts and is exposed on FPSPlayer.inventory. Notable methods:

  • giveWeapon(weaponId) — returns { acquired, dropped }; if at capacity, drops the currently equipped weapon.
  • dropWeapon(weaponId) — remove a weapon and return its definition, or null if absent.
  • equipWeapon(weaponId) — select an owned weapon; returns whether selection succeeded. The caller handles the view model.
  • giveAmmo(type, amount) — returns the amount added, capped by the registered weapon ID's maxAmmo or the fallback limit of 200 for other keys. Invalid amounts add zero; positive grants do not reduce an existing count above the cap.
  • setAmmo(type, amount) — set absolute.
  • getAmmoCount(type) — current count for a type.
  • getSlotCount() — how many slots are filled.
  • hasWeapon(weaponId) — boolean.
  • MAX_WEAPONS (static) — 3 by design; see the comment in InventoryManager.ts.

See Also ​

  • Weapons — per-weapon stats and ammo types
  • HUD — reading the weapon slots + ammo counter
  • The engine's Pickup System Guide — the engine-generic Pickup base class that FPSPickup extends

Built on the SHAG Engine.