Fixed, sorry. Sunday I go holidays and I will start to look into split algorithms. If you have any extra data which could help me, please, especially about those tiles cases ____________Era II mods and utilities

I found one case in which the result said there would be upgraded stack and did I not get one. But it was due to the splitting. I had large army, and I got the rare case of 1 stack and upgraded stack together.

I tested again with the same save but smaller army, and got an upgraded stack. Which means that for the next part, the case with small number of stacks can have upgrades, but it won't have any if you only fight one stack. It also means I did not find any case of the script not working

Thanks, finding AI value is easy, but getting two values percentage in erm I have no clue how, asked in russian forums and waiting. We can only use addition, extract, multiply, division, remainder and integers thus this link didn't help me much.

Quote:Result gives me that our army is 175% more powerful. Is this correct? Then I get only 3 stacks split, which suggest our army is 200% better

Not exactly. If your army is 175% more powerful then you will face (3 + Deviation) stacks, where Deviation is -1, 0, or 1. If your army were 200% more powerful, you would have encountered (2 + Deviation) stacks.