News

Drive Modding

Posted on Sunday, November 5, 2017

I just modded the drive mass in my game like that:

  <ShipComponent>
    <InternalName>HyperDrive</InternalName>
    <DisplayName>HyperDrive_Name</DisplayName>
    <Description>HyperDrive_Dec</Description>
    <ArtDefine>Hyperdrive_01</ArtDefine>
    <Category>Engines</Category>
    <Type>InterstellarDrive</Type>
    <PlacementType>Drive</PlacementType>
    <Stats>
      <EffectType>Value</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>0.25</Value>
    </Stats>
    <Stats>
      <EffectType>MovesCapManufacturingCost</EffectType>
      <Scope>Queue</Scope>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>6</Value>
    </Stats>
    <Stats>
      <EffectType>MovesCapMass</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <ValueType>Special</ValueType>
      <SpecialValue>
        <Special>HullMassScaleMod</Special>
        <ValueParam>-5</ValueParam><!-- from 8 -->
        <ValueParam>0.4</ValueParam><!-- from 0.2 -->
      </SpecialValue>
    </Stats>
    <Stats>
      <EffectType>MovesCap</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>1</Value>
    </Stats>
    <Stats>
      <EffectType>Maintenance</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>0</Value>
    </Stats>
    <Prerequ>
      <Techs>
        <Option>EngineeringTech</Option>
        <Option>TorianEngineeringTech</Option>
      </Techs>
    </Prerequ>
  </ShipComponent>

That worked not really like expected (drive mass = -5 + 0.4 * 36 = 9.4; I get 5.8, implying that the formula used is -5 + 0.3 * 36; 36 = tiny hull size of the Drengin at start of game):

Hyper Drive Mass

 

When I look at the modded values for Hyperdive Plus:

  <ShipComponent>
    <InternalName>HyperdrivePlus</InternalName>
    <DisplayName>HyperdrivePlus_Name</DisplayName>
    <Description>HyperdrivePlus_Dec</Description>
    <ArtDefine>HyperdrivePlus_01</ArtDefine>
    <Category>Engines</Category>
    <Type>InterstellarDrive</Type>
    <PlacementType>Drive</PlacementType>
    <Stats>
      <EffectType>Value</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>0.5</Value>
    </Stats>
    <Stats>
      <EffectType>MovesCapManufacturingCost</EffectType>
      <Scope>Queue</Scope>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>10</Value>
    </Stats>
    <Stats>
      <EffectType>MovesCapMass</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <ValueType>Special</ValueType>
      <SpecialValue>
        <Special>HullMassScaleMod</Special>
        <ValueParam>-5</ValueParam><!-- from 8 -->
        <ValueParam>0.3</ValueParam><!-- from 0.1 -->
      </SpecialValue>
    </Stats>
    <Stats>
      <EffectType>MovesCap</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>1</Value>
    </Stats>
    <Stats>
      <EffectType>Maintenance</EffectType>
      <Target>
        <TargetType>Ship</TargetType>
      </Target>
      <BonusType>OneTime</BonusType>
      <Value>0</Value>
    </Stats>
    <Prerequ>
      <Techs>
        <Option>InterstellarTravel</Option>
        <Option>TorianInterstellarTravel</Option>
      </Techs>
    </Prerequ>
  </ShipComponent>

I expect a drive mass of -5 + 0.3 * 36 = 5.8, but I get the double value:

Hyper Drive Plus Mass

Can somebody tell me what is wrong?

 

Edit: I will never understand how inserting images works on this forum

I don't see the images in my post, but they appear when you click on it (at least for me).

Edit 2: Thanks to Old Spider the images are now shown