Ro-Jo

Warper
Member
Joined
Jan 2, 2019
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm rather new with javascript, having only worked with it on this engine. I'm trying to add the ability to change your formation in battle, exactly like you would outside of battle. I've got to the point where "Formation" is a select-able option in battle, but I can't figure out how RM:MV creates the window/scene. I was hoping it would be defined under a single function call, but I can't seem to find anything like that.

I know that yanfly has a plugin that can do this, but I'd prefer to use the default formation switching as I find their party interface kinda clunky.

Any help would be appreciated.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
649
Reaction score
362
First Language
English
Primarily Uses
RMMV
I think the formation command just makes use of the Window_MenuStatus that's drawn as part of Scene_Menu. It even has a couple formation methods (formationMode and setFormationMode).

Looks like, when Scene_Menu draws the commandWindow, it creates a handler for the formation command through Scene_Menu.prototype.commandFormation, which is a collection of methods called on the Window_MenuStatus instance stored on the Scene's _statusWindow property.

The okHandler for formation looks to ultimately call $gameParty.swapOrder, where you pass in the two indexes of the party members you want to swap. If I open up the main menu and do:
Code:
$gameParty.swapOrder(0, 2);
SceneManager._scene._statusWindow.refresh();
It appropriately swaps party members around. I tried the same two lines in battle and it works, too, even swapping the sideview Sprites.
 

Ro-Jo

Warper
Member
Joined
Jan 2, 2019
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hey thanks for the info; I'll take a look at that and see what I can come up with.
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm working on a modding system of my game and I screw the game up, so hard that I have to access my backup in my hard drive ;-;
Stop shutting the damn power down! Why always like this
Working on a slightly experimental horror game. It will be finished in approximately 88888888888 years.
Y'all will enjoy it though, I put lots of effort into making it stand out.

It's called Red Light and it's inspired by another obscure RPG Maker horror game, but I don't want to give too much away just yet.
Ohh man, Weapon animations plugin feels so mandatory. Seeing that same image regardless of the icon of the weapon....ugh :p
Ok so......Maaaaybe I've taken a ''little'' bit of inspiration from FF9 when it comes to battle hud xD

ff9.PNG

Just maybe....

Forum statistics

Threads
112,359
Messages
1,067,726
Members
146,004
Latest member
Faxify
Top