Project MMO

Project MMO

10M Downloads

Consistent Combat XP

Tyrius1 opened this issue ยท 7 comments

commented

Describe the bug
Mobs don't give combat experience consistently

Expected behavior
I believe the zombie handles combat experience perfectly. Being that it multiplies the combat experienced decided in datapack times the damage value done to the mob. With the boar, it gives 1x amount of damage done even with combat set to 4 in data.
Also noticed that even with pigs having this set to 4 in data they give 0 combat xp.

To Reproduce
Rather than sharing steps to produce I think it might be easier for both of us if I share the BAP datapack I'm working on.
It contains every BAP mob.
pmmo.zip

Screenshots
The boar:
image
The zombie:
image

Versions:

  • Minecraft: 1.19
  • pmmo-1.19-0.0.4

Additional context
Add any other context about the problem here.

commented

pmmo default configs.zip
All my default configs atm incase it is needed or helps

commented

Two questions:

  1. Do the settings show in the P menu for the boar?
  2. if you add "data" to pmmo-common.toml's "Info" array, do you see the boar data loading?
commented

[09:11:14] [Render thread/INFO]: XP_VALUES: RANGED_TO_MOBS: betteranimalsplus:boar{archery:4} loaded from config
[09:11:14] [Render thread/INFO]: XP_VALUES: SHIELD_BLOCK: betteranimalsplus:boar{endurance:4} loaded from config
[09:11:14] [Render thread/INFO]: XP_VALUES: MELEE_TO_MOBS: betteranimalsplus:boar{combat:4} loaded from config
[09:11:14] [Render thread/INFO]: XP_VALUES: DEATH: betteranimalsplus:boar{hunter:32} loaded from config
[09:11:14] [Render thread/INFO]: XP_VALUES: FROM_MOBS: betteranimalsplus:boar{endurance:4} loaded from config
[09:11:14] [Render thread/INFO]: REQS: KILL: betteranimalsplus:boar{combat:0} loaded from config
info logging does show them being loaded

2022-06-20_09 12 35
P menu really doesn't show a whole lot of anything tbh. I'm unable to click any of these lines.

Same is happening with non animal modded mobs like ghouls and revenants from The Graveyard mod.

commented

2022-06-20_09 16 02
image
Iron Golems also not granting combat xp on strike, similar to pigs and other minecraft animals. I notice that Iron golems are automatically tagged as pmmo:animals. Not sure if that might have some effect on this.

commented

Endurance is also effected by this. Hit by pillager and get 23 endurance xp but hit by boar and only take 4 endurance xp and they do the same amount of damage in hearts. Where they both have the same exact values. (Boar actually hits slightly harder than pillager)

commented

I figured out your issue. These entities are not added to the data/pmmo/tags/entity_types/mob.json tag. because of this, their damage is defaulting to the pmmo-server.toml setting for RECEIVE_DAMAGE, DEAL_MELEE_DAMAGE and DEAL_RANGED_DAMAGE respectively.

pmmo has two tags animals and mobs that you will want to add these modded entities to in order to use the *_MOBS and *_ANIMALS respectively.

in your datapack add the tags under the pmmo namespace.

alternatively, you can define these entities' xp using the default events i listed above and not use the tags.

commented

That fixed, thanks!