Logo Platform
logo amplifiers simplified

Automated Governors / Supervisors

Reply
Copied to clipboard!
7 years ago
Feb 25, 2018, 1:00:17 PM

Hi.


I have tried to solve some of the many problems we have with automated governors/supervisors.


My solutions are explained below.


These are, of course, suboptimal solutions and I still don´t understand why there is so few attention on this topic, since the late game micromanagement in huge galaxies kills me.


No sign from the developers either.


I guess since in late games in huge galaxies you already have a booming economy, many players take care only of the core planets and couldn´t care less of the very bad management of newly conquered/colonized planets, leaving them in the very useless and incapable hands of the Automated Governor/Supervisor.


That is not my case. It also get tricky if you choose to have very few strategic resources in the galaxy, like I do.



There are some things that I have not been able to do and, of course, don´t understand why because by any means they should work. I report them below.


Anyway, let´s analize some of the problems/solutions:



  • PROBLEM: Automated Supervisors get stuck with infinite resource Science/Dust projects


Automated supervisors have the ability to put things in queue, but seem not to have the ability to take them away from the queue. That´s why they get stuck.


Of course I guess there is a reason behind this choice. If you give a manual building order, to a planet that is already automated, to, say, build a ship, it will build it and then go back to automated building. If the automated supervisor could take things off the queue, it would override also your commands. This, of course, can olny be solved by the developers... 


Solution:

You may simply take them away from the automated supervisor deleting the corresponding "SupervisorGain" from "StarSystemImprovementIndustryToScience" building, in the file "ConstructibleElement_Industry[StarSystemImprovement]". Your automated supervisors will not be able to build them (and therefore won´t get stuck).


Of course I said before this is suboptimal, because they will simply never use these projects. Where there is no "SupervisorGain" they can´t build.


Since the actual AI Players seem to use another specific gain "AIGain", this will not influence their building



  • PROBLEM: Automated Supervisors build unique improvements on planets where you don´t want to


Solution:

Pretty same as above. Take away the "SupervisorGain" from the unique improvements... et voilá. Only you can manually build them.



  • PROBLEM: Automated Supervisors override Planetary specializations. For example Food Supervisor builds food planetary specializations everywhere, even on hot planets where you would build Industry specialization or where you have strategic resources where you would build slug and sludge centers.


Solution:

This is very customizable. And it has to do with limiting the choices of what specialization can be built where. Of course you may try also simply to use a more balanced Automated Supervisor (for example, the MOD "Balanced Automation Policy" by  (it´s not a mistype, it´s his/her actual nickname, better search for the mod´s name in the workshop)), but it doesn´t work fine enough for me.


And you have surely noticed that Automated Supervisors NEVER build strategic resources exploitation (i.e. slug and sludge centers etc.)


So, two-step solutions: first part resolve normal specializations, second part make the AI Supervisor build strategic resource specialization where you have strategic resources.


First Step:


You must limit the type of specialization for planets. Let´s say for example that on HOT planets you (and the Automated Supervisor) can ONLY build Industry Specialization.

I will show this only for the first technologylevel, but of course you will get it.


So, in the file "ConstructibleElement_Industry[PlanetaryImprovements]", you may change this:


<!-- Industry -->
<PlanetImprovementDefinition Name="PlanetImprovementIndustry1" SubCategory="PlanetImprovementIndustry" ScoreProvider="PlanetImprovementBuilt">
<SupervisorGain Name="Industry" Weight="1"/>  
<Cost ResourceName="SystemProduction">160</Cost>
<TechnologyPrerequisite Flags="Prerequisite,Discard,Technology">TechnologyIndustry3Alt</TechnologyPrerequisite>
<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">../ClassEmpire/ClassResearch,TechnologyStrategicDeposit3Alt</PathPrerequisite>
<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">../ClassEmpire/ClassResearch,TechnologyUnknown</PathPrerequisite>
<PathPrerequisite       Inverted="true" Flags="Prerequisite,Discard">ClassColonizedPlanet/PlanetImprovementIndustry1,!FastForwardedImprovement</PathPrerequisite>
<PathPrerequisite   Inverted="false" Flags="Prerequisite,Discard">./ColonizedStarSystemStateColony</PathPrerequisite>
<SimulationDescriptorReference Name="PlanetImprovementIndustry1" />
<PopulationEvent Name="PopulationPoliticalEventPlanetaryImprovementIndustry1"/>
<NextUpgradeName>PlanetImprovementIndustry2</NextUpgradeName>    
</PlanetImprovementDefinition>


ADDING THESE PREREQUISITES:


<!-- Industry -->
<PlanetImprovementDefinition Name="PlanetImprovementIndustry1" SubCategory="PlanetImprovementIndustry" ScoreProvider="PlanetImprovementBuilt">
<SupervisorGain Name="Industry" Weight="1"/>  
<Cost ResourceName="SystemProduction">160</Cost>
<TechnologyPrerequisite Flags="Prerequisite,Discard,Technology">TechnologyIndustry3Alt</TechnologyPrerequisite>
<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">../ClassEmpire/ClassResearch,TechnologyStrategicDeposit3Alt</PathPrerequisite>
<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">../ClassEmpire/ClassResearch,TechnologyUnknown</PathPrerequisite>
<PathPrerequisite       Inverted="true" Flags="Prerequisite,Discard">ClassColonizedPlanet/PlanetImprovementIndustry1,!FastForwardedImprovement</PathPrerequisite>


