Need *major* math help

By Dr. Quinn, in Deathwatch

Ok, so I've known what I want to do for the remaining characters in One on One vs a Bloodthirster for a while now, but quite frankly the next one up to the plate has me severely over my head from a mathematical standpoint. I think a huge part of the problem is that the scope of it simply overwhelms me, and it's been way too long since I've done advanced enough math to be able to figure out how to properly express the problem cleanly. As I need to run the calculations to see how far off I am from my target, the thought of trying to do it piecemeal and the long, slow, arduous by hand methods I have readily available to me, then having to redo it after tweaking all the variables scares me. Still, it's been far too long, and maintaining the surprise is only worth something if it actually gets done. So, without further ado, my problem.

The next one up to the plate is the Apothecary, who is going to be a Black Templar Sword Brother in Terminator Armour, wielding dual Assault Cannons, just blasting apart the cover the Bloodthirster hides behind like a nutcracker smashing an outer shell to get at the relatively fleshy nut within. He's going to end up testing against 135 (base 50, maxed, +5 from armour history, for a BS of 75, then +60. Size alone gives +30, full auto gives +20, and hatred gives +10. Need to balance out the penalties for range and two weapon wielding, but there are *plenty* of ways to do that, including sig. wargear and motion predictors, so it ends up at 135 one way or another). The Bloodthirster, not being a fool, dodges with a dodge value of 40 (due to a targeter which I'll definitely be picking up). The attacks are dealing so far 2d10(tearing) + 12 + 2 (master crafted) + 4 (detestation), pen 6, felling (master of arms), for a final value of 2d10 + 18 - (cover + 19), with the cover having a starting value of 12 and being reduced with each hit.

So, there's a 5% chance he'll miss entirely, and though normally I'd just assume a reroll with a fate point, there's so much stuff going on here that I'll just leave it at the 5% chance of 0 hits it by default would represent. 10% chance each of 4, 5, 6, 7, 8, and 9 hits, and a 35% chance of 10 hits. So far so good, except you need to apply those chances to both attacks, so (as an example), the 10% chance of 4 hits is actually .5% chance of 4 hits, 1% chance each of 8, 9, 10, 11, 12, and 13 hits, and 3.5% chance of 14 hits. Next you would need to factor in the chance to dodge. Thankfully (about my only break in all of this) since the minimum number of hits on one attack (assuming it's greater than 0) is equal to the maximum number of attacks the Bloodthirster can dodge, so we don't need to worry about whether he dodges the first or second attack, or dealing with reducing the number of hits dodged because he dodged 'excessively' well. So, following that example, it's a .3% chance of 4 hits, and a .05% chance each of 3, 2, 1, and 0 hits. Similarly, it's a .6% chance of 8 hits, and .1% chance each of 7, 6, 5, and 4 hits.

This excessive amount of calculation is compounded *severely* by the interaction of those hits with cover. The first hit does 2d10 tearing - 13 minimum 0, the second does 2d10 tearing - 12 minimum 0, and so on and so forth, leading to the 12th hit and onwards, which are 2d10 tearing - 1 minimum 0. I worked out all 1,000 values provided by 2d10 tearing, but I lack the mathematical or excel knowledge necessary to have it neatly subtract a number from a field or table, and then have it sum the positive values that remain (while ignoring the negative ones) and divide that by 1000 to get the average damage per hit for those 12 different values, and doing it by hand would take *forever*.

More pressingly, since the average damage per hit varies based on the number of hits involved, I can't just find the average number of hits, subtract the average number of dodges, multiply and call it a day. I need to actually get the full breakdown of the percentage chances of all the different possible number of hits, and then multiply that percentage by the total average damage which results from that number of hits. Again, doable by hand, but incredibly time consuming.

My hope is that someone has the math skills to help me figure out those values, or at minimum to help me get it properly formed into a mathematical expression, so that I can run it through myself, and if the variables change (I find I need a damage boost and seek out another +2 from somewhere, for example) I can re-run it with the modified variables as needed. Alternately, and possibly even more helpfully, would be if someone can help me figure out the excel side of it, how to convert the first part into a table in excel, so I can let it figure out and sum the percentage chances of the various possible number of hits for me, and / or how to perform the desired mathematical operations on the existing table for the second part.

Any and all help would be appreciated, and I do mean *any* help at all, though if you lack skills in mathematics or the use of excel, just know that I'm working on the apothecary, and though I'm reasonably certain I've gotten it done, crunching the numbers is taking me an absurd amount of time, so my apologies for that.

I'll try to figure something out in excel (actually open office) next week. But I found one possible mistake:

So far so good, except you need to apply those chances to both attacks, so (as an example), the 10% chance of 4 hits is actually .5% chance of 4 hits, 1% chance each of 8 , 9, 10, 11, 12, and 13 hits, and 3.5% chance of 14 hits.

Me thinks chances are higher:

(0,05 {one gun missing} * 0,1 {one gun rolling for 8 hits} ) *2 {the other way around} = 0,1 or 10% but what about both rolling for 4 hits?

