设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

关于让【特定角色无法参加战斗】

查看数: 11069 | 评论数: 28 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2018-3-19 15:50

正文摘要:

本帖最后由 2256538860 于 2018-4-18 19:46 编辑 在角色中备注进行设置 被设置的角色进入战斗时不会参与战斗 也就是说队伍中4个人其中有一个人被设置了无法战斗   战斗开始时就只有3个人 不要提供无 ...

回复

柳岳枫 发表于 2018-4-22 15:04:05
2256538860 发表于 2018-4-22 14:55
这个问题是我帮别人问的。我一窍不通= =
你可以试试和层主聊聊

好的,谢谢!
2256538860 发表于 2018-4-22 14:55:52
柳岳枫 发表于 2018-4-22 14:54
请教下楼主 15楼ekmomo大大发布的这个插件咋用呀
同样想找一个临时入队但又无法战斗的插件 ...

这个问题是我帮别人问的。我一窍不通= =
你可以试试和层主聊聊
柳岳枫 发表于 2018-4-22 14:54:34
请教下楼主 15楼ekmomo大大发布的这个插件咋用呀
同样想找一个临时入队但又无法战斗的插件
2256538860 发表于 2018-4-18 19:47:04
ekmomo 发表于 2018-3-19 15:50
你的意思就是不显示他的死亡图呗……呢你用PS把死亡图那里扣成透明图行么? ...

