Skip to content

Plasma and frontier laser guns - #540

Draft
Jackriip wants to merge 111 commits into
masterfrom
feature/plasma-weapons
Draft

Jackriip wants to merge 111 commits into
masterfrom
feature/plasma-weapons

Conversation

@Jackriip

@Jackriip Jackriip commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Adds two plasma guns, two frontier laser guns, single-use plasma cartridges, plasma burn wounds, and plasma pirates.

Builds on feature/hitscan-lasers. That branch's commits are included here, so merge it first.

Guns

Gun Fires Where it comes from
Kestrel laser pistol 20-damage laser, 20 shots per cell Outfitter, 900 cr
Hornet laser SMG the stock hitscan laser, full auto Black market, 3,500 cr
Cinder plasma pistol 32-burn plasma bolt Outfitter at yellow rep, 2,000 cr
Furnace plasma rifle 45-burn plasma bolt, two-handed Black market, 5,000 cr plus a voucher; red-zone loot
Old Furnace Furnace variant Rare drop from two red-zone pirate bosses only

How plasma works

  • Bolts:
    • fly at 10 tiles/s
    • can't be reflected
    • are stopped by glass, which they damage
    • ignore canisters
  • Burns, not fire: a hit never sets anyone alight. Bolts carry a high wound bonus (pistol 10, rifle 20): an unarmoured rifle hit gives at least a moderate burn about three times in four, and repeat hits on one limb reach severe and critical. A bolt still ignites real plasma or other fuel gas it passes through or hits.
  • Plasma burns: bolts cause their own burn wounds, a subtype of tg's flesh burns, so every normal burn treatment still works.
    • Slag Spatter Burns, Embedded Slag Burns and Plasma Burn-Through leave molten slag in the wound. Hot slag keeps burning the limb until it's cooled, and the burn can't close while slag is in. Cryo doesn't clear it. A burn-through limps or fumbles.
    • Care is cool, cut, cover: cool the slag with water, an extinguisher or a shower; pick it out with a hemostat (wirecutters or a scalpel in a pinch, slower and rougher) or excise it in surgery ("Excise plasma slag"); then treat and dress the burn as usual. Moderate flecks fall off by themselves once cool. Severe and critical slag comes out as a slag bead.
    • Healed plasma burns leave their own scars.
    • The wound shows on the limb: glowing purple slag while hot, black crust once set, raw skin once it's out. Clothing covers it.
  • Limb loss: an arm or leg melts through tg's burn dismemberment (no blood spray, no flying limb) when at least 10 of the bolt's own burn gets through armour, the limb was already hurt (10+ damage) before the bolt, and it is left within 10 (pistol) or 20 (rifle) of its damage cap and at no less than half of it; or, for the rifle, when it already carries a Plasma Burn-Through with slag still in it. No bolt melts a healthy limb in one hit: it takes two rifle bolts on the same limb, two or three pistol bolts. Heads and chests never melt. A robot limb, or one with no flesh (skeletons, golems, plasmamen), comes off the same way but dry: sparks, a slag pool and a hiss, with no drips, no gobbets and no stump.
  • Structure damage: bolts break structures and doors faster (pistol x1.5, rifle x2): a shuttle window takes 4 pistol or 2 rifle bolts, an airlock 8 or 4, a table 3 or 2. Grilles and blast doors still shrug them off. Mechs, turrets and other machines take normal damage, and walls take none.
  • Ammo:
    • Guns run on plasma cartridges. A cartridge is single-use: it comes full and is never refilled. A full one gives the Cinder 15 shots and the Furnace 12.
    • Press one by hand from the crafting menu (3 plasma sheets + 1 iron sheet, or 6 plasma ore + 1 iron sheet), print one at a lathe once Ballistic Ammunition is researched (3 sheets of plasma and half a sheet of iron), or buy one at the outfitter for 100 cr at yellow rep.
    • Loading a cartridge swaps out the one in the gun: a part-used cartridge comes back to your hand with what's left in it, a spent one drops at your feet. A spent cartridge can't be loaded, and it recycles to iron only.
    • Guns bought from a shop come with a full cartridge. Guns found as loot have a part-used one: at least one shot, at most half full, in whole shots.
    • The gun's chamber can't be charged by anything except a cartridge: rechargers, inducers, APCs, cell-charging slimes and plants are all refused.
  • Furnace heat:
    • The rifle heats with each shot and cools from the air around it.
    • In vacuum it overheats: it spits plasma gas onto the shooter's tile and takes damage.
    • Using it in hand vents on purpose once the coil glows; a vent cools it by the plasma it lets out.
    • Vented and spat plasma comes out below its ignition point, so venting can't set the shooter alight.
    • The coil glows in steps as it heats.
  • Turrets: plasma guns can't be put in turrets or emitters.
  • Pirates: yellow- and red-zone pirate crews can carry the Cinder, and red-zone crews the Furnace. Two red-zone bosses carry Furnaces.

