Closed stackpoint closed 4 years ago
If I'm reading it correctly:
Just to visualize the issue you're trying to solve:
Edge case: At final count in the end, if I'm reading this right, you give the 12 MIL at value of 0. From my understanding this means that if they AI is at the leader cap, they get the points back? Why?
the AI is getting a decision to click once a year if they have 2 admirals, 2 explorers, 2 conquistadors.
The num_of_X conditionals for the generals/admirals/conquistadors/explorers are bugged. The count starts at 1 instead of 0 so they only get the option to click this if they have 1 admiral/explorer/conquistador.
At final count in the end, if I'm reading this right, you give the 12 MIL at value of 0. From my understanding this means that if they AI is at the leader cap, they get the points back? Why?
Remember that for paradox conditionals: X = 0 checks X greater than or equal to 0 and NOT = { X = 0 } checks X less than 0. So for this specific edge case it doesn't use 0.
The reason I used the negative comparison and NOT was because the free leader pool modifier is a float that gets rounded down to the nearest integer when determining how many actual leaders you get. So if I have 13.99 free leader pool, I can only have 13 leaders.
numGen | numFLP | delta | NOT delta |
---|---|---|---|
9 | 8.00 | -1.00 | TRUE |
9 | 8.50 | -0.50 | TRUE |
9 | 8.99 | -0.01 | TRUE |
9 | 9.00 | 0.00 | FALSE |
9 | 9.50 | 0.50 | FALSE |
9 | 9.99 | 0.99 | FALSE |
The num_of_X conditionals for the generals/admirals/conquistadors/explorers are bugged.
It turns out the trigger itself is not bugged but the export to variable function for the conditionals are.
We can shorten the length of the rebate from 1 year to 6 months or so if it is that dynamic.
I've also noticed that this does definitely happen more often when the AI are at war but does still occurs when they are at peace too. You can use this script using the run console command to find all the countries over their leader limit in your vanilla games too.
Since this also happens in vanilla, I made a bug report on the paradox forums here: https://forum.paradoxplaza.com/forum/threads/ai-exceeding-leader-limit.1393832/
Rebates the AI for being over the leader limit. AI is currently bugged to consider only generals when rolling to leader limit.
The num_of_X conditionals for the generals/admirals/conquistadors/explorers are bugged. The count starts at 1 instead of 0.
It seems like the game uses num_of_generals to determine if can roll for another general and doesn't consider admirals/conquistadors/explorers.
The num_of_generals conditional also counts free leaders from ruler/heir.
I couldn't think of a better way for the AI to get their points back since there is no monthly monarch point gain function that I could find.