Rokazulu

Veteran
Veteran
Joined
Aug 31, 2016
Messages
114
Reaction score
4
First Language
English
Primarily Uses
RMVXA
I have a game that only uses health as a means of using magic. Essentially all I want is my ability to cost 3 hit points (true damage). However, all the game seems to want to do is to set the players hit points to 0.

Here is what it looks like.

Untitled.jpg

A simple ability that grants a state, with a simple cost of 3 HP. But it doesn't do that, it just sets my players HP to zero (albeit does grant the state, so I know that is working).

I have tried just doing -3, and a.hp-3 and many other things, so I must be missing something important about damage formulas? All I know is when I heal by percentages in "effects", it will definitely heal by the percentage. If I put the damage formula to 0 it still sets my hp to zero.

The common event is just animations.
What am I doing inaccurately?
 

shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
472
Reaction score
219
First Language
English
Primarily Uses
RMMZ
HP Recover is designed to heal, and likely works with an absolute value. Try changing to HP Damage and using 3. Just 3.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
34,358
Reaction score
8,772
First Language
German
Primarily Uses
RMMV
there are two possibilities here.

First point is that the damage formula needs a number returned to be processed by the engine. I do not know how the engine reacts if no number is returned, especially not with whatever plugins you have installed.

At minimum I would suggest using damage formulae like
function();0
so that zero is the number returned by the damage formula if you use any function to do other things.

Second possibility is that this effect has nothing to do with the damage formula, but is an effect from some incompatible combination of plugins.
 

Rokazulu

Veteran
Veteran
Joined
Aug 31, 2016
Messages
114
Reaction score
4
First Language
English
Primarily Uses
RMVXA
I changed it to 3 HP Damage, turned off my plugins, and used function();0 for the text but, they all gave me the same result. However, I did figure out that if I removed the state effect, it didn't reduce my players HP to 0. This is still rather confusing as the state effect has no damaging qualities to it.1634911746819.png
 

Rokazulu

Veteran
Veteran
Joined
Aug 31, 2016
Messages
114
Reaction score
4
First Language
English
Primarily Uses
RMVXA
I believe I figured it out.
The first state should be "Death" and cannot be changed into anything else.
I had Chi + as the first state so every time I applied it, it just killed my character.

Thanks for helping me isolate the problem.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,843
Reaction score
1,666
First Language
English
Primarily Uses
RMMV
The first state should be "Death" and cannot be changed into anything else.
Yes - in fact, both the first state and the first skill start in your default database with notes saying they have a permanent game effect.

If you'd like a slightly slicker way to achieve this with your skill, check out Yanfly's Skill Core - it allows you to declare HP costs for skills, so it will take care of that for you as well as displaying the HP cost when you're selecting the skill and not allowing the user to choose the skill if they can't pay it (right now, if you used your Chi skill at 2 HP, the user would die).
 

Latest Threads

Latest Posts

Latest Profile Posts

aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v
Well, I've got a party tomorrow, and my friends are coming over. I wanted to work a bit on the Fandom Scouts assets so I can be ready when that update arrives... in other news, Pizza Time Horror is getting a second teaser, and it shows Cabaret Helen's last performance before the location closed.
Also who used to be scared of Chuck E as a kid? I was! Now I love him!
The new cards and what they do:

(I am clearly not a youtuber... Haha)

Forum statistics

Threads
117,281
Messages
1,106,095
Members
153,456
Latest member
tomdavies
Top