Formula for healing not working because it's a decimal?

Status
Not open for further replies.

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
Reaction score
85
First Language
english
Primarily Uses
N/A
So I'm trying to use this formula to heal the player but it seems to only be healing every once in a while. Sometimes it'll heal correctly a few times in a row, sometimes it stops healing but still consumes the items for a few times in a row, sometimes it'll heal, stop, heal, stop. I'm not really sure what causes this besides it being a decimal? This is with the variable set to 1 ("First Aid Skill") and the player can increase it all the way to 100.

If anyone knows why it's doing this, I would really love to know. I don't have any scripts that affect healing btw.
1592868892347.png
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
219
Reaction score
173
First Language
English
Primarily Uses
RMMV
Did you initially declare the variable somewhere in an event during the gameplay before you begin using for the skill calculation?

And I don't think it's a decimal issue as the game system will handle the decimal.
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
Reaction score
85
First Language
english
Primarily Uses
N/A
Did you initially declare the variable somewhere in an event during the gameplay before you begin using for the skill calculation?
Yes, I had to change it to atleast 1 via another event otherwise the item doesn't heal at all. Why would using an event to increase the variable cause it not to work?
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
219
Reaction score
173
First Language
English
Primarily Uses
RMMV
Try:
(v[469] / 2) + 5
 

JohnDoeNews

Veteran
Veteran
Joined
Apr 25, 2017
Messages
163
Reaction score
91
First Language
Dutch
Primarily Uses
RMMV
When you cast the spell and it lands on 0, fress F9 and see what the value of 469 is...
The formula should work, unless the variable is -9 or lower. So I thin the mistake is not inthr formula, but in setting the variable. I think the variable has a wrong value.
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
Reaction score
85
First Language
english
Primarily Uses
N/A
When you cast the spell and it lands on 0, fress F9 and see what the value of 469 is...
The formula should work, unless the variable is -9 or lower. So I thin the mistake is not inthr formula, but in setting the variable. I think the variable has a wrong value.
It's an item, and yeah the variable is set to 1 as you can see below. Also, I used the item 10 times and every time I checked the Variable and it's always stayed at 1.
1592870804586.png
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
219
Reaction score
173
First Language
English
Primarily Uses
RMMV
Try using it once and then backing out of the menu, then go back in and try it only once again.
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
Reaction score
85
First Language
english
Primarily Uses
N/A
Try using it once and then backing out of the menu, then go back in and try it only once again.
Just tried like you said and it still keeps not healing sometimes. i don't suppose there's a script I can put in the formula of the item to round down decimals, could I?
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
219
Reaction score
173
First Language
English
Primarily Uses
RMMV
The system handles decimal numbers so I don't know that it would cause any problems like this...using any plugins? Ones that might deal with variable, items, text codes or damage formulas?
 

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
Reaction score
85
First Language
english
Primarily Uses
N/A
The system handles decimal numbers so I don't know that it would cause any problems like this...using any plugins? Ones that might deal with variable, items, text codes or damage formulas?
I mean, of course. I'll take a look into them and see if any affect any of those and try it out one at a time...

Ugh, so it turns out it's an issue with Victors Hit Formula. So what's happening in MY game is a d20 is being rolled every time I use the item to see if it's used. I tried putting the following into the item notetag but it's still not working...

<hit formula> result = 100 </hit formula>


Edit 2: Forgot the / in the formula. It's working now. Thank you everyone for helping me.
 
Last edited:

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,729
Reaction score
4,682
First Language
English
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,585
Latest member
Reversinator
Top