News

Helping the AI use better ships

Posted on Saturday, June 13, 2015

Hey all!

 

As I've spoken about frequently here and on the modding subforums, I've encountered (and fixed) a number of issues with the stock ship designs. After learning how to implement custom ships from Dumhed's excellent guide, I started playing around with Blueprints when I discovered that I wasn't really liking the standard design choices the AI ship designer makes.

 

I think there's a lot of improvements to be made to the standard stable of blurprints the AI has available. Just like how the AI may choose to use your own ship designs against you, I'd like for the AI to be able to use more optimal ship blueprints throughout the game, rather than at the precise tech point where I designed a particular ship.

 

 


 

As an example, here is the standard Small scout blueprint:

 

<ShipBlueprint>
<InternalName>ExplorerBlueprint</InternalName>
<ShipHullType>Small</ShipHullType>
<Role>Assault</Role>
<RequiredComponentType>Sensor</RequiredComponentType>
<RequiredComponentType>LifeSupport</RequiredComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>InterstellarDrive</ComponentType>
<FillerComponentType>LifeSupport</FillerComponentType>
<FillerComponentType>Sensor</FillerComponentType>
</ShipBlueprint>

 

It has a sensor, then three life support units, then an engine, another life support unit, and finally another sensor. It then alternates life support and sensors.

 

In my opinion, sensors are more important than range for scouts. I'm only going to field X number of them, so I want them to be able to cover a decent amount of area ground and have good sensor coverage, rather than neccesarily being able to reach super-far afield. As such, this is my personal small scout design:

 

<ShipBlueprint>
<InternalName>FedExplorerBlueprint</InternalName>
<ShipHullType>Small</ShipHullType>
<Role>Assault</Role>
<RequiredComponentType>Sensor</RequiredComponentType>
<RequiredComponentType>LifeSupport</RequiredComponentType>
<ComponentType>InterstellarDrive</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>Sensor</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>InterstellarDrive</ComponentType>
<FillerComponentType>Sensor</FillerComponentType>
<FillerComponentType>LifeSupport</FillerComponentType>
</ShipBlueprint>

 

This stars with a sensor and life support, before adding an engine, another life support, a second sensor module, more life support, another engine, and finally it will alternate sensors and life support.

 

This ensures the design will be able to travel faster and have more coverage than the base scout, at the cost of only gaining extreme range at higher miniaturization tech.

 


 

One issue I have with how the AI designs certain ships is that it loads up on unnecessary LifeSupport components. These are expensive. An example I've brought up in the past is the Transport, which at max tech can move fiftieen billion troops out past 300 hexes range beyond your borders, at a cost of over 1400 manufacturing capacity - more than a Battleship. 1200 of that 1400 manufacturing cost is due to Life Support modules.

I've taken to using this blueprint:

 

<ShipBlueprint>
<InternalName>FedTransportBlueprint</InternalName>
<ShipHullType>Cargo</ShipHullType>
<Role>Support</Role>
<RequiredComponentType>TransportModule</RequiredComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>InterstellarDrive</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>InterstellarDrive</ComponentType>
<ComponentType>TransportModule</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>InterstellarDrive</ComponentType>
</ShipBlueprint>

 

It has the same movement capacity, but doesn't have cross-map range. This means it can only go where you have a reasonable projection of force already through having a starbase or planet nearby (and by 'near' I mean 50-140 hexes, depending on tech level). At max, it costs just 600 manufacturing - which in my opinion is still too high. It also carries 'only' 6 billion troops (enough to take a typical 15bn population planet). This is actually an advantage, as every time a battle is won, one involved troop ship is used up - if you want to carry more troops, take 2 or 3 troop ships, and all-but-1 of them will still be usable after a victory.

 


 

This is my constructor:

 

<ShipBlueprint>
<InternalName>FedLongRangetConstructorBlueprint</InternalName>
<ShipHullType>Cargo</ShipHullType>
<Role>Support</Role>
<RequiredComponentType>ConstructionModule</RequiredComponentType>
<ComponentType>InterstellarDrive</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>ConstructionModule</ComponentType>
<ComponentType>LifeSupport</ComponentType>
<ComponentType>InterstellarDrive</ComponentType>
<ComponentType>ConstructionModule</ComponentType>
<ComponentType>Sensor</ComponentType>
<ComponentType>ConstructionModule</ComponentType>
<ComponentType>ConstructionModule</ComponentType>
<FillerComponentType>InterstellarDrive</FillerComponentType>
<FillerComponentType>LifeSupport</FillerComponentType>
</ShipBlueprint>

 

It gets far more movement allowance than the standard model, so you get your starbases in far-flung reaches sooner. It also simply includes a plan to max out at 5 construction modules, rather than alternate construction modules with crazy expensive and unnecessary life-support.

 


 

These kind of optimizations are possible for all kinds of ships, these were just some civilian vessels.

Barring the AI gaining an ability to check its upgrade process for stuff like 'is this tech upgrade improving my Damage by substantially more than my cost?' and the like - which is something Stardock might be able to do if so inclined but is probably beyond our ability - what we can do is write better ship blueprint setups so the AI is less likely to blow its production capacity unnecessarily.