OMG, I've stopped to understand anything

Just to clearfy, do you refer to the "equal units in the middle" problem as to "when two enemies bring equal number of units to the middle their allies might not recieve vision"?
Yes. What other problem is there?
I've asked just to make sure, because we've also discussed what to do with vision in the same case. Now that is clear.
Nice job, Nudeguy! =) I've looked into triggers and examined the table. What you've done should work fine and the idea is clear now.
Few minor notes:
1. You have forgot about the other players in the map (computer and probably observers). If you have the condition "All Players has suffered at most 0 deaths of dcVision" and actions like "Modify deaths counts for All Players: add 1 for dcVision" you either should have a trigger which clears deaths for that players or change All Players to Force 1 everywhere.
Possible fix of the problem (Fix1):

TRIGGER // T1
OWNERS: Force 1
CONDITIONS:
Always
ACTIONS:
Modify deaths counts for Current Player: subtract 1 for dcVision
Preserve trigger
TRIGGER // T2: check condition - init
OWNERS: Force 1
CONDITIONS:
Current player commands the most Men at lMiddle
Current Player brings at least 1 Men to lMiddle
Force 1 has suffered at most 0 deaths of dcVision
ACTIONS:
Modify deaths counts for Force 1: set to 2 for dcVision
Modify deaths counts for Current Player: set to 1 for dcVision
Modify deaths counts for Foes: set to 0 for dcVision
Preserve trigger
TRIGGER // T3: check condition - maintain
OWNERS: Force 1
CONDITIONS:
Current player commands the most Men at lMiddle
Current Player brings at least 1 Men to lMiddle
Current Player has suffered exactly 2 deaths of dcVision
ACTIONS:
Modify deaths counts for Force 1: add 1 for dcVision
Preserve trigger
TRIGGER // T4: give vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered exactly 1 deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 3 for dcVision
Execute AI script +Vi7
Play WAV
Preserve trigger
TRIGGER // T5: take vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered exactly 2 deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 0 for dcVision
Execute AI script -Vi7
Play WAV
Preserve trigger
2. In the table you have a mistake at line (Loop:3, Player:3, Trig:2). The trigger wont run because P4 still has 1 deaths of dcVision, though it will run the next loop exactly as you wrote.
More things I want to point out:
1. You haven't mentioned another interesting event in your table when allies both have most units in the middle. The examination of this case leads to conclusion that everything will work fine.
2. One more point was not mentioned: what if someone leaves the game? In the case his DC dcVision will retain the last assigned value. Triggers will work fine thanks to death conditions for gropus accumulate values only from active players and thanks to set deaths actions affect only active players (active player is the player which present in the game).
3. When you have triggers dealing with alliances even more problems arise. Your method works absolutely perfect when alliance relation is an
equivalence relation and when it
is static in time.
Probably you remember
the huge post of mine which noone read. I'm elaborating into similar problems there. Let me cite.
I want to introduce some conventional signs for convenience. I will write the statement "P2 is an ally of P1" (in other words "P1 has an ally flag set to P2" or "P1 considers P2 an ally") as A(P1,P2) and it's negation "P2 is a foe of P1" (in other words "P1 has not an ally flag set to P2" or "P1 considers P2 an enemy") as E(P1,P2).
When I am talking about equivalence relation I mean exactly the next property: "For all players Pi and Pj
A(Pi,Pj) implies
A(Pj,Pi)"
Exactly the words I want to say there concerning your triggers:
The method should be perfect when there are distinct coalitions of players. The coalitions are foed with each other and all players are allied within the coalition. This should suffice for a normal melee game. But it raises an interesting questions [...] in some... unusual cases. Let me elaborate.
So, the coalition is the maximal group of players which are allied with each other.
3.1 Lets look thoroughly into the case when alliance picture is dynamic.
3.1.1 The simpliest case: two players (P1 and P2) were allied and P1 had the most units in the middle. P1 and P2 both have vision ON. Then P1 declares war to P2, but P2 still has got vision, because P1 still "maintaining" his vision state.
Possible fix of the problem (Fix2):

