Logo Platform
logo amplifiers simplified

Disable already built construction?

Reply
Copied to clipboard!
7 years ago
Jul 30, 2018, 7:53:46 PM

Eng


Is it possible that a StarSystemImprovement is disabled once built, if a prerequisite is not met.

Example:
<InterpreterPrerequisite Flags="Prerequisite,Disable">Property(Context,@ClassColonizedStarSystem, NonMajorPopulationCount) ge 1</InterpreterPrerequisite>

This only disables it before construction, I want it to be even after construction.



--------------------------------------------------------------------------------------


Fr


Est t'il possible qu'un StarSystemImprovement soit désactivé une fois construit, si un pré-requis n'est pas satisfait.

Exemple:
<InterpreterPrerequisite Flags="Prerequisite,Disable">Property(Context,@ClassColonizedStarSystem, NonMajorPopulationCount) ge 1</InterpreterPrerequisite>

Cela ne le désactive qu'avant la construction, je veux que soit même après sa construction.

0Send private message
7 years ago
Aug 1, 2018, 10:57:36 AM

Hey Frozeur,


This is possible but requires doing weird stuff with BinaryModifiers:

Instead of just adding +5 dust on the system with a normal Modifier for example, you have to:

- Create a property HasNonMajorPopulation (which is equal to the non major population count, but its MaxValue is 1, so it's either 0 or 1) on the system

- Add a BinaryModifier which adds + 5 * HasNonMajorPopulation dust instead ! Note that since the property is on the system, it'll need to have SearchValueFromPath="true" to work properly.


However, the improvement won't be shown as "disabled" in the GUI, since this would have to be done in code.

0Send private message
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message