Critical Failures Tables - Fallout2.exe

Kanhef said:
The function compute_attack is in charge of most of the process. Early on it makes a call to compute_spray; treating a single shot as a burst of 1 simplifies the code.
Actually, compute_spray is called if and only if weapon's animation type is 2E or 2F (burst attack and flame attack, respectively). Check for single shot/melee/etc. attacks is made elsewhere.

Kanhef said:
compute_spray calls check_ranged_miss to determine what happens to bullets that miss their target outright. check_ranged_miss includes a call to critter_is_dead, so it doesn't hit dead bodies (or at least doesn't show any messages about it).
Only 1/6 of the bullets (at least one) try to attack the primary target. I'm not absolutely sure about next part of the code, but it looks like check_ranged_miss checks only ONE of those 1/6 bullets that missed their target (I know this is weird; I suspect it's just a bug).

Kanhef said:
If you don't miss completely, compute_spray later calls shoot_along_path so bullets can hit critters in the way, no matter how skilled you are.
These are always called, except for case of critical failure (and even then, if "hit randomly" effect chose another target, they will be called, just the primary target will be changed). All the bullets are divided into three groups (left, right, central, that will contain about 1/3, 1/3, and 1/6+n bullets respectively, where n are leftover bullets from the initial 1/6 volley that attacked the primary target).
These three groups will then travel along three "parallel" tracks (but hex adjacent to the attacker is common for all of them), trying to hit targets on the way. And skill does matter - determine_to_hit is called every time the valid target is found. Basically, when the group of bullets finds the target, the bullets try to hit it one by one until one of them fails. Then they move on to the next target.

The above was confirmed in-game. I used minigun throwing 1000 bullets at a time (I set ToHit to constant 95%), about 180 hit the primary target, the rest were hit by around 20 - which is the expected value, 1/(1-0.95). When I changed ToHit to constant 100%, the primary target was hit by 334, and the two at it's sides for 333.

Kanhef said:
it looks like the armor-piercing unarmed attacks ignore the target's damage threshold (DT), whereas armor-bypassing criticals ignore damage resistance. With the critical chance bonus from these attacks, it's not hard to get both at once.
Armor-piercing unarmed attacks are equivalent to attacks with weapons with Weapon Penetrate perk. They are dividing the target's DT by 5.
Armor-bypassing criticals are dividing the target's DT by 5, dividing target's inherent DR (that gained from armour, drugs, perks/implants in case of player) by 5 and ignoring Finesse trait DR bonus. The DR from bullet's dr_mod is applied normally.
Effects of these two does not stack. Armor-bypassing critical hit won't work with EMP weapons.


In about two weeks, I'll make a nice PDF with (almost) fully described mechanics of combat in FO2. It should clarify even more issues.
 
Sorry to resurrect the old thread, but does anyone know which hex offsets to edit to adjust these bullet proportions? I am trying to make it 50% in the middle and 25% each to the sides. Unfortunately my hacking skills are nowhere near Atom's. A hint in the right direction of how to get to these would be good too.
 
