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

Project1

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

[已经过期] 如何在事件内修改角色的注释

[复制链接]

Lv4.逐梦者

梦石
0
星屑
18344
在线时间
190 小时
注册时间
2015-10-28
帖子
46
跳转到指定楼层
1
发表于 2017-9-26 00:00:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
比如说某角色的注释(注意不是角色简介)是 <Text Color: 29>
如何通过事件把这行修改成 <Text Color: 30>?
因为很多js插件都是只要插入注释就能达到相应效果,但有些插件没有提供如何更改这些效果的命令,所以我想到一个方法就是通过修改注释来达到改变插件效果。
这个想法要如何操作呢?

Lv2.观梦者

梦石
0
星屑
852
在线时间
231 小时
注册时间
2013-10-30
帖子
159
2
发表于 2017-9-28 14:25:24 | 只看该作者
直接修改没什么办法。。。(好吧 是我想不到。。)
不过貌似可以换个思路。用变量监控你这个角色A的所有属性。。然后更换角色A变成B 然后把A的属性带入B。。。
这样就有不同的注释了。。
不知道你明白了么
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
18344
在线时间
190 小时
注册时间
2015-10-28
帖子
46
3
 楼主| 发表于 2017-9-29 11:57:58 | 只看该作者
m328759997 发表于 2017-9-28 14:25
直接修改没什么办法。。。(好吧 是我想不到。。)
不过貌似可以换个思路。用变量监控你这个角色A的所有属性 ...

明白倒是明白,这个我也想过,就是直接换一个角色……
但是因为我游戏角色多,不熟悉js,如果换角色的话工程量就会很大很大而且还有不可预知的bug。
这个问题我一直找不到怎么解决……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
179
在线时间
197 小时
注册时间
2015-12-26
帖子
35
4
发表于 2017-9-29 12:37:04 | 只看该作者
修改note的插件也没用,因为note一般来说只读取一次,所以还是得用插入代码的形式修改
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33324
在线时间
10515 小时
注册时间
2009-3-15
帖子
4762
5
发表于 2017-9-29 13:12:32 | 只看该作者
注译是从数据库直接读取的吧.. 並不存在存档里 那么如果中途修改注译..
然后读取修改前的进度效果还是修改后的?
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
18344
在线时间
190 小时
注册时间
2015-10-28
帖子
46
6
 楼主| 发表于 2017-9-29 15:56:33 | 只看该作者
diynopose 发表于 2017-9-29 12:37
修改note的插件也没用,因为note一般来说只读取一次,所以还是得用插入代码的形式修改 ...

明白了。想要直接改注释是行不通的……那么就是应该把那个插件研究一下咯
对于这方面真的不擅长,不过还是去试试看吧。

点评

最好的方法就是找到这个注释改变的变量,再手动修改变量就可以了  发表于 2017-9-29 16:05
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
18344
在线时间
190 小时
注册时间
2015-10-28
帖子
46
7
 楼主| 发表于 2017-9-29 15:58:30 | 只看该作者
soulsaga 发表于 2017-9-29 13:12
注译是从数据库直接读取的吧.. 並不存在存档里 那么如果中途修改注译..
然后读取修改前的进度效果还是修改 ...

我刚也想到了,大概会导致重新开始游戏之后也会显示修改之后的结果吧。

点评

你可以发插件脚本出来让大家研究..  发表于 2017-9-29 17:34
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
18344
在线时间
190 小时
注册时间
2015-10-28
帖子
46
8
 楼主| 发表于 2017-10-1 12:11:29 | 只看该作者
soulsaga 发表于 2017-9-29 13:12
注译是从数据库直接读取的吧.. 並不存在存档里 那么如果中途修改注译..
然后读取修改前的进度效果还是修改 ...

