Not really, they require some proficiency in JavaScript to be able to read and follow through how everything works.
What you're asking isn't terribly difficult, but it's a bit tedious because someone will have to make sure they're setting all of the properties appropriately and do testing on it. It's not something someone will whip up in two minutes and drop into this thread for you.
Did you look at the Party Manager plugin I mentioned before? It has a dedicated interface without any superfluous commands that you can call at any time via plugin command.
Aside from that, you can work on the rest of the game and have time to either learn JavaScript if you like, or save up some cash as an incentive.
Well, my question was prompted more by a desire of not reinventing the wheel combined with my innate laziness...
I wrote the custom scene, it was boring but quite easy once I made peace with the idea of doing it myself (not really two minutes, but not more than fifteen). The journey is perhaps as important as the destination, so here's what I did, following the hints I got from you:
- I went to the code for Scene_Menu in rpg_scenes.js (in my version of RPG Maker, it's line 959);
- Copied everything about the scene in the custom plugin I use for my game;
- Renamed every instance of Scene_Menu in the code in Scene_Formation;
- Edited the
create method of the class leaving only the line
this.createStatusWindow();
- Edited the
start method by appending the lines that can be found in the method
commandFormation and further edited the last two lines;
- Edited the
else branch of the
OnFormationCancel method so as to contain only the instruction
this.Popscene() in order to quit the scene cleanly
;
- Deleted everything having nothing to do with the above.
For anybdody else in who might be interested in the same function, I attach the final code I came up with below.
Disclaimer: the code is provided "as is", no warranties. I did test it in my game and with the console and as far as I can tell it works as it should. Maybe there are more elegant ways of achieving the same result and I cannot exclude that some spurious code is still there. If anybody finds anything wrong or make improvements that they want to share that'd be great.
It's a quick edit of stock code so it should be compatible with most other plugins/customisations, for the same reason I don't dream of asking any acknowledgement or pose any restriction as to how anyone might want to use it.
JavaScript:
// Custom Scene Formation. It replicates the functionality of the command
// "Formation" on the game screen. Invoke with script command:
// SceneManager(Scene_Formation);
function Scene_Formation() {
this.initialize.apply(this, arguments);
};
Scene_Formation.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Formation.prototype.constructor = Scene_Formation;
Scene_Formation.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_Formation.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.createStatusWindow();
};
Scene_Formation.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
this._statusWindow.refresh();
this._statusWindow.setFormationMode(true);
this._statusWindow.selectLast();
this._statusWindow.activate();
this._statusWindow.setHandler('ok', this.onFormationOk.bind(this));
this._statusWindow.setHandler('cancel', this.onFormationCancel.bind(this));
};
Scene_Formation.prototype.createStatusWindow = function() {
this._statusWindow = new Window_MenuStatus(0, 0);
this._statusWindow.reserveFaceImages();
this.addWindow(this._statusWindow);
};
Scene_Formation.prototype.onFormationOk = function() {
var index = this._statusWindow.index();
var actor = $gameParty.members()[index];
var pendingIndex = this._statusWindow.pendingIndex();
if (pendingIndex >= 0) {
$gameParty.swapOrder(index, pendingIndex);
this._statusWindow.setPendingIndex(-1);
this._statusWindow.redrawItem(index);
} else {
this._statusWindow.setPendingIndex(index);
}
this._statusWindow.activate();
};
Scene_Formation.prototype.onFormationCancel = function() {
if (this._statusWindow.pendingIndex() >= 0) {
this._statusWindow.setPendingIndex(-1);
this._statusWindow.activate();
} else {
this.popScene();
}
};