MV YEP Party System. pets and party size exceptions.

Heyo!

alright im going to try and make this as clear as possible.
im using Yanfly Party System and I would like my party size to stay at 4 but have an exception where summons and pets can be added to the party. ex i could have 4 actors and 2 pets battling but if i was to swap my parties actors i can only swap out with the 4 actors and not the pets cause then i all of a sudden have 6 actors and no pets and pets are weaker.
I know how to make it a requirement for a certain actor's pet to require their master to be in the party but i want the limit to again go above 4 so i can have all of them out.

if plan A doesnt work and i cant keep them out and not have to resummon each battle then i guess plan B ill need to summon and unsummon when a battle is over and this is what i've made but it seems to not show the summoned pet battler the second battle i try summoning it but i can still use it to fight. almost like a graphical error.

1615839204616.png


this lets me summon 2 skeletons
Have you looked at SumRndmDde's Summon plugin? It is made to behave much more like what you want without having to mess around with adjusting your party size all the time.

Summoned actors are tracked separately from the battle party, so using the party swap in the battle should automatically only allow you to choose from the actual characters.

The only thing it doesn't do by itself is keep the summoned pet to start the battle next time, but it is a simple enough matter to set a variable every time you summon a pet, and have a turn 0 battle event that summons them back.
@ATT_Turan hey brother,

I've seen that plugin before but i never thought to try it not ending at the end of battle. you think that will work?

ill give it a try and update you.

okay so by default it is set to last infinite turns but always end when the summon either dies or battle ends.. so it solves for B I guess. as for being able to keep it throughout battles i was wondering if auto passive states might be able to do this.. at least make it so the player doesnt have to keep recasting every battle which is what im trying to do with plan A. is there a way to make a state cast a skill so the skeletons spawn or maybe you know a better way?
As I said in my prior post, I would have the skill that summons the pet also set a switch (and set up an event to undo the switch if the pet gets killed). Then, have a turn 0 battle event that checks for the switch and automatically summon the pet in if it ought to be there.

You could also do it if you have Yanfly's passive states, or probably any number of other ways.
@ATT_Turan
i get what your saying with having a check running to see if summon is dead and the use of switches, i just dont even know how that would look. like im trying to wrap my brain around it but what it actually looks like i dont know.
Can multiple party members summon the same kind of pet? Or are the pets unique to the characters?
@ATT_Turan
unique to the character.. so necro summons multiple skeletons, hunter has single lion pet, etc.
Well, I'll give you the idea, you'll have to configure it to work exactly the way you like, or post a plugin request to get something more exactly written for you.

Make a state that represents having summoned something - don't give it an icon, and it won't show up anyplace.

In every skill that summons a pet, you'll add the notetags per SRD_SummonCore to create the pet, and also in the Effects area add the Summoned A Thing state to the actor using the skill.

Make a plugin using the following script - I have not tested this. Based on my reading of the Summon Core, I think it should work, but be forewarned that my interest in troubleshooting if you have problems is going to be low 😛
In the parentheses where it says StateId, you need to put the ID number of your Summoned A Thing state.
Code:
function StripMasterState ()
{
    for (var i=0; i<$gameParty.summonMembers().length; i++)
    {
        if ($gameParty.summonMembers()[i]._hp<=0)
        {
            $gameActors.actor($gameParty.summonMembers()[i].masterId()).removeState(StateID);
            break;
        }
    }
}
You just put that into a text file, save it as WhateverYouWant.js and add it in your plugins list.

Get this plugin:

Give the actor for each summoned pet a notetag per that plugin's instructions to call a common event. In that common event, add a script call for
Code:
StripMasterState();

