MZ Switch actors in battle for 1v1 battles

Hi! this is my first thread so I´m sorry in advance if something is a bit odd phrased. I´m doing a project with a battle system that I would like to be like in Pokemon/Coromon etc were you have a party of X number, let´s say 5, but they fight one at a time, I´m using RPGMaker MZ but YEP battle engine and dreamxcapture system with FOSSIL, also Tyruswood Follower Control (to set the maximun battle actors to 1) and this script to keep the leader as a non battler
Code:
/*:
 * @target MZ
 * @plugindesc Party leader (map) is always actor 1.
 * @author Caethyril
 * @url https://steamcommunity.com/app/1096900/discussions/0/4333105935809404961/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Override - party leader is actor ID 1.
Game_Party.prototype.leader = function() {
  return $gameActors.actor(1);  // <- change this number if needed
};

// Patch - first party member is now first follower.
void (alias => {
  Game_Followers.prototype.setup = function() {
    alias.apply(this, arguments);
    // add party member index 0
    const L = this._data.unshift(new Game_Follower(0));
    // reapply max followers
    if (L > $gameParty.maxBattleMembers())
      this._data.pop();
  };
})(Game_Followers.prototype.setup);

With all of this I tried to use YEP Party system and YEP X Actor Party Switch but they don´t seem to work well with either MZ or the plugins I have installed, they definitely clash with Tyrus and the Leader as a non battler, so I don´t know what to do... I´ve been searching through the forums but I haven´t got a clear solution, I don´t know any coding besides eating a bunch of tutorials on languagelogic but I´m slowly picking up things.

Thanks a million, also If I had to end up commissioning the plugin or something were should I search for people who would take them, I read in a thread that there was a classified section in the forum for it but I don´t have access?

Thanks a mil for your time!

EDIT: I Found this thread! https://forums.rpgmakerweb.com/index.php?threads/concept-mid-battle-party-switch.147025/seems like a good option too how could I make this solution into a plugin? thanks a million
In this place, half of the people ultimately receive no response, so in the end, people have to rely on themselves.


The solution I recommend is a plugin I developed myself. However, it has the following issues:


  1. It is a bundled plugin—many prerequisites need to be installed.
  2. It is only available in Chinese.
  3. Since its functionality is already quite complete, compatibility with other plugins was not considered during development.

If you don’t mind, you can give it a try.


The feature in Pokémon where the team leader does not enter battles might be included in the future, but it is not available at the moment.

EDIT:
I have just added a new feature.
A 'Hide Leader' function has been added to the core.
When selected, your leader will not appear in battles or in the menu.




Sun_0_CoreEngine.js

Sun_1_GamePartyEx.js
Just a few questions if what Sunhihi suggested doesnt work out

Tyruswood Follower Control (to set the maximun battle actors to 1)
why? yanfly's party control plugin natively has a parameter to set the max number of battle actors (and a command to change it mid game if you wanted to do double/triple battles)

With all of this I tried to use YEP Party system and YEP X Actor Party Switch but they don´t seem to work well with either MZ or the plugins I have installed, they definitely clash with Tyrus and the Leader as a non battler, so I don´t know what to do
what happens when you use them? do you get an error or a crash? have you tried just using the yanfly plugins (and fossil) to make sure its not an issue with fossil + mz as opposed to a plugin incompatibility?

it didnt look like the yanfly plugins would have a problem with Cae's plugin at a glance if its loaded after them, and a quick test (in MV mind you) led me to the same conclusion.
Not a direct answer to your problem, but I was wondering why you would use YEP with FOSSIL instead of just using the MZ equivalents (Visustella)? E.g. leader as non-battler would probably be doable by just removing the leader from the party in a pre-battle event and re-adding the leader in a post-battle event.

dreamxcapture
Hmmm... haven't been able to find this one. Would you have a link? Never mind, found it here.

Tyruswood Follower Control (to set the maximun battle actors to 1)
If this is causing issues, and if the only reason you're using it is to set the maxBattleMembers to 1, you can get by with a small plugin that patches just that.
In this place, half of the people ultimately receive no response, so in the end, people have to rely on themselves.


The solution I recommend is a plugin I developed myself. However, it has the following issues:


  1. It is a bundled plugin—many prerequisites need to be installed.
  2. It is only available in Chinese.
  3. Since its functionality is already quite complete, compatibility with other plugins was not considered during development.

If you don’t mind, you can give it a try.


The feature in Pokémon where the team leader does not enter battles might be included in the future, but it is not available at the moment.

EDIT:
I have just added a new feature.
A 'Hide Leader' function has been added to the core.
When selected, your leader will not appear in battles or in the menu.




Sun_0_CoreEngine.js

Sun_1_GamePartyEx.js
Oh Thanks a mil I´ll give it a try!

Just a few questions if what Sunhihi suggested doesnt work out


why? yanfly's party control plugin natively has a parameter to set the max number of battle actors (and a command to change it mid game if you wanted to do double/triple battles)


what happens when you use them? do you get an error or a crash? have you tried just using the yanfly plugins (and fossil) to make sure its not an issue with fossil + mz as opposed to a plugin incompatibility?

it didnt look like the yanfly plugins would have a problem with Cae's plugin at a glance if its loaded after them, and a quick test (in MV mind you) led me to the same conclusion.

Because if I use the YEP party control it doesn´t let me have the Leader as a non battler properly, the first battler actor gets bugged and doesn´t appear right behind the Leader, the second battler is the one that appears, and if I have more than one character in the party they appear one on top of the other in battle when set to just 1 battler.

Also thanks for the response!
Not a direct answer to your problem, but I was wondering why you would use YEP with FOSSIL instead of just using the MZ equivalents (Visustella)? E.g. leader as non-battler would probably be doable by just removing the leader from the party in a pre-battle event and re-adding the leader in a post-battle event.


Hmmm... haven't been able to find this one. Would you have a link? Never mind, found it here.


If this is causing issues, and if the only reason you're using it is to set the maxBattleMembers to 1, you can get by with a small plugin that patches just that.
I used YEP just because it was a bit simpler and looked better for my game, and had compatibility with the dreamX capture system, the issue with removing and adding the leader (I also did that with also a script call to put him back the first one in place at the end of the battle) is that his profile is still accessible from the formation menu, and though I can lock him in the first position I don´t want him to have any menu info, like skills and such

Ooh and how would that plugin to just have one battle would work? thanks a mil! and sorry for the double post I didn´t know I could response to a few people at once
...is that his profile is still accessible from the formation menu...
Ah, I see... More like note to self, but seems doable to not draw the status if actorId is 1 or something. Will try tomorrow.
Ah, I see... More like note to self, but seems doable to not draw the status if actorId is 1 or something. Will try tomorrow.
Thanks a million! 😢
Ooh and how would that plugin to just have one battle would work?
Sorry forgot to respond to this one. It's just a matter of overwriting the function in rmmz_objects.js that returns the number 4. You can just change this to 1, save it as a js file and load it in your plugin manager, and you'll have 1 battle member by default.

JavaScript:
Game_Party.prototype.maxBattleMembers = function() {
    return 4;
};
Sorry forgot to respond to this one. It's just a matter of overwriting the function in rmmz_objects.js that returns the number 4. You can just change this to 1, save it as a js file and load it in your plugin manager, and you'll have 1 battle member by default.

JavaScript:
Game_Party.prototype.maxBattleMembers = function() {
    return 4;
};
Ah thanks a mil! I´ll add it right away ^^
Ah thanks a mil! I´ll add it right away ^^
Maybe you didn't notice, but that's something that can be set up by my core plugin.

The Sun_0_CoreEngine plugin can control the number of combatants to be one and exclude the first team member from the battle system.

The Sun_1_GamePartyEx plugin can automatically replace fallen teammates with reserve members. It can even designate a skill to trigger the replacement of reserve members. This feature will be displayed in your battle control options.
Maybe you didn't notice, but that's something that can be set up by my core plugin.

The Sun_0_CoreEngine plugin can control the number of combatants to be one and exclude the first team member from the battle system.

The Sun_1_GamePartyEx plugin can automatically replace fallen teammates with reserve members. It can even designate a skill to trigger the replacement of reserve members. This feature will be displayed in your battle control options.
Hi Thanks!! yeah those two are incredible how much they can do!! though I have to tinker them a bit still as I´m getting some errors but I think it´s cause I´m not setting it properly so I´m still playing with them to see if I can use them ^^
Ah, I see... More like note to self, but seems doable to not draw the status if actorId is 1 or something. Will try tomorrow.
Thanks a million! 😢
So, I ended up consulting with Master @ATT_Turan for this, and instead of doing fancy stuff with hiding the actor, he advised to just create a subgroup of the party members that didn't include a specific actor ID in the menus:

JavaScript:
/*:
 * @target MZ
 * @plugindesc Specific actor ID hidden from menu
 * @author Canned_Dinosaur/werzaque, ATT_Turan
 * @url https://forums.rpgmakerweb.com/index.php?threads/177680/
 * @help Prevent actor ID 1 from showing up on menu screen.
 * Free to use and/or modify for any project, no credit required.
 */

