[Mod] Ship defense boosters

Use this mod at your own risk. If you make any mistakes GalCiv3 will crash.

It works with the Beta 4 release. No guarantees for future versions of the game.

The objective is to create ship components that uses resources and boost specific ship defense.

  • Durantium -> Armor
  • Elerium -> Shield
  • Anti Matter -> Point defense.

The game uses the ShipComponentDefs.xml file (found in the \steamapps\common\Galactic Civilizations III\data\Game directory) for the definition of ship components, and the ShipComponentDefsText.xml file (locationed in the \steamapps\common\Galactic Civilizations III\data\English\Text directory) for the localized text for the components. However there is no need to actually edit these files as GalCiv3 will process any xml file found in these directories. As long as the structure is correct we can make mod files.

Choose a name for your mod and use this name for your file names. Create the files in the appropriate directories. Eg MyModShipComponentDefs.xml and MyModShipComponentDefsText.xml.

First the component file skeleton (to be created in the \data\Game directory):

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<ShipComponentList
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/ShipComponentDefs.xsd">
<!-- Augmentation to ShipComponentDefs.xml -->

<ShipComponent>
</ShipComponent>

</ShipComponentList>

Secondly the component text file skeleton (to be created in the \data\English\Text directory):

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<StringTableList
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../Schema/Lib/StringTable.xsd">
<!-- Augmentation to ShipComponentText.xml -->

<!-- Tech Names and Descriptions -->

<StringTable>
</StringTable>

</StringTableList>

The tags:

I will only discuss the tags of interest, the rest will be copies from a standard component.

<InternalName> defines the name by which the game internally references this component. Pick something unique.

<DisplayName> and <Description> are two links to the localization text file for the name and description as the player will see them.

<ArtDefine> Name of the graphical representation of the component. Do not muck about with this value, pick one that is already used by a component in the existing ShipComponentDefs.xml.

<Category> and <Type> are use by the ship designer to determine where in the component list this component belongs, and by the auto ship designer to determine of which blueprint component group this component is a member. Unless you are going to mess with the ship designer UI and the ship categories stay away from these and keep them at the standard values.

<OnePerShip> this field is rather clear in purpose. I have set it to true, because the game does not have a concept of defense augmentation it will think that the component is a standard defense component and will try to use it as such, and that behaviour is quite undesirable. By limiting the component usage to 1 this mitigates a potential problem.

<PlacementType> where the auto designer will place the component. We are building an augmentation component, so the placement is Augment.

<Stats> defines the costs and effects of the component. For the most i have changed the flat values to multiplier values and altered their values. But i have added a stats to consume a resource.

<Prerequ> defines what tech is needed before this component becomes available in the game. I picked InterstellarMining.

To keep this post short the actual implementation of the 3 components are shown in the replies.

General description of the net effect.

When the Durantium coating component is used in a ship design then: Armor manufacturing cost are increased by 400%, the combined mass of all armor components is increased by 5%, the total armor rating of the ship is increased by 50%, maintenance of the ship is increased by 75%, it costs 1 durantium to build the ship.

The other defenses are the same, except they use Elerium for shield augmentation and Anti matter for the point defense.

Equipping a ship with all three components makes the ship massively expensive. Resulting in a very strong ship, but you will be bleeding credits (not really a problem in the Beta).

16,283 views 6 replies
Reply #1 Top

The Durantium Coating ship component:

<ShipComponent>
<InternalName>DurantiumCoating</InternalName>
<DisplayName>DurantiumCoating_Name</DisplayName>
<Description>DurantiumCoating_Dec</Description>
<ArtDefine>Armor_01</ArtDefine>
<Category>Defenses</Category>
<OnePerShip>true</OnePerShip>
<Type>Armor</Type>
<PlacementType>Augment</PlacementType>
<DefenseFX>
<Armor>HullPlatingDefense</Armor>
</DefenseFX>
<Stats>
<EffectType>ArmorManufacturingCost</EffectType>
<Scope>Queue</Scope>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>4</Value>
</Stats>
<Stats>
<EffectType>ArmorMass</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.05</Value>
</Stats>
<Stats>
<EffectType>ArmorRating</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.5</Value>
</Stats>
<Stats>
<EffectType>DurantiumCost</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>1</Value>
</Stats>
<Stats>
<EffectType>Maintenance</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.75</Value>
</Stats>
<Prerequ>
<Techs>
<Option>InterstellarMining</Option>
</Techs>
</Prerequ>
</ShipComponent>

