The NPR colony and economic AI runs the colonies of a non-player race. It seeds and removes colony records, picks terraforming targets, writes installation requests and queues construction, plans ordnance, fighter and shipyard work, and trains, positions and transports ground forces. These planners queue production projects, move orders and installation requests. The pages linked in each section describe how that work is carried out. The strategic clocks, system values and fleet allocation belong to NPR strategic planning. The orderings on this page describe what the game does, not an intended optimal strategy.

During play, three rules create NPR colony records. The six-month expansion seed creates mineral and terraforming colonies, as described in Expansion and economic targets. A completed geological survey creates them through the survey-time seeds. The troop transport pass creates a staging population on a body held by hostile aliens when the race has no population there. The population value refresh also seeds existing empty records. Race creation adds the starting colonies described in NPR race generation. Two rules remove records.

The population value refresh runs at the start of both population planners, before any queue decision. It writes the population’s value tier (FCT_Population.AIValue), its colonist role (FCT_Population.ColonistDestination) and the scores the planner keeps, in this order. The value tiers are stored as Outpost 0, Colony 1, Developing 2, Industrial 3, Core 4 and Capital 5. The colonist roles are stored as destination of colonists 0, source of colonists 1 and stable 2.

  1. A capital gets the Capital tier, and the refresh ends there before any other write.
  2. A population in a system whose NPR system value is None gets the Outpost tier and becomes a source of colonists, and the refresh continues.
  3. The body’s colony cost is recalculated with orbital extremes. A negative current cost gives the Outpost tier and ends the refresh.
  4. The terraforming work score is recomputed when the worst-case cost is above 0, else set to 0. The mineral value is the mineral value formula, with each mineral weighted by the capital’s stockpile, when the race has surveyed the body, else 0.
  5. A total population below 25 makes the population a destination of colonists, below 100 stable, and otherwise a source of colonists.
  6. A standard NPR population with total population 0 on a body with worst-case cost below 2 and zero radiation and dust is set to population 0.0001. It requests 50 infrastructure when gravity is below the species minimum and 100 otherwise.
  7. The mining score M, the research lab count B and the logistics score L are recomputed, then the value tier below is assigned. M is mines plus automated mines plus 10 times civilian mining complexes. L is 5 times spaceports, plus refuelling stations, plus ordnance transfer stations, plus maintenance facilities divided by 10.
  8. A standard NPR population above the Colony tier that still has total population 0 gets the six-month seed rules. A worst-case cost from 0 up to but not including 2.5, with gravity inside the species range, requests 50 infrastructure. A worst-case cost from 0 up to but not including 2, with gravity below the species minimum, requests 100. Each sets population 0.0001.

Every path that reaches step 6 overwrites both writes of step 2, the colonist role at step 6 and the tier at step 8. The source-of-colonists role from a None system therefore survives only when the refresh ends at the negative-cost test. Step 7 reverses the gravity rule of step 9 and of the six-month seed, which give 100 infrastructure to the low-gravity body and 50 to the in-range one.

The tier test starts at Core and descends, and the first tier whose any-of test passes is assigned. P is total population, M the mining score, L the logistics score, R the body’s RuinID value, and B the whole research lab count.

Tier Assigned when any of these holds Stored AIValue
Core P>200, M>400, R>8, B>25 4
Industrial P>50, M>100, L>4, R>6, B>5 3
Developing P>10, M>20, L>1, R>4, a terraforming work score above 0 and below 0.1, B>1 2
Colony P>0.5, M>0, L>0, R>2 1
Outpost None of the above 0

When a fleet of a standard NPR completes a geological survey of a body, the game tries to create a population there. It does nothing unless the body’s farthest orbital distance is below 80 AU (for a moon, its parent’s orbital distance). The body’s star must also pass a Lagrange-point check. The system’s primary star always passes, and a companion star passes only when its orbit or nearby Lagrange points lie within 80 AU. Gas giants and superjovians never pass. It also does nothing for a body that already holds one of the race’s populations, or for a negative current colony cost.

Body condition, first match Record and requests
Worst-case cost 0 Population 0.0001 and a request for one Deep Space Tracking Station
Worst-case cost below 1.5, or mineral value at least 6 Population record. In-range gravity with cost below 2.5 requests 50 infrastructure, and below-minimum gravity with cost below 2 requests 100, each with population 0.0001
Ruins (RuinID above 0), otherwise a ground mineral survey better than Minimal Population record with no request

The last row is a separate check after the first two, so a ruin body that matched an earlier row reuses that record. A survey better than Minimal is Low, Good, High or Excellent, stored as GroundMineralSurvey 2 to 5.

