Jump to content

Damage Blocking


TheNexxusOne

Recommended Posts

I;ve messed around with this.

The way to reliably do this is to add an object effect script to armors you want to block.

Have them remember the health from last frame and compare that to the current frame's health.

If the current frame's health is lower than then previous frame's health, you can subtract the current from the previous to get the damage done. you can then restore as much health as you want to according to your own formula, this is "blocked" by the armor.

 

Needless to say, anything that kills you in one shot the won't be blocked.

Implementing this is a fair bit of legwork, but I'll post the basic concept script under here, it blocks AR * 0.2 damage, it's not what I personally use, but you'll be able to see that once I post my mod.

 

So, to re-iterate

Armors are given object effects

These object effects get a base effect that references the script below.

 

float LastHealth
float AR
float Damage
short DoOnce

Begin GameMode
if DoOnce != 1
	set LastHealth to GetActorValue Health
	set DoOnce to 1
Endif

set Damage to LastHealth - GetActorValue Health
set AR to GetArmorRating * 0.2

if Damage > 0
	if Damage < AR
		set AR to Damage
	Endif

	if( AR > 0 )
		RestoreActorValue Health AR
	Endif
Endif

set LastHealth to GetActorValue Health
End

Link to comment
Share on other sites

I'm actually working on a mod very similiar to this, using those resists and changing a majority of the guns to use the specific damage type, IE certain small arms (pistol, smg, assault rifle, hunting rifle) and melee weapons all use regular "DamageResist", and bumping up power armor to 95% resistance to type "DamageResist", bumping up combat armor to 45% "DamageResist" and regular clothing having little to none resist. Then certain weapons like the sniper rifle will use "FrostResist" (which is my substitute for armor piercing), which power armor will resist 50-75%, combat armor will resist maybe 20%, and unresisted by regular clothing/raider gear. Plasma and laser (energy and elec resists, respectively) will be unresisted by clothes, almost unresisted by combat armor, and low resist by power armors. Then I'll work on some sort of rebalance for poison/fire/emp, so that those damage types are more effective against certain enemies (fire good against raiders, suicide against hellfire enclave, or emp good against robots, worthless against biological enemies). I never understood why all the stuff you can read in game says that power armor is basicly god mode, then i use the xuanlong rifle to effortlessly knock heads off the enclave.
Link to comment
Share on other sites

Well, I'm guessing this is something that the devs were planning on implementing in the first place, but didnt get to polish. However, I read about them implementing new defense mechanisms in fallout vegas, like enemies immune to certain weapons, so you either have to go around or find a bigger gun. Looks like vegas is going to be full to the brim with stuff that fo3 should have had, but didnt. lets hope they do better with the combat ai packages this time. really looking forward to hardcore mode...
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...