Effects

  • Hits on people: a hit bursts into molten hot-purple slag. Ordinary hits alternate between a molten splatter and a flash with a spreading ring. A hit that kills or leaves a critical burn plays a burn-through instead, spraying out the far side of the body. Globs stick to the body, move and turn with it, and cool away in about 2.5 s. The flash starts as the bolt reaches the body, with a soft bloom and a small light on the victim.
  • Melting limbs: a melted arm or leg heats up, sags and runs off in drips into a growing pool, then the stump bubbles and cools to a seared stump. The pool sets into slag that stays until it's cleaned (one per tile, 150 at most). The jumpsuit sleeve burns away at a melted arm. There's no blood splatter, though tg's blood loss still happens. Held items and shoes melt with the limb, then fall to the floor beside the feet. If the victim moves mid-melt, the limb goes with them and later drips land under them.
  • Shields: a held shield blocks bolts at its normal chance and takes the damage. Instead of the yellow block star, the bolt bursts on the shield's own pixels, coats it and drips off as slag, with the shield's own block sound.
  • Barrel pinch: each shot swells a ball of plasma at the barrel with a flash on the hands and a small purple light, snaps it small as the bolt leaves, and opens a ring where the ball was. It stays on the barrel if the shooter moves or is knocked over.
  • Bolts are purple teardrops of liquid fire and carry a moving purple light.
  • Impacts look different on walls, glass and armour.
  • Hit spots on walls and floors glow purple, cool to char and leave soot that stays until it's cleaned (soot is capped at 300, glows at 40 per z).
  • A bolt that misses fizzles out at the end of its range.
  • The Furnace vents with a puff.
  • Sounds: each gun has its own fire sound, plus a distant version for listeners 18–40 tiles away. A hit plays one sound only: plasma hits on people, burn-throughs and limb melts have their own new sounds, and tg's dismember sound and burn-wound sizzle don't play on top of them. Wall and glass hits, near misses, the Furnace vent and boil, robot-limb melts, pressing a cartridge, cooling slag and picking it out use existing tg sounds; a shield block plays the shield's own.

Media

Recorded in a real client at real speed.

Bolts and the barrel pinch (Furnace, then Cinder, in all four facings):
bolts
barrel pinch

Wall and glass hits in the dark:
wall and glass

Hits on people (two ordinary hits, then two burn-throughs):
bursts

Plasma burns (a pistol hit, then rifle hits on the same chest; the slag picked out with a hemostat):
slag burn
slag pick

Melting limbs (arm with gloves and a held crowbar, leg, lying, walking off mid-melt, a robot arm):
melt arm
melt leg
melt lying
melt walk
melt robot arm

Shield block:
shield

Furnace heat and vent:
furnace heat and vent

Cartridges (pressed from sheets and loaded; full on the table, in hand, and spent):
cartridge
cartridge in hand

Assets

The gun and cartridge sprites (recoloured to hot purple) and the plasma, RCW and laser pistol sounds are from Mojave Sun (CC BY-NC-SA 3.0). The bolt, effect, burst, melt and plasma wound sprites, and the plasma hit, burn-through and melt sounds, are new. Each file's source and licence is listed in voidcrew/modules/plasma_weapons/icons/attributions.txt and sound/attributions.txt. There's a new player wiki page at wiki/content/plasma-and-laser-guns.md.