The valueless colony removal deletes a population only when every test in this list passes. It reads the stored values written by the latest population value refresh.

  • Empty: total population not above 0 and no installation entries.
  • No value: mineral value below 6, and a terraforming work score that is not both above 0 and below 0.1.
  • No ruin or survey work: AbandonedFactories 0 and a ground mineral survey of Completed or Minimal (GroundMineralSurvey at most 1).
  • Not staged: InvasionStagingPoint false.
  • Costly environment: colony cost without orbital extremes not below 2.
  • Unused: no ground formation of the race at the population and no move order of the race’s fleets naming it.

Removing a population clears the race’s queued research and sector commands at the population, and the naval admin commands and contacts at it. It clears all orders of fleets of the population’s race whose orders target the population or one of those contacts, and empties the cargo of freighters and colony ships among them. It clears every fleet’s assignment to the population and removes the population’s shipyards, shipyard tasks, commander assignments and ground formations, then the population itself and any fixed body it sits on. The monthly strategic update of a standard NPR runs this removal first. The Add NPR OG button of the Economics window, shown only in designer mode, refreshes the value of every population of each NPR and then runs the removal for that NPR.

When an NPR occupies a surrendered population that still has people, the conquest step moves the NPR’s friendly formations onto it. It then lists every other population on that body with total population 0 and no installations, clears their staging flags and runs the empty-population removal on them, with the surrendered population as the replacement. Population control transfer covers the surrender itself.

The empty-population removal skips a population that still hosts one of the race’s formations. It also skips one named by a move order of the race’s fleets when no replacement population is given. Otherwise it points each such order at the replacement and removes the population. The conquest list does not filter by race, so an empty population of another race on the same body also passes through the NPR race’s removal.

The construction cycle moves minerals to the capital for every NPR , after population production and system valuation. That step applies to every NPR . The check for NPR AI processing applies to the strategic step that follows, not to the transfer.

The transfer does nothing unless the race is a standard NPR. Each population other than the capital that holds any positive mineral adds its whole stockpile to the capital and clears its own. No ship carries these minerals, and a race without a capital moves nothing. While NPR AI processing is enabled, the production step of each NPR population passes the capital as the mineral source of its industrial projects, as the production NPC differences describe.

Mining and terraforming destination helpers

Section titled “Mining and terraforming destination helpers”

Three searches choose populations for standing orders and automatic route searches.

Search Candidates Choice
Automated mine source Race populations with total population above 0 and at least one whole automated mine First in the game’s population order, or the nearest by travel distance through Lagrange points when the nearest is wanted
Unpopulated mining colony Race populations with total population 0 and at least one whole automated mine (when automated mines are wanted) or manned mine (otherwise) Same rule
Best terraforming candidate Race populations in the given system with current colony cost above 0 and worst-case cost below 3.01, after recalculation with orbital extremes Lowest worst-case cost

The first two search race-wide and use the fleet’s own system only to measure distance. That distance is measured inside that one system, even when the candidate lies elsewhere. The standing orders LD: AM from Population (DIM_StandingOrders OrderID 21) and UL: AM at AM Colony (22) therefore pick a remote population before their automatic route fallback, which leaves that fallback unreachable. The MV: Terraform Colony standing order (28) uses the third search, limited to the fleet’s system. The standing order catalogue lists these orders.

The terraforming work score is a planning score that the population value refresh stores. The Developing tier, adjacent colonisation, valueless colony removal and terraformer routing read it. Gas selection is a separate decision made on each terraforming tick. The addition and removal of gas belongs to terraforming mechanics.

The estimate is 0 when the body’s gravity is below the species minimum or below 0.1. Otherwise it builds a work total W in these steps.

  1. Oxygen below the species minimum adds the deficit to W, with reference pressure R equal to the minimum and pressure change d equal to the deficit. Oxygen above the species maximum adds the excess, with R equal to the maximum and d equal to minus the excess. With oxygen in range, R and d stay 0.
  2. The projected pressure P is AtmosPress + d. The greenhouse factor G is 1 + P / 10 + atm of greenhouse gases that are not frozen out, capped at 3. The anti-greenhouse factor A is 1 + DustLevel / 20,000 + atm of anti-greenhouse gases that are not frozen out, capped at 3.
  3. The projected temperature is BaseTemp x G x Albedo / A. Below the species minimum temperature, the step adds (minimum temperature / (BaseTemp x Albedo)) - G to both W and P. Above the species maximum temperature, it adds (projected temperature / maximum temperature) - 1 to both.
  4. When R / P is above 0.3, it adds R x 3.334 - P.
  5. It adds the atm of every dangerous gas other than the gas the species breathes.
  6. A HydroExt below 20 adds (20 - HydroExt) / 40.
  7. The score is W x 4 x 3.1416 x Radius² / 511,187,128. The game uses 3.1416 for pi and 511,187,128 as the Earth surface area, so the factor scales W by the body’s surface area against Earth’s.

Step 4 cannot fire for an in-range oxygen level, because R is then 0. The terms mix atm with temperature ratios, so the score is a ranking value, not an estimate of terraforming time. If the estimate fails, the game shows Function #122 and the estimate ends with a score of 0.

The terraforming step of each population with NPR AI runs the gas selection first. The first matching row sets the terraforming gas (FCT_Population.TerraformingGasID) and the add-gas setting (FCT_Population.TerraformStatus). A setting of 1, the Add Gas to Atmosphere box ticked, adds the gas. A setting of 0 removes it.

Test in order Terraforming gas Add-gas setting
A dangerous gas other than the breathed gas is present The dangerous gas with the lowest atm Remove (0)
Oxygen below the species minimum Oxygen Add (1)
Oxygen above the species maximum Oxygen Remove (0)
SurfaceTemp below the species minimum temperature Aestusium Add (1)
SurfaceTemp above the species maximum temperature The greenhouse gas with the lowest atm, else Aestusium Remove (0)
Oxygen / AtmosPress above 0.3 Nitrogen Add (1)
HydroExt below 20 Water Vapour Add (1)
None of the above Unchanged Unchanged

A hot body without a greenhouse gas selects Aestusium removal, and the removal clears the terraforming gas when that gas is absent. The selection also totals the greenhouse and anti-greenhouse gases, and no later step uses that total. It never writes the maximum atmosphere target (FCT_Population.MaxAtm), and an addition stops at its target only when that target is above 0. An add selection therefore runs until a later selection picks another row.

The monthly strategic update of a standard NPR assigns terraformer fleets. Targets are the race’s populations with a terraforming work score above 0 outside systems of value None, in ascending score order. Fleets are the race’s fleets whose operational group main function is Terraformer.

Each fleet reads its standing order distance limit and walks the targets. The limit is FCT_Fleet.MaxStandingOrderDistance when that is above 0, and 10,000,000,000 km otherwise. A fleet already at the coordinates of the target under consideration keeps its orders and stops walking. A target in the fleet’s system at a travel distance through Lagrange points below the limit makes the fleet clear its move orders and take a Move to Location order to the population. Otherwise the fleet tries an automatic route to the target’s system when the target lies within the limit of that system’s origin. A queued route ends the fleet’s search, and a failed one moves on to the next target. No target is reserved, so every terraformer fleet heads for the lowest-score target it can reach. The route queues no move order to the population itself.

Installation requests and construction queues

Section titled “Installation requests and construction queues”

Installation requests connect the monthly race planner to population construction and civilian delivery. The race planner writes requests, freighters move installations between export and import requests, and the trans-Newtonian queue builds against the essential net demand. Freighter job selection belongs to the civilian economy.

An installation request names a population, a planetary installation type, a decimal amount, an export flag and a nonessential flag. A population’s requests are kept by installation type, so a population holds at most one request per type, import or export. Setting a request removes any existing request for that installation and adds the new one. A request is essential unless it is described as nonessential.

Freighters look for sources only among populations that have at least one export request. The destination search ignores the nonessential flag.

The monthly strategic update of a standard NPR runs the request steps in a fixed order. Mining comes first, then orbital miner assignment, Deep Space Tracking Stations, refuelling stations, a workforce recalculation for every population, construction factories, research labs and ground force construction complexes. The mining step therefore reads worker figures from the previous recalculation.

Every step except mining skips a population in a system of value None before removing that population’s request. A request written there in an earlier month survives until the system’s value is no longer None. Each step otherwise removes the population’s request of its own type and writes a new one.

Step Import request Export request
Mining A non-capital population with mineral value at least 6 gets 10 automated mines. When it also has total population above 0, maximum colony cost below 3 and spare workers, it gets min(10, spare/0.05) mines, truncated, when that is at least 1 A population without the matching import flag whose mineral value is below 4, or that is the capital, exports its whole count of that mine type
Deep Space Tracking Stations Desired count minus current count Current count minus desired count
Refuelling stations 1 when the population’s system has no refuelling capacity and no system within 2 jumps has any Count minus 1, for a population in a system with refuelling capacity whose own capacity is above 1 and that has more than 1 station
Construction factories A non-capital population with total population above 0, maximum colony cost below 3, mineral value at least 6, fewer factories than mines plus automated mines, and spare workers gets min(10, spare / 0.05), truncated, when that is at least 1 Any other population with factories exports min(count, 10), the capital included
Research labs Described under Force production and research Same
Ground force construction complexes A worker balance that is not negative, a body Vendarite deposit above 1,000 and a nonzero complex amount give 1 minus the fractional part of the amount, plus 1 when the balance is above 3, nonessential A negative balance or a Vendarite deposit below 1,000 exports 1 when the amount is at least 1, plus the fractional part, essential

Spare workers are the current manufacturing population minus the workers the population’s installations and shipyards require. The current manufacturing population is the total population less the current agriculture and environmental and service industry workforce, as described in workforce and taxes. The mining and factory steps divide the spare workers by 0.05, the workers per mine or construction factory. The worker balance of the lab and complex steps first recounts the required workers as shipyard workers plus each installation’s amount times its DIM_PlanetaryInstallation.Workers value. It then returns the required manufacturing population, the total population less the required agriculture and environmental and service industry workforce, minus that count. The Vendarite test reads the body’s deposit, not a stockpile. A Vendarite deposit of exactly 1,000 writes no complex request when the worker balance is not negative. A negative balance can still request an export.