Lastly, make a turn 0 battle event in all your troops (or you can use Yanfly's Base Troop Events to just write it once) that checks each actor in the party to have the Summoned A Thing state. If they do, force the skill to summon it back.
@ATT_Turan

hmm okay okay i trust you all mighty Turan 😛. I have no skills with plugins or code but i will try my very best and let you know how it unfolds in the next couple days.

i appreciate the help 🙂
@ATT_Turan
alright ive done as you've instructed and i seem to be having a problem forcing the summon back, i tested a different spell with a different character and the states and everything where staying but that character also wasn't casting something at the beginning of battle.

this is what i have set up using yanfly base troop for the summoner.. i feel like i might be messing up with the target maybe.. i dont know what the index options are and it doesn't really give me any options to begin with. ideally it would be target user but i dont seem to see that option.

1616108131695.png
I did a quick Google, and: the index depends on the target group. If the forced skill's scope is a player, then the index is the Party Position. If the forced skill's scope is an enemy, then the index is the enemy index of the troop.

My guess is that your scope is None, or The User, so it doesn't matter which index you use, but Last Target wouldn't work as that actor hasn't already done something to a target in this battle.
@ATT_Turan
okay ive been testing for hours troubleshooting and i pseudo got the first part working.. the issue i come across is this part you explain here
In every skill that summons a pet, you'll add the notetags per SRD_SummonCore to create the pet, and also in the Effects area add the Summoned A Thing state to the actor using the skill.
this is what i have..
View attachment 183356
now the problem with this is when i have it laid out like that.. it inflicts the summon with the summon state and not the user himself.. is there a way to fix this so the skill still summons but the user is effected by the state and not the summon?
I don't know how you attached that, and whether it's something you did or a bug in the forum, but I can't see your screenshot. Regardless, I see the same thing in my testing.

So, you're using Yanfly's Party System - do you also have his Action Sequences? If so, add in your skill's notetag:
Code:
<target action>
add state IdNumber: user
action effect
</target action>

Plugging in the ID of your state as appropriate.
@ATT_Turan yeah thats weird that photo didnt show. here it is again

1616187241717.png


is action sequence a separate plugin?
Yes.
@ATT_Turan i went ahead and looked into it. got the action seq 1 and used the note tags you described.. seems to be working now. one thing i noticed is when the summon dies, the state stays on the master.. i went to that dead common event you recommended and added a conditional branch to be ran but i think the way i have it set up will mess up if i have multiple classes that can summon. here is what i mean..

1616188491709.png


so im sure that will work but the dead common event plugin only runs 1 common event so ill need all of the classes summons included in here.. that being said i dont want to accidentally remove 1 classes summons when anothers summons die.. does that make sense?

i also wonder how it will look when that necro can summon say 2 skeletons.. do i just treat it as 2 different actors.. but one state hmm.. maybe a different state will happen when there is 1, skeleton and another when there is 2?


thanks.
Sorry, I'm not familiar with how the death common events plugin works beyond its description. However, I'm pretty sure you're incorrect - the instructions in his post provide the notetag:
Code:
<DeathCommonEvent:ID>
ID = the common event ID you wish to call. For example:
  <DeathCommonEvent:3>
Common Event #3 will run when this character dies.

So you should be able to make a separate common event for each kind of summoned pet, which eliminates any need to use the plugin function I wrote for you. Have the wolf's common event remove the state from the ranger, etc.
@ATT_Turan oh your right your right. thank you.
when i run that common event though and the summon dies its not removing the state from the summoner.. this is what i have for the death common event to be run.

1616436002788.png


this is suppose to run when the skeleton dies but when it does die the state isn't removed from the summoner. i wonder why.
That doesn't look any different than your last screenshot. I already said in my last post that the plugin I wrote you may not work with the death common event plugin.
@ATT_Turan sorry i was preoccupied with a few things. your right. hmm. i guess ill have to look around and see what action to be looking for when a summon dies cause it doesn't seem to be knockout or work with the deathcommon event plugin.

i guess ill let you know if i find anything.

Original thread: https://forums.rpgmakerweb.com/threads/yep-party-system-pets-and-party-size-exceptions.134429/