← Game systems

Released / Baldur's Gate 3 companion control

UTAC

Let companions take their own turns while you direct the fight. Ultimate Tactical AI Companions gives you a way to assign roles, guide target choices and take manual control back when you want it.

UTAC artwork showing Shadowheart, Astarion, Gale and Lae'zel coordinating at a woodland ruin.
Published mod artwork. This is an illustration, not a gameplay screenshot.

How it plays

In a playthrough

Give a companion a melee role before combat, then use Focus Target to point them toward a priority enemy. Baldur's Gate 3's built-in AI weighs that preference when it picks an action. You can keep playing your own character and use Release AI Control to take over the companion again.

  • Give each companion a role

    Assign a frontline Bruiser, a ranged Marksman or a Healer before combat.

  • Set limits on spell use

    Use the mod settings to block specific spells for companions the AI controls and turn on optional combat assistance.

  • Switch from torches to weapons

    An optional setting brings back remembered weapons for eligible companions when a fight starts.

How I built it

The problem

Handing a character to the game's combat AI changes who controls their turns, which actions the engine considers and what happens when the player takes control again. The mod has to coordinate those changes while leaving the player room to make tactical decisions.

My contribution

I define the combat roles, targeting controls and rules for handing companions back to the player. I use AI coding tools for much of the implementation. I investigate reports with game logs and focused reproductions, review how the engine handles changes and maintain the releases and support.

Implementation choices

Guide the game's own combat AI

Roles steer preferences for melee, ranged, support and spellcasting. Focus Target and Ignore Target let players influence priorities during a fight. The built-in AI evaluates the character's available actions and chooses what to do with its normal resources.

Manage the handover per companion

Scripts use BG3 Script Extender and the game's Osiris scripting API to track combat state and manage control. Optional NPC Mode lets eligible companions temporarily act as NPC allies in combat. Co-op settings follow the host's configuration.

Give the engine more eligible actions

Summoner and Primal Druid can make supported summons and forms available to the AI when their prerequisites are met. In a recorded development test, a Summoner used Animate Dead once an eligible corpse appeared. The engine applied the normal cost, and the three zombies remained after UTAC cleared its temporary spell access.

Restore equipment before combat

Optional torch switching remembers a companion's normal weapons and offhand gear and gives equipment preparation time to finish before AI handover. It can return the original torch after combat. The equipment routine skips the swap if the companion has already acted or the loadout cannot be restored safely.

Recent development

Restore spell rules when the spellbook changes

Combat logs showed that a companion's configured spell restrictions could disappear mid-fight. I added an event handler for that companion so UTAC can reapply its rules when the game refreshes the spellbook. In one recorded fight, the rules were restored and the companion chose other actions.

Measure the work a turn actually needs

I made the target-order diagnostic read-only so it can report priorities without changing them. I also removed enemy-pair distance checks on turns where no active behaviour uses them. In an offline fixture with 12 enemies, that path went from 132 pair comparisons to zero, while the area-of-effect path kept its results.

Result

Players can delegate combat, give each companion a role and adjust priorities as the fight develops. Maintaining the mod involves testing how those choices interact with native combat, equipment and control state.

Availability and scope

The examples cover the published mod and ongoing development. Nexus lists the downloadable builds and known limits.

Project notes reviewed November 18, 2026. Development status is separate from Nexus reception updates.

Back to game systems