<MetaPrerequisite Operator="Or">
<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetGameplayTypeHot</PathPrerequisite>
<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetTypeGasHot</PathPrerequisite>
<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetTypeGasBurning</PathPrerequisite>
</MetaPrerequisite>


<PathPrerequisite   Inverted="false" Flags="Prerequisite,Discard">./ColonizedStarSystemStateColony</PathPrerequisite>
<SimulationDescriptorReference Name="PlanetImprovementIndustry1" />
<PopulationEvent Name="PopulationPoliticalEventPlanetaryImprovementIndustry1"/>
<NextUpgradeName>PlanetImprovementIndustry2</NextUpgradeName>    
</PlanetImprovementDefinition>



NOTE: this means that ALSO THE PLAYER AND WILL NOT BE ABLE to build this specialization on any other type of planet that is not listed (Cold, Temperate planets, for example),  (unless it adds them, but then it breaks the purpose)

And if he uses the same principle for the other specializations, will be UNABLE to build any other type of specialization on HOT Planets/Gas Hot/Gas Burning, etc.


AGAIN, it´s a SUBOPTIMAL solution, but it works well for me. Much better than having food specialization everywhere.



Second Step:


Now, for planets with Strategic Resources the above is not enough. There is no SupervisorGain, so the Supervisors are not allowed to build them. So you have to add a new SupervisorGain, let´s call it "Resource", and then give it an override (using a high weight) in your customized Supervisor list:



<!-- Resources -->
<PlanetImprovementDefinition Name="PlanetImprovementResource1" SubCategory="PlanetImprovementResourceExtractor" ScoreProvider="PlanetImprovementBuilt">


<SupervisorGain Name="Resource"/>


<Cost ResourceName="SystemProduction">160</Cost>
<TechnologyPrerequisite Flags="Prerequisite,Discard,Technology">TechnologyIndToScienceAlt</TechnologyPrerequisite>
<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">../ClassEmpire/ClassResearch,TechnologyIndToScience2Alt</PathPrerequisite>
<PathPrerequisite Inverted="true" Flags="Prerequisite,Discard">../ClassEmpire/ClassResearch,TechnologyUnknown</PathPrerequisite>
<PathPrerequisite Inverted="false" Flags="Prerequisite,Discard">ClassColonizedPlanet/ClassResourceDeposit, ResourceTypeStrategic</PathPrerequisite>
<PathPrerequisite       Inverted="true" Flags="Prerequisite,Discard">ClassColonizedPlanet/PlanetImprovementResource1,!FastForwardedImprovement</PathPrerequisite>
<PathPrerequisite   Inverted="false" Flags="Prerequisite,Discard">./ColonizedStarSystemStateColony</PathPrerequisite>
<SimulationDescriptorReference Name="PlanetImprovementResource1" />
<PopulationEvent Name="PopulationPoliticalEventPlanetImprovementResource1"/>
<NextUpgradeName>PlanetImprovementResource2</NextUpgradeName>
</PlanetImprovementDefinition>


And then add it in your customized Supervisor (File "SystemSupervisorDefinitions") with a heavy gain:


<!-- INDUSTRY -->
<SystemSupervisorDefinition Name="SystemSupervisorIndustry">
<Policy CanQueueConstructions="true" CanMovePopulations="true"/>
<Gains>
<Gain Name="Food"      Weight="0.3"/>
<Gain Name="Approval"  Weight="0.1"/>
<Gain Name="Industry"  Weight="2.0"/>
<Gain Name="Dust"      Weight="0.2"/>
<Gain Name="Science"   Weight="0.1"/>
<Gain Name="Prestige"  Weight="0.1"/>
<Gain Name="Military"  Weight="0.1"/>


<Gain Name="Resource"  Weight="3"/>


</Gains>
</SystemSupervisorDefinition>



This way he´ll always choose to build a resource extractor over food, industry, etc.


Suboptimal: when in late game level 1 strategic resources became abundant, automated supervisors will still build strategic extractors even if the resource is at maximum limit.



  • PROBLEM: Automated Supervisors get stuck and simply build nothing, their queue is empty.

This happens because they want to queue some improvement that USES STRATEGIC RESOURCES to be built, and you are lacking them.



Solution:

You can add other types of "SupervisorGain". Let´s say that you want a better control of all food improvements that cost some strategic resource to build. You may change the <SupervisorGain Name="Food" Weight="1"/> for example in "ConstructibleElement_Industry[StarSystemImprovement]" with: <SupervisorGain Name="FoodStrategic" Weight="1"/>.


Then you have to add to your supervisor of choice the line: <Gain Name="FoodStrategic"      Weight="1"/> (of course the Weights are of your choice)


