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

daisyfairy42

Villager
Member
Joined
Jun 6, 2016
Messages
9
Reaction score
4
First Language
English
Primarily Uses
RMMV
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


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.
 

OmnislashXX

Veteran
Veteran
Joined
Mar 30, 2012
Messages
599
Reaction score
3,686
First Language
English
Primarily Uses
RMMV
Yanfly's Party System. Check it out.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV
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.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
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
 

daisyfairy42

Villager
Member
Joined
Jun 6, 2016
Messages
9
Reaction score
4
First Language
English
Primarily Uses
RMMV
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.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
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)
 

daisyfairy42

Villager
Member
Joined
Jun 6, 2016
Messages
9
Reaction score
4
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,351
Reaction score
8,532
First Language
English
Primarily Uses
RMMV

@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.

 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top