RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[RESOLVED] Skill damage Formula help

Started by BloodyChaos, August 14, 2012, 07:44:53 PM

0 Members and 3 Guests are viewing this topic.

BloodyChaos

I am having issues with the formula for damage on RMVXA. How can I set up a skill so that it works like final fantasys Demi. I want the skill to take out about a quarter of the characters current health. example: 500 hp then attack will cause 125dmg, 100hp then attack does 25dmg

Revtattertot

I think the variable in the formula [which doesnt need a script] is b. hp, but don't quote me, from there multiply by a decimal and you have Demi.
Link to my game is here.
http://rmrk.net/index.php/topic,45507.0.html
Feedback will be nice to get, constructive or otherwise.

BloodyChaos

I dont get it lol srry im really bad with variables XD

Revtattertot

Put b. hp in the damage formula deal and multiply it by a decimal, it will then do what you want it to do.
Link to my game is here.
http://rmrk.net/index.php/topic,45507.0.html
Feedback will be nice to get, constructive or otherwise.

Caveras

#4
Quote from: Revtattertot on August 14, 2012, 09:20:36 PM
Put b. hp in the damage formula deal and multiply it by a decimal, it will then do what you want it to do.

Ah, why not just tell him exactly what to put in the field?

For the formula for FF's Demi which cuts 1/4 of the enemy's HP use this in the formula field:

if b.hp >= 2; (b.hp * 0.25); else; 1; end;

What it tells the Maker is: If the target's HP value is higher than or equal to 2, multiply the target's current HP by 25% (that is, cut one quarter) - else, that is, if the target's HP is below 2, deal 1 HP damage.

The If check is included because Demi doesn't kill the enemy unless its HP are 1, and if HP are 1, it deals 1 damage.

Edit: Forgot to mention that I'm using Victor's Damage Limit script ( http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/damage-limit/ ). Since Demi caps the HP cut at 9,999, you should modify the formula like this unless you're also using the script:

if b.hp >= 2; [(b.hp * 0.25),9999].min; else; 1; end;

It changes the damage to "1/4 of the target's current HP or 9999, whichever is the lower value".

BloodyChaos

awe thank you lol I would have never got that lol thank you so much :D