And the needed String table values:

<StringTable>
<Label>DurantiumCoating_Name</Label>
<String>Durantium Coating</String>
</StringTable>

<StringTable>
<Label>DurantiumCoating_Dec</Label>
<String>Increases your armor strength for some minor cost, just an arm and a leg.</String>
</StringTable>

Place these in the right files.

 

Reply #2 Top

The Elerium Booster:

<ShipComponent>
<InternalName>EleriumShieldBooster</InternalName>
<DisplayName>EleriumShieldBooster_Name</DisplayName>
<Description>EleriumShieldBooster_Dec</Description>
<ArtDefine>Shield_01</ArtDefine>
<Category>Defenses</Category>
<OnePerShip>true</OnePerShip>
<Type>Shields</Type>
<PlacementType>Augment</PlacementType>
<DefenseFX>
<Shield>DeflectorDefense</Shield>
</DefenseFX>
<Stats>
<EffectType>ShieldManufacturingCost</EffectType>
<Scope>Queue</Scope>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>4</Value>
</Stats>
<Stats>
<EffectType>ShieldMass</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.05</Value>
</Stats>
<Stats>
<EffectType>ShieldStrength</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.5</Value>
</Stats>
<Stats>
<EffectType>EleriumCost</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>1</Value>
</Stats>
<Stats>
<EffectType>Maintenance</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.75</Value>
</Stats>
<Prerequ>
<Techs>
<Option>InterstellarMining</Option>
</Techs>
</Prerequ>
</ShipComponent>

And the string values for the Elerium Booster:

<StringTable>
<Label>EleriumShieldBooster_Name</Label>
<String>Elerium Shield Booster</String>
</StringTable>

<StringTable>
<Label>EleriumShieldBooster_Dec</Label>
<String>By projecting the shield field through an Elerium liquid lens system its efficiency raises considerably.</String>
</StringTable>

 

Reply #3 Top

And finally the Anti Matter treatment:

<ShipComponent>
<InternalName>AntimatterTreatment</InternalName>
<DisplayName>AntimatterTreatment_Name</DisplayName>
<Description>AntimatterTreatment_Dec</Description>
<ArtDefine>Point_02</ArtDefine>
<Category>Defenses</Category>
<OnePerShip>true</OnePerShip>
<Type>PointDefense</Type>
<PlacementType>Augment</PlacementType>
<DefenseFX>
<Point>GenericPointDefense</Point>
</DefenseFX>
<Stats>
<EffectType>PointManufacturingCost</EffectType>
<Scope>Queue</Scope>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>4</Value>
</Stats>
<Stats>
<EffectType>PointMass</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.05</Value>
</Stats>
<Stats>
<EffectType>PointDefense</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.5</Value>
</Stats>
<Stats>
<EffectType>AntimatterCost</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>1</Value>
</Stats>
<Stats>
<EffectType>Maintenance</EffectType>
<Target>
<TargetType>Ship</TargetType>
</Target>
<BonusType>Multiplier</BonusType>
<Value>0.75</Value>
</Stats>
<Prerequ>
<Techs>
<Option>InterstellarMining</Option>
</Techs>
</Prerequ>
</ShipComponent>

And its strings:

<StringTable>
<Label>AntimatterTreatment_Name</Label>
<String>Anti matter treatment</String>
</StringTable>

<StringTable>
<Label>AntimatterTreatment_Dec</Label>
<String>Using anti matter to treat the inside of the barrels to harden them, allows our anti missile systems to fire heavier slugs.</String>
</StringTable>

 

Reply #4 Top

This is awesome. Thanks!

Can I open up notepad and copy and paste your format into it and drop it into the respective folder?

Reply #5 Top

very nice, I hadn't noticed the <OnePerShip> tag previously, that opens a lot of nifty doors. Nice write up.

Reply #6 Top

Quoting Larsenex, reply 4

Can I open up notepad and copy and paste your format into it and drop it into the respective folder?
End of Larsenex's quote

Yep, you should end up with two files, each in their respective folders. The ship component file should then have three Component definitions in it. And the ship component text file should have six StringTable elements in it.

Of course after this you will have to start a new game, because the xml files are only loaded on game creation.

Tell me how it works out, maybe the values still need some tweaking.