Ok guys, after hours and hours of programming, I finally find a solution to create a Party Skill !
The requierements to this plugin :
- the Hime's ActorBattleCommand plugin :
http://himeworks.com/2015/12/actor-battle-commands/
- A skill type for the party skill (or several skill type, but you need to have at least 1 skill type)
- A class same as your 1st actor, but replace his skill type by your party skill type
(sorry for people who use different 1st actor during the game, I have apply my code for my own game, but try to edit my code, it's fine !)
I put my code in the Yanfly's Party Limit Gauge plugin, before the end of file. I don't know how to create a separate plugin, but it work !
Code:
Window_PartyCommand.prototype.makeCommandList = function() {
this.addCommand(TextManager.fight, 'fight');
this.addCommand('Spécial','special');
this.addCommand(TextManager.escape, 'escape', BattleManager.canEscape());
};
Scene_Battle.prototype.createPartyCommandWindow = function() {
$gameActors.actor(1).setBattleCommandVisible(true, 'attack');
$gameActors.actor(1).setBattleCommandVisible(true, 'guard');
$gameActors.actor(1).setBattleCommandVisible(true, 'item');
this._partyCommandWindow = new Window_PartyCommand();
this._partyCommandWindow.setHandler('fight', this.commandFight.bind(this));
this._partyCommandWindow.setHandler('special', this.commandSpecial.bind(this));
this._partyCommandWindow.setHandler('escape', this.commandEscape.bind(this));
this._partyCommandWindow.deselect();
this.addWindow(this._partyCommandWindow);
};
Scene_Battle.prototype.commandSpecial = function() {
$gameActors.actor(1).changeClass(8, true);
$gameActors.actor(1).setBattleCommandVisible(false, 'attack');
$gameActors.actor(1).setBattleCommandVisible(false, 'guard');
$gameActors.actor(1).setBattleCommandVisible(false, 'item');
this.selectNextCommand();
};
Scene_Battle.prototype.startActorCommandSelection = function() {
this._statusWindow.select(BattleManager.actor().index());
this._partyCommandWindow.close();
if($gameActors.actor(1).isClass($dataClasses[8]) && BattleManager.actor().index() == 1){
$gameActors.actor(1).changeClass(1, true);
this.endCommandSelection();
BattleManager.startTurn();
$gameActors.actor(2).clearActions();
$gameActors.actor(3).clearActions();
$gameActors.actor(4).clearActions();
}else{
this._actorCommandWindow.setup(BattleManager.actor());
}
};
Scene_Battle.prototype.changeInputWindow = function() {
if (BattleManager.isInputting()) {
if (BattleManager.actor()) {
this.startActorCommandSelection();
} else {
$gameActors.actor(1).changeClass(1, true);
this.startPartyCommandSelection();
}
} else {
this.endCommandSelection();
}
};
Well, no credits and legal use because is a kind of Hime's ActorBattleCommand extension.
Result in game :
I hope I can help people who want to do the same thing !