查看: 3917|回复: 7

[已经过期] 关于mv中自己制定人物人物离队入队问题求教

[复制链接]
梦石
0
星屑
50
在线时间
32 小时
注册时间
2017-9-3
回帖
14
发表于 2017-9-9 09:08:12 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 星辰007 于 2017-9-9 09:11 编辑

问题一:我想问一下,有没有可以让角色离队入队的插件,例如npc:将军,您要谁离开/加入队伍?
然后弹出一个框,里面有在队或离队成员的姓名,根据我的选择让角色离队或入队?
问题二:有关于这方面的教程或插件嘛?
梦石
0
星屑
788
在线时间
109 小时
注册时间
2008-2-10
回帖
199
发表于 2017-9-9 09:42:00 | 显示全部楼层
可以用事件实现的啊

https://rpg.blue/forum.php?mod=v ... &extra=page%3D1  这里也有队伍 系统的相关插件
h
回复

使用道具 举报

梦石
0
星屑
216
在线时间
154 小时
注册时间
2017-2-27
回帖
166

开拓者

发表于 2017-9-9 09:58:59 | 显示全部楼层
事件要做出这样效果非常非常麻烦,插件楼上的那个可以,PartySystem
回复

使用道具 举报

梦石
0
星屑
16261
在线时间
4014 小时
注册时间
2015-9-14
回帖
1322

开拓者

发表于 2017-9-9 12:30:17 | 显示全部楼层
本帖最后由 wabcmcc 于 2017-9-9 12:34 编辑

符合你要求插件:MrTS_PartyManager.js
作者:Mr. Trivel
11.png
youtube

[fold=MrTS_PartyManager.js]//=============================================================================
// MrTS_PartyManager.js
//=============================================================================

/*:
* @plugindesc Allows to check and change your party.
* @author Mr. Trivel
*
* @param In Menu
* @desc Is Party Manager accessible from Menu? True/False
* Default: True
* @default True
*
* @param Command Name
* @desc Party Manager Command Text
* Default: Party
* @default Party
*
* @param Party Text
* @desc Current party text.
* Default: Party
* @default Party
*
* @param Members Text
* @desc Members list text.
* Default: Members
* @default Members
*
* @param Required Text
* @desc Required members text.
* Default: Required:
* @default Required:
*
* @param Draw TP
* @desc Draw TP In Party Manager?
* Default: False
* @default False
*
* @help
* --------------------------------------------------------------------------------
* Terms of Use
* --------------------------------------------------------------------------------
* Don't remove the header or claim that you wrote this plugin.
* Credit Mr. Trivel if using this plugin in your project.
* Free for commercial and non-commercial projects.
* --------------------------------------------------------------------------------
* Version 1.1a
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Plugin Commands
* --------------------------------------------------------------------------------
* PartyManager Open - Opens Party Manager Scene
* PartyManager Require [AMOUNT] - Require a specific amount of members in party
*                               - 0 for any amount
* PartyManager MustUse [ID] - Must use actor of ID in party
* PartyManager MustUseRemove [ID] - Remove needing actor of ID
* PartyManager MustUseClear - Remove all needed actors
*
* PartyManager Add [ID] - Add a member to party manager
* PartyManager Remove [ID] - Remove a member from party manager
*
* PartyMangaer Lock [ID] - Lock a member in party manager (make unselectable)
* PartyManager Unlock [ID] - Unlock member in party manager (make selectable)
*
* PartyManager MenuLock - Disable command in menu (grey out)
* PartyManager MenuUnlock - Enable command in menu
*
* Examples:
* PartyManager Require 3
* PartyManager MustUse 2
* PartyManager MustUseRemove 5
* PartyManager Open
*
* PartyManager MustUseClear
*
* PartyManager Add 7
* PartyManager Remove 8
*
* PartyManager Lock 2
* PartyManager Lock 3
* PartyManager Lock 4
* PartyManager Unlock 5
*
* PartyManager MenuLock
* PartyManager MenuUnlock
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Version History
* --------------------------------------------------------------------------------
* 1.1a- Fixed Lv being out of window in default resolution.
* 1.1 - Fixed disappearing members.
*     - Fixed removing members from party.
* 1.0 - Release
*/

