Script to prevent clones of reserve party members from joining active party

GethN7

Veteran
Veteran
Joined
Sep 22, 2014
Messages
164
Reaction score
43
First Language
English
Primarily Uses
N/A
Since I've run into a problem with all party related scripts concerning this (I'm using Yanfly's Party Menu for now, but similar scripts have the exact same issue), I'm wondering how I would prevent being able to recruit a clone of a party member that is in my reserve party but NOT my active party.

I have it set up so one can recruit people either in battle (via a troop event with a talk command) or via conventional means outside of battle, but I need to prevent clones of party members joining, it can be one unique character at a time is what I'm aiming for.

The game has a check built in to prevent ACTIVE party members I'm using a conditional branch in either case to prevent clones from being recruitable, but reserve party members are not detected. and thus clones are recruitable if they aren't in your active party, a behavior I want to prevent.

Been smashing my head into a brick wall trying to resolve this issue, would be happy for a solution for any party script, either for Yanfly's Party Menu, Sakuraba's Party Storage System, or anything similar, so long as I can preventing recruiting duplicates of reserve party members for any of these party systems.

Any built in alternative party systems scripts with these sorts of checks as part of the package would also be ideal.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
28,980
Reaction score
6,669
First Language
German
Primarily Uses
RMMV
you need to give us links to the plugins you're having problems with, because
1) there are no actor clones in default
2) in default the built-in check for actors contains both active AND reserve members

So the plugins you're using are responsible for this behaviour (both creating clones and excluding reserve members from the check) and we need to know which plugins you're using to find the cause for this change, before we can try to solve it.
 

GethN7

Veteran
Veteran
Joined
Sep 22, 2014
Messages
164
Reaction score
43
First Language
English
Primarily Uses
N/A
you need to give us links to the plugins you're having problems with, because
1) there are no actor clones in default
2) in default the built-in check for actors contains both active AND reserve members

So the plugins you're using are responsible for this behaviour (both creating clones and excluding reserve members from the check) and we need to know which plugins you're using to find the cause for this change, before we can try to solve it.
The following scripts have been used:

1. https://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/
2. https://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/command-party/

Alternatively, I tried this one:

1. https://www.rpgmakercentral.com/topic/26029-party-storage-system-updated-v12/


For either, let's say I convince Pixie to join me, either via the battle talk or outside of battle in an event. Using either script, I want to make sure I cannot recruit a second Pixie unless I don't have any Pixie in my party to begin with, either in reserve or in my active party.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
28,980
Reaction score
6,669
First Language
German
Primarily Uses
RMMV
none of those scripts can clone actors - if pixie is in the party, any future command to add that actor will simply fail but never add a clone.
and to my knowledge the default check for actor in party would still work for both active and reserve with only that script.

so either you have not listed the script that is causing your problem, or your checks do not follow the regular methods.

Please show us how your events work by screenshot, and tell us what script you're using for cloning actors.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,290
Reaction score
11,876
First Language
English
Primarily Uses
RMMV
In all of that, you haven't said if you're actually trying to check if they're in the party before you add them, or before you show them as an NPC. Generally you'd have an extra page on the NPC event that has no sprite, and is conditioned by Actor [x] in Party, so if they're in your party anywhere they won't even show up on the map.

Not sure how you're handling that in battle - is this a one-time battle with a troop, where you can recruit one of the enemy? Or is it a troop you face multiple times, maybe in multiple locations? Is it a random encounter or is it triggered by an event?

If it's an event, you can also do the check to see if the actor is in the party, and if they are, battle with a troop that doesn't contain that person; if they're not, battle with a troop that does contain that person.

The Conditional Branch has a check for Actor X in Party, but if you run it in battle, it only checks the battle members. I have a feeling this is where you're getting unstuck, but it would have helped if you'd clarified that.

The following script call, in a conditional branch, will return true if the actor is in your party anywhere:
Code:
$game_party.all_members.include?($game_actor[x])
(where x is the actor id, without leading zeros).

If you want it to return true if the actor is NOT in the party at all, use this instead:
Code:
!$game_party.all_members.include?($game_actor[x])
 

GethN7

Veteran
Veteran
Joined
Sep 22, 2014
Messages
164
Reaction score
43
First Language
English
Primarily Uses
N/A
Used this Tsukihime script to set up the enemy talk scene:

https://himeworks.com/2013/04/command-enemy-talk/

ex1.jpg

ex2.jpg

In all of that, you haven't said if you're actually trying to check if they're in the party before you add them, or before you show them as an NPC. Generally you'd have an extra page on the NPC event that has no sprite, and is conditioned by Actor [x] in Party, so if they're in your party anywhere they won't even show up on the map.

Not sure how you're handling that in battle - is this a one-time battle with a troop, where you can recruit one of the enemy? Or is it a troop you face multiple times, maybe in multiple locations? Is it a random encounter or is it triggered by an event?

If it's an event, you can also do the check to see if the actor is in the party, and if they are, battle with a troop that doesn't contain that person; if they're not, battle with a troop that does contain that person.

The Conditional Branch has a check for Actor X in Party, but if you run it in battle, it only checks the battle members. I have a feeling this is where you're getting unstuck, but it would have helped if you'd clarified that.

The following script call, in a conditional branch, will return true if the actor is in your party anywhere:
Code:
$game_party.all_members.include?($game_actor[x])
(where x is the actor id, without leading zeros).

If you want it to return true if the actor is NOT in the party at all, use this instead:
Code:
!$game_party.all_members.include?($game_actor[x])
So I'm basically failing to add a game party check for the actor in question and this is a script agnostic solution to my problem regardless of the scripting method I use?

