Critical Failures Tables - Fallout2.exe

Discussion in 'Fallout General Modding' started by lisac2k, Apr 2, 2009.

  1. phobos2077

    phobos2077 Mildly Dipped

    Apr 24, 2010
    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.
  2. lujo

    lujo Look, Ma! Two Heads!

    Jun 14, 2013
    Wait, what exactly is it supposed to do?

    C - chosen one
    T - targets

    II - gun



    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: Aug 25, 2014
  3. NovaRain

    NovaRain Casual Modder Modder Moderator

    Mar 10, 2007
    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)
    Burst_DividendTarget=1 ("multiplier" might be a little confusing IMO)
    Last edited: Aug 26, 2014
  4. phobos2077

    phobos2077 Mildly Dipped

    Apr 24, 2010
    Please redownload:
    I changed my approach and rewritten entire block of code instead of just replacing divisors.
    Now settings looks like this:
    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:
    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: Aug 26, 2014
    • [Like] [Like] x 1
  5. steiner

    steiner First time out of the vault

    Dec 21, 2011

    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?

  6. NovaRain

    NovaRain Casual Modder Modder Moderator

    Mar 10, 2007
    It's already been included in sfall.
    • [Like] [Like] x 1
  7. burn

    burn A Smooth-Skin

    Apr 22, 2012
    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.
  8. steiner

    steiner First time out of the vault

    Dec 21, 2011
    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