(function() {
        var parameters = PluginManager.parameters('MrTS_PartyManager');
        var paramInMenu = (parameters['In Menu'] || "True").toLowerCase() === "true";
        var paramCommandName = String(parameters['Command Name'] || "Party");
        var paramPartyText = String(parameters['Party Text'] || "Party");
        var paramMembersText = String(parameters['Members Text'] || "Members");
        var paramRequiredText = String(parameters['Required Text'] || "Required:");
        var paramDrawTp = (parameters['Draw TP'] || "False").toLowerCase() === "true";

        //--------------------------------------------------------------------------
        // Game_Interpreter
        //
       
        var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
        Game_Interpreter.prototype.pluginCommand = function(command, args) {
                _Game_Interpreter_pluginCommand.call(this, command, args);
                if (command.toLowerCase() === "partymanager") {
                        switch (args[0].toUpperCase())
                        {
                                case 'OPEN':
                                {
                                        SceneManager.push(Scene_PartyManager);
                                } break;
                                case 'REQUIRE':
                                {
                                        $gameParty.setRequiredPartyMembers(Number(args[1]));
                                } break;
                                case 'MUSTUSE':
                                {
                                        $gameParty.mustUsePartyMember(Number(args[1]));
                                } break;
                                case 'MUSTUSEREMOVE':
                                {
                                        $gameParty.mustNotUsePartyMember(Number(args[1]));
                                } break;
                                case 'MUSTUSECLEAR':
                                {
                                        $gameParty.mustClearPartyMember(Number(args[1]));
                                } break;                               
                                case 'ADD':
                                {
                                        $gameParty.addMemberToPartyManager(Number(args[1]));
                                } break;
                                case 'REMOVE':
                                {
                                        $gameParty.removeMemberFromPartyManager(Number(args[1]));
                                } break;
                                case 'LOCK':
                                {
                                        $gameParty.lockPartyMember(Number(args[1]));
                                } break;
                                case 'UNLOCK':
                                {
                                        $gameParty.unlockPartyMember(Number(args[1]));
                                } break;
                                case 'MENULOCK':
                                {
                                        $gameSystem.partyManagerMenuDisabled(true);
                                } break;
                                case 'MENUUNLOCK':
                                {
                                        $gameSystem.partyManagerMenuDisabled(false);
                                } break;
                        }
                }
        };

        //--------------------------------------------------------------------------
        // Game_System
        //
       
        Game_System.prototype.partyManagerMenuDisabled = function(t) {
                this._partyManagerMenuDisabled = t;
        };

        Game_System.prototype.isPartyManagerInMenuDisabled = function() {
                return !!this._partyManagerMenuDisabled;
        };

        //--------------------------------------------------------------------------
        // Window_MenuCommand
        //
       
        var _Window_MenuCommand_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
        Window_MenuCommand.prototype.addOriginalCommands = function() {
                _Window_MenuCommand_addOriginalCommands.call(this);
                if (paramInMenu)
                        this.addCommand(paramCommandName, 'partyManager', !$gameSystem.isPartyManagerInMenuDisabled());
        };

        //--------------------------------------------------------------------------
        // Scene_Menu
        //

        var _Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
        Scene_Menu.prototype.createCommandWindow = function() {
                _Scene_Menu_createCommandWindow.call(this);
                this._commandWindow.setHandler('partyManager', this.commandPartyManager.bind(this));
        };

        Scene_Menu.prototype.commandPartyManager = function() {
                SceneManager.push(Scene_PartyManager);
        };

        //--------------------------------------------------------------------------
        // Game_Actor
        //

        var _Game_Actor_initialize = Game_Actor.prototype.initialize;
        Game_Actor.prototype.initialize = function(actorId) {
                if (!$gameParty.partyMemberExists(actorId)) $gameParty.removeMemberFromPartyManager(actorId);
                _Game_Actor_initialize.call(this, actorId);
               
        };

        //--------------------------------------------------------------------------
        // Game_Party
        //

        var _Game_Party_initialize = Game_Party.prototype.initialize;
        Game_Party.prototype.initialize = function() {
                _Game_Party_initialize.call(this);
                this._partyManagerMembers = [];
                this._partyManagerMembersOutside = [];
                this._requiredPartyManagerMembers = 0;
                this._mustUsePartyManagerMembers = [];
        };

        Game_Party.prototype.createPartyManagerMember = function() {
                return {ID: 0, Locked: false};
        };

        Game_Party.prototype.getRequiredPartyMemberAmount = function() {
                return this._requiredPartyManagerMembers;
        };

        Game_Party.prototype.setRequiredPartyMembers = function(amount) {
                this._requiredPartyManagerMembers = amount;
        };

        Game_Party.prototype.getRequiredPartyMembers = function() {
                return this._mustUsePartyManagerMembers;
        };

        Game_Party.prototype.getPartyManagerMembers = function() {
                return this._partyManagerMembers;
        };

        Game_Party.prototype.partyMemberExists = function(id) {
                for (var i = 0; i < this._partyManagerMembers.length; i++) {
                        if (this._partyManagerMembers.ID === id) return true;
                }
                for (var i = 0; i < this._partyManagerMembersOutside.length; i++) {
                        if (this._partyManagerMembersOutside.ID === id) return true;
                }
                return false;
        };

        Game_Party.prototype.partyMemberInParty = function(id) {
                for (var i = 0; i < this.members().length; i++) {
                        if (this.members().actorId() === id) return true;
                }
                return false;
        };

        Game_Party.prototype.addMemberToPartyManager = function(id) {
                if (!this.partyMemberExists(id)) {
                        var tmpMember = this.createPartyManagerMember();
                        tmpMember.ID = id;
                        if (this.partyMemberInParty(id))
                                this._partyManagerMembersOutside.push(tmpMember);
                        else
                                this._partyManagerMembers.push(tmpMember);
                        ImageManager.loadCharacter($gameActors.actor(id).characterName());
                } else {
                        for (var i = 0; i < this._partyManagerMembersOutside.length; i++) {
                                var member = this._partyManagerMembersOutside;
                                if (member.ID === id) {
                                        this._partyManagerMembers.push(member);
                                        this._partyManagerMembersOutside.splice(i, 1);
                                        break;
                                }
                        }
                }
        };

        Game_Party.prototype.removeMemberFromPartyManager = function(id) {
                if (!this.partyMemberExists(id)) {
                        var tmpMember = this.createPartyManagerMember();
                        tmpMember.ID = id;
                        this._partyManagerMembersOutside.push(tmpMember);
                } else {
                        for (var i = 0; i < this._partyManagerMembers.length; i++) {
                                if (this._partyManagerMembers.ID === id) {
                                        var member = this._partyManagerMembers;
                                        this._partyManagerMembersOutside.push(member);
                                        this._partyManagerMembers.splice(i, 1);
                                        break;
                                }
                        }
                }
        };

        Game_Party.prototype.lockPartyMember = function(id) {
                if (!this.partyMemberExists(id)) {
                        var tmpMember = this.createPartyManagerMember();
                        tmpMember.ID = id;
                        tmpMember.Locked = true;
                        this._partyManagerMembersOutside.push(tmpMember);
                } else {
                        for (var i = 0; i < this._partyManagerMembersOutside.length; i++) {
                                if (this._partyManagerMembersOutside.ID === id) {
                                        this._partyManagerMembersOutside.Locked = true;
                                        break;
                                }
                        }
                        for (var i = 0; i < this._partyManagerMembers.length; i++) {
                                if (this._partyManagerMembers.ID === id) {
                                        this._partyManagerMembers.Locked = true;
                                        break;
                                }
                        }
                }
        };

        Game_Party.prototype.unlockPartyMember = function(id) {
                if (!this.partyMemberExists(id)) {
                        var tmpMember = this.createPartyManagerMember();
                        tmpMember.ID = id;
                        tmpMember.Locked = false;
                        this._partyManagerMembersOutside.push(tmpMember);
                } else {
                        for (var i = 0; i < this._partyManagerMembersOutside.length; i++) {
                                if (this._partyManagerMembersOutside.ID === id) {
                                        this._partyManagerMembersOutside.Locked = false;
                                        break;
                                }
                        }
                        for (var i = 0; i < this._partyManagerMembers.length; i++) {
                                if (this._partyManagerMembers.ID === id) {
                                        this._partyManagerMembers.Locked = false;
                                        break;
                                }
                        }
                }
        };

        Game_Party.prototype.requirePartyMemberAmount = function(amount) {
                this._requiredPartyManagerMembers = amount;
                if (this.members().length > amount)
                {
                        for (var i = this.members().length - 1; i > amount; i--) {
                                this.removeActor(this.members().actorId());
                        }
                }
        };

        Game_Party.prototype.mustUsePartyMember = function(id) {
                if (!this.partyMemberExists(id)) {
                        var tmpMember = this.createPartyManagerMember();
                        tmpMember.ID = id;
                        if (this.partyMemberInParty(id))
                                this._partyManagerMembersOutside.push(tmpMember);
                        else
                                this._partyManagerMembers.push(tmpMember);
                        this._mustUsePartyManagerMembers.push(id);
                } else {
                        this._mustUsePartyManagerMembers.push(id);
                }
        };

        Game_Party.prototype.mustNotUsePartyMember = function(id) {
                if (this._mustUsePartyManagerMembers.contains(id)) {
                        this._mustUsePartyManagerMembers.splice(this._mustUsePartyManagerMembers.indexOf(id), 1);
                }
        };

        Game_Party.prototype.mustClearPartyMember = function() {
                this._mustUsePartyManagerMembers = [];
        };

        var _Game_Party_addActor = Game_Party.prototype.addActor;
        Game_Party.prototype.addActor = function(actorId) {
                if (!this._actors.contains(actorId)) this.removeMemberFromPartyManager(actorId);
                _Game_Party_addActor.call(this, actorId);
        };

        var _Game_Party_removeActor = Game_Party.prototype.removeActor;
        Game_Party.prototype.removeActor = function(actorId) {
                if (this._actors.contains(actorId)) this.addMemberToPartyManager(actorId);
                _Game_Party_removeActor.call(this, actorId);
        };

        //--------------------------------------------------------------------------
        // Scene_PartyManager
        //
        // Manages party.
       
        function Scene_PartyManager() {
                this.initialize.apply(this, arguments);       
        };
       
        Scene_PartyManager.prototype = Object.create(Scene_MenuBase.prototype);
        Scene_PartyManager.prototype.constructor = Scene_PartyManager;
       
        Scene_PartyManager.prototype.initialize = function() {
                Scene_MenuBase.prototype.initialize.call(this);
        };
       
        Scene_PartyManager.prototype.create = function() {
                Scene_MenuBase.prototype.create.call(this);
                this.createWindowPartyName();
                this.createWindowParty();
                this.createWindowMembersName();
                this.createWindowMembers();
                this.createWindowActorInfo();
        };

        Scene_PartyManager.prototype.createWindowPartyName = function() {
                var ww = 816/3;
                var wx = Graphics.boxWidth/2 - 816/2;
                var wy = Graphics.boxHeight/2 - 624/2;
                this._windowPartyName = new Window_PartyManager_PartyName(wx, wy, ww);
                this.addWindow(this._windowPartyName);
        };

        Scene_PartyManager.prototype.createWindowParty = function() {
                var ww = this._windowPartyName.width;
                var wx = this._windowPartyName.x;
                var wy = this._windowPartyName.y + this._windowPartyName.height;
                this._windowPartyList = new Window_PartyManager_PartyList(wx, wy, ww);
                this._windowPartyList.setHandler('ok', this.partyOk.bind(this));
                this._windowPartyList.setHandler('cancel', this.partyCancel.bind(this));
                this.addWindow(this._windowPartyList);
                this._windowPartyList.select(0);
                this._windowPartyList.activate();
        };

        Scene_PartyManager.prototype.createWindowMembersName = function() {
                var ww = this._windowPartyList.width;
                var wx = this._windowPartyList.x;
                var wy = this._windowPartyList.y + this._windowPartyList.height;
                this._windowMemberName = new Window_PartyManager_MemberName(wx, wy, ww);
                this.addWindow(this._windowMemberName);
        };

        Scene_PartyManager.prototype.createWindowMembers = function() {
                var ww = this._windowMemberName.width;
                var wx = this._windowMemberName.x;
                var wy = this._windowMemberName.y + this._windowMemberName.height;
                var wh = 624 - this._windowPartyName.height - this._windowPartyList.height - this._windowMemberName.height;
                this._windowMemberList = new Window_PartyManager_MemberList(wx, wy, ww, wh);
                this._windowMemberList.setHandler('ok', this.membersOk.bind(this));
                this._windowMemberList.setHandler('cancel', this.membersCancel.bind(this));
                this.addWindow(this._windowMemberList);
        };

        Scene_PartyManager.prototype.createWindowActorInfo = function() {
                var ww = 816 - this._windowMemberName.width;
                var wx = this._windowMemberName.x + this._windowMemberName.width;
                var wy = this._windowPartyName.y;
                var wh = 624;
                this._windowActorInfo = new Window_PartyManager_ActorInfo(wx, wy, ww, wh);
                this._windowActorInfo.setActor($gameParty.members()[0]);
                this.addWindow(this._windowActorInfo);

                this._windowMemberList.setInfoWindow(this._windowActorInfo);
                this._windowPartyList.setInfoWindow(this._windowActorInfo);
        };

        Scene_PartyManager.prototype.partyOk = function() {
                this._windowPartyList.deactivate();
                this._windowMemberList.select(0);
                this._windowMemberList.activate();
        };

        Scene_PartyManager.prototype.partyCancel = function() {
                var amount = $gameParty.getRequiredPartyMemberAmount();
                var mustHave = $gameParty.getRequiredPartyMembers();
                if (amount > 0 && $gameParty.members().length !== amount)
                {
                        this._windowPartyList.playBuzzerSound();
                        return;
                }
                if ($gameParty.members().length === 0)
                {
                        this._windowPartyList.playBuzzerSound();
                        return;
                }
                for (var i = 0; i < mustHave.length; i++) {
                        var actor = $gameActors.actor(mustHave);
                        if (!$gameParty.members().contains(actor))
                        {
                                this._windowPartyList.playBuzzerSound();
                                return;
                        }
                }

        SoundManager.playCancel();
                this.popScene();
        };

        Scene_PartyManager.prototype.membersOk = function() {
                var actor = this._windowMemberList.item(this._windowMemberList.index());
                var partyActor = this._windowPartyList.item(this._windowPartyList.index());
                if (actor)
                        $gameParty.addActor(actor.actorId());

                if (partyActor)
                {
                        $gameParty.swapOrder(this._windowPartyList.index(), $gameParty.members().length-1);
                        $gameParty.removeActor(partyActor.actorId());
                }

                this._windowMemberList.refresh();
                this._windowMemberName.refresh();
                this._windowPartyList.refresh();
                this._windowPartyName.refresh();
                this._windowMemberList.deselect();
                this._windowMemberList.deactivate();
                this._windowPartyList.activate();
        };

        Scene_PartyManager.prototype.membersCancel = function() {
                this._windowMemberList.deselect();
                this._windowMemberList.deactivate();
                this._windowPartyList.activate();
        };

        //--------------------------------------------------------------------------
        // Window_PartyManager_PartyName
        //
        // Shows how many slots are available.
       
        function Window_PartyManager_PartyName() {
                this.initialize.apply(this, arguments);       
        };
       
        Window_PartyManager_PartyName.prototype = Object.create(Window_Base.prototype);
        Window_PartyManager_PartyName.prototype.constructor = Window_PartyManager_PartyName;
       
        Window_PartyManager_PartyName.prototype.initialize = function(x, y, w) {
                Window_Base.prototype.initialize.call(this, x, y, w, this.fittingHeight(1));
                this.refresh();
        };
       
        Window_PartyManager_PartyName.prototype.refresh = function() {
                this.contents.clear();
                var txt = paramPartyText;
                var amount = $gameParty.getRequiredPartyMemberAmount();
                if (amount > 0) txt += " (" + $gameParty.members().length + "/" + amount + ")";
                this.drawText(txt, 0, 0, this.contentsWidth(), 'center');
        };

        //--------------------------------------------------------------------------
        // Window_PartyManager_PartyList
        //
        // Shows a list of current party members.
       
        function Window_PartyManager_PartyList() {
                this.initialize.apply(this, arguments);       
        };
       
        Window_PartyManager_PartyList.prototype = Object.create(Window_Selectable.prototype);
        Window_PartyManager_PartyList.prototype.constructor = Window_PartyManager_PartyList;
       
        Window_PartyManager_PartyList.prototype.initialize = function(x, y, w) {
                Window_Selectable.prototype.initialize.call(this, x, y, w, this.fittingHeight());
                this.refresh();
        };

        Window_PartyManager_PartyList.prototype.maxItems = function() {
                var amount = $gameParty.getRequiredPartyMemberAmount()
                var mlen = $gameParty.members().length;
                if (amount > 0)
                        return mlen < amount ? mlen + 1 : amount;
                else
                        return mlen < $gameParty.maxBattleMembers() ? mlen + 1 : $gameParty.maxBattleMembers();
        };

        Window_PartyManager_PartyList.prototype.maxCols = function() {
            return 4;
        };

        Window_PartyManager_PartyList.prototype.itemWidth = function() {
            return 48;
        };

        Window_PartyManager_PartyList.prototype.itemHeight = function() {
            return 48;
        };

        Window_PartyManager_PartyList.prototype.fittingHeight = function() {
                return this.standardPadding()*2 + this.itemHeight();
        };

        Window_PartyManager_PartyList.prototype.item = function(index) {
                return $gameParty.members()[index];
        };

        Window_PartyManager_PartyList.prototype.drawItem = function(index) {
                var actor = this.item(index);
                if (actor)
                {
                        var rect = this.itemRect(index);
                        this.drawActorCharacter(actor, rect.x+24, rect.y+48);
                }
        };

        Window_PartyManager_PartyList.prototype.itemRect = function(index) {
            var rect = new Rectangle();
            var maxCols = this.maxCols();
            rect.width = this.itemWidth();
            rect.height = this.itemHeight();
            rect.x = index % maxCols * (this.contentsWidth()/4);
            rect.y = Math.floor(index / maxCols) * rect.height - this._scrollY;
            return rect;
        };

        Window_PartyManager_PartyList.prototype.setInfoWindow = function(infoWindow) {
                this._infoWindow = infoWindow;
        };

        Window_PartyManager_PartyList.prototype.update = function() {
                Window_Selectable.prototype.update.call(this);
                if (this._infoWindow && this.item(this.index())) this._infoWindow.setActor(this.item(this.index()));
        };

        Window_PartyManager_PartyList.prototype.processCancel = function() {
            this.updateInputData();
            this.callCancelHandler();
        };

        //--------------------------------------------------------------------------
        // Window_PartyManager_MemberName
        //
        // Window above member list.
       
        function Window_PartyManager_MemberName() {
                this.initialize.apply(this, arguments);       
        };
       
        Window_PartyManager_MemberName.prototype = Object.create(Window_Base.prototype);
        Window_PartyManager_MemberName.prototype.constructor = Window_PartyManager_MemberName;
       
        Window_PartyManager_MemberName.prototype.initialize = function(x, y, w) {
                Window_Base.prototype.initialize.call(this, x, y, w, this.fittingHeight());
                this.refresh();
        };
       
        Window_PartyManager_MemberName.prototype.refresh = function() {
                this.contents.clear();
                var requiredMembers = $gameParty.getRequiredPartyMembers();
                if (requiredMembers.length > 0)
                {
                        var txtWidth = this.textWidth(paramRequiredText);
                        this.drawText(paramRequiredText, 0, this.contentsHeight()/2-this.lineHeight()/2);
                        var pos = 0;
                        for (var i = 0; i < requiredMembers.length; i++) {
                                if (pos === 2) {
                                        break;       
                                }
                                if (!$gameParty.members().contains($gameActors.actor(requiredMembers)))
                                {
                                        this.drawActorCharacter($gameActors.actor(requiredMembers), txtWidth + 24 + 48*pos, 48);
                                        pos++;
                                }                               
                        }
                } else {
                        this.drawText(paramMembersText, 0, this.contentsHeight()/2-this.lineHeight()/2, this.contentsWidth(), 'center');
                }
        };

        Window_PartyManager_MemberName.prototype.fittingHeight = function() {
                return this.standardPadding()*2 + 48;
        };

        //--------------------------------------------------------------------------
        // Window_PartyManager_MemberList
        //
        // List of all available party members.
       
        function Window_PartyManager_MemberList() {
                this.initialize.apply(this, arguments);       
        };
       
        Window_PartyManager_MemberList.prototype = Object.create(Window_Selectable.prototype);
        Window_PartyManager_MemberList.prototype.constructor = Window_PartyManager_MemberList;
       
        Window_PartyManager_MemberList.prototype.initialize = function(x, y, w, h) {
                Window_Selectable.prototype.initialize.call(this, x, y, w, h);
                this.refresh();
        };

        Window_PartyManager_MemberList.prototype.maxItems = function() {
                return $gameParty.getPartyManagerMembers().length + 1;
        };

        Window_PartyManager_MemberList.prototype.maxCols = function() {
            return 4;
        };

        Window_PartyManager_MemberList.prototype.itemWidth = function() {
            return 48;
        };

        Window_PartyManager_MemberList.prototype.itemHeight = function() {
            return 48;
        };

        Window_PartyManager_MemberList.prototype.fittingHeight = function() {
                return this.standardPadding()*2 + this.itemHeight();
        };

        Window_PartyManager_MemberList.prototype.item = function(index) {
                if ($gameParty.getPartyManagerMembers()[index])
                        return $gameActors.actor($gameParty.getPartyManagerMembers()[index].ID)
                return null;
        };

        Window_PartyManager_MemberList.prototype.drawItem = function(index) {
                var actor = this.item(index);
                if (actor)
                {
                        var rect = this.itemRect(index);
                           this.changePaintOpacity(this.isItemEnabled(index));
                        this.drawActorCharacter(actor, rect.x+24, rect.y+48);
                        this.changePaintOpacity(true);
                }
        };

        Window_PartyManager_MemberList.prototype.itemRect = function(index) {
            var rect = new Rectangle();
            var maxCols = this.maxCols();
            rect.width = this.itemWidth();
            rect.height = this.itemHeight();
            rect.x = index % maxCols * (this.contentsWidth()/4);
            rect.y = Math.floor(index / maxCols) * rect.height - this._scrollY;
            return rect;
        };

        Window_PartyManager_MemberList.prototype.setInfoWindow = function(infoWindow) {
                this._infoWindow = infoWindow;
        };

        Window_PartyManager_MemberList.prototype.update = function() {
                Window_Selectable.prototype.update.call(this);
                if (this._infoWindow && this.item(this.index())) this._infoWindow.setActor(this.item(this.index()));
        };

        Window_PartyManager_MemberList.prototype.isCurrentItemEnabled = function() {
                var actor = this.item(this.index());
                if (actor)
                {
                        var a = $gameParty.getPartyManagerMembers()[this.index()];
                        return !a.Locked;
                }
            return true;
        };

        Window_PartyManager_MemberList.prototype.isItemEnabled = function(index) {
                var actor = this.item(index);
                if (actor)
                {
                        var a = $gameParty.getPartyManagerMembers()[index];
                        return !a.Locked;
                }
            return true;
        };

        //--------------------------------------------------------------------------
        // Window_PartyManager_ActorInfo
        //
        // Displays all actor info.
       
        function Window_PartyManager_ActorInfo() {
                this.initialize.apply(this, arguments);       
        };
       
        Window_PartyManager_ActorInfo.prototype = Object.create(Window_Base.prototype);
        Window_PartyManager_ActorInfo.prototype.constructor = Window_PartyManager_ActorInfo;
       
        Window_PartyManager_ActorInfo.prototype.initialize = function(x, y, w, h) {
                this._actor = null
                Window_Base.prototype.initialize.call(this, x, y, w, h);
        };
       
        Window_PartyManager_ActorInfo.prototype.refresh = function() {
                this.contents.clear();
                var actor = this._actor;
                if (actor)
                {
                        var x = 0;
                        var y = 0;
                        var width = this.contentsWidth();
                        var lineHeight = this.lineHeight();
                    var x2 = x + 180;
                    var width2 = Math.min(200, width - 180 - this.textPadding());
                    this.drawActorName(actor, x, y);
                    this.drawActorClass(actor, x2, y);
                    this.drawActorLevel(actor, x2+width2+10, y);
                    this.drawHorzLine(y+lineHeight*1);
                    this.drawActorFace(actor, x, y + lineHeight *2);
                    this.drawActorHp(actor, x2, y + lineHeight * 2, width2);
                    this.drawActorMp(actor, x2, y + lineHeight * 3, width2);
                    if (paramDrawTp)
                            this.drawActorTp(actor, x2, y + lineHeight * 4, width2);
                    this.drawHorzLine(y+lineHeight*6);
                    this.drawParameters(x+12, y + lineHeight * 7);
                    this.drawEquipments(x+272, y + lineHeight * 7);
                }
        };

        Window_PartyManager_ActorInfo.prototype.setActor = function(actor) {
                this._actor = actor;
                this.refresh();
        };

        Window_PartyManager_ActorInfo.prototype.drawParameters = function(x, y) {
            var lineHeight = this.lineHeight();
            for (var i = 0; i < 6; i++) {
                var paramId = i + 2;
                var y2 = y + lineHeight * i;
                this.changeTextColor(this.systemColor());
                this.drawText(TextManager.param(paramId), x, y2, 160);
                this.resetTextColor();
                this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right');
            }
        };

        Window_PartyManager_ActorInfo.prototype.drawEquipments = function(x, y) {
            var equips = this._actor.equips();
            var count = Math.min(equips.length, this.maxEquipmentLines());
            for (var i = 0; i < count; i++) {
                this.drawItemName(equips, x, y + this.lineHeight() * i);
            }
        };

        Window_PartyManager_ActorInfo.prototype.maxEquipmentLines = function() {
            return 6;
        };

        Window_PartyManager_ActorInfo.prototype.drawHorzLine = function(y) {
            var lineY = y + this.lineHeight() / 2 - 1;
            this.contents.paintOpacity = 48;
            this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor());
            this.contents.paintOpacity = 255;
        };

        Window_PartyManager_ActorInfo.prototype.lineColor = function() {
            return this.normalColor();
        };
})();[/fold]
https://rpg.blue/data/attachment/album/202003/28/021323lltgrsvfytfwuya5.gif
回复 1 0

