Consulate Help

Can't figure this out

I'm making a mod that borrows from the Krynn tech tree pretty heavily but for the life of my I cannot figure out why the consulate is still being called Krynn Consulate.  Can someone tell me where I can find the information on how to alter this in the XML files? I'm assuming its tech rename I'm missing but I've been going crazy for two days on this.

5,692 views 5 replies
Reply #1 Top

The names and descriptions of techs, improvements, ship components, etc., and their actual ingame values are split into two files. The XML-files under Data\Game only contain the game-values, along with referential which the game looks up in the corresponding XML-files under Data\English\Text to find the actual names and description. In case of the Krynn Consulate building, you'd have to look at the ImprovementText.xml.

I hope this helps.

Reply #2 Top

I have done so but it still links back to Krynn Consulate instead of my race Consulate.

Reply #3 Top

Could you please post the code for your Consulate? Maybe I can see what is wrong with it.

Reply #4 Top

Near as I can tell the tree starts here...

 

This is in TechDefs.xml

<Tech>
    <InternalName>VargasilConversionTech</InternalName>
    <GenericName>ConversionTech</GenericName>
    <DisplayName>VargasilConversionTech_Name</DisplayName>
    <TechTree>Vargasil_Tree</TechTree>
    <ShortDescription>VargasilConversionTech_ShortDec</ShortDescription>
    <Description>VargasilConversionTech_Dec</Description>
    <ColorDef>TechYellow</ColorDef>
    <Icon>GC3_Planetary_Defense_Icon.png</Icon>
    <Bink>GC3_Planetary_Defense_Temp.bk2</Bink>
    <ResearchCost>0</ResearchCost>
    <TechPoints>0</TechPoints>
    <Tags>NonMilitary</Tags>
    <AICategoryWeight>
      <Military>8</Military>
      <Growth>14</Growth>
      <Tech>6</Tech>
      <Diplomacy>18</Diplomacy>
      <Expansion>10</Expansion>
      <Wealth>16</Wealth>
      <Influence>20</Influence>
      <Fortification>12</Fortification>
    </AICategoryWeight>
    <Prerequ>
      <Techs>
        <Option>TechTree</Option>
      </Techs>
    </Prerequ>
  </Tech>

Reply #5 Top

Shouldn't that be in the race-specific tech tree (e.g. VargasilTechDefs.xml) instead of the general TechDefs.xml? At least, that's how it is for the corresponding Krynn tech. Other than that, it looks fine to me. Just make sure that the DisplayName and the Descriptions are defined somewhere (e.g., VargasilTechDefsText.xml).

The Krynn Consulate improvement has "ConversionTech" as tech requirement, which is the GenericName of both your tech and the Krynn original. I can see two ways for you to fix this:

1. Change the DisplayName of the Krynn Consulate in the ImprovementText.xml to something more generic.

2. Make your own version of the Krynn Consulate. To do this, you need to change the GenericName of your tech to something else (so it doesn't unlock the standard Krynn Consulate anymore), make a copy of the Krynn Consulate with this new tech as the requirement, and define new entries for the DisplayName and Descriptions of the improvement in the ImprovementText.xml. The new improvement would look something like this:

<Improvement>
  <InternalName>VargasilConsulate</InternalName>
  <DisplayName>VargasilConsulate_Name</DisplayName>
  <ShortDescription>VargasilConsulate_ShortDec</ShortDescription>
  <Description>VargasilConsulate_Dec</Description>
  <Icon>KrynnConsulate.png</Icon>
  <BuildIcon>KrynnConsulate_Build.png</BuildIcon>
  <ListIcon>KrynnConsulate_Icon.png</ListIcon>
  <ImprovementType>Influence</ImprovementType>
  <SecondaryType>Approval</SecondaryType>
  <PlacementType>Influence</PlacementType>
  <IsColonyUnique>true</IsColonyUnique>

<!-- Stats -->

<Stats>
  <EffectType>ManufacturingCost</EffectType>
  <Scope>Queue</Scope>
  <Target>
    <TargetType>Improvement</TargetType>
  </Target>
  <BonusType>Flat</BonusType>
  <Value>30</Value>
</Stats>

<Stats>
  <EffectType>GoodsAndServices</EffectType>
  <Target>
    <TargetType>Colony</TargetType>
  </Target>
  <BonusType>Multiplier</BonusType>
  <Value>0.25</Value>
</Stats>

<Stats>
  <EffectType>InfluencePerTurn</EffectType>
  <Target>
    <TargetType>Colony</TargetType>
  </Target>
  <BonusType>Multiplier</BonusType>
  <Value>0.1</Value>
</Stats>

<Stats>
  <EffectType>Maintenance</EffectType>
  <Target>
    <TargetType>Improvement</TargetType>
  </Target>
  <BonusType>Flat</BonusType>
  <Value>0.25</Value>
</Stats>

<!-- Triggers -->

<!-- Level Effect Trigers -->

<!-- Level Effect Stats -->

<LevelEffectStats>
  <EffectType>GoodsAndServices</EffectType>
  <Target>
    <TargetType>Colony</TargetType>
  </Target>
  <BonusType>Flat</BonusType>
  <Value>1</Value>
</LevelEffectStats>

<LevelEffectStats>
  <EffectType>InfluencePerTurn</EffectType>
  <Target>
    <TargetType>Colony</TargetType>
  </Target>
  <BonusType>Multiplier</BonusType>
  <Value>0.05</Value>
</LevelEffectStats>

<!-- Adjacency Bonuses -->

<NeighborBonuses>
  <GiveBonusToNeighborType>Approval</GiveBonusToNeighborType>
  <NeighborBonusValue>1</NeighborBonusValue>
</NeighborBonuses>

<NeighborBonuses>
  <GiveBonusToNeighborType>Influence</GiveBonusToNeighborType>
  <NeighborBonusValue>1</NeighborBonusValue>
</NeighborBonuses>

<!-- Prerequisites -->

<Prerequ>
  <Techs>
    <Option>VargasilConversionTech</Option>
  </Techs>
</Prerequ>

</Improvement>