MZ Talk To or Remove Actor (permanently) from Party Menu

Hi everyone,

I've been looking (rather unsuccessfully :|) for a Party/Formation menu plugin(s) with these 2 features:

1) Selecting a party member in the Formation Menu and having the option to talk to them (basically calling a Common Event depending on the Actor ID). There are similar plugins like KC_FollowerTalk but they work exclusively for followers on the map screen, not by interacting with them in the menu.

2) The ability to remove an Actor permanently from the party. There are similar plugins but the "Remove" command only transfers party members to a reserve list instead of deleting them.

Does anyone know if there is a plugin (or a combination of more) allowing me to do so?
If not, would it be hard to script? I have (very) limited knowledge with Javascript but wouldn't mind making my own with a few pointers to get started.

That said, could there maybe be a better method to achieve this?

Thank you in advance and I hope I wasn't to cryptic with my questions! 🙂


​

You would basically have to edit the select actor function's menu to add those two options. Theoretically not that hard but would require an intermediate level of Javascript knowledge. I don't know of an existing plugin for that.

You may be able to do it with a custom menu plugin like this but it's in Japanese and has a lot of parameters that need to be set so I don't know if that would be any easier

Thank you, for the reply! I understand that my question is probably a little niche...
you partially misunderstood the formation menu.
it was never it's purpose to remove actors, not even the plugin variants, because the way to remove an actor is the event command "change member" (of party).

simply remove the actor with that command and never add the actor again (which is something you as the developer has control over).

so you basically only need an option to call that command from your new menu.

But same as the other poster, I don't know of any plugin that does that.
you partially misunderstood the formation menu.
it was never it's purpose to remove actors, not even the plugin variants, because the way to remove an actor is the event command "change member" (of party).

simply remove the actor with that command and never add the actor again (which is something you as the developer has control over).

so you basically only need an option to call that command from your new menu.

But same as the other poster, I don't know of any plugin that does that.

Hi, I'm aware of the command and that the vanilla Party menu is only for changing formation but was hoping for something that included those options in it.
Maybe this'll help~
Spoiler: plugin code
JavaScript:
/*:
 * @target MZ
 * @plugindesc New pause menu command: stores actor ID in variable, then calls event.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/167040/
 * @help Edit the code to modify the variable ID and/or common event ID.
 *
 * Free to use and/or modify for any project, no credit required.
 */
