Catalogues and loaders
Section titled “Catalogues and loaders”Three catalogues in the game database drive automatic fleet behaviour. DIM_StandingOrders holds the standing order rules. Fleets run them when idle, and conditional orders run them as their action. DIM_Condition holds the conditions that conditional orders test. DIM_MoveAction defines every action a move order can carry and which destination types offer it. The move action catalogue covers its rows and what each action does. Every standing order and condition row appears by name in a table below.
Neighbouring topics have their own pages, and this page only summarises them. Execution timing, partial timers, order repeats and cargo formulas are in movement and logistics. Saved move order templates are in movement order templates. What a cancelled or replaced order leaves behind is in logistics interruption and reservations. NPR patrol and avoidance waypoints are in NPR tactical behaviour and its patrol section. Jump point stabilisation targets are in jump gate construction. Route building between systems is in inter-system auto-routing.
When a game is loaded, the game reads the three catalogues in a fixed order. Move actions come first, then standing orders, then conditions. All three load before the NPR operational groups. Each group names a primary and a secondary standing order by ID, so the standing order catalogue must exist before the groups can resolve them.
Every DIM_MoveAction row becomes one move action. The move action catalogue names all 120 rows. It also covers their flags, the Naval Organization window availability filter, the arrival steps that carry out each action, and the columns the game reads.
For each standing order the game reads OrderID, OrderGroupID, DisplayOrder, NPROnly, Standing, Conditional, Description and the SystemCheck string. For each condition it reads ConditionID, DisplayOrder and Description. Each catalogue is keyed by its ID. A duplicate ID would raise an error and stop the loading of that catalogue at that row.
Each standing order and each condition also has a second label that is not stored in the database. For many rows it differs from the catalogue text. List views show the catalogue text. The second label appears in a few displays, most visibly in the conditional part of the fleet’s order summary. For example condition 1 shows as “Fuel: 100%” in the conditional order list but as “Fuel Tanks Full” in the summary label. The tables below give both labels, the second one in the “Summary text” column.
Standing order catalogue
Section titled “Standing order catalogue”The table names all 47 DIM_StandingOrders rows. A rule does the same thing whether it runs as a standing order or as the action of a conditional order. Only the handling of the existing move queue differs, as conditional order evaluation describes. OrderGroupID values are 0 Other, 1 Survey, 2 Logistics, 3 MoveTo, 4 Load and Unload, and 5 Instant Actions. These are the labels the Naval Organization window tree shows, apart from Other, which the tree skips.
Most rules first look for a target inside the fleet’s current system. Many then fall back to a search of other systems through the auto-route network, written “searches other systems” below. Move action names in the last column are the DIM_MoveAction descriptions. The distance limit applies only to the geological body searches.
| OrderID | Description | Summary text | DisplayOrder | NPROnly | SystemCheck | Standing | Conditional | OrderGroupID | What the order does |
|---|---|---|---|---|---|---|---|---|---|
| 0 | None | No Order | 0 | 0 | S | 0 | 0 | 0 Other | No action. Operational group rules never include this row, and the Naval Organization window tree skips the Other group that holds it. |
| 1 | SV: Asteroid | Survey Nearest Asteroid | 200 | 0 | S | 1 | 0 | 1 Survey | Picks the nearest eligible body of body class Asteroid inside the distance limit, then queues a Geological Survey order to it. |
| 2 | SV: Moon | Survey Nearest Moon | 210 | 0 | S | 1 | 0 | 1 Survey | As OrderID 1 with body class Moon. |
| 3 | SV: Planet | Survey Nearest Planet | 220 | 0 | S | 1 | 0 | 1 Survey | As OrderID 1 with body class Planet. |
| 4 | SV: Body | Survey Nearest Body | 10 | 0 | S | 1 | 0 | 1 Survey | As OrderID 1 with no body-class filter. Finding nothing sets GeoSurveyDefaultDone on the race’s survey record for the system. |
| 5 | SV: Survey Location | Survey Nearest Survey Location | 25 | 0 | S | 1 | 0 | 1 Survey | Picks the nearest gravitational survey location still available to the race, then queues a Gravitational Survey order to it. No distance limit applies. |
| 6 | MV: Geosurvey System | Move to System Requiring Geosurvey | 20 | 0 | A | 1 | 0 | 3 MoveTo | Searches other systems for the nearest system that needs a geological survey and queues the jump route there. Logs a no-destination event for a player fleet. |
| 7 | MV: Entry Jump Point | Move to Entry Jump Point | 40 | 0 | S | 1 | 1 | 3 MoveTo | Queues Move to Location to the fleet’s entry jump point unless the fleet already sits on it. An unknown entry point only logs the event “has a standing order to return to its entry jump point. However, the entry jump point is not known”, after the fleet name. |
| 9 | SV: Planet or Moon | Survey Nearest Planet or Moon | 230 | 0 | S | 1 | 0 | 1 Survey | As OrderID 1 with body class Moon or Planet. |
| 10 | MV: Gravsurvey System | Move to System Requiring Gravsurvey | 35 | 0 | A | 1 | 0 | 3 MoveTo | As OrderID 6 for a system that needs a gravitational survey. |
| 13 | SV: Five System Bodies | Survey Next Five System Bodies | 15 | 0 | S | 1 | 0 | 1 Survey | Up to 5 searches for an eligible body, each starting from the previous body found. Each hit queues a Geological Survey order. Marks an NPR fleet as redeployed (RedeployOrderGiven). |
| 14 | SV: Three Locations | Survey Next Three System Locations | 30 | 0 | S | 1 | 0 | 1 Survey | Up to 3 chained searches for an available gravitational survey location, each hit queuing a Gravitational Survey order. An NPR that finds nothing on the first attempt widens its MaxStandingOrderDistance. |
| 15 | LD: Colonists | Load Colonists from Colonist Source | 90 | 0 | A | 1 | 0 | 4 Load and Unload | Needs colonist capacity above 0. Picks the nearest colonist source population and queues Load Colonists, else searches other systems for a colonist source without logging an event. |
| 16 | LD: Colonists at Capital | Load Colonists at Capital | 100 | 0 | A | 1 | 0 | 4 Load and Unload | Needs colonist capacity above 0. Picks the race’s capital when it lies in the current system and queues Load Colonists, else searches other systems for the capital without logging an event. |
| 17 | UL: Colonists | Unload Colonists | 110 | 0 | A | 1 | 0 | 4 Load and Unload | Needs embarked colonists. Looks in the system, then in other systems, for a colony of the embarked species, on a body that is not a comet (and, for a shipping-line fleet, not military-restricted), that is marked as a destination for colonists, has room for them, and is not already the target of another Unload Colonists order of the race. A second pass drops the last test. A hit queues Unload Colonists. |
| 20 | MV: Stabilise JP | Stabilise Nearest Jump Point | 120 | 0 | A | 1 | 0 | 3 MoveTo | Needs jump point stabilisation capacity. Finds a jump point to stabilise in the system or by searching other systems, and ends in a Stabilise Jump Point order. |
| 21 | LD: AM from Population | Load Automated Mine from Population | 130 | 0 | A | 1 | 0 | 4 Load and Unload | Needs free cargo capacity of at least the cargo points of one automated mine. Picks a population that can supply an automated mine, then queues Load Installation for one automated mine. |
| 22 | UL: AM at AM Colony | Deliver automated mine to mining colony | 140 | 0 | A | 1 | 0 | 4 Load and Unload | Needs an automated mine in some ship’s installation cargo. Picks an unpopulated mining colony, then queues Unload Installation. |
| 23 | MV: Trade Location | Move to Nearest Trade Location | 150 | 1 | A | 1 | 0 | 3 MoveTo | No action. No rule carries out this order, so it produces nothing. |
| 24 | UL: Passengers | Unload Passengers | 160 | 0 | A | 1 | 0 | 4 Load and Unload | Skips the search inside the system. Only the search of other systems runs, for a populated colony of the embarked species, on a body that is not a comet (and, for a shipping-line fleet, not military-restricted), with room for the passengers, and a hit queues Unload Colonists. |
| 26 | MV: Sorium Gas Giant | Move to Gas Giant with Sorium | 180 | 0 | A | 1 | 0 | 3 MoveTo | Picks the best gas giant with sorium in the system, with no population minimum, queues Move to Location and clears the fleet’s standing orders. Else searches other systems for a sorium gas giant. |
| 27 | MV: Salvage Wreck | Salvage Nearest Wreck | 80 | 0 | A | 1 | 0 | 3 MoveTo | Picks the nearest wreck in the system that no Salvage order of the race already targets and queues Salvage. Else searches other systems for a wreck and queues Salvage at the wreck found. |
| 28 | MV: Terraform Colony | Terraform Colony | 190 | 1 | A | 1 | 0 | 3 MoveTo | Picks the race’s population in the current system with a current colony cost above 0 and a worst-case colony cost below 3.01, lowest worst-case cost first, then queues Move to Location. Else searches other systems for a colony to terraform. |
| 29 | LD: Passengers | Load Passengers | 95 | 0 | A | 1 | 0 | 4 Load and Unload | Needs colonist capacity above 0. Picks the nearest passenger source population and queues Load Colonists, else searches other systems for a passenger source without logging an event. |
| 30 | MV: Sorium GG 10m Pop | Move to Gas Giant with Sorium and 10m Pop | 185 | 1 | A | 1 | 0 | 3 MoveTo | As OrderID 26 with a 10m population minimum and banned bodies excluded. |
| 31 | MV: Assigned Mothership | Land on Mothership | 115 | 0 | S | 1 | 1 | 3 MoveTo | Needs exactly one distinct assigned mothership among the fleet’s ships, in the current system. Queues Land on Assigned Mothership / Squadron to that mothership’s fleet. |
| 32 | LG: Transfer Fuel To Colony | Transfer Fuel to Colony | 65 | 0 | S | 1 | 1 | 2 Logistics | Picks the nearest population eligible for a fuel transfer, then queues Transfer Fuel to Colony. The event text says “As per conditional orders”. No search of other systems. |
| 33 | LG: Refuel at Colony | Refuel at Colony | 45 | 0 | A | 1 | 1 | 2 Logistics | Picks the nearest population that can refuel the fleet and queues Refuel from Colony. Else searches other systems and queues Refuel from Colony at the population found. |
| 35 | IA: Activate Shields | Activate Shields | 240 | 0 | S | 0 | 1 | 5 Instant Actions | Turns the fleet’s shields on. No move order results, so a lower-priority rule still runs in the same standing pass. |
| 36 | IA: Deactivate Shields | Deactivate Shields | 250 | 0 | S | 0 | 1 | 5 Instant Actions | Turns the fleet’s shields off. No move order results. |
| 37 | IA: Clear Order List | Clear Order List | 290 | 0 | S | 0 | 1 | 5 Instant Actions | Clears the fleet’s move queue. The rule never reports that it kept changes. |
| 38 | IA: Maximum Speed | Change to Maximum Speed | 280 | 0 | S | 0 | 1 | 5 Instant Actions | Sets the fleet’s speed to its maximum. No move order results. |
| 39 | IA: Active Sensors On | Active Sensors On | 260 | 0 | S | 0 | 1 | 5 Instant Actions | Turns active sensors on. No move order results. No standing order turns sensors off. |
| 41 | LG: Overhaul at Colony | Overhaul at Colony | 270 | 0 | A | 1 | 1 | 2 Logistics | Picks the nearest population with fuel in stock and enough maintenance capacity for the fleet’s military hull tonnage, then queues Begin Overhaul (rewind clock). Else searches other systems. |
| 42 | LG: Transfer Fuel and Return | Unload Fuel at Colony and Return | 70 | 0 | S | 1 | 1 | 2 Logistics | As OrderID 32, then queues Move to Location back to a body at the exact start coordinates. When no body lies there, the return goes to a Temporary waypoint named after the fleet, followed by “Return Point”. |
| 43 | LG: Resupply at Colony | Resupply at Colony | 76 | 0 | A | 1 | 1 | 2 Logistics | Picks the nearest population that can resupply the fleet and queues Resupply from Colony, else searches other systems. |
| 46 | MV: Point of Interest | Investigate Closest Point of Interest | 82 | 0 | A | 1 | 0 | 3 MoveTo | Tries, in turn, the nearest urgent point of interest waypoint in the system, a search of other systems for one, the nearest point of interest waypoint in the system, and a search of other systems for one. The first hit queues Move to Location. |
| 47 | MV: Rendezvous Point | Move to Closest Rendezvous Point | 84 | 0 | A | 1 | 1 | 3 MoveTo | Nearest rendezvous waypoint in the system, else a search of other systems, then Move to Location. |
| 48 | MV: Operational Group | Join Operational Group | 116 | 1 | A | 1 | 0 | 3 MoveTo | Runs the rules for joining an operational group. An emptied fleet is not removed. |
| 49 | SV: Thirty System Bodies | Survey Next Thirty System Bodies | 16 | 0 | S | 1 | 0 | 1 Survey | As OrderID 13 with 30 searches. |
| 50 | MV: Rescue Lifepod | Pickup Nearest Lifepod | 165 | 0 | S | 1 | 0 | 3 MoveTo | Picks the nearest lifepod in the current system that no Rescue Survivors order of the race already targets, then queues Rescue Survivors. No search of other systems. |
| 51 | LG: Replenish Overhaul | LG: Replenish Overhaul | 271 | 0 | A | 1 | 1 | 2 Logistics | As the overhaul search of OrderID 41, but only populations with automatic refuelling turned on (AutoRefuel) qualify. Queues Refuel and Resupply from Colony, Load Ordnance from Colony and Begin Overhaul (rewind clock), else searches other systems. |
| 52 | SV: Three SB/Locations | Survey Next Three System Bodies or Locations | 31 | 0 | S | 1 | 0 | 1 Survey | Up to 3 chained attempts. Each picks a gravitational survey location or an eligible body for geological survey, the location only when it is strictly nearer. |
| 53 | LG: Replenish at Colony | LG: Replenish at Colony | 1 | 0 | A | 1 | 1 | 2 Logistics | Picks the nearest population that can both refuel and resupply the fleet, then queues Refuel and Resupply from Colony and Load Ordnance from Colony. Else searches other systems. |
| 54 | MV: Fleet Waypoint | MV: Fleet Waypoint | 1 | 0 | A | 1 | 1 | 3 MoveTo | Needs a waypoint whose FleetID is this fleet. Picks the nearest fleet waypoint with that ID in the system, else searches other systems, then queues Move to Location. |
| 55 | LG: Refuel from Tanker | LG: Refuel from Tanker | 46 | 0 | A | 1 | 1 | 2 Logistics | Picks the nearest available tanker fleet and queues Refuel from Stationary Tankers, else searches other systems. |
| 56 | LG: Replenish from Ship | LG: Replenish from Ship | 1 | 0 | A | 1 | 1 | 2 Logistics | Picks the nearest available replenishment fleet and queues Refuel from Stationary Tankers and Resupply from Stationary Supply Ship, else searches other systems. |
Several rules also log an Orders Assigned event (DIM_EventType 41) when they find a target. Among them are the entry jump point, stabilisation, mothership, refuel, resupply, overhaul, replenish and tanker rules. The text starts “As per standing orders”, then the fleet name and “is moving to”. The two fuel transfer rules write “As per conditional orders” instead. The jump point stabilisation search is described under standing order resolution on the jump point page.
The game reads each column as follows.
- Description is the label in the Naval Organization window tree, the fleet’s standing order list and the standing order summary.
- DisplayOrder sorts only two list views of available standing and conditional orders. No window in play uses either list. The Naval Organization window tree sorts each group by description instead.
- NPROnly hides a row from a player race in the Naval Organization window tree. An NPR race sees every row.
- SystemCheck only adds the suffix “ (S)” to the tree label. The rows show a pattern. Every S row runs without a search of other systems, and every A row except OrderID 23 falls back to a search of other systems. No rule reads the flag when it chooses what to do, so this is a pattern in the data rather than a rule.
- Standing and Conditional are read only by the two list views that no window in play uses. The tree that the Naval Organization window uses does not filter on them, and the Add Standing and Add Conditional buttons ignore them. An instant action can therefore be added as a standing order, and a survey order can be added as a conditional action.
- OrderGroupID groups the tree. The tree shows the groups in
OrderGroupIDorder, skips Other, and expands each group node. The Other group holds only the None row.
Assigning and ordering rules in the Naval Organization window
Section titled “Assigning and ordering rules in the Naval Organization window”When the Naval Organization window opens, it fills the condition list once. The list holds every condition above No Condition (ID 0), sorted by DisplayOrder. Each time the selected race changes, the window rebuilds the standing order tree and the template list. Selecting a fleet fills the fleet’s rule list. It also copies the fleet’s option flags into the check boxes Copy Standing on Detach, Copy Conditional on Detach, Include Squadrons, Ignore Standing Orders and Ignore Conditional Orders.
The Add Standing and Add Conditional buttons share one step. It needs a race, a selected fleet and a selected order in the tree. Otherwise it shows “Please select a race”, “Please select a fleet” or “Please select an order”. The new priority is the highest standing priority plus 1, or 1 when the fleet has no standing rule. A standing rule goes straight into the fleet’s standing list at that priority. A conditional rule also needs a selected condition, and otherwise the window shows “Please select a condition”. Its priority becomes the highest conditional priority plus 1, but only when the fleet already has a conditional rule. The first conditional rule of a fleet that has standing rules therefore takes the standing maximum plus 1 rather than 1. A checked Set FWP box sets the rule’s waypoint flag to 1, which is saved as CreateFWP. The buttons add entries directly, without the check that refuses the None row for operational groups, and they allow the same rule twice.
The fleet’s rule list sorts both lists by priority. It writes a header row, “Standing Orders” or “Conditional Orders”, for each list that is not empty, with a blank row before the conditional header. Each conditional row shows the priority, the action description, the condition description and “WP” when the waypoint flag is 1. Header rows hold no rule, so pressing Delete Order on a header row shows “Please select an order to delete”.
Delete Order reads the priority from the first column of the selected row, removes that priority, and renumbers with no reserved slot. Standing and conditional lists renumber the same way. The game takes the entries in priority order, clears the list, and assigns priorities from 1 upward, skipping the reserved priority when one is reserved. A delete therefore closes gaps and also normalises a conditional list that started above 1.
Move Up and Move Down do nothing when moving priority 1 up or the highest priority down. Otherwise the window removes the selected entry, renumbers the rest with the target priority reserved, and inserts the entry at the target. With contiguous priorities this swaps the entry with its neighbour. With a conditional list that starts above 1, the renumbering packs the other entries from 1. Moving the first entry up therefore places it below the second, and moving a later entry up can leave the order unchanged or move the entry down. For priorities 3, 4 and 5 holding X, Y and Z, moving X up gives Y, X, Z, moving Z up keeps X, Y, Z, and moving Y up gives X, Z, Y. The window then reselects the moved row by its position in the list.
Delete All clears both lists. Ignore Standing Orders sets IgnoreStanding and Ignore Conditional Orders sets IgnoreConditional, which the two passes test. Copy Standing on Detach, Copy Conditional on Detach and Include Squadrons set DetachedStanding, DetachedConditional and IncludeSquadrons. The first two select which rules a detached fleet copies, and IncludeSquadrons lets squadron detachments copy them at all. Copied standing rules point at the same catalogue rows. Each conditional rule is copied as a new rule with the same action, condition and waypoint flag.
The fleet’s order summary label joins a standing part and a conditional part. The standing part is “No Standing Orders” followed by four spaces for an empty list. Otherwise it is each catalogue description followed by four spaces. The conditional part is empty for an empty list. Otherwise it holds, per rule, “if “ plus the condition’s summary text, a comma and a space, and the action’s summary text, with four spaces after each entry. The fleet overview shows the same summary.
Standing order evaluation
Section titled “Standing order evaluation”Each time increment runs the standing pass after its sub-pulses, and only when the increment ran more than 60 seconds. The pass selects fleets with an empty move queue, at least one ship, at least one standing rule and Ignore Standing Orders off. It then drops fleets with ships under maintenance and fleets with ships in a shipyard.
Civilian fleets get a pre-step. A fleet of a shipping line whose current system is military-restricted gets a Standard Transit order. The target is the nearest jump point in its system that is not itself restricted and that leads to an adjacent explored system that is not restricted. The pre-step also clears the fleet’s conditional diversion state (described under conditional order evaluation) and turns Cycle Moves (CycleMoves) off. The main pass does not check the queue again for these fleets, so their first-priority rule still runs. A hit inside the system appends after the transit. A search of other systems that finds a route clears the queue first, transit included. The pass then stops for that fleet because the queue is no longer empty.
For each fleet the pass sorts the rules by priority and runs each in turn as a standing order. It stops at the first rule after which the fleet has move orders. Instant rules such as shields, sensors and speed change state without creating an order, so the next rule still runs in the same pass. An error while one fleet runs its rules shows the message for Function #3988 and ends the whole pass, so later fleets wait for the next increment. Joining a new operational group, described under operational-group and civilian standing orders, is one case.
When no rule produced an order, a player fleet without a shipping line logs an Orders Not Possible event (DIM_EventType 42). The text is the fleet name, “is unable to carry out its standing orders”, a colon and the standing summary. NPR fleets and shipping-line fleets log nothing. The pass ends by deleting NPR fleets that have no ships.
A rule either finds a target and keeps its new orders, or it does not. Run as a standing order, a rule neither saves nor clears the existing queue. When the rule kept its changes, the fleet’s conditional diversion state is set to the state the rule ran under, which is clear for a standing order, and Cycle Moves is turned off. When it kept nothing, nothing is restored, because nothing was saved.
Most rules try a local target first and then fall back to the search of other systems. That search clears the existing queue before it queues a route. When it finds a system, it queues Standard Transit steps through the jump points of the route. When no destination exists and the rule asks for an event, a player fleet logs Orders Not Possible. That event text is the fleet name, then “is unable to carry out its standing order (”, the order’s description and “) as there is no suitable destination”. Some rules then append the final action at the destination the search returned, such as the refuel rule. Others only accept the route, such as the geosurvey system search.
Some rules change the rule list itself. The two sorium gas giant rules clear the fleet’s standing orders after a hit in the system. The survey rules mark an NPR fleet as redeployed (RedeployOrderGiven) when they queue work. Outside the rules, the fleet reaction bonus calculation clears the move queue and the standing rules of a fleet with no ships. When a player race captures a ship, the fleet that receives it loses its standing rules.
Fleet movement suppresses the Orders Completed event (DIM_EventType 45) for a fleet that has standing rules and does not ignore them, for shipping-line fleets and for NPR fleets. The movement page covers the rest of queue completion.
Distance limit and survey radius
Section titled “Distance limit and survey radius”A fleet’s standing order distance limit is its MaxStandingOrderDistance when that is above 0. Otherwise it is the default geological survey radius. Three radii exist. The default is 10,000,000,000 km, the expanded radius is 12,000,000,000 km and the maximum radius is 15,000,000,000 km.
Among the standing orders, only the geological body search reads the limit. The search builds its candidate list from bodies in the system that are not marked FixedBody, not yet surveyed by the race, not among the race’s banned bodies, and not already the target of a Geological Survey order. Orders of the race and of every race it holds a geological survey treaty with count. The search filters by body class for orders 1, 2, 3 and 9. It picks the candidate with the shortest Lagrange-aware travel distance from the search origin, and accepts it only when that distance is strictly below the limit. For orders 4, 13 and 49 an empty or out-of-range result sets GeoSurveyDefaultDone on the system survey. The exploration page covers what that flag gates.
No distance limit applies to gravitational survey locations, waypoints, populations, wrecks or lifepods. The nearest waypoint and nearest lifepod searches order by distance and return the nearest with no cap. NPR economic planning reads the same limit for orbital miners, terraformers and harvesters, which NPR strategic planning covers.
An NPR fleet widens its own limit. The multi-body survey orders run up to the requested number of searches, each from the previous body’s coordinates. When the first search finds nothing for an NPR, the limit rises from the default 10,000,000,000 km to the expanded 12,000,000,000 km, or from the expanded value to the maximum 15,000,000,000 km. The “SV: Three Locations” rule does the same, although its own location search ignores the limit, so the change only affects later body searches. No standing order lowers the limit again. Resetting an NPR fleet’s rules from its operational group sets the limit to the default 10,000,000,000 km.
A player sets the limit in the Maximum Geological Survey Radius box of the Naval Organization window. The window reads the text as a decimal number and drops any fraction. A negative result becomes 0 and shows the message “Distance cannot be negtive”, spelled that way in the game. Text that does not parse shows the message “Cannot Parse Prize Chance Value” and leaves the limit unchanged. A value of 0 means the default. The overview text box shows the stored value, so it shows 0 rather than the default value.
Operational-group and civilian standing orders
Section titled “Operational-group and civilian standing orders”NPR fleets take their rules from their operational group. When a game is loaded, each group’s PrimaryStandingOrder and SecondaryStandingOrder are matched against the standing order catalogue, and an unknown ID becomes the None row. Operational group rules never include a missing rule or the None row, so such a slot leaves no entry. The game database as shipped names secondary order 40 on four DIM_OperationalGroup rows, and the catalogue has no OrderID 40, so those fleets carry only their primary rule. The four rows are Geological Survey, Gravitational Survey, Beam-Armed Geological Survey and Beam-Armed Gravitational Survey, OperationalGroupID 2, 3, 78 and 79.
Five fleet creation paths clear the list and add the primary rule at priority 1 and the secondary rule at priority 2. General fleet creation does this for every NPR fleet, and a fleet created with no group joins the Reinforcement Group. The other four paths create operational group fleets for the game, create one instantly at given coordinates, create them for a race, and create them while assigning shipyards. Resetting an NPR fleet’s rules from its operational group repeats the same reset and also restores the default distance limit. The NPR fleet allocator does this when it sends a fleet to a target system, as strategic allocation describes.
The joining rule runs for order 48. It also runs for a new NPR ship in the reinforcement group when a shipyard finishes building a ship, . It does nothing, and counts as finding no target, for an empty fleet or when the fleet’s NPR mission availability is unavailable. Otherwise it records the first ship’s class as the class awaiting reinforcement and looks for the nearest fleet that needs reinforcement by that class.
- Recipient at the same coordinates. All ships transfer into it, and the rule counts as having found a target.
- Mobile recipient elsewhere. When the recipient’s maximum speed is not 1, the fleet queues Join Fleet to it and logs an Orders Assigned event, “As per standing orders”, the fleet name, “is moving to join” and the recipient’s name.
- Immobile recipient. A maximum speed of 1 marks the recipient immobile and skips the search of other systems.
- No recipient. A search of other systems for an operational group to join queues Join Fleet to the fleet it finds.
When none of these applies, the rule looks up a new group type for the ship class. A type other than none replaces the fleet’s group and resets its two rules. It also renames the fleet to the group description plus the count of the race’s fleets in that group, the fleet itself included, padded with zeros to three digits. The rule then counts as having found no target. The change also clears and refills the fleet’s rule list while the standing pass is still working through it. The pass fails when it tries to move on to the next rule, the game shows the message for Function #3988, and the standing pass ends for this increment. Fleets later in the pass wait for the next increment, and the removal of empty NPR fleets at the end of the pass is skipped. The fleet keeps its new group, rules and name.
Civilian shipping-line ships get fixed rules when the ship is created. A colony ship gets priority 1 “LD: Colonists” and 2 “UL: Colonists”. A fuel harvester gets priority 1 “MV: Sorium GG 10m Pop”. A liner gets priority 1 “LD: Passengers” and 2 “UL: Passengers”. The harvester’s rule clears itself after a hit in the system. The civilian shipping and mining step therefore restores it for every fleet whose civilian function is fuel harvester, once more than a month (2,592,000 seconds) has passed since the last refresh. Sorium harvesting also restores it for an NPR or shipping-line harvester sitting on a body without sorium. The civilian economy page covers the liner and harvester decisions.
Condition catalogue
Section titled “Condition catalogue”The table names all 13 DIM_Condition rows. Any one ship meets each fuel, MSP and deployment condition for the whole fleet. The speed and hostile-contact conditions test the fleet and its system. Every percentage test is inclusive.
| ConditionID | Description | Summary text | DisplayOrder | Condition met when |
|---|---|---|---|---|
| 0 | No Condition | No Condition | 0 | Never. The Naval Organization window condition list shows only IDs above 0. |
| 1 | Fuel: 100% | Fuel Tanks Full | 10 | Any ship has Fuel equal to its class FuelCapacity. One full ship is enough. |
| 2 | Fuel: 20% or Less | Fuel: 20% or Less | 50 | Any ship has Fuel at or below FuelCapacity x 20 / 100. |
| 3 | Fuel: 10% or Less | Fuel: 10% or Less | 60 | Any ship has Fuel at or below FuelCapacity x 10 / 100. |
| 6 | Speed: Less than 100% | Current Speed not equal to Max | 100 | The fleet Speed is below the fleet’s maximum speed. That maximum is the lowest effective maximum speed among the ships not carried by a mothership and not under tow, rounded down to a whole number, or 1 when no such ship exists. |
| 7 | MSP: 20% or Less | MSP: 20% or Less | 80 | Any ship has CurrentMaintSupplies at or below class MaintSupplies x 20 / 100. |
| 8 | MSP: 10% or Less | MSP: 10% or Less | 90 | Any ship has CurrentMaintSupplies at or below class MaintSupplies x 10 / 100. |
| 9 | Hostile Active Ship Contact in System | Hostile Active Ship Contact in System | 120 | The fleet’s race has any contact in the fleet’s system whose contact status is Hostile. The test does not look at contact type or active emissions. |
| 10 | Fuel: 30% or Less | Fuel: 30% or Less | 40 | Any ship has Fuel at or below FuelCapacity x 30 / 100. |
| 11 | Fuel: 40% or Less | Fuel: 40% or Less | 30 | Any ship has Fuel at or below FuelCapacity x 40 / 100. |
| 12 | Fuel: 50% or Less | Fuel: 50% or Less | 20 | Any ship has Fuel at or below FuelCapacity x 50 / 100. |
| 13 | Deployment Exceeded | Deployment Exceeded | 110 | Any ship has (current game time minus LastShoreLeave) divided by 2,592,000 seconds, one month, above its class PlannedDeployment. |
| 14 | MSP: 30% or Less | MSP: 30% or Less | 70 | Any ship has CurrentMaintSupplies at or below class MaintSupplies x 30 / 100. |
The fuel test starts from a threshold of 100 for every fuel condition and replaces it with 50, 40, 30, 20 or 10 for the matching condition. A threshold of 100 is an equality test. Every other threshold means Fuel at or below FuelCapacity x percentage / 100. The MSP test starts from 30 and replaces it with 20 or 10. Both tests compare against the class values FuelCapacity and MaintSupplies.
Two effects follow from the deployment condition. In each construction cycle the shore leave step sets LastShoreLeave to the current time for every NPR ship. For an NPR ship the measured time therefore never exceeds one construction cycle. The condition has no special case for PlannedDeployment 0, so a ship of such a class meets it whenever any time has passed since its LastShoreLeave.
Conditional order evaluation
Section titled “Conditional order evaluation”Each fleet has a conditional diversion state, which is either clear or active. It records whether a conditional rule has diverted the fleet. The game does not save it.
Each time increment runs the conditional pass once at its start, before the sub-pulses. The pass selects fleets with at least one conditional rule, at least one ship, a clear diversion state and Ignore Conditional Orders off. It drops fleets with ships under maintenance or in a shipyard. Unlike the standing pass, it does not require an empty move queue.
For each fleet the pass sorts the rules by priority. For each rule in turn it tests the condition and, when the condition holds, runs the action as a conditional order. The first rule whose condition holds ends the scan. When that rule’s waypoint flag is 1, the pass creates the fleet waypoint at the fleet’s current position. The scan ends on the condition, not on the success of the action. A condition that holds while its action found no target therefore still ends the scan and still creates the waypoint. The pass assumes every rule’s action and condition exists in the catalogues, so a rule naming an ID missing from either catalogue raises an error (Function #1522) and ends the pass.
The action runs only when its condition holds. Run as a conditional order, the action first copies the current queue and clears it. When the action keeps its changes, the fleet’s diversion state becomes active and Cycle Moves is turned off. When it keeps nothing, the saved orders go back into the queue with their places, timers and progress. A kept diversion discards the interrupted queue. The movement page records the “IA: Clear Order List” restore quirk that follows from this.
An active state blocks every conditional rule of the fleet until something clears it. The state clears when the queue empties at the end of fleet movement and whenever the fleet’s move orders are cleared. It also clears at each movement step of an anchored fleet, and when a restricted shipping-line fleet gets its exit transit. An instant action never keeps changes, so it never sets the active state. A conditional instant action therefore runs again at every increment start while its condition stays true, and it still ends the scan each time.
Standing order templates
Section titled “Standing order templates”A standing order template holds an ID (TemplateID), a name (TemplateName), a priority list of standing orders and a priority list of conditional orders. Templates belong to a race, and the Naval Organization window lists their names in the order the race holds them.
Create Template needs a fleet with at least one rule. Otherwise it shows “Please select a fleet with one or more standing or conditional orders”. It prompts “Enter Standing Order Template Name” with “New Template” as the default and takes the next template ID. Then it copies both lists entry by entry. The ID counter starts from the highest TemplateID saved in FCT_StandingOrderTemplate, and each new template takes the next number. Load Template asks for confirmation when the fleet already has rules, with “Are you sure you want to replace the existing standing and conditional orders with” and the template name. It then clears both fleet lists and copies the template entries in. Delete Template removes a template after confirmation.
Both copies share the rule entries, so a template and every fleet loaded from it share the same conditional rules until the next reload. Nothing changes a conditional rule’s condition, action or waypoint flag after the rule is created, so the sharing has no visible effect.
Waypoints as destinations
Section titled “Waypoints as destinations”A waypoint belongs to one race and one system. It stores an optional orbit body and jump point, a type, a number within the system, a creation time (CreationTime), coordinates, a name and an owning fleet (FleetID). The stored WaypointType values are 0 Normal, 1 Point of Interest, 2 Urgent POI, 3 Transit POI, 4 Marked for Deletion, 5 Fleet Training, 6 Rendezvous, 7 Named, 8 Temporary, 9 Deep Space Location and 10 Fleet Waypoint. The waypoint types section covers them in full.
A waypoint’s display name is its name when that is not empty. Otherwise it is a type prefix plus the number. The prefixes are “Point of Interest #”, “Urgent POI #”, “Transit POI #”, “Training Waypoint #”, “Rendezvous Waypoint #” and “Temporary #”, and “Waypoint #” for every other type. Where the orbit body is shown, its name follows in brackets. A waypoint with no jump point saves jump point ID 0.
Apart from loading a saved game, every new waypoint comes from one get-or-create step.
- It reuses a waypoint of the same race, system and type whose coordinates both differ from the requested point by less than 1 km, and refreshes its
CreationTime. It does not compareFleetID. - For an NPR race and a point of interest or urgent point of interest, it also reuses a waypoint whose coordinates both differ by less than 5,000,000 km. The test is a square, not a circle.
- With a positive fleet ID, it deletes the first existing waypoint carrying that fleet ID, of any type, race or system.
- It creates a new waypoint with the next ID and number 1, or the race’s highest number in that system plus 1. When a body is given, the body’s coordinates replace the requested ones.
Because step 1 ignores the fleet ID, a fleet that creates a fleet waypoint where another fleet’s fleet waypoint already lies receives that other waypoint. Its own “MV: Fleet Waypoint” rule then finds no waypoint with its ID.
Waypoints come from several places.
- Player map tools. Clicking the tactical map creates normal, named, rendezvous, point of interest, urgent point of interest, temporary and fleet waypoints, on a body or at the clicked point. A named waypoint is stored as type Normal with a name. The fleet waypoint tool on the map passes the fleet name and ID. Moving a waypoint rewrites its body and coordinates without touching
CreationTime. - Fleet waypoints. A fleet waypoint is named after the fleet, followed by “Waypoint”, and carries the fleet’s ID. It sits at the fleet’s position and orbit body, or at a given point. The Create Fleet WP button in the Naval Organization window, the waypoint flag of a conditional rule and the Create Fleet Waypoint move action all create it.
- Return points. The “LG: Transfer Fuel and Return” rule creates a Temporary waypoint named after the fleet, followed by “Return Point”.
- Contacts and AI. Contact detection creates point of interest, urgent point of interest and transit point of interest waypoints. NPR avoidance and retreat create temporary waypoints, which NPR tactical behaviour covers. NPR patrol assignment skips a point of interest that lies within 50,000,000 km, by Lagrange-aware distance, of a point of interest that one of the race’s fleets already has orders to visit.
A move order to a waypoint shows the waypoint’s display name, with the orbit body name in brackets where it has one, and carries the requested action with no quantities. When the waypoint filter is on, the Naval Organization window lists the race’s waypoints in the system where the fleet’s queue ends, sorted by number. The destination position is the waypoint’s coordinates. A missing waypoint leaves the position at 0,0. That fails the order with the Orders Not Possible event “Destination of” followed by the fleet name, then “cannot be found. Please issue new orders” and clears the fleet’s queue. A waypoint with an orbit body follows the body when orbital positions update.
The nearest waypoint search returns the nearest waypoint of a given type, race and FleetID in a system, by Lagrange-aware distance. For point of interest, urgent point of interest and transit point of interest types it first excludes waypoints that a Move to Location order of the same race already targets in that system. The searches of other systems for points of interest, urgent points of interest, rendezvous and fleet waypoints use the same search from the arrival jump point of each candidate system.
Arrival consumes some waypoints. When a fleet reaches a point of interest, urgent point of interest, fleet training or temporary waypoint, or its own fleet waypoint, the waypoint changes to type Marked for Deletion (WaypointType 4), and the fleet takes the waypoint’s orbit body. A temporary waypoint targeted by a missile salvo is marked the same way when the salvo reaches it. Marked waypoints are removed later in the same increment, after the standing pass.
In each construction cycle the game removes expired waypoints. Point of interest and temporary waypoints expire when older than three months, 7,776,000 seconds. Urgent point of interest waypoints expire when older than one year, 31,536,000 seconds. Transit point of interest waypoints expire when older than two years, 63,072,000 seconds. A waypoint that any fleet’s move order targets survives. Normal, named, rendezvous, fleet training, deep space and fleet waypoints never expire by age. Removing a system removes its waypoints.
Worked examples
Section titled “Worked examples”These examples apply the rules above to invented fleets.
Conditional refuel with a return waypoint. A player fleet has three ships, each with class FuelCapacity 100,000 litres, holding 60,000, 28,000 and 90,000. Its conditional rules are priority 1 “Fuel: 20% or Less” with “LG: Refuel at Colony”, and priority 2 “Fuel: 30% or Less” with “LG: Refuel at Colony” and the WP flag. Its standing rule is priority 1 “MV: Fleet Waypoint”. Four move orders are queued. At increment start the 20% threshold is 20,000 litres and no ship is at or below it, so rule 1 fails. The 30% threshold is 30,000 and the second ship holds 28,000, so rule 2 holds. The action saves the four orders, clears the queue, finds a refuelling colony and queues “Refuel from Colony”. The rule kept its changes, so the diversion state becomes active and the four orders are gone. The pass then creates the fleet’s waypoint (named after the fleet, followed by “Waypoint”) at the fleet’s position. Later increments skip the fleet’s conditional rules while the state is active. When the refuel order completes and the queue empties, the state clears. If that increment ran more than 60 seconds, the standing pass queues Move to Location back to the waypoint, and arrival marks the waypoint for deletion.
Priority renumbering. A fleet holds standing rule A at priority 1, B at 2 and C at 3. Deleting priority 2 leaves A at 1 and C at 3, and renumbering with no reserved slot moves C to 2. Moving C up removes priority 2, renumbers A with slot 1 reserved so A takes 2, and inserts C at 1. The list is now C at 1 and A at 2. If the fleet then gets its first conditional rule, that rule takes priority 3, one above the standing maximum.
NPR survey radius. An NPR survey fleet has MaxStandingOrderDistance 0, so its limit is 10,000,000,000 km. It runs “SV: Five System Bodies” and the nearest unsurveyed body lies 11,000,000,000 km away. The first search fails because 11,000,000,000 is not below 10,000,000,000, and it sets GeoSurveyDefaultDone on the system survey. The later successes do not clear the flag. The fleet is an NPR fleet, so the limit becomes 12,000,000,000 km. The remaining four attempts repeat the search from the same origin against the new limit, so the second attempt queues the 11,000,000,000 km body and later attempts chain from it.
Deployment condition. A player ship of a class with PlannedDeployment 3 had LastShoreLeave at game time 0. At 8,000,000 seconds the decimal quotient 8,000,000 / 2,592,000 is about 3.086, which exceeds 3, so “Deployment Exceeded” holds. At 7,776,000 seconds the quotient is exactly 3, which does not exceed 3.
Waypoint expiry. A point of interest waypoint created at time 0 is still present at a construction cycle at 7,776,000 seconds, because the test is strictly greater than three months. At the first construction cycle after that it is removed unless a move order targets it. An urgent point of interest created at the same time survives until the first cycle after 31,536,000 seconds.
Persistence and reload
Section titled “Persistence and reload”When a game is saved, the game deletes its FCT_FleetStandingOrder and FCT_FleetConditionalOrder rows. It then writes FleetID, StandingOrderID and Priority for each standing rule. For each conditional rule it writes FleetID, ConditionalOrderID (the action’s OrderID), ConditionID, Priority and CreateFWP. The fleet row in FCT_Fleet stores MaxStandingOrderDistance, DetachedStanding, DetachedConditional, IncludeSquadrons, IgnoreStanding and IgnoreConditional, and loading a game reads them back.
Loading skips a standing rule row whose order ID is not in the catalogue or whose fleet is missing. It also skips a conditional rule row whose condition ID is not in the catalogue, and it builds a new conditional rule for each row. Both tables key rules by priority, so a duplicate priority for one fleet would raise an error and end the loading of that table.
Saving templates deletes and rewrites FCT_StandingOrderTemplate with RaceID, TemplateID and TemplateName, and FCT_StandingOrderTemplateOrder with one row per entry. Standing entries are written with ConditionID 0 and no CreateFWP value. Conditional entries carry their condition and flag. Templates are the last data loaded with a game. Loading treats ConditionID 0 as a standing entry and assumes the catalogue holds the order, so an unknown order ID raises an error and ends the template load. It also converts CreateFWP to a whole number for standing rows. The table definition in the game database gives CreateFWP a default of 0, so standing rows read back 0.
Saving writes WaypointID, RaceID, SystemID, OrbitBodyID, CreationTime, Xcor, Ycor, Number, WaypointType, Name, JumpPointID and FleetID to FCT_Waypoint for every waypoint, marked ones included. Loading skips rows whose race or system is missing. It keeps a row only when its FleetID is 0 or below or names a loaded fleet. Waypoints load before fleets, and the list of loaded fleets fills only while fleets load. On a fresh load every fleet waypoint row is therefore skipped, and “MV: Fleet Waypoint” rules find nothing after a reload. A saved move order to such a waypoint finds no position and clears the fleet’s queue with “cannot be found”. A missing orbit body or jump point leaves the waypoint without that body or jump point.
The standing order and condition catalogues are reloaded from their DIM_ tables on every load.
Several values are not saved and restart on load.
- Conditional diversion state starts clear. A fleet in an active conditional diversion can therefore trigger its conditional rules again at the first increment after reload.
- Last fuel harvester refresh time has no saved value. It starts at 0, so the first civilian pass after a load refreshes the harvester rules.
Concept map
Section titled “Concept map”- Catalogues, the three database tables behind standing orders, conditions and move actions.
- Standing order rows, what each
DIM_StandingOrdersrow does when it runs. - Condition rows, what each
DIM_Conditionrow tests. - Standing pass, when idle fleets run their standing rules.
- Conditional pass, when conditions divert a fleet and how the old queue returns.
- Distance limit, the survey radius that caps geological body searches.
- NPR and civilian rules, where NPR and shipping-line fleets get their rules.
- Naval Organization window editing, adding, deleting, moving and summarising rules.
- Templates, saved sets of rules that load onto fleets.
- Waypoints, the waypoint targets several rules move to.
- Saved state, what survives a save and what restarts.
- Move action catalogue, every move action, its availability and what it does on arrival.
- Order queues, timing, repeats and the queue the rules fill.
- Standing and conditional orders in movement, the restore quirk of a cleared order list.
- Inter-system auto-routing, the route search behind every search of other systems.
- Movement order templates, saved move orders, a different kind of template.
- Logistics interruption, what a replaced or cancelled order leaves behind.
- Waypoints and points of interest, the full waypoint lifecycle.
- Fleet organisation and detachment, how detached fleets copy rules.
- Exploration surveys, what the survey rules feed and what
GeoSurveyDefaultDonegates. - Jump gate construction, the targets of the stabilisation rule.
- NPR strategic planning, the allocator that resets NPR rules.
- NPR tactical behaviour, NPR patrols, rescue and avoidance waypoints.
- NPR fleet readiness, the mission availability that gates joining a group.
- Operational groups, the
DIM_OperationalGrouprows that name NPR rules. - Civilian economy, the liners, colony ships and harvesters with fixed rules.
- Shore leave, the deployment clock behind “Deployment Exceeded”.
- Game time, the increments and construction cycles that run both passes and waypoint expiry.
- Event types, the Orders Assigned, Orders Not Possible and Orders Completed events.
- Ship capture, which clears the receiving fleet’s rules.
- Salvage, the work behind the salvage rule.
- Terraforming, the colony cost behind the terraform rule.
Resources
Section titled “Resources”Related community documentation and developer posts. These may describe a different game version.