Jump to content

Photo

Area of Effect Spell that affects Corpses

corpses corpse spell area areaofeffect area of effect archetype

  • Please log in to reply
12 replies to this topic

#1
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

Hello,

This is my first post as I'm truly more of a do it yourself programmer/modder, but I cannot figure this out.

I am trying to make a detect dead spell that behaves exactly like the vanilla one, but is toggled on and off rather than concentration casted. I've managed to get it to work on living actors, but corpses seem impossible to affect in this manner. Below is what I've tried before. I think this may require a custom scripted spell, but I can't figure out how to write a script that affects corpses not targeted, but rather within an area of the caster.

 

Attempt 1: I modified the original detect life spell to be called as a constant effect ability by the "ToggleAbility" script. (This script uses a fire and forget spell to turn on an ability, and then off again when the spell is cast again).

 

Result 1: Created a spell that detected dead things, but they remained highlighted after the ability was removed (I believe that the constant effect was applied to the corpse and then no longer retained any relation to whether or not the player had the ability or not)

 

Attempt 2: I modified the Frost Cloak vanilla spell to have an increased range and create the detect dead highlight rather than being hostile or doing any damage. The Frost Cloak spell casts a Concentration/Aimed-or-TargetActor type spell at any living actor within the range.

 

Result 2: The cloak archetype seemed to be unable to affect existing corpses in any way. I WAS, however, able to create an effect on living things as they turned to corpses (died). But the effect only on their death, it had no effect when cast again with the corpse already being dead.

 

The problem here, seems to be the lack of an area of effect archetype that can affect corpses in the area of the player. Does anyone have any ideas?

 

Thanks for reading!


Edited by mathern, 06 May 2013 - 12:10 am.


#2
steve40

steve40

    A slow-boiling frog that eventually jumped.

  • Premium Member
  • 7,548 posts

Check if the effect has a Condition on it (isDead == 0) or (isDead != 1) that would prevent it from being applied to corpses. You might need to create a copy of the effect, then remove the condition, then use the copied effect in your new spell/ability. Also, you need to have the "no death dispel" flag set on the spell.

 

You will have to keep silently recasting the spell every 2 seconds or so, otherwise the effect won't be applied to newly encountered corpses (that were previously out of range) as the player moves about.

 

Set the effect duration to be about 3 seconds, while silently recasting it every 2 seconds. That way, once you toggle the spell off, the effects on the corpses will expire shortly after.



#3
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

My flags are FXPersists and No Death Dispel. My effect has the following target conditions:

 

S HasKeyword Keyword'ActorTypeUndead' == 1.00 OR
S HasMagicEffectKeyword Keyword'MagicSummonUndead' == 1.00 OR

S IsUndead NONE == 1.00 OR

S GetDead NONE == 1.00 OR

What is the grammar used to write a Magic Effect Papyrus Script that measures time and casts a spell every 2 seconds? 

Thanks Much!



#4
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

*Bump*

"What is the grammar used to write a Magic Effect Papyrus Script that measures time and casts a spell every 2 seconds? "



#5
blacksupernova

blacksupernova

    Fan

  • Members
  • PipPipPip
  • 451 posts

hey, may be I don't fully understand your goal, but is that your detect corpse spell would behave like Aura Whisper i.e. the corpses are highlighted after casting the spell for the duration of the spell?



#6
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

At this point I'm just looking for help creating a script to attach to a constant effect ability so that, while the player has the ability in effect, the script casts a spell every two seconds.

My end goal is to have any corpse within an area of the player highlighted until the effect is removed.



#7
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

Here's my pseudo code idea... obviously the grammar is wrong... help?

Event OnEffectStart(Actor akTarget, Actor akCaster)

 

       lastgametime = game.getgametime()


       While(EffectIsNotFinished)

              If((game.getgametime() - lastgametime)>=2seconds)
                   castSpell

                   lastgametime = gametime
              Endif

       EndWhile


EndEvent



#8
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

Solution to problem:
 

Spell Property DetectDead auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	RegisterForUpdate(3.0)
EndEvent

Event OnUpdate()
	DetectDead.Cast(Game.GetPlayer())
EndEvent

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

 

 Upon finding the rather elegant RegisterForUpdate(float x) function and OnUpdate() Event the rest fell into place. A little fiddling will do the rest. Thanks steve40 for the idea to cast a spell repeatedly every two seconds!!

This still does not create a complete work around for my initial problem, though. Creating spells that affect corpses without directly aiming at them (i.e. by only having them in the area)  seems to be quite difficult without using the "detect life" archetype... Any advice on that or examples of spells that affect corpses without aiming at them would be appreciated. 

That said, my current spell idea can be accomplished with no further input. Thank you all!



#9
EnaiSiaion

EnaiSiaion

    Endorsement Geisha

  • Premium Member
  • 31,972 posts
Try a Script effect. Detect Xyz doesn't actually do anything useful, the visuals are all in the shader, and Script effects don't exclude corpses by default.

#10
mathern

mathern

    Journeyman

  • Members
  • Pip
  • 25 posts

I will play around with this extensively.. is there a good place to post the necromatic findings I develope during my experiments? I feel like the knowledge of how to affect corpses with spells is kind of hard to come by at the moment.

Thanks,







Also tagged with one or more of these keywords: corpses, corpse, spell, area, areaofeffect, area of effect, archetype

IPB skins by Skinbox
Page loaded in: 0.739 seconds