TI Space Nations/AI

From Terra Invicta Official Wiki

This page is part of the TI Space Nations mod.

This page explains how AI factions use the features of TI Space Nations. In multiplayer all of this runs on the host. How the aliens react is described on Aliens (spoilers).

Colony director

Setting: AI declares colony nations and pursues whole worlds

Once a month every human AI faction picks a target world:

  • preferably a colony world where it already has a base and is closest to owning it (own city +3, own hab +1, foreign hab −1, own nation +4; a world it already owns completely is skipped);
  • otherwise a world it would like to have (+1 per free hab site, +4 if it already has a foothold in that planet's system, −0.5 per AU of distance), if the vanilla colonization and safety checks allow it.

It then:

  • prospects the world and founds bases there (at most one such extra base goal at a time and never two on the same world, within the vanilla boost limits). Free hab sites on the target world are worth 3 × as much to it, sites on other worlds where it has a city 1.5 ×;
  • every month upgrades one tier-3 base on the target world to a City Core (needs an active mine and 2 spare mission control);
  • every month grows one city towards the crew threshold (Civilian Complex → Arcology, Administration Complex → Colonial Administration, then new Arcologies), spending at most half of any stockpile;
  • declares a nation from every qualifying city of its own - same threshold and cost as a player;
  • unifies its colony nations of one world, if it has the Planetary Union project;
  • values foreign colony nations on its target world 2 × as mission targets.

The AI does not build Garrison Citadels or Hydroponic Megaplexes.

Fleet doctrine

Setting: AI defends its colony worlds and builds the largest ships (human AI factions only)

Defending colony worlds

Each world gets a defense weight for an AI faction: +2 per own city, +3 per space nation there in which it holds control points, +2 for its target world, +1 per own hab. Without a colony stake the weight is 0, so Earth always stays vanilla.

From weight 3 on:

  • the AI sets up a Defend with Fleet goal for the world (importance 12 + weight, at most 15);
  • it wants a stronger fleet there: × (1 + 0.15 × weight), at most × 1.5;
  • it keeps 10 % of its ships on defense per such world, at most 30 % in total;
  • its habs there get armed modules: weight ÷ 3, at least 1 and at most the hab tier.

Largest ships

AI warship designs use the largest hull allowed, and ships in the build queue are replaced by the largest-hull design of the same role when the AI can afford it.

Transport bait

AI fleets judge enemy fleets with 3 or more Troop Transport Bays by what they might carry:

What the AI knows Effect
known to carry an army and heading for a world the AI guards 4 × target value; 75 % chance to redirect an attack to it (never to a stronger fleet than vanilla's choice)
cargo unknown, but its transfer is heading for such a world 1.8 × target value
cargo unknown, just parked vanilla judgement
known to be empty, or heading elsewhere 0.15 × target value; defenders never leave their post for it

The AI only "knows" the cargo the way it knows councilor passengers in vanilla: for its own and allied fleets, or with ship-details intel.

AI troop lifts

AI factions ship their own colonial armies between worlds (part of the fleet doctrine setting):

  • one plan per faction at a time, with a 12-month cooldown;
  • only spare armies are moved; every nation keeps at least 2;
  • preferred targets: undefended enemy provinces (only with Drop Pods) and own regions with enemy armies in them;
  • the escort must be worth at least 2 × the transports; a stage that does not progress within 180 days is abandoned;
  • same costs and times as for a player: 150 boost + 100 ops, 5 days to embark, 3 days to land;
  • the AI only designs a transport once it has a cruiser hull and a strong drive (at least 100 kN per thruster and 8 km/s exhaust velocity).

Auto-resolve missile discipline

Setting: Auto-resolve: a vastly superior side does not empty its missile tubes - a fix for vanilla auto-resolve, for players and AI alike.

In vanilla auto-resolve, a huge fleet can fire all its missiles at a handful of small targets. With this setting, a side that is at least 10 × stronger than its enemy (checked every 5 simulated seconds):

  • fires no missiles at targets its guns can reach,
  • keeps at most 2 missiles in flight per target,
  • keeps half of every magazine (rounded up).

Live tactical battles are not affected.

See also