;void (() => {
'use strict';

    /** ID of game variable to set via new pause menu command. */
    const VAR_ID = 1;

    /** ID of common event to call via new pause menu command. */
    const EVENT_ID = 1;

    /** Internal symbol for new pause menu command. */
    const KEY = "talk";

    /** Display text for new pause menu command. */
    const TXT = "Talk";

    /** @abstract @returns {boolean} `true` iff this actor is a valid "talk" target. */
    Game_Actor.prototype.isTalkOk = function() {
        return true;
    };

    /** @returns {boolean} `true` iff the talk command should be enabled. */
    Window_MenuCommand.prototype.isTalkOk = function() {
        const L = $gameParty.leader();
        return $gameParty.members().some(
            actor => actor.isTalkOk()
        );
    };

    /** Sets talk mode. */
    Window_MenuStatus.prototype.setTalkMode = function(value) {
        if (this._talkMode = !!value)
            this._formationMode = false;
    };

    /** @returns {boolean} current talk mode. */
    Window_MenuStatus.prototype.talkMode = function() {
        return this._talkMode;
    };

    /** Response for choosing the "talk" command. */
    Scene_Menu.prototype.commandTalk = function() {
        this._statusWindow.setTalkMode(true);
        this._statusWindow.selectLast();
        this._statusWindow.activate();
        this._statusWindow.setHandler("ok", this.onTalkOk.bind(this));
        this._statusWindow.setHandler("cancel", this.onTalkCancel.bind(this));
    };

    /** Response for an actor being selected for talk command. */
    Scene_Menu.prototype.onTalkOk = function() {
        const w  = this._statusWindow;
        const id = w.actor(w.index()).actorId();
        $gameVariables.setValue(VAR_ID, id);
        $gameTemp.reserveCommonEvent(EVENT_ID);
        SceneManager.pop();
    };

    /** Response for cancelling actor selection for talk command. */
    Scene_Menu.prototype.onTalkCancel = function() {
        this._statusWindow.deselect();
        this._commandWindow.activate();
    };

    // Patch - add new pause menu command.
    void (alias => {
        Window_MenuCommand.prototype.addOriginalCommands = function() {
            alias.apply(this, arguments);
            this.addCommand(TXT, KEY, this.isTalkOk());
        };
    })(Window_MenuCommand.prototype.addOriginalCommands);

    // Patch - disable selection on unresponsive actors.
    void (alias => {
        Window_MenuStatus.prototype.isCurrentItemEnabled = function() {
            if (this.talkMode())
                return this.actor(this.index()).isTalkOk();
            return alias.apply(this, arguments);
        };
    })(Window_MenuStatus.prototype.isCurrentItemEnabled);

    // Patch - talk and formation mode are mutually-exclusive.
    void (alias => {
        Window_MenuStatus.prototype.setFormationMode = function(value) {
            alias.apply(this, arguments);
            if (value)
                this._talkMode = false;
        };
    })(Window_MenuStatus.prototype.setFormationMode);

    // Patch - bind response to new command.
    void (alias => {
        Scene_Menu.prototype.createCommandWindow = function() {
            alias.apply(this, arguments);
            this._commandWindow.setHandler(KEY, this.commandTalk.bind(this));
        };
    })(Scene_Menu.prototype.createCommandWindow);

})();
Maybe this'll help~

Hi @caethyril !

This is extremely kind, thank you so much for making this 🙂 I will test it as soon as I can!

Also, thank you AquaEcho and Andar for your help.

EDIT:

This worked like a charm! Once again I appreciate you making this, you saved my project once again with your plugins 😀

I don't wish to impose but I'd like to also save the selected Actor's name, face and character sprite to a variable; this is due to the nature of my project having many actors. It would make the dialogue easier if I could just use variables instead of typing manually every time a dialogue is initiated.

I reckon I could do it myself, by adding the "set variable" lines at Scene_Menu.prototype.onTalkOk = function()but I might be mistaken.

EDIT #2:

I added the lines as such:

Code:
Scene_Menu.prototype.onTalkOk = function() {
        const w  = this._statusWindow;
        const id = w.actor(w.index()).actorId();
        $gameVariables.setValue(VAR_ID, id);
        //Added lines
        $gameVariables.setValue(367, $gameActors.actor(id).name());
        $gameVariables.setValue(364, $gameActors.actor(id).faceName());
        $gameVariables.setValue(365, $gameActors.actor(id).characterName());
        //End of added lines
        $gameTemp.reserveCommonEvent(EVENT_ID);
        SceneManager.pop();
    };

And seems to work fine so far, probably not the most elegant solution 😀
Oh dang, this is something I've been looking for as well! For MV, mind you haha. Mainly a way to boot a party member through the menu and to have a little dialogue like "Ok sounds good. You know where to find me." kind of thing.
@wonderjosh3000 - I think the only problem is that MV's Window_MenuStatus doesn't have an actor method like in MZ. So you can try replacing 2 things:
  1. w.actor(w.index()) -> $gameParty.members()[w.index()]
  2. this.actor(this.index()) -> $gameParty.members()[this.index()]

@Goat_Boy11 - well, if you want those variables to have those values, then you'd have to do it in either the plugin code or a script call (e.g. Control Variables -> Script) in the event. Script calls need to be recompiled every time, so your solution is better in that respect. You may want to add a note to the plugin @help section to remind you that you've made that edit, though. 👋

Original thread: https://forums.rpgmakerweb.com/threads/talk-to-or-remove-actor-permanently-from-party-menu.167040/