When enemy Max HP is increased it isn't full at battle start

Basically what the title says. I made varying difficulty settings which used to work in another project though in that one for unknown reasons the enemies HPs aren't full and if I add an "enemy recover all" it reverts their stats to the original ones. Anyone know of a fix to this? For now I simply make it so the monster heals itself up to max HP first thing in the fight but it would be annoying to see that at the start of every fights...
Are you using a plugin for this ?
No, I created a state which changes the Max HP. I do understand it is Max HP but I am puzzled because in another project the monsters were full HP using this, in that one they aren't and it's the exact same changes.
Probably a difference in battle engines. Though, honestly, the fact it worked the first time surprises me, as the state is only applied after the battle starts (there's no way to do it earlier, even turn 0 + 0*X is still after battle start), so the monster has gained max HP after it has been created, which is why you're having to heal it.


Honestly, the best solution is to use a plug-in so that the monster is initially created with higher HP based on difficulty level. That gets around all of the problems.
Use script call for battle 


$dataEnemies[x].params[y]=z;


BattleManager.setup(troopId, true/false, true/false);
$gamePlayer.makeEncounterCount();
SceneManager.push(Scene_Battle);
Can not find a plugin for this sadly. :/

I never touched anything related to scripts when it comes to RPG Maker so I have no idea what I need to change to which value, thank you for trying to help but I am really noobie about these things.
 


I just don't understand why it works in my other project and not this one... same RPG Maker, same version, exact same buffs... one heals the other doesn't.
Something is different though. Computers aren't random, so something isn't the same. Maybe different version of MV? After all if you never touched scripts/plug-ins, then you probably forgot to update the .js files in the first project, which would affect it.


And unfortunately, what is happening now is the intended behavior for the engine as far as I know (it works that way in ACE too without scripts, and MV changed little on the internal engine).


Now with that said, I might have some good news. I think there's a work around that does not require a plug-in. What you will need to do though is set in the editor the *highest* value you want for the stats, then instead of applying a state to increase the HP for a harder difficulty, apply a state to reduce the HP for an easier difficulty. For example:


Say you want hard difficulty to increase HP by 50%. So your rat that is 100 HP is now going to be 150 HP under hard. What I suggest is set 150 HP in the database, do nothing on hard, and on normal, reduce the HP down to 100. Now: 100 / 150 = 66.66% of the hard difficulty HP, so you want the new state that is applied on normal to reduce the HP to 66.66% of the database HP.


Will be effectively the same thing (+/- 1 HP due to rounding). If you need help with the math, post what you want the boost to be on hard.
Basically what the title says. I made varying difficulty settings which used to work in another project though in that one for unknown reasons the enemies HPs aren't full and if I add an "enemy recover all" it reverts their stats to the original ones. Anyone know of a fix to this? For now I simply make it so the monster heals itself up to max HP first thing in the fight but it would be annoying to see that at the start of every fights...



Hello!


When you use 'Recover All', it removes all state as well, including the one that increased its stats. By default, positive or negative, the engine cant differentiate. Your fastest solution would be use Recover HP/MP (or something like that) instead of Recover All.


- Riff
Now with that said, I might have some good news. I think there's a work around that does not require a plug-in. What you will need to do though is set in the editor the *highest* value you want for the stats, then instead of applying a state to increase the HP for a harder difficulty, apply a state to reduce the HP for an easier difficulty. For example:


Say you want hard difficulty to increase HP by 50%. So your rat that is 100 HP is now going to be 150 HP under hard. What I suggest is set 150 HP in the database, do nothing on hard, and on normal, reduce the HP down to 100. Now: 100 / 150 = 66.66% of the hard difficulty HP, so you want the new state that is applied on normal to reduce the HP to 66.66% of the database HP.


Will be effectively the same thing (+/- 1 HP due to rounding). If you need help with the math, post what you want the boost to be on hard.

Thanks, this works well! 😀  

Hello!


When you use 'Recover All', it removes all state as well, including the one that increased its stats. By default, positive or negative, the engine cant differentiate. Your fastest solution would be use Recover HP/MP (or something like that) instead of Recover All.


- Riff

There is no "recover hp" in MV, only a recover all. I did try to heal based off of a Variable though and it works perfectly fine, thank you! 😀  I have two solutions now! ^^

Original thread: https://forums.rpgmakerweb.com/threads/when-enemy-max-hp-is-increased-it-isnt-full-at-battle-start.65615/