Stamina damage and encumbered effect

Post » Tue Jun 19, 2012 6:06 pm

Hello,

I'm trying to create a damage to stamina through script. At the moment I'm using DamageAV("stamina", variable) inside an OnUpdate() event. This works, but when stamina reaches zero, I don't get the same effect like when your stamina reaches zero by sprinting, that is, that the bar flashes and that it takes a bit to start recovering. Is there a special command to achieve this?

My other question is about the encumbrance effect. I want that when stamina reaches zero, that you get the same effect as when you are encumbered, so that you can't even run until you recover some stamina. I've been looking everywhere and couldn't find any hint on how to do this. Is this effect hardcoded? I only found the text that is displayed when the effect fires. If someone knows how to achieve the same through script, that would help me a lot. At the moment I circumvented this by adding an invisible very heavy object to the player when his stamina reaches zero and deleting the overencumbered text. This works, but is dirty and buggy...
User avatar
casey macmillan
 
Posts: 3474
Joined: Fri Feb 09, 2007 7:37 pm

Post » Tue Jun 19, 2012 4:17 pm

Use a spell for stamina damage on your actor
spell.cast(self,self)
User avatar
Jade Muggeridge
 
Posts: 3439
Joined: Mon Nov 20, 2006 6:51 pm

Post » Wed Jun 20, 2012 1:40 am

Is DamageAV () the same as ModAV in Oblivion?
If it is, here are some questions:
Will the player gain that Stamina back if your mod is deactivated?
What if another mod also uses DamageAV (), will your mod be able to track its own changes so as not to affect that other mod.
For e.g., if your mod removes 10 Stamina from the Actor.
And the other mod removes 20 Stamina.
Will your mod know to restore only 10 Stamina rather than 30 - so as not to affect the other mod?
What if your mod does know to restore only 10 Stamina. Will that other mod be as safely built?
I have a feeling that DamageAV () is the same as ModAV in Oblivion.
What I'm trying to say is that in Oblivion, we experienced many corrupted Stats because of the improper use of ModAV.
I don't want to see that in Skyrim.
Best to use Spells to affect changes in Stats.
User avatar
Britta Gronkowski
 
Posts: 3475
Joined: Mon Apr 09, 2007 3:14 pm

Post » Tue Jun 19, 2012 11:14 am

shayologo, thanks, I will try through spells.

kuertee, I'm quite sure that ModAV is still present and working as before. DamageAv doesn't change your stats, it drains your stamina and you recover it normally. So I guess that two mods using DamageAv on stamina would just stack the effect and your stamina will drain faster. Please correct me if I'm wrong...

Does anybody know about the encumbrance effect asked for in the OP? I'm still guessing that it's hardcoded, but who knows...
User avatar
Prisca Lacour
 
Posts: 3375
Joined: Thu Mar 15, 2007 9:25 am

Post » Tue Jun 19, 2012 11:55 pm

I'm still guessing that it's hardcoded, but who knows...
Probably this ^...

For a work around you could modify the players carryweight through script or spell effect when stamina drops below a certain threshold.
I think you should just be able to slap an ability on the player that includes a magic effect (that modifies carry weight) with condition, getavpercent stamina <= your%here
User avatar
Angela Woods
 
Posts: 3336
Joined: Fri Feb 09, 2007 2:15 pm

Post » Tue Jun 19, 2012 4:54 pm

Thanks cscottydont, that definately looks like a better and cleaner solution as a workaround than adding an item. I will try this out.
User avatar
Rebecca Dosch
 
Posts: 3453
Joined: Thu Jan 18, 2007 6:39 pm

Post » Tue Jun 19, 2012 2:44 pm

kuertee, I'm quite sure that ModAV is still present and working as before. DamageAv doesn't change your stats, it drains your stamina and you recover it normally. So I guess that two mods using DamageAv on stamina would just stack the effect and your stamina will drain faster. Please correct me if I'm wrong...
Ahhh...cool re: DamageAV
I get it now. Sorry.
And I can imagine that they would stack - which is as you would want two mods to do.
Cheers, mate.
Sorry for my concern.
User avatar
Ashley Clifft
 
Posts: 3468
Joined: Thu Jul 26, 2007 5:56 am


Return to V - Skyrim