The mining fallbacks run when no population qualified in the main pass. Without an automated mine target, the highest-value non-capital population with mineral value at least 4 gets 10 automated mines and no import flag. Without a mine target, the highest-value non-capital population with mineral value at least 4, total population above 0 and maximum colony cost below 3 gets 10 mines when its required workers exceed its current manufacturing population by at least 0.05. That sign is the reverse of the main pass’s spare-worker test. The fallback also computes a capped comparison and discards it.

The desired Deep Space Tracking Station count is 6 for the Capital tier, 4 for Core, 3 for Industrial, 2 for Developing and 1 for Colony. The last two also need a non-tracking installation target size above 100. That size is the sum of amount times TargetSize over installations whose TargetSize is above 2, truncated to a whole number, less the Deep Space Tracking Stations’ share. Other populations want 0, so a Deep Space Tracking Station at an Outpost is an export.

The refuelling step first sorts populations by value tier, highest first, and sets each population’s refuelling capacity to the floor of its refuelling production capacity. The 2-jump test looks at the systems within 2 jumps of the population’s system, and every population of a system without capacity writes its own request.

The trans-Newtonian queue runs inside the planner’s wealth and efficiency gate, which needs race wealth of at least 2,500 and population efficiency of at least 1. It runs only when the population has no project other than ordnance and fighters, and only when the conventional industry conversion queued nothing. C is the whole construction factories plus the whole conventional industry. At C=0 the queue does nothing. The first step that queues something ends the queue. Step 2 is the exception. It ends the queue whenever the top net demand is above 0, even when nothing was queued.

Step Test Queues
1 A body Duranium or Gallicite deposit above 10,000 with accessibility above 0.4, (mines + automated mines) x accessibility below 1.2C for either mineral, and a 50% random roll succeeds 10 mines
2 Race-wide essential import requests exist, and the type with the largest net demand x CargoPoints has net demand above 0 The net demand truncated when cost x net demand is below 2,400, 1 when the cost is at least 2,400, else floor(2,400/cost)
3 Deep Space Tracking Stations below ceil(total population^0.333) The gap, at most 3
4 C below 100 10 construction factories
5 The design philosophy allows ordnance factories and ordnance factories are below C/3 10 ordnance factories
6 The design philosophy allows fighter factories and fighter factories are below C/3 10 fighter factories
7 Research labs below C/20 1
8 Ground force construction complexes below C/125 1
9 C above 200, no refuelling station or spaceport, and a fuel stockpile above 1,000,000 1 refuelling station
10 C above 200, no ordnance transfer station or spaceport, and more than 10 ordnance factories 1 construction factory
11 Automated mines below C/10 5 automated mines
12 C above 300 and a shipyard type is needed 1 naval or commercial shipyard
13 Worst-case colony cost above 0 and terraforming installations below C/50 1
14 Military academies below C/200 1
15 Always tried 10 construction factories
16 Step 15 queued nothing and financial centres are below C/5 10 financial centres

The net demand of a type is the sum of the race’s essential import amounts for it minus the sum of its essential export amounts. The cost in step 2 is the installation Cost in DIM_PlanetaryInstallation.

A missing deposit counts as accessibility 0, so its comparison in step 1 holds whenever C > 0. Step 1 then depends only on the random roll on any body with one qualifying Duranium or Gallicite deposit. Step 2 reads the requests of every race population and does not subtract projects already queued, so each eligible population can queue against the same demand in one cycle. The project sits at the builder, not at the requester. Step 10 queues a construction factory although its test counts ordnance transfer stations. The ratio steps compare the whole count with C divided by the divisor, keeping the fraction. Step 3 queues min(target - count, maximum).

A naval shipyard is needed when the race’s naval yards plus queued naval shipyard projects number fewer than its active noncommercial classes. Otherwise a commercial shipyard is needed when the commercial count plus queued commercial shipyard projects is below the race’s active commercial classes without a shipping line. Otherwise no shipyard type is needed. A class is active when its FCT_ShipClass.Obsolete is 0. The commercial count counts naval yards, not commercial ones.

The conventional planner serves races of the conventional starting level. The trans-Newtonian planner serves the standard and minor starting levels, and other starting levels run neither. The conventional planner does nothing without a capital. It sets the fuel production status and refreshes the population value. With wealth at least 1,000 and efficiency at least 1, it runs the conventional queue when no project other than ordnance and fighters exists, then queues one training task when the population has a ground force construction complex and no training. It plans no ordnance, fighters or shipyards.

