Creating new improvements.

I'am trying to design an upgrade for the durantium refinery, but the improvement appears in the list before the durantium refinery is built, and before the tech that allow the upgarde is discovered.

I did like for the Solar Power Plant with the preclusion in the basic durantium refinery.

Here is the xml:

Code: xml
  1. <!-- Begin Improvement -->
  2.  
  3.   <Improvement>
  4.     <InternalName>DurantiumRefinery</InternalName>
  5.     <DisplayName>DurantiumRefinery_Name</DisplayName>
  6.     <ShortDescription>DurantiumRefinery_ShortDec</ShortDescription>
  7.     <Description>DurantiumRefinery_Dec</Description>
  8.     <Icon>DurantiumRefinery.png</Icon>
  9.     <BuildIcon>DurantiumRefinery_Build.png</BuildIcon>
  10.     <ListIcon>DurantiumRefinery_Icon.png</ListIcon>
  11.     <ImprovementType>Manufacturing</ImprovementType>
  12.     <PlacementType>Manufacturing</PlacementType>
  13.     <IsColonyUnique>true</IsColonyUnique>
  14.  
  15.     <!-- Stats -->
  16.  
  17.     <Stats>
  18.       <EffectType>ManufacturingCost</EffectType>
  19.       <Scope>Queue</Scope>
  20.       <Target>
  21.         <TargetType>Improvement</TargetType>
  22.       </Target>
  23.       <BonusType>Flat</BonusType>
  24.       <Value>150</Value>
  25.     </Stats>
  26.  
  27.     <Stats>
  28.       <EffectType>MaxManufacturing</EffectType>
  29.       <Target>
  30.         <TargetType>Colony</TargetType>
  31.       </Target>
  32.       <BonusType>Flat</BonusType>
  33.       <Value>8</Value>
  34.     </Stats>
  35.  
  36.     <Stats>
  37.       <EffectType>DurantiumCost</EffectType>
  38.       <Target>
  39.         <TargetType>Improvement</TargetType>
  40.       </Target>
  41.       <BonusType>Flat</BonusType>
  42.       <Value>1</Value>
  43.     </Stats>
  44.  
  45.     <Stats>
  46.       <EffectType>Maintenance</EffectType>
  47.       <Target>
  48.         <TargetType>Improvement</TargetType>
  49.       </Target>
  50.       <BonusType>Flat</BonusType>
  51.       <Value>0.5</Value>
  52.     </Stats>
  53.  
  54.     <!-- Triggers -->
  55.  
  56.     <!-- Level Effect Trigers -->
  57.  
  58.     <!-- Level Effect Stats -->
  59.  
  60.     <LevelEffectStats>
  61.       <EffectType>MaxManufacturing</EffectType>
  62.       <Target>
  63.         <TargetType>Colony</TargetType>
  64.       </Target>
  65.       <BonusType>Flat</BonusType>
  66.       <Value>1</Value>
  67.     </LevelEffectStats>
  68.  
  69.     <!-- Adjacency Bonuses -->
  70.  
  71.     <NeighborBonuses>
  72.       <GiveBonusToNeighborType>Manufacturing</GiveBonusToNeighborType>
  73.       <NeighborBonusValue>2</NeighborBonusValue>
  74.     </NeighborBonuses>
  75.  
  76.     <!-- Prerequisites -->
  77.  
  78.     <Prerequ>
  79.       <Techs>
  80.         <Option>TechTree</Option>
  81.       </Techs>
  82.     </Prerequ>
  83.     <Preclusions>
  84.       <Improvement>DurantiumRefinery</Improvement>
  85.       <Improvement>MegaDurantiumRefinery</Improvement>
  86.     </Preclusions>
  87.  
  88.   </Improvement>
  89.  
  90. <!-- End Improvement -->
  91.  
  92. <!-- Begin Improvement -->
  93.  
  94.   <Improvement>
  95.     <InternalName>MegaDurantiumRefinery</InternalName>
  96.     <DisplayName>MegaDurantiumRefinery_Name</DisplayName>
  97.     <ShortDescription>MegaDurantiumRefinery_ShortDec</ShortDescription>
  98.     <Description>MegaDurantiumRefinery_Dec</Description>
  99.     <Icon>DurantiumRefinery.png</Icon>
  100.     <BuildIcon>DurantiumRefinery_Build.png</BuildIcon>
  101.     <ListIcon>DurantiumRefinery_Icon.png</ListIcon>
  102.     <ImprovementType>Manufacturing</ImprovementType>
  103.     <PlacementType>Manufacturing</PlacementType>
  104.     <IsColonyUnique>true</IsColonyUnique>
  105.  
  106.     <!-- Stats -->
  107.  
  108.     <Stats>
  109.       <EffectType>ManufacturingCost</EffectType>
  110.       <Scope>Queue</Scope>
  111.       <Target>
  112.         <TargetType>Improvement</TargetType>
  113.       </Target>
  114.       <BonusType>Flat</BonusType>
  115.       <Value>150</Value>
  116.     </Stats>
  117.  
  118.     <Stats>
  119.       <EffectType>MaxManufacturing</EffectType>
  120.       <Target>
  121.         <TargetType>Colony</TargetType>
  122.       </Target>
  123.       <BonusType>Flat</BonusType>
  124.       <Value>16</Value>
  125.     </Stats>
  126.  
  127.     <Stats>
  128.       <EffectType>DurantiumCost</EffectType>
  129.       <Target>
  130.         <TargetType>Improvement</TargetType>
  131.       </Target>
  132.       <BonusType>Flat</BonusType>
  133.       <Value>1</Value>
  134.     </Stats>
  135.  
  136.     <Stats>
  137.       <EffectType>Maintenance</EffectType>
  138.       <Target>
  139.         <TargetType>Improvement</TargetType>
  140.       </Target>
  141.       <BonusType>Flat</BonusType>
  142.       <Value>0.5</Value>
  143.     </Stats>
  144.  
  145.     <!-- Triggers -->
  146.  
  147.     <!-- Level Effect Trigers -->
  148.  
  149.     <!-- Level Effect Stats -->
  150.  
  151.     <LevelEffectStats>
  152.       <EffectType>MaxManufacturing</EffectType>
  153.       <Target>
  154.         <TargetType>Colony</TargetType>
  155.       </Target>
  156.       <BonusType>Flat</BonusType>
  157.       <Value>2</Value>
  158.     </LevelEffectStats>
  159.  
  160.     <!-- Adjacency Bonuses -->
  161.  
  162.     <NeighborBonuses>
  163.       <GiveBonusToNeighborType>Manufacturing</GiveBonusToNeighborType>
  164.       <NeighborBonusValue>2</NeighborBonusValue>
  165.     </NeighborBonuses>
  166.  
  167.     <!-- Prerequisites -->
  168.  
  169.     <Prerequ>
  170.       <Techs>
  171.         <Option>XenoManufacturingMethods</Option>
  172.       </Techs>
  173.       <UpgradesFrom>DurantiumRefinery</UpgradesFrom>
  174.     </Prerequ>
  175.  
  176.   </Improvement>
  177.  
  178. <!-- End Improvement -->
  179.  

