Logo Platform
logo amplifiers simplified

Adding Genetic Alteration Lab to custom race tech tree

Reply
Copied to clipboard!
7 years ago
Mar 15, 2018, 2:44:14 PM

I want to make MOD that add Genetic Alteration Lab technology to custom race based on UE. I do not want custom to have Gene Hunter affinity, just access in tech tree to Genetic Alteration Lab. 


I read lot of threads here but I really do not know where to start or what direction to go. So if you can help me with advices and tips please!


Note: Top of my programing knowledge is programing of Rainmeter skins and editing ini files in Civilization.

0Send private message
7 years ago
Mar 16, 2018, 9:18:34 AM

Hey Greyswandir!


If you want a technology to unlock the Horatio gameplay, it is possible:

- Select a technology you want it to be linked to:

   - An existing technology: find it in the game's files (ES2 install folder/Public/Simulation/ConstructibleElements_Science[...].xml) and look for which SimulationDescriptorReference it has which is not present in any other technology, it'll be used for the next step.

   - A new technology that you add in the mod: you'll have to create a new TechnologyDefinition, the SimulationDescriptor corresponding to the SimulationDescriptorReference you add in the definition, and a GuiElement, which links the XML thing to its 'readable' name, icon and stuff like that.

- Create an EmpireImprovement whose TechnologyPrerequisite contains the name of the SimulationDescriptorReference of your technology, so that when the technology is unlocked, the empire improvement is applied on the empire. Create a GuiElement for the EmpireImprovement, too.

- Create a SimulationDescriptor and reference it in the SimulationDescriptorReferences of the EmpireImprovement.

- In this SimulationDescriptor, add a Modifier which increases the value of the property HasAffinityGeneHunter on the empire. This will unlock the Horatio gameplay.

- Finally, add localization in at least one language (not necessarily english, but most players speak english).



I'd suggest installing Spyboy's Hyper-Productive Population and Food late-game Rework mod and looking at how it is structured, as it adds everything I talked about:

- Technologies (TechnologyDefinition) are defined in Simulation/ConstructibleElement_Science.xml

- Empire improvements (EmpireImprovementDefinition) are defined in Simulation/EmpireImprovements.xml

- Simulation descriptors (SimulationDescriptor & SimulationDescriptorReference) are defined in Simulation/SimulationDescriptors.xml

- GuiElements are defined in Gui/GuiElements.xml

Once downloaded, the mod will be located in Steam/steamapps/workshop/content/392110/1306068192.

0Send private message
0Send private message
7 years ago
Mar 16, 2018, 3:25:23 PM
MonAmiral wrote:

Hey Greyswandir!


If you want a technology to unlock the Horatio gameplay, it is possible:

- Select a technology you want it to be linked to:

   - An existing technology: find it in the game's files (ES2 install folder/Public/Simulation/ConstructibleElements_Science[...].xml) and look for which SimulationDescriptorReference it has which is not present in any other technology, it'll be used for the next step.

   - A new technology that you add in the mod: you'll have to create a new TechnologyDefinition, the SimulationDescriptor corresponding to the SimulationDescriptorReference you add in the definition, and a GuiElement, which links the XML thing to its 'readable' name, icon and stuff like that.

- Create an EmpireImprovement whose TechnologyPrerequisite contains the name of the SimulationDescriptorReference of your technology, so that when the technology is unlocked, the empire improvement is applied on the empire. Create a GuiElement for the EmpireImprovement, too.

- Create a SimulationDescriptor and reference it in the SimulationDescriptorReferences of the EmpireImprovement.

- In this SimulationDescriptor, add a Modifier which increases the value of the property HasAffinityGeneHunter on the empire. This will unlock the Horatio gameplay.

- Finally, add localization in at least one language (not necessarily english, but most players speak english).



I'd suggest installing Spyboy's Hyper-Productive Population and Food late-game Rework mod and looking at how it is structured, as it adds everything I talked about:

- Technologies (TechnologyDefinition) are defined in Simulation/ConstructibleElement_Science.xml

- Empire improvements (EmpireImprovementDefinition) are defined in Simulation/EmpireImprovements.xml

- Simulation descriptors (SimulationDescriptor & SimulationDescriptorReference) are defined in Simulation/SimulationDescriptors.xml

- GuiElements are defined in Gui/GuiElements.xml

Once downloaded, the mod will be located in Steam/steamapps/workshop/content/392110/1306068192.

I found it... 

 <TechnologyDefinition Name="TechnologyDefinitionUnique1Horatio" TechnologyStage="TechnologyStageDefinitionEmpireDevelopment2" Category="CategoryTechnologyFactionHoratio" SubCategoryInQuests="TechnoEmpireDevelopment"  ScoreProvider="TechnologyUnlocked" TechnologyFlags="Affinity">
<Tags>NoOmniscience</Tags>
<CustomCost ResourceName="EmpireResearch">Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCurrentCost) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCostStage2Multiplier) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCostQuadrantEmpireDevelopmentMultiplier)</CustomCost>
<PathPrerequisite Flags="Prerequisite,Discard,DiplomaticTradable,Faction,AffinityHoratio">ClassEmpire,AffinityMappingHoratio</PathPrerequisite>
<SimulationDescriptorReference Name="TechnologyCountEmpireDevelopmentIncreaseStage2"/>
<SimulationDescriptorReference Name="TechnologyHull2Horatio"/>
<SimulationDescriptorReference Name="TechnologyHull3Horatio"/>
<SimulationDescriptorReference Name="TechnologyHull3"/>
<SimulationDescriptorReference Name="TechnologyHull2"/>
<SimulationDescriptorReference Name="TechnologyMilitaryGameplay"/>
<SimulationDescriptorReference Name="TechnologyCounter"/>
<PopulationEvent Name="PopulationPoliticalEventMilitaristTechnology"/>

And Simulation Decriptor Reference name is same like for all uinque tech for all races... so I am stuck... 

I think it is TechnologyCounter the one that I need, but I can't trace it in any of .xml files to get something useful... in meaning that I can't find info to replace Spyboy's code in custom tech "ConstructibleElement_Science.xml" file. (i mean can edit names in this file but I am missing key info about particular Genetic Alteration Lab, and connected "building")


<TechnologyDefinition Name="TechnologySuperPop1" TechnologyStage="TechnologyStageDefinitionEmpireDevelopment3" Category="CategoryTechnologyEmpireDevelopment" ScoreProvider="TechnologyUnlocked" Visibility="Visible">
<Tags>NoOmniscience</Tags>
<CustomCost ResourceName="EmpireResearch">Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCurrentCost) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCostStage3Multiplier) * Property(StockLocation,@'ClassEmpire/ClassResearch', TechnologyCostQuadrantEmpireDevelopmentMultiplier)</CustomCost>
<PathPrerequisite Flags="Prerequisite,Discard,DiplomaticTradable" Inverted="true">ClassEmpire,AffinityMappingVampirilis</PathPrerequisite>
<PathPrerequisite Flags="Prerequisite,Discard,DiplomaticTradable" Inverted="true">ClassEmpire,AffinityMappingTimeLords</PathPrerequisite>
<SimulationDescriptorReference Name="TechnologySuperPop1"/>
<PopulationEvent Name="PopulationPoliticalEventEcologistTechnology"/>
</TechnologyDefinition>


0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message