Force display Actor X in certain situations

Hello dear scripters, 

I would like to request a script to force display Actor 1 from the Database when: 

  • certain switches are activated
  • certain maps are entered, declared by map notetag

Why do I want this:

My game consists of 11 playable Actors, each of them have different skill-sets and combat capabilities. I want to allow the players to maximize their strategy in team-building when facing certain enemies. Thus, by utilizing Yanfly's Party System, the player are able to setup a party consisting Actors that fit to their desired strategy.

However, this can cause awkwardness when the player encountered cutscene events or town NPC's dialogues that are already tailored as if the party leader is Actor 1, the main protagonist. 

Solution that I wanted:

Say, the player has assigned Actor 2, 4, 5, 7 as his Battle Party. I want the four actors are displayed in Caterpillar formation when exploring dungeons. 

Then, the player enters a map, tagged as town. This change the displayed controllable character as Actor 1, turning off Caterpillar. He opened the menu here to check his inventory, and the displayed Formation are still 2, 4, 5, 7. He can change formation here if he want; however, Actor 1 are still gonna be shown alone during town exploration. 

Exiting the town and back to the dungeons; the displayed sprites revert back to the Battle Party, aka Actor 2, 4, 5, 7. 

That's all I wanted. If any scripter are willing to help me, that would be very appreciated and of course I will credit you in my game. Thank you very much  😀

P.S.: What I want is similar to how explorations work in FFXII. When entering town, Vaan is the only one displayed on-screen; exiting the town and entering dungeons, it reverts back to the 3 assigned combat members that may or may not include Vaan. I'm still scourging YouTube to find what I want and will include in the post once I found it ^^

P.S.II: A-Ha! Found it. Video here. At 1:54 and before that, Vaan is shown alone in the encampment (areas with NPC); but when he passes the transfer point into the enemies field, it switched Party Leadership to Ashe (and Vaan happens to be one of the sub).
One way of doing this would be with events.

On your transfer event into town, get actor IDs of the active party into variables.

Remove them all and add player one

That way only player one will show up in the menu.

On leaving the town, in the transfer event

Remove player one

Use the variables to put the same characters back in the same order.
I actually want to keep all party members in position, even during town; it's just the graphic shown walking around is specifically Actor 1. 

With your event solution, the battle party are inaccessible (can't change equips in town for them, Inn doesn't heal the removed party members, for example). 

But thank you for coming up with a suggestion 🙂
With Yanfly's Party script you can change equips, because they are still visible, but greyed out.  I can always access equipment and skills of characters in the reserve party.  Also, unless you have specifically changed the default, reserve members are also healed in the inn.
So team-building inside town is a no-no?
Event enter town.

Switch all characters to image actir one but keep their faces. Disable follow.

Event exit town.

Change character sheets back to their origional sheets and enable follow.
It all depends what you mean by "team building".  Would you like to expand?
Forming and arranging party, I'm sorry if I wasn't being clear. 

deilin's method almost work!

▼ Solo character in "Town" map.

9fgBc4o.png


▼ It still showing the Battle party formation nicely. Thank God I'm using custom bust instead of sprites though; because...

cRXcqLQ.png


▼ Hueeeeee q_q

8WD64pG.png


▼ I'm also using Yanfly's Save Engine. Showing the flaw of the method. This can be easily remedied though by disabling Save from Menu, making Save Point by event and adding sprites readjustment before and after Save scene is called. 

vcFngxr.png
Disable saves in town 😛

Or have save only available in town via event, and have the images change back to origional before opening the save menu, and change them back to actor 1 image after.

Been playing with some script calls, and I noticed that the $game_party.members IDs ($data_actors) are saved as 8 digit hexidecimal. If actor X hexisecimal is the same across all games, I can probably write a snippit for it.
Yeah I guess evented Save Point is not a bad idea after all. 

Anyway, what do you mean by hexadecimal?

The protagonist is literally Actor 001, the first and foremost actor on the game database, Actors tab. It won't change from the beginning till the end so I guess it's okay if you snippet want to hardcode that to specifically Actor 001. 

Thank you very much in advance 😀
Hexi decimal is a type of coding that contains 16 characters (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F)

0 = 0

F = 15

FF = 255 (why pok-è-mon silver an gold stopped at 251, they didn't want to have to goto a second line of code for pok-è-mon IDs or 9 character coding)

Usually a line of characters is 8 characters (12345678)

The 3rd and 4th characters are usually the variable.

Computers often use Hexi decimal to identify colors.

FF0000 = Red

00FF00 = Green

0000FF = Blue

FFFF00 = Yellow

RPG maker uses it to identify your window color for your menus, though expanded from (0~255) to (-255 ~ 255)
So what I must do for you to be able to write a snippet for it? Not changing the actor name or skills?

Original thread: https://forums.rpgmakerweb.com/threads/force-display-actor-x-in-certain-situations.44178/