[FO1] Do ammo modifiers actually work?

Discussion in 'Fallout General Modding' started by weirwood, Mar 29, 2008.

  1. weirwood

    weirwood First time out of the vault

    21
    Mar 29, 2008
    So. First of all, hi folks. Good to see the Fallout community is still alive & kicking after all these years. I've recently reinstalled FO1 after a long, long time.

    Now, Per's excellent FO1 guide had some interesting things to say about ammo modifiers, which, amongst other things seemed to reveal the assault rifle as an awesome weapon, and the 14mm pistol as a sucky one. I even found the formula on this board:

    However, in-game, nothing of this seems to hold water. During some crude testing, both 10mm JHP and AP dealt the same damage against combat-armored Hub police (0-5), as do the double-barreled shotgun and the 14mm pistol; (both have a base damage of 12-22, against combat armor they do 5-11 damage each) The assault rifle, which supposedly has a -35 DR mod dealt whooping 2-7 dmg per shot.

    One thing I have been able to confirm is that weapons with the 'Penetrate' perk, or the .223 pistol, at least, indeed ignore Damage Threshold.

    It appears that whatever ammo modifiers exist in the code are simply disabled somewhere down the line.

    Now, the problem I have is that my installation isn't 100% pristine. I've got the US version, which I patched to 1.1, after which I've used the semi-official 1.2 and unofficial 1.3.3 patches from TeamX.
    Can anyone with an unmodded installation of FO1 confirm my findings? I don't believe it's a bug due to these unofficial patches, but I'd like to be sure.[/quote]
     
  2. Cubik2k

    Cubik2k Where'd That 6th Toe Come From?
    Modder

    470
    Nov 22, 2005
    Ammo modifiers will not work in Fallout 1. Never. This is a bug in the engine of fallout.exe file. Very hard to fix.
     
  3. weirwood

    weirwood First time out of the vault

    21
    Mar 29, 2008
    Thanks for clearing that up. This doesn't seem to be well known in the community, I've never read about this anywhere. Probably since few people play Fallout 1 anymore.
     
  4. Kanhef

    Kanhef Vault Dweller

    793
    Sep 2, 2007
    That makes another reason to try and port it into FO2.
     
  5. Cubik2k

    Cubik2k Where'd That 6th Toe Come From?
    Modder

    470
    Nov 22, 2005
    The formula of damage calculating in FO1 is:

    Code:
    Dmg_:=(Dmg_w-DT_armor)-((Dmg_w-DT_armor)*DR_armor)
     
  6. Per

    Per Vault Consort Staff Member Admin

    Apr 1, 2004
    Well, that certainly explains why I couldn't see much difference between the 5mm ammo types. Couldn't you write that as:

    Code:
    Dmg_:=(Dmg_w-DT_armor)*(1-DR_armor)
    Also I believe if Assault Rifle is a worthwhile weapon in Fo1 it's probably more because of lack of alternatives/relative ammo scarcity. In Fo2 it should never be used.
     
  7. weirwood

    weirwood First time out of the vault

    21
    Mar 29, 2008
    The problem with the Assault Rifle in FO1 is that it's already obsolete by the time you get it, seeing how it becomes available at the same time as the combat shotgun, .223 pistol and sniper rifle.

    It might be worth keeping equipped for its decent burst mode, but as a primary weapon, it sucks because of the crappy single shot damage.

    Either way, should you ever update your FO1 guide, Per, the ammo issue is some pretty relevant information. You could also include that the 'penetrate' perk on the .223 power fist and ripper means these weapons ignore DT, I've tested it some more. I assume it's the same case in FO2. I've always wondered why the .223 pistol seemed to consistently outperform both the sniper rifle and RR LE, per shot, this explains it.
     
  8. Glovz

    Glovz Vault Dweller
    Modder

    736
    Sep 16, 2005
    The damage formula Cubik has listed is his understanding by reverse engineering. What we need is to identify the function in the FO1 engine and analyze it; something maybe Timeslip could do, then define what should and how it could change, and change it.

    If the weapons are not using a perk correctly then that would be in a seperate function, again task for Timeslip.

    If weapon values are incorrect then modifying the weapons .pro file should be enough.
     
  9. Cubik2k

    Cubik2k Where'd That 6th Toe Come From?
    Modder

    470
    Nov 22, 2005
    Some time I found those functions in engine of Fallout 1 but this was about a year ago. But if someone would like make a look at this functions I will find this for him/her ;)

    Glovz, are you interesting in this matter?
     
  10. Glovz

    Glovz Vault Dweller
    Modder

    736
    Sep 16, 2005
    I think this is the function in the Fallout 1 engine that deals with damage, but I do not have Fallout 1 (entire game) in order to test it - this is just an educated guess from looking at the Fallout 1 exe (from the official patch):

    FALLOUT 1

    Code:
    0042227E  |> 8B56 04        /MOV EDX,DWORD PTR DS:[ESI+4]
    00422281  |. 8B06           |MOV EAX,DWORD PTR DS:[ESI]
    00422283  |. 8B5C24 18      |MOV EBX,DWORD PTR SS:[ESP+18]
    00422287  |. E8 FC890400    |CALL FALLOUTW.0046AC88
    0042228C  |. 01C3           |ADD EBX,EAX
    0042228E  |. 8B4424 10      |MOV EAX,DWORD PTR SS:[ESP+10]
    00422292  |. 0FAFD8         |IMUL EBX,EAX
    00422295  |. 89DA           |MOV EDX,EBX
    00422297  |. 89D8           |MOV EAX,EBX
    00422299  |. C1FA 1F        |SAR EDX,1F
    0042229C  |. 2BC2           |SUB EAX,EDX
    0042229E  |. D1F8           |SAR EAX,1
    004222A0  |. 0FAFC5         |IMUL EAX,EBP
    004222A3  |. 89C2           |MOV EDX,EAX
    004222A5  |. BB 64000000    |MOV EBX,64
    004222AA  |. C1FA 1F        |SAR EDX,1F
    004222AD  |. F7FB           |IDIV EBX
    004222AF  |. 8B5424 20      |MOV EDX,DWORD PTR SS:[ESP+20]
    004222B3  |. 89C3           |MOV EBX,EAX
    004222B5  |. 29D3           |SUB EBX,EDX
    004222B7  |. 85DB           |TEST EBX,EBX
    004222B9  |. 7E 1A          |JLE SHORT FALLOUTW.004222D5
    004222BB  |. 8B5424 1C      |MOV EDX,DWORD PTR SS:[ESP+1C]
    004222BF  |. 0FAFD3         |IMUL EDX,EBX
    004222C2  |. C74424 24 6400>|MOV DWORD PTR SS:[ESP+24],64
    004222CA  |. 89D0           |MOV EAX,EDX
    004222CC  |. C1FA 1F        |SAR EDX,1F
    004222CF  |. F77C24 24      |IDIV DWORD PTR SS:[ESP+24]
    004222D3  |. 29C3           |SUB EBX,EAX
    004222D5  |> 85DB           |TEST EBX,EBX
    004222D7  |. 7E 02          |JLE SHORT FALLOUTW.004222DB
    004222D9  |. 011F           |ADD DWORD PTR DS:[EDI],EBX
    004222DB  |> 8B4424 14      |MOV EAX,DWORD PTR SS:[ESP+14]
    004222DF  |. 41             |INC ECX
    004222E0  |. 39C1           |CMP ECX,EAX
    004222E2  |.^7C 9A          \JL SHORT FALLOUTW.0042227E
    Someone now needs to identify the values being passed in by the pointers.
     
  11. Slaughter Manslaught

    Slaughter Manslaught Vault Senior Citizen

    Dec 11, 2006
    Yeah, the Assault Rifle, for a weapon, makes for fine firewood when you're trekking near Vault City... Also, the 10mm SMG is much better anyway.
     
  12. Sorrow

    Sorrow So Old I'm Losing Radiation Signs

    Feb 9, 2006
    I've done some testing and the armour class modifier (which modifies accuracy) doesn't work either.
     
  13. Per

    Per Vault Consort Staff Member Admin

    Apr 1, 2004
    I know it doesn't change the displayed chance to hit as in Fo2, but are you sure it doesn't work at all? Did you do some statistical testing?
     
  14. weirwood

    weirwood First time out of the vault

    21
    Mar 29, 2008
    CubiK2k seems to have taken a good look under the hood, he'd be most qualified to answer that. As it is, the bug seems to be for all ammo modifiers in general. It's confirmed that neither damage nor resistance modifiers work, there's no reason to believe that AC modifiers do.

    There's a slight addendum to be made to this; it seems to hold true for most enemies, but I've got some conflicting results for Brotherhood Paladins, further complicated since it seems they might also use Hardened Power Armor instead of regular.

    To wit, the Penetrate perk seems to reduce DT by 5 instead of completely ignoring it.
     
  15. Sorrow

    Sorrow So Old I'm Losing Radiation Signs

    Feb 9, 2006
    Yes, it doesn't work at all. I changed AC modifier to 50 and 100 and it didn't affect the chance of hitting the enemy.