WIKI

Моды

Всё, что может мод

Каждая часть Torreta, которую мод может заменить или переделать, от моделей башен до правил совершенно новой башенной защиты, с файлом, руководством и примером для каждой.

Эта статья написана на английском.

What a mod is

A mod is a folder with a mod.json and the files it changes: JSON for rules and data, GLB models, PNG pictures, WAV, OGG or MP3 sounds. Most mods need no code; one that wants new rules may carry a script in GDScript or Lua. Put the folder in the Mods folder (Options → Mods → Open Mods Folder), tick it and restart. Several mods combine: their JSON merges key by key, and when two change the same value, the later one in the list wins.

Every card below names the file that does it, the guide with the full contract and an example to copy. A mod that changes the rules plays on its own profile; one that only changes the looks plays exactly like the normal game.

3D models

models.json maps any of the game's model keys to a GLB of yours (glTF 2.0, exported from Blender or any other tool). Whatever you leave out keeps the game's art. Every key, its pivots and its size are listed in vanilla_reference/model_catalog.json. Model mapping

Towers

Every tower at levels 1, 2 and 3 and the six fusions. Your model turns on its Yaw and Pitch pivots, recoils, and fires from its own Muzzle_0, Muzzle_1… points, also in the cockpit. A creature can beat its wings and open its jaw while it attacks. The tower's icons and its skill-tree nodes are rendered again from your model.

Towers/Gun_1 … Towers/Gun_3_Fused · Tower models · Flame as A dragon

Insects

Any of the 36 families, walking and flying, the ten newer species in their three palettes, the worm, and the bosses, which are your model enlarged. Optional organs for champions and wing covers for beetles. Upright things that should float rather than walk take "locomotion": "float"; flyers set their wingbeat with flight_cycle_speed. Your geometry is the hitbox the cockpit aims at.

Enemies/<family>, Enemies/Castes/<caste> · Flying creatures · Ptero flyers

Buildings and factory

The factory at its three levels, the barracks and the radar, with their moving parts and lamps. The assembler, splitter and conveyors, the cargo box of every material, and the zoomable 3D factory room with its own floor coordinates.

