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

@padr81
Are you using the default parameter setup and do you have less than 4 actors in your editor? These errors seem to indicate that the code is trying to reference actors that aren't defined.
@Frogboy - I've only got one actor in my party, I can try it with 4 if you like.

Using the plugin with no changes, everything as downloaded, and I simply applied 'bread' to one of my items from the formula's.

Same issue with 4 party members.
Update @Frogboy - Weirdly it was yanfly's damage core causing the issue, was sure I tried the plugin with it turned off but thats the culprit.
@padr81
Interesting. I'll run some tests with Damage Core installed and see if I can figure out what the issue is.
This is brilliant, just what I would expect from you, great work! 🙂
Thanks, Tea!
Version 0.9.4 - Yanfly Damage Core compatibility

@padr81
Yanfly overwrote a method that normally wouldn't have been called with something like 'bread' as the formula. My plugin opened that door however and his plugin didn't have a fail-safe. It straight-up wiped out the actor's HP and placed an illegal value in it's place which caused the crash. I put in a work-around for it so it should work properly now. Thanks for letting me know of the issue.
You're an absolute legend.
Question: How would I go about using the Health plugin with SumRndmDde's HUD Maker plugin? (I'm not using an RPG Maker default battle system, and as such I need an on-screen HUD to show some of the immediately important pieces of the player's status, ie the things that will affect their HP or their battling performance).
Basically, what I'm trying to do is find out what the script for the current value and the maximum value (for example, with default HP it's $gameParty.leader().hp and $gameParty.leader().mhp respectively). What would they be if I were trying to reference one of the Health types set up in the plugin parameters?
@GameFire
Try this. Replace actorId with the actor's id and abbr with the Health abbreviation.

Code:
$gameActors.actor(actorId).getHealth(abbr);
$gameActors.actor(actorId).getHealthMhp(abbr);
Doesn't seem to work, the HUD Maker just reports it as "ERROR", and the bar stays empty no matter what I do
My bad. getHealth is returning the whole object. Try this. It is getting the Food HP of actor 2. The second line is getting the max Food HP. Sub in the values you're using for your game.

Code:
$gameActors.actor(2).getHealth('food').hp;
$gameActors.actor(2).getHealthMhp('food');
There we go, now it's working!
EDIT: However, just thought of something. In my game, I'm planning on having multiple different actors. They won't all be in the party at the same time, as it's more of a "this person's campaign then this person's then this person's". But if I have the gauge set to just that one actor's ID, then once gameplay switches over to another actor, it wouldn't work because it'd only be showing data for that one actor.
Use this in place of the actorId. It'll get you the Id of the party leader.

Code:
$gameParty.leader().actorId()
Alright, it's working, thanks!
EDIT: How would I go about making the rest/sleep decrease by a larger amount/at a faster rate during nighttime?
I'm using LTN's time system, which uses a variable to track what time of day it is. From that plugin's help file:
'morning' = 0,
'day' = 1
'noon' = 2
'evening' = 3
'night' = 4
Look in the docs for Conditions in the Health plugin. These are how you change the behavior of Health attributes. Define the ones you need in the plugin parameters, then see if you can set the corresponding Condition when your time system plugin changes values. Hopefully, they built in an option to call a Common Event or something similar when the time of day change from one category to the next.
It can run a common event "once each time of day or tint change"
Cool. That should give you an easy way to call a plugin command to set a Condition in my plugin that will adjust the rate of decline for Rest during the night. I do something similar to this in the demo project as you get farther in the volcano. I make the effects of the heat more severe. Check that out if you need to.
Was going to say that I'd tried to download the demo from the github, but it gave me an error: 502: Failure
Luckily I still had a copy to look at.
So, for the common event, how should I set that up? (Ie, its contents, would it go in "set common event" or "remove common event" or both, etc.)
For the Common Event itself, you'll need to use the plugin command SETCONDITION #. I think that's the command but you'll want to check the docs to be sure. You should also do a REMCONDITION # as well to clear the previous Condition. If you're only doing a Condition for night time, just call the SET when it turns night and remove the Condition when it turns day time. Unless I misunderstood your question.

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