public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

custom attack on state expire bug? Yanfly States&Buffs

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: custom attack on state expire bug? Yanfly States&Buffs
  • Original author: 22pepperjack
  • Original date: August 6, 2018
  • Source thread: https://forums.rpgmakerweb.com/threads/custom-attack-on-state-expire-bug-yanfly-states-buffs.98615/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support

Summary

so im not sure if this is the best method for doing this, but it seems to ALMOST work. im using Yanfly's Buffs and States Core and yanflys STB scripts Buffs and States Core Standard Turn Battle what ive done is add in a custom skill for the player character:

Archived First Post

so im not sure if this is the best method for doing this, but it seems to ALMOST work. im using Yanfly's Buffs and States Core and yanflys STB scripts

Buffs and States Core

Standard Turn Battle


what ive done is add in a custom skill for the player character:
Protected download

when the skill is used it damages the user, and adds a state to said character that provides a double damage boost.
Protected download
this state lasts for 3 turns, and upon expiring at the end of its last turn, (using the buffs and states core) i attempted to add in a special "Explosion" attack that damages all enemies. without taking up the users turn since it happens after they did their attack, but before the next user attacks.

the code in the note block:

<Custom Remove Effect>
var skill = 12;
var target = -1;
BattleManager.queueForceAction(user, skill, target);
</Custom Remove Effect>

everything works perfectly fine on the skills initial use, the player takes damage, deals double damage for three turns, and after the third turn they deal an explosive damage to ALL opponents before the opponents attack back. however, if the player uses the skill again AFTER this (on the next turn after the state is removed and the skill used) then it gets stuck in an infinite loop. the player takes damage, the state is applied, but then the state is perpetually at 4 turns remaining and never expires.

for the life of me i have no clue why the state gets caught in a loop and stops ticking down its turns.

EDIT: ok so using this ability seems to break the turn counter for all states. battlers and enemies are still able to fight it out no problem, but all states stop counting down after the custom remove skill is used.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

initial skill.png
initial skill.png
state.png
state.png
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rpg-maker-archive#js-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar