[Yanfly] Customizing barriers from barrier absorb plug-in?

I'm planning on using skills that create barriers, but that stack in a way and provide status until consumed and/or trigger an effect when consumed/damaged. Currently, I'm looking for two different barrier effects and am unsure how to do them or if they are possible;

1.) A barrier that provides a bonus to an elemental resistance while active (for as long as barrier points for that specific barrier remain).

2.) A barrier that retaliates on attackers either when struck or when broken. (I figure this part could be tied into counter attack control)

Anyone have any experience with these?
This doesn't seem to be possible as Yanfly's plugin does not store the source of the barrier. This is actually helpful in many ways, as you could have multiple barriers from multiple different sources, which creates questions such as which source to remove barrier points from first and how the player is supposed to know which barrier ends where and when. Not worrying about the source simplifies all of these issues. Unfortunately though, this does mean what you're trying isn't really possible.

If however you wanted a state to be active as long as any barrier points remain (regardless of source), that is possible.
That's what I was afraid of, a shame. I guess I understand the limitations and their purposes. It would be nice if you tag a priority on a barrier ability to make them take damage in order of priority so that the code could be expanded to include states/conditions unique to each layer.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-customizing-barriers-from-barrier-absorb-plug-in.91648/