The conventional queue uses C as the whole conventional industry and does nothing at C=0. The first success ends it.

  1. Deep Space Tracking Stations below ceil(total population^0.333) queue the gap, up to 3.
  2. Ground force construction complexes below C/125 queue 1.
  3. A worst-case colony cost above 0 and terraforming installations below C/50 queue 1.
  4. Infrastructure below 100 and below C queues 50.
  5. Military academies below C/200 queue 1.
  6. Otherwise the queue adds 10 conventional industry.

The trans-Newtonian planner tries conventional industry conversion before its installation queue. The conversion queues nothing without whole conventional industry, without the Trans-Newtonian Technology baseline, or without construction production capacity. Otherwise the first success ends it. Here CF counts construction factories only. The conversion projects are rows of DIM_PlanetaryInstallation, as listed under construction list and conversions.

Test Queues
Fuel refineries below CF/5 5 Convert CI to Fuel Refinery (ID 30)
The design philosophy allows ordnance factories and ordnance factories are below CF/5 5 Convert CI to Ordnance Factory (ID 36)
Mines below CF 10 Convert CI to Mine (ID 28)
Always tried 10 Convert CI to Construction Factory (ID 27)

A population with conventional industry but no construction factories fails the first three tests, because a count is never below 0, and converts to construction factories.

Installation, ordnance and fighter projects all queue the same way. The game takes the number of units the capital’s stockpile can pay for in full, which is the smallest stock-to-cost ratio over the unit’s minerals, at most 1,000,000 and rounded down. Below 1, nothing is queued. Otherwise the request is clamped to that figure and queued as an industrial project at the planning population at 100% of capacity. Fuel per unit is 0 for installations, the missile’s fuel requirement for missiles and the class FuelCapacity for fighters.

A request of 0 with affordable minerals still creates a project of amount zero and counts as 0 queued, because nothing checks that the amount is above 0. Every queue step except step 2 of the trans-Newtonian queue reads 0 as failure and tries the next option. Queue mechanics after creation belong to production.

Design philosophy reconciliation at creation

Section titled “Design philosophy reconciliation at creation”

Race creation reconciles the homeworld’s installations with the design philosophy once, for races of the standard and minor starting levels with automatic technology points, right after the design philosophy is initialised. The first matching row runs.

Philosophy and installations Conversion
No fighter factories, ordnance factories allowed, fighter factories present Fighter factories become ordnance factories
No ordnance factories, fighter factories allowed, ordnance factories present Ordnance factories become fighter factories
No fighter factories, fighter factories present Fighter factories become construction factories
No ordnance factories, ordnance factories present Ordnance factories become construction factories

A race that allows neither type and holds fighter factories converts only those, because the reconciliation stops at the first match. Its ordnance factories remain. Philosophy initialisation belongs to NPR race generation.

The trans-Newtonian planner queues ordnance and fighters before the wealth gate and shipyard work after it. Ordnance planning runs only when the design philosophy allows ordnance factories, and fighter planning only when it allows fighter factories. After the gate, build class assignment runs first, then shipyard expansion, then repair and build tasks. Hull demand and build-class rows are summarised under Force production and research. Damaged-fleet routing to yards belongs to NPR readiness and recovery.

The ordnance step does nothing when the population has no whole ordnance factory or already has an ordnance project. Each missile type in the ordnance loadout of a race ship’s class gets a required amount, the sum of those class loadout amounts over race ships. Its available amount is the missiles carried aboard race ships plus every race population’s stockpile. The ratio is available divided by required.

In ascending ratio order, the step tries floor(ordnance production capacity / missile cost / 4) of each type and stops at the first type that queues a positive amount. Demand is race-wide while the amount uses this population’s capacity.

The fighter step has the same shape. It does nothing without a whole fighter factory or with a fighter project already queued. Required is the sum of the fighter numbers in the small craft loadouts of race ships’ classes. Existing is the count of all ships of that fighter class. The amount is floor(fighter production capacity / fighter cost / 4).

Build class assignment takes the population’s shipyards with no upgrade activity and does nothing when there are none. It clears their assignment flag, then flags yards without a build class and yards whose class has a zero shortfall given that yard’s own task count.

Needed classes are the race’s non-obsolete classes without a shipping line, not already the build class of any race yard, with a positive shortfall at a queued count of 0. Each flagged naval yard takes the largest needed noncommercial class whose Size times 50 tons per hull space is at most the yard Capacity, and that class leaves the list. Commercial yards do the same with commercial classes. A flagged yard with no fitting class keeps its old build class.

The build shortfall of a class counts the race’s ships of the same automated design. The Geosurvey, Gravsurvey, Scout, Diplomatic Ship, Construction Ship, Salvager and Tanker designs (AutomatedClassID 7, 8, 29, 64, 101, 103 and 45) return the design philosophy’s MaxGeo, MaxGrav, MaxScout, MaxDiplomatic, MaxStabilisation, MaxSalvage or MaxTanker minus the sum of existing and queued ships, floored at 0. Every other design returns 3 minus that design’s ship count in Reinforcement Group fleets, floored at 0, and ignores the queued count. A class without an automated design makes the shortfall count fail. The game shows Function #125 and the shortfall is 0, so manual classes never count as needed.

