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

Project1

 找回密码
 注册会员
搜索
查看: 4754|回复: 7
打印 上一主题 下一主题

[有事请教] DIYHUD主角血条插件(夏末渐离)横向修改竖向后反方向减血求助

[复制链接]

Lv4.逐梦者

梦石
0
星屑
18040
在线时间
2171 小时
注册时间
2015-7-4
帖子
919
跳转到指定楼层
1
发表于 2017-11-8 23:04:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
最近在修改DIYHUD第一主角血条插件,原作者夏末渐离。
原设计血条由左向右伸缩,我想修改由下往上伸缩,但总是变成由上往下伸缩;
原设计HPbox图片显示在HPbar下层,想要对调显示次序;
原设计整个插件显示的内容在系统对话功能图层的上层,想要将它下沉到系统对话图层下面。
下面是插件代码,请哪位大神指导一下如何修改。非常感谢!
JAVASCRIPT 代码复制
  1. /**
  2.  * Created by 夏末渐离 on 2015/11/30.
  3.  */
  4. //DIY部分
  5. /*:
  6.  * @plugindesc  DIY a HUD Window belong to you.
  7.  * @author XMJL
  8.  *
  9.  *
  10.  * @param  -------------FaceSprite
  11.  * @desc   undefine
  12.  * @default Part---------------
  13.  *
  14.  *
  15.  * @param  FirstFaceBitmapName
  16.  * @desc Please input HUDFaceBitmap filename  at img/Pictures/.
  17.  * @default
  18.  *
  19.  * @param  SecondFaceBitmapName
  20.  * @desc Please input HUDFaceBitmap filename  at img/Pictures/.
  21.  * @default
  22.  *
  23.  * @param  ThirdFaceBitmapName
  24.  * @desc Please input HUDFaceBitmap filename  at img/Pictures/.
  25.  * @default
  26.  *
  27.  * @param  FourFaceBitmapName
  28.  * @desc Please input HUDFaceBitmap filename  at img/Pictures/.
  29.  * @default
  30.  *
  31.  * @param  FaceSpriteXY
  32.  * @desc    Point.Position.x,Point.Position.y (The Point at Bitmap upper left corner.)
  33.  * @default   20,20
  34.  *
  35.  * @param  ---------------HPSprite
  36.  * @desc   undefine
  37.  * @default Part---------------
  38.  *
  39.  * @param  hpboxBitmapName
  40.  * @desc Please input HPBitmap filename  at img/Pictures/.
  41.  * @default
  42.  *
  43.  * @param  hpboxSpriteXY
  44.  * @desc    Point.Position.x,Point.Position.y (The Point at Bitmap upper left corner.)
  45.  * @default   130,50
  46.  *
  47.  * @param  hpbarBitmapName
  48.  * @desc Please input HPBitmap filename  at img/Pictures/.
  49.  * @default
  50.  *
  51.  * @param  hpbarSpriteXY
  52.  * @desc    Point.Position.x,Point.Position.y (The Point at Bitmap upper left corner.)
  53.  * @default   140,60
  54.  *
  55.  * @param  checkHPpixel
  56.  * @desc    Pixel.Position.left,Piexl.Position.y (The Pixel at Bitmap left corner and right corner.)
  57.  * @default   0,180
  58.  *
  59.  * @param  ---------------MPSprite
  60.  * @desc   undefine
  61.  * @default Part---------------
  62.  *
  63.  * @param  mpboxBitmapName
  64.  * @desc Please input MPBitmap filename  at img/Pictures/.
  65.  * @default
  66.  *
  67.  * @param  mpboxSpriteXY
  68.  * @desc    Point.Position.x,Point.Position.y (The Point at Bitmap upper left corner.)
  69.  * @default   130,100
  70.  *
  71.  * @param  mpbarBitmapName
  72.  * @desc Please input MPBitmap filename  at img/Pictures/.
  73.  * @default
  74.  *
  75.  * @param  mpbarSpriteXY
  76.  * @desc    Point.Position.x,Point.Position.y (The Point at Bitmap upper left corner.)
  77.  * @default   140,110
  78.  *
  79.  * @param  checkMPpixel
  80.  * @desc    Pixel.Position.left,Piexl.Position.y (The Pixel at Bitmap left corner and right corner.)
  81.  * @default   0,180
  82.  *
  83.  * @param  --------------EXPSprite
  84.  * @desc   undefine
  85.  * @default Part---------------
  86.  *
  87.  * @param  expboxBitmapName
  88.  * @desc Please input EXPBitmap filename  at img/Pictures/.
  89.  * @default
  90.  *
  91.  * @param  expboxSpriteXY
  92.  * @desc    Point.Position.x,Point.Position.y (The Point at Bitmap upper left corner.)
  93.  * @default   130,150
  94.  *
  95.  * @param  expbarBitmapName
  96.  * @desc Please input EXPBitmap filename  at img/Pictures/.
  97.  * @default
  98.  *
  99.  * @param  expbarSpriteXY
  100.  * @desc    Point.Position.x,Point.Position.y (The Point at Bitmap upper left corner.)
  101.  * @default   140,160
  102.  *
  103.  * @param  checkEXPpixel
  104.  * @desc    Pixel.Position.left,Piexl.Position.y (The Pixel at Bitmap left corner and right corner.)
  105.  * @default   0,180
  106.  *
  107.  * @param  ---------------Window
  108.  * @desc   undefine
  109.  * @default Part---------------
  110.  *
  111.  * @param  WindowWidth
  112.  * @desc This HUDWindow Width
  113.  * @default   400
  114.  *
  115.  * @param  WindowHeight
  116.  * @desc This HUDWindow Height
  117.  * @default   200
  118.  *
  119.  * @param  WindowOpacity
  120.  * @desc This HUDWindow Opacity between 0-255
  121.  * @default   255
  122.  *
  123.  * @param  WindowXY
  124.  * @desc This HUDWindow Position xy
  125.  * @default   0,0
  126.  *
  127.  * @param  -----------WindowText
  128.  * @desc   undefine
  129.  * @default Part---------------
  130.  *
  131.  * @param  FontWidth
  132.  * @desc    this Window Text Size;
  133.  * @default   24
  134.  *
  135.  * @param  ValueWidth
  136.  * @desc the number frame width and "/" frame width  equal ValueWidth/2;
  137.  * @default  30
  138.  *
  139.  * @param  HPTextXY
  140.  * @desc    HPText.Position.x,HPText.Position.y
  141.  * @default   305,5
  142.  *
  143.  * @param  MPTextXY
  144.  * @desc    MPText.Position.x,MPText.Position.y
  145.  * @default   305,50
  146.  *
  147.  * @param  EXPTextXY
  148.  * @desc    EXPText.Position.x,EXPText.Position.y
  149.  * @default   305,100
  150.  *
  151.  * @param  NameTextXY
  152.  * @desc    NameText.Position.x,NameText.Position.y
  153.  * @default   30,120
  154.  *
  155.  * @param  levelTextXY
  156.  * @desc   levelText.Position.x,levelText.Position.y
  157.  * @default   120,5
  158.  *
  159.  * @param levelNumberWidth
  160.  * @desc  the levelNumber position (x+levelNumberWidth)
  161.  * @default 30
  162.  */
  163.  
  164. (function ()
  165. {
  166.     // set parameters
  167.     //脸图部分
  168.     //第一位主角
  169.     var parameters = PluginManager.parameters('DIYHUD');
  170.     //读取脸图
  171.     var FirstFaceBitmap = parameters['FirstFaceBitmapName'];
  172.     var SecondFaceBitmap = parameters['SecondFaceBitmapName'];
  173.     var ThirdFaceBitmap=parameters['ThirdFaceBitmapName'];
  174.     var FourFaceBitmap=parameters['FourFaceBitmapName'];
  175.     //脸图位置
  176.     var FacePosition = FaceSpriteXY();
  177.     function FaceSpriteXY()
  178.     {
  179.         //正则表达式匹配字符串
  180.         var resFace = /(\d+),*(\d+)/.exec(parameters['FaceSpriteXY']);
  181.         return {x: Number(resFace[1]), y: Number(resFace[2])};
  182.     }
  183.     //HP精灵
  184.     //血槽
  185.     var hpboxBitmap = parameters['hpboxBitmapName'];
  186.     var hpboxPosition = hpboxSpriteXY();
  187.     function hpboxSpriteXY()
  188.     {
  189.         //正则表达式匹配字符串
  190.         var reshpbox = /(\d+),*(\d+)/.exec(parameters['hpboxSpriteXY']);
  191.         return {x: Number(reshpbox[1]), y: Number(reshpbox[2])};
  192.     }
  193.     //血条
  194.     var hpbarBitmap = parameters['hpbarBitmapName'];
  195.     var hpbarPosition = hpbarSpriteXY();
  196.     function hpbarSpriteXY()
  197.     {
  198.         //正则表达式匹配字符串
  199.         var reshpbar = /(\d+),*(\d+)/.exec(parameters['hpbarSpriteXY']);
  200.         return {x: Number(reshpbar[1]), y: Number(reshpbar[2])};
  201.     }
  202.     //校准血条
  203.     var hpcheck = checkHPpixel();
  204.     function checkHPpixel()
  205.     {
  206.         //正则表达式匹配字符串
  207.         var resHPpixel = /(\d+),*(\d+)/.exec(parameters['checkHPpixel']);
  208.         return {up: Number(resHPpixel[1]), down: Number(resHPpixel[2])};
  209.     }
  210.     //MP精灵
  211.     //蓝槽
  212.     var mpboxBitmap = parameters['mpboxBitmapName'];
  213.     var mpboxPosition = mpboxSpriteXY();
  214.     function mpboxSpriteXY()
  215.     {
  216.         //正则表达式匹配字符串
  217.         var resmpbox = /(\d+),*(\d+)/.exec(parameters['mpboxSpriteXY']);
  218.         return {x: Number(resmpbox[1]), y: Number(resmpbox[2])};
  219.     }
  220.     //蓝条
  221.     var mpbarBitmap = parameters['mpbarBitmapName'];
  222.     var mpbarPosition = mpbarSpriteXY();
  223.     function mpbarSpriteXY()
  224.     {
  225.         //正则表达式匹配字符串
  226.         var resmpbar = /(\d+),*(\d+)/.exec(parameters['mpbarSpriteXY']);
  227.         return {x: Number(resmpbar[1]), y: Number(resmpbar[2])};
  228.     }
  229.     //校准蓝条
  230.     var mpcheck = checkMPpixel();
  231.     function checkMPpixel()
  232.     {
  233.         //正则表达式匹配字符串
  234.         var resMPpixel = /(\d+),*(\d+)/.exec(parameters['checkMPpixel']);
  235.         return {left: Number(resMPpixel[1]), right: Number(resMPpixel[2])};
  236.     }
  237.     //EXP精灵
  238.     //经验槽
  239.     var expboxBitmap = parameters['expboxBitmapName'];
  240.     var expboxPosition = expboxSpriteXY();
  241.     function expboxSpriteXY()
  242.     {
  243.         //正则表达式匹配字符串
  244.         var resexpbox = /(\d+),*(\d+)/.exec(parameters['expboxSpriteXY']);
  245.         return {x: Number(resexpbox[1]), y: Number(resexpbox[2])};
  246.     }
  247.     //经验条
  248.     var expbarBitmap = parameters['expbarBitmapName'];
  249.     var expbarPosition = expbarSpriteXY();
  250.     function expbarSpriteXY()
  251.     {
  252.         //正则表达式匹配字符串
  253.         var resexpbar = /(\d+),*(\d+)/.exec(parameters['expbarSpriteXY']);
  254.         return {x: Number(resexpbar[1]), y: Number(resexpbar[2])};
  255.     }
  256.     //校准经验条
  257.     var expcheck = checkEXPpixel();
  258.     function checkEXPpixel()
  259.     {
  260.         //正则表达式匹配字符串
  261.         var resEXPpixel = /(\d+),*(\d+)/.exec(parameters['checkEXPpixel']);
  262.         return {left: Number(resEXPpixel[1]), right: Number(resEXPpixel[2])};
  263.     }
  264.  
  265.  
  266.     //窗口部分
  267.     var WindowWidth = Number(parameters['WindowWidth'] || 400);
  268.     var WindowHeight = Number(parameters['WindowHeigh'] || 200);
  269.     var WindowOpacity = Number(parameters['WindowOpacity'] || 255);
  270.     var WindowPosition = WindowXY();
  271.     function WindowXY()
  272.     {
  273.         //正则表达式匹配字符串
  274.         var reswindowxy = /(\d+),*(\d+)/.exec(parameters['WindowXY']);
  275.         return {x: Number(reswindowxy[1]), y: Number(reswindowxy[2])};
  276.     }
  277.  
  278.  
  279.     //文字部分
  280.     //HP相关
  281.     var valueWidth = Number(parameters['ValueWidth'] || 30);
  282.     var textSize = Number(parameters['FontWidth'] || 24);
  283.     var HPtextPosition = hptextXY();
  284.     function hptextXY()
  285.     {
  286.         //正则表达式匹配字符串
  287.         var reshptext = /(\d+),*(\d+)/.exec(parameters['HPTextXY']);
  288.         return {x: Number(reshptext[1]), y: Number(reshptext[2])};
  289.     }
  290.  
  291.     //MP相关
  292.     var MPtextPosition = mptextXY();
  293.     function mptextXY()
  294.     {
  295.         //正则表达式匹配字符串
  296.         var resmptext = /(\d+),*(\d+)/.exec(parameters['MPTextXY']);
  297.         return {x: Number(resmptext[1]), y: Number(resmptext[2])};
  298.     }
  299.     //EXP相关
  300.     var EXPtextPosition = exptextXY();
  301.     function exptextXY()
  302.     {
  303.         //正则表达式匹配字符串
  304.         var resexptext = /(\d+),*(\d+)/.exec(parameters['EXPTextXY']);
  305.         return {x: Number(resexptext[1]), y: Number(resexptext[2])};
  306.     }
  307.     //名字相关
  308.     var NamePosition = NametextXY();
  309.     function NametextXY()
  310.     {
  311.         //正则表达式匹配字符串
  312.         var resnametext = /(\d+),*(\d+)/.exec(parameters['NameTextXY']);
  313.         return {x: Number(resnametext[1]), y: Number(resnametext[2])};
  314.     }
  315.  
  316.     //等级相关
  317.     var addwidth = Number(parameters['levelNumberWidth'] || "10");
  318.     var levelPosition = leveltextXY();
  319.     function leveltextXY()
  320.     {
  321.         //正则表达式匹配字符串
  322.         var resleveltext = /(\d+),*(\d+)/.exec(parameters['levelTextXY']);
  323.         return {x: Number(resleveltext[1]), y: Number(resleveltext[2])};
  324.     }
  325.     var _Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
  326.     Scene_Map.prototype.createAllWindows = function ()
  327.     {
  328.         _Scene_Map_createAllWindows.call(this);
  329.          this.addChild(new Window_HUD());
  330.     };
  331.  
  332.     //-----------------------------------------------------------------------------
  333.     // Window_HUD
  334.     // HUD窗口
  335.     function Window_HUD()
  336.     {
  337.         this.initialize.apply(this, arguments);
  338.     }
  339.  
  340.     Window_HUD.prototype = Object.create(Window_Base.prototype);
  341. //  Window_HUD.prototype = Object.create(Window_Selectable.prototype);
  342.     Window_HUD.prototype.constructor = Window_HUD;
  343.     //初始化
  344.     Window_HUD.prototype.initialize = function ()
  345.     {
  346.         var width = this.windowWidth();
  347.         var height = this.windowHeight();
  348.         Window_Base.prototype.initialize.call(this, WindowPosition.x, WindowPosition.y, width, height);
  349.         this.opacity = WindowOpacity;
  350.         this.actor = $gameParty.members()[0];
  351.         this.drawDIYFace($gameParty._actors[0]);
  352.         this.drawDIYHP();
  353.         this.drawDIYMP();
  354.         this.drawDIYEXP();
  355.         this.drawALLText();
  356.         this.actor.lasthp = null;
  357.         this.actor.lastmp = null;
  358.         this.actor.lastLevel = this.actor.level;
  359.         this.actor.lastexp = null;
  360.     };
  361.     //窗口宽
  362.     Window_HUD.prototype.windowWidth = function ()
  363.     {
  364.         return WindowWidth;
  365.     };
  366.     //窗口高
  367.     Window_HUD.prototype.windowHeight = function ()
  368.     {
  369.         return WindowHeight;
  370.     };
  371.    //绘制脸图精灵
  372.   Window_HUD.prototype.DIYFace = function(BitmapName)
  373.   {
  374.       var FaceSp = new Sprite();
  375.       FaceSp.bitmap = ImageManager.loadPicture(BitmapName);
  376.       this.addChild(FaceSp);
  377.       this.addChildToBack(FaceSp);
  378.       FaceSp.move(FacePosition.x, FacePosition.y);
  379.       this.MyFaceSp=FaceSp;
  380.   }
  381.     //选择脸图
  382.    Window_HUD.prototype.drawDIYFace = function (Index)
  383.    {
  384.         switch(Index)
  385.         {
  386.            case 1:
  387.            this.DIYFace(FirstFaceBitmap);
  388.            break;
  389.            case 2:
  390.            this.DIYFace(SecondFaceBitmap);
  391.            break;
  392.            case 3:
  393.            this.DIYFace(ThirdFaceBitmap);
  394.            break;
  395.            case 4:
  396.            this.DIYFace(FourFaceBitmap);
  397.            break;
  398.         }
  399.    };
  400.  
  401.     //绘制HP
  402.     Window_HUD.prototype.drawDIYHP = function ()
  403.     {
  404.         //如果载入血条图.png
  405.         if (hpbarBitmap)
  406.         {
  407.             hpBar = new Sprite();
  408.             hpBar.bitmap = ImageManager.loadPicture(hpbarBitmap);
  409.             this.addChild(hpBar);
  410.             hpBar.move(hpbarPosition.x, hpbarPosition.y);
  411.             this.hpBar = hpBar;
  412.         }
  413.         //如果载入血槽图.png
  414.         if (hpboxBitmap)
  415.         {
  416.             var hpBox = new Sprite();
  417.             hpBox.bitmap = ImageManager.loadPicture(hpboxBitmap);
  418.             this.addChild(hpBox);
  419.             this.addChildToBack(hpBox);
  420.             hpBox.move(hpboxPosition.x, hpboxPosition.y);
  421.         }
  422.     };
  423.     //绘制MP
  424.     Window_HUD.prototype.drawDIYMP = function ()
  425.     {
  426.         //如果载入蓝条图.png
  427.         if (mpbarBitmap)
  428.         {
  429.             var mpBar = new Sprite();
  430.             mpBar.bitmap = ImageManager.loadPicture(mpbarBitmap);
  431.             this.addChild(mpBar);
  432.             mpBar.move(mpbarPosition.x, mpbarPosition.y);
  433.             this.mpBar = mpBar;
  434.         }
  435.         //如果载入蓝槽图.png
  436.         if (mpboxBitmap)
  437.         {
  438.             var mpBox = new Sprite();
  439.             mpBox.bitmap = ImageManager.loadPicture(mpboxBitmap);
  440.             this.addChild(mpBox);
  441.             this.addChildToBack(mpBox);
  442.             mpBox.move(mpboxPosition.x, mpboxPosition.y);
  443.         }
  444.     };
  445.  
  446.     //绘制EXP
  447.     Window_HUD.prototype.drawDIYEXP = function ()
  448.     {
  449.         //如果载入EXP条图.png
  450.         if (expbarBitmap)
  451.         {
  452.             var expBar = new Sprite();
  453.             expBar.bitmap = ImageManager.loadPicture(expbarBitmap);
  454.             this.addChild(expBar);
  455.             expBar.move(expbarPosition.x, expbarPosition.y);
  456.             this.expBar = expBar;
  457.         }
  458.         //如果载入EXP槽图.png
  459.         if (expboxBitmap)
  460.         {
  461.             var expBox = new Sprite();
  462.             expBox.bitmap = ImageManager.loadPicture(expboxBitmap);
  463.             this.addChild(expBox);
  464.             this.addChildToBack(expBox);
  465.             expBox.move(expboxPosition.x, expboxPosition.y);
  466.         }
  467.     };
  468.  
  469.     //绘制文本信息
  470.     Window_HUD.prototype.drawALLText= function()
  471.     {
  472.         this.contents.clear();
  473.         this.contents.fontSize = textSize;
  474. //      this.drawActorName(this.actor, NamePosition.x, NamePosition.y);
  475. //      this.drawHPText(this.actor.hp,this.actor.mhp,HPtextPosition.x,HPtextPosition.y);
  476. //      this.drawMPText(this.actor.mp,this.actor.mmp,MPtextPosition.x,MPtextPosition.y);
  477. //      this.drawEXPText(EXPtextPosition.x,EXPtextPosition.y);
  478.         this.drawLevel(this.actor, levelPosition.x, levelPosition.y, addwidth);
  479.     };
  480.     //绘制HP
  481.     Window_HUD.prototype.drawHPText=function(current,max,x,y)
  482.     {
  483.         var x1 = x - valueWidth;
  484.         var x2 = x1 - valueWidth/2;
  485.         var x3 = x2 - valueWidth;
  486.         this.drawText(current, x3, y, valueWidth, 'right');
  487.         this.drawText('/', x2, y, valueWidth/2, 'right');
  488.         this.drawText(max, x1, y, valueWidth, 'right');
  489.     };
  490.     //绘制MP
  491.     Window_HUD.prototype.drawMPText=function(current,max,x,y)
  492.     {
  493.         var x1 = x - valueWidth;
  494.         var x2 = x1 - valueWidth/2;
  495.         var x3 = x2 - valueWidth;
  496.         this.drawText(current, x3, y, valueWidth, 'right');
  497.         this.drawText('/',x2, y, valueWidth/2, 'right');
  498.         this.drawText(max, x1, y, valueWidth, 'right');
  499.     };
  500.     //绘制EXP
  501.     Window_HUD.prototype.drawEXPText=function(x,y)
  502.     {
  503.         var x1 = x - valueWidth;
  504.         var x2 = x1 - valueWidth/2;
  505.         var x3 = x2 - valueWidth;
  506.         this.drawText(this.GetCurrentExp(), x3, y, valueWidth, 'right');
  507.         this.drawText('/',x2, y, valueWidth/2, 'right');
  508.         this.drawText(this.GetMaxExp(), x1, y, valueWidth, 'right');
  509.     };
  510.     Window_HUD.prototype.GetCurrentExp=function()
  511.     {
  512.         return this.actor.currentExp()-this.actor.expForLevel(this.actor.level);
  513.     };
  514.     Window_HUD.prototype.GetMaxExp=function()
  515.     {
  516.         return this.actor.nextLevelExp()-this.actor.expForLevel(this.actor.level);
  517.     };
  518.     //绘制等级
  519.     Window_HUD.prototype.drawLevel = function (curactor, x, y, width)
  520.     {
  521.         this.changeTextColor(this.systemColor());
  522.         this.drawText(TextManager.levelA, x, y, 48);
  523.         this.resetTextColor();
  524.         this.drawText(curactor.level, x + width, y, 36, 'left');
  525.     };
  526.     //切换队员
  527.     Window_HUD.prototype.SwitchActor = function ()
  528.     {
  529.         //设置键值
  530.         if (Input.isTriggered('pageup'))
  531.         {
  532.             $gameParty._actors.push($gameParty._actors.shift());
  533.             this.actor=$gameParty.members()[0];
  534.             $gamePlayer.refresh();
  535.             this.removeChild(this.MyFaceSp);
  536.             this.drawDIYFace($gameParty._actors[0]);
  537.             if(hpbarBitmap)this.refresh_HP();
  538.             if(mpbarBitmap)this.refresh_MP();
  539.             if(expbarBitmap)this.refresh_EXP();
  540.             this.drawALLText();
  541.          }
  542.     };
  543.     //刷新HP
  544.     Window_HUD.prototype.refresh_HP = function ()
  545.     {
  546.         var down = hpcheck.down; //血条图像下端像素
  547.         var up = hpcheck.up;//血条图像上端像素
  548.         var percent = this.actor.hp / this.actor.mhp;
  549.         if(hpbarBitmap)
  550.         {
  551.             this.hpBar.height = (1 - percent) * (up - down) + down;
  552.             this.drawALLText();
  553.             this.actor.lasthp = this.actor.hp;
  554.         }
  555.     };
  556.     //刷新MP
  557.     Window_HUD.prototype.refresh_MP = function (index)
  558.     {
  559.         var left = mpcheck.left; //蓝条图像左端像素
  560.         var right = mpcheck.right;//蓝条图像右端像素
  561.         //判定当前队员序号再重绘蓝条
  562.         var percent = this.actor.mp / this.actor.mmp;
  563.         if(mpbarBitmap)
  564.         {
  565.             this.mpBar.width = percent * (right - left) + left;
  566.             this.drawALLText();
  567.             this.actor.lastmp = this.actor.mp;
  568.         }
  569.     };
  570.     //刷新EXP
  571.     Window_HUD.prototype.refresh_EXP = function (index)
  572.     {
  573.         var left = expcheck.left; //血条图像左端像素
  574.         var right = expcheck.right;//血条图像右端像素
  575.         //判定当前队员序号再重绘经验条
  576.         var percent = this.GetCurrentExp(index)/ this.GetMaxExp(index);
  577.         if(expbarBitmap)
  578.         {
  579.             this.expBar.width = percent * (right - left) + left;
  580.             this.drawALLText();
  581.             this.actor.lastexp = this.GetCurrentExp(index);
  582.         }
  583.     };
  584.     //刷新等级
  585.     Window_HUD.prototype.refresh_level = function (){
  586.         //升级满状态回复
  587.         this.actor.setHp(this.actor.mhp);
  588.         this.actor.setMp(this.actor.mmp);
  589.         //重绘血条
  590.         this.refresh_HP();
  591.         //重绘蓝条
  592.         this.refresh_MP();
  593.         this.actor.lastLevel=this.actor.level;
  594.     };
  595.     Window_HUD.prototype.update = function ()
  596.     {
  597.         this.SwitchActor();
  598.         if(this.actor.hp!=this.actor.lasthp)
  599.             this.refresh_HP();
  600.         if(this.actor.mp!=this.actor.lastmp)
  601.             this.refresh_MP();
  602.         if (this.GetCurrentExp()!=this.actor.lastexp)
  603.             this.refresh_EXP();
  604.         if(this.actor.level!=this.actor.lastLevel)
  605.             this.refresh_level();
  606.     };
  607. })();

