MV Is Stupid And Treats Healing Like Damage

So, I noticed something annoying yesterday when I was bearing down and pouring 4-6 hours into playtesting my game (I really need to stop making games where you can choose from four different things, as it quadruples the work of making sure they're all balanced and playable, but that's a story for another day).

Anyway, once there is any formula whatsoever in the formula bar, regardless of what the drop down is set to (HP Recovery in this case) MV treats the healing as damage. This means, for instance, that when Camila is at 17/100 LF and casts Healing Magick on herself, her wolf familiar Fang who has the "Substitute" trait jumps in front of her and takes that healing "bullet" for her. Needless to say this is frustrating. It means that with my healing spells as Light Elemental, creatures that are vulnerable to light get twice the healing from it, whereas creatures immune to Light get none of the healing from it, which is not how that ought to work (although that one's pretty easy to work around). Finally, it means that when Camila has Dark Blessing on, a state granting her 50% Physical Damage and 50% Magical Damage so that her absurdly fragile butt can survive the first "dungeon" (actually a forest) that she delves, when she heals herself, she receives only half of the healing. Which is stupid.

I like to use the formula bar for healing rather than a set percentage or flat number (for skills anyway) so that the caster's attributes (and sometimes even the recipient's attributes) can influence the amount healed and it can improve with time. I sometimes use the percent/flat rate box for items, but usually not skills.

I can think of workarounds for most of this but I am wondering if there is a plugin--quite possibly one I already have on my computer, I have a lot--that allows for fixing this.

Thanx!
- Crow
You'll have to check your plug-ins, as by default if you set HP Restore it heals.
You misunderstand.
Healing skills are not actually DEALING damage. It still heals, but it MODIFIES and treats that healing as though it were damage:

* Characters with Substitute flag jump in front of characters with low HP to "save" them from healing.
* Elemental modifiers apply.
* The Physical Damage Rate and Magical Damage Rate parameters, well, saliently the latter, reduce healing too.
If you set your healing spells to certain hit it won't have party members jump in front of the healing. Otherwise you'll need a script to edit how the substitute behavior works.
No, no misunderstanding, that is how it works. Healing is affected by any element rates if you set it to an element (which I found out the time I accidentally set a heal spell to Water element), and if the engine sees it as damage others will try to block it.

See, all the engine does is compute the damage the same, healing or not, but at the end healing is negative damage, as the engine does Current HP - Damage at the very end, and minus a negative is positive.

Check your plug-ins. It is very likely it is one of them blocking it as what you describe is exactly what happens if you make a spell that does damage in the engine.
@rainyday: thanx! That is one way to do it. (Just gotta decide how attached I am to the Final Fantasy "don't cast reflect on the party and then heal" conundrum.)

@bgillisp:
Thanks for the help but I am...confused, now. I can't tell if you're saying that this is default functionality or a result of my plugins. It sounds like you're saying this is just how MV works, but then you say to check my plugins.

Issues:
  1. Element rates effecting healing. Easily averted, worked around, or featurized let's cross it from the list.
  2. MDR (Magic Damage Rate) is stupid and reduces healing as well as
  3. Substitute flag is even MORE stupid and actors with it will "rescue" actors with critical hp from the healing they need. To put it mildly, I can see how this would be very frustrating to a player
Hmm. Let me try a blank project. Okay, in a blank project, the Substitute Flag does not seem to work at all? I gave it to Harold and I haven't seen him take a hit for Lucius who I gave trash HP. Although it's not super clear what triggers the substitute flag...EDIT: ah, I see, it triggers on crisis hp EDIT 2: whoa you're right, Harold protects Lucius from attacks but doesn't "protect" him from his own healing spells (even when I add an element to the spell). Hmm...alright yeah...I guess it must be a plugin.

ogod I have so many plugins in this project...*EXPLODES* EDIT (Last): weird. all I have effecting scene_battle (which um, probably isn't called that anymore) are Yanfly Engine Plugin scripts (and a carefully curated selection of those obviously). so that means that if a plugin is causing this, it's a YEP plugin, not a compatibility/interaction issue, which is WEIRD because based on past experience YEP plugins don't create bugs, because Yanfly is perfect.
What I was saying is you were seeing the default behavior for a damage spell, and also pointing out that healing is affected by element rate normally (try it sometime with an element for healing and give someone 50% rate to that element. They will heal 50% of normal), and IIRC healing is also affected by MDR if you use Magical attack, PDR if you use Physical attack. So those are standard behaviors (you can fix that by using certain hit instead). What is not standard is the substitute + taking damage still, and for THAT you need to check your plug-ins.

You may want to post a list of what plug-ins you got.
Here is was my ginormous list of plugins. I'm sorry.

I downloaded Notepad++ and started looking through both the native .js files in Project1 and the plugins in my project using Substitute as a keyword (four plugins popped up, one of which I don't have installed/enabled, the remaining three being VE_DamagePopups (purely aesthetic, right?), Battle Engine Core, and YEP_X_SkillCostItems (using the word substitute in a way that has nothing to do with the RMMV substitute flag.

So that's two installed, enabled plugins that have the word substitute in them.

EDIT Tau: Okay, I think I've figured this out, and I don't think it actually IS a plugin causing the problem. I found this code in rpg_managers.js:

JavaScript:
BattleManager.checkSubstitute = function(target) {
    return target.isDying() && !this._action.isCertainHit();
};

To my VERY untrained eye, this looks like one of the requirements for a skill to get substituted, the skill must not be CertainHit. ! means "not" in JS, right?

EDIT Upsilon: And I managed to reproduce the error in a blank Project1 just by changing the hit type of Heal from Certain Hit to Magical Attack.

Project1.jpg
@CrowStorm most substitute functions are handled in the battle manager part of rpg_managers.js, so that's why you wouldn't see it in your plugins. If you want to change the behavior of how substitute works, you'd have to either get a script or edit BattleManager.applySubstitute yourself

EDIT: @CrowStorm try this code
Code:
BattleManager.applySubstitute = function(target) {
    if (this.checkSubstitute(target)) {
        var substitute = target.friendsUnit().substituteBattler();
        if (substitute && target !== substitute && ((this._action._item._dataClass === "skill" && $dataSkills[this._action._item._itemId].damage.type !== 3) || (this._action._item._dataClass === "item" && $dataItems[this._action._item._itemId].damage.type !== 3))) {
            this._logWindow.displaySubstitute(substitute, target);
            return substitute;
        }
    }
    return target;
};
it seems to work for me without crashing anything/causing any odd side effects
Just an FYI but you really don't ever want to use Magical Attack for healing. The reason is the target can dodge it, as anything with Magical Attack will run the check to see if they evade it with the MEVA, and you don't want someone dodging healing.

Certain hit is what is meant to be used for healing.
Yeah, I'm just going to stick to Certain Hit for healing (very very, very very, very very very few things can dodge/evade magic in my game, and I don't think any of them are ever going to be something you want to heal, but all the other reasons (namely, making Substitute function as intended) were more than enough reason) and yes, I suppose this is solved. Thanks errybody!
Not only healing, but make sure you use certain hit for positive state buffs, too. I was pretty annoyed when my warrior kept dodging her own stance change effects.

Another fun fact about certain hit: It seems to ignore state rates.

Original thread: https://forums.rpgmakerweb.com/threads/mv-is-stupid-and-treats-healing-like-damage.117123/