Description: Custom races with Ship bound Gameplay Affinity but other Race Visual Affinity have the cap as cost.


Steps to Reproduce: Create a custom race, add Ship bound Gameplay Affinity, and a Race Visual Affinity other than Vodyani, start the game, check Ark cost: in normal speed should be 600, but is 800.


Version: 1.5.57 S5 GOLD-Public (prepatch beta), possibly also on latest offical release.


Reproducibility: 5/5


Insight to the problem: The cost formula is different for each race for Ship bound Gameplay Affinity, but only Volyani has the 200 Essence discount.


Possible solution: in "Battles\HullDefinitions[Vaulters_DLC1].xml" I fixed the CustomCost for <HullDefinition Name="HullLarge00Vaulters", used the Volyani formula from "Battles\HullDefinitions[Vampirilis].xml": 


   <CustomCost Instant="true" ResourceName="EmpireLifeforce">Property(StockLocation,@'../ClassEmpire',MaximumEmpireLifeforceStock) - 200 * Property(StockLocation,@'../ClassEmpire',GameSpeedMultiplier) * Property(StockLocation,@'../ClassEmpire',IsUnderColonizationThreshold)</CustomCost>


Did the same with all the other major races in each file like "Battles\HullDefinitions[*].xml searching for "Name="HullLarge00"


By the way, in my personal changes, I used this formula instead, to give Volyani affinity a bit more of QoL:


    <CustomCost Instant="true" ResourceName="EmpireLifeforce">Property(StockLocation,@'../ClassEmpire',MaximumEmpireLifeforceStock) * (0.9 - 0.1 * Property(StockLocation,@'../ClassEmpire',IsUnderColonizationThreshold)) - 200 * Property(StockLocation,@'../ClassEmpire',GameSpeedMultiplier)</CustomCost>

    

    Combined with the rise of MaximumEmpireLifeforceStock from 800 to 1000 in "Simulation\Battles\SimulationDescriptors[Ship].xml" in the Simulation Descriptor with name Name="ClassHullMothership".


The ship cost is the same as now, but the margin related to your maximum life force grows. Also, when you are over the colonization threshold, you are hit a bit harder with the cost: 100 Essence * Arks - 200, vs just removing the 200.