WIKI

Mod

Sample mod - Factory ammunition

Le guide ai mod sono in inglese, come vengono distribuite con il gioco.

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:
AmmunitionMade fromBatchFired by
Rifle roundshardware40Gun (levels 2-3), Machine Gun
Cannon shellshardware + metal15Cannon
Guided rocketshardware + metal + copper10Missile
Chemical canistershardware + copper100Flame, Poison (3 a pulse)
Cryo cartridgesmetal + copper20Frost
Energy cellscopper20Bolt, 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's ammo names 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) spends ammo_per_shot units, 1 when omitted. An empty ammo fires for free. A level that declares ammo never 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: null removes a stock material or recipe. A material's name and description may be given per language code; a missing language falls back to English. default_cap raises a recipe's default stock limit (200 here, so the factory keeps a reserve).
  • balance.json: run_start.towers unlocks the Collector, and with it the factory, at the start of every run. tower_fusion.cost_materials sets the liquid kind (biological matter) to 0 and adds metal.

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.