Reduced HP drain

Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
The HP drain damage type in the skills tab allows the caster to absorb the amount of damage dealt. This would be OP for what I want, so I would like to be able to have e.g. 50% or 25%. I have played around with the damage formula and as far as I can see, I would have to specify the damage calculation, then have something like a.hp += (that damage times 0.5). However, I can't get my head around the syntax.

Can anyone enlighten me?

Thanks.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
If you are willing to use a script, I recall Yanfly has one for HP and MP drain where you can set a skill to heal x% of the damage dealt. Maybe that will do what you want?

Edit: It's Yanfly's Convert Damage script. I don't have a link to it saved, but I was able to look up the name for it in my project.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@bgillisp Thanks for the suggestion, I'd forgotten about that script.
To be honest, I'm reluctant to import a whole script just for one skill, so would prefer to do this by damage formula if possible. I know that I might have to create a custom damage mini snippet if it's too long for Ace's damage formula box.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Drain using the damage formula box will be something like this
Code:
d = <damage formula>;a.hp += (d * 0.5).to_i; d
Remember, by doing this though, variance is not applied, and if you're using damage popup, the drain popup will not be shown.

Edit: Fixed the formula
 
Last edited:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@TheoAllen That is precisely what I was looking for. I knew it was something like that, but couldn't get it right.

Thank you so much! Much appreciated.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top