Lv5.捕梦者

梦石
0
星屑
22062
在线时间
8577 小时
注册时间
2011-12-31
帖子
3362
2
发表于 2017-11-8 23:19:43 | 只看该作者
可用SDR的Super Tools Engine > HUD Maker
https://rpg.blue/thread-400405-1-5.html
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
18040
在线时间
2171 小时
注册时间
2015-7-4
帖子
919
3
 楼主| 发表于 2017-11-20 12:40:03 | 只看该作者

修改完成,记录分享:
1、增加TP显示。
2、血条蓝条竖向加减。
3、显示层下移到系统对话窗下。
插件下载 DIYHUD.rar (3.86 KB, 下载次数: 95)
上个效果图,吸收意见:


评分

参与人数 2+2 收起 理由
白嫩白嫩的 + 1 画面很棒,期待试玩
j296196585 + 1 你的武侠界面很赞

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
896
在线时间
236 小时
注册时间
2010-7-18
帖子
13
4
发表于 2018-5-2 22:20:48 | 只看该作者
Fan723 发表于 2017-11-20 12:40
修改完成,记录分享:
1、增加TP显示。
2、血条蓝条竖向加减。

请问能实现开局不显示吗?

点评

可以,这个插件已经给我修改得面目全非了,大规模自定义。  发表于 2018-5-3 08:13
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
18040
在线时间
2171 小时
注册时间
2015-7-4
帖子
919
5
 楼主| 发表于 2018-5-3 08:46:27 | 只看该作者
DIYHUD.rar (5.17 KB, 下载次数: 88)
重新更新并说明一下:
1.新增三名队友头像显示。
2.新增插件指令用于开关功能显示。
3.新增自定义主角头像相框。
4.本版应用的血槽、蓝槽、怒气槽、经验槽全用血槽一全,未考虑独立的各种槽。
5.血、蓝条竖向增减是一个反向思维,就是血槽为满血满蓝,血、蓝条为空槽。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
896
在线时间
236 小时
注册时间
2010-7-18
帖子
13
6
发表于 2018-5-3 10:30:15 | 只看该作者
Fan723 发表于 2018-5-3 08:46
重新更新并说明一下:
1.新增三名队友头像显示。
2.新增插件指令用于开关功能显示。

大佬能不能发个原版就加个开关功能的版本。谢谢

点评

原版的到图书馆找,可以参考我这份修改,楼主右手骨折中,左手回你几个字都困难,不能给你修改。实在抱歉!  发表于 2018-5-4 09:32
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-5-22 17:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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