Required for this tutorial:
-
MMOEmpire Server v2 or
v3
-
Visual C# 2010 Express
This is a very simple tutorial. It will allow you to make custom projectiles shoot out of your custom items, change projectiles of monsters, etc.
This tutorial is made for people who know how to create custom items. I recommend viewing a tutorial on that before this.
1. Open the solution in Visual C#.
2. Open up additions.xml and dat32.xml.
3. Copy a projectile from dat32.xml into additions.xml.
Notes:
-Rotation means the projectile will rotate while in mid air
-AngleCorrection will change the angle of the projectiles if you are shooting more than one (on demon blade there is a larger angle than double bow)
3 1/2. Make sure to change the type= and id= to something that is unique.
4. Make a custom sprite using
this tutorial.
Optional 5. Make a custom item using
this tutorial and add a custom texture if you wish using
this tutorial.
6. Now change <ObjectId> under <Projectile> in a weapon xml or behavior class to the id= of your projectile.
Here's an example of my projectile and weapon in additions.xml:
Code:
//PROJECTILE
<Object type="0x15BA" id="Magic Dagger">
<Class>Projectile</Class>
<Texture>
<File>lofiObj5</File>
<Index>0x88</Index>
</Texture>
<Rotation>100</Rotation>
</Object>
//WEAPON
<Object type="0x15B9" id="Dagger of the Exotic Sea Creature">
<Class>Equipment</Class>
<Item/>
<Texture>
<File>lofiObj5</File>
<Index>0x89</Index>
</Texture>
<SlotType>2</SlotType>
<Description>A dagger crafted with the bones of an exotic sea creature.</Description>
<RateOfFire>1.15</RateOfFire>
<Sound>weapon/fire_dagger</Sound>
<Projectile>
<ObjectId>Magic Dagger</ObjectId>
<Speed>180</Speed>
<MinDamage>125</MinDamage>
<MaxDamage>175</MaxDamage>
<LifetimeMS>325</LifetimeMS>
</Projectile>
<ActivateOnEquip stat="26" amount="2">IncrementStat</ActivateOnEquip>
<ActivateOnEquip stat="22" amount="4">IncrementStat</ActivateOnEquip>
<ActivateOnEquip stat="28" amount="2">IncrementStat</ActivateOnEquip>
<BagType>4</BagType>
<FameBonus>6</FameBonus>
<NumProjectiles>2</NumProjectiles>
<OldSound>daggerSwing</OldSound>
</Object>