Buildings/*, Factory/*, Factory/Room · Factory room · Cobalt factory room

Arena pieces

The whole arena, the fences, the drill barrier at each level with its spinning heads (Drill_N) and lightning paths, the plain's dry shrubs, debris, the Collector's claw, and the energy core of the cores rule.

Environment/* · Blender contract · Cores

Rubble

The three natural rock piles and every tower's wreck. Name nodes Piece_1, Piece_2… in the GLB to choose which stones the Collector's magnet carries off on each trip.

Environment/Rubble_* · Stone by stone

Ground markers

The tile cursor, the co-op partner's cursor, the range ring and the three radar route modules. They keep the game's colours for a valid, blocking or refused placement.

Markers/* · Markers · example_glb_markers

Allies

The soldiers a barracks keeps on the road, the reinforcements a power drops and the hero.

Allies/Soldier, Allies/Reinforcement, Allies/Hero · Iron Kingdom

Materials

Your PBR textures as exported (colour, metal, roughness, normal map, emission), or the game's own vertex-painted look, which keeps the insects' chitin and glowing eyes. Either way the models are built up from the ground, take hits, break apart and get wet in the rain like the game's own.

"material": "imported" or "game" · Materials and performance

The game's own models

A slot can wear one of the game's models kept under another key, named rather than copied: Iron Kingdom's barracks and mechs are the Mech Hangar's. A mod never ships a copy of a game model; only models of your own go in as files.

"game_model": "Towers/Hangar_1" · Model mapping · Iron Kingdom

Lighter from afar

Simpler versions of a dense model drawn when the camera is far, made at load time from your own file. Rigid assemblies of many pieces can simplify each piece on its own, without adding draw calls.

"generate_lods": true, "lod_mode": "rigid_parts" · Model mapping

Arena and board

scenarios.json replaces the pit with arenas of yours; markers inside the GLB decide where insects walk and towers stand. Scenery mods

Your own arena

A beach, a forest, ruins: any landscape within the arena's footprint, with your own PBR ground that still takes rain, clouds and worm holes.

scenarios.json · Tidal Coast, Banana Brigade

Stages by difficulty and wave

A different arena for each difficulty, changing at the waves you choose and cycling in endless mode, without a loading screen.

difficulties.<n>.stages, cycle_waves · Scenery mods

Where insects walk and towers stand

Empties in the GLB mark walkable and buildable cells separately: ground only for towers, ground only for insects, and raised mesas whose height lifts the tower standing on them.

GameplayTiles/Walkable, GameplayTiles/Buildable · Cells

A fixed route

A classic path the insects follow from the nest to the cave, crossing itself if you like. Towers cannot stand on it, and flyers may follow it too. The game's own traditional scene is ready to use.

Route_1, Route_2…, "builtin": "traditional" · Traditional path

Rubble on the board

How many rock piles a run scatters, per difficulty, or an exact layout that is the same on every seed. How many Collector trips each pile takes, and whether tower wrecks block the insects.

MapCoords.rubble · Rubble

Rules and balance

balance.json patches the game's own profile: write only the values you change. vanilla_reference/balance.json holds every key with the shipped numbers. Data and precedence

Tower numbers

Damage, range, fire rate, price and every other stat of each level and fusion; the accuracy of each projectile tower and how far a miss lands; upkeep.

towers.stat_overrides, towers.accuracy · example_balance_towers

Economy and difficulty

Starting gold and lives, kill rewards, the health curve of the waves and each difficulty's multipliers.

general, economy, enemies, difficulty · example_balance_hard_mode

Cards

The pool, rarities, the wave each card first appears, their effects and the worm's risk; new cards added to the game's pool by id; or no cards at all, the next wave joining straight on.

cards, cards.pool_add, cards.enabled: false

Skill tree

Each node's costs, limits and minimum level, and the picture on it.

PurchasableStats · Node art

How a run starts

Every tower and feature unlocked, a stock of every material, chosen towers already open, the cockpit open and without a stopwatch. The mod's own profile can start at a level of your choice with every skill point, from the menu on.

run_start, run_start.player_level, run_start.skill_points, cockpit.unlimited_time · All resources

Which towers exist

Retire tower types from the run, and let levels 2 and 3 skip the skill tree.

towers.disabled, towers.upgrades_need_skills · A board's own rules

A tower of your own

A new tower beside the game's ten, built on one of them: its own name, levels, soldiers and 3D models, icons baked from those models, and a card that unlocks it.

"base" in tower_data.json, Towers/<Key>_1 · A tower of your own

Batteries and a tower's powers

Units that drain a factory material while they fight and go home without it, a tower's card that brings supplies, and powers that belong to a tower: cast from its ring and window, each spending a charge the factory makes one at a time. The game's Mech Hangar is built this way.

battery_seconds, start_supply, requires_tower, charge, max_stock · A tower of your own

A tower's hero

A hero that comes out of a tower once a skill node is bought: driven and striking by hand, healing at rest, gaining levels whose points go into damage, health or defense on its ring, a jetpack at the top level, and back to its starting level when it falls. How hard the insect it struck hits back is a share of its health. Its numbers, model, name and ring pictures are all data.

hero in tower_data.json, start_level, struck_share · A tower of your own · Veteran Commander

Camouflage and the final boss

Which waves are camouflaged, which towers see them and whether they share the sight, the Brood Mind's numbers and model, and the Adaptive Optics card.

cloaked_waves, bosses.final_boss · Final encounters

Weather against towers

What rain and sandstorms do to the towers: by default rain weakens the Flame and strengthens the Bolt, and sand spoils aim. Any tower stat can be listed.

weather.tower_effects · Weather

Another tower defense

Data alone can turn Torreta into a different tower defense. Every rule here is off until a mod writes it. Writing another tower defense

A total conversion

A mod that makes Torreta another game says so in its mod.json. Only one plays at a time: ticking it switches the other off. Cosmetic and gameplay mods still combine with it, and the Mods screen gives it a badge and a filter of its own.

"total_conversion": true · Total conversions

Your towers' names

Each tower slot can take its own name and description in every language. The palette, its tooltip, the wheel, the tower window and the guide use them, and the tooltip says what the tower does: no fire, its units, its income, its ammunition, its paths.

name, description in tower_data.json · Naming your towers

Hand-written waves

Your own enemy types (health, speed, reward, shield, size, camouflage, what a leak costs) and every wave's groups, spacing and delays, with health by difficulty. After the last wave the run is won, or the game's own waves carry on.

waves.json · Waves

Layers

An enemy that bursts into others where it dies, and the wave waits for them.

children · Banana Brigade

Immunity and resistance

Enemies that ignore or shrug off a kind of damage: projectiles, explosions, flame, frost, lightning, laser, poison or the barrier.

immune, resist

Upgrade paths

Up to three paths of tiers bought in place, with crosspath limits and branches that need another path first. Tiers multiply damage, rate and range, add splash, camouflage sight or income, and switch the tower's model.

paths in tower_data.json · Upgrade paths

Soldiers

A barracks tower that keeps units at a rally point on the road. They stop insects and trade blows with them, and come back after they fall.

soldiers, "fires": false · Iron Kingdom

A hero and powers

A hero the player clicks and walks with WASD or the left stick, and powers on a cooldown: a strike over an area, or reinforcements for a while. Keys, an on-screen bar and the controller's wheel cast them.

allies.hero, allies.abilities · Soldiers, hero, powers

Towers that earn

Gold paid at the end of every wave, by a tower level or an upgrade tier.

income, income_add

Co-op halves

Split a co-op board between the two players, left and right or top and bottom: each builds, upgrades and earns on their own half, and the lives stay shared.

multiplayer.coop.build_zones

A living route

A path that grows after every wave, bending around your towers into new pockets. Where you build, it cannot go.

route_growth · Living Trail

Cores

Your lives become energy cores kept in the cave. Insects carry them back to the nest; kill the carrier and the core drifts home.

cores · Cores

Factory and ammunition

Materials and recipes

New materials and recipes, their names in each language and a counter in the top bar; stock ones removed; a recipe's default stock limit and how much a batch makes.

material_data.json, factory.recipe_output_multipliers

Ammunition as the shot

A tower level that fires only on an ammunition the factory makes, and holds fire without it.

ammo, ammo_per_shot · Factory ammunition

Costs

The materials each tower and fusion costs, or towers that cost money only.

tower_fusion.cost_materials, factory.tower_material_mult · Ammunition

Weather and wildlife

All cosmetic: a mod that only changes these keeps the normal profile.

Weather

How often it rains or a sandstorm blows, how strong they get, the wind and its gusts, night lightning, puddles and clouds.

weather in balance.json · Weather, Sandstorms

Living desert

How much dust, tracks and heat haze the desert shows, how much life the pit holds, and the water running over the ground in the rain.

weather.scenery_fx · Living desert

Birds

Which birds cross the sky and when, flock sizes and formations, and new species from your own models.

birds.json, Birds/<Name> · Birds · Flamingos at dusk

Snakes

Which snakes cross the pit and the plain, how often and at what hour, how they move, and how often a bird of prey takes one. New species come from your own models.

snakes.json, Snakes/<Name> · Snakes

Microfauna

The small colonies in the pit and on the plain: who lives together, how many, and how each moves: a trail, a wander, hops or flight.

microfauna.json, Microfauna/<Name> · Microfauna · Desert scorpions

Sound and cursor

Sound effects and music

Any of the twenty named effects (building, selling, waves, menus, deaths, the worm, wind, rain, sand, thunder, puddles) and any music track, from WAV, OGG or MP3, plus the volume of the weather's sound.

sounds.json, weather.audio · Sounds

Cursor

Your own picture for the mouse and controller pointer, its click point, and a picture for each cursor colour.

cursor.json · Cursors · example_cursor

Scripts

For rules that numbers cannot express, a mod may carry a script that the game calls when things happen in a run, like a Factorio mod's control.lua. It acts only through one object, api, and only in the ways the player allowed. Script mods

GDScript or Lua

The same hooks, API and capabilities in either language: the entry file's extension picks it. A GDScript file is checked name by name before it compiles; Lua runs in its own sandbox with Lua 5.4's safe libraries, an instruction budget per hook and a memory cap.

"script": {"entry": "control.gd"} or "control.lua" in mod.json · Lua scripts

Hooks

A run starting or ending, a wave starting or closing, an insect walking out, dying or reaching the cave, a hit about to land (its damage can be changed), a tower built, upgraded or sold, a card taken, and a tick ten times a game second.

on_enemy_killed, on_damage, on_tick… · Hooks

What a script may do

Give or take gold and lives, damage or slow insects, multiply a tower's damage, fire rate or range, spawn more of the wave, and show a notice, each behind a capability the mod declares. It keeps its own storage, saved with the run, and draws random numbers from the run's seed, so co-op stays in step.

capabilities, api.storage, api.rng · The API

The player allows it

The Mods screen marks a script mod and lists what it may do; it stays off until the player allows it, and asks again when a new version wants more. A script that errors or runs too long is switched off for the run.

_example_script_bounty, _example_lua_bounty · When a script fails

Multiplayer and bots

Cosmetic mods play with anyone

With only cosmetic mods you meet players without mods or with other cosmetic mods, and each sees their own art.

Multiplayer

Gameplay mods are matched

Every seat needs the same gameplay mods, with the same files, in the same order. The game compares their contents, so an edited file counts even if its version number did not change.

Multiplayer

Bots

Bots fill a PvP lobby's empty seats. A gameplay mod lets them play with a bots.json, and can give them its own mazes and card values. They play the tower defense rules above too.

bots.json · PvP bots

Sharing on the Steam Workshop

Publish from the game, with Steam running: Options → Mods, then Publish on your mod's row. Give it a change note, choose who can see it, and put a preview.png or .jpg (up to 1 MB) beside mod.json for its picture. The item is tagged Gameplay or Cosmetic by itself. Later publishes update the same item (its id is kept in workshop_item.json), and subscribers receive it automatically. Publishing on the Steam Workshop

Cosmetic, gameplay or total conversion

A mod is a gameplay mod when it ships any rules file (balance.json, waves.json, tower_data.json, map_data.json, material_data.json, enemy_data.json, scenarios.json), a script, or a model the game measures against: towers, insects or the arena. It plays on a profile of its own, so your normal progress and Continue stay untouched, and achievements, experience, crystals and leaderboards are off while it is on. Skill points still count, on its profile.

Everything else is cosmetic: buildings, factory pieces, markers, rubble and other scenery, birds, snakes, microfauna, sounds and the cursor. A cosmetic mod plays exactly like the normal game.

A gameplay mod that makes Torreta another game declares itself a total conversion ("total_conversion": true), like Banana Brigade, Iron Kingdom, Traditional path, Living Trail and Cores. Only one plays at a time, beside any cosmetic and gameplay mods. The Mods screen badges and filters all three kinds.

What a mod cannot do

  • Run code outside its script's API. A script reaches the game only through api, with the capabilities the player allowed: no files, network, engine nodes or other mods. Godot resources (.tscn, .tres…) are refused, and new menus, controls or tower behaviours beyond the keys above are outside the mod system.
  • Touch the crystals or the insect catalogue. The Steam crystals' rules and the five-wave family cadence stay the game's.
  • Animate with skeletons. The game moves models by their named pivots; armatures, skins, animation clips, cameras and lights in a GLB are not used. A GLB may be up to 64 MiB, a sound 32 MiB, a cursor 1024 pixels a side.
  • Replace the 3D shaders. Choose the imported PBR materials or the game's own look instead.
  • Change anything without a restart. Installing, editing, enabling or disabling a mod takes effect the next time the game starts; the Mods screen's Restart now does that in one press.