查看: 1303|回复: 4

[有事请教] 装备栏、状态栏属性过高显示缩小问题

[复制链接]
梦石
0
星屑
6412
在线时间
1700 小时
注册时间
2018-1-16
回帖
364
发表于 2025-4-6 11:29:16 | 显示全部楼层 |阅读模式
悬赏145星屑已解决
大佬们,问个问题,属性太高了,状态栏、装备栏那里显示很小,有没有什么办法显示大一些???
KY]@]G8VGH_L4DAV3AQ}_(2.png

最佳答案

查看完整内容

rmmz_windows.js 第 2580 行附近有以下很多函数,可以试着更改其中的一些数字比如那个 return 48;
梦石
2
星屑
8479
在线时间
463 小时
注册时间
2021-12-4
回帖
486

MZ评测员

发表于 2025-4-6 11:29:17 | 显示全部楼层
rmmz_windows.js 第 2580 行附近有以下很多函数,可以试着更改其中的一些数字比如那个 return 48;
  1. Window_EquipStatus.prototype.drawAllParams = function() {
  2.     for (let i = 0; i < 6; i++) {
  3.         const x = this.itemPadding();
  4.         const y = this.paramY(i);
  5.         this.drawItem(x, y, 2 + i);
  6.     }
  7. };

  8. Window_EquipStatus.prototype.drawItem = function(x, y, paramId) {
  9.     const paramX = this.paramX();
  10.     const paramWidth = this.paramWidth();
  11.     const rightArrowWidth = this.rightArrowWidth();
  12.     this.drawParamName(x, y, paramId);
  13.     if (this._actor) {
  14.         this.drawCurrentParam(paramX, y, paramId);
  15.     }
  16.     this.drawRightArrow(paramX + paramWidth, y);
  17.     if (this._tempActor) {
  18.         this.drawNewParam(paramX + paramWidth + rightArrowWidth, y, paramId);
  19.     }
  20. };

  21. Window_EquipStatus.prototype.drawParamName = function(x, y, paramId) {
  22.     const width = this.paramX() - this.itemPadding() * 2;
  23.     this.changeTextColor(ColorManager.systemColor());
  24.     this.drawText(TextManager.param(paramId), x, y, width);
  25. };

  26. Window_EquipStatus.prototype.drawCurrentParam = function(x, y, paramId) {
  27.     const paramWidth = this.paramWidth();
  28.     this.resetTextColor();
  29.     this.drawText(this._actor.param(paramId), x, y, paramWidth, "right");
  30. };

  31. Window_EquipStatus.prototype.drawRightArrow = function(x, y) {
  32.     const rightArrowWidth = this.rightArrowWidth();
  33.     this.changeTextColor(ColorManager.systemColor());
  34.     this.drawText("\u2192", x, y, rightArrowWidth, "center");
  35. };

  36. Window_EquipStatus.prototype.drawNewParam = function(x, y, paramId) {
  37.     const paramWidth = this.paramWidth();
  38.     const newValue = this._tempActor.param(paramId);
  39.     const diffvalue = newValue - this._actor.param(paramId);
  40.     this.changeTextColor(ColorManager.paramchangeTextColor(diffvalue));
  41.     this.drawText(newValue, x, y, paramWidth, "right");
  42. };

  43. Window_EquipStatus.prototype.rightArrowWidth = function() {
  44.     return 32;
  45. };

  46. Window_EquipStatus.prototype.paramWidth = function() {
  47.     return 48; // 这里很可疑
  48. };

  49. Window_EquipStatus.prototype.paramX = function() {
  50.     const itemPadding = this.itemPadding();
  51.     const rightArrowWidth = this.rightArrowWidth();
  52.     const paramWidth = this.paramWidth();
  53.     return this.innerWidth - itemPadding - paramWidth * 2 - rightArrowWidth;
  54. };

  55. Window_EquipStatus.prototype.paramY = function(index) {
  56.     const faceHeight = ImageManager.standardFaceHeight;
  57.     return faceHeight + Math.floor(this.lineHeight() * (index + 1.5));
  58. };
复制代码
回复

使用道具 举报

梦石
0
星屑
6412
在线时间
1700 小时
注册时间
2018-1-16
回帖
364
 楼主| 发表于 2025-4-6 18:12:47 | 显示全部楼层
小秋橙 发表于 2025-4-6 12:33
rmmz_windows.js 第 2580 行附近有以下很多函数,可以试着更改其中的一些数字比如那个 return 48;
...

完美老哥装备栏那里没问题了,状态栏呢,在那修改呢
回复

使用道具 举报

梦石
2
星屑
8479
在线时间
463 小时
注册时间
2021-12-4
回帖
486

MZ评测员

发表于 2025-4-11 12:12:11 | 显示全部楼层
l734273398 发表于 2025-4-6 18:12
完美老哥装备栏那里没问题了,状态栏呢,在那修改呢

抱歉让楼主久等了,状态栏中的六项属性相关代码在 rmmz_windows.js 第 2900 行左右。
[pre lang="js" line="2892"]//-----------------------------------------------------------------------------
// Window_StatusParams
//
// The window for displaying parameters on the status screen.

function Window_StatusParams() {
    this.initialize(...arguments);
}

Window_StatusParams.prototype = Object.create(Window_StatusBase.prototype);
Window_StatusParams.prototype.constructor = Window_StatusParams;

Window_StatusParams.prototype.initialize = function(rect) {
    Window_StatusBase.prototype.initialize.call(this, rect);
    this._actor = null;
};

Window_StatusParams.prototype.setActor = function(actor) {
    if (this._actor !== actor) {
        this._actor = actor;
        this.refresh();
    }
};

Window_StatusParams.prototype.maxItems = function() {
    return 6;
};

Window_StatusParams.prototype.itemHeight = function() {
    return this.lineHeight();
};

Window_StatusParams.prototype.drawItem = function(index) {
    const rect = this.itemLineRect(index);
    const paramId = index + 2;
    const name = TextManager.param(paramId);
    const value = this._actor.param(paramId);
    this.changeTextColor(ColorManager.systemColor());
    this.drawText(name, rect.x, rect.y, 160);
    this.resetTextColor();
    this.drawText(value, rect.x + 160, rect.y, 60, "right"); // 这里的 160 和 60 以及上面的 160 非常可疑
};

Window_StatusParams.prototype.drawItemBackground = function(/*index*/) {
    //
};[/pre]
回复

使用道具 举报

梦石
0
星屑
6412
在线时间
1700 小时
注册时间
2018-1-16
回帖
364
 楼主| 发表于 2025-4-11 13:10:10 | 显示全部楼层
小秋橙 发表于 2025-4-11 12:12
抱歉让楼主久等了,状态栏中的六项属性相关代码在 rmmz_windows.js 第 2900 行左右。
//---------------- ...

似乎没效果
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部