I've been building some light labor saving VBA code for D22 (see below for example), and I think building a program to generate random loot (extremely random from the looks of what you're suggesting), shouldn't be too terribly hard.
In other words, if you ever get a decent amount of stuff together, I would gladly lend an hour or two to make it automatic.
'Burst Fire Module (Modified Single Shot Module)
Sub Burstfire()
'Variables
'T1 (Pure input)
Dim DamageScale As Integer
Dim ArmorInitial As Single
Dim SoakPercent As Single
Dim BurstSize As Integer
Dim Recoil As Single
Dim FireControlBonus As Single
'T2 (Used in program)
Dim Damage As Variant
Dim UnmoddedDamage As Variant
Dim EffectiveArmor As Single
Dim ArmorSoak As Single
Dim DamageIsString As Integer
Dim ToHit As Single
'T3 (Used in Output)
Dim HealthDamage As Single
Dim ArmorDamage As Single
Dim ArmorBonusDamage As Single
Dim EndArmorDamage As Single
Dim EndHealthDamage As Single
Dim EndArmorBonusDamage As Single
LineStart:
'Inputs
DamageScale = InputBox("What is the Damage Scale? (Small Arms)")
ArmorInitial = InputBox("What is the initial armor value?")
SoakPercent = InputBox("What is the soak% of the armor?")
BurstSize = InputBox("How many rounds are being fired?")
If BurstSize > 1 Then
FireControlBonus = InputBox("What is the shooter's total fire control bonus?")
Recoil = InputBox("What is the recoil value of the weapon?")
End If
'Check for the existence of additional factors that impact damage
ModifierCheck = MsgBox("Does the weapon have any relevant modifiers?", vbYesNo)
If ModifierCheck = vbYes Then
Damage_Modifier = InputBox("What is the weapon's High-Power stat? (1-5)")
Armor_Modifier = InputBox("What is the weapon's Armor Piercing stat? (1-5)")
Return_Loop = MsgBox("The attack has a damage scale of " & DamageScale & ", a high-power stat of " & Damage_Modifier & ", an armor piercing value of " & Armor_Modifier & ", is firing " & BurstSize & " rounds, and has a recoil of " & Recoil & ". The opponent has an armor of " & ArmorInitial & " and a soak percent to this damage type of " & SoakPercent & "%. Do you wish to continue?", vbYesNo)
Else
Return_Loop = MsgBox("The attack has a damage scale of " & DamageScale & ", is firing " & BurstSize & " rounds, and has a recoil of " & Recoil & ". The opponent has an armor of " & ArmorInitial & " and a soak percent to this damage type of " & SoakPercent & "%. Do you wish to continue?", vbYesNo)
End If
'Loop the program back to start if the user isn't happy with parameters
If Return_Loop = vbNo Then GoTo LineStart
'Process
'clear old data
Range(Sheet1.Cells(1, 2), Sheet1.Cells(10, 15)).ClearContents
'Begin Major burst loop
For i = BurstSize To 1 Step -1
Damage = 0
ArmorDamage = 0
ArmorBonusDamage = 0
ToHit = 22
EndRecoil = EndRecoil + Recoil
If i > 1 Then
ToHit = Application.WorksheetFunction.RandBetween(1, 22) + (Application.WorksheetFunction.RoundDown(FireControlBonus / 6, 0)) + ((FireControlBonus Mod 6) / (Application.WorksheetFunction.RandBetween(1, 6))) - EndRecoil
End If
If ToHit >= 12 Then
'Match up damage scale to damage range
DamageIsString = 0
If DamageScale = 1 Then
Damage = Application.WorksheetFunction.RandBetween(1, 7)
ElseIf DamageScale = 2 Then
Damage = Application.WorksheetFunction.RandBetween(3, 11)
ElseIf DamageScale = 3 Then
Damage = Application.WorksheetFunction.RandBetween(6, 16)
ElseIf DamageScale = 4 Then
Damage = Application.WorksheetFunction.RandBetween(10, 22)
ElseIf DamageScale = 5 Then
Damage = Application.WorksheetFunction.RandBetween(15, 29)
ElseIf DamageScale = 6 Then
Damage = Application.WorksheetFunction.RandBetween(21, 37)
ElseIf DamageScale = 7 Then
Damage = Application.WorksheetFunction.RandBetween(28, 46)
ElseIf DamageScale = 8 Then
Damage = Application.WorksheetFunction.RandBetween(36, 56)
ElseIf DamageScale > 8 Or DamageScale < 0 Then
Damage = "Invalid"
DamageIsString = 1
End If
'Record Damage Before I start changing stuff
UnmoddedDamage = Damage
'Add in High-Power Damage
If DamageIsString = 0 Then
Damage = Damage * (1 + (Damage_Modifier / 10))
End If
'Calculate Armor Values and compensate for armor piercing
EffectiveArmor = (ArmorInitial - (EndArmorDamage + EndArmorBonusDamage)) * ((SoakPercent - (5 * Armor_Modifier)) / 100)
ArmorSoak = (ArmorInitial - (EndArmorDamage + EndArmorBonusDamage)) * (((SoakPercent - (5 * Armor_Modifier)) * 0.2) / 100)
If EffectiveArmor < 0 Or ArmorSoak < 0 Then
ArmorSoak = 0
EffectiveArmor = 0
End If
'Modifying Raw Damage by Armor Soak and making sure it stays above zero.
If DamageIsString = 0 Then
Damage = Damage - ArmorSoak
Else: End If
If Damage < 0 Then
Damage = 0
Else: End If
'Tabulating exact damages to health and armor
If DamageIsString = 0 Then
If Damage <= EffectiveArmor Then
ArmorDamage = Damage
HealthDamage = 0
'Checking to add bonus AP damage
If Armor_Modifier > 0 Then
ArmorBonusDamage = (ArmorInitial * (SoakPercent / 100)) * (Armor_Modifier / 10)
End If
ElseIf Damage > EffectiveArmor Then
ArmorDamage = EffectiveArmor
HealthDamage = Damage - EffectiveArmor
'Checking to add bonus AP damage
If Armor_Modifier > 0 Then
ArmorBonusDamage = (ArmorInitial * (SoakPercent / 100)) * (Armor_Modifier / 10)
End If
End If
ElseIf DamageIsString = 1 Then
End If
EndArmorDamage = EndArmorDamage + ArmorDamage
EndHealthDamage = EndHealthDamage + HealthDamage
EndArmorBonusDamage = EndArmorBonusDamage + ArmorBonusDamage
End If
'Outputs
'Echoes and direct outputs
If DamageIsString = 0 Then
Sheet1.Cells(1, 1 + i).Value = DamageScale
Sheet1.Cells(2, 1 + i).Value = UnmoddedDamage
Sheet1.Cells(3, 1 + i).Value = Round(Damage, 0)
Sheet1.Cells(4, 1 + i).Value = ArmorInitial
Sheet1.Cells(5, 1 + i).Value = SoakPercent
Sheet1.Cells(6, 1 + i).Value = Round(EffectiveArmor, 1)
Sheet1.Cells(7, 1 + i).Value = Round(ArmorSoak, 1)
Sheet1.Cells(8, 1 + i).Value = Round(HealthDamage, 1)
Sheet1.Cells(9, 1 + i).Value = Round(ArmorDamage, 1)
Sheet1.Cells(10, 1 + i).Value = Round(ArmorBonusDamage, 1)
Else:
Sheet1.Cells(1, 1 + i).Value = DamageScale
Sheet1.Cells(2, 1 + i).Value = UnmoddedDamage
Sheet1.Cells(3, 1 + i).Value = Damage
Sheet1.Cells(4, 1 + i).Value = "N/A"
Sheet1.Cells(5, 1 + i).Value = "N/A"
Sheet1.Cells(6, 1 + i).Value = "N/A"
Sheet1.Cells(7, 1 + i).Value = "N/A"
Sheet1.Cells(8, 1 + i).Value = "N/A"
Sheet1.Cells(9, 1 + i).Value = "N/A"
Sheet1.Cells(10, 1 + i).Value = "N/A"
End If
'End of Primary Firing loop
Next
'Logic Block for determining output
If DamageIsString = 0 Then
If EndHealthDamage > 0 And EndArmorDamage > 0 Then
MsgBox (EndHealthDamage & " points of health damage and " & EndArmorDamage & " points of armor damage were inflicted.")
ElseIf EndHealthDamage = 0 And EndArmorDamage > 0 Then
MsgBox (EndArmorDamage & " points of Armor damage were inflicted, but the wearer was unharmed.")
ElseIf EndHealthDamage = 0 And EndArmorDamage = 0 Then
MsgBox ("The attack is completely absorbed by the defender's armor.")
ElseIf EndHealthDamage > 0 And EndArmorDamage = 0 Then
MsgBox (EndHealthDamage & " points of health damage were inflicted an effectively unarmored opponent!")
End If
Else:
MsgBox ("Damage Scale Must be between 1 and 8.")
End If
End Sub