Full Version : Monster edeting
xmlspawner >>Q&A >>Monster edeting
<< Prev | Next >>
Xerrox- 11-11-2006
First of this is proberly easy but i must have overlocked it.
But how do i make a monster spawn with a desired skill level, let's say i want to set it's eval int to 150 how do i do that ?
Is it possible to give regular monsters special abilities like
Dragons dispell summoned monsters
Sucubus's drains life
Champions when kills filles the earth with gold coins
Can such abilities be given to monsters. If yes how and what abilities are there.
ArteGordon- 11-11-2006
you can set skills like other properties
orc/skills.evalint.base/150
You can have mobs cast specific spells,
http://xmlspawner.15.forumer.com/index.php?showtopic=501
and give them special attacks,
from xmlspawner2.txt

QUOTE
- added the new XmlWeaponAbility attachment that allows mobs to be given special attacks on the fly. (thanks to Dave1969 for the suggestion) You can add special attacks to a spawned mob with a spawn entry like orc/ATTACH/xmlweaponability,BleedAttack
or manually add it to any mob with
[addatt xmlweaponability BleedAttack
and then target the mob.
Note, the attack name is case sensitive and can be any of
ArmorIgnore
BleedAttack
ConcussionBlow
CrushingBlow
Disarm
Dismount
DoubleStrike
InfectiousStrike
MortalStrike
MovingShot
ParalyzingBlow
ShadowStrike
WhirlwindAttack
which are the special weapon abilities defined in WeaponAbility.cs
You will also need to make this modification to basecreature.cs (or your custom mob script if you only want it to apply to certain mobs).
around line 290 change this

CODE
public virtual WeaponAbility GetWeaponAbility() { return null; }

to this

CODE
public virtual WeaponAbility GetWeaponAbility() { // ARTEGORDONMOD // allow creatures special attack ability to be specified by the xmlweaponability attachment //return null;
XmlWeaponAbility a = (XmlWeaponAbility)XmlAttach.FindAttachment(this, typeof(XmlWeaponAbility));
if (a != null)
{
return a.WeaponAbility;
}
else
{
return null;
}
}

and make sure that you have this at the beginning of the script

CODE
using Server.Engines.XmlSpawner2;

and add events that are triggered by creature death like the gold drops of champs
from xmlspawner2.txt

QUOTE
- added a new attachment called XmlDeathAction. This attachment, when applied to a creature allows any spawnable action to be performed on the creatures death. (thanks to Syntria for the idea). This could include sending the killer a gump or a message, adding items to the corpse, spawning another creature, etc. (the killer is considered to be the trigger mob in these actions).
An example of these applications is included in deathaction.xml in xmlextras.zip. Just "[xmlloadhere deathaction.xml" and start killing the creatures to see what happens.
For example, with this spawn entry
harpy/ATTACH/<xmldeathaction/action/@GUMP,Harpy be gone,0/Congratulations! You killed a harpy.
killing the harpy gives you this
You must perform xmlspawner installation step #2 for this attachment to work.

Some things, like the succubus lifedrain, are scripted specifically for them, but there are attachments that you can add that will do the same thing, such as XmlLifeDrain
from xmlspawner2.txt

QUOTE
- added three new attachments. XmlStamDrain, XmlManaDrain, XmlLifeDrain. When attached to a mob or weapon, these will drain stam/mana/life from the defender on each hit and give it to the attacker. If attached to an item in the world, it will drain a random amount of stam/mana/life when a player moves near it. The random value will be between 0 and the argument to the attachment. The default refractory period between uses is 5 seconds. If a negative drain value is given, then the attachment will be reported as a curse when attached.
For example, using the command
[addatt xmllifedrain 30 3 120
and targeting a mob, would give that player/mob 2 hours of lifedrain ability that would drain 0-30 hps on every hit, with a max rate of once every 3 seconds.

so you could spawn an orc with lifedrain ability by doing something like
orc/ATTACH/xmllifedrain,30,10