Is there an easy way to combine your parties HP?

I'm trying to setup my game so that HP is shared and combined throughout the party. The battle system is on-map, not using the built in battle scenes of RPG maker MV and I use MogHunter's Actor HUD to show the HP bar. I'd like every party members health to be counted (So if you have 4 members with 100 HP for instance, the Max is 400 HP and it shows that on the visual)

Is there an easy way to do it with scripts, or some sort of plugin that's ideal for this?
Hmmm, does the event command: control variable: game data: Actor: Hp (repeat for each party member)
+
Change Parameter: Max HP from operand variable
not work?

Basically the way I think I would do this is create a dummy (invisible) actor. This invisible actor's HP is defined by the event commands I said above.
Set a conditional so when the dummy actor's HP reaches 0, game over happens.

Or I'm not sure how you have your game set up, but maybe this can just be applied to the player character instead of a dummy actor.
You could use a variable.

Depending on how all your skills are setup, you could possibly find a way to manipulate the variable through the damage formulas.

Is it action battles? Or tactical battles?
Hmmm, does the event command: control variable: game data: Actor: Hp (repeat for each party member)
+
Change Parameter: Max HP from operand variable
not work?

Basically the way I think I would do this is create a dummy (invisible) actor. This invisible actor's HP is defined by the event commands I said above.
Set a conditional so when the dummy actor's HP reaches 0, game over happens.

Or I'm not sure how you have your game set up, but maybe this can just be applied to the player character instead of a dummy actor.

I feel that could lead to a bad counterproductive loop?
Like this has to be checked occasionally, so if it's setting Actor hp from the variable, later on the control variable will use that -altered HP- which wouldn't work as intended. It'd be increasing constantly, unless I'm wrong.

It needs to combined (Existing party HP) and (Max Party HP) and use them as game data so the Visual HP Bar can operate.

You could use a variable.

Depending on how all your skills are setup, you could possibly find a way to manipulate the variable through the damage formulas.

Is it action battles? Or tactical battles?
It's a shootergame fighting On-Map. The damage formulas aren't really relevant at all.
How do you handle the players attacks?

Is it all event-based?
How do you handle the players attacks?

Is it all event-based?
Modules.PNG


Yes, it's handled with common events.
There are attack phases that call different Modules (Common Events) such as one's that deal damage to the player subtracting the built-in HP.

I just need some way to represent an entire party's HP with a single Actor (The one the Plugin uses for the HP bar).
Like this has to be checked occasionally, so if it's setting Actor hp from the variable, later on the control variable will use that -altered HP- which wouldn't work as intended.
Sorry, I should have said to set a variable from the actors max HP and not their current HP.
You'd take the max HP of each actor (setting a variable), and add them up to create an HP pool, we'll call this variable "Max HP Pool".

From here, there are several different methods you could employ:
Option 1) Add each actor's Max HP to a "Max HP Pool" Variable. "Max HP Pool" will be mostly static, other than occasionally going up whenever your party member's max HP go up. You could then create a second variable based on "Max HP Pool", but this new variable (we'll just call "Party HP") will be dynamic like a normal HP pool in the game. In you common event, whenever the player takes damage, subtract the "damage amount" from "Party HP". You can then set conditional branches depending on how high or low this "Party HP" variable is at, such as setting a game over state when this value reaches 0 or less. Restorative items would increase the "Party HP" variable, and you'd need to create a limiter - or clamp - so that if "Party HP" exceed "Max HP Pool", "Party HP" will be set to "Max HP Pool". This first method would probably be a bit tedious to set up, but would provide a lot of flexibility.

Option 2) As I previously mentioned, create a dummy actor. From here, you can set the actor's Max HP based on a variable, which we will set it from the "Max HP Pool" variable we created. Now whenever a party member is hurt, you'll need to "change HP" for the dummy actor. You can create conditional branches depending on the state of this dummy actor's current HP. This option is likely pretty easy to set up, but having an invisible actor could cause some problems since the engine expects all actors to be used - but it's probably easier to find a plugin to fix that, rather than find a plugin to merge HP. This also depends on how your game is built, it may not cause any problems at all. (Alternatively, you could come up with some narrative reason to have an unused actor in the party. You could make the dummy actor visible, maybe call him "Stand" and say he's the party stand that protects everyone, or some dumb lore excuse like that - get creative)

Option 3) This is sort of the inverse of option 2. Instead of setting the "Max HP Pool" variable to a dummy actor, instead you set it to your party leader. In this option, we need to change what actors Max HP contribute to the "Max HP Pool" variable - otherwise, if you don't, when you set the "Max HP Pool" variable to control the player character's HP you'll get a positive feedback loop. So we need to create a dummy actor again, but this actor is going to be a copy of your player character. This copy of the player character will level up normally, and thus he will feed his Max HP value to the "Max HP Pool" variable, while the REAL player character will not feed his Max HP into the "Max HP Pool" variable. So in this method you are feeding the dummy actor's Max HP + other party member's Max HP into the "Max HP Pool" variable, and then setting the player character's max HP from the "Max HP Pool" variable. Like option 2, it has the same inherent problems and benefits, but depending on your game's direction this option may be more fitting for your game than option 2.
Maybe it would be easier to use a different plugin that's not dependent on an actor to show the bar.

Galv's variable bar works really well for situations like this. It's easy to use and extremely lightweight and compatible.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-an-easy-way-to-combine-your-parties-hp.149872/