Also in this PR

__byond_var_id_padding.dm (the same file the hyperviolence branches carry) so the CI build stays clear of DM's broken variable id 65535.

Not playtested

It compiles cleanly under the normal and CI define sets, and the plasma unit tests pass. Every effect, burst and melt was recorded in a real client in all four facings. Still needs a human playtest:

  • how dodging bolts feels
  • how fast the Furnace heats up
  • how often limbs melt, and how plasma burns feel to treat
  • how far a cartridge goes, and its price
  • the near-miss hiss, distant fire, hit, burn-through and melt sounds
  • the short client hitch the first time a client sees a melt

Laser guns, laser NPCs and laser turrets now fire tg's hitscan beam with the
existing laser tracer instead of a travelling bolt. Damage is unchanged.
Disablers, X-ray, pulse, emitters, the ship defense turret, the accelerator
cannon, laser eyes and mech lasers stay bolts.
…types, red-zone Old Furnace roll, laser empty sprites
… body

The splash states are six 0.1 s frames, but the splash lived 0.5 s, so the
last frame (the cooling pane glow on glass, the last droplets on walls) never
showed. Splashes now live 0.6 s.

The flesh splash's steam came from the shared steam pool, whose holder draws
above every mob. A bolt hitting the far side of a body put its steam over the
chest while the splash itself was hidden. The steam now uses its own pool whose
holders take the splash's layer.
tg's range-out hop leaves a projectile a tile less twice its overshoot short
of where it ran out, so the gutter-out appeared up to a tile behind the bolt's
last drawn spot. The gutter now adds that shortfall back along the bolt's path.

