YEP.107 Element Core (Changing Absorb)

http://yanfly.moe/2016/06/10/yep-107-element-core-rpg-maker-mv/

I've been looking into how to absorb an element, but I've yet to find one that does what I want. Yanfly's is very good, but it reduces the amount by 200% instead of multiplying it by -1. I actually like it in games where you can combine weakness with absorption to absorb more from the ability. Is there a way to do that with this plugin? If not, is there another plugin that works with Yanfly's (and possibly with this one)?

Thank you ahead of time.

EDIT: I have found a solution to this AND another related problem;
Make sure Multi-Element Rulings is set to Multiply.
Make a second element called "x Absorb", where x is the element that you want to absorb (it'll probably save yourself headaches to do this for every element, maybe putting it after each one).
Make sure all skills that do damage (not heal!) with that element have this new element also.
Anyone (actor, equip, state, etc) that absorbs the element will instead absorb the secondary one.
Don't otherwise affect the element. Only use effects on the primary element (such as making someone weak to the element).
This will make it so any damage dealt with the element will heal the target, multiplied by how weak they are to the element. This will also NOT reverse heal skills, which normally does happen when you set an element to absorb.
Actually, the default system does the absorption you're searching.
Really? I tried setting the element rate to negative, but the lowest it goes to is 0%. Mind, I'm sure I could be missing something obvious...
You can try my element plugin.
https://forums.rpgmakerweb.com/index.php?threads/malikis-elementex-ver-1-6.50214/#post-501739

I specifically made it cause I wanted to do element absorption.
Actually, you're not missing something obvious. The functionality is coded, it's just inaccessible through database editor. Sorry, I completely forgot about that. There are still some ways to do it though 🙂 Apart from plugins, you can set the enemy rate in positive and use this command to flip the enemy rates.
$dataEnemies[enemyID].traits[trait position-1].value *= (-1)
So for example I have the bat in first slot and his traits are
Hit rate 95%
Eva 5%
Attack element physical
Fire element rate: 160%
The fire element rate is its' 4th trait. According to the equation the command would look like this.
$dataEnemies[1].traits[3].value *= -1.

However, this doesn't take into account any weakening or buff of resistance.
@Maliki79 I'm not quite sure how your plugin works. Or how to make it so (as an example) fire elementals absorb any attack that does Fire damage (and without reversing healing from Fire elemental heals)

@Poryg Do I just run that in a script call at the beginning of the game? How will it interact with Fire healing?
Exactly. At the beginning of the game.
How will it interact with fire healing? You could have easily found out. Negative rate reverses damage to heal and heal to damage.
Sad. I was trying to avoid that. It's silly that someone absorbs fire damage as healing but fire healing as damage. And apparently Yanfly's plugin also does that. I might have to jump into the code for that... I did find two workarounds that aren't really perfect;
1) Make a secondary element called "Fire Absorb". All fire attacks have this as a secondary element. Anything that absorbs Fire will instead absorb this element, and the two will multiply, making so if they become weak (200%) to fire, they will heal double from fire attacks. Otherwise, I don't mess with this second element.
2) I made a copy of the plugin and directly altered the code that makes it drop by 200%. I just replaced it with a *-1 and it worked as well as I hoped.

Since I want to avoid the "damage from healing" that absorb gives you, I'll just have to make sure it only does this if the result is damage.
EDIT: Is there a way to determine if the ability is damage or healing?
That is how rpg maker works. Positive value means damage, negative means heal. So if you multiply a negative value by -1, a positive value will jump. You can use Yanfly's buffs and states core, this will give you a control over values pretty easilx as well.
Well, I have a (tenuous) solution at hand. Using the hidden "fire absorb" element, it occurred to me I just have to not have it on healing. I'm pretty sure I can hide it from the player with any other plugins I might be using. I'll update the OP with how I did it in detail.

(I'm not quite sure this is the right/best solution, so I'm not closing this thread)

Original thread: https://forums.rpgmakerweb.com/threads/yep-107-element-core-changing-absorb.85158/