Rokazulu

Veteran
Veteran
Joined
Aug 31, 2016
Messages
116
Reaction score
5
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
220
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,763
Reaction score
8,971
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
116
Reaction score
5
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
116
Reaction score
5
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
3,177
Reaction score
1,875
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

SF_People3_2 added!
index.php

Went to the doctor because I was actually sick and it was covered over with healthy people from a factory shift who all had to get negative covid tests to go back to work because one of their shift mates got it. Waited for several hours to find out that my low-grade fever, chills, light-headedness and fatigue were in fact covid...
And here I thought I've lost my music sense. Good exercise once in a while
Made Edits to a Character Art from 'Hibiki Katakura MV Monsters' (DLC), to Look More like One of My Own Characters. :LZScheeze:

Decided to retake an old concept I was working on long ago, first change I decided to tackle on right away is the sprites. Never been fan of the default chibis, so I edited it a bit... :kaoswt:
8YavqRj.png

Not sure if this will be the final take, but I like it more than the regular one.

Forum statistics

Threads
118,534
Messages
1,116,735
Members
155,568
Latest member
izalep
Top