Hi, I'm the author of the
Better Planet Automation mod, we've discussed some things in other threads before, and I really should have commented here before now.
Things that are necessary for me to be able to port my mod from sector automation to planet automation without losing functionality:
- Mod script feature to control districts in the same way as buildings.
- Mod script feature to bypass the free jobs check.
- Mod script feature to bypass any and all other hard coded conditions that might exist.
- Mod script feature to suppress any hard coded building behavior that might exist.
- I haven't rechecked recently, but the last time I tested it, planet automation would build city districts on planets with no free building slots even if the mod scripts all universally said to build nothing, including the mod script for building slots management.
- Alternatively, remove all such behavior from hard code entirely, leaving it exclusively in the moddable script files.
- In
upgrade_trigger
block, ability to distinguish between different levels of upgrades.
- If a planet has both a basic Research Labs and an upgraded Research Complexes, the script should be able to control which of them to upgrade.
- This might already be the case, I haven't tested it yet, but I also need for the
upgrade_trigger
block to be independent of the available
block. I need to be able to upgrade existing Research Labs while at the same time forbidding building new ones.
- Check automation scripts and potentially queue new construction every day, not just on the turn of the month.
- Alternatively, for better performance, let it be triggered by changes in the values it depends on. For my purposes it would suffice to add a
run_planet_automation = yes
script effect in planet scope.
For the transition, it would also greatly help to have a script effect to set planet automation to enabled. I would much prefer to have the mod update pop up a notification simply informing people about the change, and that adjusting their settings for it has already been handled, rather than pop up a notice telling people that they have to manually adjust settings now because only the UI can do it.
Things that are necessary for me to properly make good use of the new
job_changes
block:
num_forbidden_jobs
script trigger in planet scope, supporting both specific jobs and "any"
.
num_available_jobs
would also be useful, but I have a workaround for that one by calculating it from job_<job>_add
modifier and num_assigned_jobs
trigger, and I could just update the calculation to subtract num_forbidden_jobs
.
- This information is needed for certain calculations my mod does.
Side note, I strongly suspect that a major cause of issues with amenities handling, in both automation and the AI, is the define value
AI_UPPER_AMENITIES_LIMIT = 5
in
common/defines/00_defines.txt
. I consider that value ludicrously low, in light of the magnitude of how much amenities a single entertainer provides. The difference between the lower and upper AI limits for amenities should be large enough that no job can ever skip past the entire interval between them by employing or firing a single pop.
Things that are necessary for my mod to properly integrate with the planet automation's UI and configuration settings:
- Trigger condition
has_automation_enabled = yes/no
for planet scope.
- The corresponding effect
set_automation_enabled = yes/no
would be nice to have too.
- Trigger condition
has_automation_setting_enabled = <key>
for planet scope. This trigger should accept each of the values defined in common/colony_automation_categories
, including any from mod files.
- The corresponding effects
enable_automation_setting
and disable_automation_setting
would be nice to have.
- If you really want to be thorough, you could add
on_actions
hooks for when those settings are changed, plus a trigger last_automation_setting_changed = <key>
Triggers that would give highly useful information that automation really should account for but currently cannot access:
- Value trigger
num_districts_blocked = { type = <key/any> value = <variable> }
for planet and deposit scopes.
- Note that
type = any
should return the blocker's effect on the planet's overall max districts, not the total of each individual type of district the blocker is blocking. A Dense Jungle blocker that's blocking a Lush Jungle should evaluate as blocking 1 type = any
district and 2 type = district_farming
districts.
Important things I would like to see added to automation scripts:
- Mod script feature for queueing a blocker to clear.
- Mod script feature for queueing a planet decision that has an
enactment_time
.
If you want to review the other things I suggested before, that conversation is
here. If you think it might be helpful, I could also do a call on discord to discuss things sometime.
P.S. If you could get Montu's attention and suggest reviewing my mod like he reviewed vanilla planet automation, that would be nice.