Yanfly's Party Script (Formation problem)

I am not sure if this is a script problem or not.

But, I use Yanfly's party script
http://yanfly.moe/2015/11/20/yep-29-party-system/


So I want one actor locked into front position (the first actor you play as), but he leaves the party early in the game and then rejoins the party. Thus I Add the actor back in the party then remove the other actors, and lastly re-add the other actors (I do this only to see if the main actor will go back to the front and thus I can lock him back in place)

To clarify, this is merely a formation problem. I just want the 001 actor (main actor in the game) to always be in front of the party, and locked in place if possible (via the script). The way I am doing it, doesn't seem to be working.

What am I doing wrong?
RGSS3 Scripts is where people post the scripts they made.

I've moved this thread to RGSSx Script Support. Thank you.

I have actually removed that post, as Yanfly does not permit the reposting of his scripts. The link is enough.
RGSSx Script Support? But I thought it's MV plugin ...
@TheoAllen Good catch! It seems the link leads to a plugin, but the script @Rokazulu had reposted was definitely an Ace script. This one actually.
I always happen to post in the wrong forum you'll have to forgive me. But, I'm sure the code isn't needed to figure out a solution.
But, I'm sure the code isn't needed to figure out a solution.
Where did you get this assumption from? There might be a different solution WHETHER if you are using MV or VXA. Maybe it can be dealt with simple workaround, maybe it needs a patch. If you don't know how to code or how code works, stop assuming.

Either way, looked at the first glance I'm kinda disagree about the whole yanfly code on VXA party system. If I'm about to implement lock party member on specific spot (e.g, on front), I'd implement it in different way that will also works with your case (the mc/main character leave the party, then join back and still on 1st slot).

I haven't had time to investigate further on how the code works, but here are some tips you might need to consider to try (or you already tried it?).
> First before the mc leave the party, unlock
> When you're goin to add one, remove all actors except one. Then add the mc (Don't check initialize). Because iirc if you remove all actors at once, it triggers gameover
> Pause there, and see the order looks like first on the menu.
> MC on the second slot? good, continue....
> Remove the last actor you left in there
> MC should be on the first index
> Lock
> Add back all (Don't check initialize)

On which step that is glitched and u said it's not working?
Soulpour777 has a yanfly party swap fix.
https://github.com/Archeia/YEARepo/...xes/SYF - Soulpour Yanfly Party System Fix.rb

You can try that and see if it works for you. You just need to know what positions the actors are in.
I haven't had time to investigate further on how the code works, but here are some tips you might need to consider to try (or you already tried it?).
> First before the mc leave the party, unlock
> When you're goin to add one, remove all actors except one. Then add the mc (Don't check initialize). Because iirc if you remove all actors at once, it triggers gameover
> Pause there, and see the order looks like first on the menu.
> MC on the second slot? good, continue....
> Remove the last actor you left in there
> MC should be on the first index
> Lock
> Add back all (Don't check initialize)

On which step that is glitched and u said it's not working?

I just tried this again in various ways, and no matter what the mc is always placed in the back.

In game I have the mc (actor1) removed so it is just actor 2, then later actor 3 joins (but is strangely placed in front of actor 2...) and later I re-add the mc (actor1) and no matter what, he is placed in the back line in formation. Even after unlocking/locking. I lock him in first position and he remains in back formation with the gold star on him (to indicate he is been locked in).


Soulpour777 has a yanfly party swap fix.
https://github.com/Archeia/YEARepo/blob/master/Script Fixes/SYF - Soulpour Yanfly Party System Fix.rb

You can try that and see if it works for you. You just need to know what positions the actors are in.

How do I use this script? Looks like it could work, I just don't know if I have to call a command or just change a few parameters.
The instructions are in the script. You call a script command.
The instructions are in the script. You call a script command.

The instructions are not clear to me.

Which of those lines has the script command and what parameters do I change (if any)?
Nah, the instruction is actually not in script. But in yanfly's wordpress blog
If you want to use the script call $game_party.swap_order(n,n)
It should swap actor in index specified by n1 and n2. For example
Code:
$game_party.swap_order(1,3)
It will swap actor in index 1 to 3
My mistake, My code for the script has instructions. I didn't look closely enough at the link.
Add this to the header for the instructions
Code:
# Swap Order Fix – If you want to use the script call $game_party.swap_order(n,n)

*ninja'd
The script command brings back an error in Game_Actor line 19 that says 'no implicit conversion from nil to integer.'
what is the command that you put in?
put it here or take a screen shot of it.
what is the command that you put in?
put it here or take a screen shot of it.


$game_party.swap_order(3,1)
Party member indexes start from 0, not from 1.
0 is the 1st party member.
1 is the 2nd party member.
And so on...

I guess, you tried to swap someone with a non-existent party member, hence the error you get.

But you certainly didn't get the error you posted, because line 19 in Game_Actor is just an attr_accessor line... Unless you actually edited the default scripts and/or added another slot named Game_Actor. Or maybe you just wrote the wrong line number.
If you report an error, you must do it right, or else it won't help at all.
Party member indexes start from 0, not from 1.

Yep! I got it working now.

Thanks for the help all.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-party-script-formation-problem.96117/