It is 'hardcoded' in the xml files.
From ShipComponentDefs.xml:
<ShipComponent>
<InternalName>AssaultCarrierModule</InternalName>
...
<Type>AssaultCarrierModule</Type>
...
</ShipComponent>
From ComponentClassDefs.xml:
<ComponentClass>
<UniqueID>AssaultCarrierModule</UniqueID>
<PrimaryStat>AssaultFighters</PrimaryStat>
</ComponentClass>
<ComponentClass>
<UniqueID>EscortCarrierModule</UniqueID>
<PrimaryStat>EscortFighters</PrimaryStat>
</ComponentClass>
From FactionDefs.xml:
<Faction>
<InternalName>FACTION_TERRAN</InternalName>
...
<InitialAssaultFighter>TerranSniper</InitialAssaultFighter>
<InitialEscortFighter>TerranGuardian</InitialEscortFighter>
<InitialGuardianFighter>TerranKnight</InitialGuardianFighter>
...
</Faction>
There is a definition for an "EscortCarrierModule" class which will use Escort Fighters (the Guardian). But there is no ship component of this class, as of yet. However it presence and the definitions of InitialEscortFighter and InitialGuardianFighter might indicate that other CarrierModule component(s) are to follow.
Funny thing:
The initial Escort Fighter is the Guardian, while the Initial Guardian Fighter is the Knight
. Confused? You won't be, after this week's episode of...