Script help, converting Block damage to Stamina

Post » Tue Jun 19, 2012 12:52 am

I was farely skilled with scripting with the previous system used by Oblivion and Fallout, but since I don't know any C++ I pretty much have to learn the new Papyrus system from scratch :ermm:
Anyway, I really want to make a script that negates all Health damage while blocking, and causes you to take damage only to Stamina, following all the usual rules like the damage being reduced by Block skill.
So, I was wondering if anyone could give me some advice on how to go about this.
There are game settings to alter how much Health damage is blocked and the maximum amount that can be blocked, but I'm not sure that they even work. I've tried setting them all at various levels, including ridiculously high ones, and even at 100 skill I can never block more than like ~80% damage (and I did set the maximum block value at 100%). On top of that, I don't think the setting that causes you to lose Stamina on blocking based on damage dealt is affected by the Block skill, hence why I need to script this out somehow.
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Tue Jun 19, 2012 1:42 am

not sure about 100% block.

As for losing stamina while blocking, not sure if there is a setting for that but you could use a script alias in a quest (start on game start) that points at the player with a script attached to the ref alias that has an onHit event. THen you can detect if the player blocked a hit and deduct some stamina from player.
User avatar
noa zarfati
 
Posts: 3410
Joined: Sun Apr 15, 2007 5:54 am

Post » Tue Jun 19, 2012 3:05 am

I am all for this idea. I think the OP wanted it to affect all characters not just the player?
User avatar
Claire Lynham
 
Posts: 3432
Joined: Mon Feb 12, 2007 9:42 am

Post » Mon Jun 18, 2012 11:55 am

I'd suggest you download the Duel - Combat Realism mod and just try to backwards engineer what they did to get it to work.
User avatar
Portions
 
Posts: 3499
Joined: Thu Jun 14, 2007 1:47 am

Post » Tue Jun 19, 2012 2:05 am

Duel does that? I could have sworn the description said that it simply caused blocking to cost Stamina, not that it replaced Health damage taken.
User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm

Post » Tue Jun 19, 2012 3:08 am

Hmm I re-read your first post. I'm not as sure anymore. I do know that my 2h blocks cause a pretty big stamina hit but little to no HP so it seems like it works, but it would appear that maybe the issue is that the block % can't be changed, so even if it damages stam it is damaging more than it should...?
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Post » Mon Jun 18, 2012 4:43 pm

There is a game setting (fStaminaBlockBase) which is a base amount of stamina cost which always gets deducted from blocking actors. In vanilla skyrim it's 0.0, but my deadly combat mod (and I think also the Duel mod) change this game setting. The problem with this is that it's just a flat amount of stamina removed, and I think you want stamina removal based on damage received?

Don't really know how to base stamina removal on damage received... you could however also remove stamina through the method rlilewi described, that way you can detect every time the player blocks and maybe calculate stamina cost based on the player's blocking skill, that kind of stuff (though you can't figure out the amount of damage taken through such an OnHit block). But then again, that would only work for the player and not all actors.
User avatar
Killer McCracken
 
Posts: 3456
Joined: Wed Feb 14, 2007 9:57 pm


Return to V - Skyrim