[FROG] Health - Additional Custom HP, Hunger, Thirst and more!

@Aditya_Himarwan
Would this feature work for what you're trying to do?
Drain Health Abbr - Normally, when a Health HP bar runs out, that’s it. Most of the time, something really bad happens like they die, fall asleep, go insane or whatever. But maybe you don’t want it to be so drastic. Maybe running out food or water doesn’t kill you but starts draining your normal HP. In systems where normal HP is split into different Health HP stats like (Head, Body, Arms and Legs), you probably want negative health in those areas to start damaging the character’s normal HP. By specifying an abbreviation, when this Health is at critical levels as defined by the Control parameter, excess is applied to the other Health stat. You can also use HP or MP here. This only works for Incremental and Decremental control types at this time.
@Aditya_Himarwan
Would this feature work for what you're trying to do?
Dude why didn't i read this beforehand.\? I guess my english and/or reading capabilities is that bad.

Buuut, the problem is that i want to decrease my HP(bodyweight) by 1 value for every 5 value for HP(energy). I think i just stick to modifying variables for now. Thank you, though!
Hey, just found this plugin. I've been just doing a really simplified version of what you are doing here by just using common events and stuff found here: https://forums.rpgmakerweb.com/index.php?threads/hunger-thirst-sleepsystem-without-scripting.11073/ But it looks like this is 1000x better. I have 2 questions though after going over the plugin. Is there any way to add the status of your needs onto the hud of the regular map? It gets a bit tiring having to always go into the status screen to check. My other question is how I could get around doing something with this.

Currently I have a food system in my game that gives you a buff when you eat it, this buff will increase your hp by [x] for 15 minutes. I did this by using the Set Timer function upon casting said buff (aka eating the food) , as well as turning on a switch to run a common event that checks to see if the Timer is at 1 second or below, at which point it cures you of the buff and removes the timer.

So my question is, is there a way to do this as an example:
Small bread: Recovers 40% of your "food hp" and gives you a buff for [x]amount of time (or steps)
Large bread: Recovers 100% of your "food hp" and gives you a buff for [x]amount of time (or steps)
Small drink: Recovers 40% of your "water hp" and gives you a buff for [x]amount of time
etc.?
Is there any way to add the status of your needs onto the hud of the regular map?
If you have a HUD plugin, you should be able to configure it to display these Health HP just the same as regular HP, MP and TP. I'm almost positive that SRD's HUD Maker would allow you to do what you're looking for here. There are probably other HUD plugins out there that would work as well. RPG Maker itself doesn't have a way to create a HUD and it was a bit out of scope for this plugin.

Recovers 40% of your "food hp" and gives you a buff for [x]amount of time (or steps)
There's nothing built into this plugin itself that can do this. I implemented something similar in that, you could base your buffs not on the recent consumption of items but on the current level of Health HP that an actor has. If they eat some food and go up to full Hunger HP then they get a buff until it falls down to a certain percentage again where the buff goes away. Likewise, if it falls down too far, they acquire debuffs or some other negative effects. What you're describing is different, though, and you'll have to figure out a way to implement it if you need it to work exactly as you describe. You could keep the system that you implemented already. It should work just the same with or without the Health plugin.
how do i add food cause I'm super confused on how to use the id and note tags like how do i make a certain item give you certain thing.
@SailorXXIV
Because you can't choose Rest, Hunger or whatever your custom health attributes are, you can't select them in the editor. There's also the need to perform damage or recovery to multiple health attributes with one skill.

So how it works is that you create formulas in the Formulas section of the plugin parameters. Each formula is given a unique name by you. You could call it "Apple". Fill out the other parameters. Enter in the health abbreviation, a damage damage formula and make sure the other options are what you need them to be.

In the editor's damage formula box for an item or skill, write the formula name that you defined in the plugin parameters surrounded by quotes. You can use single or double quotes. What this does is ensure that your the game engine evaluates the formula as a string of text. Since this is an invalid formula anyway, I programmed the plugin to specifically look for a plain old string of text and assume that it is a name of a formula that you have defined in the plugin parameters. If you enter in "Apple" or 'Apple' (with the quotes) as a damage formula in the editor associated with an item, it'll look up the formula and execute it when the Apple item is used.
@SailorXXIV
Because you can't choose Rest, Hunger or whatever your custom health attributes are, you can't select them in the editor. There's also the need to perform damage or recovery to multiple health attributes with one skill.

So how it works is that you create formulas in the Formulas section of the plugin parameters. Each formula is given a unique name by you. You could call it "Apple". Fill out the other parameters. Enter in the health abbreviation, a damage damage formula and make sure the other options are what you need them to be.

