Pet Experience

If you make define a pet as a living pet, then it will unlock personal statistics and namely experience.

Experience is the way for pets to go from one level to the other and unlock new statistics that you can tune into your living pet config (see the template for the implementation).

How can my pet get experience ?

MCPets provide 2 major ways for your pet to gain experience.

First is using Pet Food with experience candies. Check out the Pet Food page to see how to implement EXP food to boost the pet experience manually.

Second, and most general way of gaining experience, is to use a mechanic called "PetExperience" listed in the MythicMobs features. This mechanic gives a given amount of experience to the pet, which is also tunable through advanced maths thanks to MythicMobs.

Like every MythicMobs mechanic, it can be triggered through all possible MythicMobs triggers, so you're free to make pets gain experience your own unique way and have a complete control on it.

Here is the format of the mechanic:

UsageRequirementExample

petExperience{exp=#}

target must be a pet

petExperience{exp=10} @self

Examples of usage

Since you have a complete control of the experience of the pets through the dedicated mechanic, it can be quite overwhelming and hard to find the right way to do so.

Here we provide a few example situations and how we would address them from our perspective: in a way, how to make pets gain experience according to our vision (which is by no mean universal).

Note that you can find a list of classic triggers that you can use to give experience to pets on MythicMobs wiki: Triggers section.

1. Time experience

While the pet is being summoned, we can imagine that it would be nice if it was learning a little of experience every minutes for instance, just for being around and summoned.

This would be implemented in the following way:

  • Go into your MythicMob pet's file ("./plugins/MythicMobs/Mobs")

  • Add the following line in the Skills section : - petExperience{exp=5} @self ~onTimer:200

This specific script will give 5xp every 10s (200 ticks) to the pet.

You could make this script much more advanced using a skill with conditions, because maybe you would like the pet to gain experience only if it's incombat, then you would using the incombat{} condition of MythicMobs into a skill to achieve that.

2. Participation to combat experience

Maybe you want to reward the pet for participating to a combat with the player. Therefore we could think of giving experience to the pet when a mobs dies around.

This would be implemented in the following way:

  • Select a monster that would deliver experience when dying

  • Go into the MythicMob monster's file ("./plugins/MythicMobs/Mobs")

  • Add the following line in the Skills section: - petExperience{exp=30} @ENO{r=40} ~onDeath

This would give 30xp to every pet in a range of 40 blocks around.

However, you could also want that the experience the pet gains is not dependent of the mob it kills, but more of various formulas you want to implement yourself.

This could be done in the following way:

  • Open a Skill file or create one into "./plugins/MythicMobs/Skills"

  • Add the following skill:

Pet_Experience_Custom:
  Skills:
  - petExperience{xp=100*(1+exp(-<pet.experience>))} @self
  • Go into your MythicMob pet's file ("./plugins/MythicMobs/Mobs")

  • Add the following line in the Skills section : - skill{s=Pet_Experience_Custom} ~onSignal:EXP_CUSTOM

This specific script will give up to 200xp to the pet when the signal EXP_CUSTOM is triggered (for instance, when a pet dies), with an exponential decrease to 100xp depending of the pet's current experience.. every 5s (200 ticks) to the pet.

Of course, you can make this even more advanced thanks to the Math module of MythicMobs and the placeholders that are provided, as well as the conditions of MCPets.

Last updated