Does anyone has a copy of that fallout functions list? The links are broken :(
I really want to make more sense of fallout2 engine code.
 
I think I've found the relevant code. Does anyone have suggestions on how bursts should be fixed? For once, I think that logic (to hit check is made for each bullet until the first bullet misses) is strange.
 
I think I've found the relevant code. Does anyone have suggestions on how bursts should be fixed? For once, I think that logic (to hit check is made for each bullet until the first bullet misses) is strange.
As long as there's an easy way to adjust the proportion of bullets (like 1/4, 1/4, 1/4+n, with initial 1/4 volley attacking the primary target), I'm fine with "bullets trying to hit the target one by one until one of them fails then move on to the next target" logic.
 
I think I've found the relevant code. Does anyone have suggestions on how bursts should be fixed? For once, I think that logic (to hit check is made for each bullet until the first bullet misses) is strange.
As long as there's an easy way to adjust the proportion of bullets (like 1/4, 1/4, 1/4+n, with initial 1/4 volley attacking the primary target), I'm fine with "bullets trying to hit the target one by one until one of them fails then move on to the next target" logic.

I was thinking: changing so more bullets in bursts hit the target would benefit my mod, because there is less ammo in the game and using bursts becomes very uneconomical (dmg/bullets ratio is very low compared to single shots; while it should be lower, the balance may be adjusted).

I'm aware about Jims solution, but I want to stick to original code as much as possible (so this change will be more balanced and controlled, and take less time to do).
 
I'm not sure I understand the problem on the user end - yes burst is highly uneconomical, but it's also AoE. Once you can effectively burst stuff in a zone, you've "beaten" that zone. Once you can survive enemy burst, you're kinda safe from enemies. Minigun (the basic one) is highly overpowered, tbh, the only downside it has is ammo inefficency.

The formula, I think, works to make the melee guys who rush at you soak up more bullets in order to provide cover for the guys with guns in the back. "Counts bullets untill one misses in a direction" simply means that when you use burst, most of it will hit the guy right in front of you (untill he drops, because he's hard to miss) and then the rest will maybe hit the next guy in a row.

It's also kinda does exactly what you want to do most of the time when you're using burst - when you're sure you can't miss, but also want to do a bit of AoE damage or take out two or 3 guys.

AoE is also probably the most effective thing enemies have too - it kinda always hits somebody. If you made burst more powerful I'm not sure if you could really fight enemies with enough of it. Guys with AP ammo on guns with a bit of range (or in closer quarters) are plenty tough as it is... And since enemies mostly always target the Chosen One, if you focused the bullets on the intended target AND made it more efficent, you'd probably drop dead every time you lose sequence XD

And finaly, if burst simply counts each bullet, then each bullet can crit (can it?), and I seem to remember scoring some pretty high burst crits. I thik better criticals and more criticals apply to them. Also, I think Bonus Ranged Damage applies to burst bullets (not sure about Living Anatomy).




So, err, I'm kinda confused, what's wrong with burst anyway?
 
Last edited:
So, err, I'm kinda confused, what's wrong with burst anyway?

Well to me it seams unfair that even when you have 95% to hit and burst 100 bullets, only few of them will hit because of strange logic (basically it means: if one bullet misses, every other bullet in a row will miss no matter what.
My idea was not to make burst "more powerful", but to make ammo drain more fair (I can compensate for higher power with less burst size, and add some "to hit" penalty for each bullet).

However if you think about realism.. when you bursting at some target with automatic weapon, usually only a few round will hit it and every other will fly above or below due to a recoil. It may not be true for every weapon though, and it's a game after all (not very realistic in general and isometric turn-based :D) - heck, you can fire a minigun from hands without power armor!

So I'm thinking to add config parameters to ddraw.ini to select divisor for burst round to center, left and right (instead of 1/3 for all of them) and other parameter to change how hit is calculated for each bullet in given burst direction.
 
Hmmm, I don't think it was supposed to work like that, I think it was supposed to work like it does most of the time (when you have a weapon with a semi-sensible sized magazine): the bullets were ment to hit the closest target and not miss much due to 95%, and make that target a meatshield for the one behind it. You don't burst someone you want to kill, you burst the guy you want some AoE on after the guy in front of you drops dead.


And if you're doing like that (and I am) then it's pretty good most of the time. In fact it's gamebreaking if you ever get control over a minigun (the basic one). *

For the love of jesus don't mess with the ammo drain, on it, if there wasn't silly ammo drain burst weapons would be OP XD I've played you mod on harsh/harsh, and I sold ammo for burst weapons as I had too much at times. In fact - I bursted like mad at times to lose carry weight, litterally. It's the only thing keeping them in check somewhat (besides AP ammo needs). You need extreme ammo inefficency to make the player reload all the time too.

And don't mess with burst size or power, either! The game uses it to make enemies invincible (like VC patrols and stuff), and it's ment to give enemies and edge against parties while not murdering the Chosen One all the time! If you make more hits hit the target, CO will get murdered in every possible encounter all the time.

And if you make the calculation for every bullet - the game really, truly isn't balanced and can't possibly be balanced to not make firing a 100 bullets at someone with each bullet having a chance to hit a instakill on the target (or several). Yeah, it seems unfair, but it's basically the only way to have burst weapons a sensible low point in weapon damage.



I think the way it works is the only way it works, and tbh it doesn't work now, not because of it's downisdes but because it destroys everything. I think the original decision to not give control over NPC's was directly related to the impossible theoretical power of burst. Also this is probably the reason aimed shots were made broken beyond belief, too.

So, err, don't mess with it?



*I wan't to pull my hair out whenever I hear about people wanting to put more miniguns and such in the game, because the concept of even semi reliable burst f**ks the game balance up harder then aimed shots (as you can nerf those / disable slayer and sniper). This is also why they nerfed the combat shotgun from the first game, a reliable burst weapon kills combat dead.
 
Last edited:
So I'm thinking to add config parameters to ddraw.ini to select divisor for burst round to center, left and right (instead of 1/3 for all of them) and other parameter to change how hit is calculated for each bullet in given burst direction.
Actually the center 1/3 is divided into 2 groups, so if there's a poor guy right in the middle of your line of fire, he would take 1/6 of bullets in theory (if all bullets hit).
You might need to add four config parameters: right, left, center_pri, center_etc. And I totally support your "sticking to original code as much as possible" way. :)
 
You guys don't know what you're doing. Whatever you do, make it optional, I see someone fiddling with burst* I ussually drop the mod immediately. That was there for a very good reason -.- Burst guys aim for the chosen one, everyone does, and they're deadly enough as it is. You make it count more bullets / make it more accurate you break the game, and if you make the ammo costs less prohibitive you break a few allready stupidly good weapons even more gamebreaking.

Realism and "common sense" needs to be kept a long, long way away from burst formula editing.

And you bloody have to read long explanations when making changes like that. I could write a damned novel, but I can't write an SMS on it, because if it were simple you would've noticed it and stayed away from it on your own -.- Just because somethign is relatively simple to edit doesn't mean the concequences are simple, and you can't apply the change but ignore the concequences because the concequences are too complicated. -.-

There's nothing wrong with burst in practice, in game, with the current formula. Don't touch it, pls.

*(especially with words like "it's not fair", "it's unrealistic" or "it doesn't make sense to me". It makes perfect sense when you understand it, it can't be realistic and balanced at the same time, and the only way in which the burst is not fair is to the guy getting bursted down in practice. That's why aimed shots were overbuffed and why big guns were kept away from the player in the game to begin with, burst is an impossibly OP concept unless you make it extremly inefficent and unsustainable -.-)



Actually the center 1/3 is divided into 2 groups, so if there's a poor guy right in the middle of your line of fire, he would take 1/6 of bullets in theory (if all bullets hit).

That's how you USE burst. You aim at someone at the back and mow down anyone in the line of fire, and then single shot the guy back guy later. That's the whole point of it, if it actually hit the guy who it was aimed at you couldn't live through a fight against AP ammo guys at all -.- The formula should basically mean that all the bullets which miss people in the line of fire have a chance to hit the intended target. This is how it works in practice, or rather, this is how I've thought it works and saw nothing wrong with the effects I was getting.

The only time when it falters is when you're directly bursting one guy and you miss early, but wth, it doesn't keep burst weapons from being plenty OP.
 
Last edited:
You guys don't know what you're doing. Whatever you do, make it optional, I see someone fiddling with burst I ussually drop the mod immediately. That was there for a very good reason -.- Burst guys aim for the chosen one, everyone does, and they're deadly enough as it is. You make it count more bullets / make it more accurate you break the game, and if you make the ammo costs less prohibitive you break a few allready stupidly good weapons even more gamebreaking.
Don't worry. I'm sure phobos will make the settings optional and adjustable. Everyone's happy.
 
You guys don't know what you're doing. Whatever you do, make it optional, I see someone fiddling with burst I ussually drop the mod immediately. That was there for a very good reason -.- Burst guys aim for the chosen one, everyone does, and they're deadly enough as it is. You make it count more bullets / make it more accurate you break the game, and if you make the ammo costs less prohibitive you break a few allready stupidly good weapons even more gamebreaking.
Don't worry. I'm sure phobos will make the settings optional and adjustable. Everyone's happy.

Meh, you'll be happy untill the first time you see it in practice. -.- I'm the last guy to hold "original design" in high regard when it comes to Fallout 2 for nebulous reasons, but this thing I'm pretty certain about WHY it's a bad idea and why it is like it is. You apply a burst mechanic change to weapons on enemies you mess up worse than you can immagine. The way they choose targets or even aggro is allready making it impossible to make use of a companion as a damage soak, if you make burst actually do more on the intended target you just make it worse.

I'm not going to not apply it "because I don't like it", but because it's a VERY VERY VERY bad idea. VERY.

And the ammo consumption rates in regards to phoboses mod especially. He may THINK he nerfed the ammo availability rates significantly enough, but that just put ammo at "waaaaaaaaaay too much of it everywhere even with no grinding" instead of "complete joke" that vanilla is. 0 need to worry about that, I can say after 2 rather through playthroughs (he's yet to achieve the holy grail of making a player actually buy ammo, even with the most harsh settings). Making burst rates more efficent is the last thing you'd want.
 
Last edited:
Calm down, lujo, you are exaggerating this problem. I want to do it because it seems easy, yes. It doesn't mean I will go ahead and make bursts twice as powerful blindly. For once, someone else could use this settings, because:
1) it may be fun to try
2) someone always wanted this
3) someone want this for his/her mod

