Party System plugin command not working

I'm using @Yanfly's Party System plugin and I'm trying to use a plugin command in a common event. The common event is called when one of my actors uses a certain skill. The skill changes the party max to 4 actors instead of three, then summons another actor into battle. However, when I use the plugin command "ChangePartyMax 4", I get the error message "TypeError undefined is not a function." If I remove the plugin command, the skill works fine. The summoned actor just isn't on the battle field.


All I did was add a plugin command to the common event that says "ChangePartyMax 4" without the quotes, just like on the Party System help page. How do I fix this?
does it work when you do it in a regular event?  Please give a link to the plugin so we don't have to go searching.  And a screenshot of your common event.
Ah, sorry. Didn't think to put a link in there.


http://yanfly.moe/2015/11/20/yep-29-party-system/


2016-09-17 (2).png


When programmed like that, the original actor does the animation for the skill, but the new actor does not get summoned and I get the error message at the end of the turn.
As Shaz asked, does it work in a normal event outside a battle?


And, are you sure you are doing the command right?
You didn't state whether it works when you put it in a regular event.  It might be related to your trying to do it inside a battle.


Is it below YEP_BattleEngineCore in your plugin list?


Could you please open the console (F8) while playing, and when you get the error message, grab a screenshot of your console and post here (or copy/paste the console contents)?
I've moved this thread to Javascript/Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
I'm sorry. I've been working on this game nonstop for the last few days and I'm really tired. Somehow I skimmed right past your first question. I really do apologize.


I am using the command correctly. After some testing, I realize the party system plugin command actually worked, but everything else failed. In battle, the fourth slot was added and filled by the new actor, but the sprite wasn't on screen. I could attack with him and the battle animation played, but then I got the same error message when the turn was over.


I created a normal event with the plugin command and change party member to add the actor. The fourth slot opened up, but the actor did not appear. Here's what the normal event looked like and the debug screen from the battle.


2016-09-18 (1).png2016-09-18.png


EDIT: I posted it in the main forum because I thought it might be more than a plugin issue. It could've been the common event or something to do with the battle scene.
The console log tells you the error is caused by the YEP_BattleEngineCore plugin - at least that's where it happens; it may well be caused elsewhere and only triggers the issue here.


The easy way to tell if it's a plugin issue or not is to disable all plugins and see if the error still happens.  If it doesn't, it's a plugin.  Also, you know it's a plugin that's causing the issue, because you said when you remove the plugin command, it works fine.


Unfortunately this is as far as I can help you.  I'm not familiar with Yanfly's plugins (or anyone else's), and just don't have the time to delve into them.  I'm sure there are lots of people though who do use them and will be able to help you out.
Thank you for explaining that and for what help you could give.

I think the plugin command is actually working fine and there's some sort of conflict between that plugin and the change actor event setting.

I'm trying to find a workaround.
In a lot of cases with battlesystems, the battleplugin sets up extra data on battlestart. adding an actor later (during battle), that actor usually misses that setup - which is why a special summoning plugin for specifically the used battlesystem is often needed.


That is why the actor didn't have a face or sprite when adding it to the battle in the first place, and you'll need to search for a summoning way that is compatible with the battle plugin you're using.
I think I've found a work around. I'm going to keep trouble shooting this.


EDIT: I can't find a fix for this. I've decided to have the ChangePartyMax plugin command activate on a normal event related to the cloning situation. The actor needs to have a certain weapon to be able to clone himself, so I added the plugin command to the event where he obtains the sword. It's not perfect, but it works for now.

Original thread: https://forums.rpgmakerweb.com/threads/party-system-plugin-command-not-working.68477/