Jump to content

[LE] Make Soul Stealer Perk work for all kills made with spells.


truestiven

Recommended Posts

In vanilla Skyrim, Soul Stealer perk lets all attacks made with bound weapons, apply soul tap. Can some one make this perk apply Soul Tap on every target killed with spells? Theoretically, i suppose, i can take mod with soul tap cloak, rip out the effect they made/remove all special animations and just make the effect of cloak to have infinite range, effect enemies in combat, and be hocked up to the perk, so its always "online". But maybe someone already done such mod?

 

I checked out soul tap base effect, it has couple conditions in it. How can i make a condition there, so soul tap will be applied only to targets which has been attacked PC spells? Maybe i need just make invisible quest which will be mark targets attacked by PC spells?

Link to comment
Share on other sites

  • 4 weeks later...

truestiven, it could be a magic effect of the constant spell applied to the enemy. The problem to solve is how it could be applied to that enemy...
The script in that non FX-persisted magic effect could be looking like this:






Bool LastHitWasPlayersMagic

Event OnCellDetach()

Dispel()

EndEvent

Event OnHit( Aggressor, Source, Projectile, NoMatterPowerAttack, NoMatterSneakAttack, NoMatterBashAttack, NoMatterHitBlocked)

if ( Aggressor == Game.GetPlayer() )
    if ( Source.GetType() == 22 ) || ( Projectile != none )
        if ( !LastHitWasPlayersMagic )
            LastHitWasPlayersMagic = TRUE
        endif
    endif
else
    if ( LastHitWasPlayersMagic )
        LastHitWasPlayersMagic = FALSE
    endif
endif

EndEvent

Event OnDeath( MustBePlayer )

if LastHitWasPlayersMagic
    do stuff like check the soul capacity of the dead target, check the empty soulgem which can include that capacity; if those checks are alright then +1 to player's souls captured statistics, play EffectShader similar to the moment you see when the soul is captured, play those blue VisualEffects of casting and absorbtion similar to the same moment, play that soul captured sound, show the player a notification similar to the same moment.
endif

EndEvent

I foresee there could be a mistake when before the target died, it was attacked for example by some mighty burning spell casted by not-player character. Player was attacking by spell but actually the target died because it burned from that mighty burning spell, but the script says that LastHitWasPlayersMagic so that script triggers it's OnDeath events. Another problem to solve)

So. How that spell should be applied on the enemy?
Maybe a script / hidden scripted magic effect attached to a player since it has that Soul Stealer perk.

Event OnEffectStart( ThatsPlayer, WhateverCaster )

RegisterForCrosshairRef(0.5)

EndEvent

Event OnCrosshairRefChange( PlayerIsLookingTo )

if player's "weapon" (which is a spell at least in either of it's hand) drawn
    PlayerIsLookingTo.AddSpell( ( Game.GetFormFromFile( IDofThatSpell, "YourModName.esp" ) as Spell ) ) 
endif

EndEvent

Event OnDeath( FadantKiller )

UnRegisterForCrosshairRef

EndEvent

- and so any living Actor/Creature object will be getting that spell since you just looking at them with any of your spell drawn. That effect will dissapear from them since they alive and you just left that location. I don't know how to deliver that spell to the enemy certainly with a player's any magic hit/projectile.

Edited by Stealth022
Link to comment
Share on other sites

  • Recently Browsing   0 members

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