谢谢♪(・ω・)ノ你的帮助               
doranikofu 发表于 2018-3-27 09:13:59
转载一个很好用的插件

  1. /*:
  2. * @plugindesc v1.09
  3. * @author DreamX
  4. *
  5. * @param Battle Members Only
  6. * @desc Proc. as eval. true: only battle members may appear as followers, false: any party member may appear Default: true
  7. * @default true
  8. *
  9. * @param Automatic Follower Refresh
  10. * @desc Automatically refresh followers whenever a switch is changed. Default: true
  11. * @default true
  12. *
  13. * @help
  14. * ============================================================================
  15. * How To Use
  16. * ============================================================================
  17. * Place this plugin BELOW Yanfly's Party System plugin.
  18. *
  19. * Use <no_follow:1> in an actor's notetag to permanently prevent them from
  20. * appearing as a follower.
  21. * Use <no_follow_switch:x> in an actor's notetag to designate a switch as what
  22. * determines whether they're a follower. Change x to the switch number.
  23. *
  24. *  * Do not use both follower notetags at the same time for the same actor,
  25. * choose one or  the other.
  26. *
  27. * To quickly alter follower visibiity, you can use these plugin commands.
  28. *
  29. * ToggleFollower 2         - Toggles the visiblity of an actor as a follower.
  30. *                        Use the actor id. In this case, it is actor #2.
  31. * ShowFollower 4         - Shows actor as follower
  32. *                        Use the actor id. In this case, it is actor #4.
  33. * HideFollower  6         - Hides actor as follower
  34. *                        Use the actor id. In this case, it is actor #6.
  35. *
  36. * Alternatively, you can use just change the associated switch while having
  37. * the parameter "Automatic Refresh" on.               
  38. *
  39. * Use <no_battle:1> in an actor's notetag to permanently prevent them from
  40. * appearing in battle. Use <no_battle_switch:x> in an actor's notetag to
  41. * designate a switch as what determines whether they appear in battle. Change x
  42. * to the switch number. If the switch is true, the actor won't appear in battle.
  43. * If it's false, they will. Do not use both notetags at the same time for the
  44. * same actor, choose one or the other. You don't need to use plugin commands
  45. * when using the switch notetag for battle.
  46. *
  47. * Use <no_menu:1> in an actor's notetag to permanently prevent them from
  48. * appearing in menus. Use <no_menu_switch:x> in an actor's notetag to
  49. * designate a switch as what determines whether they appear in menus. Change x
  50. * to the switch number. If the switch is true, the actor won't appear in menus.
  51. * If it's false, they will. Do not use both notetags at the same time for the
  52. * same actor, choose one or the other. You don't need to use plugin commands
  53. * when using the switch notetag for menus.
  54. * ============================================================================
  55. * Terms Of Use
  56. * ============================================================================
  57. * Free to use and modify for commercial and noncommercial games, with credit.
  58. * ============================================================================
  59. * Compatibility
  60. * ============================================================================
  61. * To use Hime's Custom Party Leader, make sure to place it under this plugin.
  62. * ============================================================================
  63. * Credits
  64. * ============================================================================
  65. * DreamX
  66. * Thanks to Shaz and Liquidize on the Rpg Maker forum for assistance.
  67. * Thanks to Gilles on Rpg Maker Forum for assistance.
  68. * Thanks to Yanfly for YEP Party System.
  69. */

  70. var Imported = Imported || {};
  71. Imported.DreamX_FollowerOptions = true;

  72. var DreamX = DreamX || {};
  73. DreamX.FollowerOptions = DreamX.FollowerOptions || {};

  74. (function () {
  75.     var parameters = PluginManager.parameters('DreamX_FollowerOptions');
  76.     var parameterBattleMembersOnly = eval(String(parameters['Battle Members Only']));
  77.     var parameterAutoRefresh = eval(String(parameters['Automatic Follower Refresh']));

  78.     DreamX.FollowerOptions.DataManager_loadDatabase = DataManager.loadDatabase;
  79.     DataManager.loadDatabase = function () {
  80.         DreamX.FollowerOptions.DataManager_loadDatabase.call(this);
  81.         if (!Imported.YEP_PartySystem) {
  82.             throw new Error('DreamX_FollowerOptions requires YEP Party System');
  83.         }
  84.     };

  85.     DreamX.FollowerOptions._Game_Interpreter_pluginCommand =
  86.             Game_Interpreter.prototype.pluginCommand;
  87.     Game_Interpreter.prototype.pluginCommand = function (command, args) {
  88.         DreamX.FollowerOptions._Game_Interpreter_pluginCommand.call(this,
  89.                 command, args);
  90.         var actorId = args[0];
  91.         if (!actorId) {
  92.             return;
  93.         }
  94.         actorId = parseInt(actorId);
  95.         if (actorId === NaN || actorId <= 0) {
  96.             return;
  97.         }

  98.         var switchId = DreamX.FollowerOptions.getSwitchNum(actorId);
  99.         switchId = parseInt(switchId);

  100.         switch (command) {
  101.             case 'ToggleFollower':
  102.                 DreamX.FollowerOptions.ToggleFollower(switchId);
  103.                 if (!parameterAutoRefresh) {
  104.                     $gamePlayer.refresh();
  105.                 }
  106.                 break;
  107.             case 'ShowFollower':
  108.                 DreamX.FollowerOptions.FollowerOff(switchId);
  109.                 if (!parameterAutoRefresh) {
  110.                     $gamePlayer.refresh();
  111.                 }
  112.                 break;
  113.             case 'HideFollower':
  114.                 DreamX.FollowerOptions.FollowerOn(switchId);

  115.                 if (!parameterAutoRefresh) {
  116.                     $gamePlayer.refresh();
  117.                 }
  118.                 break;
  119.         }
  120.     };

  121.     //==========================================================================
  122.     // DreamX.FollowerOptions
  123.     //==========================================================================
  124.     DreamX.FollowerOptions.getSwitchNum = function (actorId) {
  125.         if (!$dataActors[actorId])
  126.             return -1;
  127.         var switchNum = $dataActors[actorId].meta.no_follow_switch
  128.                 ? $dataActors[actorId].meta.no_follow_switch : -1;
  129.         return switchNum;
  130.     };

  131.     DreamX.FollowerOptions.ToggleFollower = function (switchNum) {

  132.         if ($gameSwitches.value(switchNum)) {
  133.             DreamX.FollowerOptions.FollowerOff(switchNum);
  134.         } else {
  135.             DreamX.FollowerOptions.FollowerOn(switchNum);
  136.         }
  137.     };

  138.     DreamX.FollowerOptions.FollowerOff = function (switchNum) {
  139.         $gameSwitches.setValue(switchNum, false);
  140.     };

  141.     DreamX.FollowerOptions.FollowerOn = function (switchNum) {
  142.         $gameSwitches.setValue(switchNum, true);
  143.     };

  144.     DreamX.FollowerOptions.disableCommand = function (symbol) {
  145.         var disabledSymbols = ['status', 'skill', 'equip'];
  146.         return $gameParty.members().length === 0 && disabledSymbols.indexOf(symbol) !== -1;
  147.     };

  148.     //==========================================================================
  149.     // Game_Switches
  150.     //==========================================================================
  151.     DreamX.FollowerOptions.Game_Switches_onChange = Game_Switches.prototype.onChange;
  152.     Game_Switches.prototype.onChange = function () {
  153.         DreamX.FollowerOptions.Game_Switches_onChange.call(this);
  154.         if (parameterAutoRefresh) {
  155.             $gamePlayer.refresh();
  156.         }
  157.     };

  158.     //==========================================================================
  159.     // Game_Follower
  160.     //==========================================================================
  161.     Game_Follower.prototype.actor = function () {
  162.         return $gameParty.followers()[this._memberIndex];
  163.     };

  164.     //==========================================================================
  165.     // Game_Party
  166.     //==========================================================================
  167.     Game_Party.prototype.leader = function () {
  168.         return this.followers()[0];
  169.     };

  170.     Game_Party.prototype.followers = function () {
  171.         var group = parameterBattleMembersOnly ? this.battleMembers()
  172.                 : this.allMembers();

  173.         return group.filter(function (member) {
  174.             return $gameParty.isFollowerEnabled(member);
  175.         });
  176.     };

  177.     Game_Party.prototype.isFollowerEnabled = function (member) {
  178.         if (!member) {
  179.             return false;
  180.         }
  181.         if (member.actor().meta.no_follow) {
  182.             return false;
  183.         }
  184.         var switchId = member.actor().meta.no_follow_switch;
  185.         if (!switchId) {
  186.             return true;
  187.         }
  188.         switchId = parseInt(switchId);
  189.         if ($gameSwitches.value(switchId)) {
  190.             return false;
  191.         }
  192.         return true;
  193.     };

  194.     Game_Party.prototype.isBattleMemberEnabled = function (member) {
  195.         if (!member) {
  196.             return false;
  197.         }
  198.         if (member.actor().meta.no_battle) {
  199.             return false;
  200.         }
  201.         var switchId = member.actor().meta.no_battle_switch;
  202.         if (!switchId) {
  203.             return true;
  204.         }
  205.         switchId = parseInt(switchId);
  206.         if ($gameSwitches.value(switchId)) {
  207.             return false;
  208.         }
  209.         return true;
  210.     };

  211.     Game_Party.prototype.isMenuMemberEnabled = function (member) {
  212.         if (!member) {
  213.             return false;
  214.         }
  215.         if (member.actor().meta.no_menu) {
  216.             return false;
  217.         }
  218.         var switchId = member.actor().meta.no_menu_switch;
  219.         if (!switchId) {
  220.             return true;
  221.         }
  222.         switchId = parseInt(switchId);
  223.         if ($gameSwitches.value(switchId)) {
  224.             return false;
  225.         }
  226.         return true;
  227.     };

  228.     DreamX.FollowerOptions.Game_Party_initializeBattleMembers = Game_Party.prototype.initializeBattleMembers;
  229.     Game_Party.prototype.initializeBattleMembers = function () {
  230.         DreamX.FollowerOptions.Game_Party_initializeBattleMembers.call(this);
  231.         var bm = [];

  232.         for (var i = 0; i < this._battleMembers.length; i++) {
  233.             var id = this._battleMembers[i];
  234.             if (this.isBattleMemberEnabled($gameActors.actor(id))) {
  235.                 bm.push(id);
  236.             } else {
  237.                 bm.push(0);
  238.             }
  239.         }

  240.         this._battleMembers = bm;
  241.     };

  242.     DreamX.FollowerOptions.Game_Party_members = Game_Party.prototype.members;
  243.     Game_Party.prototype.members = function () {
  244.         var scene = SceneManager._scene;
  245.         var members = DreamX.FollowerOptions.Game_Party_members.call(this);

  246.         if (scene instanceof Scene_MenuBase) {
  247.             members = members.filter(function (member) {
  248.                 return $gameParty.isMenuMemberEnabled(member);
  249.             });
  250.         }

  251.         return members;
  252.     };

  253.     Game_Party.prototype.sortBattleMembers = function () {
  254.         var regularMembers = this._battleMembers.filter(function (member) {
  255.             return member !== 0;
  256.         });

  257.         var nullMembers = this._battleMembers.filter(function (member) {
  258.             return member === 0;
  259.         });

  260.         this._battleMembers = regularMembers.concat(nullMembers);
  261.     };

  262.     DreamX.FollowerOptions.Game_Party_addActor = Game_Party.prototype.addActor;
  263.     Game_Party.prototype.addActor = function (actorId) {
  264.         if (!this.isBattleMemberEnabled($gameActors.actor(actorId))) {
  265.             Yanfly.Party.Game_Party_addActor.call(this, actorId);
  266.             this.sortBattleMembers();
  267.             return;
  268.         }
  269.         DreamX.FollowerOptions.Game_Party_addActor.call(this, actorId);
  270.         this.sortBattleMembers();
  271.     };



  272.     //==========================================================================
  273.     // Window_PartyList
  274.     //==========================================================================
  275.     DreamX.FollowerOptions.Window_PartyList_createActorOrder = Window_PartyList.prototype.createActorOrder;
  276.     Window_PartyList.prototype.createActorOrder = function () {
  277.         DreamX.FollowerOptions.Window_PartyList_createActorOrder.call(this);
  278.         var a = [];

  279.         for (var i = 0; i < this._data.length; ++i) {
  280.             var id = this._data[i];
  281.             if ($gameParty.isBattleMemberEnabled($gameActors.actor(id))) {
  282.                 a.push(id);
  283.             }
  284.         }

  285.         this._data = a;
  286.     };

  287.     //==========================================================================
  288.     // Window_Command
  289.     //==========================================================================
  290.     DreamX.FollowerOptions.Window_Command_addCommand = Window_Command.prototype.addCommand;
  291.     Window_Command.prototype.addCommand = function (name, symbol, enabled, ext) {
  292.         if (DreamX.FollowerOptions.disableCommand(symbol)) {
  293.             enabled = false;
  294.         }
  295.         DreamX.FollowerOptions.Window_Command_addCommand.call(this, name, symbol, enabled, ext);
  296.     };

  297.     if (Imported.YEP_X_ActorPartySwitch) {
  298.         DreamX.FollowerOptions.Window_ActorPartySwitch_makeCommandList = Window_ActorPartySwitch.prototype.makeCommandList;
  299.         Window_ActorPartySwitch.prototype.makeCommandList = function () {
  300.             DreamX.FollowerOptions.Window_ActorPartySwitch_makeCommandList.call(this);
  301.             this._list = this._list.filter(function (cmd) {
  302.                 var id = cmd.ext;
  303.                 return $gameParty.isBattleMemberEnabled($gameActors.actor(id));
  304.             });
  305.         };
  306.     }

  307. })();
