Project1

标题: 请问 怎么把原来显示4个角色信息的菜单改成5个角色的啊 [打印本页]

作者: zwlele1980    时间: 2022-1-7 19:37
标题: 请问 怎么把原来显示4个角色信息的菜单改成5个角色的啊
请问 怎么把原来显示4个角色信息的菜单改成5个角色的啊      

就是按esc 出来那个 菜单  


作者: cenhangkai    时间: 2022-1-8 00:17
  1. /*:
  2. * @plugindesc 自定义菜单人物行数
  3. * @author CHK
  4. *
  5. * @help
  6. * 即插即用。仅限主菜单的人物列表。
  7. *
  8. *
  9. * @param 显示的人物数量
  10. * @desc 菜单初始显示4人,填写最好不要超过14个。
  11. * @default 4
  12. */

  13. (function() {
  14.        
  15.   var parameters = PluginManager.parameters('RW');
  16.   var ShuLiang = Number(parameters['显示的人物数量'] || 4);

  17.   Window_MenuStatus.prototype.numVisibleRows = function() {
  18.     return ShuLiang;
  19.   };

  20.   Window_MenuStatus.prototype.standardFontSize = function() {
  21.         var zihao = parseInt(28 / (this.numVisibleRows()/4));
  22.         return zihao<14?14:zihao;  
  23.   };          
  24.   
  25.   Window_MenuStatus.prototype.lineHeight = function() {
  26.         return this.standardFontSize();  
  27.   };
  28.   
  29.   Window_MenuStatus.prototype.drawItemImage = function(index) {
  30.     var actor = $gameParty.members()[index];
  31.     var rect = this.itemRect(index);
  32.     this.changePaintOpacity(actor.isBattleMember());
  33.     this.drawActorFace(actor, rect.x + 1, rect.y + 1, Window_Base._faceWidth, this.itemHeight());
  34.     this.changePaintOpacity(true);
  35.   };

  36. })();
复制代码



把代码复制粘贴成插件,改名:RW
即插即用。

作者: zwlele1980    时间: 2022-1-8 10:36
cenhangkai 发表于 2022-1-8 00:17
把代码复制粘贴成插件,改名:RW
即插即用。

这个是 mv的 插件 还是va的脚本
作者: zwlele1980    时间: 2022-1-15 11:18
原来 修改   Window_MenuStatus   里面的
  # ● 获取项目的高度   
  #--------------------------------------------------------------------------
  def item_height
    (height - standard_padding * 2) / 5  #我在这里改成了5个角色的菜单   

就可以了




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1