Passive MP drain?

Is there a way to make it so MP decreases with a set number of time or steps you take in the overworld?
Doesn't the engine come with a premade poison effect? This is exactly the same thing, you just use the "MP regeneration" trait instead.
1701521052945.png

This should reduce mp every couple of steps.
Doesn't the engine come with a premade poison effect? This is exactly the same thing, you just use the "MP regeneration" trait instead.
View attachment 286087
This should reduce mp every couple of steps.
Yeah it does, however I forgot to mention that is a bit too rapid as the MP drain is for a hunger system which will have an issue, it will be a bit too rapid, making the player need to consume food pretty offten. Are there any plugins for stat drains which will have more control over the timer of the drain?
Just give the player more MP.
Just give the player more MP.
The EX-Parameter effect for mana regen is % based, so it will make no difference, it will just drain more
Yup, you're right. Just ignore me.

artworks-000570872354-fmnvll-t500x500.jpg
Well, you can also just give the player a dummy state and have a common event reduce MP on a set interval and amount for as long as he got the state.

You can also do whatever math you want this way. And by making it only available as long as the state persists, you can make items that temporarily remove the hunger drain or whatever else fancy stuff you want.
I think your best bet in this case might be to modify the default regenerateMp function from rpg_objects.js

JavaScript:
Game_Battler.prototype.regenerateMp = function() {
    var value = Math.floor(this.mmp * this.mrg);
    if (value !== 0) {
        this.gainMp(value);
    }
};

This is the default code. You could copy and paste it into your own plugin, and directly modify the value of "value" before the if (value !== 0) check, which would allow you to use a flat value instead of a % value. So for example you could do something like

JavaScript:
Game_Battler.prototype.regenerateMp = function() {
    var value = Math.floor(this.mmp * this.mrg);
    value--;
    if (value !== 0) {
        this.gainMp(value);
    }
};

to have players lose 1 mp (after factoring in the default mp regen rate, which should be 0 if you didn't change it).
rpg_objects.js also has this:
Code:
Game_Actor.prototype.stepsForTurn = function() {
    return 20;
};
You can change the 20 to a higher number.

Original thread: https://forums.rpgmakerweb.com/threads/passive-mp-drain.163515/