复制代码
2256538860 发表于 2018-3-26 17:06:39
八云不活看你惹的好事 这个帖子没得沉了啊
【开玩笑啦 感谢大家积极讨论!】
if216 发表于 2018-3-26 15:27:07
嘿嘿,不入队却提供效果怪怪的啊,难道你自己不觉得。还不如做个剧情打开个开关,获得某种物品打开某种能力……也好解释。你这在又不出现,不出现能力又在的表现方式让人有点抓狂啊
中华国哥 发表于 2018-3-26 10:17:07
我的看法是既然不参与战斗,那就不让那个角色入队,整队就只有可参战角色,另外YEP插件中有一个可以设置开场提供buff状态的,让它直接出双倍经验的buff。
2256538860 发表于 2018-3-22 01:31:43
汪汪 发表于 2018-3-22 01:27
只改队伍能力的话。。。

Game_Party.prototype.partyAbility = function(abilityId) {

谢谢大哥的帮助
汪汪 发表于 2018-3-22 01:27:18
只改队伍能力的话。。。

Game_Party.prototype.partyAbility = function(abilityId) {
    //返回 战斗成员组() 一些 方法(角色)
    return this.battleMembers().some(function(actor) {
        //返回 角色 队伍能力(能力id)
        return actor.partyAbility(abilityId);
    });
};
改成

Game_Party.prototype.partyAbility = function(abilityId) {
    //返回 战斗成员组() 一些 方法(角色)
    return this.allMembers().some(function(actor) {
        //返回 角色 队伍能力(能力id)
        return actor.partyAbility(abilityId);
    });
};
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-7 01:36

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表