How to make an HP Drain Skill? + Help with formulas in general

Hi there! So as the title suggests, I have a vampire character in my game and I want her to be able to drain a portion of the enemy's HP and have her be healed that amount, but no matter what formula I put in, all it manages to achieve is damaging the enemy, but not restoring any hp. I have the skill set to HP drain and read somewhere that you just need to set the formula to be the same as your attack action, but that didn't work. I also tried adding a recover hp effect to it, but that ended up healing the ENEMY, not the CHARACTER😔

I'm super confused, and I don't understand formulas at all since I'm terrible at maths, AND even have a learning disability on top of that, so whenever I try to look at guides it just looks like word and number soup.

Because of this, if anyone has any tips or easy to understand guides on formulas and such, I'd be super grateful if you could link them here, because right now all of the stats for my characters and enemies in general are super unbalanced and either do no damage at all, or absolutely annihilate every enemy in one swing.

Thanks in advance!
In "damage type", put "HP Drain" and not "HP damage".
1770040104260.png

(the screenshot is MZ, but Ace looks the same)
In "damage type", put "HP Drain" and not "HP damage".
View attachment 359689
(the screenshot is MZ, but Ace looks the same)
I do have it set to HP Drain,
but it doesn't seem to work for some reason, only does damage with no healing. Here's what it's set to for reference:

image_2026-02-02_155821928.png


Like I said, I read somewhere to put the formula to be the same as your attack formula, so I just copy and pasted it

I have the skill set to HP drain and read somewhere that you just need to set the formula to be the same as your attack action, but that didn't work.
The default Vampire skill in vx ace is this
1770049360772.png

So no element may be the issue.
I added the Absorb element and still no hp gain, only hp damage to the enemy. I'm so unbelievably confused why it's not working, because I even created a brand new project, copy and pasted the drain skill from that project into this one, and it still doesn't work. Starting to think maybe one of my scripts is screwing it up> But I have no idea how that's possible because none of my scripts effect skills, classes or anything like that.

Maybe it's on of the other settings thats wrong? I'm so confused 😐

image_2026-02-02_163206758.png
Maybe it's on of the other settings thats wrong? I'm so confused
Just start a new project and look at the settings for skill 23 - Vampire
Just start a new project and look at the settings for skill 23 - Vampire
Okay, so after some trial and error, I deleted some scripts one by one and after removing the scripts that change the appearance of battles, the skills work no problem, both this one you suggested, the copy and pasted ones, and my custom ones... But now I have a unique problem where the scripts I want to use for the project now for some reason screw up the drain skill. No idea why since they dont even alter skills in any way, but they do somehow. I guess I'll just have to tinker around with it and see if I can figure something out, and if not, I may just have to cut my losses...

Thanks for the help though guys, I appreciate it!
You could as a last resort get around it by using the damage formula or linking a common event which would add the HP to the caster. I have a weapon that deals damage and heals the user by half of the damage done and have gone the way of a common event (I also still have a leftover skill for that weapon where I tried this in the damage formula: v[13]=a.atk * 4 - b.def * 2; a.hp+=(v[13]/2); v[13] but ended up not using it, no idea why :LZSlol: but this would probably heal you first and deal damage afterwards, which would be weird). The common event might be a bit complicated, but if you don't want to give up your scripts, it might be the way to go.
I guess I'll just have to tinker around with it and see if I can figure something out, and if not, I may just have to cut my losses...
You could tell us what scripts those were and we could maybe look into them to see if they overwrite the default behavior

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-an-hp-drain-skill-help-with-formulas-in-general.182259/