Make BattleTabs Mods with Your AI Agent

BattleTabs modding lets you describe a change in plain words and have your own AI agent build it. Your agent writes a small mod file, tests it, and opens a page where you play it against a bot, all on your own computer.

Modding is in early preview and isn't available to download yet. We're starting with a small group of modders chosen from the sign-ups. You can't play mods with friends or inside the game yet, and we haven't set a date for either.

Sign up to try modding

How it works

MCP stands for Model Context Protocol. It's an open standard that lets an AI agent use outside tools. The BattleTabs modding MCP gives your agent a set of tools for building mods, plus the docs and examples it needs, so you talk to your agent and it does the file work.

1. Pick your ships

Tell your agent your idea. It calls list_ships to see the live ships and how each one is shaped.

2. Write the mod

Your agent writes one TypeScript file that says what changes. The real Battleship rules stay in place.

3. Check it

typecheck finds mistakes and starts a test match, so a bad value fails with a clear reason.

4. Test the balance

play_once runs a full bot game. simulate_n then plays your mod and the stock rules on the same fleets and compares them.

5. Play it yourself

play opens a local page where you play against the bot. Edit the file, press Reload mod, and try again.

What you can change

Cooldowns

Choose how often a ship's ability can be used. A cooldown of 1 is every turn and 2 is every other turn.

Ship shapes

Give a ship a new footprint. All its tiles must connect, and a bigger ship is easier to find and sink.

Names and descriptions

Rename a ship and rewrite what it says. Both players see the new text.

Combos and overcharge

Change how many combos a ship can chain, and whether it can overcharge.

Fleets

Pick the 4 ships in play, shared by both players or a different fleet for each.

Match rules with hooks

Run your own code at the start of a turn, on an attack or when a ship sinks. You can cancel an attack, skip a turn, keep score, show a message or end the match.

What you can't change yet

  • Change what an ability does. You can change when and how often it's used, not the effect.
  • See hidden ships. Hooks never get unrevealed positions, and they can't attack, reveal tiles or deal damage.
  • Place ships by hand. Fleets are placed at random from a seed.
  • Add new art, skins or 3D models.
  • Change the live game. Nothing you build reaches other players or your account.

What a ship mod looks like

This is a complete mod. The Dolphin's cooldown drops from 4 to 2, so its ability is ready twice as often. In exchange the ship loses a tile, and it gets a new name.

import { classic, defineShipMod } from "@battletabs/mod-api";

export default defineShipMod({
  id: "quick-dolphin",
  apiVersion: 1,
  classicVersion: "classic-1",
  rules: {
    pitch: "Dolphins sonar twice as often, but the ship is shorter.",
    bullets: ["Sink every enemy ship to win", "Dolphin cooldown is 2"],
  },
  maxTurns: 200,
  fleet: ["dolphin", "kayak", "sailboat", "crab"],
  ships: [
    classic.ship("dolphin", {
      cooldown: 2,
      segments: [{ x: 0, y: 0 }, { x: 1, y: 0 }],
      name: "Quick Dolphin",
    }),
  ],
});

The tools your agent gets

get_docs
Reads the modding docs and example mods.
list_ships
Lists live ships, or draws one ship's shape.
typecheck
Finds errors and starts a test match.
render_state
Draws the board, including after a list of moves.
play_once
Plays one full bot game and shows the result and log.
simulate_n
Runs many bot games against the stock rules and reports the difference.
play
Opens a local page where you play your mod against the bot.

Reading balance results

Small tests lie. A 50-game simulate_n run can move about 14 points either way by chance, so use 500 games before trusting a small difference. The report gives a margin of error and says in plain words whether the change is more than chance. It plays bots only, so play your mod yourself too.

Beyond ship mods

The same tools can build a new turn-based board game from scratch, not only ship changes. The examples include Connect Four, a Connect Four variant with a kraken, and a three-player game. These run the same way, against a bot on your own computer.

Questions

Can I use the modding MCP today?

Not yet. It's in early preview, and the first modders will be chosen from the sign-ups.

Do I need to know how to code?

You need to be happy working with an AI agent. The agent writes the TypeScript, and you test the result and say what to change.

Which AI agents work with it?

Any agent or editor that can run a local MCP server should work. You bring your own agent, and any cost for it is between you and its provider.

Does my mod go to BattleTabs?

No. The MCP runs on your computer and doesn't talk to BattleTabs servers. Your AI agent will send what it reads to its own provider, as it does with any other work.

Is it safe to run a mod?

Mods run in a sandbox with limits on memory and time, and no npm packages. If a mod crashes or stalls, the match is voided rather than given a result. A mod that breaks the rules of the sandbox is treated as a bug in the mod.

Can I play my mod with friends?

Not yet. Today you play against a bot on your own computer. Playing with friends depends on how much interest we see.

How to Play ยท Submit a Cosmetic