使用道具 举报

梦石
0
星屑
50
在线时间
32 小时
注册时间
2017-9-3
回帖
14
 楼主| 发表于 2017-9-9 12:30:25 | 显示全部楼层
花王子 发表于 2017-9-9 09:42
可以用事件实现的啊

https://rpg.blue/forum.php?mod=viewthread&tid=387573&extra=page%3D1  这里也有 ...

事件如何实现随机指定角色离队入队
回复

使用道具 举报

梦石
0
星屑
50
在线时间
32 小时
注册时间
2017-9-3
回帖
14
 楼主| 发表于 2017-9-9 12:50:23 | 显示全部楼层
本帖最后由 星辰007 于 2017-9-9 13:11 编辑
wabcmcc 发表于 2017-9-9 12:30
符合你要求插件:MrTS_PartyManager.js
作者:Mr. Trivel


非常感谢{:2_249:}
回复

使用道具 举报

梦石
0
星屑
601
在线时间
24 小时
注册时间
2025-2-16
回帖
5
发表于 2025-3-17 13:44:04 | 显示全部楼层
wabcmcc 发表于 2017-9-9 12:30
符合你要求插件:MrTS_PartyManager.js
作者:Mr. Trivel

经常看到您的回帖,插件看起来都很适用,但您基本都是给一个外网链接+页面截图,或者是搜索“xx”关键词,对于我这样的新手,不是打不开网页,就是看不懂内容,更多的是找不到插件下载位置。希望大佬回帖附件能带上插件的压缩包,万分感谢!
回复

使用道具 举报

梦石
0
星屑
2768
在线时间
129 小时
注册时间
2025-2-2
回帖
24

极短26参与

发表于 2025-3-18 00:32:25 | 显示全部楼层
猴哥的哥 发表于 2025-3-17 13:44
经常看到您的回帖,插件看起来都很适用,但您基本都是给一个外网链接+页面截图,或者是搜索“xx”关键词 ...

他的回帖最下面折叠的内容不就是插件的代码嘛?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部