Party Member Leaves Battle. Returns Invisible.

Hello, RPG Maker Forums. To preface, I am using vanilla RMMZ. I installed one simple plugin to use in another area in my game, but this phenomenon started happening long before I installed the plugin so it has nothing to with anything.

One of my game's boss enemies has an attack that "grabs" a random party member from the party and hangs onto them until enough damage is done to the boss to make them let the party member go. I accomplished this by removing a party member from the party when the boss does its attack and adding them back to the party when the apparatus holding them is defeated.

This move works perfectly when the boss grabs the party member in the first, second, and third spots. But for some reason, when the party member in the last spot is grabbed, after being let go by the boss, they will be added back to the battle without a sprite. And this effect will persist until another party member is grabbed or the battle ends.

I've made a video that showcases the bug. It's in a spoiler block because it also reveals characters from my game and their designs.

Spoiler: Video Demonstration
When "Cool Fox Guy" is grabbed and let go, he returns to battle without a sprite. Then, when "Dumb Frog Thing" is grabbed, Cool Fox Guy's sprite returns, and Dumb Frog Thing is not invisible when he's let go.


My guess is that it's a bug in RMMZ's code. So I'm asking for your help to squash this bug and prevent party member four from turning invisible during this boss fight. Thank you for reading.
please show screenshots of the events you're using for that mechanic
You asked for it. Here's the battle event I used to make the video. I don't show the switches I used to set up the event, but those switches just let the game know who is in the party so that the "Tongue" enemy can show the correct sprite when it grabs a party member during the actual boss battle. And pages 2 through 6 of this troop's events aren't shown. Those events are used in the actual battle and are unnecessary for this demonstration.

Something to note: I force the Tongue enemy to do an action called "EmptyAction" whenever it is revived. I've found that enemies that transform and are knocked out are invisible when they recover and reappear. But attacking the enemy or being attacked by the enemy causes their sprite to show up again. The EmptyAction is just a quick action that makes the tongue reappear. And I've tried this same strategy with the invisible party member. It doesn't work.

Edit: I'd also like to clarify that the grab attack isn't actually an attack. I've coded it during the boss battle to happen once every four or five turns after a party member is let go. Just thought I'd clarify that.

Spoiler: Hidden To Reduce Post Size
1707356140916.png

1707356186463.png

1707356235312.png


Another edit: This code also causes the last party member to turn invisible. So I guess it's less about the grab mechanic and more about the removing and adding back functionalities.
1707358029873.png
It's been a couple months and I'm still curious about this. Does anyone know why when I remove the fourth party member from the party during a battle, wait a bit, and then add the party member back, their battle sprite temporarily disappears? This is happening in RMMZ for some reason.
it depends on the battlesystem.
summoning an actor during battle (which is the same as adding it) may end up with the actor missing data that was supposed to be set during battlesetup by plugins.

that is why summoning usually needs a plugin, and that plugin needs to be compatible with the rest of your battleplugins, because the summon command has to add the details that the other battleplugins expect to be there for everything to work correctly.

Original thread: https://forums.rpgmakerweb.com/threads/party-member-leaves-battle-returns-invisible.165559/