Jump to content

Creating Spell Script


Highlord90

Recommended Posts

I recently posted a cry for help concerning a script I made which now works but this script was built on a tutorial and I still have no clue what I'm doing so I'm hoping someone who knows magic spell scripts can help me with this little problem.

 

I want to create a series of spells for a mod I'm making that will use the Shield on target effect but instead of casting shield on an enemy I instead do Damage. Think of it as Holy Damage or something.

 

Is this possible or have i wasted the last hour scouring the internet for a more detailed tutorial?

 

Please don't let me down, this'll help my mod idea a lot!

 

Happy Holidays

Link to comment
Share on other sites

Not too sure what you're trying to do there. Perhaps post the script (in spoiler and code tags) and tell us what you want changed or what it's not doing so that we can analyse it?
Link to comment
Share on other sites

Not too sure what you're trying to do there. Perhaps post the script (in spoiler and code tags) and tell us what you want changed or what it's not doing so that we can analyse it?

 

(Not sure how to format the script code how you suggested sorry)

 

I'm not sure how to explain it any better but here goes, sorry if I confuse you.

 

I'm trying to create a spell that damages an enemy's health on touch or target but when the spell is cast the visual effect looks like I'm casting a shield spell. I'm not sure if I can make it any easier to understand, sorry.

 

Think of it as I'm trying to create holy magic for Priest/Crusader/Knight characters that do damage while still leveling up Alteration or Restoration instead of having them use Fireballs and whatnot, they just seem too Mage like. I'm not looking for anything complicated like making the spell do more damage to an Undead or Daedra, just an attack spell that looks like it could be used by a Priest and not a Mage.

 

As for the script I already had, I lost it. A mod I downloaded messed up my game so I loaded in a saved data file without saving the current model of my mod (Doi) so I lost the script and any work I had made on it so far but it wasn't working anyway (The script). I'll try to recreate what I remember.

 

My 1st attempt:-

 

Begin ScriptEffectStart

Addspell StandardDamageHealthTargetNovice (Just an example)

end

 

Then I realized it only GAVE any targeted NPC the spell so I tried:-

 

Begin ScriptEffectStart

HasMagicEffect StandardDamageHealthTargetNovice

end

 

Then I would create a spell and have the 'Visual Effect' tagged for Shield hoping that the 'Damage Health' spell or whatever I chose would trigger when I hit the enemy whilst still looking like I had cast a shield spell but it never did any damage...he just got really mad and started attacking me back.

 

I've only succeeded in making spells that affect my character and do damage but never an NPC.

 

Thanks for responding

Link to comment
Share on other sites

As you've found out, AddSpell literally adds a spell to the actor's spell list, allowing them to cast it - if they had the magicka, skill and AI settings.If you only need to create a visual effect, then the function PlayMagicShaderVisuals , or PMS for short is what you need.

 

To have a damage health spell that looks like a shield effect, I would probably create a regular damage health spell, and add a second scripted effect component for the visuals. Example:

 

Begin ScriptEffectStart

StopMagicShaderVisuals effectDamage
PlayMagicShaderVisuals effectShield

end

Begin ScriptEffectFinish

StopMagicShaderVisuals effectShield

end
Link to comment
Share on other sites

Let us know how you go. Once you start down the slippery slope of scripting your way around every game limitation you encounter, there's no turning back. :wink:

 

The spell still looked like a Damage Health spell when I cast it but when it impacted with the target the effect was a mix of shield and damage health. Is there a way to make it solely look like a shield spell, no red in the entire spell whatsoever? I did tinker around with it but ultimately got nowhere.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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