Blood skill damage help

Have an attack that cost the user 15% of their HP and needs to add the same % into the formula for damage. I have tried those below (was 35% at the time):

a.mat * a.mhp 35% - b.mdf
a.mph 35% + a.mat *2 - b.mdf


Pretty sure I am just doing something wrong with the formula. I have it reducing my HP by the amount currently.

It will be going into a branch of magic known as Sangromancy for my game.
Solution: Move percent amount before a.mhp
Unless I've missed something very recently, % doesn't mean "percent" in MV damage formulas or javascript, it means modulo. If you want 15%, you should multiply by 0.15

If you want to do 15% of your maximum HP as cost and as damage, then your damage formula would be something like this:
(0.15 * a.mhp) * a.mat - b.mdf
(0.15 * a.mhp) + a.mat * 2 - b.mdf

The () aren't strictly necessary, but I find they make it easier to read.
AH that might explain the slight change. I wonder why the % works in the formula?
I will test your change and see how it goes.
Works wonderfully. I want to add, as I had it, it was hitting for like 60 dmg at level 1 with a stat of like 12 lol so i didn't really notice an oddity.
Yours works much better.
I wonder why the % works in the formula?
as said above, % works because it is the modulo operator.
Modulo (%) is the fifth basic mathematical operation after addition (+), substraction (-), multiplication (*) and division (/).
It does NOT work as a percentage sign, but it is a mathematical operation that is accepted by almost every programming language around.

It is rarely used outside of programming, but it is extremely important for some mathematics done in programs.
Oh interesting. Will look more into that.

Curious, what if I wanted to make a skill that takes HP from the user, and heals the target by the same amount? It would be similar to above correct?

<HP Cost: X%> in note tage
and then 0.35 m.ahp in the formula for HP recover?
<HP Cost: 15%>
(in skill's notetag, you need a plugin for this, for example yanfly's skill core)

0.15 * a.mhp
(as damage formula)

For heal simply change 'hp damage' to 'hp recover'.
Yanfly's plugin (mentioned in the post above mine) is the best method because it presents the skill cost to the player in a way similar to how MP/TP costs are presented rather than making it something the player might miss if they don't fully read the skill description.

Original thread: https://forums.rpgmakerweb.com/threads/blood-skill-damage-help.107613/