插件是从哪里找的已经忘了……无法注明出处
  1. //=============================================================================
  2. // Blackmorning Engine Plugins - Equip Core
  3. // BM_EquipCore.js
  4. //=============================================================================

  5. var Imported = Imported || {};
  6. Imported.BM_EquipCore = true;

  7. var BM = BM || {};
  8. //=============================================================================
  9. /*:
  10. * @plugindesc VK视觉设备场景(v1.00)装备窗口
  11. *设备身体&图标设置
  12. * @author Blackmorning
  13. *
  14. * @param ---General---
  15. * @default
  16. *
  17. * @param WindowAlign
  18. * @desc 命令窗口的位置。
  19. * left     right
  20. * @default right
  21. *
  22. * @param HideEquipItemList
  23. * @desc 直到选择隐藏或显示项目列表。
  24. * Show - false     Hide - true
  25. * @default true
  26. *
  27. * @param HelpEquip
  28. * @desc 的文本命令装备。
  29. * @default Manually equip items
  30. *
  31. * @param HelpOptimize
  32. * @desc 优化的文本命令。
  33. * @default Automatically equip the best items
  34. *
  35. * @param HelpRemove
  36. * @desc 文本的命令删除。
  37. * @default Unequip all items
  38. *
  39. * @param ---Slot Window---
  40. * @default
  41. *
  42. * @param EquipmentType
  43. * @desc 使用图标或槽的名字。
  44. * icons     names
  45. * @default names
  46. *
  47. * @param EquipmentIcons
  48. * @desc 每个设备的图标。
  49. * 单独的图标标识的空间。
  50. * @default 97 128 130 135 145
  51. *
  52. * @param ---Status Window---
  53. * @default
  54. *
  55. * @param EquipParameters
  56. * @desc 当比较显示设备参数。
  57. * 单独的参数空间。*看到帮助*
  58. * @default mhp atk def mat mdf agi luk hit cri
  59. *
  60. * @param ParametersFontSize
  61. * @desc 字体大小的参数。
  62. * @default 28
  63. *
  64. * @param BodyInStatus
  65. * @desc 让背后的身体形象显示参数。
  66. * Show - true     Hide - false
  67. * @default false
  68. *
  69. * @param ComparePlusIcon
  70. * @desc 选择图标显示积极的属性变化。
  71. * default - leave blank to show none.
  72. * @default
  73. *
  74. * @param CompareMinusIcon
  75. * @desc 选择图标显示负属性的变化。
  76. * default - leave blank to show none.
  77. * @default
  78. *
  79. * @param ---Body Window---
  80. * @default
  81. *
  82. * @param BodyWindowWidth
  83. * @desc使身体窗口的宽度。
  84. * default 400
  85. * @default 400
  86. *
  87. * @param BodyImage
  88. * @desc 默认的身体形象。 (在 Img\Pictures)
  89. * @default equip_m
  90. *
  91. * @param BodyPadding
  92. * @desc 调整身体的填充窗口图像可以对窗口框架。
  93. * @default 10
  94. *
  95. * @param EquipmentFramed
  96. * @desc 图标是陷害。
  97. * Show - true     Hide - false
  98. * @default true
  99. *
  100. * @param ScaleEquipIcons
  101. * @desc 扩展/乘数的大小项目图标的身体。
  102. * (基于默认图标大小)
  103. * @default 1
  104. *
  105. * @param IconXLocation
  106. * @desc 给每个图标的默认x坐标。
  107. *独立的x空间。
  108. * @default 60 160 108 108 40 40
  109. *
  110. * @param IconYLocation
  111. * @desc 给每个图标的默认y定位。
  112. *独立的空间y。
  113. * @default 330 330 60 220 100 220
  114. *
  115. * @param ---Parameters Vocab---
  116. * @default
  117. *
  118. * @param MhpVocab
  119. * @desc 词汇对于maxHp
  120. *违约——保留为空白则使用数据库条目。
  121. * @default Hit Points
  122. *
  123. * @param MmpVocab
  124. * @desc 词汇对于maxMp
  125. *违约——保留为空白则使用数据库条目。
  126. * @default
  127. *
  128. * @param AtkVocab
  129. * @desc atk词汇
  130. *违约——保留为空白则使用数据库条目。
  131. * @default
  132. *
  133. * @param DefVocab
  134. * @desc Vocab for def
  135. * default - leave blank to use the database's entry.
  136. * @default
  137. *
  138. * @param MatVocab
  139. * @desc Vocab for mat
  140. * default - leave blank to use the database's entry.
  141. * @default
  142. *
  143. * @param MdfVocab
  144. * @desc Vocab for mdf
  145. * default - leave blank to use the database's entry.
  146. * @default
  147. *
  148. * @param AgiVocab
  149. * @desc Vocab for agi
  150. * default - leave blank to use the database's entry.
  151. * @default
  152. *
  153. * @param LukVocab
  154. * @desc Vocab for luk
  155. * default - leave blank to use the database's entry.
  156. * @default
  157. *
  158. * @param HitVocab
  159. * @desc Vocab for hit
  160. * default - leave blank to use the database's entry.
  161. * @default
  162. *
  163. * @param EvaVocab
  164. * @desc Vocab for eva
  165. * default - leave blank to use the database's entry.
  166. * @default
  167. *
  168. * @param CriVocab
  169. * @desc Vocab for cri
  170. * default Critical Rate
  171. * @default Critical Rate   
  172. *
  173. * @param CevVocab
  174. * @desccev的词汇
  175. *默认暴击逃税
  176. * @default Crit Evasion
  177. *
  178. * @param MevVocab
  179. * @desc 兆电子伏的词汇
  180. *默认魔法逃税
  181. * @default Magic Evasion
  182. *
  183. * @param MrfVocab
  184. * @desc词汇对磁流变液
  185. *默认m .反射
  186. * @default M. Reflection
  187. *
  188. * @param CntVocab
  189. * @desc 词汇的问
  190. *默认反击
  191. * @default Counterattack
  192. *
  193. * @param HrgVocab
  194. * @desc hrg的词汇
  195. *默认惠普回复速度
  196. * @default HP Regen Rate
  197. *
  198. * @param MrgVocab
  199. * @desc 词汇的著
  200. *默认MP回复速度
  201. * @default MP Regen Rate
  202. *
  203. * @param TrgVocab
  204. * @desc 词汇的丹
  205. *默认TP回复速度
  206. * @default TP Regen Rate
  207. *
  208. * @param TgrVocab
  209. * @desc词汇的丹
  210. *缺省目标利率
  211. * @default Target Rate
  212. *
  213. * @param GrdVocab
  214. * @desc 词汇的研磨
  215. *违约保护效应
  216. * @default Guard Effect
  217. *
  218. * @param RecVocab
  219. * @desc词汇为矩形
  220. *默认恢复效果
  221. * @default Recovery Effect
  222. *
  223. * @param PhaVocab
  224. * @desc pha的词汇
  225. *默认药理学
  226. * @default Pharmacology
  227. *
  228. * @param McrVocab
  229. * @desc mcr的词汇
  230. *默认议员成本率
  231. * @default MP Cost Rate
  232. *
  233. * @param TcrVocab
  234. * @desc词汇的识别
  235. *默认TP成本率
  236. * @default TP Cost Rate
  237. *
  238. * @param PdrVocab
  239. * @desc 词汇对pdr
  240. % *默认物理伤害
  241. * @default Phys Damage %
  242. *
  243. * @param MdrVocab
  244. * @desc 词汇对于mdr
  245. % *默认魔法伤害
  246. * @default Magic Damage %
  247. *
  248. * @param FdrVocab
  249. * @desc 词汇对于罗斯福
  250. % *默认层损害
  251. * @default Floor Damage %
  252. *
  253. * @param ExrVocab
  254. * @desc 词汇的exr
  255. *默认Exp获得率
  256. * @default Exp Gain Rate
  257. *
  258. * @help
  259. * ============================================================================
  260. * Introduction
  261. * ============================================================================
  262. * 标题:BM VK设备现场
  263. *作者:Blackmorning
  264. *版本:1.00
  265. *网站:http://bmscripts.weebly.com/vk-equip.html
  266. *视觉装备场景如“瓦尔基里故事”为RPG VX的制造商
  267. * Hanzo木村
  268. * -图标可以分配给设备槽
  269. *——视觉设备放置到一个图像上
  270. * -图像可以分配给演员/数据库Notebox类
  271. *(演员优先)
  272. * - - -窗口填充可以进行调整,以消除图像的截止。
  273. *文本仍然是正确放置。
  274. *——图像可以分配给数据库Notebox武器/盔甲
  275. * -设备图标位置可以分配/改变以匹配新的图像
  276. *——决定哪些参数显示/比较(使用下面的符号表)
  277. *——决定什么参数
  278. *
  279. *内置参数表:
  280. *
  281. * ============================
  282. * | Symbol |      Name       |
  283. * ============================
  284. * | mhp    | Max HP          |
  285. * | mmp    | Max MP          |
  286. * | atk    | Attack          |
  287. * | def    | Defense         |
  288. * | mat    | M.Attack        |
  289. * | mdf    | M.Defense       |
  290. * | agi    | Agility         |
  291. * | luk    | Luck            |
  292. * =======================================
  293. * | hit    | Hit Rate        | percent  |
  294. * | eva    | Evasion         | percent  |
  295. * | cri    | Critical Rate   | percent  |
  296. * | cev    | Crit Evasion    | percent  |
  297. * | mev    | Magic Evasion   | percent  |
  298. * | mrf    | M. Reflection   | percent  |
  299. * | cnt    | Counterattack   | percent  |
  300. * | hrg    | HP Regen Rate   | percent  |
  301. * | mrg    | MP Regen Rate   | percent  |
  302. * | trg    | TP Regen Rate   | percent  |
  303. * =======================================
  304. * | tgr    | Target Rate     | percent  |
  305. * | grd    | Guard Effect    | percent  |
  306. * | rec    | Recovery Effect | percent  |
  307. * | pha    | Pharmacology    | percent  |
  308. * | mcr    | MP Cost Rate    | percent  |
  309. * | tcr    | TP Cost Rate    | percent  |
  310. * | pdr    | Phys Damage %   | percent  |
  311. * | mdr    | Magic Damage %  | percent  |
  312. * | fdr    | Floor Damage %  | percent  |
  313. * | exr    | Exp Gain Rate   | percent  |
  314. * =======================================
  315. *
  316. * ============================================================================
  317. * Notetags
  318. * ============================================================================
  319. *
  320. * 您可以使用以下notetags改变演员/类的设备设置。
  321. * - - - - - - - - - - - - - - - - - - - - - - - - -
  322. *演员/类Notetags:
  323. * - - - - - - - - - - - - - - - - - - - - - - - - -
  324. * <ebodyimage: x>
  325. - x必须从Img \图片文件夹中对应的文件名。
  326. *
  327. *对于那些购买了“封面人物包”和复制数据
  328. *到他们的项目, <Portrait: Package1_1>使用将是一个很好的例子。
  329. *
  330. *< ebodyscale:x >——指定所需的扩展的身体形象。
  331. * x = 1提供了默认缩放行为;x = 0.5一半大小,而
  332. * x = 2双打。注意图像是局限于体内的形象
  333. *窗口。
  334. *
  335. *如果没有提供,比例因子将默认为1,使用原始的
  336. *图像大小。
  337. *
  338. * < ebodyoffset:- x - y >
  339. * < ebodyoffset:+ x + y >
  340. *——指定一个偏移量从默认定位用于身体形象。
  341. *积极x移动图像进一步对吧,- x移动了。
  342. *积极y移动图像进一步下降,- y移动。
  343. *注:图像可能导致剪这样的调整。
  344. *装备窗口的边界将自动覆盖的部分
  345. *图像。
  346. *
  347. * < eiconid:x,y > id作为设备位置,x,y的位置。
  348. *这改变演员的插槽位置无论上市。
  349. *一个演员的自定义装备槽将优先于类的
  350. *自定义装备槽,将优先于默认装备槽。
  351. * - - - - - - - - - - - - - - - - - - - - - - - - -
  352. *武器/盔甲Notetags:
  353. * - - - - - - - - - - - - - - - - - - - - - - - - -
  354. * < eiconimage:string >
  355. *——使用一个图片Img \ \你的RPG制造商MV项目的图片
  356. *目录的文件名“字符串”(没有扩展)的形象
  357. *图片。将调整大小的盒子。
  358. *
  359. * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  360. *更新日志
  361. * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  362. *
  363. * 1.00版本:2014 - 11月24日
  364. *——完成插件!
  365. */
  366. //=============================================================================

  367. //=============================================================================
  368. // Parameter Variables
  369. //=============================================================================
  370. BM.Parameters = PluginManager.parameters('BM_EquipCore');
  371. BM.Equip = BM.Equip || {};
  372. BM.Icon = BM.Icon || {};
  373. BM.Vocab = BM.Vocab || {};

  374. BM.Equip.EWindowAlign = String(BM.Parameters['WindowAlign'] || 'right');
  375. BM.Equip.EBodyWidth = Number(BM.Parameters['BodyWindowWidth'] || 400);
  376. BM.Equip.EHideList = BM.Parameters['HideEquipItemList'] == "true" ? true : false;
  377. BM.Equip.EHelpEquip = String(BM.Parameters['HelpEquip']);
  378. BM.Equip.EHelpOptimize = String(BM.Parameters['HelpOptimize']);
  379. BM.Equip.EHelpRemove = String(BM.Parameters['HelpRemove']);
  380. BM.Equip.EParamFontSize = Number(BM.Parameters['ParametersFontSize']);
  381. BM.Equip.EBodyPadding = Number(BM.Parameters['BodyPadding'] || 18);
  382. BM.Equip.EBodyStatus = BM.Parameters['BodyInStatus'] == "true" ? true : false;

  383. BM.Equip.EBodyDefault = String(BM.Parameters['BodyImage']);
  384. BM.Equip.EBodyIconScales = Number(BM.Parameters['ScaleEquipIcons'] || 1);
  385. BM.Equip.ENameIcon = String(BM.Parameters['EquipmentType'] || 'names');
  386. BM.Equip.EIconFramed = BM.Parameters['EquipmentFramed'] == "true" ? true : false;

  387. BM.Icon.Plus = Number(BM.Parameters['ComparePlusIcon']);
  388. BM.Icon.Minus = Number(BM.Parameters['CompareMinusIcon']);

  389. BM.Data = String(BM.Parameters['EquipmentIcons']);
  390. BM.Data = BM.Data.split(' ');
  391. BM.Icon.EquipIcons = [];
  392. for (BM.i = 0; BM.i < BM.Data.length; ++BM.i) {
  393.   BM.Icon.EquipIcons.push(parseInt(BM.Data[BM.i]));
  394. };

  395. BM.Data = String(BM.Parameters['IconXLocation']);
  396. BM.Data = BM.Data.split(' ');
  397. BM.Equip.EIconXLocations = [];
  398. for (BM.i = 0; BM.i < BM.Data.length; ++BM.i) {
  399.   BM.Equip.EIconXLocations.push(parseInt(BM.Data[BM.i]));
  400. };
  401. BM.Data = String(BM.Parameters['IconYLocation']);
  402. BM.Data = BM.Data.split(' ');
  403. BM.Equip.EIconYLocations = [];
  404. for (BM.i = 0; BM.i < BM.Data.length; ++BM.i) {
  405.   BM.Equip.EIconYLocations.push(parseInt(BM.Data[BM.i]));
  406. };
  407. BM.Data = String(BM.Parameters['EquipParameters']);
  408. BM.Data = BM.Data.split(' ');
  409. BM.Equip.EParameters = [];
  410. for (BM.i = 0; BM.i < BM.Data.length; ++BM.i) {
  411.   BM.Equip.EParameters.push(BM.Data[BM.i]);
  412. };
  413. BM.Vocab.ParamNames = [];
  414. BM.Vocab.ParamNames['mhp'] = String(BM.Parameters['MhpVocab']);
  415. BM.Vocab.ParamNames['mmp'] = String(BM.Parameters['MmpVocab']);
  416. BM.Vocab.ParamNames['atk'] = String(BM.Parameters['AtkVocab']);
  417. BM.Vocab.ParamNames['def'] = String(BM.Parameters['DefVocab']);
  418. BM.Vocab.ParamNames['mat'] = String(BM.Parameters['MatVocab']);
  419. BM.Vocab.ParamNames['mdf'] = String(BM.Parameters['MdfVocab']);
  420. BM.Vocab.ParamNames['agi'] = String(BM.Parameters['AgiVocab']);
  421. BM.Vocab.ParamNames['luk'] = String(BM.Parameters['LukVocab']);
  422. BM.Vocab.ParamNames['hit'] = String(BM.Parameters['HitVocab']);
  423. BM.Vocab.ParamNames['eva'] = String(BM.Parameters['EvaVocab']);
  424. BM.Vocab.ParamNames['cri'] = String(BM.Parameters['CriVocab']);
  425. BM.Vocab.ParamNames['cev'] = String(BM.Parameters['CevVocab']);
  426. BM.Vocab.ParamNames['mev'] = String(BM.Parameters['MevVocab']);
  427. BM.Vocab.ParamNames['mrf'] = String(BM.Parameters['MrfVocab']);
  428. BM.Vocab.ParamNames['cnt'] = String(BM.Parameters['CntVocab']);
  429. BM.Vocab.ParamNames['hrg'] = String(BM.Parameters['HrgVocab']);
  430. BM.Vocab.ParamNames['mrg'] = String(BM.Parameters['MrgVocab']);
  431. BM.Vocab.ParamNames['trg'] = String(BM.Parameters['TrgVocab']);
  432. BM.Vocab.ParamNames['tgr'] = String(BM.Parameters['TgrVocab']);
  433. BM.Vocab.ParamNames['grd'] = String(BM.Parameters['GrdVocab']);
  434. BM.Vocab.ParamNames['rec'] = String(BM.Parameters['RecVocab']);
  435. BM.Vocab.ParamNames['pha'] = String(BM.Parameters['PhaVocab']);
  436. BM.Vocab.ParamNames['mcr'] = String(BM.Parameters['McrVocab']);
  437. BM.Vocab.ParamNames['tcr'] = String(BM.Parameters['TcrVocab']);
  438. BM.Vocab.ParamNames['pdr'] = String(BM.Parameters['PdrVocab']);
  439. BM.Vocab.ParamNames['mdr'] = String(BM.Parameters['MdrVocab']);
  440. BM.Vocab.ParamNames['fdr'] = String(BM.Parameters['FdrVocab']);
  441. BM.Vocab.ParamNames['exr'] = String(BM.Parameters['ExrVocab']);
  442. //-----------------------------------------------------------------------------
  443. TextManager.paramName = function(paramName) {
  444.         name = BM.Vocab.ParamNames[paramName]
  445.         if(!name || name == '') {
  446.                 switch(paramName){
  447.                         case 'mhp':
  448.                         return $dataSystem.terms.params[0] || '';
  449.                         case 'mmp':
  450.                         return $dataSystem.terms.params[1] || '';
  451.                         case 'atk':
  452.                         return $dataSystem.terms.params[2] || '';
  453.                         case 'def':
  454.                         return $dataSystem.terms.params[3] || '';
  455.                         case 'mat':
  456.                         return $dataSystem.terms.params[4] || '';
  457.                         case 'mdf':
  458.                         return $dataSystem.terms.params[5] || '';
  459.                         case 'agi':
  460.                         return $dataSystem.terms.params[6] || '';
  461.                         case 'luk':
  462.                         return $dataSystem.terms.params[7] || '';
  463.                         case 'hit':
  464.                         return $dataSystem.terms.params[8] || '';
  465.                         case 'eva':
  466.                         return $dataSystem.terms.params[9] || '';
  467.                 }
  468.         }
  469.         return name
  470. };
  471. //-----------------------------------------------------------------------------
  472. BM.Equip.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
  473. DataManager.isDatabaseLoaded = function() {
  474.     if (!BM.Equip.DataManager_isDatabaseLoaded.call(this)) return false;
  475.         this.processActorNotetagsEquipBM($dataActors);
  476.         this.processClassNotetagsEquipBM($dataClasses);
  477.         this.processWeaponNotetagsEquipBM($dataWeapons);
  478.         this.processArmorNotetagsEquipBM($dataArmors);
  479.         return true;
  480. };
  481. DataManager.processActorNotetagsEquipBM = function(group) {
  482.         BM.Equip.EBodyAImages = [];
  483.         BM.Equip.EBodyAImageOffsets = [];
  484.         BM.Equip.EBodyAImageScales = [];
  485.         BM.Equip.EBodyAIconX = [];
  486.         BM.Equip.EBodyAIconY = [];
  487.         BM.Equip.EBodyAImage = [];
  488.         var offsetMatcher = /<(?:EBODYOFFSET):[ ]*([\+\-\s*]\d+)\s*,\s*([\+\-\s*]\d+)>/i;
  489.         var iconoffsetMatcher = /<(?:EICON-)(\d+):[ ]*(\d+)\s*,\s*(\d+)>/i;
  490.         for (var n = 1; n < group.length; n++) {
  491.                 BM.Equip.EBodyAImageScales[n] = 1;               
  492.                 BM.Equip.EBodyAImageOffsets[n] = [0, 0];
  493.                 BM.Equip.EBodyAImages[n] = BM.Equip.EBodyDefault
  494.                 BM.Equip.EBodyAIconX[n] = [];
  495.                 BM.Equip.EBodyAIconY[n] = [];
  496.                 BM.Equip.EBodyAImage[n] = false
  497.                 var obj = group[n];
  498.                 var notedata = obj.note.split(/\r?\n/);
  499.                 for (var i = 0; i < notedata.length; i++) {                       
  500.                         var line = notedata[i];
  501.                         if (line.match(/<(?:EBODYIMAGE):[ ]([\w\s]+)>/i)) {
  502.                                 var eBody = RegExp.$1;
  503.                                 BM.Equip.EBodyAImage[n] = true;
  504.                                 if (eBody == '')eBody = undefined;       
  505.                                 else //;                                       
  506.                                 BM.Equip.EBodyAImages[n] = eBody;
  507.                         } else if (line.match(/<(?:EBODYSCALE):[ ](\d+.?\d+)>/i)) {
  508.                                 var eBodyScale = parseFloat(RegExp.$1);
  509.                                 if (eBodyScale < 0) eBodyScale = 0;                               
  510.                                 BM.Equip.EBodyAImageScales[n] = eBodyScale;
  511.                         } else if (line.match(offsetMatcher)) {
  512.                                 BM.Equip.EBodyAImageOffsets[n] = [parseInt(RegExp.$1), parseInt(RegExp.$2)];
  513.                         } else if (line.match(iconoffsetMatcher)) {       
  514.                                 BM.Equip.EBodyAIconX[n][parseInt(RegExp.$1)] = parseInt(RegExp.$2);
  515.                                 BM.Equip.EBodyAIconY[n][parseInt(RegExp.$1)] = parseInt(RegExp.$3);
  516.                         }
  517.                 }       
  518.                 ImageManager.loadPicture(BM.Equip.EBodyAImages[n]);
  519.         }
  520. };
  521. DataManager.processClassNotetagsEquipBM = function(group) {
  522.         BM.Equip.EBodyCImages = [];
  523.         BM.Equip.EBodyCImageOffsets = [];
  524.         BM.Equip.EBodyCImageScales = [];
  525.         BM.Equip.EBodyCIconX = [];
  526.         BM.Equip.EBodyCIconY = [];
  527.         var offsetMatcher = /<(?:EBODYOFFSET):[ ]*([\+\-\s*]\d+)\s*,\s*([\+\-\s*]\d+)>/i;
  528.         var iconoffsetMatcher = /<(?:EICON-)(\d+):[ ]*(\d+)\s*,\s*(\d+)>/i;
  529.         for (var n = 1; n < group.length; n++) {
  530.                 var obj = group[n];
  531.                 BM.Equip.EBodyCImageScales[n] = 1;               
  532.                 BM.Equip.EBodyCImageOffsets[n] = [0, 0];
  533.                 BM.Equip.EBodyCImages[n] = BM.Equip.EBodyDefault
  534.                 BM.Equip.EBodyCIconX[n] = [];
  535.                 BM.Equip.EBodyCIconY[n] = [];
  536.                 var notedata = obj.note.split(/\r?\n/);
  537.                 for (var i = 0; i < notedata.length; i++) {                       
  538.                         var line = notedata[i];
  539.                         if (line.match(/<(?:EBODYIMAGE):[ ]([\w\s]+)>/i)) {
  540.                                 var eBody = RegExp.$1;
  541.                                 if (eBody == '') eBody = undefined;                               
  542.                                 BM.Equip.EBodyCImages[n] = eBody;
  543.                         } else if (line.match(/<(?:EBODYSCALE):[ ](\d+.?\d+)>/i)) {
  544.                                 var eBodyScale = parseFloat(RegExp.$1);
  545.                                 if (eBodyScale < 0) eBodyScale = 0;                               
  546.                                 BM.Equip.EBodyCImageScales[n] = eBodyScale;
  547.                         } else if (line.match(offsetMatcher)) {
  548.                                 BM.Equip.EBodyCImageOffsets[n] = [parseInt(RegExp.$1), parseInt(RegExp.$2)];
  549.                         } else if (line.match(iconoffsetMatcher)) {       
  550.                                 BM.Equip.EBodyCIconX[n][parseInt(RegExp.$1)] = parseInt(RegExp.$2);
  551.                                 BM.Equip.EBodyCIconY[n][parseInt(RegExp.$1)] = parseInt(RegExp.$3);
  552.                         }
  553.                 }       
  554.                 ImageManager.loadPicture(BM.Equip.EBodyCImages[n]);
  555.         }
  556. };
  557. DataManager.processWeaponNotetagsEquipBM = function(group) {
  558.         BM.Equip.EBodyIconWImages = [];
  559.         BM.Equip.EIconWImage = [];
  560.         for (var n = 1; n < group.length; n++) {
  561.                 BM.Equip.EIconWImage[n] = false
  562.                 var obj = group[n];
  563.                 obj.eBodyIconImages = [];
  564.                 var notedata = obj.note.split(/\r?\n/);
  565.                 for (var i = 0; i < notedata.length; i++) {                       
  566.                         var line = notedata[i];
  567.                         if (line.match(/<(?:EICONIMAGE):[ ]([\w\s]+)>/i)) {
  568.                                 var eBody = RegExp.$1;
  569.                                 BM.Equip.EIconWImage[n] = true;
  570.                                 if (eBody == '')eBody = undefined;       
  571.                                 else //;                                       
  572.                                 BM.Equip.EBodyIconWImages[n] = eBody;
  573.                                 obj.eBodyIconImages = eBody;
  574.                         }
  575.                 }               
  576.                 ImageManager.loadPicture(BM.Equip.EBodyIconWImages[n]);
  577.         }
  578. };
  579. DataManager.processArmorNotetagsEquipBM = function(group) {
  580.         BM.Equip.EBodyIconAImages = [];
  581.         BM.Equip.EIconAImage = [];
  582.         for (var n = 1; n < group.length; n++) {
  583.                 BM.Equip.EIconAImage[n] = false
  584.                 var obj = group[n];
  585.                 var notedata = obj.note.split(/\r?\n/);
  586.                 for (var i = 0; i < notedata.length; i++) {                       
  587.                         var line = notedata[i];
  588.                         if (line.match(/<(?:EICONIMAGE):[ ]([\w\s]+)>/i)) {
  589.                                 var eBody = RegExp.$1;
  590.                                 BM.Equip.EIconAImage[n] = true;
  591.                                 if (eBody == '')eBody = undefined;       
  592.                                 else;                                       
  593.                                 BM.Equip.EBodyIconAImages[n] = eBody;
  594.                                 obj.eBodyIconImages = eBody;
  595.                                
  596.                         }
  597.                 }       
  598.                 ImageManager.loadPicture(BM.Equip.EBodyIconAImages[n]);
  599.         }
  600. };
  601. //-----------------------------------------------------------------------------
  602. // Window_Base
  603. //-----------------------------------------------------------------------------
  604. Window_Base.prototype.drawDarkRect = function(dx, dy, dw, dh) {
  605.     var color = this.gaugeBackColor();   
  606.     this.changePaintOpacity(false);   
  607.     this.contents.fillRect(dx + 1, dy + 1, dw - 2, dh - 2, color);   
  608.     this.changePaintOpacity(true);
  609. };
  610. Window_Base.prototype.drawFramedBox = function(dx, dy, dw, dh) {
  611.     var color1 = this.gaugeBackColor();  
  612.         var        color2 = this.normalColor();
  613.         this.contents.fillRect(dx, dy, dw, dh, color2);          
  614.         this.contents.clearRect(dx + 1, dy + 1, dw - 2, dh - 2)
  615. };
  616. Window_Base.prototype.textLineHeight = function() {
  617.         return (this.contents.fontSize + 12)
  618. };
  619. Window_Base.prototype.drawActorEBody = function(x, y, width, height) {
  620.         if (BM.Equip.EBodyAImage[this._actor._actorId]) {
  621.                 var name = BM.Equip.EBodyAImages[this._actor._actorId]
  622.                 var scale = BM.Equip.EBodyAImageScales[this._actor._actorId];
  623.                 var offsets = BM.Equip.EBodyAImageOffsets[this._actor._actorId];
  624.         } else {
  625.                 var name = BM.Equip.EBodyCImages[this._actor._actorId]               
  626.                 var scale = BM.Equip.EBodyCImageScales[this._actor._actorId];
  627.                 var offsets = BM.Equip.EBodyCImageOffsets[this._actor._actorId];
  628.         }       
  629.         var bitmap = ImageManager.loadPicture(name);
  630.         var sw = bitmap.width;
  631.     var sh = bitmap.height;
  632.     this.contents.blt(bitmap, 0, 0, sw, sh,  // Image, top-left (x,y) from source image, source width + height to use
  633.         x + offsets[0], y + offsets[1], // destination (x, y) to use.  Of note - anything past contentsWidth() + contentsHeight() is auto-clipped!
  634.         Math.floor(sw * scale), Math.floor(sh * scale)); // destination width, height - can be used to scale!
  635. };
  636. Window_Base.prototype.drawEIcon = function(item, x, y, width, height) {
  637.     if (item) {
  638.                 var scale = 1
  639.                 var scale = BM.Equip.EBodyIconScales
  640.                 if (item.etypeId == 1) var name = BM.Equip.EBodyIconWImages;
  641.                 else var name = BM.Equip.EBodyIconAImages;
  642.                 if (name[item.id]){
  643.                         this.drawEIconImage(name[item.id], x, y, width*scale, height*scale);
  644.                 }else{
  645.                         this.drawIcon(item.iconIndex, x, y, width*scale, height*scale);
  646.                 }                       
  647.     }
  648. };
  649. Window_Base.prototype.drawEIconImage = function(name, x, y,width, height) {
  650.         var bitmap = ImageManager.loadPicture(name);
  651.         var pw = bitmap.width;
  652.         var ph = bitmap.height;
  653.         var sx = 0;
  654.         var sy = 0;   
  655.     this.contents.blt(bitmap, sx, sy, pw, ph, x, y, width, height);
  656. };
  657. Window_Base.prototype.drawIcon = function(iconIndex, x, y, width, height) {
  658.         width = width || Window_Base._iconWidth;
  659.     height = height || Window_Base._iconHeight;
  660.         var bitmap = ImageManager.loadSystem('IconSet');
  661.         var pw = Window_Base._iconWidth;
  662.         var ph = Window_Base._iconHeight;
  663.         var sx = iconIndex % 16 * pw;
  664.         var sy = Math.floor(iconIndex / 16) * ph;  
  665.     this.contents.blt(bitmap, sx, sy, pw, ph, x, y, width, height);
  666. };
  667. //-----------------------------------------------------------------------------
  668. // Window_EquipBody
  669. //
  670. // The window for selecting an equipment slot on the equipment screen.
  671. function Window_EquipBody() {
  672.     this.initialize.apply(this, arguments);
  673. }
  674. Window_EquipBody.prototype = Object.create(Window_Selectable.prototype);
  675. Window_EquipBody.prototype.constructor = Window_EquipBody;
  676. Window_EquipBody.prototype.initialize = function(x, y) {
  677.         var height = this.windowHeight();
  678.         var width = this.windowWidth();
  679.     Window_Selectable.prototype.initialize.call(this, x, y, width, 800);
  680.     this._actor = null;
  681.         this._slotId = -1
  682.     this.refresh();
  683. };
  684. Window_EquipBody.prototype.windowHeight = function() {
  685.     return (Graphics.boxHeight - this.fittingHeight(2));
  686. };
  687. Window_EquipBody.prototype.fittingHeight = function(numLines) {
  688.     return numLines * this.lineHeight() + BM.Equip.Window_EquipBody_standardPadding() * 2;
  689. };
  690. Window_EquipBody.prototype.windowWidth = function() {
  691.         return BM.Equip.EBodyWidth;
  692. };
  693. Window_EquipBody.prototype.setActor = function(actor) {
  694.     if (this._actor !== actor) {
  695.         this._actor = actor;
  696.         this.refresh();
  697.     }
  698. };
  699. Window_EquipBody.prototype.maxItems = function() {
  700.     return this._actor ? this._actor.equipSlots().length : 0;
  701. };
  702. Window_EquipBody.prototype.item = function() {
  703.     return this._actor ? this._actor.equips()[this.index()] : null;
  704. };
  705. Window_EquipBody.prototype.drawAllItems = function() {
  706.         if (this._actor) {
  707.                 this.drawActorEBody(0, 0);
  708.                 this.drawActorName(this._actor, this.textPadding() + this.bmPadding(), this.bmPadding());
  709.         }       
  710.         Window_Selectable.prototype.drawAllItems.call(this)
  711. };
  712. Window_EquipBody.prototype.drawItem = function(index) {
  713.     if (this._actor) {
  714.         var rect = this.itemRect(index);
  715.         this.changeTextColor(this.systemColor());
  716.         this.changePaintOpacity(this.isEnabled(index));
  717.                 if (BM.Equip.EIconFramed){
  718.                         this.drawFramedBox(rect.x - 4,rect.y + this.contents.fontSize - 4, rect.width + 8, rect.height + 8);
  719.                 }
  720.                 this.makeFontSmaller();
  721.         this.drawText(this.slotName(index), rect.x - 4, rect.y - 4, rect.width + 8, this.lineHeight(),'center');
  722.                 this.makeFontBigger();               
  723.                 this.drawEIcon(this._actor.equips()[index], rect.x, rect.y + this.contents.fontSize, Window_Base._iconWidth, Window_Base._iconHeight);
  724.         this.changePaintOpacity(true);
  725.     }
  726. };
  727. Window_EquipBody.prototype.itemRect = function(index) {
  728.         var scale = BM.Equip.EBodyIconScales
  729.         var xa = BM.Equip.EIconXLocations;
  730.         var ya = BM.Equip.EIconYLocations;
  731.         if (BM.Equip.EBodyAImage[this._actor._actorId]) {
  732.                 if (BM.Equip.EBodyAIconX[this._actor._actorId][index]) {
  733.                         var xa = BM.Equip.EBodyAIconX[this._actor._actorId];
  734.                         var ya = BM.Equip.EBodyAIconY[this._actor._actorId];
  735.                 };
  736.         } else {
  737.                 if (BM.Equip.EBodyCIconX[this._actor._actorId][index]) {
  738.                         var xa = BM.Equip.EBodyCIconX[this._actor._actorId];
  739.                         var ya = BM.Equip.EBodyCIconY[this._actor._actorId];
  740.                 };
  741.         }       
  742.     var rect = new Rectangle();
  743.     rect.width = Window_Base._iconWidth * scale;
  744.     rect.height = Window_Base._iconHeight * scale;
  745.     rect.x = xa[index]
  746.     rect.y = ya[index]
  747.     return rect;
  748. };
  749. Window_EquipBody.prototype.slotName = function(index) {
  750.     var slots = this._actor.equipSlots();
  751.     return this._actor ? $dataSystem.equipTypes[slots[index]] : '';
  752. };
  753. Window_EquipBody.prototype.isEnabled = function(index) {
  754.     return this._actor ? this._actor.isEquipChangeOk(index) : false;
  755. };
  756. Window_EquipBody.prototype.isCurrentItemEnabled = function() {
  757.     return this.isEnabled(this.index());
  758. };
  759. Window_EquipBody.prototype.setSlotId = function(slotId) {
  760.     if (this._slotId !== slotId) {
  761.         this._slotId = slotId;
  762.         this.refresh();
  763.                 this.updateCursor();
  764.     }
  765. };
  766. Window_EquipBody.prototype.update = function() {
  767.         Window_Selectable.prototype.update.call(this);
  768.         this.updateCursor();
  769. }       
  770. Window_EquipBody.prototype.updateCursor = function() {
  771.     if (this._cursorAll) {
  772.         var allRowsHeight = this.maxRows() * this.itemHeight();
  773.         this.setCursorRect(0, 0, this.contents.width, allRowsHeight);
  774.         this.setTopRow(0);
  775.     } else if (this.isCursorVisible()) {
  776.         var rect = this.itemRect(this._slotId);
  777.         this.setCursorRect(rect.x - 2, rect.y - 2 + this.contents.fontSize, rect.width + 4, rect.height + 4);
  778.     } else {
  779.         this.setCursorRect(0, 0, 0, 0);
  780.     }
  781. };
  782. BM.Equip.Window_EquipBody_standardPadding = Window_EquipBody.prototype.standardPadding;
  783. Window_EquipBody.prototype.standardPadding = function() {
  784.     return BM.Equip.EBodyPadding;
  785. };
  786. Window_EquipBody.prototype.bmPadding = function() {
  787.         return BM.Equip.Window_EquipBody_standardPadding() - this.padding
  788. };
  789. //-----------------------------------------------------------------------------
  790. // Window_EquipCommand
  791. //
  792. BM.Equip.Window_EquipCommand_updateHelp = Window_EquipCommand.prototype.updateHelp;
  793. Window_EquipCommand.prototype.updateHelp = function() {
  794.     BM.Equip.Window_EquipCommand_updateHelp.call(this);
  795.         var array = [BM.Equip.EHelpEquip, BM.Equip.EHelpOptimize, BM.Equip.EHelpRemove]
  796.         if (this._helpWindow) {
  797.                 this._helpWindow.setText(array[this.index()]);
  798.         }
  799. };
  800. //-----------------------------------------------------------------------------
  801. // Window_EquipStatus
  802. //-----------------------------------------------------------------------------
  803. BM.Equip.Window_EquipStatus_initialize = Window_EquipStatus.prototype.initialize;
  804. Window_EquipStatus.prototype.initialize = function(x, y) {
  805.         this._slotId = 0;
  806.     var width = this.windowWidth();
  807.     var height = this.windowHeight();
  808.     Window_Base.prototype.initialize.call(this, x, y, width, 800);
  809.     this._actor = null;
  810.         this._slotId = 0;
  811.     this.refresh();
  812. };
  813. Window_EquipStatus.prototype.windowHeight = function() {
  814.     return (Graphics.boxHeight - this.fittingHeight(2));
  815. };
  816. Window_EquipStatus.prototype.windowWidth = function() {
  817.     return BM.Equip.EBodyWidth;
  818. };
  819. Window_EquipStatus.prototype.fittingHeight = function(numLines) {
  820.     return numLines * this.lineHeight() + BM.Equip.Window_EquipStatus_standardPadding() * 2;
  821. };
  822. Window_EquipStatus.prototype.refresh = function() {
  823.     this.contents.clear();
  824.     if (this._actor) {
  825.                 if (BM.Equip.EBodyStatus) this.drawActorEBody(0, 0);               
  826.         this.drawActorName(this._actor, this.textPadding() + this.bmPadding(), this.bmPadding());       
  827.                 this.drawCurrentWeapon(this.bmPadding(),this.lineHeight()+this.bmPadding())
  828.                 this.drawNewWeapon(Window_Base._iconWidth+this.bmPadding(),this.lineHeight()*5/2+this.bmPadding())
  829.                 this.contents.fontSize = BM.Equip.EParamFontSize
  830.                 var param = BM.Equip.EParameters
  831.                 var y = this.lineHeight() * 4 + this.bmPadding()
  832.                 var h = this.contents.height - y - this.bmPadding()
  833.                 var tf = h / this.textLineHeight();
  834.                 var pf = Math.floor(Math.min(tf,param.length));
  835.                 var dh = pf * this.textLineHeight();
  836.                 var dy = Math.floor((h - dh)/2 + this.bmPadding()/2);
  837.                 y = y + dy
  838.                 for (var i = 0; i < pf; i++) {
  839.                         this.drawItem(this.bmPadding(), y, param[i]);
  840.                         y += this.textLineHeight()
  841.                 }
  842.                 this.resetFontSettings();
  843.     }
  844. };
  845. Window_EquipStatus.prototype.bmPadding = function() {
  846.         return BM.Equip.Window_EquipStatus_standardPadding() - this.padding
  847. };
  848. Window_EquipStatus.prototype.drawCurrentWeapon = function(x, y) {
  849.         var dx = x + Window_Base._iconWidth
  850.         var dy = y + this.lineHeight()/2;
  851.     this.drawDarkRect(dx, dy, this.contents.width-dx-this.bmPadding()-Window_Base._iconWidth, this.lineHeight());
  852.     var lastFontSize = this.contents.fontSize;
  853.     this.makeFontSmaller()
  854.     this.drawText("当前装备", x, y-10, this.contents.width-x-this.bmPadding()-Window_Base._iconWidth);
  855.     this.makeFontBigger()  
  856.         this.drawItemName(this._actor.equips()[this._slotId], dx, dy, this.contents.width-dx-this.bmPadding()-6-Window_Base._iconWidth);
  857. };
  858. Window_EquipStatus.prototype.drawNewWeapon = function(x, y) {
  859.         var dx = x + Window_Base._iconWidth
  860.         var dy = y + this.lineHeight()/2;
  861.     this.drawDarkRect(dx, dy, this.contents.width-dx-this.bmPadding(), this.lineHeight());
  862.     var lastFontSize = this.contents.fontSize;
  863.     this.makeFontSmaller()
  864.     this.drawText("新的装备", x, y-10, this.contents.width-x-this.bmPadding());
  865.     this.makeFontBigger()
  866.         if (this._tempActor) {
  867.                 this.drawItemName(this._tempActor.equips()[this._slotId], dx, dy, this.contents.width-dx-this.bmPadding()-6);
  868.         }
  869. };
  870. Window_EquipStatus.prototype.drawItem = function(x, y, paramName) {
  871.         this.drawDarkRect(x, y, this.contents.width-x-this.bmPadding(), this.textLineHeight());
  872.         this.drawRightArrow(x + 188, y);
  873.         var percent = true
  874.         if (paramName){
  875.                 this.drawParamName(x + this.textPadding(), y, paramName);
  876.                 switch(paramName){
  877.                         case 'mhp':
  878.                         case 'mmp':
  879.                         case 'atk':
  880.                         case 'def':
  881.                         case 'mat':
  882.                         case 'mdf':
  883.                         case 'agi':
  884.                         case 'luk':
  885.                         percent = false;
  886.                         break;
  887.                 }
  888.                 if (this._actor) {
  889.                         this.drawCurrentParam(x + 140, y, paramName, percent);
  890.                 }               
  891.                 if (this._tempActor) {
  892.                         this.drawNewParam(x + 222, y, paramName, percent);
  893.                 }
  894.         }
  895. };
  896. Window_EquipStatus.prototype.drawParamName = function(x, y, paramName) {
  897.     this.changeTextColor(this.systemColor());
  898.         var name = TextManager.paramName(paramName)
  899.     this.drawText(name, x, y, 120);
  900. };
  901. Window_EquipStatus.prototype.drawCurrentParam = function(x, y, paramName, percent) {
  902.     this.resetTextColor();
  903.         var value = eval("this._actor." + paramName, this);
  904.         if (percent == true) {
  905.                 value = Math.round(value * 100) + "%";
  906.         }
  907.     this.drawText(value, x, y, 48, 'right');
  908. };
  909. Window_EquipStatus.prototype.drawNewParam = function(x, y, paramName, percent) {
  910.         var oldValue = eval("this._actor." + paramName, this);
  911.         var newValue = eval("this._tempActor." + paramName, this);
  912.     var diffvalue = newValue - oldValue;
  913.     this.changeTextColor(this.paramchangeTextColor(diffvalue));
  914.         if (percent == true) {
  915.                 newValue = Math.round(newValue * 100) + "%";
  916.         }
  917.         if (diffvalue > 0 && BM.Icon.Plus && BM.Icon.Plus != 0){
  918.                 this.drawIcon(BM.Icon.Plus, this.contents.width - this.textWidth(newValue) - this.bmPadding()-Window_Base._iconWidth, y)
  919.         }
  920.         if (diffvalue < 0 && BM.Icon.Minus && BM.Icon.Minus != 0){
  921.                 this.drawIcon(BM.Icon.Minus, this.contents.width - this.textWidth(newValue) - this.bmPadding()-Window_Base._iconWidth, y)
  922.         }
  923.     this.drawText(newValue, x, y, this.contents.width - x - 6 - this.bmPadding(), 'right');
  924. };
  925. Window_EquipStatus.prototype.setSlotId = function(slotId) {
  926.     if (this._slotId !== slotId) {
  927.         this._slotId = slotId;
  928.         this.refresh();
  929.     }
  930. };
  931. BM.Equip.Window_EquipStatus_standardPadding = Window_EquipStatus.prototype.standardPadding;
  932. Window_EquipStatus.prototype.standardPadding = function() {
  933.     return BM.Equip.EBodyStatus ? BM.Equip.EBodyPadding : BM.Equip.Window_EquipStatus_standardPadding();
  934. };
  935. //-----------------------------------------------------------------------------
  936. // Window_EquipSlot
  937. //-----------------------------------------------------------------------------
  938. BM.Equip.Window_EquipSlot_initialize = Window_EquipSlot.prototype.initialize;
  939. Window_EquipSlot.prototype.initialize = function(x, y, width, height) {
  940.         var height = this.windowHeight();
  941.     BM.Equip.Window_EquipSlot_initialize.call(this, x, y, width, height);
  942. };
  943. Window_EquipSlot.prototype.windowHeight = function() {
  944.         if (BM.Equip.EHideList) {
  945.                 return (Graphics.boxHeight - this.fittingHeight(2) - this.fittingHeight(1));
  946.         } else {
  947.                 return this.fittingHeight(this.numVisibleRows());
  948.         }               
  949. };
  950. Window_EquipSlot.prototype.setBodyWindow = function(bodyWindow) {
  951.     this._bodyWindow = bodyWindow;
  952.     this.callUpdateHelp();
  953. };
  954. Window_EquipSlot.prototype.numVisibleRows = function() {
  955.     return (this._actor ? this._actor.equipSlots().length : $dataSystem.equipTypes.length) - 1;
  956. };
  957. BM.Equip.Window_EquipSlot_drawItem = Window_EquipSlot.prototype.drawItem;
  958. Window_EquipSlot.prototype.drawItem = function(index) {
  959.         if (BM.Equip.ENameIcon == 'names'){
  960.                 BM.Equip.Window_EquipSlot_drawItem.call(this, index);
  961.         } else {
  962.                 if (this._actor) {
  963.                         var rect = this.itemRectForText(index);
  964.                         this.changeTextColor(this.systemColor());
  965.                         this.changePaintOpacity(this.isEnabled(index));
  966.                         this.drawEquipSlotIcon(index, rect.x, rect.y)
  967.                         var dx = rect.x + Window_Base._iconWidth + 10
  968.                         this.drawItemName(this._actor.equips()[index], dx, rect.y, this.contents.width - dx);
  969.                         this.changePaintOpacity(true);                       
  970.                 }
  971.         }
  972. };
  973. Window_EquipSlot.prototype.drawEquipSlotIcon = function(index, x, y){
  974.         var eIcon = BM.Icon.EquipIcons;
  975.         var equippedIcon = this._actor.equips()[index];
  976.         this.drawIcon(eIcon[index], x, y);
  977. }
  978. BM.Equip.Window_EquipSlot_drawItemName = Window_EquipSlot.prototype.drawItemName;
  979. Window_EquipSlot.prototype.drawItemName = function(item, x, y, width) {
  980.         width = width || this.contents.width;
  981.         BM.Equip.Window_EquipSlot_drawItemName.call(this, item, x, y, width - x);   
  982. };
  983. BM.Equip.Window_EquipSlot_updateHelp = Window_EquipSlot.prototype.updateHelp;
  984. Window_EquipSlot.prototype.updateHelp = function() {
  985.     BM.Equip.Window_EquipSlot_updateHelp.call(this);
  986.     if (this._actor && this._bodyWindow) {
  987.         this._bodyWindow.setSlotId(this.index());
  988.     }
  989. };

  990. //-----------------------------------------------------------------------------
  991. // Window_EquipItem
  992. //-----------------------------------------------------------------------------
  993. Window_EquipItem.prototype.maxCols = function() {
  994.     return 1;
  995. };
  996. BM.Equip.Window_EquipItem_updateHelp = Window_EquipItem.prototype.updateHelp;
  997. Window_EquipItem.prototype.updateHelp = function() {
  998.     BM.Equip.Window_EquipItem_updateHelp.call(this);
  999.     if (this._actor && this._statusWindow) {
  1000.         this._statusWindow.setSlotId(this._slotId);
  1001.     }
  1002. };

  1003. //-----------------------------------------------------------------------------
  1004. // Scene_Equip
  1005. //-----------------------------------------------------------------------------
  1006. BM.Equip.Scene_Equip_create = Scene_Equip.prototype.create;
  1007. Scene_Equip.prototype.create = function() {
  1008.         BM.Equip.Scene_Equip_create.call(this);
  1009.         this.relocateWindows();
  1010. }
  1011. Scene_Equip.prototype.relocateWindows = function() {
  1012.         if (BM.Equip.EWindowAlign != 'right') {
  1013.                 this._commandWindow.x = 0;
  1014.                 this._itemWindow.x = 0;
  1015.                 this._slotWindow.x = 0;
  1016.                 this._bodyWindow.x = this._commandWindow.width;
  1017.                 this._statusWindow.x = this._commandWindow.width;               
  1018.         };
  1019.         if (BM.Equip.EHideList) {
  1020.                 this._itemWindow.hide();
  1021.         };
  1022. }
  1023. BM.Equip.Scene_Equip_createStatusWindow = Scene_Equip.prototype.createStatusWindow;
  1024. Scene_Equip.prototype.createStatusWindow = function() {
  1025.     BM.Equip.Scene_Equip_createStatusWindow.call(this);
  1026.         this._statusWindow.hide();
  1027. };
  1028. Scene_Equip.prototype.createBodyWindow = function() {
  1029.     this._bodyWindow = new Window_EquipBody(0, this._helpWindow.height);
  1030.     this._slotWindow.setBodyWindow(this._bodyWindow);
  1031.         this.addWindow(this._bodyWindow);       
  1032. };
  1033. Scene_Equip.prototype.createSlotWindow = function() {
  1034.     var wx = this._statusWindow.width;
  1035.     var ww = Graphics.boxWidth - this._statusWindow.width;
  1036.         var wy = this._commandWindow.y + this._commandWindow.height;
  1037.         var wh = Graphics.boxHeight - wy
  1038.     this._slotWindow = new Window_EquipSlot(wx, wy, ww, wh);
  1039.     this._slotWindow.setHelpWindow(this._helpWindow);
  1040.     this._slotWindow.setStatusWindow(this._statusWindow);
  1041.     this._slotWindow.setHandler('ok',       this.onSlotOk.bind(this));
  1042.     this._slotWindow.setHandler('cancel',   this.onSlotCancel.bind(this));
  1043.     this.addWindow(this._slotWindow);
  1044. };
  1045. Scene_Equip.prototype.createItemWindow = function() {
  1046.     var wx = this._statusWindow.width;
  1047.         var ww = Graphics.boxWidth - this._statusWindow.width;
  1048.         var wy = this._slotWindow.y + this._slotWindow.height;   
  1049.         var wh = Graphics.boxHeight - wy;
  1050.         if (BM.Equip.EHideList) {
  1051.                 var wy = this._commandWindow.y + this._commandWindow.height;
  1052.                 var wh = Graphics.boxHeight - wy;               
  1053.         }
  1054.     this._itemWindow = new Window_EquipItem(wx, wy, ww, wh);
  1055.     this._itemWindow.setHelpWindow(this._helpWindow);
  1056.     this._itemWindow.setStatusWindow(this._statusWindow);
  1057.     this._itemWindow.setHandler('ok',     this.onItemOk.bind(this));
  1058.     this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this));
  1059.     this._slotWindow.setItemWindow(this._itemWindow);
  1060.     this.addWindow(this._itemWindow);
  1061.         this.createBodyWindow();
  1062. };
  1063. BM.Equip.Scene_Equip_refreshActor = Scene_Equip.prototype.refreshActor;
  1064. Scene_Equip.prototype.refreshActor = function() {
  1065.         var actor = this.actor();
  1066.         BM.Equip.Scene_Equip_refreshActor.call(this);  
  1067.         this._bodyWindow.setActor(actor);
  1068. };
  1069. BM.Equip.Scene_Equip_commandEquip = Scene_Equip.prototype.commandEquip;
  1070. Scene_Equip.prototype.commandEquip = function() {
  1071.         BM.Equip.Scene_Equip_commandEquip.call(this);
  1072.     this._bodyWindow.activate();
  1073.         this._bodyWindow.select(0);
  1074. };
  1075. BM.Equip.Scene_Equip_onSlotOk = Scene_Equip.prototype.onSlotOk;
  1076. Scene_Equip.prototype.onSlotOk = function() {
  1077.     BM.Equip.Scene_Equip_onSlotOk.call(this);
  1078.         if (BM.Equip.EHideList) {
  1079.                 this._itemWindow.show();
  1080.                 this._slotWindow.hide();
  1081.         }
  1082.         this._statusWindow.show();
  1083.         this._bodyWindow.hide();
  1084. };
  1085. BM.Equip.Scene_Equip_onSlotCancel = Scene_Equip.prototype.onSlotCancel;
  1086. Scene_Equip.prototype.onSlotCancel = function() {
  1087.         BM.Equip.Scene_Equip_onSlotCancel.call(this);
  1088.         this._bodyWindow.deselect();
  1089.     this._bodyWindow.deactivate();
  1090. };
  1091. BM.Equip.Scene_Equip_onItemOk = Scene_Equip.prototype.onItemOk;
  1092. Scene_Equip.prototype.onItemOk = function() {
  1093.     BM.Equip.Scene_Equip_onItemOk.call(this);
  1094.         if (BM.Equip.EHideList) {
  1095.                 this._itemWindow.hide();
  1096.                 this._slotWindow.show();
  1097.         }
  1098.     this._statusWindow.hide();
  1099.         this._bodyWindow.show();
  1100.         this._bodyWindow.refresh();
  1101. };
  1102. BM.Equip.Scene_Equip_onItemCancel = Scene_Equip.prototype.onItemCancel;
  1103. Scene_Equip.prototype.onItemCancel = function() {
  1104.     BM.Equip.Scene_Equip_onItemCancel.call(this);
  1105.         if (BM.Equip.EHideList) {
  1106.                 this._itemWindow.hide();
  1107.                 this._slotWindow.show();
  1108.         }
  1109.     this._statusWindow.hide();
  1110.         this._bodyWindow.show();
  1111. };
  1112. BM.Equip.Scene_Equip_commandOptimize = Scene_Equip.prototype.commandOptimize;
  1113. Scene_Equip.prototype.commandOptimize = function() {
  1114.         BM.Equip.Scene_Equip_commandOptimize.call(this);
  1115.     this._bodyWindow.refresh();
  1116. };
  1117. BM.Equip.Scene_Equip_commandClear = Scene_Equip.prototype.commandClear;
  1118. Scene_Equip.prototype.commandClear = function() {
  1119.         BM.Equip.Scene_Equip_commandClear.call(this);
  1120.     this._bodyWindow.refresh();
  1121. };
