The following provides some examples on how you can achieve certain goals with Governors. They also serve to get a better understanding of how Governors work, and can be used as a foundation to write more complex Governors. Full examples of these (and simple ones too), may be found in the Player Guides.
Say you want your population to always be distributed as 30% Farmers, 50% Workers and the remainder (20%) should be assigned to Scientists.
1. Convert Citizens to Farmers
2. If Number of Farmers is higher than 30% of Population Count
Convert Farmers to Workers
3. If Number of Workers is higher than 50% of Population Count
Convert Workers to Scientists
The first rule plays a special role: it makes sure that however the citizens are assigned before the Governor is run, they will all be converted to Farmers regardless. This produces a “clean slate”, and makes sure the following rules produces the desired result. Not having such a fresh starting point will eventually mix up your citizens something awful (as each turn passes), so it’s highly recommended that you somehow ‘re-set’ the population before starting the actual destribution.
Since food is lost when the Civilian Food-Storage (the ‘food-bar’) is full, a common Governor detail has arisen to minimize this loss: Controlled Starving.
Note that these rules are only applicable to planets that are fully populated, since a full ‘food-bar’ on non-maxed planets results in planet growth (and we want that).
1. Make sure enough Farmers are assigned to sustain its planets population
2. While number of Citizens is equal to 100% of Population Limit and
While Population Growth Progress is higher than 20%
Convert a Farmer to a Worker
Rule 1 sets enough Farmers to sustain your population. In almost all cases this will give you a surplus, usually small. If it does not do not worry, the next rule won’t process anyways. If you are under 100% of your population limit you need another rule(preferably above these rules) that will ensure growth on your planet. These rules will not interfere with those rules so there should be no problems.
Rule 2 will convert those farmers to workers if your food storage box is more than 20% full. This way whenever you reach that threshold you will consume some food, get a little production boost, and never fill your food storage box up all the way. In case you were wondering there is no benefit to a full food box after you reach maximum population.
The rule ‘Set Recruitment Rate to 10%’ is used to make military units. When set to 10%, 10% of all sur-plus food will go into training a new military unit.
This example is for fully populated planets.
1. If number of Citizens is equal to 100% of Population Limit
--- Set Recruitment Rate to 100%
2. --- If number of Stationed Military is lower than 8
--- --- Stop processing rules
3. --- If currently no production
--- --- Stop processing rules
4. --- Convert all Citizens to Workers
5. --- If number of Stationed Military is lower than 24
--- --- While number of Farmers is lower than 30% of Population Count
Convert a Citizen to a Farmer
6. --- Make sure enough Farmers are assigned to sustain its planets population
7. --- Stop processing rules
Group 1 makes sure all fully populated planets divert as much food as possible to military training. All subsequent rules and sub-groups are gathered under this condition, making the whole example one big group. A group could be added below this example, dealing with planets that are still growing.
Group 2 is a panic button or emergency break, if you will, that will halt everything if there’s less than 8 military on the planet. For a fully populated planet, that’s quite low and a dangerous state of affairs. For this to work, all citizens must of course be farmers (not included here). Also note that the recruitment rate has been set to 100% before stopping the processing.
Group 3 halts execution if the planet is not producing anything (since the following rules are pertinent only to planets that are currently building something). When done this way, you have to place all orders that deal with building things before this group, so as to make sure that the planet truly isn’t about to start producing something.
Group 4 and all the following are only reachable by planets that are fully populated, have more than 8 stationed military units and aren’t producing anything. Since we know the planet is producing something, we change all citizens to workers.
Group 5 checks whether there’s less than 24 military units on the planets, and re-tasks some of the Workers to farmers if so. You may natually make more or less farmers depedning on the urgency of more military vs. the need to build (or research, or whatever else the planet is really supposed to be doing).
Group 6 makes sure that that the population won’t starve. If you use ‘Controlled Starving’ (see above), you don’t want to use this rule.
Group 7 stops the processing because everything that’s supposed to be done for a fully maxed planet is now done. If, for example, there were more rules in this governor dealing with planets that are still growing, these might get processed unless you’re careful about setting up the right conditions for rule execution. Better safe than sorry.
If you wonder why the numbers ‘8’ and ‘24’ are used, it’s because that number of military fit well within planetary bunkers and the like. You may want to set these lower at the beginning of the game (e.g. 4 and 16) , and higher towards the end-game.
You have two options when instructing your governors to build facilities. You can make a named production queue and have the governor assign that to the planet, like this:
If currently no production
Switch Production-Queue of this Planet to specific production-queue
The other way is to set up specialized governors that decide what to build on the planets. This is the beginning of such a governor, intended to build the fundamental facilities.
1. If currently no production
--- If number of Light Turrets is lower than 1 Build Light Turret
2. If currently no production
--- If number of Factories is lower than 1 Build Factory
3. If currently no production
--- If number of Farms is lower than 1 Build Farm
4. If number of Stationed Military is higher than 1
--- If currently no production
--- --- If number of Planetary Fortresses is lower than 1 Build Planetary Fortress
5. If currently no production
--- If number of Farms is lower than 2 Build Farm
6. If currently no production
--- If number of Factories is lower than 2 Build Factory
This is a common way of automating your construction. You may create other governors that deal with building ships or facilities necessary for research.
This example is straightforward. It continually checks whether there’s no production, since otherwise it would always build the last item. It also makes sure that if there’s any military units on the planet, they get a Planetary Fortress to bolster their defensive strength.
manual\governor-examples.txt · Last modified: 2012/02/26 22:17 by uncountednose
0.218 planets were colonized to make this page.
Powered by DocuWiki, Theme by SHRIKEE