Changing Damage: Redux

Post » Sun Nov 18, 2012 3:54 pm

Haha, I shall ask again... before I commit to my current method :-P

Is there a "simple" way to make damage decrease stamina INSTEAD of health?

I do want to damage health in other ways, but I don't want it based on a weapon's damage value. And I would also like to use a weapon's damage value to affect stamina.


Thank you! :-D
User avatar
JLG
 
Posts: 3364
Joined: Fri Oct 19, 2007 7:42 pm

Post » Sun Nov 18, 2012 4:23 am

When you say "damage" I take it you mean all possible sorts of health damage that could be taken by any actor from any source?

If so, I doubt there's a simple way to do anything that wide ranging.

If I'm wrong, I'd like to know the solution too.
User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm

Post » Sun Nov 18, 2012 1:25 pm

The ability to do so with all damage would be preferable. Or, at least, the ability to discriminate between sources/types of damage.

The primary use would, of course, be from physical damage by weapons/unarmed/physical traps. If magic attacks and environmental (falling/drowning) damage could be included, that would be great also.

Without the ability to do so, the only way I can think of doing it is to add a perk to every actor that gives 100% immunity to physical damage. Then script stamina damage with OnHit events. The problem with that is I have to tell the script how much stamina to damage or what level of stamina-damaging spells to apply. It wouldn't be too bad if I knew how to apply "x" amount of damage... then set "x" to the damage value of the weapon/attack.


EDIT:
Basically, the idea is for weapons to not do generic damage to health. I'd rather them do "concussive" damage to stamina ("ring the target's bell"). Actual health damage would be in forms of bleeding damage (caused by cutting/piercing weapons) or severe blunt-force trauma (caused by blunt and heavy weapons).

The end result would allow a system where armor would be much more effective. All normal damage would go to the stamina. Only attacks that were strong enough to breach the armor's defense capability would be scripted to apply the actual health damaging effects.
User avatar
Joey Avelar
 
Posts: 3370
Joined: Sat Aug 11, 2007 11:11 am

Post » Sun Nov 18, 2012 4:24 am

The ability to do so with all damage would be preferable. Or, at least, the ability to discriminate between sources/types of damage.

Well, like I said before I don't think there is a "simple" way (your quotes) to do what you want.

I did something similar using a cloak effect to hang an OnHit effect on actors around the PC. That works, but you'll find you get notified after the damage takes effect. So while you can heal the damage and then apply it to stamina, you can't do anything about one-shot kills.

The alternative is to edit every weapon, or every damage source in the game to do zero or minimal damage and then add a script to do the effect you want. you could probably do it with SkyProc and save most of the pain, although I'm not sure how feasible that is for traps and claws and so forth.

The third way would be to edit vanilla scripts directly I suppose, although that's not going to be compatible with a lot of other mods.
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Sun Nov 18, 2012 7:22 am

You can use a Perk for this. One Perk Entry with Apply Combat Hit Spell to decrease Stamina through a Spell whenever an attack is made, another Perk Entry with Mod Attack Damage (set to 0) to disable Health damage, and optionally another Perk Entry with Mod Spell Magnitude with a condition using EPMagic_SpellHasKeyword to dynamically adjust the Stamina damage done (you have to add a unique keyword to your Stamina spell). If you want to match the Stamina damage to the Weapon damage, I think you'll have to also add a script to the player with On(Un)Equipped Events (whenever you switch weapons) to store the weapon damage in an Obsolete Actor Value which you can use as a multiplier for the Stamina spell (use the Actor Value as a multiplier in the Mod Spell Magnitude Perk Entry).

Alternately you could also use a Scripted spell for the Apply Combat Hit Spell Perk Entry to do complex calculations, but these will have a delay. Use only Perks if you want everything to be instant.


Note that you can't add Perks to NPC's in runtime, which is rather problematic. It would be possible to use SkyProc to add Perks to NPC's en masse.
User avatar
Blackdrak
 
Posts: 3451
Joined: Thu May 17, 2007 11:40 pm

Post » Sun Nov 18, 2012 1:19 pm

Thank you both for the help :-)


If you want to match the Stamina damage to the Weapon damage, I think you'll have to also add a script to the player with On(Un)Equipped Events (whenever you switch weapons) to store the weapon damage in an Obsolete Actor Value which you can use as a multiplier for the Stamina spell (use the Actor Value as a multiplier in the Mod Spell Magnitude Perk Entry).

Oh, if I may ask, how can a script detect the weapon's damage value? I was unaware that such a function existed.
User avatar
Rachell Katherine
 
Posts: 3380
Joined: Wed Oct 11, 2006 5:21 pm

Post » Sun Nov 18, 2012 11:50 am

Thank you both for the help :-)




Oh, if I may ask, how can a script detect the weapon's damage value? I was unaware that such a function existed.

As ever, SKSE to the rescue

http://www.creationkit.com/Weapon_Script

(see the function list) :)
User avatar
Dezzeh
 
Posts: 3414
Joined: Sat Jun 16, 2007 2:49 am

Post » Sun Nov 18, 2012 9:28 am

Now that is VERY nice! Thank you so much! :-D

Haha, there doesn't happen to be a function to detect a weapon's weight, eh? :-P
User avatar
willow
 
Posts: 3414
Joined: Wed Jul 26, 2006 9:43 pm

Post » Sun Nov 18, 2012 2:20 pm

Oh hell yeah ;)

http://www.creationkit.com/GetWeight_-_Form
User avatar
Curveballs On Phoenix
 
Posts: 3365
Joined: Sun Jul 01, 2007 4:43 am

Post » Sun Nov 18, 2012 6:13 am

Hahaha, thank you again!!! :-D
User avatar
Yvonne Gruening
 
Posts: 3503
Joined: Mon Apr 23, 2007 7:31 pm


Return to V - Skyrim