Skip to content

Guide

Running combat with AI.

Combat is where an AI usually gives itself away. It narrates a hit it never rolled, invents the damage, forgets the goblin already fell. Familiar runs it differently. The AI acts through Foundry's own dice and the 5e rules, so it cannot fudge a roll, quietly skip a step, or deal damage it did not earn. It decides and narrates; the rules live in code it does not control.

Why you can trust it with the dice

Most AI tools narrate combat. They describe a swing, name a number, and move on, and you cannot tell a real roll from a made-up one. So you go back to checking the AI's work, the very bookkeeping you wanted to hand off.

Familiar does not let the model do the maths. I built an engine that sits between the AI and your game: every move it wants to make passes through that engine first. It checks the move against the 5e rules, then hands the real roll to Foundry's own dice. The AI decides what to attempt. Familiar decides whether it is allowed. When the two disagree, the engine wins.

  • Narrate: the model says it rolled a hit, and you take its word for the number.
  • Enforce: the AI calls for an attack, Foundry rolls it against real AC, and the result is the result.
  • The difference is not a better prompt. It is whether a real engine sits between the AI and your game.

What Familiar sees

An AI cannot play a fight it cannot see, so I built it a way to see. Every turn, Familiar assembles the whole board into a single snapshot and hands it to the model before it acts. On a troll's turn that snapshot is the troll's own stat block, every combatant's hit points and armour class, the condition on each of them. It shows which reactions are still held back, the bard's Cutting Words, the wizard's Shield, so the swing holds no surprises. It maps the battlefield at five feet to the square: who is in reach, who is not, where an opportunity attack waits. It even rates the fight deadly for the party. Then the AI decides.

That snapshot is why it plays a creature like the creature, not a chatbot narrating a battle it cannot see. Here is the actual reading a turn starts from, trimmed for readability.

What the AI reads before a turn
{
  "round": 1,
  "turn": 2,
  "currentCombatant": {
    "name": "Troll",
    "ac": 15,
    "hpPercent": 100,
    "reactionAvailable": true,
    "actionEconomy": { "actionUsed": false, "bonusActionUsed": false, "reactionUsed": false },
    "currentResourceState": { "speedRemaining": 30, "spellSlotsRemaining": {} }
  },
  "statBlock": {
    "abilities": { "str": { "value": 18, "mod": 4 }, "con": { "value": 20, "mod": 5 } },
    "hp": { "value": 84, "max": 84, "temp": 0 },
    "ac": 15,
    "cr": 5,
    "weapons": [
      { "name": "Bite", "activities": [{ "damage": "1d6", "damageType": "piercing", "range": "5 ft" }] },
      { "name": "Claw", "activities": [{ "damage": "2d6", "damageType": "slashing", "range": "5 ft" }] }
    ],
    "features": [
      { "name": "Multiattack", "description": "Three attacks: one bite and two claws." },
      { "name": "Regeneration", "description": "Regains 10 hit points at the start of its turn." }
    ]
  },
  "combatants": [
    { "name": "Bramble", "disposition": 1, "ac": 16, "hp": { "value": 31, "max": 35 }, "hpPercent": 89,
      "reactions": [{ "name": "Thornbark", "type": "feature" }] },
    { "name": "Naia", "disposition": 1, "ac": 15, "hp": { "value": 23, "max": 23 }, "hpPercent": 100,
      "resistances": ["necrotic"], "reactions": [{ "name": "Shield", "type": "spell" }] },
    { "name": "Troll", "disposition": -1, "ac": 15, "hpPercent": 100 }
  ],
  "battlefield": {
    "scene": { "name": "Golden Flats" },
    "grid": { "units": "ft", "distance": 5 },
    "pairwiseDistances": [{ "from": "Troll", "to": "Bramble", "distance": 17.5 }],
    "outOfMeleeReach": [{ "name": "Bramble", "distance": 17.5, "reach": 5 }]
  },
  "encounterDifficulty": {
    "rating": "deadly",
    "totalMonsterXp": 2200,
    "adjustedXp": 4400,
    "partyThresholds": { "easy": 225, "medium": 450, "hard": 675, "deadly": 1200 }
  }
}

How a turn runs

Every NPC turn runs the same short loop. The AI never touches your game state directly. It asks the engine to act, and the engine acts only if the rules allow it.

On the troll's turn it lined up a claw on a ranger 17 feet away. The engine refused. The claw reaches 5. So it pulled the tactical options, took the flanking step that put the ranger in reach and two orcs at its side, and swung. The die came up a 6 against AC 16. A miss, left as a miss.