In the editor's damage formula box for an item or skill, write the formula name that you defined in the plugin parameters surrounded by quotes. You can use single or double quotes. What this does is ensure that your the game engine evaluates the formula as a string of text. Since this is an invalid formula anyway, I programmed the plugin to specifically look for a plain old string of text and assume that it is a name of a formula that you have defined in the plugin parameters. If you enter in "Apple" or 'Apple' (with the quotes) as a damage formula in the editor associated with an item, it'll look up the formula and execute it when the Apple item is used.
thanks man I kinda get it now
Okay, I've been slowly figuring out how to use this, I'm working on an Ultima fan-game so this is great. I've got a Food bar set up and figured out how to restore it, I'm making it so once your hunger runs out, you start taking damage. The problem I have with that is that there is no visual indicator, like a screen flash or character animation, to indicate that you're now taking damage. Is there any way to make that happen? Thanks very much!

EDIT New problem. Somehow this has broken combat. Enemies don't die when they hit 0 HP, and sometimes I'm not even sure I'm hitting them.

EDIT AGAIN: Nope, I've determined that enemies simply aren't being hit in combat. I'm not sure what I did wrong here.
Haven't had a chance to play with this plugin yet, but if it's anything like your Talents plugin, I'm sure it'll be a treat to use. (It's a ton of fun having characters be able to climb walls/jump over chasms and such, fwiw~)

Just curious, would a 'Stamina' system by viable using this..? As in, set up a Stamina HP value and have skills cost a certain amount of stamina, or attach similar costs to whatever commands are chosen, etc...?

Thanks in advance, and thanks for your other plugins as well! 😀
Hey guys, I've got a problem I can't find in the documentation. I'm trying to access the values for enemy health bars in the plugin through javascript - the way I would be able to do $gameTroop._enemies._hp or grab the enemy index through eventing.

I know you can use plugin commands to get the actors hp, but not the enemy. What do?
How do I make a canteen type of thing?
Frog Health v1.0.0
by Frogboy

​

Introduction

RPG Maker MV gives you a lot of fine-grained control over your game, but it’s primarily geared towards the creation of the JRPGs. This means that certain aspects of some of the classic WRPGs that I grew up with, like Ultima and Dungeons & Dragons, aren’t supported by default. Well, I’d like to fix that!

Adventuring is dangerous business. Imagine your party climbing the tallest mountain in the world. The icy wind howls as you all attempt to stave off the cold. Nights are treacherous and not just because monsters are about. The temperature drops to an unmanageable degree. You must find shelter and build a fire in order to avoid freezing to death. You packed as much food and water as you could but reaching the top of the mountain is taking a lot longer than any of you expected. The monsters roaming this rarely traveled location are fierce and relentless. Exhaustion is setting in as sleep is hard to come by. Will you live to reach the peak? Will you have enough strength left to fight the White Dragon who lives at the top and guards an ancient artifact that you so desperately need to fulfill your quest?

This plugin requires FROG Core to be installed.

View attachment 84836
Or, you know, there’s always this.​

One element that used to be very common in classic WRPGs is extra parameters for health beyond the physical which is typically designated as HP or Life. These extra parameters are things that a real, living human being, or whatever race they may be, couldn’t survive or function without: Food, Water, Oxygen, Normal Body Temperature, their Mind/Psyche/Sanity and so on. Some games even divided a character’s overall HP into different body parts with varying side-effects attributed to low health in each. A busted leg would slow you down. A mangled arm would make it impossible to carry a shield. A serious head wound might knock you out for while.

That’s where FROG_Health comes into play. Instead of taking the easy route and just making some extra variables that you can manipulate, I've gone and done something a little crazy. I've added full-blown extra HP stats to RPG Maker MV that are completely customizable. Better yet, I've provided a way to set environmental conditions that change the way your custom Health HP operates. For instance, you can define an Oxygen HP stat for your actors which normally would rise every few steps and be full most of the time. Go underwater, though, and the plugin can set a Condition which will start depleting your Oxygen HP. You also have the ability to tie States to different levels of HP (normal or Health HP) so that if your character's Oxygen completely runs out, they die. Even better, you can create Skills and Items that apply to your new Health HP stats the same exact way they would apply to normal HP. Want to give an enemy a Choke attack or have your Wizard casting a suffocation spell? No problem. I've got you covered.


Features
  • Add as many extra HP stats to your game: Food, Water, Rest, Oxygen, Psyche, Body Temperature or whatever else you can think of.
  • Automatically control how they function. You can set them up to increase, decrease or converge towards the middle at any rate you'd like based on steps taken.
  • Create and set Conditions that make your players fight harsh weather and environments that change how the auto-control works. Extreme heat or cold can kill you. A stale bog can inflict disease. Terror can wrack you mind.
  • Create Skills and Items that damage multiple forms of Health HP.
  • Customize your actor's battle status window and enemy visual Health gauges.
  • Customize the standard Status window to show each actor's Health HP.
  • Configure Health HP to deplete normal HP, MP or a different Health HP if it falls into the negative.
View attachment 90009

How to Use


This plugin supports a ridiculous number of parameters and customizable options (even by my standards). You can find the full documentation by clicking the link for this plugin and viewing the Read Me file.

View attachment 90010

Changelog

Version 1.0.0 - Initial Release
​

Download (Demo Available)

My Plugins Page - https://frogboymv.github.io/
FROG Core - https://github.com/FrogboyMV/FROG_Core
Health - https://github.com/FrogboyMV/Health
Race Core Plugin - https://github.com/FrogboyMV/RaceCore
Does this work for MZ too? Or just MV?
Was having issues with getting the enemy bars to show up. After playing around with it for a while, it looks like the plugin does not play nicely with Yanfly's YEP_X_SelectionControl. Once I turned that plugin off, all the enemy bars came back on and the plugin started working again.

I was using SelectionControl to prevent certain moves from being available until after the custom bar was full and a state had been inflicted. Any thoughts on how to get these working together would be greatly appreciated!

Thank you in advanced! :eswt:
Hi guys,
I am trying to get Yanfly's Menu/Status Core to display the extra stats in this plugin but so far i can't find out how...
Has anyone done this ?

EDIT: Also i can't seem to be able to hide the stats on a class by class basis.
EDIT 2: Renaming HP/MP/TP by class don't work for me (and it does not work in the demo map either)
Hi Frogboy! I love your plugins!
This might be a very obvious problem but it's been giving me difficulty for weeks, so here goes. I'm having some difficulty with getting Health to work when I test play. More specifically I get an error as soon as i attempt to move the PC after a new game starts. It says something about not being able to read the property of 'immune', and player's movements I guess not synced up with the Health plugin.
Here's the actual error report... if that helps.

TypeError: Cannot read property 'immune' of undefined
at Game_Actor.Game_Battler.healthStates (FROG_Health.js:2143)
at Game_Party.increaseSteps (FROG_Health.js:2099)
at Game_Player.increaseSteps (rpg_objects.js:7563)
at Game_Player.Game_CharacterBase.moveStraight (rpg_objects.js:6700)
at Game_Player.moveStraight (rpg_objects.js:7975)
at Game_Player.executeMove (rpg_objects.js:7661)
at Game_Player.moveByInput (rpg_objects.js:7635)
at Game_Player.update (rpg_objects.js:7670)
at Scene_Map.updateMain (rpg_scenes.js:609)
at Scene_Map.updateMainMultiply (rpg_scenes.js:600)

It seems I need to define 'immune', but I have no idea how to do that. I'm using the most recent versions of everything.
It'd be great if you could help. Again, it seems to me like I'm missing something very obvious, but idk what it is!
thanks!
I want to make a second mp bar for spells and a bar for the horror factor I'm a newb so any help is grateful. I want to change the names of the bars and have the unused bar not show.

Thanks in advance,

Crassus668
this is just too funny
I'm a newbie, sorry. I noticed that the files are just the code. How do i add that to my project?

(Looks so amazing! Frogboy these are so creative and useful!)
Sorry for the dumb question but we all have to start somewhere. Lol
I'm a newbie, sorry. I noticed that the files are just the code. How do i add that to my project?

(Looks so amazing! Frogboy these are so creative and useful!)
Sorry for the dumb question but we all have to start somewhere. Lol
Click on the Raw button then right click and Save As... to your plugins folder.
You'll need FROG_Core.js and FROG_Health.js
Hello - RPGMaker MV newb here. I've been having the same issue as a lot of other people in this thread where attacks won't land on either the enemy or the party, and party members's HP reads as 'NaN'. I'm assuming this has something to do with the plugin's damage formula being different than the core programs's, but I'm not experienced enough with RPGMaker to know what I'm doing when messing with those.

I've tried using older versions of this plugin - everything before 0.9.3 will instantly make the game error-screen, and 0.9.3+ has the problem I'm talking about. The only plugins I'm using aside from Community_Basic are FROG_Core and FROG_Health.

Any help would be appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/frog-health-additional-custom-hp-hunger-thirst-and-more.92623/