Check if Actors are in the party, and if so show them as a choice.

I'm trying to set up a decision where the player will have to choose a party member to leave behind in exchange for a new one, but this is an abnormal event, so I hadn't gotten a party management plugin yet and was trying to do it through eventing. I've tried setting up conditionals to check for actors, and variables to check for actors, but just can't get it to cooperate.

Part of why I need it to check is because the player has the option to walk right past 2 of the party members at the beginning of the game (multiple endings and party interactions and such being a focus of the game), so if they aren't in the party, they can't be choices, and if 1 but not the other is in the party, that needs to be accounted for.

I attached the project if anyone would like to take a look at the situation in detail, but also in the spoiler, there's a screenshot of the spot I'm trying to implement.

Any sort of solution is appreciated, be it through scripting or plugins! I'm just not amazing at writing the scripting myself.

Project File Here

Spoiler: Screenshot of Event Scripting
j2z2Od4.png

Side note: If you do playtest, I'm aware of the texture errors with the transparent areas becoming other random tiles sometimes, I don't know why, and I'll fix it later as it isn't game breaking and fixes itself randomly.
Yanfly's Party System. Check it out.
How many actors do you have? If not many, it might be possible, but a little complicated, to event this.

Also, at what point does the transparent tiles thing happen? I downloaded your project to see if I could spot why.
If you're using RMMV 1.6 or above, you could use the following code in your conditional:
Code:
$gameParty.members().find(member => member._actorId === x);
Replacing x with the ID of the Actor you want to check for. It will evaluate to a truthy statement if the actor is in the party and a falsey one if not.

If you're using an older version of RMMV, you could use:
Code:
$gameParty.members().filter(function(member) { return member._actorId === x; }).length
Yanfly's Party System. Check it out.

I gave it a look, installed it and went through the help file, I don't think it does what I need. I'm looking for a way to do this within an event, not the formation menu. The plugin doesn't do anything with "checking" what actors are active, which is the primary thing I'm looking for.
You can event this with a bunch of conditional branches, but it'll get messy fast. An alternative is that you can use my Conditional Choices plugin. An event would look like this:

upload_2019-1-17_19-22-53.png


Code:
!gp._actors.contains(3)
means hide that choice if the party doesn't have actor #3 in it. (gp is an abbreviation for $gameParty)
How many actors do you have? If not many, it might be possible, but a little complicated, to event this.

Also, at what point does the transparent tiles thing happen? I downloaded your project to see if I could spot why.

I think what Zevia said will work, but I have 4 active actors. (The 5th one exists for the tutorial, and might come back later).
The transparent tiles bit happens on the maps that use the truesight goggles (the one with the fireplace called "Truesight Goggles" in the project, and the "Crystal Lord" map.) It might have something to do with how I originally ran the event, changing the tile out for one that I edited the passability of, but have since changed the goggles to use "through" events to allow the player to walk on them.

If you're using RMMV 1.6 or above, you could use the following code in your conditional:
Code:
$gameParty.members().find(member => member._actorId === x);
Replacing x with the ID of the Actor you want to check for. It will evaluate to a truthy statement if the actor is in the party and a falsey one if not.

If you're using an older version of RMMV, you could use:
Code:
$gameParty.members().filter(function(member) { return member._actorId === x; }).length
This seems to do what I want, I just have to figure out how to set things up right for what menu appears based on the party members. Thank you!

You can event this with a bunch of conditional branches, but it'll get messy fast. An alternative is that you can use my Conditional Choices plugin. An event would look like this:

View attachment 107412

Code:
!gp._actors.contains(3)
means hide that choice if the party doesn't have actor #3 in it. (gp is an abbreviation for $gameParty)
Oh my god thank you. This will save me so much time in the long run with this game since so much is based around what party members you have.

@daisyfairy42 , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/check-if-actors-are-in-the-party-and-if-so-show-them-as-a-choice.104584/