Foundry players get this kind of automation by stacking MidiQOL with half a dozen supporting modules. That stack rolls the dice, but it assumes a human is driving, placing the tokens and choosing legal moves by hand. Familiar is built for an AI driver, so it cannot assume that. The rules are enforced, not suggested. You reach that with one module, not a stack meant for a human to steer.

  1. Decide

    The AI reads the battlefield: who is up, where they stand, what they can do. It picks a target and an action.

  2. Check

    Before anything happens, the engine tests the move against the rules. Is the target in range, is it this creature's turn, is there a spell slot left, does the attack beat the AC. An illegal move is refused, and the AI reads the refusal and adapts.

  3. Roll

    Foundry rolls the dice. The dnd5e system applies resistance, immunity, and vulnerability, then the damage. No number is invented.

  4. Update

    The result is written to the canvas: hit points, conditions, concentration, the turn order. You watch it happen, and you can undo it.

What it runs today

You drive it from the chat box, in plain language. Tell Familiar to start the fight and it rolls initiative, orders the turn, and plays the monsters when you hand them over.

DM-side only. Familiar pilots the monsters and the NPCs. You stay the DM, your players stay the players, and it never rolls for them or decides what they do.

What Familiar runs in combat today
AreaWhat it handles
Initiative & turnsRolls initiative, orders the turn, advances rounds, and tracks whose turn it is.
AttacksRolls against AC, handles the crit and the full multiattack, and applies damage with resistance, immunity, and vulnerability.
SpellsSpends the slot, rolls the saves, tracks concentration, and applies the effect.
MovementMoves a creature within its speed. A move that would break it is refused.
ConditionsApplies and clears prone, poisoned, grappled, and the rest, by the rule that grants them, not by fiat.
Reactions & featuresAuto-fires Shield, Counterspell, Legendary Resistance, and Hellish Rebuke, and rider features like Sneak Attack, Divine Smite, and Weapon Mastery, at the right moment.
Death & recoveryRolls death saves and keeps the count, and undoes the last action when a call goes wrong.

Full combat automation is D&D 5e on the 2024 rules. Other game systems still get the general tools: dice, the tracker, and conditions.

Under the hood

That is the turn as you see it. Underneath it is the machinery I built: every action takes the same fixed path from your words to the dice, and the rules are checked at each step rather than trusted to the model.

It all runs on your own machine: your Foundry and a small local server, joined by a secret-guarded socket. Familiar has no cloud of its own and never hosts your world. The only thing that leaves your computer is the request you send to the AI you picked, the same as any other chat with it.

  1. Typed action

    Each action has a fixed, typed shape. A request that does not fit is turned away before it travels anywhere.

  2. Server check

    A local server validates the request, then validates Foundry's reply again before the AI is allowed to read it.

  3. Local socket

    A secret-guarded socket carries it to Foundry. The bridge is bound to your own computer, not the internet.

  4. GM gate

    One checkpoint confirms the request belongs to the GM before anything touches the world. Every request, no exceptions.

  5. Rules gate

    Range, turn order, action economy, and spell slots are checked here, along with four locked doors that block damage, conditions, movement, and effects from being set by fiat.

  6. Foundry rolls

    Foundry's own D&D 5e system rolls the dice and applies the result. Familiar does not reimplement the rules; it uses the ones your table already trusts.

Those four locked doors cannot be forced. The legality checks, range, turn, action economy, and spell slots, can be overridden for a narrative exception, and the engine logs every one.

The engine came first

I did not want to release a weekend demo: the kind of AI DM that looks clever for five minutes, then falls apart the moment a real fight gets complicated. I wanted something that could run a real fight. So I built the engine before I built the product around it, with one stubborn goal: the first AI combat engine that actually works.

That meant the slow, unglamorous part first: the resolvers, the rule gates, the dnd5e maths. Five hundred hours went into the engine before a single player saw it, and thousands of test fights showed me where it broke. Every rule is verified in a live game before it ships. What you run today is what came through that.

It is not finished, and I would rather say so. The spell library covers the common workhorses and grows with each release, though it is not yet the whole Player's Handbook. More reactions, feats, and class features are coming, and area-of-effect spells are gaining coverage.

What I want now is players in it. If Familiar gets a rule wrong at your table, tell me, and the fix goes into the next release. That loop is how the engine got this far, and it is how it gets better.

The engine came first. The product wrapped around it.

Where you stay the DM

Some of the table is yours by design. A few rules turn on a judgement call or a house ruling, so Familiar surfaces them and leaves the decision to you instead of inventing one. Flanking, how you count diagonals, and when a readied action's trigger fires all stay your call.

When the call is about legality, you can overrule it. A creature striking from just past its reach, or acting a beat out of turn, goes through with a reason the engine writes to the log. The hard floors do not move. In a live fight the AI cannot deal damage, set a condition, move a token past its speed, or conjure an effect out of nowhere, with or without a reason.

A stated limit is the point, not an apology. The AI runs the parts a rules engine can run, and hands the judgement calls back to you.

Run your next fight

Install Familiar in Foundry, connect the AI you already pay for, and start a fight. Roll initiative, hand over the monsters, and watch the bookkeeping take care of itself while you stay in the scene.

The "Connect via MCP" guide walks the setup click by click. Bring a ruling you are unsure about to the Discord, and I will answer it myself.

More in Run your game

New to Familiar? I'm Ryan, the person who built it. The Discord is small and brand new, so if you join now I'll help you get set up myself.