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

Project1

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

[有事请教] 该怎么去掉状态栏的经验、等级、攻击力那些词条?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
112
在线时间
10 小时
注册时间
2023-8-5
帖子
2
跳转到指定楼层
1
发表于 2023-9-6 08:15:43 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
这边是刚自学rm三个月的萌新,因为做的是很普通的恐解,不需要用到等级、攻击力之类的词条,但是又想给角色写上人物介绍,想问问各位大佬有没有什么办法能去掉那些词条(谢谢!!!)
*这边也一直在尝试找插件,游戏还有个随时读取存档的插件,不知道会不会有兼容性的问题

520a6625ecd2174938e3b0d38814f1a2.png (1009.63 KB, 下载次数: 14)

520a6625ecd2174938e3b0d38814f1a2.png

Lv4.逐梦者

梦石
0
星屑
6516
在线时间
944 小时
注册时间
2006-7-18
帖子
509
2
发表于 2023-9-6 22:17:02 | 只看该作者
如果仅仅是状态栏的话,可以试试这个,以前找人帮写的一段,然后在显示装备 数值那两行代码用 // 两个斜杠注释掉就行了,其他项目也是,只注释 显示数据的哪一行就好,注释其他多余的代码可能导致出错(本质上也只是正常运算,不显示出来而已)
一个一个测试吧!

  1. //=============================================================================
  2. // Window_Status
  3. //=============================================================================
  4. /*:
  5. * @plugindesc 状态栏重新排版
  6. *
  7. */
  8. //-----------------------------------------------------------------------------

  9. Window_Status.prototype = Object.create(Window_Selectable.prototype);
  10. Window_Status.prototype.constructor = Window_Status;
  11. Window_Status.prototype.initialize = function() {
  12.     var width = Graphics.boxWidth-200;
  13.     var height = Graphics.boxHeight/1.6;
  14.     Window_Selectable.prototype.initialize.call(this, 100, 50, width, height);
  15.     this.refresh();
  16.     this.activate();
  17. };
  18. function Window_Status() {
  19.     this.initialize.apply(this, arguments);
  20. }
  21. Window_Status.prototype.setActor = function(actor) {
  22.     if (this._actor !== actor) {
  23.         this._actor = actor;
  24.         this.refresh();
  25.     }
  26. };

  27. Window_Status.prototype.refresh = function() {
  28.     this.contents.clear();
  29.     if (this._actor) {
  30.         var lineHeight = this.lineHeight();
  31.         this.drawBlock1(lineHeight * 0);
  32.         this.drawHorzLine(lineHeight * 1);
  33.         this.drawBlock2(lineHeight * 2);
  34.         this.drawHorzLine(lineHeight * 6);
  35.         this.drawBlock3(lineHeight * 7);
  36.         this.drawHorzLine(lineHeight * 13);
  37.         this.drawBlock4(lineHeight * 14);
  38.     }
  39. };
  40. //角色名字 职业 称号位置
  41. Window_Status.prototype.drawBlock1 = function(y) {
  42.     this.contents.fontSize = 25;
  43.     this.drawActorName(this._actor, 140, y);   //名字
  44.     this.drawActorClass(this._actor, 140, y+40);//职业
  45.     this.drawActorNickname(this._actor, 400, y);//称号
  46. };

  47. //显示头像
  48. Window_Status.prototype.drawBlock2 = function(y) {
  49.    // this.drawActorFace(this._actor, 10, 10);
  50.     this.drawBasicInfo(200, y);
  51.     this.drawExpInfo(400, y);
  52. };


  53. //装备,能力值显示的位置
  54. Window_Status.prototype.drawBlock3 = function(y) {
  55.     this.contents.fontSize = 25;
  56.     this.drawEquipments(10, y -70);//装备显示的位置
  57.     this.drawParameters(300, y -70);//能力值显示的位置
  58. };

  59. Window_Status.prototype.drawBlock4 = function(y) {
  60.     this.drawProfile(6, y);//人物简介
  61. };

  62. Window_Status.prototype.drawHorzLine = function(y) {
  63.     var lineY = y + this.lineHeight() / 2 - 1;
  64.     this.contents.paintOpacity = 48;
  65.     this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor());
  66.     this.contents.paintOpacity = 255;
  67. };

  68. Window_Status.prototype.lineColor = function() {
  69.     return this.normalColor();
  70. };
  71. //等级 异常状态图标 HP MP位置
  72. Window_Status.prototype.drawBasicInfo = function(x, y) {
  73.     this.contents.fontSize = 25;
  74.     var lineHeight = this.lineHeight();
  75.     this.drawActorLevel(this._actor, 140, y + lineHeight * 0);
  76.     this.drawActorIcons(this._actor, 10, y + lineHeight * 1 + 20);
  77.     this.drawActorHp(this._actor, 140, y + lineHeight * 1 -10);
  78.     this.drawActorMp(this._actor, 140, y + lineHeight * 2 );
  79. };
  80. //HP MP数值描绘
  81. Window_Status.prototype.drawParameters = function(x, y) {
  82.     this.contents.fontSize = 25;
  83.     var lineHeight = this.lineHeight();
  84.     for (var i = 0; i < 6; i++) {
  85.         var paramId = i + 2;
  86.         var y2 = y + lineHeight * i;      
  87.         this.changeTextColor(this.systemColor());
  88.         this.drawText(TextManager.param(paramId), x, y2, 160);
  89.         this.resetTextColor();
  90.         this.drawText(this._actor.param(paramId), x + 160, y2, 60, 'right');
  91.     }
  92. };

  93. //绘制经验值位置
  94. Window_Status.prototype.drawExpInfo = function(x, y) {
  95.     var lineHeight = this.lineHeight();
  96.     this.contents.fontSize = 25;
  97.     //var expTotal = TextManager.expTotal.format(TextManager.exp);
  98.     var expNext = TextManager.expNext.format(TextManager.level);
  99.     //var value1 = this._actor.currentExp();
  100.     var value2 = this._actor.nextRequiredExp();
  101.     if (this._actor.isMaxLevel()) {
  102.        // value1 = '-----';
  103.         value2 = '-----';
  104.     }
  105.    
  106.     this.changeTextColor(this.systemColor());
  107.    
  108.     //this.drawText(expTotal, x, y + lineHeight * 1 - 70 , 160,'right');
  109.     this.drawText(expNext, x, y + lineHeight * 4 - 70 , 110,'right');
  110.     this.resetTextColor();
  111.     //this.drawText(value1, x, y + lineHeight * 2 - 70 , 160,'right');
  112.     this.drawText(value2, x, y + lineHeight * 4 - 70 , 160,'right');
  113. };

  114. //装备显示
  115. Window_Status.prototype.drawEquipments = function(x, y) {
  116.     this.contents.fontSize = 25;
  117.     var equips = this._actor.equips();
  118.     var count = Math.min(equips.length, this.maxEquipmentLines());
  119.     for (var i = 0; i < count; i++) {
  120.         this.drawItemName(equips[i], x, y + this.lineHeight() * i);
  121.     }
  122. };

  123. //显示简介
  124. Window_Status.prototype.drawProfile = function(x, y) {
  125.     this.drawTextEx(this._actor.profile(), x, y);
  126. };

  127. Window_Status.prototype.maxEquipmentLines = function() {
  128.     return 6;
  129. };

  130. //-----------------------------------------------------------------------------
  131. // Window_Status2_xiamian
  132. //在下方显示一个简介窗口
  133. // The window for displaying full status on the status screen.

  134. var Status_xiamian_create = Scene_Status.prototype.create
  135. Scene_Status.prototype.create = function() {
  136.     Status_xiamian_create.call(this);
  137.     this._status_xiamianWindow = new Window_Status_xiamian();
  138.     this.addWindow(this._status_xiamianWindow);
  139. };

  140. var Status_xiamian_refreshActor = Scene_Status.prototype.refreshActor
  141. Scene_Status.prototype.refreshActor = function() {
  142.         Status_xiamian_refreshActor.call(this);
  143.     var actor = this.actor();
  144.     this._status_xiamianWindow.setActor(actor);
  145. };


  146. function Window_Status_xiamian() {
  147.     this.initialize.apply(this, arguments);
  148. }

  149. Window_Status_xiamian.prototype = Object.create(Window_Selectable.prototype);
  150. Window_Status_xiamian.prototype.constructor = Window_Status_xiamian;


  151. Window_Status_xiamian.prototype.initialize = function() {
  152.     var width = Graphics.boxWidth;
  153.     var height = Graphics.boxHeight/4;
  154.         var x = 0
  155.         var y = Graphics.boxHeight/1.4
  156.     Window_Selectable.prototype.initialize.call(this, x, y, width, height);
  157.     this._actor = null;
  158.     this.refresh();
  159.     this.activate();
  160. };

  161. Window_Status_xiamian.prototype.setActor = function(actor) {
  162.     if (this._actor !== actor) {
  163.         this._actor = actor;
  164.         this.refresh();
  165.     }
  166. };

  167. Window_Status_xiamian.prototype.refresh = function() {
  168.     this.contents.clear();
  169.         if (!this._actor) {return}
  170.         console.log(this._actor)
  171.         
  172.         this.drawTextEx(this._actor.profile(), 0, 0);
  173.       
  174. };

  175. //-----------------------------------------------------------------------------
  176. // Window_Status_xiamian
  177. //在上方显示一个头像窗口
  178. // The window for displaying full status on the status screen.

  179. var Status_xiamian2_create = Scene_Status.prototype.create
  180. Scene_Status.prototype.create = function() {
  181.     Status_xiamian2_create.call(this);
  182.     this._status_xiamian2Window = new Window_Status_xiamian2();
  183.     this.addWindow(this._status_xiamian2Window);
  184. };

  185. var Status_xiamian2_refreshActor = Scene_Status.prototype.refreshActor
  186. Scene_Status.prototype.refreshActor = function() {
  187.         Status_xiamian2_refreshActor.call(this);
  188.     var actor = this.actor();
  189.     this._status_xiamian2Window.setActor(actor);
  190. };


  191. function Window_Status_xiamian2() {
  192.     this.initialize.apply(this, arguments);
  193. }

  194. Window_Status_xiamian2.prototype = Object.create(Window_Selectable.prototype);
  195. Window_Status_xiamian2.prototype.constructor = Window_Status_xiamian2;


  196. Window_Status_xiamian2.prototype.initialize = function() {
  197.     var width2 = 156;
  198.     var height2 = 156;
  199.         var x = 80
  200.         var y = 30
  201.     Window_Selectable.prototype.initialize.call(this, x, y, width2, height2);
  202.     this._actor = null;
  203.     this.refresh();
  204.     this.activate();
  205. };

  206. Window_Status_xiamian2.prototype.setActor = function(actor) {
  207.     if (this._actor !== actor) {
  208.         this._actor = actor;
  209.         this.refresh();
  210.     }
  211. };

  212. Window_Status_xiamian2.prototype.refresh = function() {
  213.     this.contents.clear();
  214.         if (!this._actor) {return}
  215.         console.log(this._actor)
  216.         this.drawActorFace(this._actor, -12, -12);
  217.       
  218. };
复制代码
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
112
在线时间
10 小时
注册时间
2023-8-5
帖子
2
3
 楼主| 发表于 2023-9-7 01:01:12 | 只看该作者
雷影 发表于 2023-9-6 22:17
如果仅仅是状态栏的话,可以试试这个,以前找人帮写的一段,然后在显示装备 数值那两行代码用 // 两个斜杠 ...

好 好 好 已经解决了!!谢谢!!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-23 20:11

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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