查看: 5696|回复: 8

[搬运汉化] YEP.37 Status Menu Core (感谢andrewx!)

[复制链接]
梦石
0
星屑
50
在线时间
44 小时
注册时间
2015-12-27
回帖
42
发表于 2016-1-15 18:49:36 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 梦幻学习机器 于 2016-1-17 23:46 编辑

746C73B6-5177-4EBB-B02B-50D5CBFBAC09.png

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.
You can grab the plugin here:
English Dropbox
English Mirror
(下载地址
https://www.dropbox.com/s/f6th4a ... tusMenuCore.js?dl=0)

Introduction

This plugin replaces the Status menu with a whole new layout. Including the function to display more information regarding the actor. You can change the order commands appear in game with the Command Order parameter.
(本插件会取代原状态栏的全部布局,包括更多关于角色信息展示功能。你通过改变参数改变游戏中的显示)
To add more commands, insert extension plugins under this plugin in the Plugin Manager. Then, it will appear automatically in the Command Order where you placed the ‘Custom’ string or elsewhere if you’ve placed the extension plugin’s keyword elsewhere.
(在本插件之下,插入更多扩展插件,可以有更多命令。然后将会自动展示你设置的自定义字符串,或出现在别处如果你设置了关键词)
Instructions

You can add and remove commands from the Command Window by changing the ‘Command Order’ parameter. Here is a list of commands you may use:
(通过参数,可以添加和移除命令。下面是一个命令表,你会用到)
General
– Displays the current current stats and EXP for the actor.
(总体:展示角色当前状态和经验)
Parameters
– Displays a parameter gauge of the actor relative to other stats.
(参数:展示一个人物能力的数值图表)
Elements
– Displays the listed elements and their elemental rates.
(元素:展示元素倍率)
States
– Displays the listed states and their status infliction rates.
(状态:状态成功率)
Attributes
– Displays the listed attributes and their rates.
(特性:展示属性和比率)
Custom
– If you have any custom status window items to display, they will appear here.
(自定义:你也可以自定义任何状态窗口来展示)
Cancel
– Adds a cancel command for leaving the Status Menu.
(取消:添加一个取消命令来离开状态栏)


Adding Icons to Elements and Attributes
(给元素和特性添加icon)
You can use icons for elements and attributes by using text codes.
(你可以给元素和特性添加icon图表,通过代码)
In the RPG Maker MV editor’s database, types tab, for the elements, name them as such:
(在mv编辑器的数据库->类型设置->为这些元素命名,格式如下)
\i[64]Fire

This will enable you to give the element an icon. You can also change the text color and such using any of the available text codes.
(将让你能给一个元素icon,你也可以改变字体颜色和使用任何可用的代码)
The same is applied for Attributes except you modify it within this plugin’s parameters. If you wish to display ‘HP Regen Rate’ with an icon, name it:
(同样可以应用到属性里,除非你在插件参数里修饰了它。如果你想展示hp重生率的一个icon,命名:)
\i[72]HP Regen Rate

The icons will be drawn for the said attributes in addition to any other text code modifications used.
(icon图标将被画出为了说属性,除非任何企图代码修饰被使用)
Happy RPG Making!
(高兴就好!)


简单来说就是把任务的所有属性全部都能展示出来

扩展插件:
Status Menu Core >> Actor Variables,可以添加角色变量,如:饥饿,娱乐,社交,感情等;这个比较有意思,可以模拟人生了
Status Menu Core >> Battle Statistics,战斗统计,杀了多少怪什么的
Status Menu Core >> Profile Status Page,角色介绍,显示角色图文信息




  1. //=============================================================================
  2. // Yanfly Engine Plugins - Status Menu Core
  3. // YEP_StatusMenuCore.js
  4. //=============================================================================

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

  7. var Yanfly = Yanfly || {};
  8. Yanfly.Status = Yanfly.Status || {};

  9. //=============================================================================
  10. /*:
  11. * @plugindesc v1.01a Changes the Status menu for your characters into
  12. * a hub that displays more character information.
  13. * @author Yanfly Engine Plugins
  14. *
  15. * @param ---Settings---
  16. * @default
  17. *
  18. * @param Command Order
  19. * @desc This is the order in which the command menu will appear. Use
  20. * a space to separate the individual commands.
  21. * @default General Parameters Elements States Attributes Custom Cancel
  22. *
  23. * @param Command Window Width
  24. * @desc This is the window width for the Command Window.
  25. * @default 240
  26. *
  27. * @param Command Window Rows
  28. * @desc This is the number of rows for the Command Window.
  29. * @default 4
  30. *
  31. * @param Command Alignment
  32. * @desc This is the text alignment for the Command Window.
  33. * left     center     right
  34. * @default center
  35. *
  36. * @param ---General---
  37. * @default
  38. *
  39. * @param General Command
  40. * @desc This is how the command for 'General' will appear.
  41. * @default General
  42. *
  43. * @param Parameters Text
  44. * @desc This is how the word 'Parameters' will appear.
  45. * @default Parameters
  46. *
  47. * @param Experience Text
  48. * @desc This is how the word 'Experience' will appear.
  49. * @default Experience
  50. *
  51. * @param Total Format
  52. * @desc This is the word total experience.
  53. * @default Total %1 for Next %2
  54. *
  55. * @param EXP Gauge Color 1
  56. * @desc The skin color used in EXP Gauge Color 1 shown in the
  57. * status window.
  58. * @default 30
  59. *
  60. * @param EXP Gauge Color 2
  61. * @desc The skin color used in EXP Gauge Color 2 shown in the
  62. * status window.
  63. * @default 31
  64. *
  65. * @param ---Parameters---
  66. * @default
  67. *
  68. * @param Parameters Command
  69. * @desc This is how the command for 'Parameters' will appear.
  70. * @default Parameters
  71. *
  72. * @param Graph Text
  73. * @desc This is how the words for 'Parameter Graph' appear.
  74. * @default Parameter Graph
  75. *
  76. * @param ATK Color
  77. * @desc This is the gauge color for ATK.
  78. * #Color1 #Color2
  79. * @default #ed1c24 #f26c4f
  80. *
  81. * @param DEF Color
  82. * @desc This is the gauge color for DEF.
  83. * #Color1 #Color2
  84. * @default #f7941d #fdc689
  85. *
  86. * @param MAT Color
  87. * @desc This is the gauge color for MAT.
  88. * #Color1 #Color2
  89. * @default #605ca8 #bd8cbf
  90. *
  91. * @param MDF Color
  92. * @desc This is the gauge color for MDF.
  93. * #Color1 #Color2
  94. * @default #448ccb #a6caf4
  95. *
  96. * @param AGI Color
  97. * @desc This is the gauge color for AGI.
  98. * #Color1 #Color2
  99. * @default #39b54a #82ca9c
  100. *
  101. * @param LUK Color
  102. * @desc This is the gauge color for LUK.
  103. * #Color1 #Color2
  104. * @default #fff568 #fffac3
  105. *
  106. * @param ---Resist Colors---
  107. * @default
  108. *
  109. * @param Above 300%
  110. * @desc This is the text color for rates over 300%.
  111. * @default 10
  112. *
  113. * @param 200% to 300%
  114. * @desc This is the text color for rates over 200%.
  115. * @default 20
  116. *
  117. * @param 150% to 200%
  118. * @desc This is the text color for rates over 150%.
  119. * @default 14
  120. *
  121. * @param 120% to 150%
  122. * @desc This is the text color for rates over 120%.
  123. * @default 6
  124. *
  125. * @param 100% to 120%
  126. * @desc This is the text color for rates over 100%.
  127. * @default 0
  128. *
  129. * @param 80% to 100%
  130. * @desc This is the text color for rates over 80%.
  131. * @default 24
  132. *
  133. * @param 50% to 80%
  134. * @desc This is the text color for rates over 50%.
  135. * @default 29
  136. *
  137. * @param 1% to 50%
  138. * @desc This is the text color for rates over 1%.
  139. * @default 23
  140. *
  141. * @param Exactly 0%
  142. * @desc This is the text color for rates exactly 0%.
  143. * @default 31
  144. *
  145. * @param Below 0%
  146. * @desc This is the text color for rates below 0%.
  147. * @default 27
  148. *
  149. * @param ---Elements---
  150. * @default
  151. *
  152. * @param Elements Command
  153. * @desc This is how the command for 'Elements' will appear.
  154. * @default Elements
  155. *
  156. * @param Elements Decimal
  157. * @desc How many decimal places to display for rates.
  158. * @default 2
  159. *
  160. * @param Element Column 1
  161. * @desc These are the element ID's drawn in column 1.
  162. * Separate these element ID's with a space.
  163. * @default 1
  164. *
  165. * @param Element Column 2
  166. * @desc These are the element ID's drawn in column 2.
  167. * Separate these element ID's with a space.
  168. * @default 2 3 4 5 6 7 8 9
  169. *
  170. * @param Element Column 3
  171. * @desc These are the element ID's drawn in column 3.
  172. * Separate these element ID's with a space.
  173. * @default
  174. *
  175. * @param Element Column 4
  176. * @desc These are the element ID's drawn in column 4.
  177. * Separate these element ID's with a space.
  178. * @default
  179. *
  180. * @param ---State---
  181. * @default
  182. *
  183. * @param States Command
  184. * @desc This is how the command for 'States' will appear.
  185. * @default States
  186. *
  187. * @param States Decimal
  188. * @desc How many decimal places to display for rates.
  189. * @default 2
  190. *
  191. * @param States Column 1
  192. * @desc These are the state ID's drawn in column 1.
  193. * Separate these state ID's with a space.
  194. * @default 1 4 5 6
  195. *
  196. * @param States Column 2
  197. * @desc These are the state ID's drawn in column 2.
  198. * Separate these state ID's with a space.
  199. * @default 7 8 9 10
  200. *
  201. * @param States Column 3
  202. * @desc These are the state ID's drawn in column 3.
  203. * Separate these state ID's with a space.
  204. * @default
  205. *
  206. * @param States Column 4
  207. * @desc These are the state ID's drawn in column 4.
  208. * Separate these state ID's with a space.
  209. * @default
  210. *
  211. * @param ---Attributes---
  212. * @default
  213. *
  214. * @param Attributes Command
  215. * @desc This is how the command for 'Attributes' will appear.
  216. * @default Attributes
  217. *
  218. * @param Attribute Font Size
  219. * @desc The font size used to display attributes.
  220. * Default: 28
  221. * @default 20
  222. *
  223. * @param Attribute Decimal
  224. * @desc How many decimal places to display for rates.
  225. * @default 0
  226. *
  227. * @param Attributes Column 1
  228. * @desc These are the attributes drawn in column 1.
  229. * Separate these attributes with a space.
  230. * @default exr hit eva cri cev mev mrf cnt
  231. *
  232. * @param Attributes Column 2
  233. * @desc These are the attributes drawn in column 2.
  234. * Separate these attributes with a space.
  235. * @default mcr tcr pdr mdr fdr grd rec pha
  236. *
  237. * @param Attributes Column 3
  238. * @desc These are the attributes drawn in column 3.
  239. * Separate these attributes with a space.
  240. * @default hrg mrg trg tgr
  241. *
  242. * @param Attributes Column 4
  243. * @desc These are the attributes drawn in column 4.
  244. * Separate these attributes with a space.
  245. * @default
  246. *
  247. * @param hit Name
  248. * @desc The text name used for this attribute.
  249. * @default Hit Rate
  250. *
  251. * @param eva Name
  252. * @desc The text name used for this attribute.
  253. * @default Evasion Rate
  254. *
  255. * @param cri Name
  256. * @desc The text name used for this attribute.
  257. * @default Critical Hit Rate
  258. *
  259. * @param cev Name
  260. * @desc The text name used for this attribute.
  261. * @default Critical Evasion Rate
  262. *
  263. * @param mev Name
  264. * @desc The text name used for this attribute.
  265. * @default Magic Evasion Rate
  266. *
  267. * @param mrf Name
  268. * @desc The text name used for this attribute.
  269. * @default Magic Reflect Rate
  270. *
  271. * @param cnt Name
  272. * @desc The text name used for this attribute.
  273. * @default Counter Rate
  274. *
  275. * @param hrg Name
  276. * @desc The text name used for this attribute.
  277. * @default HP Regen Rate
  278. *
  279. * @param mrg Name
  280. * @desc The text name used for this attribute.
  281. * @default MP Regen Rate
  282. *
  283. * @param trg Name
  284. * @desc The text name used for this attribute.
  285. * @default TP Regen Rate
  286. *
  287. * @param tgr Name
  288. * @desc The text name used for this attribute.
  289. * @default Aggro Rate
  290. *
  291. * @param grd Name
  292. * @desc The text name used for this attribute.
  293. * @default Guard Effect
  294. *
  295. * @param rec Name
  296. * @desc The text name used for this attribute.
  297. * @default Recovery Effect
  298. *
  299. * @param pha Name
  300. * @desc The text name used for this attribute.
  301. * @default Pharmacology Effect
  302. *
  303. * @param mcr Name
  304. * @desc The text name used for this attribute.
  305. * @default MP Cost Rate
  306. *
  307. * @param tcr Name
  308. * @desc The text name used for this attribute.
  309. * @default TP Charge Rate
  310. *
  311. * @param pdr Name
  312. * @desc The text name used for this attribute.
  313. * @default Physical Damage Rate
  314. *
  315. * @param mdr Name
  316. * @desc The text name used for this attribute.
  317. * @default Magical Damage Rate
  318. *
  319. * @param fdr Name
  320. * @desc The text name used for this attribute.
  321. * @default Floor Damage Rate
  322. *
  323. * @param exr Name
  324. * @desc The text name used for this attribute.
  325. * @default Experience Rate
  326. *
  327. * @help
  328. * ============================================================================
  329. * Introduction
  330. * ============================================================================
  331. *
  332. * This plugin replaces the Status menu with a whole new layout. Including the
  333. * function to display more information regarding the actor. You can change the
  334. * order commands appear in game with the Command Order parameter.
  335. *
  336. * To add more commands, insert extension plugins under this plugin in the
  337. * Plugin Manager. Then, it will appear automatically in the Command Order
  338. * where you placed the 'Custom' string or elsewhere if you've placed the
  339. * extension plugin's keyword elsewhere.
  340. *
  341. * ============================================================================
  342. * Instructions
  343. * ============================================================================
  344. *
  345. * You can add and remove commands from the Command Window by changing the
  346. * 'Command Order' parameter. Here is a list of commands you may use:
  347. *
  348. *    General
  349. *    - Displays the current current stats and EXP for the actor.
  350. *
  351. *    Parameters
  352. *    - Displays a parameter gauge of the actor relative to other stats.
  353. *
  354. *    Elements
  355. *    - Displays the listed elements and their elemental rates.
  356. *
  357. *    States
  358. *    - Displays the listed states and their status infliction rates.
  359. *
  360. *    Attributes
  361. *    - Displays the listed attributes and their rates.
  362. *
  363. *    Custom
  364. *    - If you have any custom status window items to display, they will
  365. *    appear here.
  366. *
  367. *    Cancel
  368. *    - Adds a cancel command for leaving the Status Menu.
  369. *
  370. * ============================================================================
  371. * Adding Icons to Elements and Attributes
  372. * ============================================================================
  373. *
  374. * You can use icons for elements and attributes by using text codes.
  375. *
  376. * In the RPG Maker MV editor's database, types tab, for the elements, name
  377. * them as such:
  378. *
  379. * \i[64]Fire
  380. *
  381. * This will enable you to give the element an icon. You can also change the
  382. * text color and such using any of the available text codes.
  383. *
  384. * The same is applied for Attributes except you modify it within this plugin's
  385. * parameters. If you wish to display 'HP Regen Rate' with an icon, name it:
  386. *
  387. * \i[72]HP Regen Rate
  388. *
  389. * The icons will be drawn for the said attributes in addition to any other
  390. * text code modifications used.
  391. *
  392. * ============================================================================
  393. * Changelog
  394. * ============================================================================
  395. *
  396. * Version 1.01a:
  397. * - Converted Window_StatusInfo to Window_Selectable for those who would like
  398. * to use it as such.
  399. *
  400. * Version 1.00:
  401. * - Finished Plugin!
  402. */
  403. //=============================================================================

  404. //=============================================================================
  405. // Parameter Variables
  406. //=============================================================================

  407. Yanfly.Parameters = PluginManager.parameters('YEP_StatusMenuCore');
  408. Yanfly.Param = Yanfly.Param || {};

  409. Yanfly.Param.StatusCmdOrder = String(Yanfly.Parameters['Command Order']);
  410. Yanfly.Param.StatusCmdWidth = Number(Yanfly.Parameters['Command Window Width']);
  411. Yanfly.Param.StatusCmdRows = Number(Yanfly.Parameters['Command Window Rows']);
  412. Yanfly.Param.StatusCmdAlign = String(Yanfly.Parameters['Command Alignment']);

  413. Yanfly.Param.StatusGeneral = String(Yanfly.Parameters['General Command']);
  414. Yanfly.Param.StatusParamText = String(Yanfly.Parameters['Parameters Text']);
  415. Yanfly.Param.StatusExpText = String(Yanfly.Parameters['Experience Text']);
  416. Yanfly.Param.StatusTotalFmt = String(Yanfly.Parameters['Total Format']);
  417. Yanfly.Param.ColorExp1 = Number(Yanfly.Parameters['EXP Gauge Color 1']);
  418. Yanfly.Param.ColorExp2 = Number(Yanfly.Parameters['EXP Gauge Color 2']);

  419. Yanfly.Param.StatusParameters = String(Yanfly.Parameters['Parameters Command']);
  420. Yanfly.Param.StatusGraphText = String(Yanfly.Parameters['Graph Text']);
  421. Yanfly.Param.ColorParam2Gauge = String(Yanfly.Parameters['ATK Color']);
  422. Yanfly.Param.ColorParam3Gauge = String(Yanfly.Parameters['DEF Color']);
  423. Yanfly.Param.ColorParam4Gauge = String(Yanfly.Parameters['MAT Color']);
  424. Yanfly.Param.ColorParam5Gauge = String(Yanfly.Parameters['MDF Color']);
  425. Yanfly.Param.ColorParam6Gauge = String(Yanfly.Parameters['AGI Color']);
  426. Yanfly.Param.ColorParam7Gauge = String(Yanfly.Parameters['LUK Color']);

  427. Yanfly.Param.ColorResistS = Number(Yanfly.Parameters['Above 300%']);
  428. Yanfly.Param.ColorResistA = Number(Yanfly.Parameters['200% to 300%']);
  429. Yanfly.Param.ColorResistB = Number(Yanfly.Parameters['150% to 200%']);
  430. Yanfly.Param.ColorResistC1 = Number(Yanfly.Parameters['120% to 150%']);
  431. Yanfly.Param.ColorResistC2 = Number(Yanfly.Parameters['100% to 120%']);
  432. Yanfly.Param.ColorResistC3 = Number(Yanfly.Parameters['80% to 100%']);
  433. Yanfly.Param.ColorResistD = Number(Yanfly.Parameters['50% to 80%']);
  434. Yanfly.Param.ColorResistE = Number(Yanfly.Parameters['1% to 50%']);
  435. Yanfly.Param.ColorResistF = Number(Yanfly.Parameters['Exactly 0%']);
  436. Yanfly.Param.ColorResistG = Number(Yanfly.Parameters['Below 0%']);

  437. Yanfly.Param.StatusElements = String(Yanfly.Parameters['Elements Command']);
  438. Yanfly.Param.StatusEleDec = Number(Yanfly.Parameters['Elements Decimal']);
  439. Yanfly.Param.StatusEleCol1 = String(Yanfly.Parameters['Element Column 1']);
  440. Yanfly.Param.StatusEleCol1 = Yanfly.Param.StatusEleCol1.split(' ');
  441. Yanfly.Param.StatusEleCol2 = String(Yanfly.Parameters['Element Column 2']);
  442. Yanfly.Param.StatusEleCol2 = Yanfly.Param.StatusEleCol2.split(' ');
  443. Yanfly.Param.StatusEleCol3 = String(Yanfly.Parameters['Element Column 3']);
  444. Yanfly.Param.StatusEleCol3 = Yanfly.Param.StatusEleCol3.split(' ');
  445. Yanfly.Param.StatusEleCol4 = String(Yanfly.Parameters['Element Column 4']);
  446. Yanfly.Param.StatusEleCol4 = Yanfly.Param.StatusEleCol4.split(' ');

  447. Yanfly.Param.StatusStates = String(Yanfly.Parameters['States Command']);
  448. Yanfly.Param.StatusStatesDec = Number(Yanfly.Parameters['States Decimal']);
  449. Yanfly.Param.StatusStateCol1 = String(Yanfly.Parameters['States Column 1']);
  450. Yanfly.Param.StatusStateCol1 = Yanfly.Param.StatusStateCol1.split(' ');
  451. Yanfly.Param.StatusStateCol2 = String(Yanfly.Parameters['States Column 2']);
  452. Yanfly.Param.StatusStateCol2 = Yanfly.Param.StatusStateCol2.split(' ');
  453. Yanfly.Param.StatusStateCol3 = String(Yanfly.Parameters['States Column 3']);
  454. Yanfly.Param.StatusStateCol3 = Yanfly.Param.StatusStateCol3.split(' ');
  455. Yanfly.Param.StatusStateCol4 = String(Yanfly.Parameters['States Column 4']);
  456. Yanfly.Param.StatusStateCol4 = Yanfly.Param.StatusStateCol4.split(' ');

  457. Yanfly.Param.StatusAttributes = String(Yanfly.Parameters['Attributes Command']);
  458. Yanfly.Param.StatusAttriCol1 = String(Yanfly.Parameters['Attributes Column 1']);
  459. Yanfly.Param.StatusAttriCol1 = Yanfly.Param.StatusAttriCol1.split(' ');
  460. Yanfly.Param.StatusAttriCol2 = String(Yanfly.Parameters['Attributes Column 2']);
  461. Yanfly.Param.StatusAttriCol2 = Yanfly.Param.StatusAttriCol2.split(' ');
  462. Yanfly.Param.StatusAttriCol3 = String(Yanfly.Parameters['Attributes Column 3']);
  463. Yanfly.Param.StatusAttriCol3 = Yanfly.Param.StatusAttriCol3.split(' ');
  464. Yanfly.Param.StatusAttriCol4 = String(Yanfly.Parameters['Attributes Column 4']);
  465. Yanfly.Param.StatusAttriCol4 = Yanfly.Param.StatusAttriCol4.split(' ');
  466. Yanfly.Param.StatusAttrSize = Number(Yanfly.Parameters['Attribute Font Size']);
  467. Yanfly.Param.StatusAttrDec = Number(Yanfly.Parameters['Attribute Decimal']);
  468. Yanfly.Param.StatusAttr_hit = String(Yanfly.Parameters['hit Name']);
  469. Yanfly.Param.StatusAttr_eva = String(Yanfly.Parameters['eva Name']);
  470. Yanfly.Param.StatusAttr_cri = String(Yanfly.Parameters['cri Name']);
  471. Yanfly.Param.StatusAttr_cev = String(Yanfly.Parameters['cev Name']);
  472. Yanfly.Param.StatusAttr_mev = String(Yanfly.Parameters['mev Name']);
  473. Yanfly.Param.StatusAttr_mrf = String(Yanfly.Parameters['mrf Name']);
  474. Yanfly.Param.StatusAttr_cnt = String(Yanfly.Parameters['cnt Name']);
  475. Yanfly.Param.StatusAttr_hrg = String(Yanfly.Parameters['hrg Name']);
  476. Yanfly.Param.StatusAttr_mrg = String(Yanfly.Parameters['mrg Name']);
  477. Yanfly.Param.StatusAttr_trg = String(Yanfly.Parameters['trg Name']);
  478. Yanfly.Param.StatusAttr_tgr = String(Yanfly.Parameters['tgr Name']);
  479. Yanfly.Param.StatusAttr_grd = String(Yanfly.Parameters['grd Name']);
  480. Yanfly.Param.StatusAttr_rec = String(Yanfly.Parameters['rec Name']);
  481. Yanfly.Param.StatusAttr_pha = String(Yanfly.Parameters['pha Name']);
  482. Yanfly.Param.StatusAttr_mcr = String(Yanfly.Parameters['mcr Name']);
  483. Yanfly.Param.StatusAttr_tcr = String(Yanfly.Parameters['tcr Name']);
  484. Yanfly.Param.StatusAttr_pdr = String(Yanfly.Parameters['pdr Name']);
  485. Yanfly.Param.StatusAttr_mdr = String(Yanfly.Parameters['mdr Name']);
  486. Yanfly.Param.StatusAttr_fdr = String(Yanfly.Parameters['fdr Name']);
  487. Yanfly.Param.StatusAttr_exr = String(Yanfly.Parameters['exr Name']);

  488. //=============================================================================
  489. // Window_StatusCommand
  490. //=============================================================================

  491. function Window_StatusCommand() {
  492.     this.initialize.apply(this, arguments);
  493. }

  494. Window_StatusCommand.prototype = Object.create(Window_Command.prototype);
  495. Window_StatusCommand.prototype.constructor = Window_StatusCommand;

  496. Window_StatusCommand.prototype.initialize = function() {
  497.     Window_Command.prototype.initialize.call(this, 0, 0);
  498.     this._actor = null;
  499. };

  500. Window_StatusCommand.prototype.windowWidth = function() {
  501.     return Yanfly.Param.StatusCmdWidth;
  502. };

  503. Window_StatusCommand.prototype.setActor = function(actor) {
  504.     if (this._actor === actor) return;
  505.     this._actor = actor;
  506.     this.refresh();
  507.         this.select(0);
  508. };

  509. Window_StatusCommand.prototype.numVisibleRows = function() {
  510.     return Yanfly.Param.StatusCmdRows;
  511. };

  512. Window_StatusCommand.prototype.makeCommandList = function() {
  513.         this._commandOrder = Yanfly.Param.StatusCmdOrder.split(' ');
  514.         for (var i = 0; i < this._commandOrder.length; ++i) {
  515.             var command = this._commandOrder[i];
  516.             this.createCommand(command);
  517.         }
  518. };

  519. Window_StatusCommand.prototype.createCommand = function(command) {
  520.     command = command.toUpperCase();
  521.     if (['GENERAL', 'MAIN'].contains(command)) {
  522.             var text = Yanfly.Param.StatusGeneral;
  523.             this.addCommand(text, 'general', true);
  524.         } else if (['CANCEL', 'FINISH'].contains(command)) {
  525.             this.addCommand(TextManager.cancel, 'cancel', true);
  526.         } else if (['CUSTOM', 'ORIGINAL'].contains(command)) {
  527.             this.addCustomCommands();
  528.         } else if (['PARAMETER', 'PARAMETERS'].contains(command)) {
  529.       var text = Yanfly.Param.StatusParameters;
  530.       this.addCommand(text, 'parameters', true);
  531.     } else if (['ELEMENT', 'ELEMENTS'].contains(command)) {
  532.       var text = Yanfly.Param.StatusElements;
  533.       this.addCommand(text, 'elements', true);
  534.     } else if (['STATE', 'STATES'].contains(command)) {
  535.       var text = Yanfly.Param.StatusStates;
  536.       this.addCommand(text, 'states', true);
  537.     } else if (['ATTRIBUTE', 'ATTRIBUTES'].contains(command)) {
  538.       var text = Yanfly.Param.StatusAttributes;
  539.       this.addCommand(text, 'attributes', true);
  540.     }
  541. };

  542. Window_StatusCommand.prototype.addCustomCommands = function() {
  543. };

  544. Window_StatusCommand.prototype.setInfoWindow = function(infoWindow) {
  545.         this._infoWindow = infoWindow;
  546. };

  547. Window_StatusCommand.prototype.update = function() {
  548.     Window_Command.prototype.update.call(this);
  549.         if (this._infoWindow) this._infoWindow.setSymbol(this.currentSymbol());
  550. };

  551. Window_StatusCommand.prototype.itemTextAlign = function() {
  552.     return Yanfly.Param.StatusCmdAlign;
  553. };

  554. Window_StatusCommand.prototype.playOkSound = function() {
  555.     if (this.isPlayOkSound()) SoundManager.playOk();
  556. };

  557. Window_StatusCommand.prototype.isPlayOkSound = function() {
  558.     if (this.currentSymbol() === 'cancel') return true;
  559.     return false;
  560. };

  561. //=============================================================================
  562. // Window_StatusInfo
  563. //=============================================================================

  564. function Window_StatusInfo() {
  565.     this.initialize.apply(this, arguments);
  566. }

  567. Window_StatusInfo.prototype = Object.create(Window_Selectable.prototype);
  568. Window_StatusInfo.prototype.constructor = Window_StatusInfo;

  569. Window_StatusInfo.prototype.initialize = function(y, commandWindow) {
  570.     var width = Graphics.boxWidth;
  571.         var height = Graphics.boxHeight - y;
  572.         this._commandWindow = commandWindow;
  573.         Window_Selectable.prototype.initialize.call(this, 0, y, width, height);
  574.         this.findParamLimits();
  575. };

  576. Window_StatusInfo.prototype.findParamLimits = function() {
  577.         this._largestParam = 1;
  578.         this._smallestParam = $gameActors.actor(1).paramMax(2);
  579.         for (var i = 0; i < $gameParty.members().length; ++i) {
  580.             var actor = $gameParty.members()[i];
  581.             if (!actor) continue;
  582.             for (var j = 2; j < 8; ++j) {
  583.                 this._largestParam = Math.max(this._largestParam, actor.param(j));
  584.                 this._smallestParam = Math.min(this._smallestParam, actor.param(j));
  585.             }
  586.         }
  587. };

  588. Window_StatusInfo.prototype.setActor = function(actor) {
  589.     if (this._actor === actor) return;
  590.     this._actor = actor;
  591.     this.refresh();
  592. };

  593. Window_StatusInfo.prototype.setSymbol = function(symbol) {
  594.     var needRefresh = this._symbol !== symbol;
  595.         this._symbol = symbol;
  596.         if (needRefresh) this.refresh();
  597. };

  598. Window_StatusInfo.prototype.resetFontSettings = function() {
  599.     if (this._bypassResetText) return;
  600.     Window_Base.prototype.resetFontSettings.call(this);
  601. };

  602. Window_StatusInfo.prototype.resetTextColor = function() {
  603.     if (this._bypassResetTextColor) return;
  604.     Window_Base.prototype.resetTextColor.call(this);
  605. };

  606. Window_StatusInfo.prototype.refresh = function() {
  607.     this.contents.clear();
  608.         this.drawInfoContents(this._symbol);
  609. };

  610. Window_StatusInfo.prototype.drawInfoContents = function(symbol) {
  611.     this.resetFontSettings();
  612.     if (!symbol) return;
  613.     switch (symbol.toLowerCase()) {
  614.     case 'parameters':
  615.       this.drawParameters();
  616.       break;
  617.     case 'elements':
  618.       this.drawElements();
  619.       break;
  620.     case 'states':
  621.       this.drawStates();
  622.       break;
  623.     case 'attributes':
  624.       this.drawAttributes();
  625.       break;
  626.     default:
  627.       this.drawGeneral();
  628.       break;
  629.     }
  630. };

  631. Window_StatusInfo.prototype.drawDarkRect = function(dx, dy, dw, dh) {
  632.     var color = this.gaugeBackColor();
  633.     this.changePaintOpacity(false);
  634.     this.contents.fillRect(dx + 1, dy + 1, dw - 2, dh - 2, color);
  635.     this.changePaintOpacity(true);
  636. };

  637. Window_StatusInfo.prototype.drawGeneral = function() {
  638.         var dx = this.standardPadding() / 2;
  639.         var dy = this.lineHeight() / 2;
  640.         var dw = (this.contents.width - this.standardPadding()) / 2;
  641.         var dh = this.lineHeight();
  642.         var text;
  643.         this.changeTextColor(this.systemColor());
  644.         this.drawText(Yanfly.Param.StatusParamText, dx, dy, dw, 'center');
  645.         dx += this.contents.width / 2;
  646.         this.drawText(Yanfly.Param.StatusExpText, dx, dy, dw, 'center');
  647.         this.drawGeneralParam(dx, dy, dw, dh);
  648.         this.drawGeneralExp(dx, dy, dw, dh);
  649. };

  650. Window_StatusInfo.prototype.drawGeneralParam = function() {
  651.     var rect = new Rectangle();
  652.     rect.width = (this.contents.width - this.standardPadding()) / 2;
  653.     rect.y = this.lineHeight() * 2;
  654.     rect.height = this.lineHeight();
  655.     var dx = rect.x + this.textPadding();
  656.     var dw = rect.width - this.textPadding() * 2;
  657.     this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
  658.     this.changeTextColor(this.systemColor());
  659.         this.drawText(TextManager.level, dx, rect.y, dw, 'left');
  660.         this.changeTextColor(this.normalColor());
  661.         text = Yanfly.Util.toGroup(this._actor.level);
  662.         this.drawText(text, dx, rect.y, dw, 'right');
  663.     for (var i = 0; i < 8; ++i) {
  664.       if (i < 2) {
  665.         rect.y += this.lineHeight();
  666.       } else if (i === 2) {
  667.         rect.y += this.lineHeight();
  668.         rect.width /= 2;
  669.         dw = rect.width - this.textPadding() * 2;
  670.       } else if (i % 2 === 0) {
  671.         rect.x = 0;
  672.         dx = rect.x + this.textPadding();
  673.         rect.y += this.lineHeight();
  674.       } else {
  675.         rect.x += rect.width;
  676.         dx += rect.width;
  677.       }
  678.       this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
  679.       this.changeTextColor(this.systemColor());
  680.         this.drawText(TextManager.param(i), dx, rect.y, dw, 'left');
  681.         this.changeTextColor(this.normalColor());
  682.         text = Yanfly.Util.toGroup(this._actor.param(i));
  683.         this.drawText(text, dx, rect.y, dw, 'right');
  684.     }
  685. };

  686. Window_StatusInfo.prototype.actorCurrentExpRate = function(actor) {
  687.     var actorLv = actor.level;
  688.     if (actorLv === actor.maxLevel()) return 1.0;
  689.     var nowExp = actor.currentExp() - actor.expForLevel(actorLv);
  690.     var nextExp = actor.expForLevel(actorLv + 1) - actor.expForLevel(actorLv);
  691.     return (1.0 * nowExp / nextExp).clamp(0.0, 1.0);
  692. };

  693. Window_StatusInfo.prototype.actorExpRate = function(actor) {
  694.     var actorLv = actor.level;
  695.     if (actorLv === actor.maxLevel()) return 1.0;
  696.     var nowExp = actor.currentExp();
  697.     var nextExp = actor.expForLevel(actorLv + 1);
  698.     return (1.0 * nowExp / nextExp).clamp(0.0, 1.0);
  699. };

  700. Window_StatusInfo.prototype.drawExpGauge = function(actor, rate, rect) {
  701.     var color1 = this.textColor(Yanfly.Param.ColorExp1);
  702.     var color2 = this.textColor(Yanfly.Param.ColorExp2);
  703.     var wy = rect.y;
  704.     this.drawGauge(rect.x, wy, rect.width, rate, color1, color2);
  705. };

  706. Window_StatusInfo.prototype.drawGeneralExp = function(dx, dy, dw, dh) {
  707.     dy = this.lineHeight() * 2;
  708.     dw = (this.contents.width - this.textPadding()) / 2;
  709.     dx = this.textPadding() + dw;
  710.     // Current Exp
  711.     this.changeTextColor(this.systemColor());
  712.     text = TextManager.expTotal.format(TextManager.exp);
  713.     this.drawText(text, dx, dy, dw, 'left');
  714.     dy += this.lineHeight();
  715.     this.changeTextColor(this.normalColor());
  716.     text = Yanfly.Util.toGroup(this._actor.currentExp());
  717.     this.drawText(text, dx, dy, dw, 'right');
  718.     // To Next Level
  719.     dy += this.lineHeight();
  720.     this.changeTextColor(this.systemColor());
  721.     text = TextManager.expNext.format(TextManager.level);
  722.     this.drawText(text, dx, dy, dw, 'left');
  723.     dy += this.lineHeight();
  724.     var rect = new Rectangle();
  725.     rect.x = dx; rect.y = dy; rect.width = dw;
  726.     var rate = this.actorCurrentExpRate(this._actor);
  727.     this.drawExpGauge(this._actor, rate, rect);
  728.     this.changeTextColor(this.normalColor());
  729.     text = Yanfly.Util.toGroup(this._actor.nextRequiredExp());
  730.     if (this._actor.isMaxLevel()) text = '-------';
  731.     this.drawText(text, dx, dy, dw, 'right');
  732.     // Total EXP for Next Level
  733.     dy += this.lineHeight();
  734.     this.changeTextColor(this.systemColor());
  735.     text = Yanfly.Param.StatusTotalFmt.format(TextManager.exp,
  736.         TextManager.level);
  737.     this.drawText(text, dx, dy, dw, 'left');
  738.     dy += this.lineHeight();
  739.     var rect = new Rectangle();
  740.     rect.x = dx; rect.y = dy; rect.width = dw;
  741.     var rate = this.actorExpRate(this._actor);
  742.     this.drawExpGauge(this._actor, rate, rect);
  743.     this.changeTextColor(this.normalColor());
  744.     text = Yanfly.Util.toGroup(this._actor.nextLevelExp());
  745.     if (this._actor.isMaxLevel()) text = '-------';
  746.     this.drawText(text, dx, dy, dw, 'right');
  747. };

  748. Window_StatusInfo.prototype.drawParameters = function() {
  749.         var dx = 0;
  750.         var dy = this.lineHeight() / 2;
  751.         var dw = this.contents.width;
  752.         var dh = this.lineHeight();
  753.         var dw2;
  754.         var text;
  755.         this.changeTextColor(this.systemColor());
  756.         this.drawText(Yanfly.Param.StatusGraphText, dx, dy, dw, 'center');
  757.         dy = this.lineHeight();
  758.         dx = this.standardPadding();
  759.         dw -= this.standardPadding() * 2;
  760.         for (var i = 2; i < 8; ++i) {
  761.             dy += this.lineHeight();
  762.             var rate = this.drawParamGauge(dx, dy, dw, i);
  763.             this.changeTextColor(this.systemColor());
  764.             this.drawText(TextManager.param(i), dx + 4, dy, dw - 4);
  765.             text = Yanfly.Util.toGroup(this._actor.param(i))
  766.             this.changeTextColor(this.normalColor());
  767.             dw2 = dw * rate;
  768.             this.drawText(text, dx, dy, dw2 - 4, 'right');
  769.         }
  770. };

  771. Window_StatusInfo.prototype.drawParamGauge = function(dx, dy, dw, paramId) {
  772.         var rate = this.calcParamRate(paramId);
  773.         var array = eval('Yanfly.Param.ColorParam' + paramId + 'Gauge').split(' ');
  774.         this.drawGauge(dx, dy, dw, rate, array[0], array[1]);
  775.         return rate;
  776. };

  777. Window_StatusInfo.prototype.calcParamRate = function(paramId) {
  778.         if (this._largestParam === this._smallestParam) return 1.0;
  779.         var rate = parseFloat(this._actor.param(paramId) - this._smallestParam) /
  780.                              parseFloat(this._largestParam - this._smallestParam);
  781.         rate *= 0.7;
  782.         rate += 0.3;
  783.         return rate;
  784. };

  785. Window_StatusInfo.prototype.getMaxArrayCols = function(array) {
  786.     var maxCols = 0;
  787.     for (var i = 0; i < array.length; ++i) {
  788.       var arr = array[i];
  789.       if (arr[0] !== '') ++maxCols;
  790.     }
  791.     return maxCols;
  792. };

  793. Window_StatusInfo.prototype.getMaxArrayRows = function(array) {
  794.     var maxRows = 0;
  795.     for (var i = 0; i < array.length; ++i) {
  796.       var arr = array[i];
  797.       maxRows = Math.max(maxRows, arr.length);
  798.     }
  799.     return maxRows;
  800. };

  801. Window_StatusInfo.prototype.getArrayX = function() {
  802.     return this.standardPadding() * 1.5;
  803. };

  804. Window_StatusInfo.prototype.getArrayY = function() {
  805.     return 0;
  806. };

  807. Window_StatusInfo.prototype.getArrayDW = function(maxCols) {
  808.     var dw = this.contents.width - this.standardPadding() * 3;
  809.     dw /= maxCols;
  810.     dw += this.standardPadding() / maxCols;
  811.     dw -= this.standardPadding();
  812.     return dw;
  813. };

  814. Window_StatusInfo.prototype.setRateColor = function(rate) {
  815.     var colorId = 0;
  816.     if (rate >= 3.0) {
  817.       colorId = Yanfly.Param.ColorResistS;
  818.     } else if (rate >= 2.0) {
  819.       colorId = Yanfly.Param.ColorResistA;
  820.     } else if (rate >= 1.5) {
  821.       colorId = Yanfly.Param.ColorResistB;
  822.     } else if (rate >= 1.2) {
  823.       colorId = Yanfly.Param.ColorResistC1;
  824.     } else if (rate >= 1.0) {
  825.       colorId = Yanfly.Param.ColorResistC2;
  826.     } else if (rate >= 0.8) {
  827.       colorId = Yanfly.Param.ColorResistC3;
  828.     } else if (rate >= 0.5) {
  829.       colorId = Yanfly.Param.ColorResistD;
  830.     } else if (rate > 0) {
  831.       colorId = Yanfly.Param.ColorResistE;
  832.     } else if (rate === 0) {
  833.       colorId = Yanfly.Param.ColorResistF;
  834.     } else {
  835.       colorId = Yanfly.Param.ColorResistG;
  836.     }
  837.     this.changeTextColor(this.textColor(colorId));
  838. };

  839. Window_StatusInfo.prototype.drawElements = function() {
  840.     this.drawElementColumnRects();
  841.     this.drawElementInfo();
  842. };

  843. Window_StatusInfo.prototype.elementArray = function() {
  844.     var array = [
  845.       Yanfly.Param.StatusEleCol1,
  846.       Yanfly.Param.StatusEleCol2,
  847.       Yanfly.Param.StatusEleCol3,
  848.       Yanfly.Param.StatusEleCol4
  849.     ];
  850.     return array;
  851. };

  852. Window_StatusInfo.prototype.drawElementColumnRects = function() {
  853.     var maxCols = this.getMaxArrayCols(this.elementArray());
  854.     var maxRows = this.getMaxArrayRows(this.elementArray());
  855.     if (maxCols <= 0) return;
  856.     var dx = this.getArrayX();
  857.     var dy = this.getArrayY();
  858.     var dw = this.getArrayDW(maxCols);
  859.     for (var i = 0; i < maxCols; ++i) {
  860.       for (var j = 0; j < maxRows; ++j) {
  861.         this.drawDarkRect(dx, dy, dw, this.lineHeight());
  862.         dy += this.lineHeight();
  863.       }
  864.       dx += dw;
  865.       dx += (maxCols > 1) ? this.standardPadding() : 0;
  866.       dy = 0;
  867.     }
  868. };

  869. Window_StatusInfo.prototype.drawElementInfo = function() {
  870.     var maxCols = this.getMaxArrayCols(this.elementArray());
  871.     var maxRows = this.getMaxArrayRows(this.elementArray());
  872.     if (maxCols <= 0) return;
  873.     var infoArray = this.elementArray();
  874.     var dx = this.getArrayX();
  875.     var dy = this.getArrayY();
  876.     var dw = this.getArrayDW(maxCols);
  877.     for (var i = 0; i < maxCols; ++i) {
  878.       for (var j = 0; j < infoArray[i].length; ++j) {
  879.         var eleId = infoArray[i][j];
  880.         this.drawElementData(eleId, dx, dy, dw)
  881.         dy += this.lineHeight();
  882.       }
  883.       dx += dw;
  884.       dx += (maxCols > 1) ? this.standardPadding() : 0;
  885.       dy = 0;
  886.     }
  887. };

  888. Window_StatusInfo.prototype.drawElementData = function(eleId, dx, dy, dw) {
  889.     eleId = parseInt(eleId);
  890.     var eleName = $dataSystem.elements[eleId];
  891.     var eleRate = this._actor.elementRate(eleId);
  892.     dx += this.textPadding();
  893.     dw -= this.textPadding() * 2;
  894.     this._bypassResetTextColor = true;
  895.     this.changeTextColor(this.systemColor());
  896.     this.drawTextEx(eleName, dx, dy);
  897.     this._bypassResetTextColor = false;
  898.     this.setRateColor(eleRate);
  899.     var text = (eleRate * 100).toFixed(Yanfly.Param.StatusEleDec) + '%';
  900.     this.drawText(text, dx, dy, dw, 'right');
  901. };

  902. Window_StatusInfo.prototype.drawStates = function() {
  903.     this.drawStatesColumnRects();
  904.     this.drawStatesInfo();
  905. };

  906. Window_StatusInfo.prototype.stateArray = function() {
  907.     var array = [
  908.       Yanfly.Param.StatusStateCol1,
  909.       Yanfly.Param.StatusStateCol2,
  910.       Yanfly.Param.StatusStateCol3,
  911.       Yanfly.Param.StatusStateCol4
  912.     ];
  913.     return array;
  914. };

  915. Window_StatusInfo.prototype.drawStatesColumnRects = function() {
  916.     var maxCols = this.getMaxArrayCols(this.stateArray());
  917.     var maxRows = this.getMaxArrayRows(this.stateArray());
  918.     if (maxCols <= 0) return;
  919.     var dx = this.getArrayX();
  920.     var dy = this.getArrayY();
  921.     var dw = this.getArrayDW(maxCols);
  922.     for (var i = 0; i < maxCols; ++i) {
  923.       for (var j = 0; j < maxRows; ++j) {
  924.         this.drawDarkRect(dx, dy, dw, this.lineHeight());
  925.         dy += this.lineHeight();
  926.       }
  927.       dx += dw;
  928.       dx += (maxCols > 1) ? this.standardPadding() : 0;
  929.       dy = 0;
  930.     }
  931. };

  932. Window_StatusInfo.prototype.drawStatesInfo = function() {
  933.     var maxCols = this.getMaxArrayCols(this.stateArray());
  934.     var maxRows = this.getMaxArrayRows(this.stateArray());
  935.     if (maxCols <= 0) return;
  936.     var infoArray = this.stateArray();
  937.     var dx = this.getArrayX();
  938.     var dy = this.getArrayY();
  939.     var dw = this.getArrayDW(maxCols);
  940.     for (var i = 0; i < maxCols; ++i) {
  941.       for (var j = 0; j < infoArray[i].length; ++j) {
  942.         var stateId = infoArray[i][j];
  943.         this.drawStatesData(stateId, dx, dy, dw)
  944.         dy += this.lineHeight();
  945.       }
  946.       dx += dw;
  947.       dx += (maxCols > 1) ? this.standardPadding() : 0;
  948.       dy = 0;
  949.     }
  950. };

  951. Window_StatusInfo.prototype.drawStatesData = function(stateId, dx, dy, dw) {
  952.     stateId = parseInt(stateId);
  953.     var stateRate = this._actor.stateRate(stateId);
  954.     if (this._actor.isStateResist(stateId)) stateRate = 0;
  955.     dx += this.textPadding();
  956.     dw -= this.textPadding() * 2;
  957.     this._bypassResetTextColor = true;
  958.     this.changeTextColor(this.systemColor());
  959.     this.drawItemName($dataStates[stateId], dx, dy, dw);
  960.     this._bypassResetTextColor = false;
  961.     this.setRateColor(stateRate);
  962.     var text = (stateRate * 100).toFixed(Yanfly.Param.StatusStatesDec) + '%';
  963.     this.drawText(text, dx, dy, dw, 'right');
  964. };



  965. Window_StatusInfo.prototype.drawAttributes = function() {
  966.     this.drawAttributesColumnRects();
  967.     this.drawAttributesInfo();
  968. };

  969. Window_StatusInfo.prototype.attributesArray = function() {
  970.     var array = [
  971.       Yanfly.Param.StatusAttriCol1,
  972.       Yanfly.Param.StatusAttriCol2,
  973.       Yanfly.Param.StatusAttriCol3,
  974.       Yanfly.Param.StatusAttriCol4
  975.     ];
  976.     return array;
  977. };

  978. Window_StatusInfo.prototype.drawAttributesColumnRects = function() {
  979.     var maxCols = this.getMaxArrayCols(this.attributesArray());
  980.     var maxRows = this.getMaxArrayRows(this.attributesArray());
  981.     if (maxCols <= 0) return;
  982.     var dx = this.getArrayX();
  983.     var dy = this.getArrayY();
  984.     var dw = this.getArrayDW(maxCols);
  985.     for (var i = 0; i < maxCols; ++i) {
  986.       for (var j = 0; j < maxRows; ++j) {
  987.         this.drawDarkRect(dx, dy, dw, this.lineHeight());
  988.         dy += this.lineHeight();
  989.       }
  990.       dx += dw;
  991.       dx += (maxCols > 1) ? this.standardPadding() : 0;
  992.       dy = 0;
  993.     }
  994. };

  995. Window_StatusInfo.prototype.drawAttributesInfo = function() {
  996.     var maxCols = this.getMaxArrayCols(this.attributesArray());
  997.     var maxRows = this.getMaxArrayRows(this.attributesArray());
  998.     if (maxCols <= 0) return;
  999.     var infoArray = this.attributesArray();
  1000.     var dx = this.getArrayX();
  1001.     var dy = this.getArrayY();
  1002.     var dw = this.getArrayDW(maxCols);
  1003.     for (var i = 0; i < maxCols; ++i) {
  1004.       for (var j = 0; j < infoArray[i].length; ++j) {
  1005.         var attribute = infoArray[i][j].toLowerCase();
  1006.         this.drawAttributeData(attribute, dx, dy, dw)
  1007.         dy += this.lineHeight();
  1008.       }
  1009.       dx += dw;
  1010.       dx += (maxCols > 1) ? this.standardPadding() : 0;
  1011.       dy = 0;
  1012.     }
  1013. };

  1014. Window_StatusInfo.prototype.drawAttributeData = function(attr, dx, dy, dw) {
  1015.     var actor = this._actor;
  1016.     this.contents.fontSize = Yanfly.Param.StatusAttrSize;
  1017.     switch (attr) {
  1018.     case 'hit':
  1019.       this.drawAttributeName(Yanfly.Param.StatusAttr_hit, dx, dy, dw);
  1020.       this.drawAttributeRate(actor.hit, dx, dy, dw);
  1021.       break;
  1022.     case 'eva':
  1023.       this.drawAttributeName(Yanfly.Param.StatusAttr_eva, dx, dy, dw);
  1024.       this.drawAttributeRate(actor.eva, dx, dy, dw);
  1025.       break;
  1026.     case 'cri':
  1027.       this.drawAttributeName(Yanfly.Param.StatusAttr_cri, dx, dy, dw);
  1028.       this.drawAttributeRate(actor.cri, dx, dy, dw);
  1029.       break;
  1030.     case 'cev':
  1031.       this.drawAttributeName(Yanfly.Param.StatusAttr_cev, dx, dy, dw);
  1032.       this.drawAttributeRate(actor.cev, dx, dy, dw);
  1033.       break;
  1034.     case 'mev':
  1035.       this.drawAttributeName(Yanfly.Param.StatusAttr_mev, dx, dy, dw);
  1036.       this.drawAttributeRate(actor.mev, dx, dy, dw);
  1037.       break;
  1038.     case 'mrf':
  1039.       this.drawAttributeName(Yanfly.Param.StatusAttr_mrf, dx, dy, dw);
  1040.       this.drawAttributeRate(actor.mrf, dx, dy, dw);
  1041.       break;
  1042.     case 'cnt':
  1043.       this.drawAttributeName(Yanfly.Param.StatusAttr_cnt, dx, dy, dw);
  1044.       this.drawAttributeRate(actor.cnt, dx, dy, dw);
  1045.       break;
  1046.     case 'hrg':
  1047.       this.drawAttributeName(Yanfly.Param.StatusAttr_hrg, dx, dy, dw);
  1048.       this.drawAttributeRate(actor.hrg, dx, dy, dw);
  1049.       break;
  1050.     case 'mrg':
  1051.       this.drawAttributeName(Yanfly.Param.StatusAttr_mrg, dx, dy, dw);
  1052.       this.drawAttributeRate(actor.mrg, dx, dy, dw);
  1053.       break;
  1054.     case 'trg':
  1055.       this.drawAttributeName(Yanfly.Param.StatusAttr_trg, dx, dy, dw);
  1056.       this.drawAttributeRate(actor.trg, dx, dy, dw);
  1057.       break;
  1058.     case 'tgr':
  1059.       this.drawAttributeName(Yanfly.Param.StatusAttr_tgr, dx, dy, dw);
  1060.       this.drawAttributeRate(actor.tgr, dx, dy, dw);
  1061.       break;
  1062.     case 'grd':
  1063.       this.drawAttributeName(Yanfly.Param.StatusAttr_grd, dx, dy, dw);
  1064.       this.drawAttributeRate(actor.grd, dx, dy, dw);
  1065.       break;
  1066.     case 'rec':
  1067.       this.drawAttributeName(Yanfly.Param.StatusAttr_rec, dx, dy, dw);
  1068.       this.drawAttributeRate(actor.rec, dx, dy, dw);
  1069.       break;
  1070.     case 'pha':
  1071.       this.drawAttributeName(Yanfly.Param.StatusAttr_pha, dx, dy, dw);
  1072.       this.drawAttributeRate(actor.pha, dx, dy, dw);
  1073.       break;
  1074.     case 'mcr':
  1075.       this.drawAttributeName(Yanfly.Param.StatusAttr_mcr, dx, dy, dw);
  1076.       this.drawAttributeRate(actor.mcr, dx, dy, dw);
  1077.       break;
  1078.     case 'tcr':
  1079.       this.drawAttributeName(Yanfly.Param.StatusAttr_tcr, dx, dy, dw);
  1080.       this.drawAttributeRate(actor.tcr, dx, dy, dw);
  1081.       break;
  1082.     case 'pdr':
  1083.       this.drawAttributeName(Yanfly.Param.StatusAttr_pdr, dx, dy, dw);
  1084.       this.drawAttributeRate(actor.pdr, dx, dy, dw);
  1085.       break;
  1086.     case 'mdr':
  1087.       this.drawAttributeName(Yanfly.Param.StatusAttr_mdr, dx, dy, dw);
  1088.       this.drawAttributeRate(actor.mdr, dx, dy, dw);
  1089.       break;
  1090.     case 'fdr':
  1091.       this.drawAttributeName(Yanfly.Param.StatusAttr_fdr, dx, dy, dw);
  1092.       this.drawAttributeRate(actor.fdr, dx, dy, dw);
  1093.       break;
  1094.     case 'exr':
  1095.       this.drawAttributeName(Yanfly.Param.StatusAttr_exr, dx, dy, dw);
  1096.       this.drawAttributeRate(actor.exr, dx, dy, dw);
  1097.       break;
  1098.     default:
  1099.       break;
  1100.     }
  1101. };

  1102. Window_StatusInfo.prototype.drawAttributeName = function(name, dx, dy, dw) {
  1103.     this.changeTextColor(this.systemColor());
  1104.     dx += this.textPadding();
  1105.     dw -= this.textPadding() * 2;
  1106.     dy += Math.floor((this.standardFontSize() - this.contents.fontSize) / 2);
  1107.     this._bypassResetText = true;
  1108.     this.changeTextColor(this.systemColor());
  1109.     this.drawTextEx(name, dx, dy, dw);
  1110.     this._bypassResetText = false;
  1111. };

  1112. Window_StatusInfo.prototype.drawAttributeRate = function(rate, dx, dy, dw) {
  1113.     var value = (rate * 100).toFixed(Yanfly.Param.StatusAttrDec) + '%';
  1114.     this.setRateColor(rate);
  1115.     this.drawAttributeValue(value, dx, dy, dw);
  1116. };

  1117. Window_StatusInfo.prototype.drawAttributeValue = function(value, dx, dy, dw) {
  1118.     dx += this.textPadding();
  1119.     dw -= this.textPadding() * 2;
  1120.     this.drawText(value, dx, dy, dw, 'right');
  1121. };

  1122. Window_StatusInfo.prototype.maxPageItems = function() {
  1123.     return this.maxItems();
  1124. };

  1125. Window_Selectable.prototype.maxItems = function() {
  1126.     return 1;
  1127. };

  1128. Window_StatusInfo.prototype.drawItem = function(index) {
  1129.     this.clearItem(index);
  1130. };

  1131. Window_StatusInfo.prototype.drawAllItems = function() {
  1132.     var topIndex = this.topIndex();
  1133.     for (var i = 0; i < this.maxPageItems(); i++) {
  1134.         var index = topIndex + i;
  1135.         if (index < this.maxItems()) {
  1136.             this.drawItem(index);
  1137.         }
  1138.     }
  1139. };

  1140. //=============================================================================
  1141. // Scene_Status
  1142. //=============================================================================

  1143. Scene_Status.prototype.create = function() {
  1144.     Scene_MenuBase.prototype.create.call(this);
  1145.     this.createHelpWindow();
  1146.         this.createCommandWindow();
  1147.         this.createStatusWindow();
  1148.         this.createInfoWindow();
  1149.     this.refreshActor();
  1150. };

  1151. Scene_Status.prototype.refreshActor = function() {
  1152.         var actor = this.actor();
  1153.         this._statusWindow.setActor(actor);
  1154.         this._helpWindow.setText(actor.profile());
  1155.         this._infoWindow.setActor(actor);
  1156. };

  1157. Scene_Status.prototype.onActorChange = function() {
  1158.     this.refreshActor();
  1159.     this._commandWindow.activate();
  1160. };

  1161. Scene_Status.prototype.createCommandWindow = function() {
  1162.         this._commandWindow = new Window_StatusCommand();
  1163.         this._commandWindow.x = 0;
  1164.         this._commandWindow.y = this._helpWindow.height;
  1165.         this.setCommandWindowHandlers();
  1166.         this.addWindow(this._commandWindow);
  1167. };

  1168. Scene_Status.prototype.setCommandWindowHandlers = function() {
  1169.         this._commandWindow.setHandler('cancel', this.popScene.bind(this));
  1170.         this._commandWindow.setHandler('pagedown', this.nextActor.bind(this));
  1171.     this._commandWindow.setHandler('pageup',   this.previousActor.bind(this));
  1172. };

  1173. Scene_Status.prototype.createStatusWindow = function() {
  1174.     var wx = this._commandWindow.width;
  1175.     var wy = this._helpWindow.height;
  1176.     var ww = Graphics.boxWidth - wx;
  1177.     var wh = this._commandWindow.height;
  1178.     this._statusWindow = new Window_SkillStatus(wx, wy, ww, wh);
  1179.     this.addWindow(this._statusWindow);
  1180. };

  1181. Scene_Status.prototype.createInfoWindow = function() {
  1182.         var wy = this._helpWindow.height + this._commandWindow.height;
  1183.         this._infoWindow = new Window_StatusInfo(wy, this._commandWindow);
  1184.         this._commandWindow.setInfoWindow(this._infoWindow);
  1185.         this.addWindow(this._infoWindow);
  1186.     this._infoWindow.setHandler('cancel', this.onInfoCancel.bind(this));
  1187. };

  1188. Scene_Status.prototype.onInfoCancel = function() {
  1189.     this._commandWindow.activate();
  1190.     this._infoWindow.deselect();
  1191. };

  1192. //=============================================================================
  1193. // Utilities
  1194. //=============================================================================

  1195. Yanfly.Util = Yanfly.Util || {};

  1196. if (!Yanfly.Util.toGroup) {
  1197.         Yanfly.Util.toGroup = function(inVal) {
  1198.                 return inVal;
  1199.         }
  1200. };

  1201. //=============================================================================
  1202. // End of File
  1203. //============================================================================
复制代码



评分

参与人数 1梦石 +1 收起 理由
余烬之中 + 1 0.0

查看全部评分

梦石
0
星屑
50
在线时间
44 小时
注册时间
2015-12-27
回帖
42
 楼主| 发表于 2016-1-16 12:39:30 | 显示全部楼层
QQ截图20160116123233.jpg

回家测试,这个插件用不了,求用过此插件的帮忙看看
回复

使用道具 举报

梦石
0
星屑
342
在线时间
101 小时
注册时间
2013-9-10
回帖
35
发表于 2016-1-17 12:38:00 | 显示全部楼层
我用起来没问题,就是atb战斗模式的行动条显示的不美丽

点评

是我看错啦。。。。  发表于 2016-1-18 08:33
这个是菜单里状态的,和战斗没关系啊  发表于 2016-1-17 13:53
回复

使用道具 举报

梦石
0
星屑
65
在线时间
145 小时
注册时间
2008-2-20
回帖
12
发表于 2016-1-17 15:40:29 | 显示全部楼层
没问题。。。。。。。。。。。。。。。。。。。。。
QQ截图20160117153556.png
QQ截图20160117153615.png
QQ截图20160117153622.png
QQ截图20160117153627.png
QQ截图20160117153635.png

点评

我的为什么就那个样子? 是版本的问题(我的是MV1.01)?还是需要YEP其他插件辅助?  发表于 2016-1-17 17:18
回复

使用道具 举报

梦石
0
星屑
65
在线时间
145 小时
注册时间
2008-2-20
回帖
12
发表于 2016-1-17 18:25:16 | 显示全部楼层
YEP需要个核心插件啊。就是最主要的那个玩意。。
回复

使用道具 举报

梦石
0
星屑
50
在线时间
258 小时
注册时间
2011-12-23
回帖
71
发表于 2016-1-17 21:45:03 | 显示全部楼层
不用其他插件啊啊  单独使用这个插件就有4楼这些效果了
[
回复

使用道具 举报

梦石
0
星屑
55
在线时间
388 小时
注册时间
2009-8-4
回帖
212
发表于 2016-1-17 22:44:46 | 显示全部楼层
目测楼主的插件文件名不是YEP_StatusMenuCore.js,插件名必须与插件内定义的一致,请检查后再试

点评

原来是这个原因! 搞定了,多谢层主!!!  发表于 2016-1-17 23:46
回复

使用道具 举报

梦石
0
星屑
50
在线时间
44 小时
注册时间
2015-12-27
回帖
42
 楼主| 发表于 2016-1-17 23:51:02 | 显示全部楼层
QQ截图20160117234236.jpg
搞定了,太开心了

这种数据的效果是我梦寐以求的!帅!
回复

使用道具 举报

梦石
0
星屑
326
在线时间
38 小时
注册时间
2009-8-14
回帖
6
发表于 2016-4-9 21:58:17 | 显示全部楼层
自定义在那里,找不到阿??
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部