MV Yanfly ATB - Getting the Party Menu Up at the Beginning of Encounters

Hello All.

As stated in the title, I have recently switched the battle engine of my game to utilize YFs ATB system.

Plugin Link

One thing I am having trouble with is getting the Party Menu, where you choose to fight or attempt to escape, to show up at the start of non-surprise battles.

I have tried the simple answer of making sure it is set in the Battle Core, but that is overwritten in the ATB. If I circumvent that, the battles lock up at the start.

Any help would be appreciated.
I've been banging my head against the wall for two weeks trying to get this figured out!

Thanks in advance for any assistance.
What's the goal? If it's to have access to Escape, why not just add it to the actor command window?
It is to allow the player to escape combat right at the start if they wish aside from surprise attacks. I have a 100% escape so it's meant to be a way to mostly emphasize exploration if the player chooses to.

I don't want it in the actor window because you'd still have to wait a turn before you can escape. (The party menu can be pulled up on any actor's turn without issue)
It is to allow the player to escape combat right at the start if they wish aside from surprise attacks. I have a 100% escape so it's meant to be a way to mostly emphasize exploration if the player chooses to.

I don't want it in the actor window because you'd still have to wait a turn before you can escape. (The party menu can be pulled up on any actor's turn without issue)
By default, the escape command is a command that uses an actor's turn, so you can only have this choice if at least one of your actors starts with 100% of his ATB (which is feasible, but unbalances the combat if you decide to finally attack).

Reading your problem, I think the simplest solution would be to trigger a common event at turn 0 that gives you a choice: "fight or flee". If you choose to flee, you force the group to flee and end the fight.

If you don't want to go to the trouble of putting this event on all the troops, yanfly has created a plugin that lets you create a basic troop whose events will be triggered in all the troops you want.
By default, the escape command is a command that uses an actor's turn
The whole point of the thread was to restore the party command window, which is the actual default method in MV 😛

I think the simplest solution would be to trigger a common event at turn 0 that gives you a choice: "fight or flee".
That's a solid idea.

If I circumvent that, the battles lock up at the start.
I assume you mean you've tried removing the return statement on line 2490?
The whole point of the thread was to restore the party command window, which is the actual default method in MV 😛
I totally agree but I try to stay open to other possibilities.
When I read the OP, he says “my objective is to display this precise window at the start of the fight”, I understand that his final objective is “I want my player to be able to escape from the start of the fight if he wishes”.
So I try to help by proposing simpler solutions that get around the original problem, while achieving similar results.
(ok, it's also because I want to help but I don't have the JS level :kaomad2: )
By default, the escape command is a command that uses an actor's turn, so you can only have this choice if at least one of your actors starts with 100% of his ATB (which is feasible, but unbalances the combat if you decide to finally attack).
Not trying to do that. It would need to be at the very start before the ATB kicks in anyway.
Reading your problem, I think the simplest solution would be to trigger a common event at turn 0 that gives you a choice: "fight or flee". If you choose to flee, you force the group to flee and end the fight.
This just might work.
I wanted it to be the same menu that gets pulled up between turns tho, but I'll look into this.
Noted.
The whole point of the thread was to restore the party command window, which is the actual default method in MV 😛
Yes...
I assume you mean you've tried removing the return statement on line 2490?
I did... If I recall, that's what locks the battle up.

I DID get the menu to open with regular battles, but preemptive or Surprise battle lock up after the message pops up.

I'm at work, so can't see the specifics of what I did, sorry.

I totally agree but I try to stay open to other possibilities.
As stated, any help is appreciated.
When I read the OP, he says “my objective is to display this precise window at the start of the fight”, I understand that his final objective is “I want my player to be able to escape from the start of the fight if he wishes”.
So I try to help by proposing simpler solutions that get around the original problem, while achieving similar results.
(ok, it's also because I want to help but I don't have the JS level :kaomad2: )
It's cool. I'm a coder and am still stumped myself.
I totally agree but I try to stay open to other possibilities.
I didn't say anything against "other possibilities" - I explicitly said your troop event was a good idea.

The text you quoted was in reference to you talking about the "default functionality" of Escape, when the actual "default" is, in fact, what he's trying to restore.
I didn't say anything against "other possibilities" - I explicitly said your troop event was a good idea.

The text you quoted was in reference to you talking about the "default functionality" of Escape, when the actual "default" is, in fact, what he's trying to restore.
yes, I understood correctly and i'm agree with you, and my message was not an attack or anything unpleasant, I was simply explaining why my proposal 🙂
sorry if I misspoke
So update: I got it working.

I had to create a function to call _partyCommandWindow.setup() from BattleManager.startBattle.
Still locks up on surprise attacks, but I inserted a return to exit the function before the crash occurs.
And Preemptive attacks still don't pull up the menu, but since the actors all go right away, it's permissible since they can cancel into it.

VERY dirty fix, but a fix nonetheless...

Thanks for everyone's input.

EDIT: And now turn 0 troop events don't work... Sigh...

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-atb-getting-the-party-menu-up-at-the-beginning-of-encounters.173376/