Hello, I was using status to inflict buffs and debuffs due to the greater control, but there's a small problem that could be confusing for players. I have an damaging attack that inflicts an attack debuffing status, and it's only supposed to weaken the enemy once, and it functionally works exactly as intended. But the battle log will still say it weakens the enemy even after they've been debuffed, and the effect doesn't stack. Is there any way to make it so it only displays the message the first time? Thanks.
Prevent battle log from displaying status multiple times
RPG Maker MV SupportYour description is quite hard to follow. Is it inflicting a debuff or a state?
Debuffs do in fact stack. And states technically get applied again to refresh their duration.
So please confirm which effect is being used, and it should be possible to write a bit of code that will achieve what you want.
Debuffs do in fact stack. And states technically get applied again to refresh their duration.
So please confirm which effect is being used, and it should be possible to write a bit of code that will achieve what you want.
I'm using a state. And also the debuff doesn't wear off, just thought I should mention.
Okay - I understand what you're saying, but again you're using confusing terminology. Debuff is an actual, discrete thing in RPG Maker. You can apply and remove them through skill and item Effects. A state is not a debuff.
This is the easiest way I could see to accomplish what you're asking for. There's technically some other stuff the addedStates property is used for, but I don't think it should cause any trouble unless you get into some fancy technical coding with state manipulation.
If it doesn't work out, I think you'd have to do something like disable the battle log messages for states and use Yanfly's Skill or States plugins to code when they display.
Copy the following into a text editor, save as a *.js and include as a plugin. This should cause all states to not display the apply message when the target already had it.
Code:
Game_Battler.prototype.addState = function(stateId) {
if (this.isStateAddable(stateId)) {
if (!this.isStateAffected(stateId)) {
this.addNewState(stateId);
this._result.pushAddedState(stateId);
this.refresh();
}
this.resetStateCounts(stateId);
}
};
Thanks! Works just how I need it to. The states are the only thing I'm using the battle log for, and yes, it is a state, not a debuff. The debuffs are finnicky work with.
Original thread: https://forums.rpgmakerweb.com/threads/prevent-battle-log-from-displaying-status-multiple-times.159848/