Spell Modding Tutorial

Written by: Hazmat
Edited by: El Heffe

2.0 Templates and Examples

2.6.1 Example Spell - Greater Heal

Though covered in-depth earlier in this tutorial, each example spell will have some comment line reminders for the various tags and values.


[SPELL]

<SPHERE>:DEFENSE
##Associates your new spell with a magic skill.
##Values: ATTACK : DEFENSE : CHARM

<NAME>:Greater Heal
##Pick a name for your new spell.
##Values: any alpha-numeric string.

<TARGET_ALIGNMENT>:ALL
##Determines who or what is affected by the spell.
##Values: EVIL : ALL

<TARGET>:USER
##Sets the target value for your spell.
##Values: PROJECTILE : CHARACTER : AREA : USERAREA : USER : USERANDPETS : ITEM

<CAST_TIME>:2
##Sets the spell’s casting time in seconds.

<MANA>:50
##Sets the amount of mana used per casting of the spell.

<ICON>:ICONS/spellheal2.png:ICONS/spellheal2a.png
##Sets the paths to the icon artwork for your spell.
##See pages:
##El Heffe’s The Icon Ramble
##Tiptoe’ Icon Tutorial
##For more information on icons.

<DESCRIPTION>:Heals caster for 40 HP\n+3 HP per Defense Skill level
##The lines that describe the spell when moused-over in the game.
##The "\n" string is used to indicate hard line breaks.

<SFX>:FOLLOWTARGET:-1:0:0:0:SPELLS/EFFECTS/HEAL/heal.ams:0:1
##Sets the details of this spell’s "Special Effect".

<SOUND>:SUCCESS:SOUNDS/SPELLS/heal.wav
##Path to sound resource.

<SOUND>:FAIL:SOUNDS/SPELLS/fail.wav
##Path to sound resource.

<SOUND>:CHANT:SOUNDS/SPELLS/cast.wav
##Path to sound resource.

<CAST_PARTICLE>:BLUESPARK:0:0:0
##Sets details for the spell’s particle effect, if any.

<CAST_PARTICLE>:TINYFASTGLEAM:0:0:0
##Sets details for the spell’s other particle effect, if any.

<REQUIRES>:MAGIC:60
##Sets the minimum value for the Magic Attribute a character must have to use the spell.

[EFFECT]
##Opens the EFFECT stanza.
##Values: EFFECT : PAYLOADEFFECT

<ACTIVATION>:USAGE
##Determines how the effect is activated.
##All spells are activated by USAGE, no exceptions.

<TYPE>:HPRECHARGE
##This determines exactly what the spell does,
##Values: See the Effect Archive

<DURATION>:INSTANT
##Sets the length of time the effect remains active.
##Values: INSTANT (all at once) : Any positive number in seconds.

<VALUE>:40
##Sets the base amount healed.

<VALUE_BONUS>:3
##Sets the bonus healed per skill level in Defense magic.

[/EFFECT]
##Closes the EFFECT stanza.

[/SPELL]

2.6.2 Heal Spell Template

Here you'll find a Cut-and-Paste template and tag descriptions that you can use to make your own spells that heal the caster, caster and pets, or a target. The important thing to remember here is that defense spells target you with "good stuff" instead of targeting the bad guys with "bad stuff."

This template is based on the Greater Heal spell. Cut and paste it into your spells.dat then fill in the blanks.

Important: Make sure you replace any text that is high-lighted and enclosed in *asterisks* with proper values!

Comments after the pound sign "#" are informational only, and will be ignored by the game.

[SPELL]
<SPHERE>:DEFENSE
<NAME>:*
<TARGET_ALIGNMENT>:ALL <TARGET>:USER
<CAST_TIME>:*
<MANA>:*
<ICON>:ICONS/spellheal2.png:ICONS/spellheal2a.png
<DESCRIPTION>:Heals caster for *Value* HP\n+*Bonus* HP per Defense Skill level
<SFX>:FOLLOWTARGET:-1:0:0:0:SPELLS/EFFECTS/HEAL/heal.ams:0:1
<SOUND>:SUCCESS:SOUNDS/SPELLS/heal.wav
<SOUND>:FAIL:SOUNDS/SPELLS/fail.wav
<SOUND>:CHANT:SOUNDS/SPELLS/cast.wav
<CAST_PARTICLE>:BLUESPARK:0:0:0
<CAST_PARTICLE>:TINYFASTGLEAM:0:0:0
<REQUIRES>:MAGIC:*

[EFFECT]
<ACTIVATION>:USAGE
<TYPE>:HPRECHARGE
<DURATION>:INSTANT
<VALUE>:*
<VALUE_BONUS>:*
[/EFFECT]
[/SPELL]