Help creating unique planetary improvement

Hello all,

 

I'm hoping somebody can help me out here.  I've been searching for some information on how to create a unique improvement for my custom faction but I'm not having much luck.  Programming is not my strong point so if you do decide to help me out here please assume I know absolutely nothing; because I don't know much more than that.

What I want to make is a planetary improvement that improves the sensor radius of a planet.  Think the Hubble telescope crossed with spy satellites that relay their information to a ground station, hence improving the site radius of the planet. 

To do this I want to have a planetary improvement (ground station) that once it is built will give a flat improvement of say 25% to the sensor rating of the planet.  Is this even possible?  And if so how do I do this?  I want it to be a base technology right off the engineering tech tree that leads to the rest of the sensor improvements.

Any help I can get with this will be greatly appreciated.

Thank you.

10,084 views 7 replies
Reply #1 Top

This is the way I would do it.

 

You need to copy two files from your GalCiv directory, assuming you have a Steam install.

...\Steam\SteamApps\common\Galactic Civilizations III\data\Game\ImprovementDefs.xml

Copy to

...\Documents\My Games\GalCiv3\Mods\ExampleMod\Game\

assuming English

...\Steam\SteamApps\common\Galactic Civilizations III\data\English\Text\ImprovementText.xml

Copy to

\Documents\My Games\GalCiv3\Mods\ExampleMod\Text\

 

Open the newly copied ImprovementDefs.xml and paste the following near the end of the  file.

NB. You must paste it before this line </DefaultImprovementList>  This has to be the last line in the file.

 

<!-- Begin Improvement -->
 
  <Improvement>
    <InternalName>HubbleArray</InternalName>
    <DisplayName>HubbleArray_Name</DisplayName>
    <ShortDescription>HubbleArray_ShortDec</ShortDescription>
    <Description>HubbleArray_Dec</Description>
    <Icon>EleriumDefenseShield.png</Icon>
    <BuildIcon>EleriumDefenseShield_Build.png</BuildIcon>
    <ListIcon>EleriumDefenseShield_Icon.png</ListIcon>
    <ImprovementType>Military</ImprovementType>
    <PlacementType>Military</PlacementType>
    <IsColonyUnique>true</IsColonyUnique>
 
    <!-- Stats -->
 
    <Stats>
      <EffectType>ManufacturingCost</EffectType>
      <Scope>Queue</Scope>
      <Target>
        <TargetType>Improvement</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>150</Value>
    </Stats>
 
    <Stats>
      <EffectType>Maintenance</EffectType>
      <Target>
        <TargetType>Improvement</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>1.5</Value>
    </Stats>
 
 <Stats>
      <EffectType>SensorPower</EffectType>
      <Target>
        <TargetType>Colony</TargetType>
      </Target>
      <BonusType>Flat</BonusType>
      <Value>32</Value>
    </Stats>
    <!-- Triggers -->
 
    <!-- Level Effect Trigers -->
 
    <!-- Level Effect Stats -->

 
    <!-- Adjacency Bonuses -->
 
    <NeighborBonuses>
      <GiveBonusToNeighborType>Military</GiveBonusToNeighborType>
      <NeighborBonusValue>1</NeighborBonusValue>
    </NeighborBonuses>
 
    <!-- Prerequisites -->
 
    <Prerequ>
      <Techs>
        <Option>InterstellarSurvey</Option>
      </Techs>
    </Prerequ>
 
  </Improvement>
 
<!-- End Improvement -->

 

Open the newley copied ImprovementText.xml paste the following near the end of the  file.

<StringTable>
    <Label>HubbleArray_Name</Label>
    <String>Hubble Array</String>
  </StringTable>
 
  <StringTable>
    <Label>HubbleArray_ShortDec</Label>
    <String>Allows us to see further into space</String>
  </StringTable>
 
  <StringTable>
    <Label>HubbleArray_Dec</Label>
    <String>Combining multiple sensors into large arrays allow us to monitor more of our local space more efficiently.</String>
  </StringTable>

 

NB. You must paste it before this line </StringTableList>  This has to be the last line in the file.

 

You should now have a Hubble Array available when you research Interstellar Survey.

A sensor power of 32 gives approximately a 10 hex radius. A normal Capital has a power of 16, a 5 hex radius.

Edit.

If you want a 25% increase change the word Flat in <BonusType> to Multiplier and change the <Value> to 0.25

 

Reply #2 Top

If you want it unique to a certain Civilization you need to change the Internal Name of the tech. If i wanted to change treborblue's example above I would change InterstellarSurvey to MyRaceInterstellarSurvey, then change the corrosponding tech's Internal Name in the races TechDefs file to match, doing this however makes the tech untradable by the civ.

You can also make it so several civs have this improvement, but not others the same way. Change InterstellarSurvey to SelectiveInterstellarSurvey in both Improvement and TechDefs of the Civs you want to have this improvement. (Something I did in GST to limit what races would trade Weapons to other races :) )

Reply #3 Top

I'd say give it to everybody for balance reasons.

Reply #4 Top

Its been a while, But I'd like to thank you for your help getting my custom tech, works great with my custom faction. 

Reply #5 Top

Sounds like you may have already got this figured out, but here's another thought.

If your custom faction has a custom race trait, you could use that as a prerequisite and avoid having to change any techs (which effects the ability to trade those techs).

In the prerequisite section of the improvement, I think you just have to add the following:

<Prerequ>

 <RaceTrait>
  <Option>AbilityName</Option>
 </RaceTrait>

</Prerequ>

The Torians use this for special terraforming improvements using the Amphibious race trait.

Reply #6 Top

Quoting Patrickwl, reply 4

Its been a while, But I'd like to thank you for your help getting my custom tech, works great with my custom faction. 
End of Patrickwl's quote

 

I stole your idea, and now have 2 two versions. 

Hubble array and Keplar array, further down the tree.

Reply #7 Top

Way, way back I created and posted a sensor improvement mod--I thought I lost my mind because I couldn't find it, and so I didn't share earlier... anyhow. It was from back before sensors were revamped and sensor power was added, so it wouldn't really be usable now.

I think I've been inspired to give it new life--and with what I've learned about modding the game in the almost two years since that post, who knows what I might make!

:grin: