Pets - Foods (Updated)
In GitLab by @ghost on Apr 6, 2022, 12:32
So a proper issue explaining how pet's fully work.
How Pet foods work in Habbo?
Habbo pets eat randomly as soon as they need food. There is no pattern, they just do it randomly. When they drink or eat, the bowl / food gets an other interaction stage. Once they are finished, the pet can't eat or drink them anymore. User can't control how many stages there are, once the item is gone, its gone. Some pets have designated eating items, which is why the table pet_foods
was implemented.
The actual pet foods part (mostly speculation)
You see the data of how much energy each food gives and If the food is specific to different pet ids.
This is how customparams are stuctured:
- petfood23 as example
<customparams>NUTRITION,HOWMANYBITESBEFOREGONE,? | SPECIAL PETIDS IF NONE THEN ALL CAN EAT</customparams>
How the pet responds to eating?
-
If pet is hungry (dunno how that works) or is told to eat food, it will go towards the food and take a bite. There is a small animation where the pet looks down at the food and takes a bite. This will then need to be stored somewhere as customparams define how many bites the food actually has.
-
Bites are defined (this is what we think) like:
-
HOWMANYBITESBEFOREGONE -> so each food (mostly) has 10 or 15 bites, and 5 interaction states. So If a food would have 10 bites, every second bite would change the interaction state until it's at its 10th and it will be deleted.
-
NUTRITION. Nutrition is basically what the food has energy as a whole. This would essentially mean that every bite is a part of the nutrition. 350 nutrition means 350 / HOWMANYBITESBEFOREGONE, so 350 / 10 = 35 energy every bite until there is none.
If pet food runs out of interactions AKA bites, it will be deleted.