The repair and build step lists damaged race ships, with armour damage or damaged components, that no race shipyard task holds and whose fleet has no move orders. It walks the population’s yards that have a build class and free slipways, which are Slipways minus the yard’s assigned tasks.

Repair selection keeps candidates in the population’s system at exactly its coordinates. The class Size must be at most the yard Capacity. Commercial classes need a commercial yard and other classes a naval yard. The largest Size wins. A chosen ship gets a repair task with its repair minerals and repair cost, and the step moves to the next yard. The repair test compares Size with Capacity directly, while build class assignment first multiplies Size by 50 tons per hull space.

Without a repair, the yard’s build count is the minimum of the capital’s buildable quantity for the class minerals, the free slipways and the class shortfall, with this yard’s task count as the queued figure. A nonzero count creates that many construction tasks for the build class and stops the yard walk, so one yard per tick receives construction. A yard whose class the capital cannot afford is skipped. Task creation paths covers the tasks themselves.

Shipyard expansion requires at least 1,000 Duranium and 1,000 Neutronium at the capital. It starts at most one activity per planning pass.

Yard chosen Activity
The largest yard with no build class and no upgrade activity, naval with capacity below 5,000 Add 500 ton Capacity
The same yard, naval with capacity of 5,000 or more Add 1000 ton Capacity
The same yard, commercial Add 5000 ton Capacity
Otherwise the yard with a build class and no upgrade activity, fewest slipways then largest capacity Add Slipway on a 50% random roll, else Add 1000 ton Capacity for a naval yard or Add 10,000 ton Capacity for a commercial one

Build class assignment runs just before, so an unassigned yard at this point is one that no needed class fits. Activity cost and progress belong to production. The needed shipyard type decides new yards, as in the installation queue.

Both planners first set the fuel production status against the capital. A population’s FuelProdStatus becomes true when its refinery production capacity is above 0 and the capital holds more than 5,000 Sorium, and false otherwise. Refinery output belongs to production.

Ground template design and starting formations belong to NPR race generation. Loading and unloading belong to movement and logistics and ground force organisation. Training progress belongs to production.

Both planners queue automated ground unit training with a limit of 1 task and the capital as mineral source when the population has a whole ground force construction complex and no training task. Each does this inside its own wealth and efficiency gate, 2,500 wealth for the trans-Newtonian planner and 1,000 for the conventional one.

  1. For every race population, the design philosophy’s ground force deployment rows (DIM_DesignPhilosophyGroundForceDeployments) whose PopulationValue equals that population’s value tier are summed by AutomatedTemplateID. The Priority of the first row is kept.
  2. The current and queued count of a template is the race’s formations of the template plus the race’s training tasks for it.
  3. In ascending Priority, each template with a positive shortfall trains formations until the shortfall is met. A formation stops that template when the capital does not hold at least the template’s minerals. Each task is named with the ordinal of FormationsTrained + 1 and the template name, runs at 100% in Front Line Defence, and raises FormationsTrained by 1. The step ends when the limit reaches 0.
  4. With limit left, templates whose current count is below twice the requirement train one formation each, in descending shortfall order. This pass has no mineral test.

With the limit of 1, a race whose shortfall templates are all unaffordable still starts one task in step 4.

When a ground combat round is due, because the time since the last one exceeds FCT_Game.MinGroundCombatPeriod, and FCT_Game.CurrentGroundCombat is set, the game updates posture and organisation for every NPR population on each body where an NPR is in ground combat. The rounds themselves follow cadence and round execution.

  1. Local formations are those at the population. The update does nothing when there are none.
  2. Hostile formations are those at other populations on the body whose race is a known alien race with Hostile contact status.
  3. Each local formation loses its parent formation, its assigned formation and its mark for absorption into another formation. A formation whose template has an automated design takes the design’s FieldPosition. A design with primary function Planetary Defence and no STO component becomes Front Line Defence. A design with primary function Headquarters and zero element HQ capacity is marked to absorb. A formation without an automated design becomes Front Line Defence.
  4. The posture test runs only when every hostile formation is off the front line, in neither Front Line Defence nor Front Line Attack.
  5. When local frontline defence LD is above 0, the local ratio is LF/HD and the hostile ratio HF/LD. A hostile ratio of 0 switches. A local ratio above the hostile ratio switches when it is at least twice as large, or when LC/LD is below 3. A switch moves every local Front Line Defence formation to Front Line Attack.
  6. When no local formation is on the front line, all become Front Line Defence.
  7. Each marked HQ is absorbed by another Headquarters formation at the population, else by the first Infantry formation, else by the first Armour formation. Infantry sorts first because its PrimaryFunction in DIM_AutomatedGroundTemplateDesign is 0 and Armour’s is 1.
  8. Other races attach Infantry Regiment, Garrison and Planetary Defence Regiment formations to Infantry Brigade HQ formations, and Armour Regiment formations to Armour Brigade HQ formations.
