Weapons¶
A weapon is a gear card in cards.json plus a row in weapons.json with the
same id. The row picks a pattern (how it aims and fires) and sets numbers.
Each of the thirteen base weapons is a pattern, from turret (minigun) and
swarm (missile swarm) to railgun, orbital (orbital strike) and ram. Weapons draw nothing on the
car itself: only what they fire, and their muzzle flashes.
Add a weapon¶
cards.json:
[
{
"id": "arsenal.nail_gun",
"name": "NAIL GUN",
"tier": "gear",
"branch": "nails",
"max": 1,
"icon": 12,
"description": "Rattles a tight stream of nails at the nearest enemy: fast and light."
},
{
"id": "arsenal.nail_feed",
"name": "NAIL FEED",
"tier": "specialist",
"branch": "nails",
"icon": 9,
"requires": "arsenal.nail_gun",
"description": "The nail gun fires twice as fast."
}
]
weapons.json:
[
{
"id": "arsenal.nail_gun",
"pattern": "turret",
"range": 120,
"interval": 0.12,
"damage": 0.4,
"speed": 520,
"spread": 3,
"color": [190, 200, 215],
"upgrades": {"arsenal.nail_feed": {"rate": 1}}
}
]
- The card is offered in runs like base guns. Haste and FIREPOWER apply, and results credit its damage.
upgradesmaps each of the weapon's cards to what it adds per rank. Give those cardsrequiresthe gear card.damageandsplashare shares of the row's own, like the base cards:{"damage": 0.5}hits 50% harder per rank.- Missing fields come from the pattern's base weapon (except
upgradesandnoun). - A card's
iconis a number on the game's icon sheet or your own square sprite up to 64 pixels, such as"icon": "arsenal.nail_gun"forsprites/nail_gun.png. - The game's OVERCHARGE card (+50% damage, twice per weapon) comes for your
weapon too. Card text names it by
noun("noun": "nail gun"; default the gear card's name).
Upgrade cards¶
Every card should change something the player can see, or be a step big enough to feel: a new behaviour, more projectiles, a blast twice as wide, +50% damage. Small percentages do not read in a run of a dozen purchases.
- Weapon mods are
specialistcards with the weapon'sbranch. The laundromat deals them once the weapon is owned. NAIL FEED above is one. - An evolution (
evolutionwith the weapon'sbranch) is dealt once two of that weapon's mods are fitted. A mod cannot add a new evolution. tier: "weapon"cards are dealt for each owned weapon they fit and add to itsstat(damage,rate,range,radiusorlife), up tomaxtimes per weapon, with{weapon}in the text for its noun.- A card with a
valuegives that much per rank; write{value}where it goes:
{
"id": "arsenal.light_frame",
"name": "LIGHT FRAME",
"tier": "part",
"icon": 18,
"max": 2,
"value": 0.25,
"description": "+{value} top speed.",
"stats": {"speed": 1}
}
Its stats (or a weapon's upgrades for it) are multiplied by the value
times the rank: two LIGHT FRAMEs give +50% top speed.
Traits¶
Each pattern has traits, such as the railgun's ricochet or the missile
swarm's cluster. A trait is on while its card is owned:
{
"id": "arsenal.wasp_nest",
"pattern": "swarm",
"rounds": 12,
"interval": 1.8,
"damage": 0.8,
"upgrades": {"arsenal.wasp_hunter": {"cluster": true}}
}
Code mods can add traits to base patterns with game.trait. The scrapyard
example's SCRAP COILS makes every fifth missile hit three times as hard.
Retune a base weapon¶
Use the base id: {"id": "exhaust_gun", "rounds": 4, "spread": 75}.
- The pattern can't change.
upgradesadds or replaces cards by id; the rest stay.
A new pattern¶
When no pattern fits, register one with game.weapon and fire rounds with
game.fire. The scrapyard example throws a
ring of scrap.
Reference: patterns and traits, weapons.json fields. Example: arsenal.