Yanfly's Absorption Barrier Help

Karkess

Villager
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.

Karkess

Villager
[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:

Karkess

Villager
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.

Latest Profile Posts

If you had some musical requests in line with me.. feel free to re post! Corona has killed me and have recently got my internet back <3
I'm now working on procedural generated World Maps for my own project.
Is there anyone who's interested in having this Plugin for his own game?
I have a dream where RMer are not blinded and too dependant on published script / plugins...
RM MV ACE? 2020? Super? Legends? Sword and Shield? 2.5D? RM Pixel? RM 2: Revenge of Squared RTP tiles? Don't mind me, I'm just wondering about what will be the name of the next engine.

So I came up with a new look for the paths, and along the way realized health bars are so overrated, so now a crazy red light trail follows her and gets shorter as her life decreases.