SRD's pop ups with "enfire" code by yanfly help.

I am now using SRD's pop up customizer which changes how pop ups are handled. It's a much better fit for my game but one important aspect isn't working wit it. Yanfly's "enfire" tips and tricks code fails to display any damage even though damage is visibly processed. I have no knowledge about how to try and fix this, any help would be greatly appreciated.

Here's SRD's plugin link:
http://sumrndm.site/battle-popup-customizer/

Here is yanfly's code for states:
<Custom Confirm Effect>
if (this.isHpEffect() && this.isAttack() && this.isPhysical()) {
// Get the element ID.
var elementId = 7;
// Set the damage for the effect.
var baseDamage = 20;
// Calculate the damage after applying the target's element rate.
var damage = Math.ceil(target.elementRate(elementId) * baseDamage);
// Make a copy of the target's results.
var result = JsonEx.makeDeepCopy(target._result);
// Clear the result.
target.clearResult();
// Play an animation on the target.
target.startAnimation(130);
// Deduct HP from the target.
target.gainHp(-damage);
// Start the damage popup.
target.startDamagePopup();
// Check if the target is dead.
if (target.isDead()) {
//
target.performCollapse();
}
target.clearResult();
target._result = result;
}
</Custom Confirm Effect>
Did you fix it? I stopped use this plugin due to it don't display the numbers of states (only in params).

I Tried to change the plugin params putting "gainHp" in the conditionals spaces, but, doing that, the characters got an indefinite life, or the game crashed, of nothing happened... I don't have knowledge in javascript, so I don't know if there's a way to do what we want without a plugin update. But if there is one, I deduce the problem would be the "gainHp", that woudn't be a damage code, but, a code that just put the hp, and the plugin only would work with reactions (like hits)

So I have these ideas:
1 - change the conditional spaces in the plugin params;
2 - searching for a damage code to replace "gainHp".

However, I don't know how to do this.

(I used the "gainHp" as an example, it could be "gainMp", "gainTp", or anything alike)
Did you fix it? I stopped use this plugin due to it don't display the numbers of states (only in params).

I Tried to change the plugin params putting "gainHp" in the conditionals spaces, but, doing that, the characters got an indefinite life, or the game crashed, of nothing happened... I don't have knowledge in javascript, so I don't know if there's a way to do what we want without a plugin update. But if there is one, I deduce the problem would be the "gainHp", that woudn't be a damage code, but, a code that just put the hp, and the plugin only would work with reactions (like hits)

So I have these ideas:
1 - change the conditional spaces in the plugin params;
2 - searching for a damage code to replace "gainHp".

However, I don't know how to do this.

(I used the "gainHp" as an example, it could be "gainMp", "gainTp", or anything alike)
I did not find a solution in the set up that yanflys tips and tricks provided. Seems you have better knowledge than me on how to handle this. I had to make a work around for my particular concept which ill explain incase anyone else has this issue.

What i did instead is replicated the effect as best as i could. I deleted the enfire code on the state and simply created my basic attack to check if the user had that state on. If so, the action sequence would change from normal damage to normal damage plus an extra magical damage. Since it wasnt a yanfly lunatic code, SRD plugin worked fine.

Here is the action sequence:

if user.isStateAffected(30)

move user: targets, front, 20

wait for movement

face user: target

motion attack: user

wait: 10

attack animation: target

action effect

wait for animation

add element: Wind

animation 92: target

damage rate: 15%

action effect

wait for animation

clear element

else
move user: targets, front, 20

wait for movement

face user: target

motion attack: user

wait: 10

attack animation: target

wait for animation

action effect

end
i came across this same situation recently. i added "wait for popups" after
after damage pop-up command. here it is with added line.
<Custom Confirm Effect>
if (this.isHpEffect() && this.isAttack() && this.isPhysical()) {
// Get the element ID.
var elementId = 7;
// Set the damage for the effect.
var baseDamage = 20;
// Calculate the damage after applying the target's element rate.
var damage = Math.ceil(target.elementRate(elementId) * baseDamage);
// Make a copy of the target's results.
var result = JsonEx.makeDeepCopy(target._result);
// Clear the result.
target.clearResult();
// Play an animation on the target.
target.startAnimation(130);
// Deduct HP from the target.
target.gainHp(-damage);
// Start the damage popup.
target.startDamagePopup();
wait for popups
// Check if the target is dead.
if (target.isDead()) {
//
target.performCollapse();
}
target.clearResult();
target._result = result;
}
</Custom Confirm Effect>
@Low @Kikeluzi @ChasingtheGale @DarkPlasma

Been dealing with this bug for months. Finally, I am able to fix it 🙂

Change function in the SRD_BattlePopupCustomizer plugin.

JavaScript:
Game_Battler.prototype.startDamagePopup = function() {
    var result = this.result();
    this._damagePopup.push(result);
};

to

JavaScript:
Game_Battler.prototype.startDamagePopup = function() {
    var result = this.result();
    if (result.missed || result.evaded) {
        var copyResult = JsonEx.makeDeepCopy(result);
        copyResult.hpAffected = false;
        copyResult.mpDamage = 0;
        this._damagePopup.push(copyResult);
    } else {
        if (result.hpAffected || result.mpDamage !== 0) {
            var copyResult = JsonEx.makeDeepCopy(result);
            this._damagePopup.push(copyResult);
        }
    }
};

This will fix all DamagePopUp problems including compatibility with Yanfly plugins
-YEP_X_ExtDoT
-YEP_BuffsStatesCore
-target.gainHp(-damage);
-target.startDamagePopup();
-All targets Healing Skill not showing on the caster

Tested with EnFire, Bide, and Thornmail from Tips & Tricks works perfectly.

Original thread: https://forums.rpgmakerweb.com/threads/srds-pop-ups-with-enfire-code-by-yanfly-help.85778/