rpgmakermz吧 关注:2,087贴子:4,101
  • 9回复贴,共1

请问有没有增加自定义菜单的插件?以及,如何在战斗中使用立绘?

只看楼主收藏回复

想要做一个可以查看声望和各种变量的菜单,请问有这样的插件吗?大家的插件都是从哪里找的?


IP属地:北京1楼2021-03-14 19:44回复
    论坛、qq群都有


    IP属地:河南来自Android客户端2楼2021-03-15 07:18
    收起回复
      2025-09-09 20:36:39
      广告
      不感兴趣
      开通SVIP免广告
      [图片]var hsyf04jm=true; //当只有1个角色的解密类游戏时(默认使用变量1,2,3,4,5,6,10.在40多行和80多行和120多行修改使用的变量值)
      var hsyf04pczid=[1,0,4,1,0,0,0,0,0,0,6,0,3,2,4,0,2,5,0,2,0,7,0,4,4]; //多个角色时储存破处者id的数组(小于数据库角色上限) ,按数据库顺序,输入0时为"无"
      //$gameActors.actor(角色id).setpczId(新的破处者id)
      var hsyf04sj=0; //叠加新时间
      var hsyf04a=50; //帧率(越小越快可以小数点,rmmz/unity默认是50帧)#BUG帧数小于20时"绘制"跟不上"刷新"多线程出现突破BUG,暂停时可以看到
      hsyf04sj=12*hsyf04a; //瞬移到中午
      /**更新 */
      var hsyf04update=Scene_Map.prototype.update //重命名
      Scene_Map.prototype.update = function() {
      hsyf04sj+=1;//叠加新时间
      hsyf04sj1s=Math.floor(hsyf04sj/hsyf04a); //存储旧时间(顺便获得秒数)
      c=hsyf04sj1s%24;
      c>18 ? c="傍晚" : c>12 ? c="下午" : c>11 ? c="中午" :
      c>6 ? c="上午" : c>0 ? c="午夜" : c="半夜"
      hsyf04update.call(this);//原
      };
      //每页最多显示几个(默认4)
      Window_MenuStatus.prototype.numVisibleRows = function() {
      return 1;
      };
      //绘制项目
      Window_MenuStatus.prototype.drawItem = function(index) {
      // this.drawPendingItemBackground(index);//填充 -白色(等待的色(默认白色没啥意义))矩形闪烁
      // this.drawItemImage(index); //绘制脸图
      this.drawItemStatus(index);//绘制(单个角色)基础状态(名字,等级,异常图标,职业,hp/mp等)
      };


      IP属地:江西来自Android客户端3楼2021-03-15 20:44
      回复
        //绘制(单个角色)基础状态(名字,等级,异常图标,职业,hp/mp等)
        Window_MenuStatus.prototype.drawItemStatus = function(index) {
        const actor = this.actor(index); //获取角色索引
        const rect = this.itemRect(index); //获取角色矩形
        // const x = rect.x + 180; //设置x轴位置 180
        // const y = rect.y + rect.height / 2 - this.lineHeight() * 1.5;
        //设置y轴位置 单个矩形的一半 减去 一行半
        var x=rect.x +111;var y=rect.y +111;
        this.drawActorSimpleStatus(actor, x, y);//绘制基础状态(名字,等级,异常图标,职业,hp/mp等)
        };
        //绘制基础状态(名字,等级,异常图标,职业,hp/mp等) #新的绘制
        Window_MenuStatus.prototype.drawActorSimpleStatus = function(actor, x, y) {
        const lineHeight = this.lineHeight();
        const x2 = x + 180;
        // this.drawActorLevel(actor, x, y + lineHeight * 1); //等级
        // this.drawActorIcons(actor, x, y + lineHeight * 2); //异常
        // this.drawActorClass(actor, x2, y); //职业
        // this.placeBasicGauges(actor, x2, y + lineHeight); //基础hp/mp
        this.drawText(Math.floor(hsyf04sj1s/24%31)+"日"+hsyf04sj1s%24+"时"+"-"+c, x, y-55, 333, 111);
        this.drawActorName(actor, x, y + lineHeight*2); //名字
        this.drawnc(actor, x, y+ lineHeight*3); //新 绘制昵称
        this.drawbl(actor, x, y+ lineHeight*4,1); //新 绘制变量1
        this.drawbl(actor, x, y+ lineHeight*5,2); //新 绘制变量2
        this.drawbl(actor, x, y+ lineHeight*6,3); //新 绘制变量3
        this.drawbl(actor, x, y+ lineHeight*7,4); //新 绘制变量4
        this.drawbl(actor, x, y+ lineHeight*8,5); //新 绘制变量5
        this.drawbl(actor, x, y+ lineHeight*9,6); //新 绘制变量6
        this.drawGold(x, y + lineHeight*12); //新# 绘制金钱
        this.drawbl(actor, x, y+ lineHeight*13,10); //新 绘制变量10(破处者id)
        };
        Window_MenuStatus.prototype.drawnc = function(actor, x, y) {
        //绘制昵称
        this.resetTextColor();
        this.drawText("名声: "+actor.nickname()||"没有", x, y, 222);
        };
        Window_MenuStatus.prototype.drawGold = function(x,y) {
        // Window_Gold.prototype.contents.clear();//调用窗口的画布方法时 这个窗口必须已经用new打开,否则报错!
        this.drawCurrencyValue("金钱: "+Window_Gold.prototype.value(), TextManager.currencyUnit, x-115, y, 222);
        //绘制金钱值(值,/** 货币单位(G)*/,x,y,宽)
        };


        IP属地:江西来自Android客户端4楼2021-03-15 20:45
        回复
          /** 获取破处者id* @returns {number}*/
          Game_Actor.prototype.pczId = function() {
          return hsyf04pczid[this.actorId()]
          };
          /** 设置破处者id* @returns {number}*/
          Game_Actor.prototype.setpczId = function(id) {
          hsyf04pczid[this.actorId()]=id;
          };
          //自定义绘制变量值/多人基础参数
          Window_MenuStatus.prototype.drawbl = function(actor, x, y,blid) {
          var blid=blid||1; //防错
          if (hsyf04jm) { //当只有1个角色的解密类游戏时
          if (blid ==10){
          if (!$gameVariables.value(blid)||$gameVariables.value(blid)==0) this.drawText("破处者: "+"暂无", x, y, 222);
          if ($gameVariables.value(blid)>0) this.drawText("破处者: "+$gameActors.actor($gameVariables.value(blid)).name(), x, y, 222);//绘制一个方法在忘写后缀()时会出现绘制"整个方法代码"的BUG!
          //#[[[当使用xx暂存=new xx 获得副本后(如这里的actor/$gameActors),这个暂存使用自己的方法时 等同this不能加.prototype.会报错找不到!!!]]]
          }else if (blid ==1){
          this.drawText("知识: "+$gameVariables.value(blid), x, y, 222);
          }else if (blid ==2){
          this.drawText("体能: "+$gameVariables.value(blid), x, y, 222);
          }else if (blid ==3){
          this.drawText("欲望: "+$gameVariables.value(blid), x, y, 222);
          }else if (blid ==4){
          this.drawText("魅力: "+$gameVariables.value(blid), x, y, 222);
          }else if (blid ==5){
          this.drawText("开放值: "+$gameVariables.value(blid), x, y, 222);
          }else //if (blid ==6) //更多扩展
          {
          //this.drawText("xxx: "+$gameVariables.value(blid), x, y, 222);
          //}else{
          this.drawText("压力值: "+$gameVariables.value(blid), x, y, 222);
          }
          }else{//当只有1个角色的解密类游戏时
          //否则调用当前角色的数据库-职业前6个基本参数
          if (blid ==10){
          if (!actor.pczId()||actor.pczId()==0) this.drawText("破处者: "+"暂无", x, y, 222);
          //写不下,后面接


          IP属地:江西来自Android客户端5楼2021-03-15 20:48
          回复
            }else{//当只有1个角色的解密类游戏时
            //否则调用当前角色的数据库-职业前6个基本参数
            if (blid ==10){
            if (!actor.pczId()||actor.pczId()==0) this.drawText("破处者: "+"暂无", x, y, 222);
            if (actor.pczId()>0) this.drawText("破处者: "+$gameActors.actor(actor.pczId()).name(), x, y, 222);
            //绘制一个方法在忘写后缀()时会出现绘制"整个方法代码"的BUG
            }else if (blid ==1){
            this.drawText("知识: "+actor.paramBase(blid), x, y, 222);
            }else if (blid ==2){
            this.drawText("体能: "+actor.paramBase(blid), x, y, 222);
            }else if (blid ==3){
            this.drawText("欲望: "+actor.paramBase(blid), x, y, 222);
            }else if (blid ==4){
            this.drawText("魅力: "+actor.paramBase(blid), x, y, 222);
            }else if (blid ==5){
            this.drawText("开放值: "+actor.paramBase(blid), x, y, 222);
            }else //if (blid ==6) //更多扩展
            {
            //this.drawText("xxx: "+actor.prototype.paramBase(blid), x, y, 222);
            //}else{
            this.drawText("压力值: "+actor.paramBase(blid), x, y, 222);
            }
            }//当只有1个角色的解密游戏时
            };


            IP属地:江西来自Android客户端6楼2021-03-15 20:52
            回复
              第40多行的注释是原来的状态――窗口。
              贴吧并不适合发过长代码,如1楼大佬说的最好去论坛或qq找找


              IP属地:江西来自Android客户端7楼2021-03-15 20:54
              收起回复