Buff stays at 0 turns left. Doesn't happen with states. Is it intended?

Lnik3500

Master Troll
Veteran
Joined
Feb 26, 2015
Messages
314
Reaction score
49
First Language
French
Primarily Uses
RMMV
Hello!
It's basically what the title says. Whenever I apply a buff for 1 turn, it will actually last the turn after.
Looking up the turn counter returns 0, but is only removed the turn after.

Is this intended?

and is there a fix or I just need to cope with it?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,940
Reaction score
14,557
First Language
English
Primarily Uses
RMMV
are you using any plugins?
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
604
Reaction score
315
First Language
German
Primarily Uses
From what I can tell this seems to be intended. Durations are updated at the end of each turn, but buffs (and "on action end" states for that matter) stay until the end of the next action.

As for fixes, if the buff is supposed to last one action you could set its starting duration to 0.
Alternatively you could use a state instead (which is generally more flexible than a buff).

If you want to use a plugin to remove buffs at the end of a turn instead you could try something like this:
Code:
/*:
* @plugindesc Remove buffs at the end of a turn
*/
(function() {
  
    var lastOnTurnEnd = Game_Battler.prototype.onTurnEnd;
    Game_Battler.prototype.onTurnEnd = function() {
        lastOnTurnEnd.call(this);
        this.removeBuffsAuto();
    };
 
})();
 

Lnik3500

Master Troll
Veteran
Joined
Feb 26, 2015
Messages
314
Reaction score
49
First Language
French
Primarily Uses
RMMV
@Another Fen Hello, this plugin you just created actually solves the problem I had!
It switched the buff to turn end like my states would

Thank you ^w^

For anyone else in case: Buffs actually last a turn more than you specify since it gets removed on action end even once it has 0 turns left. This is by default in the engine.
 

Latest Threads

Latest Posts

Latest Profile Posts

unknown.png

Making good progress with the second chapter. :)

Still work in progress.

(Real life, it is chronically the fourth chapter that I am making.)
constructionworkconcept.pngezgif-2-0acb620ecf8d.gifezgif-2-afeaf16ebb8d.gif "The Great Wall is great. But, most people can only be the slaves who built it, leaving their bones underneath that wall. They spent their whole life to build that wall and the empire, an empire that enslaves them." :kaoswt2: I'm just going to turn it into a modern-day sad tale.

No edits, just gameplay from one area to the next. Plus all my new shiny interface stuff... And I even remember to bolt down the portal so it won't escape this time. :kaopride:
You guys just freely offer up your Autonomy?
I don't know about you, but today the covid frustration is seriously getting to me. Haven't really seen many of my friends for two years, since i moved towns the year before this all started, and well, i miss them :(
so, here's a cute alpacaraptor sketch to heighten the mood:
W7Fhp9n.png

Forum statistics

Threads
110,660
Messages
1,055,028
Members
143,786
Latest member
Avigayil
Top