Content API
Upgrades
Editing individual upgrades, their prices, stats, projectiles and models.
tower.upgrade(0, 1, cost=150,
stats={"range": 40},
weapon={"rate": 0.5},
projectile={"damage": 5, "pierce": 5, "display": mod.model("bolt")},
model="robot-upgraded")
How upgrade edits apply
- Paths are 0–2 and tiers 1–5.
- The edit sets the purchase price and the resulting tier states, including later tiers and crosspaths.
- Values are absolute replacements: write lower tiers first, then higher tiers to override them.
statsedits native tower-tier fields,weaponthe primary weapon, andprojectilethat weapon's projectile.- Unknown fields fail validation rather than being silently ignored.
- A model swap uses the exported muzzle and release time.
Replacing a projectile completely
bomb = mod.projectile("grenade", base_tower="BombShooter", damage=10)
tower.upgrade(0, 2, projectile=bomb)
A template copies the whole native projectile configuration, behaviours included, before your overrides. A plain dict keeps any behaviours you don't mention.
Secondary weapons and other attacks can be edited through explicit set/copy paths or per-tier
tower.weapon/tower.projectile calls.
Limit
Fourth upgrade paths aren't supported: the engine and upgrade screen store exactly three paths.