Bug Report: Remove by Restriction (Confusion State)

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
Bug Explanation: It seems that there's a bug with Remove by Restriction not acting as described, though it's possible I just don't understand what it does. I have the Confusion and Sleep states in my project. I would like Sleep to remove Confusion, if it's present.

The way I'm reading it, this is exactly what "Remove by Restriction" is intended to do - remove the state where the box is checked (Confusion) if ANOTHER state that has a different action restriction enabled (Sleep) is added. The tooltip for "Remove by Restriction" reads: "Will be replaced by a new state with a different action restriction." And the helpfile reads: "When enabled, the condition will be removed when another state is added that has separate restrictions."

However, what's actually happening is that the Confusion state is applied and IMMEDIATELY removed. (Apparently, it is registering itself as a state with an action restriction, and triggering Remove by Restriction.)

I have tried disabling all plugins, and I tried using a blank project.

Error Report: Not applicable, it's just an unexpected behavior within the game.

Steps to Recreate:
1) Create a blank project.
2) Go to the Confusion state and check the box "Remove by Restriction".
3) Change the state on the Attack skill to Confusion 100%.
4) Battle Test. Watch Confusion be applied and removed immediately.

Sample Project: If needed, can be downloaded here.

Steps to Fix:
EDIT: I THOUGHT I came up with a solution, but even though it worked, it really shouldn't have.
However, it looks like there's a problem in $gameBattlerBase.addNewState(stateId) with the if statement used to call this.onRestrict().
 
Last edited:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,597
Reaction score
14,324
First Language
English
Primarily Uses
RMVXA
I've hit the same bug in ACE too. I just get around it by not using remove by restriction. Also, if you ever add it as a passive state (via a plug-in), the game will crash as you will create a permanent loop.
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
@bgillisp Yeah, I could get around this using Yanfly plugins or even a common event, but since the base program isn't doing what it's described to do, I figured I'd submit the bug report. Thanks for the heads-up on the passive states, that's a good thing to watch for in the future if I add that in!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,597
Reaction score
14,324
First Language
English
Primarily Uses
RMVXA
Actually, Yanfly's plug-ins might not fix it. I know in my ACE project I use a lot of Yanfly's scripts, and it still doesn't work. Maybe it is working in a way that none of us understand? Either way maybe someone who knows more on it can chime in.
 

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
@bgillisp I wound up adding "State Resist: Confusion" to the Sleep state. It works well in this instance, as a sleeping character probably wouldn't be able to be confused. Would still be nice if the core feature worked, though. :)
 

kirbwarrior

Veteran
Veteran
Joined
Nov 13, 2014
Messages
733
Reaction score
420
First Language
English
Primarily Uses
N/A
From my tests in Ace, Remove by Restriction actually means "Remove when this character is restricted". For instance, Guard is removed when you are put to sleep. It's not intuitive, but it is a function I appreciate existing.

Making the states incompatible seems to do what you want, @Llareian. I remember in older makers (XP?) Death actually removes other states. I stopped it from removing poison in one of my games because it made sense to me poison would stick around.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
I will ask about to see if this is a translation error, or if it is indeed a bug with the function.

Thanks for the report,
- Liquidize
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Made a surprising amount of progress in these past two days. Really helps when parallax mapping breaks limitation and allowing me to be creative and make maps that match my vision.
Let's promote our amazing artists in RPG Maker community! I posted right now about my game Phil Alone on Twitter and I decided to thanks Lime Zu, the amazing artist that did all the pixel assets for my game!
I just realised that the reason behind me not being able to make a game may be the lack of my original resources. I just dont like the look of MV faces and sprites, lol. Guess I will have make my own art.
I'm posting a commission art soon! :kaoswt2:
So here's a fun/tragic fact about me: I have an awful memory. But to be correct, I have memory "leaks". My memory is actually amazing, my issue is I can't keep memories for long, in fact, I once forgot my name. :kaoswt2:

Forum statistics

Threads
107,451
Messages
1,029,799
Members
139,582
Latest member
BoldSilver
Top