5. Adding Abilities and Spells to Creatures

5.1. How do I add abilities to creatures?

Go to the creature’s xdb file. For the example we are going to give the Titan the Chain Lightning spell. So open the xdb file and search for this part: [code]<KnownSpells>[/code] and under it there is something that looks like this:

<Item>
  <Spell>SPELL_ABILITY_CALL_LIGHTNING</Spell>
  <Mastery>MASTERY_ADVANCED</Mastery>
</Item>

This is the code that gives Titans the Call Lightning ability. Notice that it’s called SPELL_ABILITY_CALL_LIGHTNING and that is because it is considered as a spell and needs to be acticated in combat, unlike Life Drain of Rebirth. The abilities that are considered spells are called Spell Abilities, and these are the ones you’re going to learn to add/change/remove in this guide. So now we’ll go to the spell directory to look at Chain Lightning, which is found here: GameMechanics\Spell\Combat_Spells\DestructiveMagic\Chain_Lightning_Hit.xdb. For any other spell, use this: GameMechanics\Spell\Combat_Spells\*School*\*Spell*.xdb. Now open the Chain Lightning xdb file and at the top you should see this:

<TableID>SPELL_CHAIN_LIGHTNING</TableID>

This is the ID for the spell. Now back in the Titan file, paste this:

<Item>
  <Spell>SPELL_CHAIN_LIGHTNING</Spell>
  <Mastery>MASTERY_EXPERT</Mastery>
</Item>

This gives Titans the ability to cast Chain Lightning. To put other spells use this:

<Item>
  <Spell>SPELL_*Spell ID*</Spell>
  <Mastery>MASTERY_*Mastery*</Mastery>
</Item>

Change the *Spell ID* to the ID that’s in the spell xdb file and the *Mastery* to the wanted mastery ( None, Basic, Advanced, Expert), than save and play. Adding abilities is the same as spells, but IDs are in GameMechanics\Spell\Creature_Abilities\*Town*\*Ability* and the part to put in the creature xdb is:

<Item>
  <Spell>SPELL_ABILITY_*Ability ID*</Spell>
  <Mastery>MASTERY_*Mastery*</Mastery>
</Item>

In *Ability ID* put the ID from the xdb file and in *Mastery* put the mastery. Usually the mastery for abilities is Advanced.

5.1.1. How do I add an ability to a creature that doesn't have any?

If a creature doesn’t have any abilities, than instead of this:

<KnownSpells>
  <Item>
    <Spell>SPELL_*Ability/Spell*</Spell>
    <Mastery>MASTERY_*Mastery*</Mastery>
  </Item>
</KnownSpells>

You’ll have this:

<KnownSpells/>

So all you have to do is change this what you have to this:

<KnownSpells>
  <Item>
    <Spell>SPELL_*Ability/Spell*</Spell>
    <Mastery>MASTERY_*Mastery*</Mastery>
  </Item>
</KnownSpells>

Remember that you can add more spells/abilities.

NOTE: WHEN ADDING ABILITIES AND/OR SPELLS, REMEMBER THE <Item> IN THE BEGINNING AND </Item> IN THE END OR ELSE THE GAME WON’T WORK!!!

5.2. How do I add mana to creatures?

If you add spells, you also need to add mana so the spells can be cast. For the example, we’ll ad 15 mana to our Titans. Open the xdb file and look for this:

  <SpellPoints>0</SpellPoints>
  <SpellPoints1>0</SpellPoints1>
  <SpellPoints2>0</SpellPoints2>

Change the 0 in <SpellPoints>0</SpellPoints> to 15. I have no idea what the other teo are for.

5.3. How do I add the "Caster" ability in the Abilities Description?

This is very simple. Go to Text\Game\Creatures\*Town*\*Creature*Abilities.txt and add the word Caster with a space behind it and a period after. Save and play.



» Next: 6. Animations

modding_for_dummies/adding_abilities_and_spells_to_creatures.txt · Last modified: 2007/05/24 15:11 (external edit)
Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0