And after I play with different settings, maybe some small changes will go into the mod. So don't worry :)
 
Ok, here is my first build: https://yadi.sk/d/3tFjWh8saPvWT (it is based on sfall r273 with debugging enabled, compiled under VS2010)

Add this INI settings under "Misc" section:
Code:
; 1 - emit light, 0 - disable
ExplosionsEmitLight=1

ComputeSpray_DivisorCenter=2
ComputeSpray_DivisorSides=4
ComputeSpray_DivisorTarget=3
ComputeSpray_MultiplierTarget=2
The default (vanilla) values are 3 for DivisorCenter and DivisorSides and 2 for DivisorTarget (there was no multiplier, I had to add it).
In this example, 25% of bullets will go to each side, and remaining 50% will be divided into two groups:
~2/3 of bullets will try to hit the target. With lower "to hit" chance, more bullets will go toward the secondary target.
~1/3 of bullets will hit secondary target.

I may be wrong with this conclusions, so anyone is free to test it and comment :)

ExplosionsEmitLight is not perfect:
1) some projectile prototypes need adjustments (too large light radius for plasma beams, etc.)
2) a portion of light flashes remains on the ground until you re-enter the map. I think there should be some function to redraw the lighting, but I'm not sure.


PS: would be cool if someone would test it under win XP and tell me if it works
 
Last edited:
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%.
 
Last edited:
Back
Top