TRIGGER // T1
OWNERS: Force 1
CONDITIONS:
Always
ACTIONS:
Modify deaths counts for Current Player: subtract 1 for dcVision
Preserve trigger
TRIGGER // T2: check condition - init
OWNERS: Force 1
CONDITIONS:
Current player commands the most Men at lMiddle
Current Player brings at least 1 Men to lMiddle
Force 1 has suffered at most 0 deaths of dcVision
ACTIONS:
Modify deaths counts for Force 1: set to 2 for dcVision
Modify deaths counts for Current Player: set to 1 for dcVision
Modify deaths counts for Foes: set to 0 for dcVision
Preserve trigger
TRIGGER // T3: check condition - maintain
OWNERS: Force 1
CONDITIONS:
Current player commands the most Men at lMiddle
Current Player brings at least 1 Men to lMiddle
Current Player has suffered exactly 2 deaths of dcVision
ACTIONS:
Modify deaths counts for Force 1: add 1 for dcVision
Modify deaths counts for Foes: subtract 1 for dcVision // maintain only allies
Preserve trigger
TRIGGER // T4: give vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered exactly 1 deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 3 for dcVision
Execute AI script +Vi7
Play WAV
Preserve trigger
TRIGGER // T5: take vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered exactly 2 deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 0 for dcVision
Execute AI script -Vi7
Play WAV
Preserve trigger
3.1.2 Another case of dynamic relations: two players (P1 and P2) were
not allied and P1 had the most units in the middle. P1 have vision ON, P2's vision is OFF. P1 declares alliance to P2. It does not matter whether P2 considers P1 an enemy or an ally. In both cases P2 wont get vision before P1 retakes the middle.
I dont see a fast fix of your triggers in this case. This last problem requires revision of the system which I give further.
3.2 We have nonequivalence relation now:
E(P1,P2) AND A(P2,P1).
3.2.1 Let's assume events are developing the next way. P1 leaves middle and we have the starting situation: noone controls the middle, noone have vision, all DCs are 0. P1 takes middle. P2 not getting vision because of
E(P1,P2). Now P2 have to struggle for middle if he wants vision. Quite fair.
3.2.2 If events were developping the other way. After P1 leaves middle P2 gets it. P2 sets vision of the middle to P1 because
A(P2,P1), which is the P2's problems he is still allied to P1. Fair again.
In conclusion of 3.2 we got no problems there.
3.3 Even more complicated questions arise. Should we turn off vision for a player which was dropped from a coalition by it's member (by declaring war), but this member (which dropped the player) is not the one which controls the middle (and thus maintaning the dropped player's vision)? Get it?

3.4 Who knows what's else?

4. Addressing the problem, I've made a revision of the system. The constant nForceSize is the number of players in Force 1.
Now it looks like this:

TRIGGER // T1: take vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least nForceSize+1 deaths of dcVision
Current player has suffered at most nForceSize^2+nForceSize+1 deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 0 for dcVision
Execute AI script -Vi7
Play WAV
Preserve trigger
TRIGGER // T2: give vision failsafe
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least 1 deaths of dcVision
Current player has suffered at most nForceSize deaths of dcVision
Allies bring at most 0 Men to lMiddle // C1
Current Player bring at most 0 Men to lMiddle // C2
// conditions C1 and C2 fix a wired bug, it checks whether situation
// has been changed since execution of the last trigger loop
ACTIONS:
Modify deaths counts for Current Player: set to 0 for dcVision
Preserve trigger
TRIGGER // T3: give vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least 1 deaths of dcVision
Current player has suffered at most nForceSize deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to nForceSize^2+nForceSize+1 for dcVision
Execute AI script +Vi7
Play WAV
Preserve trigger
TRIGGER // T4: retain vision state
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least nForceSize^2+nForceSize+2 deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to nForceSize^2+nForceSize+1 for dcVision
Preserve trigger
TRIGGER // T5: init and maintain allies, disable foes
OWNERS: Force 1
CONDITIONS:
Current player commands the most Men at lMiddle
Current Player brings at least 1 Men to lMiddle
ACTIONS:
Modify deaths counts for Force 1: add 1 for dcVision
Modify deaths counts for Foes: subtract 1+nForceSize for dcVision
Preserve trigger
Let's assume we have a general setup: P1, P2, P3, P4 make up Force 1 (therefor nForceSize is 4), there are probably other players which we're not interested in. There are no units in the middle at start.
Triggers in case nForceSize is 4:

