Abilities are unique skills which can be bound onto items to make them feel more unique. Most of the abilities can be cast using right/left click (while sneaking?) and help the player by giving him an extra damage source or a buff. The action the player must perform in order to cast an ability depends on the ability casting mode which you specify when adding an ability to an item. There are six different casting modes:
-
left-click
&shift-left-click
-
right-click
andshift-right-click
-
on-hit
triggered when hitting an enemy with a weapon -
when-hit
triggered when being hit by an enemy.
Damaging abilities can either deal physical or magical damage. Depending on their type, the ability damage can be increased by a specific item stat, either Physical Damage
or Magical Damage
. Physical abilities correspond to abilities which utilize items or weapons, like Circular Slash or Item Throw. Magical abilities correspond to elemental/magical abilities like Firebolt, Fire Comet...
Adding abilities to MMOItems using MythicMobs
If you have MythicMobs installed on your server, you can utilize the /MMOItems/dynamic/mythic-mobs-abilities folder in order to add item abilities to MMOItems using the MythicMobs skill creation feature. Create a YAML configuration file in that folder and write the following:
# The internal name of the MM skill.
mythicmobs-skill-id: <Internal name of your MythicMobs skill>
# Ability name displayed in lore.
name: <Ability name displayed in item lore>
# Ability Modifiers (default values).
cooldown: <Default cooldown value>
damage: <Default damage value>
MMOItems requires premium MythicMobs (at least 4.7.0) in order to function.
In order to setup a MM ability in MMOItems, you need to specify three different things: the MM internal skill name which will be used by MMOItems to detect and cast the corresponding MM skill, the ability name which is used by MMOItems to display the ability in the item lore, and the modifiers the ability has as well as the default modifier values.
For instance, if you want the ability to also have a damage
modifier, for a damaging projectile for example, you only need to add to the config file: damage: 6
if you want the default damage value to be 6.
Requires a server restart for ability to show up.
Retrieving ability modifier values in MythicMobs skills
Let's say you have setup an Ice Bolt
skill (skill example in the MM wiki) which casts a damaging ice projectile.
IceBolt:
Skills:
- projectile{onTick=IceBolt-Tick;onHit=IceBolt-Hit;v=8;i=1;hR=1;vR=1} @TargetLocation
IceBolt-Tick:
Skills:
- effect:particles{p=snowballpoof;amount=20;speed=0;hS=0.2;vS=0.2} @origin
IceBolt-Hit:
Skills:
- damage{a=10}
- potion{type=SLOW;duration=100;lvl=2}
As you can see, the skill currently deals 10 damage to whatever entity it hits. As of right now however, the skill will deal 10 damage no matter what modifier the ability has. We need some way to retrieve data from the ability when it is cast using an item from MMOitems, in order to deal the correct amount of damage using the MythicMobs damage skill mecanic.
This can be done using placeholders. Instead of writing damage{a=10}
, use damage{a="<mmoitems.skill.IceBolt.damage>"}
. Thanks to this placeholder you can retrieve modifier data, from the item itself.
Since MythicMobs (premium builds) also supports math formulas for these type of mecanics which support numeric values, you can also use for instance a="<mmoitems.skill.IceBolt.damage> * 10"
which takes the ability modifier value from MMOItems and multiplies it by 10. Coupled with skill conditions you can have brand new amazing skills with really complex features and formulas.