How do I add certain overworld effects depending on the party leader?

As a reminder (and also to clarify the terms I use), RPG Maker MV allows the player to change the formation of the party, with the top actor being the "leader". I was wondering (and hoping) that there was a way to add certain "perks" to having different leaders. For example, one leader could decrease the rate of encounters, another could increase movement speed, etc. Basically I want to encourage players to swap party leaders for reasons beyond just what order they attack in battle. However, I can't find any guides on how to do this, and the closest I can find is how to have certain effects if the actor is in the party, which doesn't work as my game only has 4 actors (I intend to introduce them in different quarters of the game, so even though there's a small number of actors, you don't just have a full party by the first boss)

It might be that this would only be possible with a plugin, but if that's the case please confirm so I at least know what I should focus my attention to
The examples you give (higher encounter and/or speed) are not included to this, but if you use the AdvancedSwVar plugin by Yanfly, you can have 1 variable always be the party leaders actor ID. So when actor 1 is party leader, that var would be set to 1, for actor 2 it would be set to 2, and so on.

This might not change the encounter rate or the walking speed, but it can affect each and every even on the map. If you use this variable smart in conditions and conditional brances, you can have for example:
  • Have NPC's ignore you when actor 1 is party leader.
  • Have guards attack when actor 2 is party leader.
  • Make locked doors and chests have 20% to be open when actor 3 is party leader.
  • Have girls run the other way when actor 4 is party leader.
  • Make certain NPC's give random gifts when actor 5 is party leader.
Etc etc.
Hi there!

Well, theoretically, you can just use one variable and a conditional branch to check the current ID of the party leader and apply a different action according to that ID number:
1656021306631.png

That way, you can use this in a parallel event, but the event will only be executed when you have a different party leader.
If you do not have many actors, it's fine with this method.
Otherwise, you can use my plugin to help you with that:

You can do specific stuff, or just turns on/off a switch. Play common events or run script calls.

You will also need my Core Plugin:
if youre interested, heres how i made actors in a 4 member party swap places in the field using the pages up and down keys.

and by the end, i just made events check for the leaders variable to see who they were and apply cases.

btw, note that the game always freezes a little (for me, at least) when touching a tile with a event like that. so, for example, like in final fantasy 5, if youre checking to see if the leader has is a thief with ability to discover hidden passages while passing near them, the player will be hinted that that tile has something.

EDIT: and, of course, have a plugin like yanflys common event (i think this is the one) which allows you to call common events after doing certain actions. make so that after closing the menu, the game performs the check to see whos the leader and store it in your leaders id variable.
Hi there!

Well, theoretically, you can just use one variable and a conditional branch to check the current ID of the party leader and apply a different action according to that ID number:
View attachment 230398
That way, you can use this in a parallel event, but the event will only be executed when you have a different party leader.
Good solution, although I am not a fan of parallel events. That would work kinda like the plugin by yanfly I mentioned, but with the plugin, you can put the value of that variable in a condition of the event pages, making the event look different or follow a different move route, without interacting with it first.

If the above screenshot is a parallel event, it might work better if you put an "erase event" command at the end, or else it will repeat over and over. Downside to that is that it wouldn't change events if the player is already on the map when changing the formation.

All with all I think it is a good solution if the OP doesn't have the yanfly plugin.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-add-certain-overworld-effects-depending-on-the-party-leader.148827/