Drive Modding

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 :)

34,968 views 10 replies
Reply #1 Top


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).

Your links end in "dl=0".  Change it to "dl=1" to get the images to appear.  Someone had to tell me this a few years ago, so now it's my turn to pass it on.

+1 Loading…
Reply #2 Top

Hmm, I couldn't reproduce your problem. Checking via ship designer from both main menu and from freshly started game with drengin, I get the expected values for the drive mass according to the formula:

ValueParam1 + ValueParam2*MassCap

with tiny and cargo hulls and the hyperdrive in a freshly started game and with all hull sizes and both drives in the ship designer started from the menu.

Reply #3 Top

Quoting zuPloed, reply 2

Hmm, I couldn't reproduce your problem. Checking via ship designer from both main menu and from freshly started game with drengin, I get the expected values for the drive mass according to the formula:

ValueParam1 + ValueParam2*MassCap

with tiny and cargo hulls and the hyperdrive in a freshly started game and with all hull sizes and both drives in the ship designer started from the menu.

Did you mod your game as I did or do you speak of the vanilla drive parameters?

Reply #4 Top

Quoting Old-Spider, reply 1



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).



Your links end in "dl=0".  Change it to "dl=1" to get the images to appear.  Someone had to tell me this a few years ago, so now it's my turn to pass it on.

Thanks a lot, that worked :)

Reply #5 Top

Quoting lyssailcor, reply 3

Did you mod your game as I did or do you speak of the vanilla drive parameters?
Both.

I tried vanilla, par1=-5: par2 = 0.3/0.4, and par1 = 0; par2 = 0.3/0.4

All gave the expected results.

Reply #6 Top

Quoting zuPloed, reply 5


Quoting lyssailcor,

Did you mod your game as I did or do you speak of the vanilla drive parameters?

Both.

I tried vanilla, par1=-5: par2 = 0.3/0.4, and par1 = 0; par2 = 0.3/0.4

All gave the expected results.

Hmmm, very dubious. You see in my screenshots that for me it doesn't work correctly. I have to try to find out what the problem is ...

Reply #7 Top

Do you have any other mods in the directory? you could try to remove those and only test with a modified ShipComponentDefs.xml (unless you allready have).

I don't know how this modifier relates to mass reduction techs.

Not sure what else to suggest here.

Reply #8 Top

Quoting zuPloed, reply 7

Do you have any other mods in the directory? you could try to remove those and only test with a modified ShipComponentDefs.xml (unless you allready have).

I don't know how this modifier relates to mass reduction techs.

Not sure what else to suggest here.

I have only the modded ShipComponentDefs.xml in the mod directory and I started a new game,currently at turn 48, no mass reduction techs researched yet ...

Reply #9 Top

I think I found the problem: it was the comments with the original values behind each of my changes. I removed those and started a new game, and now (having only researched Hyperdrive Plus) it seems to work as expected.

Stardock sure doesn't seem to use a standard library for reading the xml files ;)

Reply #10 Top

Quoting lyssailcor, reply 9

it was the comments with the original values behind each of my changes.
... O_o

There are many things in between 1 and 0 we still dont understand...

Good to know. Congratz for finding that out.