Hi, everybody. I've been scratching my head over the past few days, exploring functions and stuff, unfortunately I can't complete my skill that summons party members.
What I want to do is have every fight start with Actor #1 in battle, the rest of the party is in the reserve.
To summon the rest of the party, Actor #1 has a skill that serves that purpose. At first it builds a choice menu:
Which brings up every single party member that's not in battle right now. In return, Variable #2 becomes equal to the name of the member the user picked. I do this to end up with a party ID instead:
Now Variable #2 is that actor's party ID. And the next part is where I'm stuck.
I'm trying to swap that actor from its current slot to the previous one, until it's in the 1st reserve slot, and then increase the battle party size to make the summon come in. This involves Yanfly's Party System and the command
Not only does the swapping process (
Thanks in advance.
What I want to do is have every fight start with Actor #1 in battle, the rest of the party is in the reserve.
To summon the rest of the party, Actor #1 has a skill that serves that purpose. At first it builds a choice menu:
JavaScript:
choices = [];
for(ID = 1; ID < $dataActors.length; ID++) {
if(!$gameActors.actor(ID).isBattleMember() && $gameParty.allMembers().contains($gameActors.actor(ID))) {
choices.push($gameActors.actor(ID).name());
}
}
$gameMessage.setChoices(choices, -1, -1);
$gameMessage.setChoicePositionType(1);
$gameMessage.setChoiceCallback(function(n){
$gameVariables.setValue(2, choices[n]);
}.bind(this));
this.setWaitMode('message');
JavaScript:
for(ID = 1; ID < $dataActors.length; ID++) {
if($gameVariables.value(2) == $gameActors.actor(ID).name()) {
$gameVariables.setValue(2, $gameActors.actor(ID));
}
}
actor = $gameVariables.value(2);
$gameVariables.setValue(2, $gameParty.allMembers().indexOf(actor));
console.log(actor);
console.log("Party ID of this actor: " + $gameVariables.value(2));
I'm trying to swap that actor from its current slot to the previous one, until it's in the 1st reserve slot, and then increase the battle party size to make the summon come in. This involves Yanfly's Party System and the command
$gameParty.changeBattleMax($gameParty.maxBattleMembers() + 1).Not only does the swapping process (
$gameParty.swapOrder($gameVariables.value(2), $gameVariables.value(2) - 1);) fail, but the party size increase results in the actor only appearing in the menu and never in the sideview. Can somebody help me with finishing up this mechanic? It's the very core of my current project. I already did the basic checks, plugin order and a ton of console.log() commands.Thanks in advance.