Jump to content

Non-Regenerative Health Drain on Follower


margraveviola

Recommended Posts

Would it be possible to create a script that caused a custom follower to lose 5 health points per game day, or something similar, without regenerating them unless healed by the player or given a health potion? Would this affect be very detrimental to the follower's usefulness?

I'm planning a small story mod, and this effect would add to it, but I don't want to render the follower useless.

Link to comment
Share on other sites

i was tring to get something like this too but for an armor, how do you add a negative health regeneration effect to an armor while you wear it? i have an idea for a mask mod but i'd like to have the players health constantly go down by 5 points per second.

Link to comment
Share on other sites

For the mask, just make a normal enchantment that regenerates 5 health per second. Now, in the checkbox area, check detrimental. For the follower, do the same thing except make it 5 per day and make it an ability.

Link to comment
Share on other sites

For the mask, just make a normal enchantment that regenerates 5 health per second. Now, in the checkbox area, check detrimental. For the follower, do the same thing except make it 5 per day and make it an ability.

i tried it that way by making the magic effect i copied from the potion that gives health regen, added it to an enchantment and placed it on a test mask and i still couldn't get the health drain effect to work. it shows up in the magic effects menu but my health remains the same

Link to comment
Share on other sites

There should be an easy way to do it. At worst, I can make a simple script to do it, but that would be a rather complicated solution for a really simple problem (I say it'd be complicated, but it would still be really simple; it's just that it would be more complicated than it should be). I'll think about it.

Link to comment
Share on other sites

could you make a detailed tutorial instead?
i'll list the setting i have for it.
Effect Archetype: Value Modifier
Casting Type: Constant Effect
Delivery: Self
Magic Skill: None
Min skill lvl: 0
Assoc item 1: HealRate
Resist Value: None
perk to apply: None
Flags: Detrimental, No Duration, No Area
Magic item description : Sets the heal rate negatively to <mag>
there's no conditions set for it, nor any Keyword Editor ID's or Counter effects
all visual effects are set to none

 

and in the enchantment the magnitude is set to 5 s since there is no duration

idk what im doing wrong with it

Link to comment
Share on other sites

Let me get this straight, you want a way to make an npc to loose 5hp on base health per day?

 

If that is the case, I dont think a potion effect would do the trick, since every damage recieved by potions alter current health, not base. To make changes on base healthI would run a script that modifies the actor value´s health with modav("health", -5) or something like that.

 

That script would go on a conditional that checks for time passed with GetCurrentGameTime(), you would need to set up a global variable with the start time, probably set by the quest script, and start checking for days passed.

Link to comment
Share on other sites

Let me get this straight, you want a way to make an npc to loose 5hp on base health per day?

 

If that is the case, I dont think a potion effect would do the trick, since every damage recieved by potions alter current health, not base. To make changes on base healthI would run a script that modifies the actor value´s health with modav("health", -5) or something like that.

 

That script would go on a conditional that checks for time passed with GetCurrentGameTime(), you would need to set up a global variable with the start time, probably set by the quest script, and start checking for days passed.

no no im a different guy wanting a totally different thing. the one up top was talking about 5 hp per day, im just trying to get an enchantment to work on a mask that will do continuous damage as long as you wear it

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

could you make a detailed tutorial instead?

i'll list the setting i have for it.

Effect Archetype: Value Modifier

Casting Type: Constant Effect

Delivery: Self

Magic Skill: None

Min skill lvl: 0

Assoc item 1: HealRate

Resist Value: None

perk to apply: None

Flags: Detrimental, No Duration, No Area

Magic item description : Sets the heal rate negatively to <mag>

there's no conditions set for it, nor any Keyword Editor ID's or Counter effects

all visual effects are set to none

 

and in the enchantment the magnitude is set to 5 s since there is no duration

 

idk what im doing wrong with it

 

First thing I'd try is changing it so it's no longer set to no duration. Instead, set the duration to a really high number. Second, it should lower heal rate, it should actually damage health. That means it should be associated with Health directly. Look at the effect AlchDamageHealthDuration. Although Fire and Forget will probably get in the way and I don't think durations work with constant effects. That means you probably WILL need to use a script. Just set it to Constant Effect, and use this:

ScriptName DamageHealthWhileWorn Extends ActiveMagicEffect

Actor Target

Event OnEffectStart(Actor akTarget, Actor akCaster)
     RegisterForSingleUpdate(5)
     Target = akTarget
EndEvent

Event OnUpdate()
     RegisterForSingleUpdate(5)
     Target.DamageAV("Health", 5)
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
     UnregisterForUpdate()
EndEvent

I'm not certain it'll work because I haven't tried it and I'm very, very tired and extremely frustrated from another problem, but it should at least be very close.

 

 

Would it be possible to create a script that caused a custom follower to lose 5 health points per game day, or something similar, without regenerating them unless healed by the player or given a health potion? Would this affect be very detrimental to the follower's usefulness?

I'm planning a small story mod, and this effect would add to it, but I don't want to render the follower useless.

Put this script an alias that points to the follower.

ScriptName DamageMaxHealthPerDay Extends ReferenceAlias

Keyword Property MagicAlchRestoreHealth Auto

Event OnInit()
     RegisterForSingleUpdateGameTime(24)
EndEvent

Event OnUpdateGameTime()
     RegisterForSingleUpdateGameTime(24)
     GetActorRef().ModAV("Health", -5)
EndEvent

Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect)
     If ( akEffect.HasKeyword(MagicAlchRestoreHealth) )
          GetActorRef().ModAV("Health", GetActorRef().GetBaseAV("Health")-GetActorRef().GetAV("Health")
     EndIf
EndEvent

When you're ready for it to stop, use

(AliasName_Alias as DamageMaxHealthPerDay).UnregisterForUpdateGameTime()

in a stage's papyrus fragment section. Replace AliasName with whatever you named the alias. Don't forget to fill the property on the alias script for the keyword. It should auto-fill. At the end, you'll have to heal the follower with a spell or potion (if they'll drink one) in order to get their stats back up.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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