Term Elements summed Per element
LF, local frontline firepower Elements of local formations in either front line position, each weapon component with Shots not 0 Units x Shots x modified penetration x modified damage x terrain ToHitModifier, with penetration and damage modified by the class WeaponStrengthModifier. The terrain ToHitModifier is described on its own page
LD, local frontline defence Elements of local formations in either front line position Units x armour x hit points / base type ToHitModifier
LC, local current defence All local elements Front Line Attack uses the LD term. Others use Units x armour x hit points x FortificationLevel x terrain FortificationModifier
HF, hostile firepower Hostile elements The LF term when the race’s record of the class has WeaponsKnown set, else Units x 100 x terrain ToHitModifier
HD, hostile defence Hostile elements Units x armour x hit points x FortificationLevel x terrain FortificationModifier, with armour 10 unless the race’s FCT_AlienGroundUnitClass record shows at least 20 armour penetrations (Penetrated), and hit points 10 unless it shows at least 20 units destroyed (Destroyed)

Terrain values come from the dominant terrain of the population’s body (FCT_SystemBody.DominantTerrain, with modifiers in DIM_PlanetaryTerrain). Once a threshold is met, the class’s real armour or hit points replace the default 10. Ground-class observations describes how those counts grow.

With no hostile formation the update decides to switch, but formations change posture only inside the ratio test, which does not run. No formation changes posture. Absorption looks up each formation’s automated design and does not allow for a formation that has none. When a marked HQ exists, a local formation without an automated design makes the update fail when the Headquarters lookup reaches it before a match, or in the Infantry and Armour fallback, which looks at every local formation. The game then shows Function #115, and the update ends before the HQ links.

Each HQ link pass gives each HQ formation of the HQ template at the population a capacity of its maximum element HQ capacity minus its own size and its children’s sizes, each truncated to a whole number. Unparented subordinate formations attach in the game’s formation order while the capacity is strictly greater than their size. The first attached one becomes the HQ’s assigned formation, and the first that does not fit stops that HQ. HQ capacity and command bonuses explains the capacity figure.

The troop transport pass clears the deployment balances, refreshes each population’s list of formations present and clears every staging flag. It collects unload orders, load orders, embarked race formations, formations targeted by load orders, the automated templates of the race’s formations and the transports with nothing embarked. Staging populations and their defence estimate follow Expansion and economic targets.

Requirements depend on the population.

Population Required templates
Other race, not staging Every automated template among the race’s formations, with the design philosophy rows for the population’s value tier
Staging, estimate E Infantry Regiment need ceil(2E/template size). Armour Regiment needs ceil(E/size). Infantry Brigade HQ needs floor(infantry count x infantry size / infantry HQ capacity)

The Armour Brigade HQ count reuses the infantry count, infantry size and infantry HQ capacity, and checks only that the armour HQ capacity is above 0. When the infantry HQ capacity is 0, as for a race without an Infantry Brigade HQ template, that division by zero makes the game show Function #24, and the transport pass ends there. A required count of 0 is dropped, and every row this adds, for staging , carries Priority 0.

For each required template, the local count is the population’s formations of it minus those targeted by load orders. The inbound count adds embarked formations of it on fleets with an unload order at the population. It also adds the number of load orders on fleets whose last move order names the population, because that count tallies orders rather than matching formations.

Override Required count
Survey Expedition, ground mineral survey not Completed 1
Xenoarchaeology Expedition, abandoned factories and a ruin race the race does not know 1
Construction Regiment, abandoned factories and a known ruin race 1 below 25 factories, else floor(factories/25)

With a requirement, the shortfall is the required count minus the assigned count, which is the sum of the local and inbound counts. The surplus is the local count minus the required count. Each is floored at 0. Without a requirement, the surplus is the local count. Only balances with a surplus or a shortfall are kept. An override applies only to a template in the population’s list, which outside staging means one with at least one race formation.

Shortfall populations sort staging points first, then by value tier, highest first, then by PopulationID. The list has one entry per shortfall balance, not per population, so a population with several shortfalls is visited several times. The pass ends when there is no shortfall, or when there is no surplus population and no idle embarked formation.

Each visit takes the population’s shortfall balances in ascending Priority.

  1. Loaded transports are fleets with no move orders that carry formations of the template, in order of jump distance to the target. A fleet in the target system gets drop and refuel orders, and the shortfall drops by its matching formations.
  2. A gate with zero cooldown transits the fleet, and drop, refuel and the shortfall reduction follow.
  3. Another loaded fleet queues an automatic route to the target system without clearing its orders. Success adds drop and refuel orders but does not reduce the shortfall.
  4. With shortfall left, surplus balances of the same template sort by jump distance from their system to the target. The transfer is min(surplus, shortfall). Each empty transport outside the source system routes there . A transport inside the source system, or one whose route there was queued, gets a pickup.
  5. A transport whose redeploy flag (FCT_Fleet.RedeployOrderGiven) is now set routes onward to the target system when that differs, clearing all its orders on failure, and queues drop and refuel. The first such transport ends the transport search for that source and stops the walk over further sources.

