Troll Dice Roller for Heavy Gear Blitz

After some recent discussion of how significant various stat increases are in Heavy Gear Blitz I went and made some scripts in Troll Dice Roller.

Troll Dice Roller is an online (and downloadable) application for simulating large numbers of dice rolls in various gaming systems, as well as providing the probability of certain outcomes mathematically rather than by brute force.

You can find it online here: http://topps.diku.dk/torbenm/troll.msp

If you look under the user-contributed rolls, near the bottom, you’ll find two that I wrote, with parts taken and modified from other dice rolling scripts, especially a pre-existing Heavy Gear Blitz one (which is still on the list).

My two are called “Heavy Gear Opposed Roll Distribution” and “Heavy Gear Blitz attack and penetration roll“. The names aren’t great (I can’t edit the titles), but I think they’re pretty useful.

The first, Heavy Gear Opposed Roll Distribution, models a HGB opposed roll between any number of d6 and any skill rating for either player. This is useful for working out how beneficial extra EW skill or an Initiative boost would be.

The second, Heavy Gear Blitz attack and penetration roll, models the typical opposed roll in HGB – one model shooting at another. You can change the skill rating and number of d6 for either player, the PEN of the weapon, the AR of the defender, whether the defender has agile, whether AP values are involved, and whether the attacker has blast or spray or precise to negate agile.

Here’s a screenshot of the probability table generated for a LBZ fired by a Jager going at combat speed against a Klemm tank.

trolldiceprob

As you can see, there’s a pretty good chance of doing 2 damage via your AP rating and a 45% chance you’ll do at least some damage. Not too bad! But what if you had that Klemm flanked? Then you’d get +2d6 on your attack.

trolldiceprobflanked

That’s much better! Now you have a 52% chance of doing 2 damage and a whopping 73% chance of doing at least 1 damage.

I know I’ll be making use of this tool in the future to model rolls for various games and analyse how useful various traits, weapons, and models are in HGB. Hope it’s useful to you too!

 

For reference, here’s the code for the two scripts:

Heavy Gear Opposed Roll Distribution

\ Heavy Gear Opposed Roll distribution

\player A

n:=3; \num d6
s:=4; \skill rating

r:=0; \result die
m:=0; \mod skill
f:=0; \final result
x:= n d6;
r:= max x;
m:= x — max x;
f:= r;
f:= f + (count s <= m);

\player B

Bn:=2; \num d6
Bs:=4; \skill rating

Br:=0; \result die
Bm:=0; \mod skill
Bf:=0; \final result
Bx:= Bn d6;
Br:= max Bx;
Bm:= Bx — max Bx;
Bf:= Br;
Bf:= Bf + (count Bs <= Bm);

f – Bf

 

Heavy Gear Blitz attack and penetration roll

\ Heavy Gear Blitz attack and penetration roll
\========ATTACKER PROPERTIES==========
n:=2; \Number of Dice
s:=4; \Skill level
p:=6; \Weapon Penetration
ap:=0; \AP Value
pr:=0; \Precise or spray or blast (1/0 True/False)
\========DEFENDER PROPERTIES==========
Dn:=2; \Defender number of Dice
Ds:=4; \Defender Skill level
Da:=6; \Defender Armour Rating
Dag:=0; \Defender is Agile: (1/0 True/False)
\========DICE ROLL CALCULATIONS==========

\ Open Calculation variables \
h:=0; \Highest Die
m:=0; \Modified Skill
Dh:=0; \Highest defender die
Dm:=0; \Modified defender Skill
r:=0; \Attacker Result
e:=0; \Defender Result

\ Work out the attacker result \
x:= n d6;
h:= max x;
m:= x — max x;
r:= h;
r:= r + (count s <= m);

\ work out the defender result \
Dx:= Dn d6;
Dh:= max Dx;
Dm:= Dx — max Dx;
e:= Dh;
e:= e + (count Ds <= Dm);

\ compare results to get MoS then apply vs armour rating \

mos:=r – e;
dmg:=mos + p – Da;
\========RESULTS==========

\Result: Show DMG Probability (Misses are shown as -100)
if mos < 0 then “- MISS -”
else if mos = 0 & pr = 0 & Dag =1 then “- MISS – MOS:”||mos||”AGILE”

\NO DMG, NO AP
else if dmg < 0 & ap = 0 then “ARMOUR – Blocked”

\NO DMG, LOW PEN, AP, MOS OK
else if dmg <= 0 & mos > 0 & p < Da & ap >= 1 then “ARMOUR PIERCING – Damage:”||if ap > mos then mos else ap ||”AP Max”

\NO DMG, LOW PEN, AP, MOS 0
else if dmg <= 0 & mos =0 & p < Da & ap >= 1 then “ARMOUR PIERCING – Blocked – MOS:”||mos

\NO DMG, HIGH PEN, AP
else if dmg <= 0 & p >= Da & ap >= 1 then “ARMOUR – Blocked”

\DMG but Lower or Equal to AP
else if dmg >= 0 & p < Da & dmg <= ap & ap > 0 then “ARMOUR PIERCING – Damage:”||if ap > mos then mos else ap ||”AP Max”

\DMG
else “DAMAGE – MOS:”||mos||”Damage:”|| if dmg = 0 then “M” else dmg

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s