Yanfly Life Steal

Status
Not open for further replies.

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
Hello, so I was actually waiting for a response of Yanflñy, but it seems they have decided that I should ak in here so, this is the Plug-In.


Yanfly Life Steal


This plugin has the next parametres to set on it.


Prueba.png


Which are supposed to enable a character to gain more HP than the damage dealt and recieve HP damage in certain cirtumstances instead of draining it.


I made this simple code


<Custom HP Life Steal Rate>
if (target.isStateAffected(4))
rate = 1.5;
else
rate = 0.5;
</Custom HP Life Steal Rate>


It does not pops up the cnsole, which with Yanfly newest update could mean that there is something wrong in the code, but like I said it doesn't seems to be the case


This code sorta works, the user always drains 50% of damage dealt, but when the enemy is affected by state 4 the user only drains the 100% amount of damage dealt and not the 150% of damage dealt, according to Yanfly help notes the rate should be in percentile which I belive I'm doin correctly(if not the 0.5 rate would not work)


I decide to test the skill with this code that again come in the plugin itself. Obviously I test each code individually just in case anyone was wondering.


<HP Life Steal: 50%>

<HP Life Steal: 150%>

<HP Life Steal: -50%>


The first one work perfectly, the second one only drains the damage dealt and not the 50% more, and the last one deals damage but the user doesn't recive any damage.


I asked Yanfly if their plugin actually allows the overheal and negative healing but they have not answer me yet, and as i don't have enough Javascript knowledge to actually know what to look for in the code I decide to post it here.


So in the end after all this I have two questions.


1.- Am I the one doing something wrong? If so, how do I correct it.?


2.-Is it soemthing to do witht he plug-in itself? If so what should I do to get the desired effect.


And that should be all, thnak you so muhc for your time.
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
I would just scrap this gimmick plugin and instead just use skill core to make your life gains when dealing damage.


<After Eval>


if (target.isStateAffected(4)) {


user.gainHp(Math.floor(value * 1.5)) 


else {


user.gainHp(Math.floor(value * 0.5)) 


}


}


</After Eval>
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
I see so instead of using the plugin I should use an after eval code...


Does this means th eplugin doens't actually work in the way I was wanting it to work?


what a dissapointment tough...


Have to alter the code btw as you add some extra brakets in there, but aside from that it works, so.


Thank you.


Can i ask another thing.


How should i do this.


<Pre-Damage Eval>
if (target.isActor) {
value * 0.25
} else {
value
}
</Pre-Damage Eval>




The skill can target allies and foes,but if the target is anally I want it to do less damage. I'm using the above code but the damage is ot affected at all, ow should I edit it?
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
To change the damage you have to switch to damage formula which completely replace your current formula at the top.


<Damage Formula>


if (target.isActor) {


value = X }


if (target.isEnemy) {


value = X }


</Damage Formula>
 

emelian65

Veteran
Veteran
Joined
Sep 13, 2015
Messages
190
Reaction score
50
First Language
Spanish
Primarily Uses
@lolshtar Thank you so much for this, this answers all my questions regarding this seemingly useless plug-in...


So how can I ask for this to be closed?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
@emelian65 You did the right thing in reporting your post and asking for it to be closed.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top