Jump to content

[LE] How to prevent the game engine from filling the actor's health bar?


Recommended Posts

I've cover every possible angle and outcome of the Main Boss Fight, but there is a circumstance where the player might be over power at high level like 125+, in this case he/she might be able to do some insane damage with just 1 hit or even kill an actor with 12000 point of health.


The issue that may occur is that the first 2 actors are essential, so they will go into 'Bleed Out' and when the bleed out animation finish the game engine will fill the actor's health bar.

This is something that i'm trying for some time now to fix but i think i have hit a wall, although it's kind of working out and helps with making even for an over power character the fight challenging, but i still will like to fix it if it's possible.


To cover the 'Over Power Player' i've modify my original script so that it handles in sequence every 'Over Power Hit', and i think i'll stick with this since it makes it lighter and faster than the original, it only check each time a single condition and it doesn't run through all of them.


If anyone has an answer or a workaround to this i would be most grateful !!


Here are my scripts, but i don't think posting them would help resolve the issue.


* The actual "Transformation" of the actors is handle by the "Master Controller Script" and not by the actors themself.





Scriptname aXMDechidnaActivateTrans extends Actor
{Echidna's Activate Master Controller for Transformation && handles Mass Attack Spell && removal of TeleportAB on Transformation}

VisualEffect Property AbsorbFX01 Auto
Message Property AbsorbMSG01 Auto
Sound Property AbsorbSFX01 Auto
Spell Property AttackSpell01 Auto
Actor Property PlayerREF Auto
ObjectReference Property MasterController Auto
ObjectReference Property DamagingTrigger Auto
Spell Property TeleportAb Auto
Faction Property VampFaction Auto

Bool Property RunTransform = False Auto
Bool Property BlizzardA = False Auto Hidden
Bool Property BlizzardB = False Auto Hidden
Bool Property StealSoul = False Auto Hidden

Auto State WaitingHit
Event OnHit(ObjectReference akAggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
If ( akAggressor == PlayerREF ) || ( (akAggressor as Actor).isPlayerTeammate() == TRUE ) || ( akAggressor == DamagingTrigger )
float ActorH = Self.GetAVPercentage("Health")
If (ActorH < 0.8) && ( BlizzardA == False )
BlizzardA = True
AttackSpell01.Cast(Self)
ElseIf (ActorH < 0.6) && ( StealSoul == False ) && ( PlayerREF.getDistance(self) < 700 )
StealSoul = True
If ( PlayerREF.GetAV("DragonSouls") >= 1 )
PlayerREF.ModAV("DragonSouls",-1)
AbsorbSFX01.Play(PlayerREF)
AbsorbFX01.Play(PlayerREF, afTime = 10.0, akFacingObject = Self)
AbsorbMSG01.Show()
EndIf
ElseIf (ActorH < 0.4) && ( BlizzardB == False )
BlizzardB = True
AttackSpell01.Cast(Self)
ElseIf (ActorH < 0.2) && ( RunTransform == True )
If ( Self.HasSpell(TeleportAb) )
Self.RemoveSpell(TeleportAb)
Self.SetGhost()
Self.RemoveFromFaction(VampFaction)
MasterController.Activate(Self)
Else
Self.SetGhost()
Self.RemoveFromFaction(VampFaction)
MasterController.Activate(Self)
EndIf
GoToState("Done")
EndIf
EndIf
EndEvent

Event OnDying(Actor akKiller)
If ( RunTransform == False )
MasterController.Activate(Self)
GoToState("Done")
EndIf
EndEvent
EndState


State Done
;
EndState



This is the modify version




Scriptname aXMDechidnaActivateTrans extends Actor
{Echidna's Activate Master Controller for Transformation && handles Mass Attack Spell && removal of TeleportAB on Transformation}

VisualEffect Property AbsorbFX01 Auto
Message Property AbsorbMSG01 Auto
Sound Property AbsorbSFX01 Auto
Spell Property AttackSpell01 Auto
Actor Property PlayerREF Auto
ObjectReference Property MasterController Auto
ObjectReference Property DamagingTrigger Auto
Spell Property TeleportAb Auto
Faction Property VampFaction Auto

Bool Property RunTransform = False Auto
Bool Property BlizzardA = False Auto Hidden
Bool Property BlizzardB = False Auto Hidden
Bool Property StealSoul = False Auto Hidden

Auto State SEQ01
Event OnHit(ObjectReference akAggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
If ( akAggressor == PlayerREF ) || ( (akAggressor as Actor).isPlayerTeammate() == TRUE ) || ( akAggressor == DamagingTrigger )
float ActorH = Self.GetAVPercentage("Health")
If (ActorH < 0.8) && ( BlizzardA == False )
BlizzardA = True
AttackSpell01.Cast(Self)
GoToState("SEQ02")
EndIf
EndIf
EndEvent

Event OnDying(Actor akKiller)
If ( RunTransform == False )
MasterController.Activate(Self)
GoToState("Done")
EndIf
EndEvent
EndState


State SEQ02
Event OnHit(ObjectReference akAggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
If ( akAggressor == PlayerREF ) || ( (akAggressor as Actor).isPlayerTeammate() == TRUE ) || ( akAggressor == DamagingTrigger )
float ActorH = Self.GetAVPercentage("Health")
If (ActorH < 0.6) && ( StealSoul == False ) && ( PlayerREF.getDistance(self) < 700 )
StealSoul = True
If ( PlayerREF.GetAV("DragonSouls") >= 1 )
PlayerREF.ModAV("DragonSouls",-1)
AbsorbSFX01.Play(PlayerREF)
AbsorbFX01.Play(PlayerREF, afTime = 10.0, akFacingObject = Self)
AbsorbMSG01.Show()
GoToState("SEQ03")
Else
GoToState("SEQ03")
EndIf
EndIf
EndIf
EndEvent

Event OnDying(Actor akKiller)
If ( RunTransform == False )
MasterController.Activate(Self)
GoToState("Done")
EndIf
EndEvent
EndState


State SEQ03
Event OnHit(ObjectReference akAggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
If ( akAggressor == PlayerREF ) || ( (akAggressor as Actor).isPlayerTeammate() == TRUE ) || ( akAggressor == DamagingTrigger )
float ActorH = Self.GetAVPercentage("Health")
If (ActorH < 0.4) && ( BlizzardB == False )
BlizzardB = True
AttackSpell01.Cast(Self)
GoToState("SEQ04")
EndIf
EndIf
EndEvent

Event OnDying(Actor akKiller)
If ( RunTransform == False )
MasterController.Activate(Self)
GoToState("Done")
EndIf
EndEvent
EndState


State SEQ04
Event OnHit(ObjectReference akAggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
If ( akAggressor == PlayerREF ) || ( (akAggressor as Actor).isPlayerTeammate() == TRUE ) || ( akAggressor == DamagingTrigger )
float ActorH = Self.GetAVPercentage("Health")
If (ActorH < 0.2) && ( RunTransform == True )
If ( Self.HasSpell(TeleportAb) )
Self.RemoveSpell(TeleportAb)
Self.SetGhost()
Self.RemoveFromFaction(VampFaction)
MasterController.Activate(Self)
Else
Self.SetGhost()
Self.RemoveFromFaction(VampFaction)
MasterController.Activate(Self)
EndIf
GoToState("Done")
EndIf
EndIf
EndEvent

Event OnDying(Actor akKiller)
If ( RunTransform == False )
MasterController.Activate(Self)
GoToState("Done")
EndIf
EndEvent
EndState


State Done
;
EndState



Many... many thanks in advance !!.

Edited by maxarturo
Link to comment
Share on other sites

To prevent filling the health bar, you can just put a spell on your boss that dwarfs the actor value health rate. Make the magic effect archetype value modifier, assoc item 1 Health Rate, and make it detrimental. In the spell, make the magnitude a large number. You can make it an ability, so when you want the health to refill you can remove the spell with a script.

You can also put the condition GetActorValue Health < SomeAmount on the spell to have it only stop health regen when the boss's health is below a certain amount.

Link to comment
Share on other sites

Hmm.. the bool variable "RunTransform" could be the issue. Keep in mind akAggressor is the player after check with myF_IsOK().

 

aXMDechidnaActivateTrans

 

Scriptname aXMDechidnaActivateTrans extends Actor
{Echidnas Activate Master Controller for Transformation && handles Mass Attack Spell && removal of TeleportAB on Transformation}
; https://forums.nexusmods.com/index.php?/topic/8704043-how-to-prevent-the-game-engine-from-filling-the-actors-health-bar/

  VisualEffect PROPERTY AbsorbFX01  auto
  Message      PROPERTY AbsorbMSG01 auto

  Sound PROPERTY AbsorbSFX01   auto
  Spell PROPERTY AttackSpell01 auto
  Spell PROPERTY TeleportAb    auto
  Faction PROPERTY VampFaction Auto

  ObjectReference PROPERTY MasterController auto
  ObjectReference PROPERTY DamagingTrigger  auto
  Actor           PROPERTY PlayerREF        auto

  Bool PROPERTY BlizzardA auto Hidden
  Bool PROPERTY StealSoul auto Hidden
  Bool PROPERTY BlizzardB auto Hidden
  Bool PROPERTY RunTransform auto            ; [default=False]


; -- EVENTs -- 1 + "Done" +  "SEQ01" + "SEQ02" + " SEQ03" + " SEQ04"

EVENT OnDying(Actor akKiller)
    IF ( RunTransform )
        ; == TRUE
        ; activation is already done or in progress
    ELSE
        ; == False
        gotoState("Done")            ; ### STATE ###
        RunTransform = TRUE
        MasterController.Activate(self as ObjectReference)
    ENDIF
ENDEVENT


EVENT OnCellDetach()
    ; player has left actors cell
ENDEVENT


EVENT OnDetachedFromCell()
    ; actor has left players parent cells
ENDEVENT


;========================
State Done
;=========
endState


;========================
Auto State SEQ01
;===============
    ; b1 = abPowerAttack
    ; b2 = abSneakAttack
    ; b3 = abBashAttack
    ; b4 = abHitBlocked

EVENT OnHit(ObjectReference akAggressor, Form akSource, Projectile Proj, Bool b1, Bool b2, Bool b3, Bool b4)
IF myF_IsOk(akAggressor)
ELSE
    RETURN    ; - STOP -
ENDIF
;---------------------
IF ( BlizzardA )
    RETURN    ; - STOP -    already TRUE
ENDIF
;---------------------
    IF myF_IsLowerThan(0.8)
        BlizzardA = TRUE
        AttackSpell01.Cast(self as ObjectReference)
        gotoState("SEQ02")            ; ### STATE ###
    ENDIF
ENDEVENT
;=======
endState


;========================
State SEQ02
;==========
EVENT OnHit(ObjectReference akAggressor, Form akSource, Projectile Proj, Bool b1, Bool b2, Bool b3, Bool b4)
IF myF_IsOk(akAggressor)
ELSE
    RETURN    ; - STOP -
ENDIF
;---------------------
IF ( StealSoul )
    RETURN    ; - STOP -    already TRUE
ENDIF
;---------------------
    IF myF_IsLowerThan(0.6) && (akAggressor.GetDistance(self as ObjectReference) < 700.0)
        StealSoul = TRUE

        IF (PlayerREF.GetActorValue("DragonSouls") > 0)
            PlayerREF.ModActorValue("DragonSouls", -1)
            AbsorbSFX01.Play(akAggressor)
            AbsorbFX01.Play(akAggressor, afTime = 10.0, akFacingObject = self as ObjectReference)
            AbsorbMSG01.show()
        ENDIF

        gotoState("SEQ03")            ; ### STATE ###
    ENDIF
ENDEVENT
;=======
endState


;========================
State SEQ03
;==========
EVENT OnHit(ObjectReference akAggressor, Form akSource, Projectile Proj, Bool b1, Bool b2, Bool b3, Bool b4)
IF myF_IsOk(akAggressor)
ELSE
    RETURN    ; - STOP -
ENDIF
;---------------------
IF ( BlizzardB )
    RETURN    ; - STOP -    already TRUE
ENDIF
;---------------------
    IF myF_IsLowerThan(0.4)
        BlizzardB = TRUE
        AttackSpell01.Cast(self as ObjectReference)
        gotoState("SEQ04")            ; ### STATE ###
    ENDIF
ENDEVENT
;=======
endState


;========================
State SEQ04
;==========
EVENT OnHit(ObjectReference akAggressor, Form akSource, Projectile Proj, Bool b1, Bool b2, Bool b3, Bool b4)
IF myF_IsOk(akAggressor)
ELSE
    RETURN    ; - STOP -
ENDIF
;---------------------
IF ( RunTransform  )
    RETURN    ; - STOP -    already TRUE
ENDIF
;---------------------
    IF myF_IsLowerThan(0.2)
        RunTransform = TRUE
        self.RemoveSpell(TeleportAb)        ; returning Bool (TRUE/False)
        self.SetGhost()
        self.RemoveFromFaction(VampFaction)
        MasterController.Activate(self as ObjectReference)
        gotoState("Done")            ; ### STATE ###
    ENDIF
ENDEVENT
;=======
endState


; -- FUNCTIONs -- 2

;--------------------------------------------------
Bool FUNCTION myF_IsOk(ObjectReference akAggressor)  ; internal helper
;--------------------------------------------------
IF (akAggressor == PlayerREF as ObjectReference)
    Return TRUE
ENDIF
;---------
IF (akAggressor == DamagingTrigger)
    Return TRUE
ENDIF
;---------
IF (akAggressor as Actor).IsPlayerTeammate()
    Return TRUE
ENDIF
;---------
    Return False
ENDFUNCTION


;-------------------------------------
Bool FUNCTION myF_IsLowerThan(Float f)  ; internal helper
;-------------------------------------
IF (self.GetActorValuePercentage("Health") < f)
    Return TRUE
ENDIF
;---------
    Return False
ENDFUNCTION

 

 

Edited by ReDragon2013
Link to comment
Share on other sites

@ ReDragon


The bool variable "RunTransform" is there because i have the same script on 3 actors, 2 of them "Transforms" while the 3rd doesn't, she is the final transformation (the 3rd) and the one that can actually be killed.


1 Boss > 2 Transformations > 3 Boss creatures to fight > same Boss Actor = Echidna.


* She is one bad ass entity...


Once again thank you my friend !.

Edited by maxarturo
Link to comment
Share on other sites

 

@ ReDragon
The bool variable "RunTransform" is there because i have the same script on 3 actors, 2 of them "Transforms" while the 3rd doesn't, she is the final transformation (the 3rd) and the one that can actually be killed.
1 Boss > 2 Transformations > 3 Boss creatures to fight > same Boss Actor = Echidna.
* She is one bad ass entity...
Once again thank you my friend !.

 

 

Treat it as a feature and refill it whenever they transform in the normal fashion, too. That way there's no difference, and you're working with the game engine instead of against it.

Edited by foamyesque
Link to comment
Share on other sites

@ dylbill


As i said in my previous post, i've been trying to fix this for quite some time and i have try a lot of different approaches, so many that i can't recall if i had done what you suggested.

Everything i've try exept 1 thing, the game engine just ignores it and refills the actor's health bar no matter what !.

The only thing that did work looks too ugly since it will fire after the game engine refills the health bar.



@ foamyesque


I don't quite get what you are trying to say or you haven't understand correctly the issue that i'm facing.



Nevertheless...

@ dylbill - @ ReDragon - @ foamyesque


I put a lot of thought to this and i decided to go along with this (as foamyesque suggested) bug - flaw - lack of, i don't know how to call it, and use it in my advantage as a nasty little surprise to any 'Over Powered Player'.


I did a little test run and i load an over power character (lvl 128) that i have with over power gear and spells, the sword along does a 22500 points of damage without the enchantments and armor buffs, this is a god like character !.

Then i let a friend of mine who is a big fan of Skyrim to play the specific scene - cell - combat, knowing that he is a god.


I liked so much the reactions he had to everything from the beginning of the scene up to the end (his end), he was like.

Warning bad language:


- OOHhhh... this is spooky.

- what the f*** are you !!...

- Aha you have minions...

- Take this monster... come here you ugly *censored* !!

- WHAAaaaaat....???!!!???

- Doesn't matter, i will rip your head of !! take this and this you prostitute !!!

- What the hell is going on here ???!!!!???...

- I WANT MY MAMY !!!!

- HOLY S*** !!!... how the hell do i get out from here ??!!!... HELP !!!!!


* Sorry my friend there is no way out...


* As i said before, She is one bad ass entity...


So i'm thinking to add a function to the Master Controller to detect if the player is over a specific level and then remove/add the modified over power versions of her spells/attacks to balance the over power player..

But i'm just thinking about it since this specific scene/battle/boss/character/cell has an insane amount of references that interact with each other and at this point everything is working like a swiss clock.


Anyway i'm just mumbling here and wasting everyone's time...


Thank you all very much for your suggestions and interest !.


EDIT: a bunch of typos...

Edited by maxarturo
Link to comment
Share on other sites

  • 1 month later...

@ foamyesque
I don't quite get what you are trying to say or you haven't understand correctly the issue that i'm facing.

 

As I understand it, your goal is a three-stage boss fight, where after the boss hits certain hitpoint thresholds, they move to the next stage. You were previously worried about the boss being oneshot, so I suggested you make them essential until they're in the final stage, but that has had the side effect of making their health bar refill to full, correct?

 

My suggestion here is to change how you do the stage transitions. For example, currently you have them shift on, say, 1,000 HP remaining and 500 HP remaining. But what if instead you made going into bleedout the transition point, and just changed the maximum HP down a bit so that each full HP bar is effectively that stage's HP? That way, they drop into bleedout, you disguise that with whatever transition effects you want and increment the fight stage, and their health then restores to full to continue the fight.

Link to comment
Share on other sites

Thanks for your response foamyesque.


I've finished the mod and solve all issues with the main boss fight except one that persists, not a game / mod breaking.


The issue is related with the actor's health bar refilling, if the player goes into sneak / becomes stealthy, in this circumstance the actor after some time will leave 'combat alert' and refills the actor's health.


Everything i've try, the game engine just ignores it, and i've try the last 6 month every possible "Fix" with no luck !.


I think i just will have to live with it...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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