Game_Party.prototype.menuMembers = function() {
    return this.members().filter(actor => actor?.actorId() != 1);
};

Window_MenuStatus.prototype.maxItems = function() {
    return $gameParty.menuMembers().length;
};

Window_MenuStatus.prototype.actor = function(index) {
    return $gameParty.menuMembers()[index];
};

Load the above as a plugin, and it will exclude actor No. 1 from being displayed in the menu. Having said this, with Pokemon-esque games being quite popular for developing in RPG Maker, there's probably numerous plugins out there that do all the things typically required in Pokemon-esque games.

This is from someone that is obviously biased since I started on MZ, but I would try to avoid using FOSSIL if there are good enough MZ alternatives (including the Visustella tier 0 and tier 1 plugins, which are free).
So, I ended up consulting with Master @ATT_Turan for this, and instead of doing fancy stuff with hiding the actor, he advised to just create a subgroup of the party members that didn't include a specific actor ID in the menus:

JavaScript:
/*:
 * @target MZ
 * @plugindesc Specific actor ID hidden from menu
 * @author Canned_Dinosaur/werzaque, ATT_Turan
 * @url https://forums.rpgmakerweb.com/index.php?threads/177680/
 * @help Prevent actor ID 1 from showing up on menu screen.
 * Free to use and/or modify for any project, no credit required.
 */