The wisp named a state the copied projectile icon does not have, so it never
drew, and the switch to it flashed the bolt's emissive core upright for a
frame. The core, light, icon and transform now change together in one update,
the wisp uses the effects icon, and it fades in its own frames instead of
being faded a second time.
Hits no longer add fire stacks. Bolts carry higher wound bonuses so they
leave real burn wounds, melt a hurt arm or leg (the rifle also one with a
critical burn, never a healthy limb in one hit), and break structures and
doors faster. The pistol bolt goes from 30 to 32 damage to keep its time to
kill without the fire.
The gun items showed Mojave Sun's small floor sprites everywhere. They now
use its inventory art, recentred: Kestrel, Hornet and Cinder in 32x32, the
Furnace and Old Furnace in a 48x32 file with a -8 base pixel offset like
tg's wide rifles. Coil glow masks are redrawn on the new coils.
The hot glow now flashes pink-white for the first tenth of its life, drops to a saturated violet (#8A1FBF, then #6A16A0) and cools through dark plum (#3E0F5C) before going out. Timings, breathing and the emissive fade are unchanged.
The bolt shows when the ball snaps on the client's clock, and its copy no longer
holds back for the first ticks. The ball's light rides the bolt from the shot.
The pinch ball is hot pink, the snap and ring are short and purple, the pistol's
small ball is smoothed, and the wall splash and its glow are pink on the wall face.
The copy that carries the bolt out of the pinch now holds on the ball, shows a tick
after the snap and closes onto the bolt's path over the first tile, all on the
client's clock. It no longer follows the server's moves, which stalled it at the
muzzle and left gaps at the handover. The snapped ball shows a little longer.
The copy no longer rides the hidden bolt, whose sprite skips a tile for a frame as it
crosses into a new turf: it flies its own path from the ball onto the bolt's line and
on with it, and shows as the ball snaps. The ball's light goes with it.
…he wall face, and shrink the pistol's splash

The bolt's light sits on its head instead of its middle, and a wall's glow stops lighting itself as it cools to char.
The bolt waits level with the ball and leaves as it snaps, so its barrel copy only closes sideways onto its line and
hands over a tenth of a second later instead of chasing it.
The bolt leaves from the snap even when the timer lands late, the copy keeps to where the bolt is seen, and it goes in
the same tick the bolt shows so the two never show together.
…cases

- A shot that boils the Furnace now costs its plasma: the shot is charged
  before the heat step, since a boil re-chambers the gun.
- A cartridge swap seats the new cartridge first, so the old one goes to the
  freed hand instead of the floor.
- Outpost shop listings keep cartridges and plasma guns with different plasma
  apart.
- Lighting something with a plasma gun re-chambers it and heats a Furnace.
- The Old Furnace can't be duplicated or scrapped.
- No barrel pinch on point-blank shots, where the hit lands first.
- Slag cools at the body's own species heat limit, so ethereals' normal body
  heat no longer keeps it cooking.
- Re-attaching a severed slagged limb keeps its slag and heat and doesn't dose
  the blood again.
- The slag surgery's dressing won't go on over slag, and an emptied wound moves
  on to the dressing without a failed step.
- A septic slagged burn's scanner advice says to excise the slag before cryo.
- Cuts only "sear shut" when nothing on the limb still bleeds, and a melted
  limb gets no sear message.
- A shield splash uses the shield that actually blocked the bolt, noted as it
  blocks, so a shield the block breaks still gets its splash.
- Plasma scar text no longer says green.
…d wiki

- The distant firing sound skips listeners in another packed encounter, as
  playsound() does. Its range and volume defines move to the shared defines.
- The near-miss hiss skips the mob the bolt was fired at and anyone behind a
  wall.
- The sound credits mark which files were edited from the originals.
- The wiki says only the wound analyzer speeds up picking slag.
- Pirate plasma shots play the distant firing sound like a player's.
- A red-zone boss handed a Furnace drops whatever was in its other hand, so
  Director Prime no longer holds a two-handed rifle and a syringe gun.
- The far-sound test checks against the volume defines.
- The cache weapon class and shop ladder tests know the plasma and frontier
  guns, and the Furnace's rotating black market shelf.
- New tests: a live-fire boil costs a bolt and a vent and a breaking boil
  drops the cartridge, a hand swap returns the old cartridge to the hand,
  shop listings split by plasma, a breaking shield still splashes, the slag
  dressing won't go on over slag, ethereal slag cools, and a reattached limb
  keeps its burn.
A plasma bolt melts an arm or leg only when at least 10 of its own burn gets
through armour, and the damage the limb must reach never drops below half its
max.
A limb with no flesh (robotic, or no BIO_FLESH: skeletons, golems, plasmamen)
still melts off through tg's dismember, but leaves a slag pool, sparks and a
welder hiss instead of gobbets, a stump and the wet melt sound. Cuts on such a
limb aren't seared.
Venting does nothing below the first coil step, so a cold Furnace no longer
wastes plasma or locks its trigger, and a short chamber cools the barrel in
proportion to the plasma it let out.
Only pirate ship crews and boarders fire plasma guns, not ruin pirates.
… hashes

The plasma cartridge joins the ammo category, rated yellow like the Cinder it
feeds; pressing one by hand stays public on purpose, since the gun is the
gate. The loot Cinder and Furnace take their shop guns' ratings, the built-in
lenses copy their guns, and the abstract bases are marked abstract.
The burn-through tests fired 5-damage bolts, below the 10 landed burn a melt
now needs. The melt cases fire at the floor; the negative cases do too, so
they still test what they name.
The copy flew a fixed path on the client's clock and was swapped for the
bolt by a server timer. When the server ran slow the copy got up to a
tile and a half ahead, so on short shots it sat on the target and the
bolt then showed further back and flew in again. The copy now repeats
each movement step the bolt makes, with the same timing, closing
sideways onto the bolt's line over the first tile, and hands over once
the bolt has covered that tile.
A finished cog fades for half a second, then its Destroy() removed every
managed vis overlay on the user, including the cog of a do_after that had
started in the meantime. Picking plasma slag one bead after another showed
no cog for the second pick, so the slag seemed to come out seconds after
the work ended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant