Critical Failures Tables - Fallout2.exe

Just did a quick test for the burst settings before going to sleep, seems working well, at least the hit numbers are correct. (Minigun with 1-1 dmg & 1000 round burst, 5mm AP with 1/1 dmg mod, forcing 100% ToHit chance, against unarmored targets)

The divisor/multiplier settings for the primary target is great. The only change I can think of now is making the names of settings shorter. :P
Will test the build on XP/2003 machines tomorrow if I got some free time during work.

BTW, don't know if you add any check for preventing dividing by 0. And for parameter combinations that would make total bullets usage not equal to 100%.

I think I've added preventives against division by zero. As for the latter, I think we can just drop DivisorCenter parameter and calculate it based on DivisorSides (because normally people will want DivisorSides to be higher, so this will give more flexibility). As for target divisor/multiplier... well I could add checks so multiplier will be capped to be not greater than divisor.
 
Wait, what exactly is it supposed to do?

C - chosen one
T - targets

II - gun


___T1
T2____T3
___T4


___II
___C


Who is the primary target, and who is supposed to be hit for what percentage? Is the primary target who you select or whoever is closest to the point of origin?

More on T1 or T4?

Because if it isn't "whichever you select from T4 or T1, T4 catches all the bullets before X happens and the rest of the bullets can then possibly reach T1" then what is it?

And if the primary target is whoever was selected, then wouldn't it be possible to do more damage to the guy in the back than to the guy in front? Because I've never seen that happen the way it was, I've never seen a guy standing farther or behind someone take more damage than whoever was in front. And whenever I aimed at T1, T4 ussually took way more damage and often dropped dead.
 
Last edited:
BTW, don't know if you add any check for preventing dividing by 0. And for parameter combinations that would make total bullets usage not equal to 100%.
I think I've added preventives against division by zero. As for the latter, I think we can just drop DivisorCenter parameter and calculate it based on DivisorSides (because normally people will want DivisorSides to be higher, so this will give more flexibility). As for target divisor/multiplier... well I could add checks so multiplier will be capped to be not greater than divisor.
Sounds nice, and I like more flexibility. :)
Was thinking something like adding more checks on the total bullet count, but after some more thoughts my idea is unnecessarily complex.

EDIT: If you're going to make the change, might add a check forcing DivisorSides >= 3, because setting it to 1 or 2 doesn't make any sense (no bullets for center)
And maybe a master setting to completely disable/bypass the new feature? (just let the engine run its original code) e.g.:
(all in their default values)
BurstMod=0
Burst_DivisorSides=3
Burst_DividendTarget=1 ("multiplier" might be a little confusing IMO)
Burst_DivisorTarget=2
 
Last edited:
Please redownload: https://yadi.sk/d/3tFjWh8saPvWT
I changed my approach and rewritten entire block of code instead of just replacing divisors.
Now settings looks like this:
Code:
ComputeSprayMod=1
ComputeSpray_CenterMult=1
ComputeSpray_CenterDiv=3
ComputeSpray_TargetMult=1
ComputeSpray_TargetDiv=2

New formula allows to change bullet distribution in flexible way and it also guarantees that total number of bullets distributed is always equal to burst size:
- multipliers are capped at divisor value
- roundsLeft and roundsRight are calculated based on how much bullets goes to the center (no point in changing distribution between left and right sides)

Exact formula:
Code:
roundsCenter = totalRounds * CenterMult / CenterDiv;
if (roundsCenter == 0) 
    roundsCenter = 1;
roundsLeft = (totalRounds - roundsCenter) / 2;
roundsRight = totalRounds - roundsCenter - roundsLeft;
roundsMainTarget = roundsCenter * TargetMult / TargetDiv;
roundsRight it may not be equal to roundsLeft in some cases: example, total rounds 5, 2 rounds go to center, 3/2 = 1 goes to left, and remaining 5-2-1=2 goes to right.
So if you plan to change distribution, you should probably align burst sizes in weapon protos with CenterMult/CenterDiv so that even number of bullets will remain for the sides. Otherwise the guy to the right will be hit more often :D

For reference, they guy in front of the target receives (roundsCenter-roundsMainTarget) bullets. And roundsMainTarget is reduced depending on toHit chance. Doesn't mean that he gets every bullet, of course, because of how each bullet "spray" works (see previous posts).
 
Last edited:
Please redownload: https://yadi.sk/d/3tFjWh8saPvWT
I changed my approach and rewritten entire block of code instead of just replacing divisors.
Now settings looks like this:
Code:
ComputeSprayMod=1
ComputeSpray_CenterMult=1
ComputeSpray_CenterDiv=3
ComputeSpray_TargetMult=1
ComputeSpray_TargetDiv=2

New formula allows to change bullet distribution in flexible way and it also guarantees that total number of bullets distributed is always equal to burst size:
- multipliers are capped at divisor value
- roundsLeft and roundsRight are calculated based on how much bullets goes to the center (no point in changing distribution between left and right sides)

Exact formula:
Code:
roundsCenter = totalRounds * CenterMult / CenterDiv;
if (roundsCenter == 0)
    roundsCenter = 1;
roundsLeft = (totalRounds - roundsCenter) / 2;
roundsRight = totalRounds - roundsCenter - roundsLeft;
roundsMainTarget = roundsCenter * TargetMult / TargetDiv;
roundsRight it may not be equal to roundsLeft in some cases: example, total rounds 5, 2 rounds go to center, 3/2 = 1 goes to left, and remaining 5-2-1=2 goes to right.
So if you plan to change distribution, you should probably align burst sizes in weapon protos with CenterMult/CenterDiv so that even number of bullets will remain for the sides. Otherwise the guy to the right will be hit more often :D

For reference, they guy in front of the target receives (roundsCenter-roundsMainTarget) bullets. And roundsMainTarget is reduced depending on toHit chance. Doesn't mean that he gets every bullet, of course, because of how each bullet "spray" works (see previous posts).


Hey Mate, I'm not sure if you're still around, but could you upload your executable or other results of your work somewhere more permanent, like Dropbox or Mediafire?

Cheers.
 
For the record, I tried Jinxed with 10 Luck in Fixt (crafty's sfall 1.8), and guns were still exploding in my hands. Either the failure tables are different for F1, or sfall1 messes up somewhere, I guess.
 
Hey guys, been using that and works great, awesome modification.

On vanilla it seems like too few bullets are attempting the middle path and considering they can also miss, you are wasting the vast majority of ammo.

For machineguns with a lot of bullets per shot its sort of ok, like miniguns, but assault rifles and autoshotguns especially suffer as very rarely they can hit a distant target with anything more than 1 bullet.

After some experiment, 4 out of 9 proportion for middle path seems to work like a charm (4 attempt middle, 5 sprayed to the sides), making assault rifles a lot more useful in burst mode at distance.

Would be even more awesome if someone could code another weapon perk to change the burst proportion to less accurate for some weapons. Assault rifles, HKG11, support weapon, autoshotguns and laser gattling could use 4/9 mid as standard, while SMGs, Bozar and standard miniguns could use 3/9 mid via added spray-changing weapon perk.

This would also allow to highlight the inherent accuracy difference in automatic weapons as with vanilla spray calc they are all the same.

But I guess its incredibly hard and too much of an ask :D
 
Back
Top