Skyrim Special Edition

File information

Last updated

Original upload

Created by

megapatato

Uploaded by

megapatato

Virus scan

Safe to use

About this mod

Resurrect spells that do not require targeting. Custom hand, enchant, staff, and book arts.

Requirements
Permissions and credits
Changelogs
Do you hunger with jealousy every time Serana resurrects the nearest corpse without even bothering to look for it..?
Do you curse the gods of Havok every time your resurrect projectile gets blocked by invisible walls from a nether plane..?
Then look no more fellow necromancer! From the depths of Queen Potema's library:



Local Resurrect


Features:
1) Variants of the 5 vanilla spells that do not require aiming. The Story Manager will find a target, if any is available.
2) Spells increase magnitude when dual-hand cast.
3) Spells increase duration with Necromancer perk.
4) Spells increase range with Summoner perks.
5) Spells allow creating enchanted staves.
6) Spells have unique & animated hand art (aka HandFX)
7) Spells have unique & animated inventory art (different from HandFX)
8) Spells have unique & animated enchant art (also different from Hand & Inventory arts...)
9) Hand and Enchant art hook up to the magic casting animation chain and alter their state as you cast.
10) Spells have unique-looking spell tome (dark and crimson, like my soul after all this NifSkoping.......)
11) Staves cast their spell on self. The CreationKit wiki says this isn't possible. LOL
12) Staves force the staff animation to play, instead of the self-cast ones, via Dynamic Animation Replacer (DAR; not required though, see below).
13) No vanilla records altered (besides 5 staff placements in some cells); these do not replace the vanilla variants. If you've ever done a radiant quest, you know how the Story Manager can get the wrong target from what you wanted (Tnott's raison d'ĂȘtre), so the vanilla targeted spells remain available. Sometimes, you want any corpse; other times, you want a specific corpse.


How to obtain:
1) The base 3 variants (Zombie, Reanimate, Revenant) can be found in Wolfskull cave. Look for a magical after-effect...
2) The advanced 2 variants (Dread Zombie, Dead Thrall) can be found in the Solitude Catacombs, Potema's specifically. Look for a conspicuously pristine book case...
3) Staves levels 1-4 can be crafted once you learn their corresponding spell.
4) The 5 unique level 5 staves can be found in places of strong Necromancy. They consume a lot of soul per cast.

Spoiler:  
Show
a) Ansilvund, by the book case, by the Boss chest
b) Potema's Sanctum, by the book case, by the Boss
c) Southfringe Sanctum, by the Boss chest
d) Valthume, by the Boss chest
e) Yngvild, by the Boss chest



Requirements:
1) Staves, from the Creation Club
2) The Skyrim Script Extender

Details

Animations

There are 4+4 animation files bundled, 1st & 3rd person, for use with DAR. These are based from the vanilla staff animations, renamed to the self-cast animations, and triggered by DAR via some keywording. The animations have minor tweaks to better showcase the staff art. I am open to using other animations, but I couldn't find any on the Nexus. Without DAR, these will not fire, and your character will use the self-cast animations. Other than some (IMHO) funky visuals, everything will work fine though.

In the GIFs above, animations are Berzore's (via DAR-PCEA).


