Suggested New Module: Pets

Vaibhav Bajaj

Owner of the best system to view a poop emoji on
Module Name: Pets


This module adds a pet functionality to the game. Now, players can have pets ranging from poodles to dragons following them and helping in completing tasks. Pets can come from Pet Shops and Chests to begin with. Players can have at most one pet following them at one point in time. As their PetDomestication level increases, they can have more pets following them.

Pets have long since been an interesting addition to all MMORPG games. Players like to have a companion they have control over simply to show off and also to complete tough quests. Depending on how it is implemented, it may also add to the complexity of the game which arouses the interest of the Hardcore Gaming community, a community that Minecraft seemed to lack.


This module will be a HUGE project. Some functions it includes are Spawning, Caretaking, Training, and Player Assists. I will now cover each in detail.

As mentioned earlier, Spawning would initially take place through PetShops and Chests.

PetShop - Components:
1. PetShopDefinition: Definition of interface where the players buy pets.
2. PetShopWindow - A UI for the same.

PetShop - Events:
All events are very much similar to player events
1. BuyPet - Gives pet to the user if the user has the required level and the required items for buying the pet.

2. SellPet (optional) - Sells pet to shop returning half (changeable - basically a portion of) the Buying Price items.
3. Preview (optional) - Lets the player use the pet withing a limited region.

PetShop - Systems:
1. PetShopWindowSystem - The system that handles buying and selling of pets.

Chest - Components
1. Chests have already the necessary components in Core. What is needed is merely for people to add Pets to chests.
2. PetSpawnerComponent (optional - probably advised against) - This will calculate a random float. If the float is in certain ranges, a random pet will be given. The rarer the pet the less the probability of it being in the chest.

Chest - Events
1. All necessary chest events are already in use in Core module

Chest - System
1. PetSpawnerSystem (only implement if PetSpawnerComponent is implemented) - This will handle placing the pet in a position in the chest.

Spawning - Dependencies
1. Core - For obvious reasons and Chests
2. engine - For obvious reasons

Caretaking (optional):

Pet caretaking will involve feeding the pet food, and sleep.
Caretaking - Feeding will have many similarities to the Hunger module

Feeding - Components
1. PetLifeComponent: Will store Pet HP
2. PetHungerComponent: Will store Pet hunger.

3. PetThirstComponent (optional): Will store Pet thirst.

Feeding - Events
1. FoodConsumedEvent: If food is consumed, reduce hunger.
2. LiquidConsumedEvent (optional - If PetThirstComponent is implemented): Same as above for thirst instead.
3. PetDeathEvent: Pet shall perish if he does not receive food or Pet HP reaches 0 (or lacks required amount of water for more than a specified time period).

NOTE: Pet HP shall reduce due to falls and attacks on Pet both of which come later.

Feeding - System
1. PetHungerManagerSystem: Will manage hunger felt by pet.
2. PetThirstManagerSystem: Will manage thirst felt by pet.
3. PetDeathSystem: Will handle processes terminated if pet dies.

Feeding - Dependencies
1. Cooking module: the pet will be fed recipes in the cooking module.
2. Potions (if Potions are implemented. See below)
3. Core: For obvious reasons
4. engine: For obvious reasons

Feeding - Extensibility
1. Pets can be fed Potions which would increase dependencies. These potions would have the same effects as on players increasing speed, attack etc.

Sleeping - Components
1. PetEnergyComponent - Stores the stamina the pet has.

Sleeping - Events
1. PetAwakeEvent - Depletes pet stamina
2. PetFallAsleepEvent - Pet disappears
3. PetSleepEvent - Increases pet stamina

Sleeping - Systems
1. PetSleepManager - Tracks energy left and increase and decrease in energy.
2. PetSleepingSystem - If pet is sleeping or has fallen asleep, terminates all pet activities.

Training (optional):

There are two ways the Pet module could go:
1. Each pet can only have a certain HP, MP, Damage, etc. much like a piece of Equipment.
- It would provide some stability to the user.
- This would reduce the level of Pets to something like equipment pieces. It would lose the purpose of pets themselves.
2. Each pet can be leveled up by training to improve stats over time.

Training would include strenuous work and several training arenas of different difficulties which each offer the pet experience for completion.

Training - Components
1. PetTrainingArenaDefinition - Stores the basic definition of a training arena
2. ArenaDifficultyComponent - Can be used to store arena difficulty from Easy to Legendary.
3. PetTrainingCourseDefinition - Stores the definition of the training course, its difficulty, experience offered, time taken for completion etc.
4. PetExperienceComponent - Stores experience gained. (Could be merged with PetStatsComponent)
5. PetStatsComponent - Stores pet stats: PetHealth, PetMana (if there is wish to equip pet spells or the like later on), PetAttack, PetDefence.

Training - Events
1. TrainingCourseBegunEvent - Start the time taken for completion of course.
2. TrainingCourseCompletedEvent - Give experience earned to pet
3. PetLevelGained - Improve Pet Stats by a given percentage

Training - System
1. PetExperienceManager - Manages level gains and the beginning and end of training courses.

Training - Extensibility
1. Training can be done in more than one ways: TrainingCourses and Player Assists (described later)
2. Training a pet can unleash abilities or skills of pets (Mentioned above)

