Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

WeaponSettings

What a weapon does, which the room holds every shot to.

Property Type Description
damage number Health one hit takes.
data? Readonly<Readonly<Record<string, unknown>>> The game’s own data every hit of it carries, such as a pellet’s dose of an element, as the game’s hitData registers it. What depends on the shooter, a game reads off the hit’s source.
friendlyFire? boolean Whether its shots hurt the shooter’s allies, over the world’s friendly fire: true for a weapon that hurts teammates in a game where friendly fire is off, false for one that never does. Left out, it follows the world’s, which teams() sets and which is off with no teams(), so a player’s shot passes through another player’s character, as through a teammate.
judge? ShotJudge Who decides what its shots hit, over the game’s ShotSettings: the room unless one of them says the page.
kind WeaponKind -
model? string The registered model a projectile is drawn as; none draws nothing.
pellets? number Pellets one pull of an instant weapon fires, each judged apart; one when left out.
pierce? number Targets past the first one pellet of an instant weapon passes through; none when left out.
range number Metres a shot reaches.
rules? ShotRules The rules its shots meet, laid over the game’s by name: a rule to add or replace one, false to take one out.
shotsPerSecond number The most shots a second a player fires with it.
speed? number Metres a second a projectile flies: defaultProjectileSpeed when left out. An instant shot has none.
spread? number Radians between two neighbouring pellets, fanned level with the ground round the pull’s direction.
stats? Partial<Record<WeaponNumber, string | readonly string[]>> The shooter’s stats laid on its numbers, so a card or an item that raises her stat changes what her shots do with every weapon that names it.
zoneDamage? number Times a zone’s own multiplier its hits there deal: 1.5 turns a head’s double into triple, and 1 when left out keeps it. A hit on the body deals the weapon’s damage whatever this is.