So, I put together a script for more efficient governors. The script will analyze tech levels and choose the most efficient ratio of mines/factories/cities/space ports. It will also change the ratio as tech levels change.
These are the early versions, so I'm still working on improving the governors and making sure everything works right. I intend to keep updating it with better a build order and better usage of buildings besides the production buildings, as well as ironing out a few bugs, but this should be helpful for now. So, to install, just unzip the file and place the contents in your "Mod" folder and you should be good to go. The governors that have been updated so far are:
1. Metal planets, which are set to get as much refining capability as possible while still being able to export it all
2. Electronics worlds, which try to sustain as much manufacturing ability without importing raw materials while still being able to export it all
3. Advanced parts worlds, which operate the same way as electronics worlds
4. Economic worlds, which were changed to focus on metal, electronics or advanced parts depending on the amounts in the galactic bank. If they're all about equal, it defaults to research.
5. Research worlds, which seek to maximize the number of labs
6. Farming worlds, which seek to maximize the number of farms
7. Goods & luxuries worlds, which seek to maximize the number of goods and luxury factories at a calculated ratio
8. Militarized worlds, which seek to have two fuel depots, two ammo depots, one shipyard, one planetary shield generator (if available), planetary cannons and lasers (at a ratio of one cannon for two lasers, if available) and then enough bunkers instead of cities (if available, otherwise it defaults to cities) for all the worker needs.
All the other governors are the same as vanilla
A few things to keep in mind when using these governors:
1. No planets but farming worlds will build farms (for various reasons), so make sure to have enough food output. As long as you pay attention, it shouldn't be a problem
2. They will not be as efficient on the homeworld; they are set to use the normal planet capitals
3. Higher-tier production worlds are set to mine their own raw materials instead of importing it
4. The governors will renovate before they build anything new, to avoid shortages when they update based upon the tech level
5. The governors will automatically remove buildings to make room for more efficient layouts
6. The governors will demolish everything but the following items: planet cannons, planet lasers, planet shields, bunkers, fuel depots, ammo depots and cargo stores. Neither will they build these (except for the outpost governor), so if you want some defense, make sure to build some or modify the scripts (ask me for help with that if you need it).
Right now the script is very ugly, so I’ll be cleaning it up in later versions. If you have any questions about specific parts, just ask, as I’m more than happy to explain anything. I’ve tested the different governors a great deal, and I’ve noticed the occasional bug with ratios, but nothing too dramatic. If something big does happen, such as it getting caught in a destroy/build loop or the game crashing, let me know so I can fix it. Your tech levels and the log file are helpful for that.
Everyone is welcome to use this for any modding they do, just please don't take credit for the work.
Changelog from V1.0 -> V1.1:
-Added the militarized world governor
-Changed the goods to luxuries ratio for goods/luxuries worlds, it should no longer build way too many goods factories
-Added empire traits in, so it should take into account fast metabolism and capitalism traits as well as the happy/depressed traits for luxuries
-Fixed a bunch of conversion and signed/unsigned mismatches so that the log isn't cluttered
-Fixed a bug with how military buildings were kept on planets (the planets should build up to the right levels again now)
-Fixed economic worlds to default to electronic before advanced parts
-Add new world types for a few more situations
-A readme file
-General cleanup of the code
-Have some sort of basic defense for each planet (maybe)
-Take into account mood of workers (currently difficult due to possible flip-flopping of mood levels)
-Emergency farms in case you suddenly lose your food stocks/worlds
-Improve the default worlds
-Make use of shipyard/forge worlds or remove them entirely
-Improve AI choice of governor