P.S. - Trying to set up a Shin Megami Tensei style fangame, if that information helps at all.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,290
Reaction score
11,876
First Language
English
Primarily Uses
RMMV
P.S. - Trying to set up a Shin Megami Tensei style fangame, if that information helps at all.
Only helpful to someone who knows what a Shin Megami Tensie style fangame means, which is not me :)


Your conditional branch for [Pixie] in the Party isn't going to work. As I said, the [member] in Party check behaves differently when you're in battle, to when you're not in battle. In battle, it only checks the battle party members.

The script call I gave you will work.

In the Conditional Branch, go to the Script box on page 4, and type in $game_party.all_members.include?($game_actors[id]) where you replace id with whatever actor Id Pixie has, with no leading zeros.
 

GethN7

Veteran
Veteran
Joined
Sep 22, 2014
Messages
164
Reaction score
43
First Language
English
Primarily Uses
N/A
Only helpful to someone who knows what a Shin Megami Tensie style fangame means, which is not me :)


Your conditional branch for [Pixie] in the Party isn't going to work. As I said, the [member] in Party check behaves differently when you're in battle, to when you're not in battle. In battle, it only checks the battle party members.

The script call I gave you will work.

In the Conditional Branch, go to the Script box on page 4, and type in $game_party.all_members.include?($game_actors[id]) where you replace id with whatever actor Id Pixie has, with no leading zeros.
Thanks for the advice. I think I got it from here now, much obliged for the assistance.

P.S. SMT is basically Pokemon with religious and mythological beings.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,290
Reaction score
11,876
First Language
English
Primarily Uses
RMMV
Good to hear you've got it sorted.

Note - you don't have to quote someone's post just to reply to them. Just tag them like this: @GethN7

If you do want to quote them for some reason, only include the parts you're specifically replying to. Stops the page from being stretched out :)

I also have never played Pokemon, so that reference doesn't tell me much either :D
 

GethN7

Veteran
Veteran
Joined
Sep 22, 2014
Messages
164
Reaction score
43
First Language
English
Primarily Uses
N/A
@Shaz, I have one remaining question.

In my current proposed monster recruitment system, I was going to have static actor/class templates in the Actor tab (Pixie's would have an ID of 5 for example), but I believe it would be more efficient to make use of Tsukihime's Custom Database script to draw the data from the enemies list (since all recruitable monsters will draw from the ones you can fight and their base stats/skills from the enemies tab) to avoid repeating data on the enemies and actors/class tabs.

I was going to use the recruitable monsters script of AwesomeCool, which is based on this idea

https://forums.rpgmakerweb.com/index.php?threads/monster-capture.22831/

Note; AwesomeCool's scripts not available since the Dropbox links died, you can find a copy of the Master demo including the script and the others needed to make it run on my MEGA account here:

https://mega.nz/#F!AMEFWKDK!8D_mqMtXkMJllECxPjV9cA

My question is how to use the script calls you mentioned to reference the customized data the script uses to check to see if a monster is already recruited. Since it basically conjured up from information on the enemies tab and a new actor is created based on that information instead of drawing from existing database information, I confess idiocy on how to have it check to make sure said custom data recruit isn't already on my team to prevent letting another join until I get rid of the first in some manner.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
28,980
Reaction score
6,669
First Language
German
Primarily Uses
RMMV
My question is how to use the script calls you mentioned to reference the customized data the script uses to check to see if a monster is already recruited.
That is why I asked you for the script you're using for actor cloning - before this in your previous posts you never cloned a single actor, you only used existing actors you manually placed into the database. Because of this, your previous example of the pixie would have been unable to add another pixie if you already had the actor present and tried to add it a second time.

However, the second you create new actors dynamically (either by actor cloning or by enemy cloning), this no longer applies.

Theoretically the script commands Shaz gave you will work normally - the problem is that in order for them to work, they need the ID of the actor.
And with cloning, that ID does not exist at the moment you develop the game, but is different whenever a game is played.
And that is a big problem that can only be solved indirectly.

You'll need a new script command that checks the actors not based on their ID, but based on their name. And that needs to be created and will only work as long as you prevent the player from renaming captured enemy (if you want to allow renaming, it will become even more complex)
 

GethN7

Veteran
Veteran
Joined
Sep 22, 2014
Messages
164
Reaction score
43
First Language
English
Primarily Uses
N/A
Theoretically the script commands Shaz gave you will work normally - the problem is that in order for them to work, they need the ID of the actor.
And with cloning, that ID does not exist at the moment you develop the game, but is different whenever a game is played.
And that is a big problem that can only be solved indirectly.

You'll need a new script command that checks the actors not based on their ID, but based on their name. And that needs to be created and will only work as long as you prevent the player from renaming captured enemy (if you want to allow renaming, it will become even more complex)
I did figure that would be an issue, so enemy renaming will be disabled.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

"If the lion knew her own strength, hard were it for anyone to rule her". This would be my custom title if I had enough spaces for it. Coming off of personal pain, I'm glad I found the original quote I've tweaked.
Today I found out that ladybirds\ladybugs are apparently named for the Virgin Mary. They're also known as God's cows in some places.
J0pac wrote on CrowStorm's profile.
The sad reaction was not because I want you to credit me. (terms clearly say no need to credit) but because those maps are meant to be used as inspiration or guidence. You are ofcourse alowed to use them however you want :)
I'm an adult married woman

Forum statistics

Threads
93,455
Messages
912,537
Members
122,978
Latest member
Macblink
Top