查看: 5513|回复: 7

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

[复制链接]
梦石
0
星屑
22794
在线时间
2623 小时
注册时间
2015-7-4
回帖
918
发表于 2017-11-8 23:04:39 | 显示全部楼层 |阅读模式

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

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

×
最近在修改DIYHUD第一主角血条插件,原作者夏末渐离。
原设计血条由左向右伸缩,我想修改由下往上伸缩,但总是变成由上往下伸缩;
原设计HPbox图片显示在HPbar下层,想要对调显示次序;
原设计整个插件显示的内容在系统对话功能图层的上层,想要将它下沉到系统对话图层下面。
下面是插件代码,请哪位大神指导一下如何修改。非常感谢!
  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. (function ()
  164. {
  165.     // set parameters
  166.     //脸图部分
  167.     //第一位主角
  168.     var parameters = PluginManager.parameters('DIYHUD');
  169.     //读取脸图
  170.     var FirstFaceBitmap = parameters['FirstFaceBitmapName'];
  171.     var SecondFaceBitmap = parameters['SecondFaceBitmapName'];
  172.     var ThirdFaceBitmap=parameters['ThirdFaceBitmapName'];
  173.     var FourFaceBitmap=parameters['FourFaceBitmapName'];
  174.     //脸图位置
  175.     var FacePosition = FaceSpriteXY();
  176.     function FaceSpriteXY()
  177.     {
  178.         //正则表达式匹配字符串
  179.         var resFace = /(\d+),*(\d+)/.exec(parameters['FaceSpriteXY']);
  180.         return {x: Number(resFace[1]), y: Number(resFace[2])};
  181.     }
  182.     //HP精灵
  183.     //血槽
  184.     var hpboxBitmap = parameters['hpboxBitmapName'];
  185.     var hpboxPosition = hpboxSpriteXY();
  186.     function hpboxSpriteXY()
  187.     {
  188.         //正则表达式匹配字符串
  189.         var reshpbox = /(\d+),*(\d+)/.exec(parameters['hpboxSpriteXY']);
  190.         return {x: Number(reshpbox[1]), y: Number(reshpbox[2])};
  191.     }
  192.     //血条
  193.     var hpbarBitmap = parameters['hpbarBitmapName'];
  194.     var hpbarPosition = hpbarSpriteXY();
  195.     function hpbarSpriteXY()
  196.     {
  197.         //正则表达式匹配字符串
  198.         var reshpbar = /(\d+),*(\d+)/.exec(parameters['hpbarSpriteXY']);
  199.         return {x: Number(reshpbar[1]), y: Number(reshpbar[2])};
  200.     }
  201.     //校准血条
  202.     var hpcheck = checkHPpixel();
  203.     function checkHPpixel()
  204.     {
  205.         //正则表达式匹配字符串
  206.         var resHPpixel = /(\d+),*(\d+)/.exec(parameters['checkHPpixel']);
  207.         return {up: Number(resHPpixel[1]), down: Number(resHPpixel[2])};
  208.     }
  209.     //MP精灵
  210.     //蓝槽
  211.     var mpboxBitmap = parameters['mpboxBitmapName'];
  212.     var mpboxPosition = mpboxSpriteXY();
  213.     function mpboxSpriteXY()
  214.     {
  215.         //正则表达式匹配字符串
  216.         var resmpbox = /(\d+),*(\d+)/.exec(parameters['mpboxSpriteXY']);
  217.         return {x: Number(resmpbox[1]), y: Number(resmpbox[2])};
  218.     }
  219.     //蓝条
  220.     var mpbarBitmap = parameters['mpbarBitmapName'];
  221.     var mpbarPosition = mpbarSpriteXY();
  222.     function mpbarSpriteXY()
  223.     {
  224.         //正则表达式匹配字符串
  225.         var resmpbar = /(\d+),*(\d+)/.exec(parameters['mpbarSpriteXY']);
  226.         return {x: Number(resmpbar[1]), y: Number(resmpbar[2])};
  227.     }
  228.     //校准蓝条
  229.     var mpcheck = checkMPpixel();
  230.     function checkMPpixel()
  231.     {
  232.         //正则表达式匹配字符串
  233.         var resMPpixel = /(\d+),*(\d+)/.exec(parameters['checkMPpixel']);
  234.         return {left: Number(resMPpixel[1]), right: Number(resMPpixel[2])};
  235.     }
  236.     //EXP精灵
  237.     //经验槽
  238.     var expboxBitmap = parameters['expboxBitmapName'];
  239.     var expboxPosition = expboxSpriteXY();
  240.     function expboxSpriteXY()
  241.     {
  242.         //正则表达式匹配字符串
  243.         var resexpbox = /(\d+),*(\d+)/.exec(parameters['expboxSpriteXY']);
  244.         return {x: Number(resexpbox[1]), y: Number(resexpbox[2])};
  245.     }
  246.     //经验条
  247.     var expbarBitmap = parameters['expbarBitmapName'];
  248.     var expbarPosition = expbarSpriteXY();
  249.     function expbarSpriteXY()
  250.     {
  251.         //正则表达式匹配字符串
  252.         var resexpbar = /(\d+),*(\d+)/.exec(parameters['expbarSpriteXY']);
  253.         return {x: Number(resexpbar[1]), y: Number(resexpbar[2])};
  254.     }
  255.     //校准经验条
  256.     var expcheck = checkEXPpixel();
  257.     function checkEXPpixel()
  258.     {
  259.         //正则表达式匹配字符串
  260.         var resEXPpixel = /(\d+),*(\d+)/.exec(parameters['checkEXPpixel']);
  261.         return {left: Number(resEXPpixel[1]), right: Number(resEXPpixel[2])};
  262.     }


  263.     //窗口部分
  264.     var WindowWidth = Number(parameters['WindowWidth'] || 400);
  265.     var WindowHeight = Number(parameters['WindowHeigh'] || 200);
  266.     var WindowOpacity = Number(parameters['WindowOpacity'] || 255);
  267.     var WindowPosition = WindowXY();
  268.     function WindowXY()
  269.     {
  270.         //正则表达式匹配字符串
  271.         var reswindowxy = /(\d+),*(\d+)/.exec(parameters['WindowXY']);
  272.         return {x: Number(reswindowxy[1]), y: Number(reswindowxy[2])};
  273.     }


  274.     //文字部分
  275.     //HP相关
  276.     var valueWidth = Number(parameters['ValueWidth'] || 30);
  277.     var textSize = Number(parameters['FontWidth'] || 24);
  278.     var HPtextPosition = hptextXY();
  279.     function hptextXY()
  280.     {
  281.         //正则表达式匹配字符串
  282.         var reshptext = /(\d+),*(\d+)/.exec(parameters['HPTextXY']);
  283.         return {x: Number(reshptext[1]), y: Number(reshptext[2])};
  284.     }

  285.     //MP相关
  286.     var MPtextPosition = mptextXY();
  287.     function mptextXY()
  288.     {
  289.         //正则表达式匹配字符串
  290.         var resmptext = /(\d+),*(\d+)/.exec(parameters['MPTextXY']);
  291.         return {x: Number(resmptext[1]), y: Number(resmptext[2])};
  292.     }
  293.     //EXP相关
  294.     var EXPtextPosition = exptextXY();
  295.     function exptextXY()
  296.     {
  297.         //正则表达式匹配字符串
  298.         var resexptext = /(\d+),*(\d+)/.exec(parameters['EXPTextXY']);
  299.         return {x: Number(resexptext[1]), y: Number(resexptext[2])};
  300.     }
  301.     //名字相关
  302.     var NamePosition = NametextXY();
  303.     function NametextXY()
  304.     {
  305.         //正则表达式匹配字符串
  306.         var resnametext = /(\d+),*(\d+)/.exec(parameters['NameTextXY']);
  307.         return {x: Number(resnametext[1]), y: Number(resnametext[2])};
  308.     }

  309.     //等级相关
  310.     var addwidth = Number(parameters['levelNumberWidth'] || "10");
  311.     var levelPosition = leveltextXY();
  312.     function leveltextXY()
  313.     {
  314.         //正则表达式匹配字符串
  315.         var resleveltext = /(\d+),*(\d+)/.exec(parameters['levelTextXY']);
  316.         return {x: Number(resleveltext[1]), y: Number(resleveltext[2])};
  317.     }
  318.     var _Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
  319.     Scene_Map.prototype.createAllWindows = function ()
  320.     {
  321.         _Scene_Map_createAllWindows.call(this);
  322.          this.addChild(new Window_HUD());
  323.     };

  324.     //-----------------------------------------------------------------------------
  325.     // Window_HUD
  326.     // HUD窗口
  327.     function Window_HUD()
  328.     {
  329.         this.initialize.apply(this, arguments);
  330.     }

  331.     Window_HUD.prototype = Object.create(Window_Base.prototype);
  332. //  Window_HUD.prototype = Object.create(Window_Selectable.prototype);
  333.     Window_HUD.prototype.constructor = Window_HUD;
  334.     //初始化
  335.     Window_HUD.prototype.initialize = function ()
  336.     {
  337.         var width = this.windowWidth();
  338.         var height = this.windowHeight();
  339.         Window_Base.prototype.initialize.call(this, WindowPosition.x, WindowPosition.y, width, height);
  340.         this.opacity = WindowOpacity;
  341.         this.actor = $gameParty.members()[0];
  342.         this.drawDIYFace($gameParty._actors[0]);
  343.         this.drawDIYHP();
  344.         this.drawDIYMP();
  345.         this.drawDIYEXP();
  346.         this.drawALLText();
  347.         this.actor.lasthp = null;
  348.         this.actor.lastmp = null;
  349.         this.actor.lastLevel = this.actor.level;
  350.         this.actor.lastexp = null;
  351.     };
  352.     //窗口宽
  353.     Window_HUD.prototype.windowWidth = function ()
  354.     {
  355.         return WindowWidth;
  356.     };
  357.     //窗口高
  358.     Window_HUD.prototype.windowHeight = function ()
  359.     {
  360.         return WindowHeight;
  361.     };
  362.    //绘制脸图精灵
  363.   Window_HUD.prototype.DIYFace = function(BitmapName)
  364.   {
  365.       var FaceSp = new Sprite();
  366.       FaceSp.bitmap = ImageManager.loadPicture(BitmapName);
  367.       this.addChild(FaceSp);
  368.       this.addChildToBack(FaceSp);
  369.       FaceSp.move(FacePosition.x, FacePosition.y);
  370.       this.MyFaceSp=FaceSp;
  371.   }
  372.     //选择脸图
  373.    Window_HUD.prototype.drawDIYFace = function (Index)
  374.    {
  375.         switch(Index)
  376.         {
  377.            case 1:
  378.            this.DIYFace(FirstFaceBitmap);
  379.            break;
  380.            case 2:
  381.            this.DIYFace(SecondFaceBitmap);
  382.            break;
  383.            case 3:
  384.            this.DIYFace(ThirdFaceBitmap);
  385.            break;
  386.            case 4:
  387.            this.DIYFace(FourFaceBitmap);
  388.            break;
  389.         }
  390.    };

  391.     //绘制HP
  392.     Window_HUD.prototype.drawDIYHP = function ()
  393.     {
  394.         //如果载入血条图.png
  395.         if (hpbarBitmap)
  396.         {
  397.             hpBar = new Sprite();
  398.             hpBar.bitmap = ImageManager.loadPicture(hpbarBitmap);
  399.             this.addChild(hpBar);
  400.             hpBar.move(hpbarPosition.x, hpbarPosition.y);
  401.             this.hpBar = hpBar;
  402.         }
  403.         //如果载入血槽图.png
  404.         if (hpboxBitmap)
  405.         {
  406.             var hpBox = new Sprite();
  407.             hpBox.bitmap = ImageManager.loadPicture(hpboxBitmap);
  408.             this.addChild(hpBox);
  409.             this.addChildToBack(hpBox);
  410.             hpBox.move(hpboxPosition.x, hpboxPosition.y);
  411.         }
  412.     };
  413.     //绘制MP
  414.     Window_HUD.prototype.drawDIYMP = function ()
  415.     {
  416.         //如果载入蓝条图.png
  417.         if (mpbarBitmap)
  418.         {
  419.             var mpBar = new Sprite();
  420.             mpBar.bitmap = ImageManager.loadPicture(mpbarBitmap);
  421.             this.addChild(mpBar);
  422.             mpBar.move(mpbarPosition.x, mpbarPosition.y);
  423.             this.mpBar = mpBar;
  424.         }
  425.         //如果载入蓝槽图.png
  426.         if (mpboxBitmap)
  427.         {
  428.             var mpBox = new Sprite();
  429.             mpBox.bitmap = ImageManager.loadPicture(mpboxBitmap);
  430.             this.addChild(mpBox);
  431.             this.addChildToBack(mpBox);
  432.             mpBox.move(mpboxPosition.x, mpboxPosition.y);
  433.         }
  434.     };

  435.     //绘制EXP
  436.     Window_HUD.prototype.drawDIYEXP = function ()
  437.     {
  438.         //如果载入EXP条图.png
  439.         if (expbarBitmap)
  440.         {
  441.             var expBar = new Sprite();
  442.             expBar.bitmap = ImageManager.loadPicture(expbarBitmap);
  443.             this.addChild(expBar);
  444.             expBar.move(expbarPosition.x, expbarPosition.y);
  445.             this.expBar = expBar;
  446.         }
  447.         //如果载入EXP槽图.png
  448.         if (expboxBitmap)
  449.         {
  450.             var expBox = new Sprite();
  451.             expBox.bitmap = ImageManager.loadPicture(expboxBitmap);
  452.             this.addChild(expBox);
  453.             this.addChildToBack(expBox);
  454.             expBox.move(expboxPosition.x, expboxPosition.y);
  455.         }
  456.     };

  457.     //绘制文本信息
  458.     Window_HUD.prototype.drawALLText= function()
  459.     {
  460.         this.contents.clear();
  461.         this.contents.fontSize = textSize;
  462. //      this.drawActorName(this.actor, NamePosition.x, NamePosition.y);
  463. //      this.drawHPText(this.actor.hp,this.actor.mhp,HPtextPosition.x,HPtextPosition.y);
  464. //      this.drawMPText(this.actor.mp,this.actor.mmp,MPtextPosition.x,MPtextPosition.y);
  465. //      this.drawEXPText(EXPtextPosition.x,EXPtextPosition.y);
  466.         this.drawLevel(this.actor, levelPosition.x, levelPosition.y, addwidth);
  467.     };
  468.     //绘制HP
  469.     Window_HUD.prototype.drawHPText=function(current,max,x,y)
  470.     {
  471.         var x1 = x - valueWidth;
  472.         var x2 = x1 - valueWidth/2;
  473.         var x3 = x2 - valueWidth;
  474.         this.drawText(current, x3, y, valueWidth, 'right');
  475.         this.drawText('/', x2, y, valueWidth/2, 'right');
  476.         this.drawText(max, x1, y, valueWidth, 'right');
  477.     };
  478.     //绘制MP
  479.     Window_HUD.prototype.drawMPText=function(current,max,x,y)
  480.     {
  481.         var x1 = x - valueWidth;
  482.         var x2 = x1 - valueWidth/2;
  483.         var x3 = x2 - valueWidth;
  484.         this.drawText(current, x3, y, valueWidth, 'right');
  485.         this.drawText('/',x2, y, valueWidth/2, 'right');
  486.         this.drawText(max, x1, y, valueWidth, 'right');
  487.     };
  488.     //绘制EXP
  489.     Window_HUD.prototype.drawEXPText=function(x,y)
  490.     {
  491.         var x1 = x - valueWidth;
  492.         var x2 = x1 - valueWidth/2;
  493.         var x3 = x2 - valueWidth;
  494.         this.drawText(this.GetCurrentExp(), x3, y, valueWidth, 'right');
  495.         this.drawText('/',x2, y, valueWidth/2, 'right');
  496.         this.drawText(this.GetMaxExp(), x1, y, valueWidth, 'right');
  497.     };
  498.     Window_HUD.prototype.GetCurrentExp=function()
  499.     {
  500.         return this.actor.currentExp()-this.actor.expForLevel(this.actor.level);
  501.     };
  502.     Window_HUD.prototype.GetMaxExp=function()
  503.     {
  504.         return this.actor.nextLevelExp()-this.actor.expForLevel(this.actor.level);
  505.     };
  506.     //绘制等级
  507.     Window_HUD.prototype.drawLevel = function (curactor, x, y, width)
  508.     {
  509.         this.changeTextColor(this.systemColor());
  510.         this.drawText(TextManager.levelA, x, y, 48);
  511.         this.resetTextColor();
  512.         this.drawText(curactor.level, x + width, y, 36, 'left');
  513.     };
  514.     //切换队员
  515.     Window_HUD.prototype.SwitchActor = function ()
  516.     {
  517.         //设置键值
  518.         if (Input.isTriggered('pageup'))
  519.         {
  520.             $gameParty._actors.push($gameParty._actors.shift());
  521.             this.actor=$gameParty.members()[0];
  522.             $gamePlayer.refresh();
  523.             this.removeChild(this.MyFaceSp);
  524.             this.drawDIYFace($gameParty._actors[0]);
  525.             if(hpbarBitmap)this.refresh_HP();
  526.             if(mpbarBitmap)this.refresh_MP();
  527.             if(expbarBitmap)this.refresh_EXP();
  528.             this.drawALLText();
  529.          }
  530.     };
  531.     //刷新HP
  532.     Window_HUD.prototype.refresh_HP = function ()
  533.     {
  534.         var down = hpcheck.down; //血条图像下端像素
  535.         var up = hpcheck.up;//血条图像上端像素
  536.         var percent = this.actor.hp / this.actor.mhp;
  537.         if(hpbarBitmap)
  538.         {
  539.             this.hpBar.height = (1 - percent) * (up - down) + down;
  540.             this.drawALLText();
  541.             this.actor.lasthp = this.actor.hp;
  542.         }
  543.     };
  544.     //刷新MP
  545.     Window_HUD.prototype.refresh_MP = function (index)
  546.     {
  547.         var left = mpcheck.left; //蓝条图像左端像素
  548.         var right = mpcheck.right;//蓝条图像右端像素
  549.         //判定当前队员序号再重绘蓝条
  550.         var percent = this.actor.mp / this.actor.mmp;
  551.         if(mpbarBitmap)
  552.         {
  553.             this.mpBar.width = percent * (right - left) + left;
  554.             this.drawALLText();
  555.             this.actor.lastmp = this.actor.mp;
  556.         }
  557.     };
  558.     //刷新EXP
  559.     Window_HUD.prototype.refresh_EXP = function (index)
  560.     {
  561.         var left = expcheck.left; //血条图像左端像素
  562.         var right = expcheck.right;//血条图像右端像素
  563.         //判定当前队员序号再重绘经验条
  564.         var percent = this.GetCurrentExp(index)/ this.GetMaxExp(index);
  565.         if(expbarBitmap)
  566.         {
  567.             this.expBar.width = percent * (right - left) + left;
  568.             this.drawALLText();
  569.             this.actor.lastexp = this.GetCurrentExp(index);
  570.         }
  571.     };
  572.     //刷新等级
  573.     Window_HUD.prototype.refresh_level = function (){
  574.         //升级满状态回复
  575.         this.actor.setHp(this.actor.mhp);
  576.         this.actor.setMp(this.actor.mmp);
  577.         //重绘血条
  578.         this.refresh_HP();
  579.         //重绘蓝条
  580.         this.refresh_MP();
  581.         this.actor.lastLevel=this.actor.level;
  582.     };
  583.     Window_HUD.prototype.update = function ()
  584.     {
  585.         this.SwitchActor();
  586.         if(this.actor.hp!=this.actor.lasthp)
  587.             this.refresh_HP();
  588.         if(this.actor.mp!=this.actor.lastmp)
  589.             this.refresh_MP();
  590.         if (this.GetCurrentExp()!=this.actor.lastexp)
  591.             this.refresh_EXP();
  592.         if(this.actor.level!=this.actor.lastLevel)
  593.             this.refresh_level();
  594.     };
  595. })();
复制代码

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2017-11-8 23:19:43 | 显示全部楼层
可用SDR的Super Tools Engine > HUD Maker
https://rpg.blue/thread-400405-1-5.html
回复

使用道具 举报

梦石
0
星屑
22794
在线时间
2623 小时
注册时间
2015-7-4
回帖
918
 楼主| 发表于 2017-11-20 12:40:03 | 显示全部楼层

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

评分

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

查看全部评分

回复

使用道具 举报

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

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

点评

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

使用道具 举报

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

使用道具 举报

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

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

点评

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

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部