Modded Ships Don't Receive Specified Ship Roles

When modding XML files to create custom ships, I noticed they don't seem to receive the ship role specified in the modded XML file. 

Here is an example.

1.)  I create the ship as shown below.

  <ShipBlueprint>

    <InternalName>Gunship</InternalName>

    <ShipHullType>Small</ShipHullType>

    <Role>Interceptor</Role>

    <RequiredComponentType>KineticWeapon</RequiredComponentType>

    <FillerComponentType>KineticWeapon</FillerComponentType>

  </ShipBlueprint>

2.)  I create a class for the ship.

<ShipClass>

    <InternalName>TerranGunship</InternalName>

    <DisplayName>Gunship</DisplayName>

    <Description>Designed to output a barrage of constant damage from short range.</Description>

    <ThumbnailOverride>Temp_Terran_Bomber_Alpha_01.png</ThumbnailOverride>

    <ShipHullType>Small</ShipHullType>

    <ShipRule>Balanced</ShipRule>

    <ShipDesign>Terran_Bomber_01T</ShipDesign>

    <AIShipClass>Assault</AIShipClass>

    <StrategicIcon>Bomber</StrategicIcon>

    <BlueprintDef>Gunship</BlueprintDef>

  </ShipClass>

3.)  I add the ship to the faction's list of ship classes.

<ShipClass>TerranGunship</ShipClass>

 

The ship works in-game as expected, other than the fact that it doesn't have the specified ship role.  In this case, you can see in the blueprint its role is set to interceptor, but in-game it shows up as an escort.  It seems to me that the game is ignoring the ship role specified in the XML file and instead determines its role automatically.

I was wondering if there was any fix for this.  Thanks.

15,907 views 2 replies
Reply #1 Top

Ship roles in the shipclass and blueprint files are defunct. Role is determined by the combination of Threat\Fortitude\Value of the hull and all components. Your ship came out as Escort due to high Fortitude (Defenses mostly)

Edit:

Id like to point out that the current values of TFV in SHipComponents are wonkey and ships are getting roles assigns that they shouldnt have.