Yanfly's Absorption Barrier Help

Discussion in 'Javascript/Plugin Support' started by Karkess, Oct 31, 2018.

  1. Karkess

    Karkess Villager Member

    Messages:
    10
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I have a (hopefully) quick question: Is there a way to generate a barrier based off of percent damage done.

    I know with Yanfly's Aborption Barrier you can use a pretty simple command to scale off of Maximum HP from the game system:

    <Custom User Barrier y Turns>
    value += user.mhp / x;
    </Custom User Barrier y Turns>

    I am fairly new and not too familiar to know if there is something to call back the information of the last damage done similar to user.mhp, and if there is some simple way to call back this information is it possible to retrieve by recipient.

    Thank you for your time.
     
    #1
  2. Karkess

    Karkess Villager Member

    Messages:
    10
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    [SOLVED] (Secondary issue, not issue in original post)
    I also have a semi-related follow up question. How exactly do I code in exponents.

    Someone told me math.pow, but I'm not sure exactly how to do it. Basically here is the idea:

    [(Character level * x) + y] ^ [1+ (Character level / 100)].

    I think it's Math.pow(level * x + y,1 + level / 100).

    Asking specifically for Yanfly's Class Base Parameters.

    I do know for Javascript in general it's something like:
    (Math.pow(2 * 6 + 400, 1 + 2/100)); which would return ~462, and with 100 would return a clean 1,000,000, but I'm unsure of how to translate this across to the plug-in and game.

    I'd make a thread specifically for this but I feel anyone who can answer the above question could answer this one.

    Edit 1: Corrected Formula
    Edit 2: Introduced new knowledge.
    Edit 3: Was correct in original assumption, must have had a typo.
     
    Last edited: Nov 1, 2018
    #2
  3. Karkess

    Karkess Villager Member

    Messages:
    10
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    I found a work-around:

    Essentially the idea is to take the damage calculation from a skill being used (In this situation we'll say the basic attack: (a.atk * 4 - b.def * 2)

    <Custom User Barrier x Turns>
    value += (a.atk * 4 - b.def * 2) / 5
    </Custom User Barrier x Turns>

    The idea here is to generate a shield equal to 10% of the damage done. For whatever reason this was returning me barriers of half of the damage done at base, so 20% of 50% is a nice 10%. I'm not sure why it's returning half as a barrier, but this workaround seems consistent.

    I'm still sure somewhere there is a call function for damage output. After a lot of digging I found: result.hpdamage / result.hp_damage in RPG maker VX Ace formulas, but neither of them returned anything when attempted.

    If someone has the answer to this I'd be very grateful, thank you again for your time.
     
    #3

Share This Page