复制代码

点评

这个插件可以在装备界面插入角色的立绘,但是我的游戏角色需要进阶,立绘是要换的,所以就不知道如何换掉这个界面一开始设置的立绘……  发表于 2017-10-1 12:15
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
33324
在线时间
10515 小时
注册时间
2009-3-15
帖子
4762
9
发表于 2017-10-1 15:53:55 | 只看该作者
本帖最后由 soulsaga 于 2017-10-2 09:24 编辑

已测试.
JAVASCRIPT 代码复制
  1. if (BM.Equip.EBodyAImage[this._actor._actorId]) {
  2.                 var name = BM.Equip.EBodyAImages[this._actor._actorId]
  3.                         name = $gameVariables.value(this._actor._actorId + 100);
  4.                 var scale = BM.Equip.EBodyAImageScales[this._actor._actorId];
  5.                 var offsets = BM.Equip.EBodyAImageOffsets[this._actor._actorId];


角色ID+100变量为必须从Img \图片文件夹中对应的文件名。


点评

搞定了!大佬愿意帮忙在下感激不尽!  发表于 2017-10-3 19:04
更新了脚本..这次应该可以了..  发表于 2017-10-1 22:43
刚才测试了一下,替换掉原代码里的四行之后…… 插件直接失效了。变回原来的装备界面了。  发表于 2017-10-1 20:56
好的,感谢! 我去测试一下。  发表于 2017-10-1 20:37
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-20 10:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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