Modding
Discord Wishlist on Steam

Weapons, armour, bodies

A gun's shot, heat and sounds

A gun is a weapon like any other (Weapons): made from one of our guns, with its own picture and numbers. Three things are its own besides: how its rounds look and strike (shot), a gun that heats as it fires (heat), and its sounds.

The shot

json
"shot": {
  "colour": "#ff3b2f", "core": "#fff0ea", "length": 18, "width": 3, "glow": true, "light": 2.5,
  "picture": "bolt.png",
  "burst": 1, "sparks": 8, "scorch": true, "debris": true,
  "smoke": false, "cases": false
}

Without shot its rounds are the base's tracer streak, set by tracerHead, tracerTail, tracerLength and tracerWidth in weapon. With it, each round is a bolt:

  • Its look: colour round a hotter core, length by width pixels at 40 to a unit, tip first, its outer rows a pixel short at each end and thinning toward the tail. picture draws it instead: pointing right, its rightmost pixel at the round.
  • Its glow: glow draws it over the night's dark with a soft halo of its colour; false paints it like anything else. light is how many units of its colour it lights round it as it flies, flaring where it stops; 0 for none. lightStrength (0 to 8, 1.3 when not given) is how bright: 2 or 3 lights the ground and walls it passes even by day.
  • The muzzle's flash and its light take the shot's colours.
  • Where it strikes: a burst of its colours (0 none, 1 normal, up to 3), sparks thrown back the way it came (0 to 32), and a scorch left on the ground for a few seconds. debris false keeps the base's chips, dirt, sparks and blood from flying as well. A round spent in mid-air does not burst.
  • smoke false: no powder smoke out of the barrel, no blast. cases false: no case thrown out.
  • How fast it flies is muzzleSpeed in weapon. Our guns fly 150 to 380 units a second; a bolt is easy to see at 40 to 70.

On the bench the Shot section switches between Tracer and Bolt. A strip of the game's ground at night fires the round into a post over and over, as the game draws it; clicked, it fires at once with its sound. Draw a picture of its own starts a picture from the streak and opens it on the canvas.

A magazine of its own

json
"magazine": "cell.png"

Beside shot, on the weapon's entry: the gun's magazine drawn as this picture instead of the base's. It is seated with its top left at magazinePixel and dropped and fitted in the reload as the base's is.

Heat

json
"heat": { "perShot": 0.06, "cooling": 0.4, "coolDelay": 0.35, "unlockAt": 0.3 }

A gun that heats as it fires:

  • Each shot adds perShot; 1 is overheated.
  • coolDelay seconds after a shot it starts to lose cooling a second.
  • Overheated, it locks: the trigger clicks dead, it vents with its vent sound and cools ventBoost times faster, until it is down to unlockAt.
  • It glows as it heats, its own pixels going from dull red to yellow-white, creeping back from the muzzle as far as reach (a share of its length), with a light of light units at the muzzle.

Each machine heats its own copy from the shots it sees. On the bench, Heat draws a graph of the gun's heat with the trigger held from cold, redrawn as a slider moves: dashed where it fires again, red where it is locked, with how many shots lock it, how long it stays locked and how long it takes to go cold.

Sounds

json
"sounds": { "shot": ["bolt1.wav", "bolt2.wav"], "impact": "bolt_strike.wav" }

A slot takes a file or a list; each time one of the list is played at random, and a slot not given keeps the base's. The files are .wav, .ogg or .mp3, loudest at their first moment, peaking around -16 dB.

whoslots
a gunshot, impact (its round striking anything), dry (the trigger on nothing), magazineOut, magazineIn, handle (racked), selector, flyby (its round passing close to the listener, in place of a bullet's crack: a glowing bolt with none goes by silently), vent (overheated, with heat)
a weapon swungswing, hit
a lit saberon, off, hum (looped, the first file), clash (on steel, wood or stone), burn (through a body or a shield's boards), deflect (a round batted back), push and pull (the free hand's force)

A saber swings with either swingLow and swingHigh, two loops faded in by how fast the blade turns, or swing and swingFast, one-shots played each blow (a running or master blow's from swingFast), with the hum swelling and bending as the blade turns. A saber is "changes": "Lightsaber", or a new weapon made on it.

Formats

shot and sounds are format 2; magazine, heat, lightStrength, flyby, vent and the saber's slots are format 3 (formats).