Yazman said:
Critical hits and the associated gore is one of the "pure fun" things in Fallout.. take them away and you're taking a pretty big risk imo. Only do it if you're absolutely sure they will be back and not relegated to the back burner for all time.
I came up with a way to add critical hits but only for the player. In order to give them to everyone else, I need to be able to determine who the attacker is - which currently is not possible.
As for the gore, that's actually scripted. Infact, it is likely you wouldn't be able to tell the difference, other than the fact that the degree of injury(gore) would be based on the damage to that body part. And bloody mess of course, being a unique trait just for the player, should also still work just fine.
zag said:
Dubby said:
For now, critical hits don't even occur. This is a requirement of the damage changes, because for the equations to function *properly* they must replace the critical effect on all weapons. This is because the script function "GetHitLocation" will only operate in two cases. One, inside a perk; and two, inside the critical-hit-effect-script of a weapon.
Once I can get who the attacker is, then I can implement critical success AND critical failure.
wow, i didnt know that, thanks. so the critical hits rely on the weapon and the perks, not the stats of the character? a character with Luck = 2 has the same critical chance with a rocket launcher that he would have if he had Luck = 10?
then whats the point of designing a character? all you need to do is collect the right items.
Critical %[percent] is actually an actor value, if I remember correctly, that gets modified by various perks and what not. It's based on the luck stat. Weapons have a critical % multiplier that can reduce the critical chance to 0%[always], raise it by 50%, double it, or increase it to 100%[always] chance. Right now, damage calculations are performed inside the critical hit effect's script slot, which is required because the script needs to be able to use GetHitLocation, which won't function properly unless it is processed in the same block as the weapon attack. Enchantment effects on a weapon are processed *after* the weapon attack is processed, so that function fails to work there. Effects on perks that alter the damage are also processed during the weapon attack 'block', which is primarily where GetHitLocation is used.
Like I said, I can make critical hits work but only if the target of that attack isn't the player. In other words, if the player attacks a raider, then that damage calculation would use a critical hit formula. Of course, if the raider attacked a deathclaw, then the raider's damage calc would use the same critical hit formula -too-. Of course if either of those enemies attacked the player, neither of their attacks would use the critical hit formula.
There may be a few ways to "trick" the script into only doing this for the player's attacks, but there is no garuntee of reliability. This is because the only way this would work would be to check if the target of the damage was NOT the player, and use the crit formula if that is true. The values in the formula would be based off of globals. Not a very clean solution, and I'm not fond of it either, but if criticals are that imperitive than this is the best solution I can offer right now.