Editing Spells
On January 23, 2011 at 12:03:06 PMSpells are located in data/spells and have an extension of .spl.
Like a particle systems, they are XML files.
(these also don't have an XML declaration - what was i doing...)
Examples:
Code:
<Spell Icon = "spells/icons/INAI.png" MaxDamage = "2" MinDamage = "0" Type = "Stream" DamageInterval = "0.5" Time = "10" SPCost = "5" Range = "20" Animation="CastSpellStream01">
<ParticleSystem Filename = "boxlaser.psys" CastFrom="SpellCast"/>
</Spell>
Code:
<Spell Icon = "spells/icons/randombolt.png" MaxDamage = "20" MinDamage = "10" Speed = "30" SPCost = "2" Range = "15" CoolTime = "3">
<ParticleSystem Filename = "randombolt.psys"/>
</Spell>
Spell Element
Code:
<Spell Icon = "spells/icons/randombolt.png" MaxDamage = "20" MinDamage = "10" Speed = "30" SPCost = "2" Range = "15" CoolTime = "3">
</Spell>
Available properties are:
- Type - The type of the spell - OneShot = fire once, MultiShot = fire multiple times until we reach Time, Stream = stream stuff until we reach Time
- Animation - The name of the animation to play for this spell.
- MinDamage - The minimum damage.
- MaxDamage - The maximum damage.
- Time(MS/ST) - The amount of time to cast the spell for.
- Speed(OS/MS) - The speed at which the spell moves.
- SPCost - The SP cost to cast the spell.
- Range - The range of the spell.
- CoolTime - The cooldown time of the spell.
- DamageInterval(ST) - The interval at which the spell causes damage.
- Icon - The icon of the spell.(32x32(minimum, 64x64 recommended) image, should be in data/spells/icons/)
ParticleSystem Element
Code:
<ParticleSystem Filename = "boxlaser.psys" CastFrom="SpellCast"/>
</Spell>
Available properties are:
- Filename - The filename for the particle system.
- CastFrom - The joint to cast the spell from(e.g. "Hand.L" for left hand).
Getting a spell into the game
If you want to get the spell so that you can cast it:
1) Open data/entities/RandomBox.plr(or any other entity file you want to give the spell). it looks like this:
Code:
<Player ModelFile ="RandomBox.DF3DM" Name = "Random Box" HP ="30" MaxHP ="30" SP = "42" MaxSP = "42" Picture = "rboxGuy.png" PartyPicture = "rboxGuy.png" MovementSpeed="4.0">
<SpellList>
<Spell Filename = "randombolt.spl"/>
<Spell Filename = "unnamedspell1.spl"/>
<Spell Filename = "pathtest.spl"/>
<Spell Filename = "pathtest2.spl"/>
</SpellList>
<Animation State = "Idle" Filename = "RandomBox_Idle.DF3DA"/>
<Animation State = "Walk" Filename = "RandomBox_Walk.DF3DA"/>
<Animation State = "Death" Filename = "RandomBox_Death.DF3DA"/>
<Animation State = "CastSpell" Name = "CastSpellStream01" Filename = "RandomBox_CastSpellStream01.DF3DA"/>
<SpellShortcut Spell = "0" Shortcut = "0"/>
<SpellShortcut Spell = "1" Shortcut = "1"/>
<SpellShortcut Spell = "2" Shortcut = "2"/>
<SpellShortcut Spell = "3" Shortcut = "3"/>
</Player>
2) Add the spell to the spell list.
Code:
<SpellList>
<Spell Filename = "randombolt.spl"/>
<Spell Filename = "unnamedspell1.spl"/>
<Spell Filename = "pathtest.spl"/>
<Spell Filename = "pathtest2.spl"/>
<Spell Filename = "NewSpellName.spl"/> <--- replace with actual spell name
</SpellList>
3) If you want it on the spellbar, add it to the list of shortcuts.
Code:
<SpellShortcut Spell = "0" Shortcut = "0"/>
<SpellShortcut Spell = "1" Shortcut = "1"/>
<SpellShortcut Spell = "2" Shortcut = "2"/>
<SpellShortcut Spell = "3" Shortcut = "3"/>
<SpellShortcut Spell = "Number Of Spell" Shortcut = "Position In Spellbar"/> <--- the number for this would be 4
4) Blow stuff up.
Please post screenshots of any good spells.