Spell Modding Tutorial
2.0 Templates and Examples
2.2.1 Example Spell - Lightning Strike
Though covered in-depth earlier in this tutorial, each example spell will have some comment line reminders for the various tags and values.
<SPHERE>:ATTACK
##Associates your new spell with a magic skill.
##Values: ATTACK : DEFENSE : CHARM
<NAME>:Lightning Strike
##Pick a name for your new spell.
##Values: any alpha-numeric string.
<TARGET_ALIGNMENT>:EVIL
##Determines who or what is affected by the spell.
##Values: EVIL : ALL
<TARGET>:CHARACTER
##Sets the target value for your spell.
##Values: PROJECTILE : CHARACTER : AREA : USERAREA : USER : USERANDPETS : ITEM
<CAST_TIME>:1
##Sets the spell’s casting time in seconds.
<MANA>:20
##Sets the amount of mana used per casting of the spell.
<ICON>:ICONS/spelllightning.png:ICONS/spelllightninga.png
##See pages:
##El Heffe’s The Icon Ramble
##Tiptoe’ Icon Tutorial
##For more information on icons.
<DESCRIPTION>:Lightning strikes target for\n8-10 damage.\n+4 points
of max damage per Attack Skill level
##The lines that describe the spell when moused-over in the game.
##The "\n" string is used to indicate hard line breaks.
[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>:-8
##Sets how the spell type is affected. (-8 hprecharge).
##Values: low-end of a min-max pairing.
<VALUE2>:-10
##Sets how the spell type is affected. (-10 hprecharge).
##Values: high-end of a min-max pairing.
<VALUE_BONUS>:-0
##Sets the bonus per level of Attack Magic skill to -0 (pretty sure that's not an actual number).
##Low-end of a min-max pairing.
<VALUE2_BONUS>:-4
##Sets the bonus per level of Attack Magic skill to -2.
##High-end of a min-max pairing.
<DAMAGE_TYPE>:ELECTRIC
##Sets the damage type to ELECTRIC for resistance checks.
[/EFFECT]
##Closes the EFFECT stanza.
#sfx:type:duration:looping:speed:turnrate:path to effect:exclusive:respect bonuses
##Comment line that offers clues on what the various values mean for the SFX tag lines.
<SFX>:STATIONARYTARGET:.5:1:0:0:SPELLS/EFFECTS/FIREPUFF/bluepuff.mdl:0:0
##Sets the details of this spell’s "Special Effect".
<SFX>:STATIONARYTARGET:-1:0:0:0:SPELLS/EFFECTS/LIGHTNING/lightning.ams:0:0
##Sets the details of this spell’s other "Special Effect".
<SOUND>:SUCCESS:SOUNDS/SPELLS/lightning.wav
##Path to sound resource.
<SOUND>:FAIL:SOUNDS/SPELLS/fail.wav
##Path to sound resource.
<SOUND>:CHANT:SOUNDS/SPELLS/cast2.wav
##Path to sound resource.
<CAST_PARTICLE>:ELECTRIC:0:0:0
##Sets details for the spell’s particle effect, if any.
<CAST_PARTICLE>:PURPLEFIRESPARK:0:0:0
##Sets details for the spell’s other particle effect, if any.
<REQUIRES>:MAGIC:19
##Sets the minimum value for the Magic Attribute a character must have to use the spell.
[/SPELL]
2.2.2 Targeted Spell Template
Here you'll find a Cut-and-Paste template and tag descriptions that you can use to make your own spells that instantly affect their target with no delay and no need to aim, you just have to click on the target.
This template is based on the Lightning Strike spell. Cut and paste it into your "spells.dat" file 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.
<SPHERE>:ATTACK
<NAME>:*
<TARGET_ALIGNMENT>:EVIL
<TARGET>:CHARACTER
<CAST_TIME>:*
<MANA>:*
<ICON>:*
<DESCRIPTION>:*Name* strikes target for\n*Min. Dmg.-Max. Dmg.* damage.
\n*Bonus* points of max damage per Attack Skill level
[EFFECT]
<ACTIVATION>:USAGE
<TYPE>:HPRECHARGE
<DURATION>:INSTANT
<VALUE>:*
<VALUE2>:*
<VALUE_BONUS>:*
<VALUE2_BONUS>:*
<DAMAGE_TYPE>:*
[/EFFECT]
#sfx:type:duration:looping:speed:turnrate:path to effect:exclusive:respect bonuses
<SFX>:STATIONARYTARGET:.5:1:0:0:SPELLS/EFFECTS/FIREPUFF/bluepuff.mdl:0:0
<SFX>:STATIONARYTARGET:-1:0:0:0:SPELLS/EFFECTS/LIGHTNING/lightning.ams:0:0
<SOUND>:SUCCESS:SOUNDS/SPELLS/lightning.wav
<SOUND>:FAIL:SOUNDS/SPELLS/fail.wav
<SOUND>:CHANT:SOUNDS/SPELLS/cast2.wav
<CAST_PARTICLE>:ELECTRIC:0:0:0
<CAST_PARTICLE>:PURPLEFIRESPARK:0:0:0
<REQUIRES>:MAGIC:*
[/SPELL]