Damn you're a genius ! It has to do with unit cost ! The game first has to sort out with Infantry/missile/cavalry, then sorts out by cost.
I have to understand the logic to be able to do what I want !
Thanks a lot !!!
EDIT : got it ! pretty easy though ! The first 2 boxes on each line are dedicated to infantry (no matter what the weapon is), the 2 following to missile, then 1 to cavalry, 2 to boats and the last to agents.
The game sorts out the units with unit cost in custom batlle in the EDU, even for the campaign map.
Code:
stat_cost 7, 15, 30, 7.5, 7.5, 15, 1, 1
The higher this number is, the upper in the table the unit will be. So lets take infantry (first 2 boxes on the left). The game will put on the top left the most costly unit, the directly on its right, the second most costly unit. Then the third most costly unit will be on the second line, first box, the fourth most costly will be second line second box, then the fifth will be third line first box ...etc.