Game_Party.prototype.menuMembers = function() {
    return this.members().filter(actor => actor?.actorId() != 1);
};

Window_MenuStatus.prototype.maxItems = function() {
    return $gameParty.menuMembers().length;
};

Window_MenuStatus.prototype.actor = function(index) {
    return $gameParty.menuMembers()[index];
};

Load the above as a plugin, and it will exclude actor No. 1 from being displayed in the menu. Having said this, with Pokemon-esque games being quite popular for developing in RPG Maker, there's probably numerous plugins out there that do all the things typically required in Pokemon-esque games.

This is from someone that is obviously biased since I started on MZ, but I would try to avoid using FOSSIL if there are good enough MZ alternatives (including the Visustella tier 0 and tier 1 plugins, which are free).
Omg this works perfect!! I´ll be able to make the other things work using this thanks a million for both !! And I´ll have in mind your advice, I´m new in all of this so thanks a million!!
There was a problem with things not properly reflecting when going to the skills and equip screens, so here's a more complete version. Also made it so that you can set the actor to be excluded in plugin parameters.
There was a problem with things not properly reflecting when going to the skills and equip screens, so here's a more complete version. Also made it so that you can set the actor to be excluded in plugin parameters.
That´s amazing!! thanks a mil!!
No prob! Please use the report button to report the thread as solved.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/switch-actors-in-battle-for-1v1-battles.177680/