Damage Threshold

olegbl

First time out of the vault
Hi,
I've set about trying to implement damage threshold into Fallout 3, since I believe it is a very, very important combat mechanic from the previous Fallout games.
I've managed to set up a very stupid, simple, and functional only for the main player system which works by basically healing you every frame if you got hit while in combat. The amount of healing (threshold) is determined as a percentage of Armor Rating. Unfortunately, this is a really bad approach and doesn't fit in with the way damage threshold was implemented in Fallout 1/2.
I've tried to use the Begin OnHit block to be able to add the script to armors (right now, it's a perk), and thus be able to possibly implement a cleaner solution that would enable thresholds for ALL characters in the game (who wear armor). However, the OnHit doesn't seem to do anything for me, probably because I am a novice at modding Bethesda games, and am not using it correctly.
If anyone knows how to use the OnHit trigger I would be very grateful for an explanation!
Also, If anyone knows how to detect how much damage was done to a player during an OnHit trigger, that would be immensly helpful as well! (Right now, I'm recording health on every frame... very bad heheh)
A third question I have is if anyone knows how to add a permanent base/actor effect to NPC's. I need to add this effect to essentially all NPC's in the game, and I'd rather not try to do it at run time with a script. But if that's what needs to be done, I'd at least do that. As of right now, I'm at a loss as to how to accomplish this.
Thank you for any help!
 
Fallout 1 & Fallout 2's damage engine was flawed. Armor penetration was never finished correctly, and there are a few mods which attempt to fix it. It has to do with the equations being inaccurate.

TESIV (Oblivion & Fallout 3) does not support thresholds, and never will.

Since you appear concerned enough about this, I may be able to save you the trouble of spending your time on this. F3C is working on a physics-based mathematical solution for armor penetration and damage that is nearly complete. This new system is significantly more advanced than the original formulas in Fallout 1 & 2. Those original formulas attempted to emulate what this system does.
 
Well, I know about the AP in F1/2 and about the systems in TES/F3. I mean, I'm trying to implement a threshold system (which I think is a very smart system) because I think that if you're wearing something like power armor, punches shouldn't so much as hurt you. Neither should common pistols, etc. In F1/2 that was emulated OK, not perfect, but pretty good.

Anyway, I saw some threads for the F3C damage system, but I didn't see any threshold type thing in there. Will it work similar to what I described above? (Weaker weapons have no [or at least almost no] effect on opponents in superior armor.)

Thank you for your reply! =D
 
olegbl said:
Well, I know about the AP in F1/2 and about the systems in TES/F3. I mean, I'm trying to implement a threshold system (which I think is a very smart system) because I think that if you're wearing something like power armor, punches shouldn't so much as hurt you. Neither should common pistols, etc. In F1/2 that was emulated OK, not perfect, but pretty good.

Anyway, I saw some threads for the F3C damage system, but I didn't see any threshold type thing in there. Will it work similar to what I described above? (Weaker weapons have no [or at least almost no] effect on opponents in superior armor.)

Thank you for your reply! =D

Because the system in F1/2 emulate the physics that the F3C system is actually doing, *yes*. Here, I will satiate your appetite with some formulas. (These are not the actual script code, but trunciated equations)

______ t = Armor thickness
______ d = Projectile diameter
______ m = Projectile weight
______ V = Projectile velocity

______ Mod = Damage mod for the ammunition
______ J = 1/2 m V^2
______ F = ( t / d * 25.4 - 0.45 ) 3645.6 + 12191
______ T = t d^2 F^2 * 0.005177409
______ eR = J / T

______ IF { eR >= 1 }
______ (this happens if the projectile penetrates the body part, which results in penetrating trauma damage)
____________ wV = ((( J - T ) / m * 2 )^2 ) J V * 4
____________ wE = 1/2 m wV^2
____________ wD = Calculated based on many different factors, depending on the type of projectile (including melee objects)
____________ wP = 7.233 * m wV / wD / 5
____________ wC = 3.28084 * wV wD / 240 * Mod
____________ Dmg = (( wP wC ) ^0.5 ) MaxHP * LimbPercent / 100 / LimbDepth * LimbHealthRatio
____________ not done yet, and it also includes damage over time from bleeding.
______ ELSE
______ (this happens if the projectile fails to penetrate the body part, which results in blunt force trauma damage)
____________ still not done yet :P


What it all boils down to is a very realistic system of damage calculation.

I've been doing a LOT of test calculations with this system, and not all of it is shown either, and it works out very well. One thing it controls that is not listed above is damage to the armor's health, or the fact that the armor penetration is based on whether or not the body part that was hit was -actually- covered in armor or not.
 
Wow, very nice!
The formulas look physically sound, so that's cool.
I'm now really looking forward to seeing this in action! =D

I've also looked over the F3C as it is right now, and, er, isn't VATS slightly over powered atm (I can fire like 10 shots before my enemy gets his weapon out by entering vats 10 times continuously, whereas in F1/2 accessing inv. to equip weapon was 4AP and shooting say a pistol was also 4AP?), or will this system fix that up as well?

Good luck on your project! =D
 
Back
Top