MZ Actor Swapping: VS Party System + Battle Grid System

Hi,

I'm trying to create a Skill that lets only my main character, Avery, temporarily swap out for an inactive ally (who we'll call Quin for reference) mid-battle.

Currently this involves the core VisuStella plugins, as well as VS Battle Grid and VS Party System. By using some notetags and weird workarounds, I've successfully made it so Avery can swap out for Quin.

However, while Quin's HP/MP status box and CTB turn order are being displayed after the swap, her actual sprite is nowhere to be found. It does seem like the enemies are able to target her, as during testing I've noticed her HP being depleted after attacks.

Quin appears just fine if I turn off the Battle Grid System plugin. Someone suggested I try resetting the graphics cache with ImageManager.clear(); ... However, this just makes all the battlers disappear.

I have no idea if any of them are relevant to the visibility issue, but here are the steps I took to create this skill:

1A. A Common Event before a battle starts that uses Party System notetags to "unlock" Avery (as she's normally a required party member) and lock her two active allies.
1B. Corresponding Switches that activate for each ally so I can reference them in the ensuing steps.
2. A second Common Event that opens the Party System's "Switch Member" screen and allows Avery to swap out for any currently inactive ally. The event then checks whether an ally is active in battle yet has their Switch mentioned in step 1 to OFF -- this is how the event determines which ally needs to receive step 3 ...
3. The newly active battler receives a State that, when it expires 1-2 turns later, triggers ...
4. A third Common Event, which uses conditional checks to swap Avery back in and the ally back out.

Can anyone help me find my missing Quin? I didn't include screenshots since I'm guessing the solution is a more involved version of the "clear your cache" suggestion, but I can take some if that'd help.

Thanks!
Someone suggested I try resetting the graphics cache with ImageManager.clear(); ... However, this just makes all the battlers disappear.
Yeah, that's not a good suggestion, anyone who knows what the ImageManager does would have expected that result 🤣

There must be a plugin-specific (the turn order comes from the CTB plugin?) script call to refresh or rebuild the turn order display.

In Yanfly's, as I recall, it was actually a couple of steps to first empty it and then rebuild it; I don't know if it's the same in VisuStella's or if they made one more convenient function.

Regardless, if the script call isn't included in the documentation, you're down to someone trying to find it rooting around in the console or the obfuscated code.

Have you tried asking in the VisuStella Discord? I know some number of people have gotten answers for questions like this. To be clear, you want to know how to refresh the turn order displayed by the CTB, which is the one plugin you didn't link to 😉 The others really have nothing to do with it.
Despite writing and rewriting my post a million times, I think I caused confusion. Haha.

It's the SV battler that is failing to appear on-screen.
Oh, I guess I misunderstood.

Um. If you're not using the command built into the Party System to swap the actor in battle, I guess show screenshots of how you've rigged it up?

It may end up being a similar answer with "use VisuStella's instructions to report a bug," but we can see whether your method has an obvious error.

You say enemies can target her - do the attack animations and damage popups play in the correct space?
Yeah, my "genius methods" don't follow typical use of the VS Party System plugin due to my need for the skill to have restricted usage and a temporary effect. I'm also an illiterate bozo when it comes to coding, so I may have made things unnecessarily complicated.

Anywho, here we go:

Spoiler: Six Screens-a-Laying
Common-Event-1_Part-1.png

Common-Event-1_Part-2.png


1. Common Event #1, whose purpose is to unlock Avery's placement in the party once a battle starts and lock the other two active allies. It also activates related switches for reference later. (Ignore the Halo Hood stuff; it has nothing to do w/ this situation.)


Recess Skill.png


2. The Recess skill, which activates the ol' switcheroo by calling the next Common Event ...


Common-Event-2.png


3. Common Event #2, which calls the VS Party System scene so the player can switch out Avery. Then, a script checks whether the switched-in ally (Quin) is now present in the party even though her corresponding switch is OFF. This tells the event to add the following state ...


Recess-State.png


4. This state exists for the purpose of being able to apply a Skills & States Core notetag upon expiration. The notetag plays Common Event #3 ...


Common-Event-3.png


5. Common Event #3 checks whether the ally is in the party despite her switch being set to OFF. If so, the event removes the ally and adds Avery.


You say enemies can target her - do the attack animations and damage popups play in the correct space?

Smart question. I just double-checked, and no, they're also off-screen unless I deactivate the Battle Grid System plugin.
The part that sets off alarms in my mind is when you're doing the actual actor switching by calling the Party Scene.

Typically, unless a plugin makes specific accommodations for it, going to another scene from the Battle Scene is expected to break the battle.

That's why if you look at the screenshots on the plugin page, the scene you go to from the menu is visually different from the in-battle switching, which just opens a dedicated window in the middle of battle. It does not go to a different scene there.

1735315596001.png


I'm uncertain because you use different wording between your posts, but several times it seems quite specific that this switching is between Quin and Avery - if it's specifically between those two actors, why bother with the Party System stuff for that at all? Just make a skill that uses the regular Change Party Member event command to swap those two actors.
One of the core features of the VS Party System plugin is mid-battle actor switching. Using the term "scene" was probably just me not fully understanding the implication attached to that word.

As for the Quin/Avery switching, it was my first attempt at this and just meant for example. I didn't want to set up switching options for the other three allies until I knew I had the first one correct.

However -- to your point -- maybe the easiest way out of this mess is to only use the Party System for locking/unlocking actor access ... and then DIY the rest of the skill? I assume there's some way to work around it by creating individual skills for each "to-be-switched" character and nesting them under the main skill using the Skill Containers plugin.
Or inquire with VisuStella if there's a script call to pull up the actor switching window in battle without enabling the menu command.
Not getting a response thus far on VisuStella's Discord, so I'll probably just slog through this manually.

In any event (hilarious pun not intended), you helped set me on the right path, so thank you for your patience/wisdom.

Original thread: https://forums.rpgmakerweb.com/threads/actor-swapping-vs-party-system-battle-grid-system.174163/