Tuesday, July 24, 2012

40k Metrics: 6th Edition Vehicle Mathhammer

It’s rather obvious to everyone that I enjoy mathhammer.  I feel that there is an edge to be gained by being aware of the average potential of your units, and the ability to know which of the units in your book are most points efficient. 

6th Edition threw the old mathhammer for a loop in regards to killing vehicles.  It used to be rather straight forward to calculate the amount of shots it would take to shoot down a Rhino, but in 6th Edition it is very, very difficult.  I doubt most players have bothered trying to do it, so they may not be aware how tough it is to hammer out.  What makes it so hard?

It's still all about the numbers
In short, it’s because we have two parallel systems for killing vehicles operating at the same time.  One system is the hull point system, and the other is the penetration chart.  It is rudimentary to calculate how many hull points a unit can shoot away per turn, but what you cannot account for within that is the fact that at least 1/6ths of penetrating shots will explode a vehicle.  If you explode a vehicle with the first shot, it doesn’t matter how many hull points you can peel off with the rest of the shooting for the unit.  Additionally, some weapons are better at exploding vehicles than others, and that has to be taken into account.  Simply put, you have to take into account the overall likelihood that either one of these systems will kill a vehicle in a given turn, which is a really rather complex set of maths.

To solve this dilemma I created a script within Excel that calculates the odds of a particular unit to kill vehicles and I’m rather proud of it.  It uses the following logic to calculate the vehicle kills:

1.       At the very start of a simulation, create a unit of AV___
2.      Start Round 1
3.      For weapon #1, do a hit/miss roll.
1.       If the weapon hits, do a strength roll
1.       If strong enough, do a point of damage.
1.       If the damage kills the unit, skip remaining weapons and move to Round 2.
2.      Otherwise, if damage is high enough for penetrate check, then do it.
1.       If penetrate succeeds for instakill, then skip remaining weapons and move to Round 2.
2.      If the weapon misses, go to the next weapon for the round.
4.      If the unit still lives, repeat Step #3 for Weapon 2, 3, ....
5.      Start Round 2
1.       If the unit never died, it starts Round 2 at its current hull level.  Otherwise, start Round 2 with a fresh unit.
2.      Round repeats as Round 1 above.
6.      Repeat through Round 5.

A few comments.  As you can see, it presumes a 5 turn game, but you can tweak the settings for longer games if you like.  It runs 10,000 simulated games to get an average that should eliminate the outliers.  Also, it doesn’t allow for split firing, so units that can do that are shit outta luck.  This is much more refined than the 5th Edition mathhammer, since it allows for vehicle damage to carry over to the next turn.  You’ll also notice that logically the most vehicles any unit can destroy per 5 turn game is 5, which makes complete sense.  A unit with 200 meltaguns will still only be able to kill a max of 5 vehicles per game.
After I finished it, I went back and made it user friendly so you can literally put any shooting weapon in the game into it and custom make your unit with whatever loadout you want and run the analysis.  Download the .zip file hereOn the bottom right is your weapon pool.  Feel free to add every weapon in your codex in there.  It has slots for Weapon Strength, roll needed to hit, how many dice to add to strength for armor penetration, and what bonus you get rolling on the Penetration Chart.  Once you have the weapon pool filled, you go to the unit load out section on the left and add the weapons for the unit.  If you put Krak missiles as #1 in your pool and your Long Fangs have 5 of them, put “1” in the first 5 entries.

Once you’re done with the unit load out, hit “run analysis” and it will give you the results.  You’ll note that it changes slightly every time you run it.  This is because instead of just running the straight average of rolls, it simulates 10,000 actual games.  This is a large enough sample size, I think, that the results can be accepted.  But you can change that variable at the top too, if you feel like the results of 50,000 games is more reliable.

All in all, I’m very stoked about this and I hope you guys enjoy it.  Since 6th Edition vehicle damage is so much more difficult than previous editions, I would assume most people are going to get some value from it.

Last note, I couldn’t figure out a simple way to do twin linked weapons, so for my personal assumption I just raised the BS of the unit firing by 1.  Not perfectly accurate but good enough for me to draw conclusions from.

I’ll do a follow up article next week detailing some of the interesting results this program uncovers, and hopefully various people around the web will find some unconventional conclusions as well to add to the discussion.

Thoughts?  Comments?  Questions?


  1. Sounds neat--but I couldn't get the spreadsheet downloaded. I can't right-click / save-as to get the file from your site, or from google docs. I'm not sure if anyone else is having this problem, but I personally can't get your document.

  2. When you go to google docs there should be a drop down menu that allows you to download.

  3. It sounds like a pretty fantastic tool, but there are also ways to do this using statistics instead of a monte-carlo approach.

    Also, for twin linked, it's a fairly simple formula. For BS 4, the chance to hit is:


    So basically the chance to hit the first time, plus the chance to hit the second time multiplied by the chance to miss the first time.

    To calculate the Hull Points, you can use cumulative binomials. So once you calculate the chance to inflict a hull point with a single shot, you calculate the chances of stipping X hull points with Y attempts.

    1. The problem with hull points is that you can pop the tank with a penetrating hit on the first shot, so you have to take that into account. It's very very difficult to do with statistics. Beyond my skills anyway. Much easier to brute force it with simulations.

    2. It's possible to do that too. I considered typing it out in the comment and then thought... ugh.

      Basically you take the chance that it won't die from Hull Points for X number of shots, times the chance that it won't die from pens for X number of shots. This gives you the total probability that it won't die from X number of shots, and you subtract that from one to get the probability that it WILL die from X number of shots.

  4. Great post! I love mathhammer... obviously. The tool you set up through excel is fantastic. 6th ed definitely made mathhammer a bit more complicated, I'm still figuring it out when I have spare time.

  5. I found myself pondering some mathhammer style questions and lack the basic math skills required to get answers. Then, I remembered this post and thought you might be willing to shed some light on things.

    I'm trying to figure out the odds of getting specific psychic powers in a deck. For instance, if I choose biomancy on my broodlords, what are the odds that I'll get it on a single broodlord (seems simple enough).

    I really started to stumble when I tried to figure out what the odds I'd get it on at least 2, when I bought 6 broodlords. I tried making a chart that would tell me the odds of getting 2, or 3 or any number based upon any number of broodlords.

    I think it would be interesting to see. Likewise, I wanted to see what it would look like when we switched broodlords out for fully upgraded Tervigons (who have four powers).

    Any chance this is a task you'd want to try to tackle? If not, any advice for how I would do it?