HP change in battle without showing number?

Is there a way for me to change the current HP of a unit (Actor or Enemy) without showing a healing or damage number?


The command "$gameActors.actor(actorId).gainHp(n)" shows damage/healing.


or where in the code is the function for damage/healing to pop up so I can look it over?
Do you have a plug-in that changes the way that command functions?


I've actually been trying to get mine to show HP changes for certain skills. Never does for me.
Is there a way for me to change the current HP of a unit (Actor or Enemy) without showing a healing or damage number?


The command "$gameActors.actor(actorId).gainHp(n)" shows damage/healing.


or where in the code is the function for damage/healing to pop up so I can look it over?

Yes there is. Using common events.


1. Create a common event with the "Change HP option". There is an option for Actors and Enemies in the Event commands wndow.


2. Then create a skill, with damage type to none. And in the effect square add the call common event option.


3. Use the skill, their HP bars will deplete and no animation nor damage pop up will show.

Do you have a plug-in that changes the way that command functions?


I've actually been trying to get mine to show HP changes for certain skills. Never does for me.

Hmmm... would you be more specific? In what kind of scenarios do you want the damage popup to show up?
Well, I have the "$GameActor" stuff set up and it works. Normally I use it as a way to fix my "Stress" skills (they're powerful skills, typically summons, that reduce the caster's HP or MP by 15% or more. Then when the skill wears off, the Stress does as well and the character gains HP and MP equal to what the Stress took from them.) For the Stress skills I don't want the healing to show up because they're not really healing as much as the lost energy is returning to them.


However, I have this one skill that sacrifices all the user's summons. For each summon the user gains 10% of their maximum HP (including what comes back from the Stress disappearing). I do want for the Sacrifice skill to have the pop-ups (which I am not getting) but not the Stress removal (which I am getting).


The Sacrifice skill is being handled by a common event: it checks for each of the possible summons that the user is capable of casting and if a particular summon is active, it removes the summon from the party and heals the user for 10% of their maximum HP ( $gameActors.actor(1).gainHp(Math.floor($gameActors.actor(1).mhp/100*10)) )
Well, I have the "$GameActor" stuff set up and it works. Normally I use it as a way to fix my "Stress" skills (they're powerful skills, typically summons, that reduce the caster's HP or MP by 15% or more. Then when the skill wears off, the Stress does as well and the character gains HP and MP equal to what the Stress took from them.) For the Stress skills I don't want the healing to show up because they're not really healing as much as the lost energy is returning to them.


However, I have this one skill that sacrifices all the user's summons. For each summon the user gains 10% of their maximum HP (including what comes back from the Stress disappearing). I do want for the Sacrifice skill to have the pop-ups (which I am not getting) but not the Stress removal (which I am getting).


The Sacrifice skill is being handled by a common event: it checks for each of the possible summons that the user is capable of casting and if a particular summon is active, it removes the summon from the party and heals the user for 10% of their maximum HP ($gameActors.actor(1).gainHp(Math.floor($gameActors.actor(1).mhp/100*10)) )



I see, I think that in your sacrifice skill you need to use $gameActors.actor(x).startDamagePopup() AFTER the $gameActors.actor(x).gainHP(y), if you're using that one line.
I see, I think that in your sacrifice skill you need to use $gameActors.actor(x).startDamagePopup() AFTER the $gameActors.actor(x).gainHP(y), if you're using that one line.



That fixes my problem then, haha XD


Hope Blue Symphony or someone else can help you though, Ultimatony 🙂
Thread was hijacked :/


Hmm, well my code is in a JS function, With dmg set to none I don't see how to determine who is the target/caster for my function to work. The common event doesn't have a clue of who set it off.
Thread was hijacked :/


Hmm, well my code is in a JS function, With dmg set to none I don't see how to determine who is the target/caster for my function to work. The common event doesn't have a clue of who set it off.

Sorry about that. 


One solution that occurs to me is using Yanfly's Skill core plug-in for custom HP costs for your skill. The HP cost of the skill will not show 


a damage popup. You can use a custom formula for the cost as well.


Use this tag in your skill note thing. Like this: 


<Custom HP Cost>


   cost += $gameVariables.value(1);


</Custom HP Cost>
I'm trying to modify the targets HP without having a dmg/healing box pop up, I have a skill that is an HP buff


I want that skill to check the % hp they are at, apply the buff, then set HP to that %, currently it will show a healing number or 0


I was just now playing around with clearDamagePopup()
But if you set the HP to the same % they currently have wouldn't it be the same?


My target has 100 maxHP and its current HP is 40, wich is 40%


I apply the buff and set their HP at 40%, then their HP would end up being at 40.


Im I missing something?


In any case, seems that you are looking for a custom state, damage formula may not be the way to go.
Hum, maybe try with:


$gameParty.members()[slot]._hp = your_value //for an actor. The slots are 0,1,2,3
$gameTroop.members()[slot]._hp = your_value //for an enemy. The slots are 0,1,2,3,4,5


At least within my project that is without any plugin, it works.


Replacing "slot" by whatever index your summoner currently is. And "your_value" by your calculations.


To be clear this will set the party/troop member hp to "your_value", not add to it. So you'll probably need a few extra steps in your calculations.


Furthermore, should you use it to make an enemy hp drop to 0, the sprite will not disappear.


Edit: I saw your second question: how do I make a common event know who cast the spell... Well, here is the solution:

Code:
var list, i
list = []
i = 0
while (i < $gameParty.size()) {
	list.push($gameParty.members()[i].actorId())
	i++
	}

list.indexOf(BattleManager._subject._actorId) // this will return the index (0,1,2,3) of the caster.
//Calling it anywhere outside battle will crash the game.
If they are at 40HP/100 (40%), and I give them an hp buff of 40hp, they are now 40/140 (28%), they need to be healed by 16 to be at 56/140 (40%)


I would like the 16 hp heal to not show as healing.


ThanksAstfgl66, I'll see what that command does.


EDIT: Yes that one works, thanks.


EDIT2: Though it only works if the skill is doing damage somewhere else, with a skill set to anything other than none.


I was able to do what I want with editing some of the base codes functions.

Original thread: https://forums.rpgmakerweb.com/threads/hp-change-in-battle-without-showing-number.63609/