Yanfly buff&states core identify type of damage

doranikofu

Veteran
Veteran
Joined
Oct 4, 2015
Messages
113
Reaction score
31
First Language
Chinese
Primarily Uses
I am trying to do the healing link as shown in this youtube












<Custom Respond Effect>
if (value<0){
if ($gameParty._battleMembers.contains(1)) {
if ($gameActors.actor(1).isAlive()){
if (paramId == 0){ //hoping to find if it is HP heal
$gameActors.actor(1).gainHp(-value);
$gameActors.actor(1).startDamagePopup();
$gameActors.actor(1).clearResult();
}
}
}
}
</Custom Respond Effect>


Because the only thing I am handling is the "value", it does not know if it is HP heal or MP heal. So if I use MP heal it will still heal the actor's HP by the same value.


I tried to use paramId but it is not a defined variable I can call in the note tag.


Does anyone know what can be called to check the type of damage/heal in the notetag? Thanks.


One alternative way to fix this is to perform the MP heals with effect instead of damage formula. The effect steps won't go through the buff&states calculation and there will be no effect. But it will be not as flexible if there is a way to call and identify the type of damage directly in notetag.
 
Last edited by a moderator:

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
You wont get the information whether something is HP- or MP-Damage with paramId.


But there are two functions you can use in your notetag to check for it.


isHpEffect() and isMpEffect()


Try it with this:

Code:
<Custom Respond Effect>
if (value<0){
 if ($gameParty._battleMembers.contains(1)) {
  if ($gameActors.actor(1).isAlive()){
   if (this.isHpEffect()){
   $gameActors.actor(1).gainHp(-value);
   $gameActors.actor(1).startDamagePopup();
   $gameActors.actor(1).clearResult();
   }
  }
 }
}
</Custom Respond Effect>
 

doranikofu

Veteran
Veteran
Joined
Oct 4, 2015
Messages
113
Reaction score
31
First Language
Chinese
Primarily Uses
You wont get the information whether something is HP- or MP-Damage with paramId.


But there are two functions you can use in your notetag to check for it.


isHpEffect() and isMpEffect()


Try it with this:



<Custom Respond Effect>
if (value<0){
if ($gameParty._battleMembers.contains(1)) {
if ($gameActors.actor(1).isAlive()){
if (this.isHpEffect()){
$gameActors.actor(1).gainHp(-value);
$gameActors.actor(1).startDamagePopup();
$gameActors.actor(1).clearResult();
}
}
}
}
</Custom Respond Effect>
thanks a lot that works. I followed up in the rpg_object.js and looks like ".isItem()" and similar functions can be used to tell difference between skill and item :)


this will allow special passive states applied to different actors/classes
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top