MegaGlest Forum
Modding and game content creation => Tools => Topic started by: Mr War 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)?
-
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.
-
Great, exactly what I was after
-
See also: http://glestguide.co.cc/sandbox/damage.html
-
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
(http://i54.tinypic.com/eg34si.png)
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.
(http://i55.tinypic.com/f2j0v5.png)
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.
-
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).
-
=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*
-
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.
-
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"/>"
-
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.