8,918 views 6 replies
Reply #1 Top
  1.  <Prerequ>
  2.       <Techs>
  3.         <Option>TechTree</Option>
  4.       </Techs>
  5.     </Prerequ>
 
change TechTree to the "InternalName" of the Tech you want to unlock your Improvement
 
(TechTree is the starting point of the Tech tree, you cant see it ingame and it is already researched at the start,
meaning the Improvement is available from the start)
Reply #2 Top

In the xml I pasted, the first improvement is the basic durantium refinery, that should be available without any tech, so I think "TechTree" is correct. But I pasted it because this improvement seems to need to be modified with a preclusion, like for the solar power plant, that have a preclusion for the fusion power plant and the quantum power plant.

And the second improvement I pasted is the new building, the upgrade that should be available after researching the tech XenoManufacturingMethods. It isn't the InternalName of the tech, but the GenericName, in order to make the building available to all factions.

Reply #3 Top

Quoting Bertrand1234, reply 2

And the second improvement I pasted is the new building, the upgrade that should be available after researching the tech XenoManufacturingMethods. It isn't the InternalName of the tech, but the GenericName, in order to make the building available to all factions.
End of Bertrand1234's quote

Yep you'r right .

As for preclusions, you shouldnt need any for the durantium refinery, its a colony unique so no need to preclude itself and the MegaDurantiumRefinery is an upgrade

so precluding it does'nt make sense.

You should add an preclusion to the MegaDurantiumRefinery for the durantium refinery,

else you would be able to build another one after upgrading it.


As for the MegaDurantiumRefinery showing up greyed out, this seems to be a problem with the Durantium cost,

if you comment it out it works like it should, so its most likely a problem with the game.

Reply #4 Top

Thanks to have tested the improvement, I didn't thought to comment out the DurantiumCost. So I will have to wait and see if the problem is solved in the next versions of the game.

Reply #5 Top

Quoting Bertrand1234, reply 4

Thanks to have tested the improvement, I didn't thought to comment out the DurantiumCost. So I will have to wait and see if the problem is solved in the next versions of the game.
End of Bertrand1234's quote

 

If you haven't done it yet you should open a support ticket,

since this doesnt happen with the base game

(there are simply no upgrades to Improvements with Resource-Costs)

Reply #6 Top

Thanks, I didn't thought to it. So I submitted a ticket.