TRIGGER // T1: take vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least 5 (4+1) deaths of dcVision
Current player has suffered at most 21 (4^2+4+1) deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 0 for dcVision
Execute AI script -Vi7
Play WAV
Preserve trigger
TRIGGER // T2: give vision failsafe
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least 1 deaths of dcVision
Current player has suffered at most 4 deaths of dcVision
Allies bring at most 0 Men to lMiddle
Current Player bring at most 0 Men to lMiddle
ACTIONS:
Modify deaths counts for Current Player: set to 0 for dcVision
Preserve trigger
TRIGGER // T3: give vision
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least 1 deaths of dcVision
Current player has suffered at most 4 deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 21 (4^2+4+1) for dcVision
Execute AI script +Vi7
Play WAV
Preserve trigger
TRIGGER // T4: retain vision state
OWNERS: Force 1
CONDITIONS:
Current player has suffered at least 22 (4^2+4+2) deaths of dcVision
ACTIONS:
Modify deaths counts for Current Player: set to 21 (4^2+4+1) for dcVision
Preserve trigger
TRIGGER // T5: init and maintain allies, disable foes
OWNERS: Force 1
CONDITIONS:
Current player commands the most Men at lMiddle
Current Player brings at least 1 Men to lMiddle
ACTIONS:
Modify deaths counts for Force 1: add 1 for dcVision
Modify deaths counts for Foes: subtract 5 (1+4) for dcVision
Preserve trigger
Let's see what we have in various cases. I am discussing execution of triggers on an imaginable "Free For All" game.
Initially I have all 4 players (P1, P2, P3, P4) in the game in relation of war to each other.
Note: I'm not specifying lines for triggers which do not run. Loop notation is EventNumber.LoopNumber, where LoopNumber 0 means the state
just before event EventNumber happens.
Trace:

