Restore Health Effect / Selective AOE Spells

Post » Mon Sep 20, 2010 3:09 am

Hi there, nice to meet you all!

I've just started modding and have been doing a lot of reading here and at the CS wiki. Currently I'm working on a weapon mod which has some pretty complex scripting weaved into it already.

Anyway, I'm stuck on whether it's possible to implement a couple of ideas that I have and hoping someone could point me in the right direction.

1. Restore Health Visual Effect
The ranged effect for Restore Health is a "Burst of light and white wave" as per the http://cs.elderscrolls.com/constwiki/index.php/Visuals_Effect. I find this effect quite cool and think it would be great to have a similar effect for weapon hits. Unfortunately, I can't seem to find this particular effect in the CS and have been unsuccessful in trying to replicate it. I tested a script to cast a ranged restore health spell on the target but it works very intermittently. I also thought of moving an invisible object to the target's position and getting the script to cast a spell at it, but I still won't be able to modify the effect (I'd like it to run faster). Any ideas?

2. Selective AOE spells
Can an area spell be scripted in such a way that it only affects certain types of target, such as only hostile targets or only NPC's? I'm thinking of using it for some sort of constant effect aura.

Anyway, thanks for reading and any insights would be helpful!

Lanceor
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Mon Sep 20, 2010 9:47 am

To make a reference play the Restore Health visual effect, you just need to add "Ref.PEMA REHE" to your script at the appropriate time. http://cs.elderscrolls.com/constwiki/index.php/Magic_Effects_List of all the effects. You can also find them in the CS in the Miscellaneous category.

You can make AOE spells the way you explained. Many modders have a disabled activator moveto the player at the appropriate time/interval and cast the spell from the activator (tutorial http://cs.elderscrolls.com/constwiki/index.php/Casting_Spells_From_An_Activator for just this scenario). This gives you greater control over the positioning of the effect.

Good luck!
User avatar
Amy Cooper
 
Posts: 3400
Joined: Thu Feb 01, 2007 2:38 am

Post » Mon Sep 20, 2010 6:17 am

Thanks for the pointers Khettienna!

Playing the visual effect for restore health didn't work, but more on that in a jiffy.

The tutorial for the area spell that you linked to was perfect. Within 10 minutes, I was able to call lightning from the sky. With a few more cups of coffee, I should be able to modify it to cast frenzy only on female orcs wearing fishing waders while sleeping (or whatever conditions I set).

Back to the restore health thingy. I think you meant "PME REHE" rather than "PEMA REHE" is that right? PlayMagicEffectVisuals gets me the onTouch effect (glowing membrane, helical light swirls) but not the explosion effect.

Here's a pic of the effect I was after: http://img815.imageshack.us/img815/4882/reheexplosion.jpg

So far, what does work:
1) Casting a *ranged* spell with the Restore Health visual effect, whether through a script or otherwise. (It has limitations such as missing when the target is moving a lot, and the restore health sound effect that I don't want, so I ended up not using it.)

What doesn't work:
1) Casting a non ranged spell
2) PlayMagicEffectVisuals REHE
3) Using another magic effect (e.g. BA01 or DARK) with the parameters set exactly the same as REHE.

This leads me to believe that the explosion magic effects are hidden parameters not accessible through the CS. Shaders must exist somewhere for them though, and I hope to be able to get in there to replicate and modify it.
User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Mon Sep 20, 2010 6:49 am

I figured out an easy, non-script way to get the restoration explosion visual effect.

I needed to modify one of the unused magic effects - Darkness in this case. I deleted all the shaders that I didn't want and selected the appropriate nif (restoration.nif in this case). It also helped to modify the effect's base cost to something ridiculously high like 1000.

The second part is to simply create the weapon enchantment (or the spell that is cast by the script if you don't want "Darkness 100pts in 5 feet" in the description.) One of the effects has to be Darkness, set to area effect with a higher energy cost than the other effects. Attacks with the weapon will now use use the explosion effect.

Now it does have a limitation though... the explosion occurs at the enemy's feet rather than their body or head - don't ask me why. So with a small radius, it looks like the enemy is stepping on mini-landmines. You can make this less obvious by using a larger radius for the area of effect - I found 5' or 6' to work well.

Of course, a 5' or 6' explosion in your face every time you hit something turns out to be rather hard on the eyes.

Anyway, if anyone else has other ideas, please chime in!
User avatar
Angel Torres
 
Posts: 3553
Joined: Thu Oct 25, 2007 7:08 am

Post » Mon Sep 20, 2010 12:25 am

OOPS! Yeah, PME, not PEMA! I was thinking about PME.REFA, and that got all kinds of muddled during typing, sorry! :facepalm:

I dunno, I use it all the time. I have a dozen activators that are scripted to PME.REFA (which is Restore Fatigue, which may be different from Restore Health visually, I don't recall offhand) when used, so white glowy swirly junk appears around them on use. I also have some that player.PME REFA also or instead, depending on my mood at that moment. In your scripting, were you calling the function on a reference? And was it the right reference (I guess your melee target in this case)? I dunno why it wouldn't work, otherwise.
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm

Post » Mon Sep 20, 2010 1:08 am

The main issue was that playing magic effects normally defaults to the non-AOE effect. These normally cover the target's body with a membrane and or particle shader.

What I wanted was the explosion effect which I found was one of the animations within the nif itself, and therefore can't be edited in the CS. Given that the restore health one had 500+ nodes including a whole bunch of controllers, I surmised that modifying it would be well beyond my current level of skill. :P

It seems that the only way to get an explosion emanate from a body part other than the target's feet is to hit the enemy with a ranged spell (or modify the nif of course).
User avatar
Steven Nicholson
 
Posts: 3468
Joined: Mon Jun 18, 2007 1:24 pm

Post » Sun Sep 19, 2010 10:03 pm

Rather than modifying Darkness - DO NOT USE, I suggest using the http://www.gamesas.com/index.php?/topic/1116501-relz-oblivion-magic-extender-v10/ to allow you to create a new effect. Using DARK has significant mod compatibility issues, as lots of mods want to use that effect (or one of the other unused effects).
User avatar
Richard Thompson
 
Posts: 3302
Joined: Mon Jun 04, 2007 3:49 am


Return to IV - Oblivion