Author Topic: Balancing tool (beta)  (Read 3043 times)

Mr War

  • Guest
Balancing tool (beta)
« on: 26 August 2011, 10:37:15 »
I'm restarting work on my balancing tool, using open office calcs. This won't be a Montecarlo simulation like I was trying before, just an attack-versus-armor/HP table.

How does the amount of armor affect it?

Eg a tank engages a jeep
The tank's attack strength us 300, armor piercing, speed 90.
The jeep is unarmed and has HP of 1000, armor type steel and armor value 10
Armor piercing versus steel armor =0.8

How many shots does the tank require to kill the jeep (ignoring miss factor)?
« Last Edit: 1 September 2011, 21:55:43 by Mr War »

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: Balancing tool
« Reply #1 on: 26 August 2011, 13:46:52 »
This is the calculation for damage:

((attack strength + random) - armor) * damage multiplier

Assuming the tank has no variation in its attack strength the calculation is:

(300 - 10) * 0.8 = 232

So it will take the Tank 5 shots to destroy the Jeep

A skill speed of 100 will complete 1 skill cycle per second (40 frames). As the Tanks attack speed is 90 it will take 1.15 seconds(46 frames) to complete 1 skill cycle. So it will take [big]5.75[/big] seconds for the Tank to destroy the Jeep assuming normal game speed and no other interference.

Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Mr War

  • Guest
Re: Balancing tool
« Reply #2 on: 26 August 2011, 14:41:47 »
Great, exactly what I was after

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Balancing tool
« Reply #3 on: 26 August 2011, 19:20:49 »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Mr War

  • Guest
Re: Balancing tool (WIP)
« Reply #4 on: 27 August 2011, 07:48:11 »
Prototype, loaded with as-is French Faction (which is known to be unbalanced!). It's ugly but welcome to Open Office

Basically the first thing it does is calculate the % of HP that the defender will lose per second.

It factors in:
    Attack Strength
    Attack speed
    warhead type
    defender HP
    defender armor type
    defender armor quantity

It doesn't factor in:
    Range
    Mobility
    Attack strength variability (which should average to zero anyway)
    EP costs
    Unit limits
    Unit costs
    Speed of manufacture



This table can then be used to generate an [big]Advantage Matrix[/big]. Basically it looks up both unit\s attacking the other, and compares the % of HP being lost per second. It subtracts one from the other to determine the relative % advantage, per second. Orange cells show attacker advantage, Blue cells show defender advantage.

So, if a Fusilier attacks a DCA, then the Fusilier will lose at a rate of 18% of their HP faster than the DCA

You can then make changes to the warhead-v-armor table, or the attack variables or defense variables, to get the result you want. Then update the XML accordingly.

I have yet to check the math etc but will share the file when comfortable that it is working as intended.

Suggestions welcome.
« Last Edit: 27 August 2011, 07:54:46 by Mr War »

Mr War

  • Guest
Re: Balancing tool (beta)
« Reply #5 on: 1 September 2011, 21:57:06 »
Beta DOWNLOAD - http://www.mediafire.com/?32rru9koogx662y
Requires Open Office (or Excel might work too). Loaded with French Faction from Cold War Pack.

Also includes cost "bang per buck" calc and basic XML generation (not all parts but relevant ones).


will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: Balancing tool (beta)
« Reply #6 on: 1 September 2011, 23:19:06 »
Code: [Select]
=IF(OR($D17="Both",$D17=O$4),IF(ISERROR((($I17-O$5)*VLOOKUP($F17,armor.$C$7:$R$27,MATCH(O$6,armor.$C$7:$O$7,0),0))/O$7),"",(($I17-O$5)*VLOOKUP($F17,armor.$C$7:$R$27,MATCH(O$6,armor.$C$7:$O$7,0),0))/O$7),0)
I *bow*

Mr War

  • Guest
Re: Balancing tool
« Reply #7 on: 28 September 2011, 21:48:08 »
Since Titi found a bug in my XML generator in the tool, I've corrected the output but now the results of encounters seems different to the model in the tool.

Are we sure that the below formula is how it works in-game? I'm in megaglest 3.5.3-alpha1

This is the calculation for damage:

((attack strength + random) - armor) * damage multiplier

Assuming the tank has no variation in its attack strength the calculation is:

(300 - 10) * 0.8 = 232

So it will take the Tank 5 shots to destroy the Jeep

A skill speed of 100 will complete 1 skill cycle per second (40 frames). As the Tanks attack speed is 90 it will take 1.15 seconds(46 frames) to complete 1 skill cycle. So it will take [big]5.75[/big] seconds for the Tank to destroy the Jeep assuming normal game speed and no other interference.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: Balancing tool (beta)
« Reply #8 on: 3 October 2011, 09:54:19 »
Basically this is a correct calculation but there are other things which must be taken into account too!
For example Splash, where the damage is range based.

What about the random in this calculation? Does it represent this? "<attack-var value="30"/>"
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

Mr War

  • Guest
Re: Balancing tool (beta)
« Reply #9 on: 3 October 2011, 21:25:39 »
Thanks Titi,

Yes the balancing tool just does the basic calcs, things like EP, range, splash are left to the intellect of the modder, and of course play-testing.

For the random factor I didn't include it as it should average to zero anyway (?).

I am tempted to write an iterative or monte carlo simulator but it'd take away from my faction building and i don't much like open office anyway (never tried VBA in open office, assume it can do it). Other unstarted projects are a fuller XML generator using excel or Access as a basis. Confident i could do it, but it doesn't really excite me beyond thinking about how to do it.

 

anything