Story Manager
When one of the spells or enchantments is cast, a keyword is sent to the Story Manager, along with a range, a magnitude, a object reference, and an integer. The object reference is the caster, the range is how far away the corpse must be from the caster, the duration is the spell's duration, and the integer is the spell variant (used for secondary effects, like the heal boost of Dread Zombie, and to assign the right inventory art under spell effects). Since I couldn't figure out a way of using event data in a LevelCheck condition, the magnitude is set as a Global, which is then used by the Story Manager. Theoretically, this could yield a race condition when double-cast, so I tried my best to avoid this. However, I have not been able to trigger the race condition, and even if I could, I do not anticipate anything bad happening (the 2nd spell would use the 1st's magnitude... so ... maybe a bit of wasted magica?).

To enable debuging to the standard log file, use the console command:
set mpLocalResurrect_debug to 1

Range
The ranges I built-in are: 10 meters, 20 meters with Summoner, and 30 meters with Summoner II. Without these perks, at 10 meter range, the spells are usable, but it's tough. With both perks, at a luxurious 30 meters, you'll have such an easy time getting targets in range. This yields a good balance, but if you wish to alter these, change the values of the globals:
mpLocalResurrect_PerkRange_0
mpLocalResurrect_PerkRange_1
mpLocalResurrect_PerkRange_2


Art Objects

The thing that gets displayed in your magic inventory, the thing that appears on the active magic effect list, the thing that gets drawn on your hand when you equip the spell, the thing that plays on the enchanted staves; these are all "art objects" in the Creation Kit's terminology.

For the menu items (inventory, active magic effects), these are statics, and so animating them is fairly straightforward with NiTransformController blocks.

For the hand special effects, this is required a NiControllerManager. This is the block that links the interpolated data generator, to the property controllers for the BSTriShapes. The NiControllerManager "listens" for a specific state in a specific animation graph, and then feeds specific data interpolators to the controllers; this allows the Intro state to use an interpolator for scale that goes 0->1, whereas the Idle state uses a different interpolator to the same controller that yields invariant scales, and the Cast state a yet another interpolator that goes 1->0. This yielded a combinatorial explosion, where the more properties, the more BSTriShapes, the more states in my graph, the more interpolators I needed. HandFX_5.nif has 530 blocks. These were done by hand, in NifSkope.

The enchant arts can be in the same file as the hand special effects; these can be the IdleStaff state. However there is an issue in 1st vs. 3rd person view: the axes are not aligned the same. Concretely, stuff that renders to the origin at 0,0,0 will look the same; however for shorter staves (e.g. daedric, wood), where you would like the art to be offset in -Y, the same transform that aligns in 3rd person DOES NOT align in 1st person, and vice versa: the Y axes from 1st and 3rd person are not the same / collinear. So I baked the art into the staff model itself, and hooked it up to the animation graph system. The ebony, glass, and vanilla staff models use the StaffIdle model from HandFX; Daedric, Wood1, Wood2, and Dreugh use bespoke art baked-in. The later retain their animation when mounted to a weapons plaque :D


What's with the cost of the level 5 staves?!
For balancing, I wanted the level 5 staves to use a lot of soul juice, around 5 grand soul gem's worth per cast. This means the staves must have at least that for capacity (they have exactly that). Such ginormous capacity inflated their price. Unfortunately the engine calculates the price of an enchanted item in a very obscure way, and I didn't see a way of reducing their price to less comical levels without affecting the intended balance. I'm open to suggestions :) In any case,they are worth more than an entire Hold probably, so no one can pay fair price for them, so they won't break your in-game economy.


Process (aka Scope Creep in action)
[Early October] I really hate this reanimate target thing; I'm too bad at aiming. I'm gonna make my own version, using the Story Manager to find me a target, cuz I'm da boss
[Mid October] Well, that works well, but using the stock art asset kinda sucks... I bet I could do better...
[Late October] What's this tangent thing? Quadratic key? Why don't they do anything in NifSkope?!
[November, with dark thoughts in his heart] NIFSKOPE HAS A BUG!!!
[Mid November] Nifskope is now forked, and the bug is fixed. Now I can have orbits :D
[December] But wouldn't it be cool if there were also staves...?
[Early January] The art, the axes, they get all mismashed and misplaced when switching 1st to 3rd person view!! Stupid short staves....
[Mid January] I've made 15+ art assets, bespoke to each spell & each staff.
[Mid-Late January] And they use the MagicCast chain to animate the staff as the caster casts, because oh yeah!
[Late January] Wait, a target spell won't fire the OnEffectStart unless it hits an actor ?! That's the thing I want to avoid!!!!
[Twodaysagodas] For Stendarr's Biceps! I'm gonna use the Self cast, and then DAR a target-cast animation into place, cuz I'm done with this.
[Yesterdas] ...how do I know which animation to replace? And with what?! Is there a way of getting the console to say what's playing? Oh right, animations -> behaviors and the engine knows nothing... time for BSA archeology... Oh, Opparco's tool should work for viewing the HKX, and I already got the Havok SDK so...
[Todas] IT'S WORKING!!!!


NifSkope's "tangent"
Vanilla NifSkope (as of this writing) has a bug that prevents it from rendering properly quadratic key interpolation, specifically it prevents spacial interpolation that uses the "tangents". What Skyrim does, is Hermite Cubic Spline interpolation, and here NifSkope's terminology yields two misnomers:
- calling these "tangents", they're derivatives, specifically along their respective axis
- calling them "forward" and "reverse"; a segment's second tangent, is the forward tangent at the destination point. It is not that a point's forward tangent points to the next segment, it actually refers to the interpolation with the previous one.

Try opening the _4 variants of my meshes in the official NifSkope, and you will not see orbits, but just linear back-and-forths. In-game, you'll see orbits. I've added my branch of NifSkope to a pull request for the main developers; if the NifSkope team ever gets back on the scene, they can review the bugfixes.


I am not liable for any productivity lost due to staring at the inventory art.

User images encouraged!