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

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
@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.
 

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
739
Reaction score
757
First Language
english
Primarily Uses
N/A
@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.
 
Last edited:

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
739
Reaction score
757
First Language
english
Primarily Uses
N/A
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.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
@padr81
Interesting. I'll run some tests with Damage Core installed and see if I can figure out what the issue is.
 

Tea's Jams

I'm human
Global Mod
Joined
Mar 28, 2017
Messages
1,081
Reaction score
2,658
First Language
English
Primarily Uses
RMMZ
This is brilliant, just what I would expect from you, great work! :)
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
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.
 

padr81

Guy whose game is taking too long.
Veteran
Joined
Apr 26, 2013
Messages
739
Reaction score
757
First Language
english
Primarily Uses
N/A
You're an absolute legend.
 
Joined
Feb 18, 2015
Messages
602
Reaction score
328
First Language
English
Primarily Uses
RMMV
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?
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
@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);
 
Joined
Feb 18, 2015
Messages
602
Reaction score
328
First Language
English
Primarily Uses
RMMV
Doesn't seem to work, the HUD Maker just reports it as "ERROR", and the bar stays empty no matter what I do
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
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');
 
Joined
Feb 18, 2015
Messages
602
Reaction score
328
First Language
English
Primarily Uses
RMMV
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.
 
Last edited:

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
Use this in place of the actorId. It'll get you the Id of the party leader.

Code:
$gameParty.leader().actorId()
 
Joined
Feb 18, 2015
Messages
602
Reaction score
328
First Language
English
Primarily Uses
RMMV
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
 
Last edited:

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
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.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
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.
 
Joined
Feb 18, 2015
Messages
602
Reaction score
328
First Language
English
Primarily Uses
RMMV
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.)
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,816
Reaction score
2,317
First Language
English
Primarily Uses
RMMZ
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Definitely glad I haven't released a few of my plugins that are technically done. As I learn more, I find ways to make my code more efficient, and in one case so far, discovered an existing function that did EXACTLY what I created my own function to do.
So I was kinda recommended a manga to learn a few drawing tips, I dunno if it will actually work, but I'm liking the story lol
M745veO.jpg
RPG Maker News #12 | Control Zooming, Customize Bush Effect, Causality & Happy Bones on Steam
Episode 16 let's go! We're making an RPG in RPG Maker MZ! This week... even more mapping, we're almost done with all the mapping for our first dungeon!

I have big news. I just got hired at a Mexican restaurant! They're like Chipotle but a bit different... and my job will be taking orders some days, delivering food other days, and of course, making customers happy. My orientation is on Tuesday. Once I start, I might disappear from here sometimes, but I'll always try to come back!

Forum statistics

Threads
110,448
Messages
1,053,387
Members
143,526
Latest member
ZakkWylde86
Top