WIKI

Mods

Your own towers

Towers are written in tower_data.json, a patch over the game's own: each key is a tower (Gun, MachineGun, Collect…), with its levels under levels. The game's copy is in the _vanilla_reference folder of your Mods folder.

Names and descriptions

{"MachineGun": {"name": {"en": "Mech bay", "pt_br": "Baía de mechs"},
                "description": {"en": "Does not fire: keeps three mechs on the road."}}}

A text, or texts by language (a missing language reads English). The palette, the build ring, the tower's window, its card and the guide use them, and the palette's tooltip says what the tower does: no fire, its units, its income, its ammunition, its paths.

A new tower

A tower of your own is built on one of the game's ten, named in base. It plays like its base and keeps everything you do not write:

{"Bunker": {"base": "MachineGun",
            "name": {"en": "Bunker", "pt_br": "Casamata"},
            "levels": {"1": {"price": 350, "fires": false,
                             "soldiers": {"count": 3, "health": 450, "damage": 30}}}}}
  • Its card is unlock_ and its key in lower case (unlock_bunker): put it in the draw with cards.pool_add in balance.json (cards).
  • Its models are Towers/<Key>_1 to _3 in models.json, with its base's pivots. Without them it wears its base's models; with them, its pictures are rendered from yours.
  • skill names the skill-tree nodes that open levels 2 and 3: "skill": "Bunker" uses Bunker2 and Bunker3, which your map_data.json adds. Without it they are its base's. max_count caps how many may stand on a board.
  • It has no number key and no fusion, and no cockpit if it does not fire.
  • Hangar is the game's own Mech Hangar: writing that key changes the game's hangar.

A tower drawn as a building

A tower of yours can stand as any of the game's models (a building, a machine, a vein of ore) without a model of its own. Name a small JSON file beside tower_data.json in building_art, and in that file the model of each level:

{"Drill": {"base": "Gun", "building_art": "drill_art.json",
           "levels": {"1": {"fires": false}, "2": {"fires": false}, "3": {"fires": false}}}}
{"levels": {"1": {"game_model": "Buildings/MetalMiner_1", "cranes": 0},
            "2": {"game_model": "Buildings/MetalMiner_1", "cranes": 0, "scale": 1.2},
            "3": {"game_model": "Buildings/Factory_3", "cranes": 0, "scale": 0.8}}}
  • The model is only its look: the tower plays like its base, with what you write in tower_data.json. It does not turn to aim; the samples' buildings do not fire ("fires": false).
  • scale (1 by default) resizes the model. cranes is how many of the Collector's cranes it draws, 1 by default: write 0 unless it is a Collector.
  • A model of your own goes in its place as "file": "Models/Drill_1.glb", a GLB in your mod's folder. Torretaz's factory and antenna are named by file too: "file": "res://Assets/Models/Torretaz/Generator_1.glb".
  • Its picture in the palette is rendered from the model. Torretaz's Mine and Oil Extractor and Foundry Front's machines are built this way.

Towers that fire on ammunition

{
  "Gun":    {"levels": {"1": {"ammo": ""}, "2": {"ammo": "ammo_rounds"}, "3": {"ammo": "ammo_rounds"}}},
  "Cannon": {"levels": {"1": {"ammo": "ammo_shells", "ammo_per_shot": 2}}}
}

A level with ammo fires only while the factory has that material in stock, and spends ammo_per_shot (1 by default) at each reload; an empty ammo fires for free. Make the ammunition with recipes in material_data.json (factory).

Upgrade paths

With paths, a tower grows by up to three paths of tiers, bought in place, instead of by levels:

{"Gun": {"paths": {
  "caps": [5, 2, 0],
  "visual_levels": [2, 4],
  "list": [
    {"name": {"en": "Strength"}, "tiers": [{"price": 40, "damage_mult": 1.3}]},
    {"name": {"en": "Speed"}, "tiers": [{"price": 50, "rof_mult": 0.85}]},
    {"name": {"en": "Canopy"}, "requires": {"path": 0, "tier": 1},
     "tiers": [{"price": 60, "range_mult": 1.15}, {"price": 120, "detects_camo": true}]}
  ]}}}
  • caps: from the highest down, how far the bought paths may go. [5, 2, 0] lets one path reach 5, another 2, and keeps the third shut. requires makes a path wait for a tier of another.
  • visual_levels: the tiers up to which the tower wears its level 2 and level 3 model and numbers.
  • A tier has a price, and may have a name, a description and its effects: damage_mult, rof_mult (below 1 fires faster), range_mult, splash_radius with splash_ratio, detects_camo and income_add.

A tower with paths does not fuse. Banana Brigade gives every tower three paths.

Towers that earn

"income": 40 on a level pays that much gold at the end of every wave, and a tier adds to it with income_add. With "income_every": 8 beside it, the tower pays its income every 8 seconds of a wave instead.

Soldiers

{"MachineGun": {"levels": {"1": {"fires": false,
  "soldiers": {"count": 3, "health": 70, "damage": 5, "rof": 0.9, "speed": 70,
               "engage_range": 80, "respawn": 10}}}}}

A level with soldiers keeps that many units on the insects' road near the tower, and "fires": false stops the tower itself from shooting. A unit stops an insect that comes within engage_range and trades blows with it, damage every rof seconds; a fallen unit comes back after respawn seconds. More keys:

  • "holds": false: the units fight on the move, as the Mech Hangar's mechs do, and the insect walks on.
  • "stationary": true: a guard that stands on its tower's cell and strikes what is in front of it.
  • "model": "Allies/Sentinel": the units wear another ally model.
  • battery_seconds: each unit uses up one of the factory's battery every so many seconds of a wave.

A hero and powers

In balance.json, allies.hero puts a hero on the board from the first wave, with the units' keys plus a name and regen: the player clicks it and walks it with WASD or the left stick. allies.abilities lists powers, cast with F1 to F4, the d-pad, the bar at the bottom of the screen or the controller's wheel:

{"allies": {"abilities": [
  {"id": "strike", "name": {"en": "Orbital strike"}, "kind": "strike", "radius": 95, "damage": 140,
   "cooldown": 45, "icon": "res://Assets/Icons/ability_orbital_strike.png"},
  {"id": "help", "name": {"en": "Reinforcements"}, "kind": "reinforce", "count": 2, "duration": 14,
   "cooldown": 30, "unit": {"health": 60, "damage": 7, "rof": 0.8, "speed": 70, "engage_range": 75}}
]}}

A strike hits every insect within radius; a reinforce drops count units for duration seconds. requires_tower makes a power belong to a tower, cast from its ring, and charge makes each cast spend one of a factory material. A tower can also bring a hero of its own, under hero in tower_data.json, as the Mech Hangar brings its Commander.

Its training, the three branches its level points buy, comes from progression inside hero: change a node's level, cost, name or effects by its id ("progression": {"nodes": {"crosscut": {"level": 3, "cost": 2}}}), or write "enabled": false to leave the hero without training, its points going into damage, health or defense on its ring.

Iron Kingdom has soldiers, a hero and two powers, and Veteran Commander changes the hangar's Commander.