Sample mod - Factory ammunition
Ammunition is no longer a bonus: it is what the towers fire. Only the level 1 Gun fires for free. Every other tower, and the Gun from level 2, spends ammunition made in the factory on every shot, and without it the tower holds fire.
- The Collector and the factory are open from the first wave (
balance.json,run_start.towers). Insects leave debris; the Collector brings it in. - The factory makes only hardware, metal, copper and ammunition. Debris becomes hardware, hardware becomes metal or copper, and those three, alone or combined, make six kinds of ammunition:
| Ammunition | Made from | Batch | Fired by |
|---|---|---|---|
| Rifle rounds | hardware | 40 | Gun (levels 2-3), Machine Gun |
| Cannon shells | hardware + metal | 15 | Cannon |
| Guided rockets | hardware + metal + copper | 10 | Missile |
| Chemical canisters | hardware + copper | 100 | Flame, Poison (3 a pulse) |
| Cryo cartridges | metal + copper | 20 | Frost |
| Energy cells | copper | 20 | Bolt, Laser |
One unit a firing cycle: a Gun or Cannon shot, a Machine Gun volley, a Missile salvo, a stretch of a jet. A batch lasts one tower roughly half a minute. The Flame's jet cycles every 0.3 s, so canisters come 100 to a batch, and the Poison, which pulses once a second, spends three a pulse.
Biological matter, the stock ammunition, the repair kit, the overclock chip and the troops are gone, so the Advanced tier stays empty and PvP has no barracks card.
- The tower menu's switch reads "Ammo". It is on by default. Switched off, that tower stops spending, and so stops firing: a way to keep a scarce kind of ammunition for the towers that matter.
- Fusions cost metal where the stock ones cost biological matter.
Enable it in Options → Mods and restart. It ships disabled by default. Like any gameplay mod it plays on its own mod profile, so your vanilla save is never touched. The numbers are a starting point, not a tuned balance: change the batches in material_data.json and the costs in tower_data.json.
How it works
It is data only. Each file uses keys the game reads for any mod:
tower_data.json: a level'sammonames the material it fires on. Every firing cycle (one reload: a Machine Gun's volley, a Cannon's pair, a stretch of the Flame's jet) spendsammo_per_shotunits, 1 when omitted. An emptyammofires for free. A level that declaresammonever gets the vanilla special-ammunition bonus; a level without it keeps the vanilla rule. A fused tower uses its level 3 entry.material_data.json:nullremoves a stock material or recipe. A material'snameanddescriptionmay be given per language code; a missing language falls back to English.default_capraises a recipe's default stock limit (200 here, so the factory keeps a reserve).balance.json:run_start.towersunlocks the Collector, and with it the factory, at the start of every run.tower_fusion.cost_materialssets theliquidkind (biological matter) to 0 and addsmetal.
The ammunition icons are the game's own (res://Assets/Factory/items/); a mod can point at its own PNGs instead. See the modding guide.
