Help: Gained XP during the battle... however, for some reason, the character's HP/MP decreased based on how much XP the enemy had. Why this happens?

Hello, I'm facing an issue with RPG Maker MV where every time an enemy has a certain amount of XP, and I defeat them for testing, something strange happens... My character loses HP and MP for some reason, and this seems to be based on how much XP the enemy has. For example: if the enemy gives 100 XP, then the player loses 100 HP/MP. If this behavior is default, it's really messed up. I hadn’t tested the XP before because I was focused on animations, sprites, and so on. I do use some plugins, but I'm not exactly sure which one might be causing this issue. Maybe some problem with the XP curve? I honestly hope it’s not some irreversible bug.

EDIT: What I’m seeing is that when you level up, my HP/MP don’t actually decrease. To be more specific, I start at level 1 with 300/300, and when I level up to, say, level 74, it becomes 300/1740. Still, I’d appreciate it if anyone could help me with this.

EDIT 2: Ok, i got it now, use this plugin: https://forums.rpgmakerweb.com/index.php?threads/heal-actors-on-level-up.82973/

it allows heal your actors on level up, i will let this thread opens for those that have the same problem
No, that is not default - but you didn't give enough information to even start guessing.

does MaxHP or HP gets reduced the points?

please give a screenshot of your entire plugin manager so that we know which plugins you use and in which order - incompatible plugins or plugins in the wrong order can cause a lot of strange effects.

how do you test the battle and the results? with a new game or continuing a saved game? always test with a new game, otherwise the old save might load older configurations that no longer work after some changes you did.
No, that is not default - but you didn't give enough information to even start guessing.

does MaxHP or HP gets reduced the points?

please give a screenshot of your entire plugin manager so that we know which plugins you use and in which order - incompatible plugins or plugins in the wrong order can cause a lot of strange effects.

how do you test the battle and the results? with a new game or continuing a saved game? always test with a new game, otherwise the old save might load older configurations that no longer work after some changes you did.
Ok, first of all, thanks for the reply. I mentioned in the edit of my comment that what I’ve noticed is that when you level up, your HP/MP don’t actually decrease. To be more specific, I start at level 1 with 300/300, and when I level up to, say, level 74, it becomes 300/1740. In other words, the player doesn’t get his fully bar healed and whant the player have 1740/1740 of HP, same goes for MP. That’s why it looks like the HP/MP have decreased. Sorry for not being clear earlier.
What you describe is default behaviour. Although you might be able to event adding HP and MP on level-up, I would be inclined to use a plugin. I haven't used this one myself, but the plugin author has a solid reputation for good work:

https://himeworks.com/2015/10/level-up-events/

Edit: If you decided to do it by an event, I think you would be using a parallel event reading each actor's level into a variable, comparing it to what the previous time the level was, and if changed copying the variable that you had just set to the actor's level to the variable holding the older level, then adding HP and MP for the actor. This means that you need 2 variables for each actor that might be in the party.

In general, I avoid having parallel events unless necessary because they can make debugging more difficult and can slow the game if badly written. My recommendation is use a plugin.

Original thread: https://forums.rpgmakerweb.com/threads/help-gained-xp-during-the-battle-however-for-some-reason-the-characters-hp-mp-decreased-based-on-how-much-xp-the-enemy-had-why-this-happens.180254/