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

Discussion in 'Javascript/Plugin Support' started by Low, Oct 16, 2017.

  1. Low

    Low Veteran Veteran

    Messages:
    141
    Likes Received:
    141
    First Language:
    english
    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>
     
    #1
    Kike likes this.
  2. Kike

    Kike Paladin Veteran

    Messages:
    36
    Likes Received:
    19
    Location:
    Brasil
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    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)
     
    #2
  3. Low

    Low Veteran Veteran

    Messages:
    141
    Likes Received:
    141
    First Language:
    english
    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
     
    #3
    Kike likes this.

Share This Page