Quiz question: what happens if a planet is full of slaves who can't do specialist jobs, there are 10 free specialist slots (because the former owner built those), and you have a mineral shortage. Will your AI build mining districts, or will it think there are enough jobs available, and completely cease developing the planet?
In general, while no doubt your AI is an improvement over what was there before, unfortunately I'm not as excited as everyone else. Just having the AI work towards a static number of surplus income, is too basic. To name food and minerals, the surplus you should strive towards depends entirely on how many planets you own. For empires that can use the Encourage Growth decision, that's 8.33 food surplus per planet. The minerals surplus per planet should be between 10 or 20, depending on the stage of the game and how fast your population grows. The required energy surplus is a bit more complex, as it depends on how much your empire sprawl increases your campaign costs, and whether or not you want to terraform worlds. The desired alloy surplus depends on whether you're living in a friendly or hostile corner of the galaxy. And let's not forget the new approach makes incompatible any two mods that add a new resource.
As a consequence these new AI plans will force modders to create an infinite number of permutations to account for all possible situations. They're not modder friendly! It would have been better if you could instead set the surplus goal for each resource individually. I would have envisioned something like this in 00_strategic_resources.txt
Code:
minerals = {
tradable = yes
market_amount = 100
market_price = 100
max = 15000
deficit_modifier = minerals_deficit #found in static modifiers
ai_weight = {
weight = 1
}
ai_wants = {
whatever
}
ai_wants_surplus = {
base = 30
modifier = {
add = 10
num_owned_planets >= 2
}
modifier = {
add = 10
num_owned_planets >= 3
}
modifier = {
factor = 1.1
condition_whatever = yes
}
}
}