Pickups do not reduce the target’s shortfall or the source’s surplus. A repeated visit to the same population can send another transport, and the pickup’s pending-load count then excludes formations already ordered.

A pickup reads the transport’s troop capacity and recounts pending loads race-wide. It sorts the source’s formations of the template, less those with pending loads, by total size, largest first, and fails when none remain. Each formation whose total size fits the remaining capacity gets a Load Ground Unit order and sets the redeploy flag. The walk stops when the transfer count reaches 0, and each loaded size comes off the capacity. A Refuel from Colony order at the source follows even when nothing fit, and the pickup succeeds when the redeploy flag is set.

A drop queues Orbital Drop All Ground Units and Refuel from Colony at the target population. It reads the troop capacity and does nothing with it.

The rows use invented inputs and follow the rules above.

Inputs Outcome
Trans-Newtonian queue, C=150, total population 64, one Deep Space Tracking Station, no essential demand, and the step 1 random roll fails 64^0.333 is about 3.994, so the target is 4. Step 3 queues min(4-1, 3)=3 Deep Space Tracking Stations and ends the queue.
Essential net demand 50 of an installation costing 120 120 x 50=6,000 is not below 2,400 and the cost is below 2,400, so floor(2,400/120)=20 are queued, clamped by the capital’s buildable quantity.
Mining step, mineral value 7, total population 30, maximum colony cost 1, spare workers 0.37 10 automated mines, and min(10, 0.37/0.05=7.4) truncated to 7 mines.
Conversion at 500 conventional industry and 0 construction factories, construction capacity above 0 Refinery 0<0, ordnance 0<0 and mines 0<0 all fail, so 10 Convert CI to Construction Factory are tried.
Ordnance capacity 400, missile cost 2, the capital affords 30 floor(400/2/4)=50 is clamped to 30.
Staging estimate E=2,000, Infantry Regiment size 1,000, Armour Regiment size 2,500, Infantry Brigade HQ capacity 50,000 Infantry ceil(4,000/1,000)=4, armour ceil(2,000/2,500)=1, infantry HQ floor(4 x 1,000/50,000)=0, which is dropped as a zero requirement.
Earth-radius body, oxygen 0 against a minimum of 0.1, AtmosPress 0.9, projected temperature in range, HydroExt 10 W=0.1+(20-10)/40=0.35, and R/P=0.1/1.0 fails the 0.3 test. The area ratio is about 1, so the score is about 0.35, outside the Developing window.
Posture with LF 600, HD 200, HF 100, LD 100, all hostiles off the front line A local ratio of 3 against a hostile ratio of 1 is at least twice, so Front Line Defence formations switch to Front Line Attack.
Posture with no hostile formation on the body The update decides to switch, but no formation changes posture. HQ absorption and HQ links still run.
State What the game stores
Installation requests FCT_PopInstallationDemand rows with PopulationID, InstallationID, Amount, Export and NonEssential. A row whose installation type or population is missing is skipped when the game loads
Population value tier and staging flag FCT_Population.AIValue, saved as 0 for a population without NPR AI and restored only for NPR races, and FCT_Population.InvasionStagingPoint
Terraforming, colonist and fuel status FCT_Population TerraformStatus, TerraformingGasID, ColonistDestination and FuelProdStatus
Shipyard build class FCT_Shipyard.BuildClassID. The build class assignment flag is not saved, and each assignment pass rewrites it
Training names, posture and HQ links FCT_GroundUnitFormationTemplate.FormationsTrained, and FCT_GroundUnitFormation FieldPosition, ParentFormationID and AssignedFormationID
Population planner stored scores The mineral value, terraforming work score, installation scores, desired Deep Space Tracking Station count, mine import flags, refuelling capacity and list of formations present are not saved. After a load they hold their defaults until the population value refresh, the monthly request steps or the transport pass rewrite them
Deployment balances and defence estimates Not saved. Each transport pass rebuilds the deployment balances and the staging defence estimates

After a load, the planner clocks start at 0 and the game restores only the value tier of each population’s planner, so the other stored scores start at their defaults. A strategic pass run from the time increment, rather than the forced pass of the construction cycle, can then reach the monthly request steps before the first production tick when it passes the threat gate. The threat gate needs a hostile ship contact updated within the last five days and more than 10,000 seconds since the last threat response. Such a pass would read zero mineral values and terraforming scores. The valueless colony removal is the first step that reads those zero values.

Related community documentation and developer posts. These may describe a different game version.