In RPG Maker, you have something called “actors” which are the characters that the player controls.
All actors are grouped into a “unit” called a “party”. Actors can be added or removed from parties at anytime during the game. You can potentially have multiple parties in your game, depending on how your project is set up.
Each party has a leader. The leader is the actor that will be displayed while you’re traveling on the map. By default, the leader is the actor that is in the first position of the party. So for example if you switched the positions of the first and second members of the party, the leader will change.
Similar to actors, enemies are also grouped into their own unit called a “troop”. Enemy troops by default do not have a leader.
Now, what happens if you wanted the party leader to be someone other than the first person in the party? Maybe you want the leader to be a specific actor, but that actor doesn’t participate in battle.
Or perhaps you wanted enemy troops to have a leader, and make it so that when the leader dies, the enemies will scatter and run away?
With this plugin, you can set up who will be the leaders of parties and troops, and build additional plugins on top of it that allow you to use these leaders to implement new game mechanics.
Plugin: download here (right-click, save as)
Download ths plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_CustomPartyLeader plugin.
Once it is in your list of plugins, turn the plugin on.
When your party is first set up when you start a new game, it assumes the leader is the actor in the first position of the party.
Similarly, when the enemy troop is set up, the first enemy will be selected as the leader.
It is intended that you will change the leaders through events during the game.
Checking Who is the Leader
You can ask who is the leader in script calls like this:
It is possible that a unit does not have a leader. It will return `null` in that case.
Changing Party Leaders
You can change leaders during the game. To change the party leader, use the following plugin command
change_party_leader to actor ID
Where ID is the Id of the actor you wish to set as the leader. For example, if you wanted to choose actor 4 to be the leader, you can write
change_party_leader to actor 4
The actor does not need to be in the party.
Changing Enemy Troop leaders
Similarly, you can change enemy troop leaders as well. Use the following plugin command
change_troop_leader to enemy MEMBER_ID
Where the MEMBER_ID is the position of a particular enemy in the current troop. This is based on the order that they were added into the troop. If you look at the image above, you’ll see that the second slime is on the right, whereas the third slime is in the middle. This is because I added the blue slime before the gold slime.
For example, to set the third enemy as the leader, you would write
change_troop_leader to enemy 3
Working with Custom Units
If you have other units aside from parties and troops that is added through other plugins, you would need to use script calls to set the leaders.
All units must inherit from Game_Unit, and the leader must inherit from Game_BattlerBase.
Would it be possible to make it to where the first person in the party can’t be removed as leader at all? Since the plugin only changes the graphic of the first party leader, I can still change the formation and the party leader will appear twice. I want to make it to where the party leader can’t be changed AT ALL, because I plan on having over 4 party members but I
don’t want the MC to be able to be removed. Any help on this would be greatly appreciated.
Passion the site– very user pleasant and lots to see!
This may be a silly question, but I cannot seem to find a solution.
What I am essentially trying to do is have a pokemon diamond sort of thing, where the main players walks around, with the actor in the first slot following him too.
I have succeeded in setting the custom leader, all I need is to figure out how to still have a follower.
i think, i found a bug. If try to change the actor picture, mabye for a swimm animation, the change will not happend, if i have saved the game anytime before.
It works, if i start a new game and change picture. But if you save and load the game, then the change is broke. If i turn the script off and load the savegame then it works
i use the battleengine and party system and row formation script from http://yanfly.moe/yep/ and i want to try your script to block the leader in my party as e.g. Trainer like in pokemon but i want that they still stay in the battle (row formation at the least row e.g. 3 or 4) what have i to do? i dont understand what i have to replace with wich… sry for my bad english
This plugin is designed to replace the leader of the party with a different graphic, effectively assuming all party members are followers (and the first follower is just a regular follower).
I don’t know if it can help with what you want to do.
Is there a way to clear the custom party leader to restore the party leader to the first member of the party?
There isn’t an official solution but you can use the script call
I’m trying to use this plugin in my game, but (like Sundricat) I also need a way to restore the party leader to their default. Or, put another way, I need the ability to turn this plugin’s custom leader effect off. The script call is fine for specific instances (e.g. in scripted events), but if the player starts shuffling characters around in the party on their own, it doesn’t have any effect – the leader will still be locked to whoever was in front when the script call was last used.
I realise this plugin is 2 years old now, but I just wanted to ask if there was a way to get around this.
Thank you very much for your time (if you see this)!
So I’m probably missing something here, I need to set a temporary leader for the party which is easy enough however when I want it to return to the default I can’t seem to work out how. Have I missed something or will I have to start using event logic to work out who is the default leader?
For some reason this feature was not implemented. Let me take a look at the plugin.
Thanks, I managed to get a quick and dirty workaround, but using your script would be a lot cleaner if that was available (for now I end up with all the actors showing as 1 image while I need it to show a specific character then telling it to go back again afterwards, which, while great for testing…)
Another thing. If you have no Actors in the party you can’t do crap. I want the leader to not be used as a battler but I want them to use items too.
I will look at a potential solution for this problem. Currently, it is assumed that your first 4 members are part of the battle group, and all of the followers are based on that as well. Changes would need to be made if you were to assume that the first person is not actual a battle member.
How can I make the Leader not participate in battles?
No. This just changes the graphic of the leader.
All this seems to do is change the graphic of the person at the front of the party. Is there a way to make it so the party on the map is the special leader followed by characters number 1, 2, and 3 and then in the party we just see 1 2 and 3? Because right now we see the special leader, then 2 3 and in the menu we see 1 2 and 3.
Well, yes, the purpose is to change the graphic of the party leader, effectively separating it from the first person in the party.
But having the first person as a follower sounds reasonable. Let me look at some solutions.
Awesome script, do you by any chance though have a script that locks the leader in to where he can NOT be removed from the party? Like in Final Fantasy?
Are you using a plugin that allows actors to add/remove party members? By default the only way to do this would be through events.
I don’t plan to use Yanfly’s party plugin since I’m using one Alt Menu Screen 2 with all seven characters on display and it looks so nice imo. I second Nosidag’s request.
What is “Alt Menu Screen 2”? Does it provide a way to remove actors from the party?