Yanfly's Actor Party Switch with a Pokemon Game

Hi everybody!

I'm trying to make a pokemon fan game with RPG Maker MV. I understand RPG Maker VX has a pokemon essentials kit but I really like MV better

I'm trying to make a system where you carry around 6 pokemon with you (der...) but you always battle with 3 at a time (epic, I know). So every battle is a 3v3. Most NPC opponents you battle will just have 3 pokemon to battle against.

I'm using Yanfly's Actor Party Swtich plugin to allow the user to switch in/out pokemon among the 6 you carry with you (3 battling at a time) (FFX style). But I want one thing different: I want it so that if one of you pokemon faints, you get to automatically select another pokemon (among your 3 that are not fighting) to go in and replace the fainted pokemon. This would happen until one of you pokemon faints and you don't have any other pokemon who can fight.



One other thing:

Can this work for enemies too? Most opponents will only have 3 pokemon to fight to make it simple. But you may battle a gym leader or elite 4 member who will have more. When you defeat one of their pokemon can they automatically send in a new opponent pokemon, until they are out of pokemon to send in?

I understand that I may be asking for a lot... if this can't work somewhat easily then I can just live with it not working this way. But if any one know how to do this I would love it!!! 😀

PS, I already got Yanfly's Actor Party Swtich plugin to only allow you to switch in the top 6 pokemon that you have. You can have infinite amount of pokemon and they are all technically in your party but I tweeked the plugin to only let you choose from among your top 6.
Can't you use the Death State to call the Party Switch screen? Or, in case of enemies, "make appear" one monsters that is invisible?
Thanks for the reply!

Now that you bring up the Enemy Appear enent, I think I can figure out how to event that in battles where the opponent will have more than 3 pokemon. Thanks!

Calling the party switch screen with the death state is a bit over my head. I tried this in my death state with the buffs and states core:

<Custom Apply Effect>
Yanfly.PartySwitch.Game_System_initialize.call(this)
</Custom Apply Effect>

Didn't work of course. I'm somewhat of a noob. I looked through the plugin code a little bit but couldn't figure out how to call it. What do I need to put in it to call the party switch?
Try calling this plugin command "ShowActorPartySwitch". You may need to make the Death state call a common event that calls this plugin command, and obviously make a conditional branch if the death is of a player.
The "ShowActorPartySwitch" plugin command just makes it so the "switch" command in battle will be available. Likewise, "HideActorPartySwitch" makes the switch command unavailable in battle. So this isn't what how I call it unfortunately.

I could dig through the code myself and try to make my own plugin command in the code so I can call whatever function gets the window to come up. I think I'll start trying to do that.

If anyone knows what function runs the whole thing and can help me speed up this process that'd be great!
Anyone found a solution to this? I am dealing with exactly the same problem :/
I know that's an old post but for the one like me that would like to know the solution :

To make an actor automatically switch to an alive actor, I am using WAY_CustomOnDeathEval script.

I am implemented this Notetag to all my classes :

<Custom On Death Eval> for (let i = 1; i<=$gameParty._actors.length; i++) { if ($gameActors.actor(i).hp != 0) { $gameParty._battleMembers[0] = i; break; } else continue; } $gameParty.reconstructActions(); $gameParty.rearrangeActors(); $gamePlayer.refresh(); </Custom On Death Eval>

That is only for the 1st actor (as my game is a pokemon like, so you only have 1v1 battles) If you would like to do with 3 battlers it would be different and quite frankly I would not know yet how to do it, but I hope my comment will serve to a more knowledgable person to find the answer 😛

Again sorry for the late reply !

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-actor-party-switch-with-a-pokemon-game.82152/