Home   Help Search Login Register  

Author Topic: Mando Power Balance (ACCEPTED)  (Read 2830 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Mando Power Balance (ACCEPTED)
« on: 18 Apr 2007, 02:28:59 »
What does mando_getbalance.sqf?

// mando_getbalance.sqf
// By Mandoble April 2007
//
// Purpose:
//    Measure the power per side present in a provided trigger's area and determine the dominant side or sides.
//
// Parameters:
//    trigger name which units will be tested (usually ANYBODY present type).
//    Added power value per armoured type unit present
//    Added power value per flying type unit present
//    Added power value per ship type unit present
//    Heights control bonus (who controls the heights has its power value muntiplied by this, only with an advantage of more than 5m over other sides).
//    Strategic bonus (all power values for this trgger are multiplied by this, the power presence in some triggers may be
//    more important than in other triggers).
//
//    Men have a power value of 1 multiplied by any present bonuses.
//    For power calculations only units that can fire, have ammo and are not fleeing are considered.
//
//    This function returns an array with the following format:
//    [BLUFOR power, OPFOR power, Independent power, Civilian power, BLUFOR ratio, OPFOR ratio, Independent ratio, civ ratio, winner sides]
//    ratios are like % of total power present in the trigger's area.
//    winner sides is an array with the side with more power, or more than one side in case of draw


Play at will with the demo mission from the editor, add more triggers if needed, calculate a total power per side over the island.
« Last Edit: 01 Sep 2007, 17:57:32 by Planck »