Logo Platform
logo amplifiers simplified

Population Transformation Improvement Not Viewable In Construction Queue

Reply
Copied to clipboard!
7 years ago
Dec 6, 2017, 12:31:19 AM

Hey all,


I implemented some buildings unlockable by a few added researches so I thought I'd get my hands dirty with some different improvement types to see what other cool stuff could be done. So my current target turned into a <StarSystemPopulationTransformImprovementDefinition> addition (in essence it seems like the thing that lets you manipulate populations through the construction queue). I followed the near same proceedure as the Riftborn buildable population but I can't seem to get it to show up in the construction queue. I even attempted extending the standard Riftborn population construction to be more open to other races (as a test), but it doesnt seem to propigate/load.


I've been working at figuring it out for a while now but still pretty new to this, so its most likely something silly and simple that I've missed!


Here are the files I have and what's in each one:

     -Mod.xml: the <plugins> file, with links to the IndustryConstructibleElement/StarSystemPopulationTransformImprovementDefinition extra data type.

<DatabasePlugin DataType="IndustryConstructibleElement, Assembly-CSharp">
  <ExtraTypes>
    <ExtraType DataType="StarSystemImprovementDefinition, Assembly-CSharp" />
    <ExtraType DataType="StarSystemPopulationTransformImprovementDefinition, Assembly-CSharp" />
  </ExtraTypes>
  <FilePath>Simulation/ConstructibleElementDefinitions.xml</FilePath>
</DatabasePlugin>


     -ConstructableElementDefinitions.xml: location for the flesh of the improvement code, also contains some other building definitions.

<StarSystemPopulationTransformImprovementDefinition  
    Name="StarSystemImprovementCreateRobotPopulation"
    SubCategory="SubCategoryPopulation"
    ScoreProvider="StarSystemImprovementBuilt"
    PopulationDestination="Major"  
    PopulationToTransformCount="1"
    CreateIfNotAvailable="true"
    ConsumeResourceSurplus="true"

>
  <Tags>NoBuyout</Tags>
       
  <QueuedSimulationDescriptorReference Name="QueuedDescriptorIncreaseVirtualPopulation"/> 
//piggybacking off the riftborn code atm
       
  <CustomCost ResourceName="SystemProduction">(150 + Property(StockLocation,@ClassColonizedStarSystem,MajorPopulationCount) * 100) * Property(StockLocation, @../ClassEmpire, GameSpeedMultiplier, true)</CustomCost>
//cost is based on the current population size
       
  <TechnologyPrerequisite Flags="Prerequisite,Discard,Technology">TechnologyAC1</TechnologyPrerequisite> 
//requires one of my added techs
       
   <PathPrerequisite Flags="Prerequisite,Discard">ColonizedStarSystemStateColony</PathPrerequisite> 
//requires at least a colony
       

//queue checks (when the construction enters queue/next queue)
  <InterpreterPrerequisite Flags="Enqueue"> <!-- On Queue: Check (current population + to-be-constructed pop) is less or equal than the max population -->
            (Property(Context,@ClassColonizedStarSystem, MaximumPopulation) ge (1 + Property(Context,@ClassColonizedStarSystem, Population)))
  </InterpreterPrerequisite>
  <InterpreterPrerequisite Flags="Prerequisite"> <!-- Before Queue: Check there is at least 1 slot available for another population -->
            (Property(Context,@ClassColonizedStarSystem, MaximumPopulation) ge (Property(Context,@ClassColonizedStarSystem, Population)))
  </InterpreterPrerequisite>
       
  <SimulationDescriptorReference Name="StarSystemImprovementCreateRobotPopulation"/>
</StarSystemPopulationTransformImprovementDefinition>


-SimulationDescriptors.xml: tag for the construction task

<SimulationDescriptor Name="StarSystemImprovementCreateRobotPopulation"  Type="StarSystemImprovement"/>


     -Localization.xml: title/description flavor text

     -GuiElements.xml: links for gui display of the construction/display of flavor text


With these files I can't get the construction piece to show up anywhere (not in the queue or in the research as an unlock piece), but if its type gets changed to a <StarSystemImprovementDefinition> it gets loaded in properly (of course if it is a standard system improvement i can't really manipulate pops all that well). 


Does anyone know what I am doing wrong or what I am missing?

Any help would be much appreciated!




0Send private message
7 years ago
Dec 6, 2017, 12:55:06 AM

Can you (or do you plan on) putting it up on the Steam Workshop? I could download it and look over it in the morning if you'd like.

0Send private message
7 years ago
Dec 9, 2017, 10:04:36 PM

Just had another look at it this morning and realized I was making the changes to my backup files! xD


Everything seems to be working fine now! :3

0Send private message
?

Click here to login

Reply
Comment