(0,05 {one gun missing} * 0,1 {one gun rolling for 8 hits} )*2 {the other way around} + 0,1 * 0,1 = 0,11

increasing even more for higher hitnumbers out of more permutations.

I hope I got it clear, english is not my first language.

absolutely, the total chance of getting any specific number of hits is going to end up likely much, much higher, I was just kinda breaking it down by 'path' if you will. If I did so for each segment (the 5% chance of 0 hits would in this case contain the chance of 0 hits followed by the second attack generating 8, the 10% chance of 4 hits would contain the chance of 4 and 4, and the 10% chance of 8 hits would contain the chance of 8 followed by 0) and then summed the results, I would get the number I needed, breaking down that 'segment' was just an example. If I could remember how to properly utilize combinatorics for this, it would help a ton, as instead of manually breaking it down I could just calculate the final, total chance of each final number of hits directly, but sadly it's been too long so I need to brush back up on it, and haven't yet had the time.

Doesn't overwatch make the cover math unnecessary?

You go overwatch, take a -20 penalty and then never hit cover.

Also this can help. I made a monte carlo for analyzing vehicles. should be easy to convert to the BT. The one longish update would be changing to RF for normal targets. What i have is counting RF for vehicles. This is excel VBA.

Sub DWMonteCarlo()
'Version 1.1 corrected shot logic and added int protection to inputs
'This simulation looks to provid data on a weapon vs a vehicle for deathwatch

Application.ScreenUpdating = False
'Begin DW attack simulation
M1AR = 0 'attack roll
Hit = 0 ' die roll plus skill
DCount = 0 ' dummy variable to count dice to the d10 total
Dtotal = 0
RFflag = 0 ' flags if Rightoues fury occured
RFcounter = 0 ' Total counter of RF
MinRollCount = 0
OverallDam = 0 'counter of total damage to get average
Point10 = 0 'counter for number of shots that equal 10 or above





Randomize


BC = Worksheets("DWMC").Cells(2, 2) 'Battle count
M1AS = Worksheets("DWMC").Cells(3, 3) ' Marine 1 attack skill
M1D10 = Int(Worksheets("DWMC").Cells(4, 3)) ' Marine 1 number of D10s
M1mrd = Worksheets("DWMC").Cells(5, 3) ' Marine 1 minimum roll desired
M1Proven = Worksheets("DWMC").Cells(6, 3)
M1Tearing = Int(Worksheets("DWMC").Cells(7, 3))




Do While (BC > 0)
    BC = BC - 1

    ' mark the hit and success using high roll as good

    D100 = Rand(1, 100)
    M1AR = D100 + M1AS
    'MsgBox M1AR
    If (M1AR < 100) Then
        
    ElseIf (D100 < 6) Then
        
    Else
        Hit = (M1AR - 100) / 10
        Hit = Int(Hit) 'hit now carries the number of sucesses of the attack
    
 
        'Resolve hit
            If (M1Tearing > 0) Then 'adding extra die for tearing
                M1D10 = M1D10 + M1Tearing
            End If
                    
            'Clearing earlier rolls
            Range("E1:E10").Value = ""
            
            Do While (M1D10 > 0) 'Generating rolls
                Worksheets("DWMC").Cells(M1D10, 5) = Rand(1, 10)
                M1D10 = M1D10 - 1
            Loop
            M1D10 = Worksheets("DWMC").Cells(4, 3) 'Resetting M1D10 to base value
            
            Range("E1:E10").Select 'Sorting Rolls
            ActiveWorkbook.Worksheets("DWMC").Sort.SortFields.Clear
            ActiveWorkbook.Worksheets("DWMC").Sort.SortFields.Add Key:=Range("E1"), _
            SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
            With ActiveWorkbook.Worksheets("DWMC").Sort
                .SetRange Range("E1:E10")
                .Header = xlNo
                .MatchCase = False
                .Orientation = xlTopToBottom
                .SortMethod = xlPinYin
                .Apply
            End With
            'Finished Sorting
            
            'Getting the die roll total
            Dplace = 1
            If (M1Tearing > 0) Then
                Dplace = Dplace + M1Tearing
            End If
            For DCount = 1 To M1D10
                Droll = Worksheets("DWMC").Cells(Dplace, 5)
                'Checking for roll lower than proven
               If (Droll < M1Proven) Then
                    Droll = M1Proven
                End If
                'Applying hit successes to one die roll
                If (Droll < Hit) Then
                    Droll = Hit
                    Hit = 0
                End If
                'checking RF
                If (Droll > 9) Then
                    RFflag = 1
                End If
                Dtotal = Dtotal + Droll
                Dplace = Dplace + 1
            Next
            'Begin resolving results from set of rolls
            'Check to see if damage meets desired level
            If (Dtotal <= M1mrd) Then
                Dtotal = 0
                RFflag = 0
            Else
                If (RFflag > 0) Then 'On a damaging shot count RF occurance
                RFflag = 0 'reseting flag
                RFcount = RFcount + 1
                End If
                
                MinRollCount = MinRollCount + 1 'Increment count showing that this hit did damage
                OverallDam = OverallDam + Dtotal - M1mrd ' tallying total damage done
                If (Dtotal - M1mrd >= 10) Then
                    Point10 = Point10 + 1
                End If
                Dtotal = 0
                
            End If
     End If

Loop

Range("E1:E10").Value = ""
Application.ScreenUpdating = True

' Overall damage average
Worksheets("DWMC").Cells(8, 3) = OverallDam / Worksheets("DWMC").Cells(2, 2)

'overall damage average on a hit
If (MinRollCount > 0) Then
    Worksheets("DWMC").Cells(9, 3) = OverallDam / MinRollCount
Else
    Worksheets("DWMC").Cells(9, 3) = 0
End If

'RF percentage
If (RFcount > 0) Then
    Worksheets("DWMC").Cells(11, 3) = RFcount / Worksheets("DWMC").Cells(2, 2) * 100
Else
    Worksheets("DWMC").Cells(11, 3) = 0
End If

'Score 10 damage on a hit
Worksheets("DWMC").Cells(10, 3) = Point10 / Worksheets("DWMC").Cells(2, 2) * 100

Worksheets("DWMC").Cells(12, 3) = Delete

End Sub

and the die roller i use (i didn't write this)

'===============================================
'Rand - Return a random number in a given range.
'
'Parameters:
' Low - The lower bounds of the range.
' High - The upper bounds of the range.
'
'Returns:
' Returns a random number from Low..High.
'===============================================
Public Function Rand(ByVal Low As Long, _
ByVal High As Long) As Long
Rand = Int((High - Low + 1) * Rnd) + Low
End Function
Edited by Kamikazzijoe

and the excel sheet looks like this with the top left battlecount cell being A2:

BattleCount 10000 Fidelity vs cpu higher better but slower

Marine 1 Attack skill 65 total BS/WS roll including bonuses

D10s 3 D10s rolled by the weapon aka 3 for krak. Capped at 9

minimum roll desired 12 "account for armor, toughness, and constant damage here. You want the numb to be the highest roll possible while still doing 0 damage"<-long text line, not wrapping

Proven 0 Put the proven quality here

tearing 1 Put 1 for tearing (higher numbers will give more tearing dice)

Results Average Damage 3.7785

Avg Damage on hit 6.808108

% 10 Damage or more 13.29

RF % 17.49

Hmmmm i also see that while i count the Dos, i don't factor them in on a single turn so you'd have to add a loop in to do that.

you'd need a dodge roll to reduce DoS.

As for cover, assume its max in the minimum required damage cell and then add one damage every hit culmulatively to represent the hit.

Edited by Kamikazzijoe

Doesn't overwatch make the cover math unnecessary?

You go overwatch, take a -20 penalty and then never hit cover.

Yeah, it would (part of the reason I used it for the tac marine) but:

1) I've used it already, and I want to keep the tactics varied

2) I don't think I need it in this case

3) Overwatch does not specify that you can make the multiple attacks action, so normally only one weapon would be able to be fired, which is not nearly as fun.

As for the rest of it, that looks incredibly useful, thank you! I'll keep crunching away and see what I can come up with.

Here a first (very primitive) attempt to simulate a round of shooting. I hope it is running for you as I used open office for it.

https://www.dropbox.com/s/eexqs7e1pdz4lwb/rollings.xls?dl=0 *

Not that elegant, feel free to correct errors and improve 'coding'.

When will the victim dodge? I think about simply the first shot.

*(Is it possible to upload directly in this forum?)

Edited by next One

I think the problem here was not math.......

U have an Apothecary, who is going to be a Black Templar Sword Brother in Terminator Armour, wielding dual Assault Cannons....

Apothecary, with a -20 agility, with both hands inside assault cannons

(but it's possible to use two assault cannons? requisitions 60 for "termie" armor and 40 for arming, assult cannon was 30 for one)

no reductor and narthecium

why???

(he was the sigismund cousin?)

Edited by Walkot

Finally got the math done! It's better than I had thought. I may not actually need Master of Arms, and if I can avoid reusing it I'd like to, so I'll play with that today and tomorrow and see what I can do. Either way it'll take me a bit to write up, but I should have it finished in the next couple of days.

Walkot, Terminator armour requires a *minimum* of 40 points of additional requisition, there is no maximum, though. Certainly, the amount of requisition for this one is extreme (you forget the targeter and possibly a motion predictor as well), and with this gear he is useless for healing people. The main point of this was to show that if you start looking at Terminator wargear or Dreadnaught wargear anyone can get it done, even an Apothecary.

Also keep in mind that other than the 35 agility required to take two weapon wielder, agility does not factor into using two weapons, it's all based on ballistic skill (which apothecaries are also not great at, but oh well).

Thread reminds of why I have come to hate to GM Deathwatch. :(

nononono, Gurkhal you have to love to GM......

after all this math...just ask the "sigismund cousin" to leap and let him fall in the abyss......

"hoooo noooooooooooo, if only I left one hand free to grapple somewhere"

hahahahahaha

(just kidding guys, and sorry for my english)