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

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,343
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
763
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
763
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,834
Reaction score
2,343
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,183
Reaction score
2,814
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,834
Reaction score
2,343
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
763
First Language
english
Primarily Uses
N/A
You're an absolute legend.
 
Joined
Feb 18, 2015
Messages
615
Reaction score
333
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,834
Reaction score
2,343
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
615
Reaction score
333
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,834
Reaction score
2,343
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
615
Reaction score
333
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,834
Reaction score
2,343
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
615
Reaction score
333
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,834
Reaction score
2,343
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,834
Reaction score
2,343
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
615
Reaction score
333
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,834
Reaction score
2,343
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

Finally got my website fixed and the security sorted so it's been a productive day. Can I go to sleep now? I mean... I don't need to work right?
It's always a good idea to refresh yourself on what your plugins do. I'm working on a map with opening walls, and I was about to tear my hair out over how much image editing and hand-constructing of autotiles I'd have to do, when I looked again and saw @Shaz 's Tile Changer could copy areas from another map.
"sorry it took me so long to respond" - can we please agree not to say that anymore unless it actually took a long time?! (Like 36hrs at least) I mean, I'm running out of funny responses here xD
Ugh... 4:53AM over here and I can't sleep so why not just game make.
I just love the MV feature that allows you to create your own animations!

Forum statistics

Threads
115,919
Messages
1,094,016
Members
151,174
Latest member
sardin
Top