Project1

标题: 怎么把菜单中的HP槽和MP槽加长? [打印本页]

作者: 逸生ya    时间: 2021-8-30 01:30
标题: 怎么把菜单中的HP槽和MP槽加长?
本帖最后由 逸生ya 于 2021-8-30 01:32 编辑

如题,需要插件还是改代码?

4.PNG (20.99 KB, 下载次数: 22)

这个原版显示

这个原版显示

6.PNG (82.57 KB, 下载次数: 17)

这个是改过的

这个是改过的

作者: xiamumomo    时间: 2021-9-4 19:02
JAVASCRIPT 代码复制下载
  1. Window_Base.prototype.drawActorSimpleStatus = function(actor, x, y, width) {
  2.     var lineHeight = this.lineHeight();
  3.     var x2 = x + 180;
  4.     var width2 = Math.min(200, width - 180 - this.textPadding());
  5.     this.drawActorName(actor, x, y);
  6.     this.drawActorLevel(actor, x, y + lineHeight * 1);
  7.     this.drawActorIcons(actor, x, y + lineHeight * 2);
  8.     this.drawActorClass(actor, x2, y);
  9.     this.drawActorHp(actor, x2, y + lineHeight * 1, width2);
  10.     this.drawActorMp(actor, x2, y + lineHeight * 2, width2);
  11. };

这个是菜单的   如果状态也需要的话再找我
打开工程文件的JS里面有一个rpg_windows.js你可以用记事本或者DW打开  
然后找到这一串代码   
如何修改  width2 这个是宽度 你可以修改基础值var width2 = Math.min(200, width - 180 - this.textPadding());
或则直接在 this.drawActorHp(actor, x2, y + lineHeight * 1, width2 * 2);基础值 X 2长度
虽然你HP显示条长度增加但是需要修改X2位置因为X2相当于显示起点
如果还有不会的可以加群问吧  727783732  密码5378938

QQ图片20210904185936.png (381.28 KB, 下载次数: 32)

QQ图片20210904185936.png





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