Apologies for the confusing title but I wasn't quite sure how to phrase it, lol. This might also require to be in the script support depending on how this problem has to be solved but with this particular situation I'd rather not mess with scripts.
I just added a new area to my project which contains a poisonous flower. The way I've set this up is probably a little odd and impractical to veterans but for me it was easy enough to work with.
Each tile containing one of these flowers has a Player Touch Event attached that does the following:
Control Variable: PoisonPlantChance = Random No (1-10)
Conditional Branch: Variable PoisonPlantChance = 4 or Below
- Control Variable: PoisonTarget = Random No (1-28) [There are 28 playable characters]
- Conditional Branch: PoisonTarget = 1
- Check if Actor 1 is in the party. If so, play Poison Plant animation on the Player and add state 'Toxin' to Actor 1.
- Display a message informing the player of this.
- Conditional Branch: PoisonTarget = 2
- Check if Actor 2 is in the party. If so, play Poison Plant animation on the Player and add state 'Toxin' to Actor 2.
- Display a message informing the player of this.
And so on. There are identical conditional branches for all 28 characters. So if the Target variable is '13' it will check if Actor 13 is in the party and if so, they will be the one afflicted, and so on.
If the event chooses a character who is not in the party, it is SUPPOSED to simply do nothing, however instead it is still applying the state to that character as if they were in the party. I've worked out why this is happening but I'm not sure on the solution.
I'm using Yanfly's Party Select script and there's a specific character you can talk to change your active members. So basically when a character is 'unlocked', I use the 'Add Party Member' function to add them to the 'roster' so to speak, but as a result, my PoisonPlant event considers every unlocked character to be in the active party even when they're not.
I tried using the 'Remove from Party' option on a character to see if they'll be just taken out of the active party but it also removed them from the roster all together :(
It's a classic case of RPG Maker not doing what it's told. Since it's insisting on being literal, I need my event to instead check if the chosen character is in the BATTLE party. Is this possible?
Create event that inflicts a Status on random BATTLE Party Member?
● ARCHIVED · READ-ONLY
-
-
The problem is that that script changes how the battleparty is defined.
Without it that would be easy because only party members in slots #1 to #4 are battlemembers.
With the script you'll need to check the script data to see which actor of the party is in battle and which is not.
That can not be handled by events alone unless you ditch that script, and I don't know why you're using it.
So first you'll have to decide what is more important to you, and if you need that Party script then you'll need to find someone who knows it enough to tell you how to check for battlemembers.
And then, in each of your actor checks, you'll need to add an additional conditional branches for that check. -
I see :/ Thanks for info.
I'm using the script so that characters can only be added/removed from the party at a specific location (if you've ever played Suikoden II then think of Leona as my inspiration for the concept) as I don't want the player to be able to do it on the fly and I like the interface in comparison to the regular formation screen as it gives a sense of actually adding and removing a character as opposed to just reordering them so that the top 4 are the 'battle party.'
Is there a way to accomplish that type of party setup without that script? It looks like I have little choice but to remove it but I'd at least like to find a similar alternative. -
you mixed up and completely misunderstood what that plugin does - that is a common mistake of people using yanfly's party manager without understanding it.
The "Party" is the sum of battlemembers and reserve members. And the party manager allows you to organize that party as a replacement to the formation screen.
that is why the use of the change membership command adds or remove an actor from the list completely - because the entire list is the party you always take with you. And that is the reason why the original behaviour that got your attention is not a bug, but the regular behaviour - everything on that party screen is your active party for anything that is outside of battle.
so now to the difference between battlemembers and reserve members (which are both active party members as I said).
By default the first four actors are the battlemembers, and you'll use the formation screen to change who is a battler and who not. And if you check the third page of the event commands, you'll find the command "change formation access" to enable or disable exactly that.
so by default if you want to stop the player from changing the battlemembers, you'll disable formation access on gamestart and then have your event where you first endable formation access, then open the menu screen and then disable the access again - that way you can only change formation by going to that specific event.
the only advantage of yanflys plugin is the screen to make that comfortable. But as said above, yanflys party manager does not change the fact that every actor there is an active party member outside of battle. -
How about script call?
Code:$game_party.battle_members.shuffle[0].add_state(id) if rand <= 0.4 -
I think that's actually the method I started with way back before I discovered that script, disabling Formation and then using an event that enabled it temporarily but I really didn't like that you had to go to the menu and such, as it took away the feel of the NPC offering a service. Unless you can do a script call for like "call_scene: formation" or something but that kinda stuff is over my head at the moment.snip
Thanks! I'm pretty bad at understanding exactly how these kinds of scripts work, but I copied this in and just changed the state id part and it did seem to apply the status but just in case, did I have to edit the shuffle[0] bit and the <= rand 0.4 bit too or no? As it turned out, it applied the state too often (standing on the tile is almost guarenteed to give it to someone it seems) so I'll need to lower the chances somehow (probably 0.4 numbers have to be changed but not sure what to?).How about script call?
Code:$game_party.battle_members.shuffle[0].add_state(id) if rand <= 0.4
Also how would I make it also display the animation on the player and the text saying who was inflicted? I THINK if these two things are possible then I can use this script for sure in place of all my stupid variables and conditional branches, lol. -
You lower the rand < 0.4 if you think it's too often. The method 'rand' rolls number from 0.0 to 1.0 (while it never reaches either 0.0 or 1.0). Or you manually roll using conditional branch like you do. Because of your next question.
Figures you might want to ask this. In that case, the script call need to be modified a bit.Also how would I make it also display the animation on the player and the text saying who was inflicted? I THINK if these two things are possible then I can use this script for sure in place of all my stupid variables and conditional branches, lol.
Code:By using this, you can use \v[n] and it will display the battle member's name that got inflicted with the state.m = $game_party.battle_members.shuffle[0] m.add_state(id) # <-- change state id here $game_variables[id] = m.name # <-- store name in variable. Decide the ID
As for playing animation. Can you just use default play animation on event? -
That causes the animation and text box to display everytime I step on the tile even if the state wasn't actually applied.By using this, you can use \v[n] and it will display the battle member's name that got inflicted with the state.
As for playing animation. Can you just use default play animation on event? -
This is why I said "use manual roll using variable like you do".That causes the animation and text box to display everytime I step on the tile even if the state wasn't actually applied.
The eventing will look like this
> Control Variable: Chance (random 1-10)
> Conditional Branch if Chance < 4
> Do the stuff using my script call, display text, and animation
> end -
*facepalm* I'm so sorry. I'm derping like crazy today. Can't even read properly apparently. I should probably take a break.This is why I said "use manual roll using variable like you do".
The eventing will look like this
> Control Variable: Chance (random 1-10)
> Conditional Branch if Chance < 4
> Do the stuff using my script call, display text, and animation
> end
Thank you so much though, and for your patience in spite of my idiocy. It worked perfectly after applying it to my manual roll. Fingers crossed that should be the end of it :)