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

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
@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
684
Reaction score
681
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
684
Reaction score
681
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
@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
Veteran
Joined
Mar 28, 2017
Messages
826
Reaction score
2,022
First Language
English
Primarily Uses
RMMV
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
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
684
Reaction score
681
First Language
english
Primarily Uses
N/A
You're an absolute legend.
 
Joined
Feb 18, 2015
Messages
464
Reaction score
200
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
@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
464
Reaction score
200
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
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
464
Reaction score
200
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
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
464
Reaction score
200
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
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
464
Reaction score
200
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,676
Reaction score
2,122
First Language
English
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just had a stranger SPRINT away from me in the grocery store. Talk about overreaction...
...I don't think I'm that ugly! ^-^
I wonder if I can go outside ye-

Government: lemme stop you right there
Alright, who's playing Jumanji? And whose turn is it?!
*Buys all the PVGames assets, ends up creating his own ground tiles.* At least I used the other types of graphics? Right? :kaoswt:

Forum statistics

Threads
95,503
Messages
929,657
Members
125,764
Latest member
KURAMAA0
Top