MV So how can i make a specific follower hidden?

Hi, so is there a pluggin that i can hide a specific follower by character?
Like for example, there are three character, suzie, tom and matt, i want to know how can i make matt hidden in the map regardless of his position in the party?
edit: i forgot to mention that i wanted to do this temporally in a event.
Untested, but this should do it:
Code:
Game_Followers.prototype.initialize = function() {
    this._visible = $dataSystem.optFollowers;
    this._gathering = false;
    this._data = [];
    for (var i = 1; i < $gameParty.maxBattleMembers(); i++) {
        if (!$gameParty.members()[i].actor().meta.hidefollow)
            this._data.push(new Game_Follower(i));
    }
};

You'd put the notetag <hidefollow> in the notes of any actor you don't want to show up.
I have moved this thread from RPG Maker MV Resources to JS Plugin Requests.
Untested, but this should do it:
Code:
Game_Followers.prototype.initialize = function() {
    this._visible = $dataSystem.optFollowers;
    this._gathering = false;
    this._data = [];
    for (var i = 1; i < $gameParty.maxBattleMembers(); i++) {
        if (!$gameParty.members()[i].actor().meta.hidefollow)
            this._data.push(new Game_Follower(i));
    }
};

You'd put the notetag <hidefollow> in the notes of any actor you don't want to show up.
thanks for trying to help, but i forgot to say i wanted to do that in a event where i can unable and enable it.
Code:
Game_Followers.prototype.initialize = function() {
    this._visible = $dataSystem.optFollowers;
    this._gathering = false;
    this._data = [];
    for (var i = 1; i < $gameParty.maxBattleMembers(); i++) {
        if (!$gameParty.members()[i].hidefollow)
            this._data.push(new Game_Follower(i));
    }
};

Now you'd set the hidefollow property on the actor using a Script event command. For example
Code:
$gameActors.actor(69).hidefollow = true
will set it true on actor ID 69. Setting it false turns it back off.

Note that you would want to do this at a time that followers don't exist - after a transfer, or after followers have been turned off and are now being turned back on.
thanks!!
Code:
Game_Followers.prototype.initialize = function() {
    this._visible = $dataSystem.optFollowers;
    this._gathering = false;
    this._data = [];
    for (var i = 1; i < $gameParty.maxBattleMembers(); i++) {
        if (!$gameParty.members()[i].hidefollow)
            this._data.push(new Game_Follower(i));
    }
};

Now you'd set the hidefollow property on the actor using a Script event command. For example
Code:
$gameActors.actor(69).hidefollow = true
will set it true on actor ID 69. Setting it false turns it back off.

Note that you would want to do this at a time that followers don't exist - after a transfer, or after followers have been turned off and are now being turned back on.
Untested, but this should do it:
Code:
Game_Followers.prototype.initialize = function() {
    this._visible = $dataSystem.optFollowers;
    this._gathering = false;
    this._data = [];
    for (var i = 1; i < $gameParty.maxBattleMembers(); i++) {
        if (!$gameParty.members()[i].actor().meta.hidefollow)
            this._data.push(new Game_Follower(i));
    }
};

You'd put the notetag <hidefollow> in the notes of any actor you don't want to show up.
Greetings!
I wanted to ask you for a little help to make this mini plugin work, because I get the error screen "Cannot read property 'actor' of undefined".
To understand if it was conflicting with other things, I tried it in a new project where I only put your plugin, but "Cannot read property 'actor' of undefined" remained.
I tried putting the condition if($gameParty.members()) before your condition, making the error stop, but in this case it does not enter any character beyond the first even if the <hidefollow> condition is on him.I understand that months have passed, but will you have the patience to help me?
Thank you in advance for your time.
I wanted to ask you for a little help to make this mini plugin work, because I get the error screen "Cannot read property 'actor' of undefined".
You'll have to provide more information than that, since the code I pasted there does not reference an actor property of any object.

Specifically, when you get a crash with an error, press F8, go to the Console tab, and provide a screenshot of that window.

That said, I gave the code a test and it doesn't work quite right - I'm not sure why the OP just said "thank you" and never reported the problems.