Training - Dependencies
1. Core - For obvious reasons
2. engine - For obvious reasons

Player Assists
Finally, we reach the most important sub-module. This is the sole reason why pets are created to begin with. It is all to help the player in different ways. To begin with, the pet should help in attacking and defending the player. This is the most basic of commands a pet should handle. Attack the enemy attacking the player. This module also has near unlimited extensibility of which I will share a few examples later.

Player Assists - Components
1. PetCurrentStatsComponent (similar to Training sub-module, see above. The difference is these statistics will be updated as the pet is damages, uses skills, gains or loses attack or defence due to potions - Explained in Extensibility) - This is absolutely necessary for storing all CURRENT pet statistics including PetHealth, PetMana (if there is wish to equip pet spells or skills later on), PetAttack, PetDefence, and of course PetName.
2. PetDefinition - Will define the behavior of the pet

Player Assists - Event
1. PetPlacedOnGroundEvent - If true, listen for the below listed events.
2. PlayerDamagedEvent - If instigator is a player or AI, initiate attack of pet on enemy.
3. PetDamagedEvent - Retaliate if not taking action before. Reduce Pet HP by enemy attack.
4. PetAttackEvent - Damage the enemy by the amount of attack.
5. PetDeathEvent - Pet Died
6. PlayerMoveEvent - Player moved from one place to another

Player Assists - Systems

1. PetCombatManager - Will manage all pet actions during combat.

2. PetBehaviorManager - Will listen to events like PetPlacedOnGroundEvent, PlayerMoveEvent, PlayerDamagedEvent, and PetDamagedEvent. This system will make sure the pet follows the player if placed on the ground. Also, it will handle initiation of PetCombatManager when combat is initiated.

Player Assists - Extensibility
As I mentioned earlier, people can go crazy when adding mods to this sub-module
1. Pet skills can be added and use Pet MP to perform special attacks or the sort.
2. Pets can become requirements for special quests and, thus, assist players in that way.
3. Pets like like Skeletons can complete menial player tasks on their own like harvesting crops, storing equipment etc.

Player Assists - Dependency
1. Core - For obvious reasons
2. engine - For obvious reasons


Pet module has near infinite extensibility. Here are some ideas:
1. Functionalities like Pet classes may be added. Pets can have different pros and cons and different classes much like the weapons in the Equipment module. Some classes can be: Fire, Rock, Air, Water, Light, Dark etc.
A chain may be created for advantages over others. Here is a sample image describing pros of certain classes over others:

Light and dark have the advantage over all others and are arch-nemesis of each other. These can be rare classes. The rest have an advantage over each other in the following order: Air -> Earth -> Water -> Fire -> Air.

This is a just a sample of what can come with classes of Pets.

2. Rearing wild animals: Players are allowed to rear wild animals as their own pets given they have high enough PetDomestication level.

3. Enhancing pet abilities with Potions or Equipment.
4. Pet Breeding can be done in BreedingCaves to give birth to new pets!

Countless other ideas can be implemented in this module.

1. Cooking module: Since pets need food. (optional - if not included, they will regain health slowly like players)
2. Core: For obvious purposes.
3. engine: For obvious purpose
Last edited:

Vaibhav Bajaj

Owner of the best system to view a poop emoji on
JYKoder, I think that should not be considered a pet. Pets would be those that follow you, help you and stay with you till they die of natural causes or enemy attacks. A cow that you have reared for killing (I really doubt anyone would do that since cows freely roam and can easily be killed instead of reared) would certainly NOT be considered a pet. I am thinking of an alternative to *rear* as I have mentioned above since that does not seem to convey the message properly.

Thanks a lot for your input!


Org Co-Founder & Project Lead
I think the word you're looking for is "Livestock" - aka animals you control and care for, but do not necessarily consider pets :)

The idea for pets, livestock, and so on is pretty much a given, but it is a huuuuuge topic, and I do think I remember it coming up in the past and I suggested focusing on a smaller piece :D

Much like the vehicles thread which started at a scope to cover all vehicles including transport modes etc you IMHO need to do one of two things:
  1. Scope this waaaaay down to where it covers functionality that could reasonably be implemented in a single module. Which I think last time around was the idea of having a way to interact with a deer to "tame" it, making it follow you. Much like what you can do with Gooey in GooeysQuests. Or anything else of that type of scope. Like enabling Hunger for the deer to where it has to eat or it'll die.
  2. Use this thread as an overarching design meant to describe the involved modules and their interactions with each other. So Pets would involve (non-exhaustive list): Taming, Caretaking, Training, Breeding (inc. Genome?), Pathfinding, Stats, Gaining Levels, Assisting the player in some way .... etc. Tons and tons of stuff.
Since I know you badly want to claim something else right now I'll go ahead and approve this early for the initial write-up but please come back to it and rework it to match one of the two above suggestions.

Vaibhav Bajaj

Owner of the best system to view a poop emoji on
Some features of MyPet are:

  • most mobtypes are leadable
  • You can ride your MyPets
  • Hunger-System
  • Configurable Damage/Hitpoints/Food/LeashFlags/Speed
  • Customizable skills and skilltrees
  • Skilltrees are configurable for every MyPet-type
  • ! SkilltreeCreator !
  • and much more!
What do you know. All my ideas have already been put into use :p