LuisGuzman wrote: ↑2023-08-22 11:32, Tuesday
Then here comes thew difficult question: how many total units are you thinking ?
Well, I'd be tempted to say "as many as possible, even if people never/rarely use them all". I mean, today's computers have enough memory to handle that, don't they? (Genuine question, no clue)
The fact is that 400 is too few for XXL (or even 3k) maps: Given the AI is dumb and can't optimize its resources, you need to give it a lot of those. And then there are the counterattacks, and the reinforcements, and all that. If you want to avoid a boring and tedious "clean one VH after the other, while the AI sits there and waits" type scenario, you need lots of AI units.
It varies between a ratio of 1:2 (small, early scenarios) up to 1:5 (late, big scenarios). Which means that for a player army of 100 (core + aux) you need to place
at least 500 AI units!...
Now if I had to say a number, I would say that (at least) 100 more units
per side would be good (although this is probably an entry in the "famous last words" list... Someone will eventually make an XXXL map, and we'll need even more units...

).
LuisGuzman wrote: ↑2023-08-22 11:32, Tuesday
Currently the total number is divided by the number of players, so if 2 players each one can have 200 units and if 4 players, each one can have only 100

Is that a typo?
Here you said the total limit is 800. And indeed, in the 3k Stalingrad map I've just finished testing OG apparently accepted the ~350 AI units I had placed.
LuisGuzman wrote: ↑2023-08-22 11:32, Tuesday
- the total total number of units for all players. As units array is static no more than this value can be reached.
Doubtless hardcoded, as the array of units is statically allocated.
- Max number of units that each player can have. So designers could set a different units limit for each player.
This value should be set at design time for each player.
#2 might be dangerous, if I understood what you mean: The total amount is fixed, but can be dynamically distributed among players, isn't it? The problem with that is, I know how much prestige I hand out during the campaign, but I don't control what the player will buy with it. Could be a single expensive unit or a dozen cheap ones... So I can't cut it too close. While I control AI numbers to the unit, I need to leave a security margin of at least 10-50 units for the player side.
#1 (fixed amounts both sides) sounds much safer, but the amount has to be high enough so you can fit the AI side into it.
So, it all boils down to the question: How much can you raise it (without making older computers explode)?