Logo Platform
logo amplifiers simplified

[SOLVED] PathPrerequisite does not work as expected

Reply
Copied to clipboard!
4 years ago
Aug 23, 2020, 8:45:13 AM

Hello all,


I know i come after the main waves of modders and even players but i hope someone will be able to help.


I created custom buildings, unlocked via technologies, to reduce inflation by 10%. 


<StarSystemImprovementDefinition Name="StarSystemImprovementDefinitionName" SubCategory="SubCategoryDust" ScoreProvider="StarSystemImprovementBuilt" OncePerWorld="true">
<SupervisorGain Name="Dust" />
<Cost ResourceName="SystemProduction">10</Cost>
<Cost ResourceName="Strategic3" Instant="true">1</Cost>
<Cost ResourceName="Strategic4" Instant="true">1</Cost>

<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">ClassColonizedStarSystem/StarSystemImprovementDefinitionName,!FastForwardedImprovement</PathPrerequisite>
<TechnologyPrerequisite Flags="Prerequisite,Discard,Technology">TechnologyExample2</TechnologyPrerequisite>
<SimulationDescriptorReference Name="DustReductorSD" />
<SimulationDescriptorReference Name="DustBuilding" />
<SimulationDescriptorReference Name="StarSystemImprovementUpkeepStage2Weak" />
<PopulationEvent Name="InflationReductorPopulationEvent"/>
</StarSystemImprovementDefinition>

Everything works as expected :

* The custom PopulationEvent i created

* The costs

* The technology prerequisite

* The effects of the building via the SimulationDescriptors


However, my problem is that this building can always be rebuilt in my star system (like ships for instance). I would expect that, once built, it's no longer available in the improvments buildable list of a star system, as any other simple building.


That's supposed to be the role of this prerequisite :

<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">ClassColonizedStarSystem/StarSystemImprovementDefinitionName,!FastForwardedImprovement</PathPrerequisite>


But does not behave as expected.


Would you have an idea ? 

Thanks !

Updated 4 years ago.
0Send private message
4 years ago
Aug 24, 2020, 9:23:35 PM

Found it.


In fact, in the PathPrerequisite element: 


<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">ClassColonizedStarSystem/StarSystemImprovementDefinitionName,!FastForwardedImprovement</PathPrerequisite>


It's not the name of the StarSystemImprovementDefinition that sould be checked but the name of the SimulationDescriptorReference triggered by construction.

In my exemple it was DustReductorSD 

0Send private message
?

Click here to login

Reply
Comment