Jump to content

How to add regeneration to armour?


UncleJuan

Recommended Posts

So I've been trying to add a health regeneration effect to some armour by (so far) taking object effects like Regen and then making the magnitude like 10, but whenever I test it out in game, my health doesn't really regenerate that much. So I'm wondering if theres any way to add a fast health regeneration effect to armour?

Link to comment
Share on other sites

Try taking a look at how the developers handled the "Atomic-valence tri-radii-oscillator" in "Old World Blues". Regens 24HP per hour (most likely through a script).

 

-Dubious-

I have, and I've tried applying it to said armour through using the:

NVDLC03DummyHealthRegenBE
NVDLC03MinorRegen
which I then put into a custom object effect and then applied it on my armour, however the result was that it gave me a slow regeneration, and when I tried boosting the regen magnitude of each effect, it did not change the rate of regeneration.
And also what was that you mentioned about a script? Can I make a custom script that allows me to create a regeneration effect similar to what they have on the "Atomic-valence tri-radii-oscillator" in OWB?
Edited by UncleJuan
Link to comment
Share on other sites

See the GECK on the subject of "Effects", starting with "Base Effect". (Don't neglect to look at the construction kit wikis for earlier Bethesda games, as later game wikis assume you are familiar with concepts introduced in earlier games.) Effects are "instant", but have "duration". Note from the description of "Object effects" that there seem to be some limitations as to what effects can be applied to different types of objects.

 

You need a script to reapply the effect over time that exceeds the duration limit, in intervals. One way to increase the apparent result of an effect is with a short duration, reapplied frequently. Without looking at the code, I'm reasonably sure there is a script associated with the "Atomic-valence tri-radii-oscillator" in OWB, simply because it is applied over an hour.

 

-Dubious-

Link to comment
Share on other sites

If you want to regenerate health, you use "restoreactorvalue". Modactorvalue will increase your permanent health value but not heal the damage. http://geck.bethsoft.com/index.php?title=RestoreActorValue


You put this script on the armor itself and don't bother with object effects.



scn HealthRegenerateScript


ref rContainer
short iMaxHealth
short iCurrentHealth
float fRegenInterval


BEGIN GameMode

if (fRegenInterval > 0)
set fRegenInterval to fRegenInterval - GetSecondsPassed
else
set rContainer to GetContainer ;get the actor wearing this armor
if (rContainer) && (rContainer == Player)
set iMaxHealth to GetPermanentActorValue Health
set iCurrentHealth to GetActorValue Health
if (iCurrentHealth < iMaxHealth)
RestoreActorValue Health 10
set fRegenInterval to 1 ;these two values mean 10 HP per second
endif
endif
endif


END

Link to comment
Share on other sites

  • Recently Browsing   0 members

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