Loop Player Trigger dcP1 dcP2 dcP3 dcP4 Notes
1.0 - - 0 0 0 0
EVENT 1: P1 brings a unit to middle
1.1 P1 T5 1 - - -
1.2 P1 T3 21 - - - P1 vision ON
1.2 P1 T5 22 - - -
1.3 P1 T4 21 - - -
1.3 P1 T5 22 - - -
(the last loop repeats until situation changes)
2.0 - - 22 0 0 0
EVENT 2: P2 brings a unit to middle
P1 and P2 both have most units
2.1 P1 T4 21 - - -
2.1 P1 T5 22 - - -
2.1 P2 T5 18 1 - -
2.2 P1 T1 0 1 - - P1 vision OFF
2.2 P1 T5 1 0 - -
2.2 P2 T5 0 1 - -
(repeats)
// we can see, that once P1 and P2 got most units together
// P1 will loose vision and P2 wont get it until situation changes
3.0 - - 0 1 0 0
EVENT 3: P1 got beaten, only P2 has got most units
3.1 P2 T3 - 21 - - P2 vision ON
3.1 P2 T5 - 22 - -
3.2 P2 T4 - 21 - -
3.2 P2 T5 - 22 - -
(repeats)
4.0 - - 0 22 0 0
EVENT 4: P2 has other important things to do and leaves
No units in the middle
4.1 P2 T4 - 21 - - one loop delay 
4.2 P2 T1 - 0 - - P2 vision OFF
4.3 - - - - - - no trigger runs
(repeats)
5.0 - - 0 0 0 0
EVENT 5: Suddenly P1 and P2 workers meet in the middle
Both players control the most at once
5.1 P1 T5 1 - - -
5.1 P2 T5 0 1 - -
5.2 P1 T5 1 0 - -
5.2 P2 T5 0 1 - -
(repeats)
6.0 - - 0 1 0 0
EVENT 6: Players got frightened and run, no units in the middle at once!
6.1 P2 T2 - 0 - - failsafe runs!
6.2 - - - - - - no trigger runs
(repeats)
7.0 - - 0 0 0 0
EVENT 7: P1 declares ally to P3 and returns to the middle
A(P1,P3), P1 controls the most
7.1 P1 T5 1 - 1 -
7.1 P3 T2 1 - 0 - failsafe again! see the difference?
7.2 P1 T3 21 - - - P1 vision ON
7.2 P1 T5 22 - 1 -
7.2 P3 T2 22 - 0 -
7.3 P1 T4 21 - - -
7.3 P1 T5 22 - 1 -
7.3 P3 T2 22 - 0 -
(repeats)
8.0 - - 22 0 0 0
EVENT 8: Finally P3 wakes up and declares ally to P1
A(P3,P1), P1 still controls the most
8.1 P1 T4 21 - - -
8.1 P1 T5 22 - 1 -
8.1 P3 T3 22 - 21 - P3 vision ON
8.2 P1 T4 21 - - -
8.2 P1 T5 22 - 22 -
8.2 P3 T4 22 - 21 -
(repeats)
9.0 - - 10 0 9 0
EVENT 9: P3 sends reinforcements to the middle
Suddenly happens he got the same numer of men as P1
P1 and P3 both have the most
9.1 P1 T4 21 - - -
9.1 P1 T5 22 - 22 -
9.1 P3 T4 - - 21 -
9.1 P3 T5 23 - 22 -
9.2 P1 T4 21 - - -
9.2 P1 T5 22 - 23 -
9.2 P3 T4 - - 21 -
9.2 P3 T5 23 - 22 -
(repeats)
10.0 - - 23 0 22 0
EVENT 10: Here comes an impudent P2 with a huge army
Only P2 controls the most
10.1 P1 T4 21 0 22 -
10.1 P1 T5 22 0 23 -
10.1 P2 T5 18 1 19 -
10.1 P3 T1 - - 0 - P3 vision OFF
10.2 P1 T1 0 - - - P1 vision OFF
10.2 P2 T3 - 21 - - P2 vision ON
10.2 P2 T5 - 22 - -
10.3 P2 T4 - 21 - -
10.3 P2 T5 - 22 - -
(repeats)
11.0 - - 0 22 0 0
EVENT 11: P1 and P3 wake up P4, altogether they decide to take a revenge
P4 declares ally to P1 and P3, P1 declares ally to P4
Noobish still half-asleep P3 forgets to ally P4
Altogether they attack middle
P3 and P4 accidently have equal number of units
By accidence P2 has got the same number of units!
A(P4,P1), A(P4,P3), A(P1,P4)
Everyone except P1 has got equal (the most) number of units
11.1 P2 T4 - 21 - -
11.1 P2 T5 - 22 - -
11.1 P3 T5 1 18 1 -
11.1 P4 T5 2 14 2 1 do you see why we need nForceSize^2?
11.2 P1 T3 21 - - - P1 vision ON, glitch!
11.2 P2 T1 - 0 - - P2 vision OFF
11.2 P2 T5 17 1 0 0
11.2 P3 T5 18 0 1 -
11.2 P4 T5 19 - 2 1
11.3 P1 T1 0 - - - P1 vision OFF
11.3 P2 T5 - 1 0 0
11.3 P3 T5 1 0 1 -
11.3 P4 T5 2 - 2 1
11.4 P1 T3 21 - - - P1 vision ON, glitch!
11.4 P2 T5 17 1 0 0
11.4 P3 T5 18 0 1 -
11.4 P4 T5 19 - 2 1
(last two loops repeat)
// so we see, this is not perfect too: P1 vision glitches, everything else works fine
// the method glitches sometimes when 3 players have the most number of units
// the situation will normalize very soon when someone got leadership
(to be continued...)
So we've seen the proposed method is not perfect in all cases too, but it is much more stable and works fine when two players has got equal numbers of units in the middle (it forbits vision for all of them) and in some other cases when alliance status changes dynamcly during the game.
Post has been edited 4 time(s), last time on Jan 26 2009, 8:38 am by Wormer. Reason: I was impercise
Some.