RPG Maker VX Ace

RPG Maker VX Ace

View Stats:
Spells/Abilities which cost HP
Hello, I was wondering how I would essentially make spells/abilities cost HP instead of SP or TP, F/E a spell would damage a monster for 10 damage, but give the character who cast it would take 2 damage instead of losing say 2 SP or 2 TP.
< >
Showing 1-5 of 5 comments
onyx_tanuki Aug 26, 2013 @ 5:58pm 
You can do that pretty easily with one of Yanfly's scripts:

http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/
- This will allow you to manage a lot of different types of skill costs, from HP cost like you're talking about up to having abilities consume items if you know how to script a little bit. For something you're talking about, it'd be as simple as adding the script and putting <hp cost: 2> in the skill's comments.

http://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-objects/
http://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-objects/lop-recoil/
- These two scripts would allow you to have a similar effect, except that instead of using HP as a resource, you're instead going to be having the actor take recoil damage. The two big differences here would be that the recoil isn't listed as a skill cost and, if your character hasn't got enough HP, s/he'll still use the skill but die from the recoil damage. Anyway, to use this for it, with the scripts added to your file, you'd input <during effect: recoil 2 HP damage> into the skill's comment section.

I believe it's also possible to do without adding scripts, though you'd need to confirm it yourself; in the damage calculation section of the skills, where you put 10 for the skill damage, you'd instead put the following:

10 ; a.hp -= 2

If I'm correct, this should work the same as the recoil damage thing, where it'll deal the 10 damage, then take 2 HP away from the skill's user.
Originally posted by onyx_tanuki:
You can do that pretty easily with one of Yanfly's scripts:...y from the skill's user.

Thanks for the help, I'm trying to avoid using third party scripts if I can, at least until I hit a point where I cannot physically create what I want to without incorporating one.
The damage calculation section worked, but it seems to be doing an insane degree of damage to the enemy, it also doesn't say about the character taking damage by using it. You've provided so much help already I feel bad for asking, but what could I try to do to reduce the damage? Also, how could I get the game to tell the player how much damage is taken by the spell/ability on its HP damage?
onyx_tanuki Aug 26, 2013 @ 7:26pm 
It really depends on your damage formula I think. If you want it doing exactly 10, then it should work just to put 10 and make sure there's 0 for the Variance. If it's still doing a lot more than you want, perhaps try putting it in as a.hp -= 2 ; 10 instead? It might be reading your character's HP as the damage value, and putting the 10 at the end may fix that. Also, did you mean that it didn't display the character losing HP, or that the character actually did not lose HP at all?

As for showing the HP cost, that'd require a script. The default script isn't set up to expend HP as a skill resource. If you do use a script, then you'll be able to just put 10 in the damage bar instead of the line of script, so it should eliminate any chance of the other part causing issues.
Originally posted by onyx_tanuki:
It really depends on your damage formula I think. If you want it doing exactly 10, then it should work just to put 10 and make sure there's 0 for the Variance. If it's still doing a lot more than you want, perhaps try putting it in as a.hp -= 2 ; 10 instead? It might be reading your character's HP as the damage value, and putting the 10 at the end may fix that. Also, did you mean that it didn't display the character losing HP, or that the character actually did not lose HP at all?

As for showing the HP cost, that'd require a script. The default script isn't set up to expend HP as a skill resource. If you do use a script, then you'll be able to just put 10 in the damage bar instead of the line of script, so it should eliminate any chance of the other part causing issues.

Okay, thank you for your time, I'll have a try at this soon.
phix_ation Aug 27, 2013 @ 8:20am 
As a note, you could also state that the skill uses HP in the discription section on a skill. Use the color commands for text to make the number stand out. Something along the lines of this:

Uses \c[18]2\c[ 0 ] HP.

If you havent changed the colors, it would make the "2" the color red
Last edited by phix_ation; Aug 27, 2013 @ 8:21am
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Aug 26, 2013 @ 5:44pm
Posts: 5