You can add a new supervisor or use, again, the MOD "Balanced Automation Policy" and customize it.


So you can use a "normal" supervisor for some planets and your "customized" supervisor for Core/Important planets where you may allow these buildings to be automated and consume precious strategic resources (but only when you have them, otherwise the Supervisor will get stuck and wait until you gather enough of them).


0Send private message
7 years ago
Feb 25, 2018, 8:26:44 PM

Sorry, I have to make a correction.


It seems I messed up with the <MetaPrerequisite Operator="Or">


It doesn´t work properly (or, at all).


So far, until now, I am able to give only a single condition for planet improvements:


Es.


<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetGameplayTypeHot</PathPrerequisite> for industry


<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetGameplayTypeCold</PathPrerequisite> for science


<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetGameplayTypeTeeming</PathPrerequisite> for food


<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetGameplayTypeMeager</PathPrerequisite> for dust


and so on...

0Send private message
7 years ago
Feb 26, 2018, 3:41:12 AM

Nice post. I don't plan on modding this but I was curious how it was done. Did fiddle with governor/supervisors back in ES1...

0Send private message
7 years ago
Feb 26, 2018, 10:16:24 AM

Hey folks,


System supervisors can't explore curiosities or terraform planets because this is not implemented in code.

I talked about it with the GDs and producers and I now have the task to add the feature, sometime in the future.

Updated 7 years ago.
0Send private message
7 years ago
Feb 26, 2018, 7:20:58 PM
MonAmiral wrote:

Hey folks,


System supervisors can't explore curiosities or terraform planets because this is not implemented in code.

I talked about it with the GDs and producers and I now have the task to add the feature, sometime in the future.

MonAmiral, many thanks for your reply and clarification. At least I´ll not bang my head against the wall.


But, please let me ask you a bit of additional help. It woul help me a great deal if you could help me with the syntax of the construct <MetaPrerequisite Operator


I have tried without success to use it for an "OR" condition to determine which kind of planets can build, for example, Industry Improvements and use more than just one Prerequisite.


If I use just the line: 


<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetGameplayTypeHot</PathPrerequisite>


It works fine, but it will leave out Gas Giants for example (Hot or Burning) that are PlanetGameplayTypeGas. So I tried the following:


<MetaPrerequisite Operator="Or">
<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetGameplayTypeHot</PathPrerequisite>
<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetTypeGasHot</PathPrerequisite>
<PathPrerequisite Inverted="false"  Flags="Prerequisite,Discard">ClassPlanet, PlanetTypeGasBurning</PathPrerequisite>
</MetaPrerequisite>


But to my shame I realized, after posting it, that it was not functioning as I believed it was. My mistake. I´ll be more careful in the future.


Actually, this does not function at all and produces NO Prerequisite. If I use it, it is ignored and ALL kind of Planets are Prerequisite.


I have tried everything (inverted "Or" with "And", take Inverted Away, Use only Prerequisite Flag...) but I am like that story of some blind men trying to describe an elephant. No clue...


Many thanks anyway.


0Send private message
7 years ago
Feb 27, 2018, 9:01:12 AM

Your prerequisite construction is valid, the issue lies in the Flags: the MetaPrerequisite overrides the Flags of its children prerequisites, and in your case, it simply erases them.

The solution is to write the first line as following:

<MetaPrerequisite Operator="Or" Flags="Prerequisite,Discard">


The Flags can be used to check whether a Prerequisite must be checked or not (eg. if the flags contain 'Prerequisite'), if the constructible/item must be hidden or not (if the prerequisite is failed and the Flags contain 'Discard'), and other things. This changes all the time, depending on the situation.


In the case of system & planet constructibles, these flags are checked as following:

- 'Enqueue' is checked when the constructible is in the list, to see if it can be queued.

- 'Prerequisite' is checked when the constructible is in the list and is in the queue, to see if it can continue and be completed.

- 'Discard' is used to hide a constructible if the prerequisite is failed.

0Send private message
7 years ago
Feb 27, 2018, 9:56:09 PM
MonAmiral wrote:

Your prerequisite construction is valid, the issue lies in the Flags: the MetaPrerequisite overrides the Flags of its children prerequisites, and in your case, it simply erases them.

The solution is to write the first line as following:

<MetaPrerequisite Operator="Or" Flags="Prerequisite,Discard">


The Flags can be used to check whether a Prerequisite must be checked or not (eg. if the flags contain 'Prerequisite'), if the constructible/item must be hidden or not (if the prerequisite is failed and the Flags contain 'Discard'), and other things. This changes all the time, depending on the situation.


In the case of system & planet constructibles, these flags are checked as following:

- 'Enqueue' is checked when the constructible is in the list, to see if it can be queued.

- 'Prerequisite' is checked when the constructible is in the list and is in the queue, to see if it can continue and be completed.

- 'Discard' is used to hide a constructible if the prerequisite is failed.

MonAmiral, many thanks for your help!!


Very kind of you. I do appreciate that you take your time to reply and help us.


My Automated Supervisors thank you too!




0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message