Summoning a temporary party member

Alternate Title: The trials and tribulations of summoners...

I have a character. He's lonely. He wants to summon a Friend during combat. I have been using Eliaquim's excellent SRD Summon Core updated plugin, but it keeps crashing my game when interacting with other plugins. So! I'm trying to do this without it.

My game uses a party setup like this: Maximum 4 players, no reserve party. I handle this in the game by using a simple Party # Variable so you can't recruit more than 4 people regardless of what the maximum party size is set to. Then I edited rmmz_objects to increase the maximum number of battle participants.

Spoiler: Line 5422
Game_Party.prototype.maxBattleMembers = function() {
return 5;

I set up a skill that calls a Common Event (Change Party Member : Add Friend (Initialize)). Then I created another Common Event to remove the Friend (Change Party Member : Remove Friend) that runs parallel and requires the switch BattleDone. I then put an event on the map that runs Parallel and flips the switch BattleDone to ON.

Then I created a new Actor (Friend). I gave him some basic equipment and set him to level 10 with the Autobattle tag. In battle the skill works just fine! The Friend shows up and does his thing, the battle ends and he goes away. The Friend remains level 10 since he gets initialized every time he's called (which is what I want).

But here is where I get stuck. These are the problems I'm having presented below in an internet-friendly numbered list.
  1. I want the Friend to disappear if he is killed, so that the character would have to summon him again. Similarly, if the summoning character dies, I would like his Friend to leave.
  2. Is there anyway to play an animation over the Friend when he arrives? Or even to just have him run in from the side when summoned? It's kind of boring to just have him appear out of thin air.
  3. Is there an easier way to "Desummon" the Friend? Is there a way he could just disappear at the end of the fight before XP and drops are rewarded?
  4. I'm using several Visustella Plugins to change the appearance of menus and the like. As the maximum party size has been increased from 4 to 5, there is now a blank spot on both the main menu and battle menu. This also has the side effect of increasing the height of the battle menu. I would love for the menus to look as if there were only going to be 4 party members. If the player has to scroll on the battle menu to target the Friend with a spell, that's just fine (in fact, I would prefer it).
    1. (CoreEngine, BattleCore, MainMenuCore seem to be the ones in charge of this.)
  5. Is there anyway to change the position of the Friend? Right now he just pops up at the bottom of the row (which, incidentally moves the entire party row up a bit into the background), but I'd love to have him either be in front of the whole formation or right in front of the summoner.
I'm open to any suggestions folks have. Getting this to work right has been a thorn in my side since day 1 of this project. I'm also totally open to other plugins if you have any recommendations! I am absolutely a novice when it comes to all of this, so if you have JS solutions I'd love examples.

Thank you for your helping in ensuring my lonely character isn't lonely in battle forever.

Also, apologies to the Mods if this is in the wrong forum, I wasn't sure if it should be here or in Plugin Support. I put it here since I'm trying to use not-plugins to fix my problem.
You could ask Eli to help make it not conflict with other plugins, he's usually pretty accommodating. Unless it's VisuStella stuff, in which case he can't see the code to accommodate.

But to try to give some pointers on your questions:
I want the Friend to disappear if he is killed, so that the character would have to summon him again. Similarly, if the summoning character dies, I would like his Friend to leave.
Use a custom apply (or whatever VisuStella calls it) on your knockout state that checks whether the applying battler is your summoned friend or the summoner, and remove people from the party accordingly.

Is there anyway to play an animation over the Friend when he arrives? Or even to just have him run in from the side when summoned? It's kind of boring to just have him appear out of thin air.
There should be a few ways to accomplish this, I would do it in the action sequence of the summoning skill.

Is there an easier way to "Desummon" the Friend? Is there a way he could just disappear at the end of the fight before XP and drops are rewarded?
That's a tricky timing, as troop events can't normally trigger when the last enemy is killed. I don't know if there's an MZ equivalent of HimeWorks' End Phase plugin, or if that one is compatible with MZ via Project FOSSIL.

Is there anyway to change the position of the Friend? Right now he just pops up at the bottom of the row (which, incidentally moves the entire party row up a bit into the background), but I'd love to have him either be in front of the whole formation or right in front of the summoner.
You should be able to do it in your party member positioning in Battle Core(?) using conditionals.

If you paste what you have for that currently, we can assist with that.
Summoning compatibility completely depends on your battleplugins, because many battleplugins add new data to the battlers, and the summoning needs to have the same data to be able to function without error.

because of that, only a summoning plugin made for your battleplugins can work.

so you'll have to look for a visustella summoning plugins.
Thank you for your help! I'll check the knockout state, that is a pretty elegant solution. And I'll check out the end phase plugin!

You should be able to do it in your party member positioning in Battle Core(?) using conditionals.

If you paste what you have for that currently, we can assist with that.
Is that this line here?

// Declare Constants
const sprite = this;
const actor = this._actor;
const index = arguments[0];

// Make Calculations
let x = Math.round((Graphics.width / 2) + 192)
x -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);
x += index * 32;
let y = (Graphics.height - 200) - ($gameParty.maxBattleMembers() * 48);
y -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);
y += index * 48;

// Home Position Offsets
const offsetNote = /<SIDEVIEW HOME OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i;
const xOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$1) : 0));
const yOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$2) : 0));
x = xOffsets.reduce((r, offset) => r + offset, x);
y = yOffsets.reduce((r, offset) => r + offset, y);

// Set Home Position
this.setHome(x, y);
Holy freaking cow.

Okay, the good part is that you might have noticed the documentation apparently has a notetag for sideview home offset 😉

So we don't actually need to change anything in the formula, just give the friend actor that notetag with a negative x offset.

Original thread: https://forums.rpgmakerweb.com/threads/summoning-a-temporary-party-member.154227/