I didn't realize that the follower array only gets made once at the beginning of the game, so this method won't work.

Use this instead:
Code:
Game_Follower.prototype.actor = function()
{
    let index = this._memberIndex;
    for (let i = 0; i <= this._memberIndex; i++)
        if ($gameParty.battleMembers()[i] && $gameParty.battleMembers()[i].hidefollow)
            index++;
    return $gameParty.battleMembers()[index];
};

Then you would use the script call
Code:
$gameActors.actor(42).hidefollow = true;
$gamePlayer._followers.refresh();

to hide actor ID 42 from the followers.
You'll have to provide more information than that, since the code I pasted there does not reference an actor property of any object.

Specifically, when you get a crash with an error, press F8, go to the Console tab, and provide a screenshot of that window.

That said, I gave the code a test and it doesn't work quite right - I'm not sure why the OP just said "thank you" and never reported the problems.

I didn't realize that the follower array only gets made once at the beginning of the game, so this method won't work.

Use this instead:
Code:
Game_Follower.prototype.actor = function()
{
    let index = this._memberIndex;
    for (let i = 0; i < this._memberIndex; i++)
        if ($gameParty.battleMembers()[i].hidefollow)
            index++;
    console.log("Returning index ", index);
    return $gameParty.battleMembers()[index];
};

Then you would use the script call
Code:
$gameActors.actor(42).hidefollow = true;
$gamePlayer._followers.refresh();

to hide actor ID 42 from the followers.
Seriously, thanks for answering me!
I immediately tried the plugin: the plugin works, but with wrong indexing. Let me explain.
I set to hide the first actor, but it hides the second; if I set the second, it hides the third and so on. But if I set the zero actor, obviously it gives me an error.
I tried to put my hands on it, but the best I could do was hide the number with the position, but the first and second position both hide the second character.
I'm not expert enough to understand the problem.
I immediately tried the plugin: the plugin works, but with wrong indexing.
Yes - I fixed a typo in the code above. Paste that over what you had, it should work correctly.
Thanks again for your help.

When trying with parties that were not completely filled, it gave me an error, so I added if($gameParty.battleMembers())before the next condition in case the party is not completely filled.

The problem of hiding the first actor still exists, so I thought "amen! I'll just have to not hide the first actor".
So to test, I set the 4th actor to be hidden (so far so good) and changed the formation so that the 4th member of the party (which was the 4th actor) becomes the leader in the first position: the 4th actor in the first position becomes visible, hiding any actor that is in the second position (which should be in the first).
I tried again with all the actors and they all give the same problem: if a hidden actor is placed in the first position, it becomes visible hiding the actor in the second position (which should be in the first).
When trying with parties that were not completely filled, it gave me an error, so I added if($gameParty.battleMembers())before the next condition in case the party is not completely filled.
That doesn't mean anything about the party being completely filled or not, that will always be true. And I provided instructions to you above about what to do when you get errors - just saying you got one doesn't help anyone to fix it.

The problem of hiding the first actor still exists
I don't understand what you're saying here. I tested hiding the first follower specifically, and it works fine.

Are you trying to hide the party leader? That, by definition, is not a follower, and there are already plugins to do that.


Nothing in this thread will have anything to do with that because the player sprite is handled entirely separately from any followers.
That doesn't mean anything about the party being completely filled or not, that will always be true. And I provided instructions to you above about what to do when you get errors - just saying you got one doesn't help anyone to fix it.
My apologies I'm still a newbie and I'll show you the error right away! Look at "Error.png".
Are you trying to hide the party leader? That, by definition, is not a follower, and there are already plugins to do that.
Yes, my intention was to hide the actor regardless of his position in the party.
I apologize again, you made me understand two important things, plus sending me on the right path to a solution: I will use your plugin, simply via events I will change the hidden actor sprite when needed so that it appears as the character that is in the second position.
Thank you very much! Grazie mille!
I wish you a good day!
I'll show you the error right away! Look at "Error.png".
I added a check into the code above that prevents that error when starting with a not-full party.

Original thread: https://forums.rpgmakerweb.com/threads/so-how-can-i-make-a-specific-follower-hidden.164936/