查看: 798|回复: 3

[有事请教] JAH_StatusMenuCore 不加载立绘

[复制链接]
梦石
0
星屑
1336
在线时间
158 小时
注册时间
2006-2-12
回帖
157
发表于 2023-7-18 13:26:14 | 显示全部楼层 |阅读模式

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

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

×
如图,菜单属性的一个显示插件,但是点开后总是不显示立绘,要退出一次菜单,再次进入才会加载出来立绘,请问这是怎么回事啊?(我的立绘图片并没有很大)

下面是插件代码:
  1. //=============================================================================
  2. // JahwsUF - Status Menu Core
  3. // JAH_StatusMenuCore.js
  4. // Version: 2.0.0 alpha
  5. //=============================================================================

  6. var Imported = Imported || {};                         // If YEP_CoreEngine is imported, this has a boolean variable stating so.
  7. Imported.JahwsUF_StatusMenuCore = true;  // Oh yeah, may as well say we're here, too.

  8. var JahwsUF = JahwsUF || {};

  9. //=============================================================================
  10. /*:
  11. * @plugindesc v2.0.0 alpha
  12. * Creates an advanced Status window with multiple pages for each Actor.  Supports profiles and portraits.
  13. * @author JahwsUF
  14. *
  15. * @param ---Scrolling Params---
  16. * @default
  17. *
  18. * @param Scroll Multiplier
  19. * @desc The number of lines that the profile page should scroll at a time.  Default: 1
  20. * @default 1
  21. *
  22. * @param Scrolling Headers
  23. * @desc true if the header should be subject to scrolling.
  24. * false if they should remain stationary.  Default:  true
  25. * @default true
  26. *
  27. * @param ---Portrait Params---
  28. * @default
  29. *
  30. * @param Portrait Img Adjust
  31. * @desc Adds buffer space before all Actor portraits, except on profiles.  Default: 0
  32. * @default 0
  33. *
  34. * @param Portraits On All
  35. * @desc All pages will display an Actor's portrait if available.
  36. * A more vanilla version will be used if not.  Default: true
  37. * @default true
  38. *
  39. *
  40. * @param ---TP Gauge Params---
  41. * @default
  42. *
  43. * @param Add TP Gauge
  44. * @desc Add the TP Gauge between MP and EXP on the default header.
  45. * Blank imports from Yanfly, false = hide, true = show.
  46. * @default
  47. *
  48. * @param Blank after TP
  49. * @desc If the TP gauge is visible, adds a blank line after.
  50. * Default: true
  51. * @default true
  52. *
  53. * @param ---XP + Level Params---
  54. * @default
  55. *
  56. * @param Hide Levels
  57. * @desc Hide each Actor's level, rendering it invisible on the Status pages.
  58. * @default false
  59. *
  60. * @param Hide XP Bar
  61. * @desc Hide all XP information from the Status windows.
  62. * Default:  false
  63. * @default false
  64. *
  65. * @param XP - Show Remaining
  66. * @desc true - Gauges show the remaining XP until the next level.
  67. * false - Gauges show XP since last level + total XP needed for next.
  68. *
  69. * (Values are not cumulative - 0 marks the beginning of the current level for both values.)
  70. * Default: true   
  71. * @default true
  72. *
  73. * @param Color: XP Gauge 1
  74. * @desc Color gradient component for the XP gauge.
  75. * Default: 30   
  76. * @default 30
  77. *
  78. * @param Color: XP Gauge 2
  79. * @desc The other color gradient component for the XP gauge.
  80. * Default: 31   
  81. * @default 31
  82. *
  83. *
  84. * @param ---Nickname Settings---
  85. * @default
  86. *
  87. * @param Header - Name + Nick
  88. * @desc true - Display both name and nickname in page headers.
  89. * false - Only shows the nickname on the profile page.
  90. * Default: true
  91. * @default true
  92. *
  93. * @param Nickname Format
  94. * @desc The pattern used to insert nicknames in page headers.
  95. * Default: , "%1"    (%1 = position for nickname.)
  96. * @default , "%1"
  97. *
  98. *
  99. * @param ---Page 1---
  100. * @default
  101. *
  102. * @param Page 1 Name
  103. * @desc Menu name for the first page.
  104. * Default:  Parameters
  105. * @default Parameters
  106. *
  107. * @param Page 1 Window
  108. * @desc Window corresponding to the first status page.
  109. * Default:  JAH_Window_Status_Params
  110. * @default JAH_Window_Status_Params
  111. *
  112. * @param ---Page 2---
  113. * @default
  114. *
  115. * @param Page 2 Name
  116. * @desc Menu name for the second page.
  117. * Default: Elemental Rates
  118. * @default Elemental Rates
  119. *
  120. * @param Page 2 Window
  121. * @desc Window corresponding to the first status page.
  122. * Default: JAH_Window_Elemental_Resistances
  123. * @default JAH_Window_Elemental_Resistances
  124. *
  125. * @param ---Page 3---
  126. * Default:
  127. * @default
  128. *
  129. * @param Page 3 Name
  130. * @desc Menu name for the third page.
  131. * Default: State Rates  
  132. * @default State Rates
  133. *
  134. * @param Page 3 Window
  135. * @desc Window corresponding to the third status page.
  136. * Default: JAH_Window_State_Resistances
  137. * @default JAH_Window_State_Resistances
  138. *
  139. * @param ---Page 4---
  140. * @default
  141. *
  142. * @param Page 4 Name
  143. * @desc Menu name for the fourth page.
  144. * Default: Profile
  145. * @default Profile
  146. *
  147. * @param Page 4 Window
  148. * @desc Window corresponding to the fourth status page.
  149. * Default: JAH_Window_Status_Profile
  150. * @default JAH_Window_Status_Profile
  151. *
  152. * @param ---Page 5---
  153. * @default
  154. *
  155. * @param Page 5 Name
  156. * @desc Menu name for the fifth page.
  157. * Default:   
  158. * @default  
  159. *
  160. * @param Page 5 Window
  161. * @desc Window corresponding to the fifth status page.
  162. * Default:   
  163. * @default  
  164. *
  165. * @param ---Page 6---
  166. * @default
  167. *
  168. * @param Page 6 Name
  169. * @desc Menu name for the sixth page.
  170. * Default:   
  171. * @default  
  172. *
  173. * @param Page 6 Window
  174. * @desc Window corresponding to the sixth status page.
  175. * Default:   
  176. * @default  
  177. *
  178. * @param ---Page Header 1---
  179. * @desc Any "grouping" with a blank row placement will not be used.
  180. * @default
  181. *
  182. * @param Grouping Title 1
  183. * @desc A raw text entry to print on the param page.
  184. * Can be left blank to create empty space.
  185. * @default Basic Parameters
  186. *
  187. * @param Row Placement 1
  188. * @desc The row where this text entry should be inserted.
  189. * Parameter placement will be adjusted accordingly.
  190. * @default 1
  191. *
  192. * @param Group Columns 1
  193. * @desc The column(s) in which the text should be inserted.
  194. * Columns must be adjacent.
  195. * @default 1
  196. *
  197. * @param ---Page Header 2---
  198. * @desc Any "grouping" with a blank row placement will not be used.
  199. * @default
  200. *
  201. * @param Grouping Title 2
  202. * @desc A raw text entry to print on the param page.
  203. * Can be left blank to create empty space.
  204. * @default
  205. *
  206. * @param Row Placement 2
  207. * @desc The row where this text entry should be inserted.
  208. * Parameter placement will be adjusted accordingly.
  209. * @default 2
  210. *
  211. * @param Group Columns 2
  212. * @desc The column(s) in which the text should be inserted.
  213. * Columns must be adjacent.
  214. * @default 1
  215. *
  216. * @param ---Page Header 3---
  217. * @desc Any "grouping" with a blank row placement will not be used.
  218. * @default
  219. *
  220. * @param Grouping Title 3
  221. * @desc A raw text entry to print on the param page.
  222. * Can be left blank to create empty space.
  223. * @default
  224. *
  225. * @param Row Placement 3
  226. * @desc The row where this text entry should be inserted.
  227. * Parameter placement will be adjusted accordingly.
  228. * @default
  229. *
  230. * @param Group Columns 3
  231. * @desc The column(s) in which the text should be inserted.
  232. * Columns must be adjacent.
  233. * @default  
  234. *
  235. * @param ---Page Header 4---
  236. * @desc Any "grouping" with a blank row placement will not be used.
  237. * @default
  238. *
  239. * @param Grouping Title 4
  240. * @desc A raw text entry to print on the param page.
  241. * Can be left blank to create empty space.
  242. * @default
  243. *
  244. * @param Row Placement 4
  245. * @desc The row where this text entry should be inserted.
  246. * Parameter placement will be adjusted accordingly.
  247. * @default
  248. *
  249. * @param Group Columns 4
  250. * @desc The column(s) in which the text should be inserted.
  251. * Columns must be adjacent.
  252. * @default  
  253. *
  254. * @param ---Page Header 5---
  255. * @desc Any "grouping" with a blank row placement will not be used.
  256. * @default
  257. *
  258. * @param Grouping Title 5
  259. * @desc A raw text entry to print on the param page.
  260. * Can be left blank to create empty space.
  261. * @default
  262. *
  263. * @param Row Placement 5
  264. * @desc The row where this text entry should be inserted.
  265. * Parameter placement will be adjusted accordingly.
  266. * @default
  267. *
  268. * @param Group Columns 5
  269. * @desc The column(s) in which the text should be inserted.
  270. * Columns must be adjacent.
  271. * @default  
  272. *
  273. * @param ---Page Header 6---
  274. * @desc Any "grouping" with a blank row placement will not be used.
  275. * @default
  276. *
  277. * @param Grouping Title 6
  278. * @desc A raw text entry to print on the param page.
  279. * Can be left blank to create empty space.
  280. * @default
  281. *
  282. * @param Row Placement 6
  283. * @desc The row where this text entry should be inserted.
  284. * Parameter placement will be adjusted accordingly.
  285. * @default
  286. *
  287. * @param Group Columns 6
  288. * @desc The column(s) in which the text should be inserted.
  289. * Columns must be adjacent.
  290. * @default  
  291. *
  292. * @param ---Page Header 7---
  293. * @desc Any "grouping" with a blank row placement will not be used.
  294. * @default
  295. *
  296. * @param Grouping Title 7
  297. * @desc A raw text entry to print on the param page.
  298. * Can be left blank to create empty space.
  299. * @default
  300. *
  301. * @param Row Placement 7
  302. * @desc The row where this text entry should be inserted.
  303. * Parameter placement will be adjusted accordingly.
  304. * @default
  305. *
  306. * @param Group Columns 7
  307. * @desc The column(s) in which the text should be inserted.
  308. * Columns must be adjacent.
  309. * @default  
  310. *
  311. * @param ---Page Header 8---
  312. * @desc Any "grouping" with a blank row placement will not be used.
  313. * @default
  314. *
  315. * @param Grouping Title 8
  316. * @desc A raw text entry to print on the param page.
  317. * Can be left blank to create empty space.
  318. * @default
  319. *
  320. * @param Row Placement 8
  321. * @desc The row where this text entry should be inserted.
  322. * Parameter placement will be adjusted accordingly.
  323. * @default
  324. *
  325. * @param Group Columns 8
  326. * @desc The column(s) in which the text should be inserted.
  327. * Columns must be adjacent.
  328. * @default  
  329. *
  330. * @param ---Page Header 9---
  331. * @desc Any "grouping" with a blank row placement will not be used.
  332. * @default
  333. *
  334. * @param Grouping Title 9
  335. * @desc A raw text entry to print on the param page.
  336. * Can be left blank to create empty space.
  337. * @default
  338. *
  339. * @param Row Placement 9
  340. * @desc The row where this text entry should be inserted.
  341. * Parameter placement will be adjusted accordingly.
  342. * @default
  343. *
  344. * @param Group Columns 9
  345. * @desc The column(s) in which the text should be inserted.
  346. * Columns must be adjacent.
  347. * @default  
  348. *
  349. * @param ---Page Header 10---
  350. * @desc Any "grouping" with a blank row placement will not be used.
  351. * @default
  352. *
  353. * @param Grouping Title 10
  354. * @desc A raw text entry to print on the param page.
  355. * Can be left blank to create empty space.
  356. * @default
  357. *
  358. * @param Row Placement 10
  359. * @desc The row where this text entry should be inserted.
  360. * Parameter placement will be adjusted accordingly.
  361. * @default
  362. *
  363. * @param Group Columns 10
  364. * @desc The column(s) in which the text should be inserted.
  365. * Columns must be adjacent.
  366. * @default  
  367. *
  368. *
  369. * @param ---Extended Params---
  370. * @default
  371. *
  372. * @param Parameter 1 Symbol
  373. * @desc The system abbreviation for parameter #1.
  374. * Default: atk
  375. * @default atk
  376. *
  377. * @param Parameter 1 Name
  378. * @desc The text name of parameter #1.
  379. * Default:          - leave blank to use the database's entry.
  380. * @default
  381. *
  382. * @param Parameter 1 as %
  383. * @desc true - parameter should be displayed as a percent.
  384. * false - otherwise.
  385. * Default: false
  386. * @default false
  387. *
  388. * @param Parameter 2 Symbol
  389. * @desc The system abbreviation for parameter #2.
  390. * Default: def
  391. * @default def
  392. *
  393. * @param Parameter 2 Name
  394. * @desc The text name of parameter #2.
  395. * Default:          - leave blank to use the database's entry.
  396. * @default
  397. *
  398. * @param Parameter 2 as %
  399. * @desc true - parameter should be displayed as a percent.
  400. * false - otherwise.
  401. * Default: false
  402. * @default false
  403. *
  404. * @param Parameter 3 Symbol
  405. * @desc The system abbreviation for parameter #3.
  406. * Default: mat
  407. * @default mat
  408. *
  409. * @param Parameter 3 Name
  410. * @desc The text name of parameter #3.
  411. * Default:          - leave blank to use the database's entry.
  412. * @default
  413. *
  414. * @param Parameter 3 as %
  415. * @desc true - parameter should be displayed as a percent.
  416. * false - otherwise.
  417. * Default: false
  418. * @default false
  419. *
  420. * @param Parameter 4 Symbol
  421. * @desc The system abbreviation for parameter #4.
  422. * Default: mdf
  423. * @default mdf
  424. *
  425. * @param Parameter 4 Name
  426. * @desc The text name of parameter #4.
  427. * Default:          - leave blank to use the database's entry.
  428. * @default  
  429. *
  430. * @param Parameter 4 as %
  431. * @desc true - parameter should be displayed as a percent.
  432. * false - otherwise.
  433. * Default: false
  434. * @default false
  435. *
  436. * @param Parameter 5 Symbol
  437. * @desc The system abbreviation for parameter #5.
  438. * Default: agi
  439. * @default agi
  440. *
  441. * @param Parameter 5 Name
  442. * @desc The text name of parameter #5.
  443. * Default:          - leave blank to use the database's entry.
  444. * @default  
  445. *
  446. * @param Parameter 5 as %
  447. * @desc true - parameter should be displayed as a percent.
  448. * false - otherwise.
  449. * Default: false
  450. * @default false
  451. *
  452. * @param Parameter 6 Symbol
  453. * @desc The system abbreviation for parameter #6.
  454. * Default: luk
  455. * @default luk
  456. *
  457. * @param Parameter 6 Name
  458. * @desc The text name of parameter #6.
  459. * Default:          - leave blank to use the database's entry.
  460. * @default
  461. *
  462. * @param Parameter 6 as %
  463. * @desc true - parameter should be displayed as a percent.
  464. * false - otherwise.
  465. * Default: false
  466. * @default false
  467. *
  468. * @param Parameter 7 Symbol
  469. * @desc The system abbreviation for parameter #7.
  470. * Space = blank.
  471. * @default
  472. *
  473. * @param Parameter 7 Name
  474. * @desc The text name of parameter #7.
  475. * Default:          - leave blank to use the database's entry.
  476. *
  477. * @default   
  478. *
  479. * @param Parameter 7 as %
  480. * @desc true - parameter should be displayed as a percent.
  481. * false - otherwise.
  482. * Default:
  483. * @default
  484. *
  485. * @param Parameter 8 Symbol
  486. * @desc The system abbreviation for parameter #8.
  487. * Default: hit
  488. * @default hit
  489. *
  490. * @param Parameter 8 Name
  491. * @desc The text name of parameter #8.
  492. * Default:          - leave blank to use the database's entry.
  493. * @default
  494. *
  495. * @param Parameter 8 as %
  496. * @desc true - parameter should be displayed as a percent.
  497. * false - otherwise.
  498. * Default:
  499. * @default
  500. *
  501. * @param Parameter 9 Symbol
  502. * @desc The system abbreviation for parameter #9.
  503. * Default: eva
  504. * @default eva
  505. *
  506. * @param Parameter 9 Name
  507. * @desc The text name of parameter #9.
  508. * Default:         
  509. * @default
  510. *
  511. * @param Parameter 9 as %
  512. * @desc true - parameter should be displayed as a percent.
  513. * false - otherwise.
  514. * Default:
  515. * @default
  516. *
  517. * @param Parameter 10 Symbol
  518. * @desc The system abbreviation for parameter #10.
  519. * Space = blank.
  520. * @default
  521. *
  522. * @param Parameter 10 Name
  523. * @desc The text name of parameter #10.
  524. * Default:         
  525. * @default
  526. *
  527. * @param Parameter 10 as %
  528. * @desc true - parameter should be displayed as a percent.
  529. * false - otherwise.
  530. * Default:
  531. * @default
  532. *
  533. * @param Parameter 11 Symbol
  534. * @desc The system abbreviation for parameter #11.
  535. * Space = blank.
  536. * @default
  537. *
  538. * @param Parameter 11 Name
  539. * @desc The text name of parameter #11.
  540. * Default:         
  541. * @default
  542. *
  543. * @param Parameter 11 as %
  544. * @desc true - parameter should be displayed as a percent.
  545. * false - otherwise.
  546. * Default:
  547. * @default
  548. *
  549. * @param Parameter 12 Symbol
  550. * @desc The system abbreviation for parameter #12.
  551. * Space = blank.
  552. * @default
  553. *
  554. * @param Parameter 12 Name
  555. * @desc The text name of parameter #12.
  556. * Default:         
  557. * @default
  558. *
  559. * @param Parameter 12 as %
  560. * @desc true - parameter should be displayed as a percent.
  561. * false - otherwise.
  562. * Default:
  563. * @default
  564. *
  565. * @param Parameter 13 Symbol
  566. * @desc The system abbreviation for parameter #13.
  567. * Space = blank.
  568. * @default
  569. *
  570. * @param Parameter 13 Name
  571. * @desc The text name of parameter #13.
  572. * Default:         
  573. * @default
  574. *
  575. * @param Parameter 13 as %
  576. * @desc true - parameter should be displayed as a percent.
  577. * false - otherwise.
  578. * Default:
  579. * @default
  580. *
  581. * @param Parameter 14 Symbol
  582. * @desc The system abbreviation for parameter #14.
  583. * Space = blank.
  584. * @default
  585. *
  586. * @param Parameter 14 Name
  587. * @desc The text name of parameter #14.
  588. * Default:         
  589. * @default
  590. *
  591. * @param Parameter 14 as %
  592. * @desc true - parameter should be displayed as a percent.
  593. * false - otherwise.
  594. * Default:
  595. * @default
  596. *
  597. * @param Parameter 15 Symbol
  598. * @desc The system abbreviation for parameter #15.
  599. * Space = blank.
  600. * @default
  601. *
  602. * @param Parameter 15 Name
  603. * @desc The text name of parameter #15.
  604. * Default:         
  605. * @default
  606. *
  607. * @param Parameter 15 as %
  608. * @desc true - parameter should be displayed as a percent.
  609. * false - otherwise.
  610. * Default:
  611. * @default
  612. *
  613. * @param Parameter 16 Symbol
  614. * @desc The system abbreviation for parameter #16.
  615. * Space = blank.
  616. * @default
  617. *
  618. * @param Parameter 16 Name
  619. * @desc The text name of parameter #16.
  620. * Default:         
  621. * @default
  622. *
  623. * @param Parameter 16 as %
  624. * @desc true - parameter should be displayed as a percent.
  625. * false - otherwise.
  626. * Default:
  627. * @default
  628. *
  629. * @param Parameter 17 Symbol
  630. * @desc The system abbreviation for parameter #17.
  631. * Space = blank.
  632. * @default
  633. *
  634. * @param Parameter 17 Name
  635. * @desc The text name of parameter #17.
  636. * Default:         
  637. * @default
  638. *
  639. * @param Parameter 17 as %
  640. * @desc true - parameter should be displayed as a percent.
  641. * false - otherwise.
  642. * Default:
  643. * @default
  644. *
  645. * @param Parameter 18 Symbol
  646. * @desc The system abbreviation for parameter #18.
  647. * Space = blank.
  648. * @default
  649. *
  650. * @param Parameter 18 Name
  651. * @desc The text name of parameter #18.
  652. * Default:         
  653. * @default
  654. *
  655. * @param Parameter 18 as %
  656. * @desc true - parameter should be displayed as a percent.
  657. * false - otherwise.
  658. * Default:
  659. * @default
  660. *
  661. * @param Parameter 19 Symbol
  662. * @desc The system abbreviation for parameter #19.
  663. * Default:
  664. * @default
  665. *
  666. * @param Parameter 19 Name
  667. * @desc The text name of parameter #19.
  668. * Default:         
  669. * @default
  670. *
  671. * @param Parameter 19 as %
  672. * @desc true - parameter should be displayed as a percent.
  673. * false - otherwise.
  674. * Default:
  675. * @default
  676. *
  677. * @param Parameter 20 Symbol
  678. * @desc The system abbreviation for parameter #20.
  679. * Space = blank.
  680. * @default
  681. *
  682. * @param Parameter 20 Name
  683. * @desc The text name of parameter #20.
  684. * Default:         
  685. * @default
  686. *
  687. * @param Parameter 20 as %
  688. * @desc true - parameter should be displayed as a percent.
  689. * false - otherwise.
  690. * Default:
  691. * @default
  692. *
  693. * @param Parameter 21 Symbol
  694. * @desc The system abbreviation for parameter #21.
  695. * Space = blank.
  696. * @default
  697. *
  698. * @param Parameter 21 Name
  699. * @desc The text name of parameter #21.
  700. * Default:         
  701. * @default
  702. *
  703. * @param Parameter 21 as %
  704. * @desc true - parameter should be displayed as a percent.
  705. * false - otherwise.
  706. * Default:
  707. * @default
  708. *
  709. * @param Parameter 22 Symbol
  710. * @desc The system abbreviation for parameter #22.
  711. * Space = blank.
  712. * @default
  713. *
  714. * @param Parameter 22 Name
  715. * @desc The text name of parameter #22.
  716. * Default:         
  717. * @default
  718. *
  719. * @param Parameter 22 as %
  720. * @desc true - parameter should be displayed as a percent.
  721. * false - otherwise.
  722. * Default:
  723. * @default
  724. *
  725. * @param Parameter 23 Symbol
  726. * @desc The system abbreviation for parameter #23.
  727. * Space = blank.
  728. * @default
  729. *
  730. * @param Parameter 23 Name
  731. * @desc The text name of parameter #23.
  732. * Default:         
  733. * @default
  734. *
  735. * @param Parameter 23 as %
  736. * @desc true - parameter should be displayed as a percent.
  737. * false - otherwise.
  738. * Default:
  739. * @default
  740. *
  741. * @param Parameter 24 Symbol
  742. * @desc The system abbreviation for parameter #24.
  743. * Space = blank.
  744. * @default
  745. *
  746. * @param Parameter 24 Name
  747. * @desc The text name of parameter #24.
  748. * Default:         
  749. * @default
  750. *
  751. * @param Parameter 24 as %
  752. * @desc true - parameter should be displayed as a percent.
  753. * false - otherwise.
  754. * Default:
  755. * @default
  756. *
  757. * @param Parameter 25 Symbol
  758. * @desc The system abbreviation for parameter #25.
  759. * Space = blank.
  760. * @default
  761. *
  762. * @param Parameter 25 Name
  763. * @desc The text name of parameter #25.
  764. * Default:         
  765. * @default
  766. *
  767. * @param Parameter 25 as %
  768. * @desc true - parameter should be displayed as a percent.
  769. * false - otherwise.
  770. * Default:
  771. * @default
  772. *
  773. * @param Parameter 26 Symbol
  774. * @desc The system abbreviation for parameter #26.
  775. * Space = blank.
  776. * @default
  777. *
  778. * @param Parameter 26 Name
  779. * @desc The text name of parameter #26.
  780. * Default:         
  781. * @default
  782. *
  783. * @param Parameter 26 as %
  784. * @desc true - parameter should be displayed as a percent.
  785. * false - otherwise.
  786. * Default:
  787. * @default
  788. *
  789. * @param Parameter 27 Symbol
  790. * @desc The system abbreviation for parameter #27.
  791. * Space = blank.
  792. * @default
  793. *
  794. * @param Parameter 27 Name
  795. * @desc The text name of parameter #27.
  796. * Default:         
  797. * @default
  798. *
  799. * @param Parameter 27 as %
  800. * @desc true - parameter should be displayed as a percent.
  801. * false - otherwise.
  802. * Default:
  803. * @default
  804. *
  805. * @param Parameter 28 Symbol
  806. * @desc The system abbreviation for parameter #28.
  807. * Space = blank.
  808. * @default
  809. *
  810. * @param Parameter 28 Name
  811. * @desc The text name of parameter #28.
  812. * Default:         
  813. * @default
  814. *
  815. * @param Parameter 28 as %
  816. * @desc true - parameter should be displayed as a percent.
  817. * false - otherwise.
  818. * Default:
  819. * @default
  820. *
  821. * @param Parameter 29 Symbol
  822. * @desc The system abbreviation for parameter #29.
  823. * Space = blank.
  824. * @default
  825. *
  826. * @param Parameter 29 Name
  827. * @desc The text name of parameter #29.
  828. * Default:         
  829. * @default
  830. *
  831. * @param Parameter 29 as %
  832. * @desc true - parameter should be displayed as a percent.
  833. * false - otherwise.
  834. * Default:
  835. * @default
  836. *
  837. * @param Parameter 30 Symbol
  838. * @desc The system abbreviation for parameter #30.
  839. * Space = blank.
  840. * @default
  841. *
  842. * @param Parameter 30 Name
  843. * @desc The text name of parameter #30.
  844. * Default:         
  845. * @default
  846. *
  847. * @param Parameter 30 as %
  848. * @desc true - parameter should be displayed as a percent.
  849. * false - otherwise.
  850. * Default:
  851. * @default
  852. *
  853. * @param Parameter 31 Symbol
  854. * @desc The system abbreviation for parameter #31.
  855. * Space = blank.
  856. * @default
  857. *
  858. * @param Parameter 31 Name
  859. * @desc The text name of parameter #31.
  860. * Default:         
  861. * @default
  862. *
  863. * @param Parameter 31 as %
  864. * @desc true - parameter should be displayed as a percent.
  865. * false - otherwise.
  866. * Default:
  867. * @default
  868. *
  869. * @param Parameter 32 Symbol
  870. * @desc The system abbreviation for parameter #32.
  871. * Space = blank.
  872. * @default
  873. *
  874. * @param Parameter 32 Name
  875. * @desc The text name of parameter #32.
  876. * Default:         
  877. * @default
  878. *
  879. * @param Parameter 32 as %
  880. * @desc true - parameter should be displayed as a percent.
  881. * false - otherwise.
  882. * Default:
  883. * @default
  884. *
  885. * @param Parameter 33 Symbol
  886. * @desc The system abbreviation for parameter #33.
  887. * Space = blank.
  888. * @default
  889. *
  890. * @param Parameter 33 Name
  891. * @desc The text name of parameter #33.
  892. * Default:         
  893. * @default
  894. *
  895. * @param Parameter 33 as %
  896. * @desc true - parameter should be displayed as a percent.
  897. * false - otherwise.
  898. * Default:
  899. * @default
  900. *
  901. * @param Parameter 34 Symbol
  902. * @desc The system abbreviation for parameter #34.
  903. * Space = blank.
  904. * @default
  905. *
  906. * @param Parameter 34 Name
  907. * @desc The text name of parameter #34.
  908. * Default:         
  909. * @default
  910. *
  911. * @param Parameter 34 as %
  912. * @desc true - parameter should be displayed as a percent.
  913. * false - otherwise.
  914. * Default:
  915. * @default
  916. *
  917. * @param Parameter 35 Symbol
  918. * @desc The system abbreviation for parameter #35.
  919. * Space = blank.
  920. * @default
  921. *
  922. * @param Parameter 35 Name
  923. * @desc The text name of parameter #35.
  924. * Default:         
  925. * @default
  926. *
  927. * @param Parameter 35 as %
  928. * @desc true - parameter should be displayed as a percent.
  929. * false - otherwise.
  930. * Default:
  931. * @default
  932. *
  933. * @param Parameter 36 Symbol
  934. * @desc The system abbreviation for parameter #36.
  935. * Space = blank.
  936. * @default
  937. *
  938. * @param Parameter 36 Name
  939. * @desc The text name of parameter #36.
  940. * Default:         
  941. * @default
  942. *
  943. * @param Parameter 36 as %
  944. * @desc true - parameter should be displayed as a percent.
  945. * false - otherwise.
  946. * Default:
  947. * @default
  948. *
  949. * @param Parameter 37 Symbol
  950. * @desc The system abbreviation for parameter #37.
  951. * Space = blank.
  952. * @default
  953. *
  954. * @param Parameter 37 Name
  955. * @desc The text name of parameter #37.
  956. * Default:         
  957. * @default
  958. *
  959. * @param Parameter 37 as %
  960. * @desc true - parameter should be displayed as a percent.
  961. * false - otherwise.
  962. * Default:
  963. * @default
  964. *
  965. * @param Parameter 38 Symbol
  966. * @desc The system abbreviation for parameter #38.
  967. * Space = blank.
  968. * @default
  969. *
  970. * @param Parameter 38 Name
  971. * @desc The text name of parameter #38.
  972. * Default:         
  973. * @default
  974. *
  975. * @param Parameter 38 as %
  976. * @desc true - parameter should be displayed as a percent.
  977. * false - otherwise.
  978. * Default:
  979. * @default
  980. *
  981. * @param Parameter 39 Symbol
  982. * @desc The system abbreviation for parameter #39.
  983. * Space = blank.
  984. * @default
  985. *
  986. * @param Parameter 39 Name
  987. * @desc The text name of parameter #39.
  988. * Default:         
  989. * @default
  990. *
  991. * @param Parameter 39 as %
  992. * @desc true - parameter should be displayed as a percent.
  993. * false - otherwise.
  994. * Default:
  995. * @default
  996. *
  997. * @param Parameter 40 Symbol
  998. * @desc The system abbreviation for parameter #40.
  999. * Space = blank.
  1000. * @default
  1001. *
  1002. * @param Parameter 40 Name
  1003. * @desc The text name of parameter #40.
  1004. * Default:         
  1005. * @default
  1006. *
  1007. * @param Parameter 40 as %
  1008. * @desc true - parameter should be displayed as a percent.
  1009. * false - otherwise.
  1010. * Default:
  1011. * @default
  1012. *
  1013. * @param Parameter 41 Symbol
  1014. * @desc The system abbreviation for parameter #41.
  1015. * Space = blank.
  1016. * @default
  1017. *
  1018. * @param Parameter 41 Name
  1019. * @desc The text name of parameter #41.
  1020. * Default:         
  1021. * @default
  1022. *
  1023. * @param Parameter 41 as %
  1024. * @desc true - parameter should be displayed as a percent.
  1025. * false - otherwise.
  1026. * Default:
  1027. * @default
  1028. *
  1029. * @param Parameter 42 Symbol
  1030. * @desc The system abbreviation for parameter #42.
  1031. * Space = blank.
  1032. * @default
  1033. *
  1034. * @param Parameter 42 Name
  1035. * @desc The text name of parameter #42.
  1036. * Default:         
  1037. * @default
  1038. *
  1039. * @param Parameter 42 as %
  1040. * @desc true - parameter should be displayed as a percent.
  1041. * false - otherwise.
  1042. * Default:
  1043. * @default
  1044. *
  1045. * @param Parameter 43 Symbol
  1046. * @desc The system abbreviation for parameter #43.
  1047. * Space = blank.
  1048. * @default
  1049. *
  1050. * @param Parameter 43 Name
  1051. * @desc The text name of parameter #43.
  1052. * Default:         
  1053. * @default
  1054. *
  1055. * @param Parameter 43 as %
  1056. * @desc true - parameter should be displayed as a percent.
  1057. * false - otherwise.
  1058. * Default:
  1059. * @default
  1060. *
  1061. * @param Parameter 44 Symbol
  1062. * @desc The system abbreviation for parameter #44.
  1063. * Space = blank.
  1064. * @default
  1065. *
  1066. * @param Parameter 44 Name
  1067. * @desc The text name of parameter #44.
  1068. * Default:         
  1069. * @default
  1070. *
  1071. * @param Parameter 44 as %
  1072. * @desc true - parameter should be displayed as a percent.
  1073. * false - otherwise.
  1074. * Default:
  1075. * @default
  1076. *
  1077. * @param Parameter 45 Symbol
  1078. * @desc The system abbreviation for parameter #45.
  1079. * Space = blank.
  1080. * @default
  1081. *
  1082. * @param Parameter 45 Name
  1083. * @desc The text name of parameter #45.
  1084. * Default:         
  1085. * @default
  1086. *
  1087. * @param Parameter 45 as %
  1088. * @desc true - parameter should be displayed as a percent.
  1089. * false - otherwise.
  1090. * Default:
  1091. * @default
  1092. *
  1093. * @param Parameter 46 Symbol
  1094. * @desc The system abbreviation for parameter #46.
  1095. * Space = blank.
  1096. * @default
  1097. *
  1098. * @param Parameter 46 Name
  1099. * @desc The text name of parameter #46.
  1100. * Default:         
  1101. * @default
  1102. *
  1103. * @param Parameter 46 as %
  1104. * @desc true - parameter should be displayed as a percent.
  1105. * false - otherwise.
  1106. * Default:
  1107. * @default
  1108. *
  1109. * @param Parameter 47 Symbol
  1110. * @desc The system abbreviation for parameter #47.
  1111. * Space = blank.
  1112. * @default
  1113. *
  1114. * @param Parameter 47 Name
  1115. * @desc The text name of parameter #47.
  1116. * Default:         
  1117. * @default
  1118. *
  1119. * @param Parameter 47 as %
  1120. * @desc true - parameter should be displayed as a percent.
  1121. * false - otherwise.
  1122. * Default:
  1123. * @default
  1124. *
  1125. * @param Parameter 48 Symbol
  1126. * @desc The system abbreviation for parameter #48.
  1127. * Space = blank.
  1128. * @default
  1129. *
  1130. * @param Parameter 48 Name
  1131. * @desc The text name of parameter #48.
  1132. * Default:         
  1133. * @default
  1134. *
  1135. * @param Parameter 48 as %
  1136. * @desc true - parameter should be displayed as a percent.
  1137. * false - otherwise.
  1138. * Default:
  1139. * @default
  1140. *
  1141. * @param ---Param Formatting---
  1142. * @default
  1143. *
  1144. * @param Params in Col 1
  1145. * @desc The number of parameters to list in the first column.
  1146. * Default: 9
  1147. * @default 9
  1148. *
  1149. * @param Column 1 Text Width
  1150. * @desc Width (pixels) alloted to column 1's parameter names.
  1151. * Default: 160
  1152. * @default 160
  1153. *
  1154. * @param Column 1 Value Width
  1155. * @desc Width (pixels) alloted to column 1's parameter values.
  1156. * Default: 60
  1157. * @default 60
  1158. *
  1159. * @param Params in Col 2
  1160. * @desc The number of parameters to list in the second column.
  1161. * If zero or blank, all parameters will be listed in a single column.
  1162. * Default: 0
  1163. * @default 0
  1164. *
  1165. * @param Column 2 Text Width
  1166. * @desc Width (pixels) alloted to column 2's parameter names.
  1167. * Default: 160
  1168. * @default 160
  1169. *
  1170. * @param Column 2 Value Width
  1171. * @desc Width (pixels) alloted to column 2's parameter values.
  1172. * Default: 60
  1173. * @default 60
  1174. *
  1175. * @param Params in Col 3
  1176. * @desc The number of parameters to list in the third column.
  1177. * Zero hides the column.
  1178. * Default: 0
  1179. * @default 0
  1180. *
  1181. * @param Column 3 Text Width
  1182. * @desc Width (pixels) alloted to column 3's parameter names.
  1183. * Default: 160
  1184. * @default 160
  1185. *
  1186. * @param Column 3 Value Width
  1187. * @desc Width (pixels) alloted to column 3's parameter values.
  1188. * Default: 60
  1189. * @default 60
  1190. *
  1191. * @param Display Equips?
  1192. * @desc true - Attempt to show equips on the parameter page.
  1193. * false - hide the equips.
  1194. * Default: true
  1195. * @default true
  1196. *
  1197. * @param Equip Column Width
  1198. * @desc Width (pixels) for equipment listings on pages if shown.
  1199. * Default: 320
  1200. * @default 320
  1201. *
  1202. * @param pdr/mdr as Resists
  1203. * @desc Treat the mdr and mdr parameters as elemental resistances when they appear on the Parameter page.
  1204. * @default false
  1205. *
  1206. * @param Rebalance Emptiness
  1207. * @desc If not all parameters on a line are blank, recenter the arrangement of those present.
  1208. * @default true
  1209. *
  1210. * @param ---Category Options---
  1211. * @desc The common set of text classifications for elemental or state resistance rates.
  1212. *
  1213. * @param Use Color
  1214. * @desc true - color all resistance values (text or %age)
  1215. * false - disables all color options below.
  1216. * @default true
  1217. *
  1218. * @param Threshold 1
  1219. * @desc The minimum %-value required for the highest category. (#1)
  1220. * Default: 201
  1221. * @default 201
  1222. *
  1223. * @param Category 1 Text
  1224. * @desc The label for this resistance category.
  1225. * Default: Very Weak
  1226. * @default Very Weak
  1227. *
  1228. * @param Category 1 Color
  1229. * @desc The color for values from this category.
  1230. * Leave blank to use the default color.
  1231. * @default 10
  1232. *
  1233. * @param Threshold 2
  1234. * @desc The minimum %-value required for this category.
  1235. * Default: 101
  1236. * @default 101
  1237. *
  1238. * @param Category 2 Text
  1239. * @desc The label for this resistance category.
  1240. * Default: Weak
  1241. * @default Weak
  1242. *
  1243. * @param Category 2 Color
  1244. * @desc The color for values from this category.
  1245. * Leave blank to use the default color.
  1246. * @default 2
  1247. *
  1248. * @param Threshold 3
  1249. * @desc The minimum %-value required for this category.
  1250. * Default: 100
  1251. * @default 100
  1252. *
  1253. * @param Category 3 Text
  1254. * @desc The label for this resistance category.
  1255. * Default: Normal
  1256. * @default Normal
  1257. *
  1258. * @param Category 3 Color
  1259. * @desc The color for values from this category.
  1260. * Leave blank to use the default color.
  1261. * @default
  1262. *
  1263. * @param Threshold 4
  1264. * @desc The minimum %-value required for this category.
  1265. * Default: 50
  1266. * @default 50
  1267. *
  1268. * @param Category 4 Text
  1269. * @desc The label for this resistance category.
  1270. * Default: Resist
  1271. * @default Resist
  1272. *
  1273. * @param Category 4 Color
  1274. * @desc The color for values from this category.
  1275. * Leave blank to use the default color.
  1276. * @default 5
  1277. *
  1278. * @param Threshold 5
  1279. * @desc The minimum %-value required for this category.
  1280. * Default: 1
  1281. * @default 1
  1282. *
  1283. * @param Category 5 Text
  1284. * @desc The label for this resistance category.
  1285. * Default: Resist
  1286. * @default Resist
  1287. *
  1288. * @param Category 5 Color
  1289. * @desc The color for values from this category.
  1290. * Leave blank to use the default color.
  1291. * @default 13
  1292. *
  1293. * @param Threshold 6
  1294. * @desc The minimum %-value required for this category.
  1295. * Default: 0
  1296. * @default 0
  1297. *
  1298. * @param Category 6 Text
  1299. * @desc The label for this resistance category.
  1300. * Default: Immune
  1301. * @default Immune
  1302. *
  1303. * @param Category 6 Color
  1304. * @desc The color for values from this category.
  1305. * Leave blank to use the default color.
  1306. * @default 14
  1307. *
  1308. * @param Threshold 7
  1309. * @desc The minimum %-value required for this category.
  1310. * Default: -99
  1311. * @default -99
  1312. *
  1313. * @param Category 7 Text
  1314. * @desc The label for this resistance category.
  1315. * Default: Absorb
  1316. * @default Absorb
  1317. *
  1318. * @param Category 7 Color
  1319. * @desc The color for values from this category.
  1320. * Leave blank to use the default color.
  1321. * @default 3
  1322. *
  1323. * @param Threshold 8
  1324. * @desc The minimum %-value required for this category.
  1325. * Default: -1000
  1326. * @default -1000
  1327. *
  1328. * @param Category 8 Text
  1329. * @desc The label for this resistance category.
  1330. * Default: Absorb
  1331. * @default Absorb
  1332. *
  1333. * @param Category 8 Color
  1334. * @desc The color for values from this category.
  1335. * Leave blank to use the default color.
  1336. * @default 11
  1337. *
  1338. *
  1339. * @param ---Element Options---
  1340. * @default
  1341. *
  1342. * @param Ele. Resist Header
  1343. * @desc The text header explaining the elemental defense rates listed on
  1344. * the Resistances page.  Can be removed if this is left blank.
  1345. * Default:  Elemental Damage Received
  1346. * @default Elemental Damage Received
  1347. *
  1348. * @param Ele. Col Txt Width
  1349. * @desc The amount of space to give each state's name on the state page.
  1350. * @default 160
  1351. *
  1352. * @param Ele. Col Val Width
  1353. * @desc The amount of space to give each state's value / classification on the state page.
  1354. * @default 80
  1355. *
  1356. * @param Column 1 Elements
  1357. * @desc The number of elements to list in the first column.
  1358. * Setting this to zero will erase all columns and empty the Resistances page.
  1359. * Default: 4
  1360. * @default 4
  1361. *
  1362. * @param Column 2 Elements
  1363. * @desc The number of elements to list in the second column.
  1364. * Setting this to zero will eliminate columns 2 and 3.
  1365. * Default: 4
  1366. * @default 4
  1367. *
  1368. * @param Column 3 Elements
  1369. * @desc The number of elements to list in the third column.
  1370. * Setting this to zero will eliminate the column.
  1371. * Default: 0
  1372. * @default 0
  1373. *
  1374. * @param Hidden Elements
  1375. * @desc A list of the element IDs to keep hidden.
  1376. * Example: 1, 2 will hide Physical and Fire if unchanged.
  1377. * @default 1
  1378. *
  1379. * @param Display Ele. Percent
  1380. * @desc true - show exact resistance percent
  1381. * false - categorize resistance strength (like "weak")
  1382. * @default false
  1383. *
  1384. * @param Center Ele. Values
  1385. * @desc true - element rates / categories will be centered.
  1386. * false - right-aligned instead.
  1387. * @default true
  1388. *
  1389. * @param ---State Options---
  1390. * @default
  1391. *
  1392. * @param State Resist Header
  1393. * @desc The text header explaining the state defense rates listed on
  1394. * the State Resistances page.  Can be removed if this is left blank.
  1395. * Default: State Resistance
  1396. * @default State Resistance
  1397. *
  1398. * @param State Col Txt Width
  1399. * @desc The amount of space to give each state's name on the state page.
  1400. * @default 160
  1401. *
  1402. * @param State Col Val Width
  1403. * @desc The amount of space to give each state's value / classification on the state page.
  1404. * @default 80
  1405. *
  1406. * @param Column 1 States
  1407. * @desc The number of states to list in the first column.
  1408. * Setting this to zero will erase all columns and empty the page.
  1409. * Default: 4
  1410. * @default 4
  1411. *
  1412. * @param Column 2 States
  1413. * @desc The number of elements to list in the second column.
  1414. * Setting this to zero will eliminate columns 2 and 3.
  1415. * Default: 4
  1416. * @default 4
  1417. *
  1418. * @param Column 3 States
  1419. * @desc The number of elements to list in the third column.
  1420. * Setting this to zero will eliminate the column.
  1421. * Default: 0
  1422. * @default 0
  1423. *
  1424. * @param Hidden States
  1425. * @desc A list of the state IDs to keep hidden.
  1426. * Example: 1, 2, 3 will hide Knockout, Guard, and Immortal.
  1427. * @default 1, 2, 3
  1428. *
  1429. * @param Display State Percent
  1430. * @desc true - show exact resistance percent
  1431. * false - categorize resistance strength (like "weak")
  1432. * @default true
  1433. *
  1434. * @param Center State Values
  1435. * @desc true - state rates / categories will be centered.
  1436. * false - right-aligned instead.
  1437. * @default true
  1438. *
  1439. *
  1440. * @help
  1441. * ============================================================================
  1442. * Introduction
  1443. * ============================================================================
  1444. *
  1445. * For those who might desire to customize their Status further than the
  1446. * default behavior provided by this plugin, note that this plugin takes
  1447. * parameters allowing you to specify the menu name and window corresponding to
  1448. * each Status page.
  1449. *
  1450. * Even without any editing, this plugin automatically provides for extended
  1451. * Status functionality for use in your own projects.
  1452. *
  1453. * ============================================================================
  1454. * How to Use This Plugin
  1455. * ============================================================================
  1456. *
  1457. *
  1458. * Extended Parameters
  1459. * ===================
  1460. * Rather than assume that you always want the parameters listed in a specific
  1461. * order, this plugin allows you to choose what order all parameters are listed
  1462. * in.  This is also helpful to allow some degree of control of how they're
  1463. * arranged on the screen.
  1464. *
  1465. * By default, RPG Maker doesn't provide any in-text names or abbreviations for
  1466. * many extended or special parameters.  As a result, you need to specify these
  1467. * values for any such additional parameters.  If left blank, this plugin will
  1468. * attempt to find the names and abbreviations from the database's TextManager,
  1469. * which will succeed for the basic parameters.
  1470. *
  1471. * Table of built-in parameters:
  1472. *
  1473. * ==========================================
  1474. * | Symbol |      Name       | %age-based? |
  1475. * ==========================================
  1476. * | atk    | Attack          | false       |
  1477. * | def    | Defense         | false       |
  1478. * | mat    | M.Attack        | false       |
  1479. * | mdf    | M.Defense       | false       |
  1480. * | agi    | Agility         | false       |
  1481. * | luk    | Luck            | false       |
  1482. * ==========================================
  1483. * | hit    | Hit Rate        | true        |
  1484. * | eva    | Evasion         | true        |
  1485. * | cri    | Critical Rate   | true        |
  1486. * | cev    | Crit Evasion    | true        |
  1487. * | mev    | Magic Evasion   | true        |
  1488. * | mrf    | M. Reflection   | true        |
  1489. * | cnt    | Counterattack   | true        |
  1490. * | hrg    | HP Regen Rate   | true        |
  1491. * | mrg    | MP Regen Rate   | true        |
  1492. * | trg    | TP Regen Rate   | true        |
  1493. * ==========================================
  1494. * | tgr    | Target Rate     | true        |
  1495. * | grd    | Guard Effect    | true        |
  1496. * | rec    | Recovery Effect | true        |
  1497. * | pha    | Pharmacology    | true        |
  1498. * | mcr    | MP Cost Rate    | true        |
  1499. * | tcr    | TP Cost Rate    | true        |
  1500. * | pdr    | Phys Damage %   | true        |
  1501. * | mdr    | Magic Damage %  | true        |
  1502. * | fdr    | Floor Damage %  | true        |
  1503. * | exr    | Exp Gain Rate   | true        |
  1504. * ==========================================
  1505. *
  1506. * Additionally, you can control how the Parameter page is organized through
  1507. * the "Param Formatting" options.  The parameters may be listed on their
  1508. * respective page in up to three columns, and each column may independently
  1509. * be given a different length and width for its information in order to
  1510. * fine-tune the page's visual appearance.  The default values provided
  1511. * match those used by default for the original parameters in the vanilla
  1512. * version of the Status window.
  1513. *
  1514. * If any parameter location has a blank symbol, it will be interpreted as a blank
  1515. * to be left on the parameter page and will be counted as one of the parameters in
  1516. * its column.  This allows you to create visual groupings of parameters should you so desire.
  1517. *
  1518. * Note that assigning any column 0 parameters hides that column and those
  1519. * after it.
  1520. *
  1521. * Want even more options with this?
  1522. *
  1523. * In place of a symbol, you can use elementRate(1) - with 1 being the element's ID here -
  1524. * to put elemental rate data on the parameters page.  Likewise, stateRate(1) - with 1 as
  1525. * the state's ID - will put state rate / resistance data on the parameters page in that slot.
  1526. *
  1527. * For both of these, the name will be autodetected if left blank.
  1528. * Furthermore, if you leave the "Parameter # as %" option blank, it will
  1529. * default to the global setting for elements or states set toward the bottom
  1530. * of the options.
  1531. *
  1532. * You can select whether or not the value/category (again, global option) is
  1533. * centered or right-aligned via option.  This can be set differently for elements and
  1534. * states as a group, but not individually.  (If not centered, they will be right-aligned.)
  1535. *
  1536. *
  1537. * Param Groupings
  1538. * ==================
  1539. * A new feature in 2.0.0 is the ability to use header grouping titles.
  1540. * You can now put raw text within the parameter page for extra organization.
  1541. * The row you specify is the row at which the text will be placed; all parameters
  1542. * will shift around it, adjusting their rows instead.  No header titles will be
  1543. * moved.
  1544. *
  1545. * Another new feature is the ability to have any row with blanks in one or more columns
  1546. * to be recentered, visually filling in the holes as a result.  This can give the
  1547. * effect of having extra columns.
  1548. *
  1549. * If you enable this option, but wish to preserve a particular blank or two, you
  1550. * can insert empty headers in that location to preserve the space; just remember
  1551. * that all parameters afterward will be offset.
  1552. *
  1553. *
  1554. * Resistance Options
  1555. * ==================
  1556. * This plugin also provides a page to display elemental resistances on the
  1557. * status page.  As the Elements are included in the "Terms" part of the
  1558. * game database and are nearly all relevant in many game types, this page
  1559. * is far easier to automatically generate.
  1560. *
  1561. * It is possible to hide certain elements by listing them within the
  1562. * "Hidden Elements" parameter - make sure the values therein are
  1563. * comma-separated.  Past that, you can control the arrangement of elements
  1564. * into columns, though their ordering is determined by their numerical IDs.
  1565. *
  1566. * New in v 1.02 is the ability to classify resistance levels by text and/or
  1567. * color visually within the Resistances tab.  You can set up to 8 thresholds
  1568. * that define the different tiers of resistance, and all colors can be killed
  1569. * with a single swap of the "Use Color" option.
  1570. *
  1571. * As for selecting the colors, you can go with one of the system default 32
  1572. * options provided by RPG Maker (see img/system/Window.png), OR you can
  1573. * define a color via hexadecimal value, like 0x006600 for a dark green.
  1574. * This plugin will adapt to whichever choice you take.
  1575. *
  1576. *
  1577. * Profile Options
  1578. * ===============
  1579. * By default, RPG Maker provides limited space to provide background info
  1580. * for each actor.  With the extended Status window functionality provided
  1581. * by this plugin, we gain more space, and as a result a more in-depth
  1582. * profile can be provided in-game.
  1583. *
  1584. * To provide an extended profile for any particular actor, use the following
  1585. * tags:
  1586. *
  1587. *
  1588. * <portrait: x> - x must be the corresponding filename from the img/pictures
  1589. * folder.  If an actor lacks this tag, a vanilla version of the Profile
  1590. * will appear that is organized more closely to the standard Status window
  1591. * appearance.
  1592. *
  1593. * For those who purchased the "Cover Art Characters Pack" and copied the data
  1594. * into their projects, <Portrait: Package1_1> would be a good example use.
  1595. *
  1596. * <portrait scale: x> - Specifies the desired default scaling of the profile portrait.
  1597. * x = 1 provides the default scaling behavior; x = 0.5 halves the size, while
  1598. * x = 2 doubles it.  Note that the image is confined to within the profile
  1599. * portrait window.
  1600. *
  1601. * If not provided, the scaling factor will default to 1 and use the original
  1602. * image size.
  1603. *
  1604. *
  1605. * <portrait offset: x, y> - Specifies a default offset from baseline automatic positioning
  1606. * to use for the portrait.  (Enables somewhat manual positioning.)  Positive
  1607. * x moves the image further right, while positive y moves the image further
  1608. * down - but note that the image will be clipped as a result of such adjustments.
  1609. * The profile window's border will automatically overwrite such parts of the
  1610. * image; this cannot be helped.
  1611. *
  1612. *
  1613. * <portrait anti-buffer: x> - Use to set a default adjustment for any transparency/whitespace
  1614. * that your portraits cause on non-profile pages.  Positive values allow each page
  1615. * to display over the left side of the portrait by the amount set, while negative values
  1616. * provide additional buffering between the image and text.
  1617. *
  1618. * If this is too confusing, you can always edit the portrait to add/remove
  1619. * whitespace - the system DOES look at image width, just not its contents.
  1620. * This tag exists so that you don't HAVE to edit the contents.
  1621. *
  1622. *  * To provide full custom specs on a per-portrait basis, use the following tag structure
  1623. * for any "portrait switch".  The default behavior for missing options can be selected
  1624. * globally via plugin option.
  1625. *
  1626. *
  1627. * If you want different portraits at different times for your actors:
  1628. *
  1629. * <portrait "filename" switch: s scale: z offset: x, y antibuffer: b>
  1630. *
  1631. * Note that filename and switch are absolutely required, while you can leave out the
  1632. * scale, offset, and antibuffer components at your leisure.  (They'll use the default
  1633. * values set by their individual tags as listed above.)  All data per portrait is
  1634. * to be specified inside a single complex tag.  Aside from filename, all the other
  1635. * details may be specified in whatever order you prefer; the restrictions mentioned here
  1636. * are necessary to distinguish between tag types.
  1637. *
  1638. * The portrait switching behavior follows the same rules as for profile switching, as
  1639. * mentioned later below.
  1640. *
  1641. * Please note that "filename" must be enclosed within double quotes - this is necessary
  1642. * to allow spaces in the middle of a portrait's filename without breaking the ability
  1643. * of this plugin to actually process the tag.
  1644. *
  1645. *
  1646. * <profile>
  1647. * Line 1 of extended backstory here...
  1648. * Line 2...
  1649. *
  1650. * Even more backstory...
  1651. * </profile>
  1652. *
  1653. *
  1654. * Not satisfied with the limited two lines of background text alloted to you
  1655. * by the base engine?  Feel free to write something much more in-depth via this
  1656. * set of tags!  All whitespace will be recognized and preserved, allowing you
  1657. * to easily write a paragraph or two.
  1658. *
  1659. * Do note, however, that there is no automatic line-breaking, as well as nothing
  1660. * preventing your text from overlapping with your Actors' portraits.
  1661. *
  1662. * <profile Switch: x>
  1663. * Line 1 of extended backstory here...
  1664. * Line 2...
  1665. *
  1666. * Even more backstory...
  1667. * </profile>
  1668. *
  1669. *
  1670. * Want your baseline extended backstory to change after certain game events?
  1671. * You can use the "Profile Switch" tag to create alternate text that only
  1672. * activates when the selected Switch is On.
  1673. *
  1674. * In the case of conflict (via multiple Profile Switch tags meeting their
  1675. * conditions) the earliest defined Profile Switch will be used.
  1676. *
  1677. *
  1678. * One extra thing - you may freely use <hr> on its own line within a <profile> tag
  1679. * to produce a horizontal line within the text profile!  (Any other text on that
  1680. * line will block this.)
  1681. *
  1682. *
  1683. * Page Selection
  1684. * ==============
  1685. * Each "Page _ Name" parameter allows you to specify the name of its
  1686. * corresponding page on the Status menu.
  1687. *
  1688. * Each "Page _ Window" parameter allows you to choose a Window object to act
  1689. * as a Status menu page.  Two have been provided by default, both based upon
  1690. * the JAH_Window_Status_Base class.  
  1691. *
  1692. * Extending the JAH_Window_Status_Base class will allow you to create your OWN
  1693. * custom windows that can be included as part of your game's status menu
  1694. * option!  For the simplest provided example on how to use it, should you be
  1695. * up to the coding involved, check the JAH_Window_Status_Profile class for how
  1696. * to effectively do so.
  1697. */

  1698. //========= OBJECT DEFINITIONS - RESULTS FROM PARAMETER PROCESSING ==========
  1699. //
  1700. // The objects defined here (before the plugin parameters are loaded) are all
  1701. // used to specify the layout and display patterns of the parameter-oriented
  1702. // window classes used within the Status menu.
  1703. //

  1704. // -------------------------------------------------------
  1705. // JAH_StatusMenuCore_ParamEntry
  1706. //
  1707. // Stores all data for one Parameter listing on the Parameter page.
  1708. // Localizes all its info and saves certain details for mild optimization.

  1709. function JAH_StatusMenuCore_ParamEntry() {
  1710.         this.initialize.apply(this, arguments);
  1711. }

  1712. JAH_StatusMenuCore_ParamEntry.prototype.constructor = JAH_StatusMenuCore_ParamEntry;

  1713. JAH_StatusMenuCore_ParamEntry.prototype.initialize = function(symbol, name, asPercent, txtWidth, valWidth, align) {
  1714.         this._eval = "window._actor." + symbol;
  1715.        
  1716.         this._symbol = symbol;
  1717.         this._name = name;
  1718.         this._asPercent = asPercent || false;
  1719.         this._txtWidth = txtWidth;
  1720.         this._valWidth = valWidth;
  1721.         this._align = align || 'right';
  1722. };

  1723. JAH_StatusMenuCore_ParamEntry.prototype.initName = function() {
  1724.        
  1725.         var name = this._name;
  1726.        
  1727.         // Grab default name.
  1728.         if(name == undefined || name.trim() == "")
  1729.         {
  1730.                 switch(this._symbol)
  1731.                 {
  1732.                         case 'atk':
  1733.                                 name = TextManager.param(2);
  1734.                                 break;
  1735.                         case 'def':
  1736.                                 name = TextManager.param(3);
  1737.                                 break;
  1738.                         case 'mat':
  1739.                                 name = TextManager.param(4);
  1740.                                 break;
  1741.                         case 'mdf':
  1742.                                 name = TextManager.param(5);
  1743.                                 break;
  1744.                         case 'agi':
  1745.                                 name = TextManager.param(6);
  1746.                                 break;
  1747.                         case 'luk':
  1748.                                 name = TextManager.param(7);
  1749.                                 break;
  1750.                         case 'hit':
  1751.                                 name = TextManager.param(8);
  1752.                                 break;
  1753.                         case 'eva':
  1754.                                 name = TextManager.param(9);
  1755.                                 break;
  1756.                         default:
  1757.                                 name = "undefined";
  1758.                 }
  1759.         }
  1760.        
  1761.         this._name = name;
  1762. }

  1763. JAH_StatusMenuCore_ParamEntry.prototype.draw = function(window, x, y, columnPadding) {
  1764.        
  1765.         if(!this._name) this.initName();
  1766.        
  1767.         window.changeTextColor(window.systemColor());
  1768.         window.drawText(this._name, x, y, this._txtWidth);
  1769.         window.resetTextColor();
  1770.        
  1771.         var value = eval(this._eval);
  1772.        
  1773.         if(this._asPercent)
  1774.         {
  1775.                 value = Math.round(value * 100) + "%";
  1776.         }
  1777.        
  1778.         window.drawText(value, x + this._txtWidth, y, this._valWidth, this._align);
  1779. };

  1780. // -------------------------------------------------------
  1781. // JAH_StatusMenuCore_ResistEntry
  1782. //
  1783. // Stores all data for one Resistance listing on the Parameter page.
  1784. // Localizes all its info and saves certain details for mild optimization.

  1785. function JAH_StatusMenuCore_ResistEntry() {
  1786.         this.initialize.apply(this, arguments);
  1787. }

  1788. JAH_StatusMenuCore_ResistEntry.prototype.constructor = JAH_StatusMenuCore_ResistEntry;

  1789. JAH_StatusMenuCore_ResistEntry.prototype.initialize = function(symbol, name, asPercent, txtWidth, valWidth, align) {
  1790.         this._eval = "window._actor." + symbol;
  1791.        
  1792.         this._symbol = symbol;
  1793.         this._name = name;
  1794.        
  1795.         if(asPercent === undefined || asPercent == "")
  1796.         {
  1797.                 if(symbol == "pdr" || symbol == "mdr" || symbol.indexOf("elementRate") > -1)
  1798.                 {
  1799.                         asPercent = JahwsUF.StatusMenuCore.Param.DisplayElePercents;
  1800.                 }
  1801.                 else asPercent = JahwsUF.StatusMenuCore.Param.DisplayStatePercents;
  1802.         }
  1803.        
  1804.         this._asPercent = asPercent || false;
  1805.         this._txtWidth = txtWidth;
  1806.         this._valWidth = valWidth;
  1807.         this._align = align || 'right';
  1808. };

  1809. JAH_StatusMenuCore_ResistEntry.prototype.initName = function() {
  1810.        
  1811.         var name = this._name;
  1812.        
  1813.         // Grab default name.
  1814.         if(name === undefined || name.trim() == "")
  1815.         {
  1816.                 if(this._symbol.match(/elementRate\((\d+)\)/i))
  1817.                 {
  1818.                         var elementID = RegExp.$1;
  1819.                        
  1820.                         name = $dataSystem.elements[elementID];
  1821.                        
  1822.                         if(name == undefined) name = "undefined";
  1823.                 }
  1824.                 else if(this._symbol.match(/stateRate\((\d+)\)/i))
  1825.                 {
  1826.                         var stateID = RegExp.$1;
  1827.                        
  1828.                         var state = $dataStates[stateID];
  1829.                        
  1830.                         if(!!state)
  1831.                         {
  1832.                                 name = state.name;
  1833.                         }
  1834.                         else name = "undefined";
  1835.                 }
  1836.                 else name = "undefined";  // includes if they don't name pdr or mdr.
  1837.         }
  1838.        
  1839.         this._name = name;
  1840. }

  1841. JAH_StatusMenuCore_ResistEntry.prototype.categorizePercentValue = function(val) {
  1842.        
  1843.         for(var i = 0; i < JahwsUF.StatusMenuCore.Constants.MaxCategories; i++)
  1844.         {
  1845.                 if(val >= JahwsUF.StatusMenuCore.Param.ResistanceThresholds[i])
  1846.                 {
  1847.                         return i;
  1848.                 }
  1849.         }
  1850.        
  1851.         return 7;
  1852. }

  1853. JAH_StatusMenuCore_ResistEntry.prototype.draw = function(window, x, y, columnPadding) {
  1854.        
  1855.         if(!this._name) this.initName();
  1856.        
  1857.         window.changeTextColor(window.systemColor());
  1858.         window.drawText(this._name, x, y, this._txtWidth);
  1859.         window.resetTextColor();
  1860.        
  1861.         var value = eval(this._eval);
  1862.         var categoryIndex = this.categorizePercentValue(value);
  1863.        
  1864.         if(this._asPercent)
  1865.         {
  1866.                 value = Math.round(value * 100) + "%";
  1867.         }
  1868.         else
  1869.         {
  1870.                 // Resistance categorization.
  1871.                 value = JahwsUF.StatusMenuCore.Param.ResistanceLabels[categoryIndex];
  1872.         }
  1873.        
  1874.         // Check color details too!
  1875.         var color = JahwsUF.StatusMenuCore.Param.ResistanceColors[categoryIndex];
  1876.        
  1877.         // Initialization automatically undefines all colors if they're not to be used.
  1878.         if(color != undefined)
  1879.         {
  1880.                 if(JahwsUF.StatusMenuCore.Param.ResistanceSysColors[categoryIndex] == false)
  1881.                         window.changeTextColor(color);  // We interpreted a hex color.
  1882.                 else window.changeTextColor(window.textColor(color));
  1883.         }
  1884.        
  1885.         window.drawText(value, x + this._txtWidth, y, this._valWidth, this._align);
  1886.         window.resetTextColor();
  1887. };

  1888. function JAH_StatusMenuCore_EnhancedPortrait() {
  1889.         this.initialize.apply(this, arguments);
  1890. }

  1891. JAH_StatusMenuCore_EnhancedPortrait.prototype.constructor = JAH_StatusMenuCore_EnhancedPortrait;

  1892. JAH_StatusMenuCore_EnhancedPortrait.prototype.initialize = function(imageName, switchID, scale, offset, padding) {
  1893.         this.Portrait = imageName;
  1894.         this.Switch = switchID;
  1895.         this.Scale = scale;
  1896.         this.Offset = offset;
  1897.         this.BorderAdjustment = padding;
  1898. };

  1899. // -------------------------------------------------------
  1900. // JAH_StatusMenuCore_HeaderEntry
  1901. //
  1902. // Stores a text header for insertion within a parameter page,
  1903. // allowing custom text in the page's body.

  1904. function JAH_StatusMenuCore_HeaderEntry() {
  1905.         this.initialize.apply(this, arguments);
  1906. }

  1907. JAH_StatusMenuCore_HeaderEntry.prototype.constructor = JAH_StatusMenuCore_HeaderEntry;

  1908. JAH_StatusMenuCore_HeaderEntry.prototype.initialize = function(text, colsToMerge, page, align) {
  1909.         this._text = text;
  1910.         this._knownWidth = 0;
  1911.        
  1912.         var colData = page.Columns;

  1913.         for(var c = 0; c < colsToMerge.length; c++)
  1914.         {
  1915.                 var col = colsToMerge[c];
  1916.                 this._knownWidth += colData[col].TextWidth + colData[col].ValueWidth;  // absorb the standard column entry space.
  1917.         }
  1918.        
  1919.         // How many EXTRA columns did we absorb? (Don't count the first in padding calcs.)
  1920.         this._colsToMerge = colsToMerge.length - 1;
  1921.         this._align = align || 'center';
  1922. };

  1923. JAH_StatusMenuCore_HeaderEntry.prototype.draw = function(window, x, y, columnPadding) {
  1924.        
  1925.         if(!this._text) return;
  1926.        
  1927.         window.changeTextColor(window.systemColor());
  1928.        
  1929.         var width = this._knownWidth + columnPadding * this._colsToMerge;
  1930.        
  1931.         window.drawText(this._text, x, y, width, this._align);
  1932.         window.resetTextColor();
  1933. };

  1934. // -------------------------------------------------------
  1935. // JAH_StatusMenuCore_BlankEntry
  1936. //
  1937. // A completely empty entry in the parameter page.  Generally used when a
  1938. // HeaderEntry to the left absorbs the position this one fills, to keep the buffer.

  1939. function JAH_StatusMenuCore_BlankEntry() {
  1940.         this.initialize.apply(this, arguments);
  1941. }

  1942. JAH_StatusMenuCore_BlankEntry.prototype.constructor = JAH_StatusMenuCore_BlankEntry;

  1943. JAH_StatusMenuCore_BlankEntry.prototype.initialize = function() {
  1944. };

  1945. JAH_StatusMenuCore_BlankEntry.prototype.draw = function(window, x, y, columnPadding) {
  1946.         return;
  1947. };


  1948. //=============== START PARAMETER INITIALIZATION ===========================

  1949. JahwsUF.StatusMenuCore = JahwsUF.StatusMenuCore || {};

  1950. JahwsUF.StatusMenuCore.Parameters = PluginManager.parameters('JAH_StatusMenuCore');

  1951. JahwsUF.StatusMenuCore.Param = JahwsUF.StatusMenuCore.Param || {};

  1952. // For extra parameter pages - a plugin extension.
  1953. // Each parameter page will store its data in the array under its own page ID.
  1954. // The page will be constructed from a base window class that takes in the ID,
  1955. // making the copied code in the extension absolutely minimal.

  1956. JahwsUF.StatusMenuCore.Constants = {};
  1957. JahwsUF.StatusMenuCore.Constants.MaxPageColumns   = 3;
  1958. JahwsUF.StatusMenuCore.Constants.MaxPageCount     = 6;
  1959. JahwsUF.StatusMenuCore.Constants.MaxPageGroupings = 10;
  1960. JahwsUF.StatusMenuCore.Constants.MaxCategories    = 8;
  1961. JahwsUF.StatusMenuCore.Constants.MaxPageEntries   = 48;

  1962. JahwsUF.StatusMenuCore.Param.ParamPages           = [];
  1963. JahwsUF.StatusMenuCore.Param.ParamPages[0]        = {};

  1964. // Column data is implied with the data storage pattern here.
  1965. JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns       = [];
  1966. JahwsUF.StatusMenuCore.Param.ParamPages[0].ColWidths     = [];

  1967. // JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns[i].TextWidth
  1968. // JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns[i].ValueWidth
  1969. // JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns[i].Entries = [];  // Entries will contain special organization objects!
  1970. // JahwsUF.StatusMenuCore.Param.ParamPages[0].DisplayEquips

  1971. JahwsUF.StatusMenuCore.Param.ResistPages                           = {};
  1972. JahwsUF.StatusMenuCore.Param.ResistPages.Elements                  = {};
  1973. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns          = [];
  1974. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.ColWidths        = [];
  1975. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.RebalanceColumns = false;
  1976. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.DisplayEquips    = false;
  1977. JahwsUF.StatusMenuCore.Param.ResistPages.States                    = {};
  1978. JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns            = [];
  1979. JahwsUF.StatusMenuCore.Param.ResistPages.States.RebalanceColumns   = {};
  1980. JahwsUF.StatusMenuCore.Param.ResistPages.States.ColWidths          = [];
  1981. JahwsUF.StatusMenuCore.Param.ResistPages.States.DisplayEquips      = false;


  1982. // JahwsUF.StatusMenuCore.Param.EleResistsInColumn             = [];
  1983. // JahwsUF.StatusMenuCore.Param.StateResistsInColumn           = [];

  1984. JahwsUF.StatusMenuCore.Param.PageNames            = [];
  1985. JahwsUF.StatusMenuCore.Param.PageWindows          = [];

  1986. JahwsUF.StatusMenuCore.Param.ResistanceColors     = [];
  1987. JahwsUF.StatusMenuCore.Param.ResistanceSysColors  = [];
  1988. JahwsUF.StatusMenuCore.Param.ResistanceLabels     = [];
  1989. JahwsUF.StatusMenuCore.Param.ResistanceThresholds = [];

  1990. JahwsUF.StatusMenuCore.Param.Portraits            = [];
  1991. JahwsUF.StatusMenuCore.Param.ExtendedProfiles     = [];
  1992. JahwsUF.StatusMenuCore.Param.SwitchedProfiles     = [];

  1993. // Keep all local variables in here as purely local.
  1994. // Used to obtain and initialize all plugin parameters.
  1995. (function() {

  1996. // For the core plugin, the page ID is automatically set, rather than read from the plugin.

  1997. var paramPageId = 0;

  1998. // Read in page specification data.

  1999. var totalPages = 0;

  2000. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageCount; i++) {
  2001.   var line = "JahwsUF.StatusMenuCore.Parameters['Page " + i + " Name']";
  2002.   var name = eval(line);
  2003.   line = "JahwsUF.StatusMenuCore.Parameters['Page " + i + " Window']";
  2004.   var page = eval(line);
  2005.   
  2006.   if(!(name == undefined || page == undefined || name == '' || page == ''))
  2007.   {
  2008.         JahwsUF.StatusMenuCore.Param.PageNames[totalPages] = name;
  2009.         JahwsUF.StatusMenuCore.Param.PageWindows[totalPages] = page;
  2010.        
  2011.         totalPages++;
  2012.   }
  2013. }

  2014. JahwsUF.StatusMenuCore.Param.TotalPages = totalPages;

  2015. // Step 1:  Read in the param column formatting data.  
  2016. // 1)  How many entries per column?
  2017. // 2)  How many columns on the page?
  2018. // 3)  How wide should the columns be?

  2019. var colCount = 1;
  2020. var column = {};

  2021. var totalColumnWidths = 0;
  2022. var MaxColumnLength = 0;

  2023. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageColumns; i++)
  2024. {
  2025.         var line = "Number(JahwsUF.StatusMenuCore.Parameters['Params in Col " + i + "'])";
  2026.         var count = eval(line);
  2027.        
  2028.         if(count == '' || count == undefined || isNaN(count))
  2029.         {
  2030.                 if(i == 1) count = 8;
  2031.                 else count = 0;
  2032.         }
  2033.        
  2034.         if(count > MaxColumnLength) MaxColumnLength = count;
  2035.        
  2036.         line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " Text Width'])";
  2037.         var textWidth = eval(line);
  2038.        
  2039.         if(textWidth == '' || textWidth == undefined || isNaN(textWidth))
  2040.         {
  2041.                 textWidth = 160;
  2042.         }
  2043.        
  2044.         line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " Value Width'])";
  2045.         var valWidth = eval(line);
  2046.        
  2047.         if(valWidth == '' || valWidth == undefined || isNaN(valWidth))
  2048.         {
  2049.                 valWidth = 60;
  2050.         }
  2051.        
  2052.         column.Size = count;
  2053.         column.TextWidth = textWidth;
  2054.         column.ValueWidth = valWidth;
  2055.        
  2056.         // Holds all displayables for the column.  In particular, pre-computed objects
  2057.         // corresponding to the game designer's desired page specification.
  2058.         //
  2059.         // This is done here at load time for optimization and reduction of windowing code
  2060.         // complexity.  (Object orientation = good.)
  2061.         //
  2062.         // Admittedly, I don't pre-analyze the final positions based on resolution, in case
  2063.         // someone eventually makes a dynamically resolution-changing plugin.
  2064.        
  2065.         column.Entries = [];   // An EXTREMELY important field.
  2066.        
  2067.         if(count == 0)
  2068.         {
  2069.                 break;
  2070.         }
  2071.         else
  2072.         {
  2073.                 JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].Columns[i-1] = column;
  2074.                 column = {};
  2075.                
  2076.                 colCount = i;               
  2077.                 totalColumnWidths += textWidth + valWidth;
  2078.         }
  2079. }

  2080. // Display equipment options.  (It's a part of the makeup of a page.)

  2081. JahwsUF.StatusMenuCore.Param.DisplayEquips = JahwsUF.StatusMenuCore.Parameters['Display Equips?'];
  2082. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].DisplayEquips = JahwsUF.StatusMenuCore.Parameters['Display Equips?'];

  2083. var equipWidth = Number(JahwsUF.StatusMenuCore.Parameters['Equip Column Width']);

  2084. if(equipWidth == '' || equipWidth == undefined || isNaN(equipWidth))
  2085. {
  2086.         equipWidth = 320;
  2087. }

  2088. var pdr_mdr_asResists = eval(JahwsUF.StatusMenuCore.Parameters['pdr/mdr as Resists']);

  2089. if(pdr_mdr_asResists != true)
  2090.         pdr_mdr_asResists = false;
  2091.        
  2092. var rebalance = eval(JahwsUF.StatusMenuCore.Parameters['Rebalance Emptiness']);

  2093. if(rebalance != true)
  2094.         rebalance = false;
  2095. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].RebalanceColumns = rebalance;

  2096. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].EquipColumnWidth = equipWidth;
  2097. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].RequiredColumnWidth = totalColumnWidths;

  2098. // Read in parameter grouping title spec data.  Construct their page entries now so that
  2099. // we can detect what page positions are occupied and make the necessary adjustments.

  2100. var GroupingTitles = [];
  2101. var GroupingRows = [];
  2102. var GroupingCols = [];

  2103. var pageSpecs = JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId];

  2104. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageGroupings; i++)
  2105. {
  2106.         GroupingTitles[i] = JahwsUF.StatusMenuCore.Parameters['Grouping Title ' + i];
  2107.        
  2108.         GroupingRows[i] = Number(JahwsUF.StatusMenuCore.Parameters['Row Placement ' + i]);
  2109.         if(!GroupingRows[i])
  2110.                 GroupingRows[i] = undefined;
  2111.         else GroupingRows[i]--;
  2112.        
  2113.         var colSpec = JahwsUF.StatusMenuCore.Parameters['Group Columns ' + i ];
  2114.        
  2115.         if(colSpec && colSpec.trim() != "")
  2116.         {
  2117.                 line = '[' + colSpec + ']';
  2118.                
  2119.                 GroupingCols[i] = eval(line);
  2120.                
  2121.                 // Validate the column data.
  2122.                 for(var j = 1; j < GroupingCols[i].length; j++)
  2123.                 {
  2124.                         if(GroupingCols[i][j] != GroupingCols[i][0] + j)
  2125.                                 throw "Columns to be grouped on the Status window Parameter page must be adjacent!";
  2126.                 }
  2127.                
  2128.                 for(var j = 0; j < GroupingCols[i].length; j++)
  2129.                 {
  2130.                         GroupingCols[i][j]--;
  2131.                 }
  2132.         }
  2133.        
  2134.         // If we actually are defining a header grouping.
  2135.         if(GroupingRows[i] != undefined)
  2136.         {
  2137.                 var entry = new JAH_StatusMenuCore_HeaderEntry(GroupingTitles[i], GroupingCols[i], pageSpecs);
  2138.                 pageSpecs.Columns[GroupingCols[i][0]].Entries[GroupingRows[i]] = entry;
  2139.                
  2140.                 for(var j = 1; j < GroupingCols[i].length; j++)
  2141.                 {
  2142.                         var c = GroupingCols[i][j];
  2143.                        
  2144.                         pageSpecs.Columns[c].Entries[GroupingRows[i]] = new JAH_StatusMenuCore_BlankEntry();
  2145.                 }
  2146.         }
  2147. }

  2148. // Analyze the text grouping headers and pre-compute any needed adjustments to param entry placement.
  2149. // If a slot is occupied, map all parameters previously positioned here or below down an extra row.
  2150. // (can occur multiple times)

  2151. var EntryMapping = [];  // This 2D array will hold the positions at which parameters ought be placed
  2152.                         // within each column.
  2153.                                                
  2154. var colWidths = JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].ColWidths;

  2155. for(var c = 0; c < pageSpecs.Columns.length; c++)
  2156. {
  2157.         EntryMapping[c] = [];  // [column][row]
  2158.         var row = 0;
  2159.        
  2160.         for(var r = 0; row < pageSpecs.Columns[c].Size; r++)
  2161.         {
  2162.                 // All headers and intentional blanks are already defined.
  2163.                 // Parameters are not, so we find empty spaces and make note of
  2164.                 // which parameter in the column gets mapped to each.
  2165.                
  2166.                 if(pageSpecs.Columns[c].Entries[r] === undefined)  
  2167.                 {
  2168.                         EntryMapping[c][row] = r;
  2169.                         row++;
  2170.                 }
  2171.                 else
  2172.                 {
  2173.                         colWidths[r] = (colWidths[r] || 0) + 1;
  2174.                         continue;
  2175.                 }
  2176.         }
  2177. }

  2178. // Resistance alignment formatting data.  Awkwardly read here because its data needs
  2179. // to be passed into any resistance-oriented Param page entry structures when initialized.

  2180. // Only has bearing on the alignment of text within its page entry.  Does not affect the
  2181. // actual position of entries.

  2182. JahwsUF.StatusMenuCore.Param.CenterEleValues   = eval(JahwsUF.StatusMenuCore.Parameters['Center Ele. Values']);
  2183. JahwsUF.StatusMenuCore.Param.CenterStateValues = eval(JahwsUF.StatusMenuCore.Parameters['Center State Values']);

  2184. JahwsUF.StatusMenuCore.Param.CenterEleValues   = JahwsUF.StatusMenuCore.Param.CenterEleValues || false;
  2185. JahwsUF.StatusMenuCore.Param.CenterStateValues = JahwsUF.StatusMenuCore.Param.CenterStateValues || false;

  2186. // Read in parameter specification data.

  2187. var totalParams = 0;

  2188. var i = 1;

  2189. for (var columnPlacement = 0; columnPlacement < JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].Columns.length; columnPlacement++) {

  2190.         var currentColumn = JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].Columns[columnPlacement];

  2191.         for (var row = 0; row < currentColumn.Size; row++) {
  2192.                
  2193.                 var line = "JahwsUF.StatusMenuCore.Parameters['Parameter " + i + " Symbol']";
  2194.                 var symbol = eval(line);
  2195.                 line = "JahwsUF.StatusMenuCore.Parameters['Parameter " + i + " Name']";
  2196.                 var name = eval(line);
  2197.                 line = "JahwsUF.StatusMenuCore.Parameters['Parameter " + i + " as %']";
  2198.                 var percent = eval(eval(line));
  2199.           
  2200.                 // Undefined = blank space on the parameter page.
  2201.                 if(symbol == '')
  2202.                         symbol = undefined;
  2203.                        
  2204.                 if(!(symbol == undefined))
  2205.                 {
  2206.                         if(symbol.trim() == "")
  2207.                                 symbol = undefined;
  2208.                 }
  2209.                
  2210.                 // The precomputed position for this parameter.  
  2211.                 // Ex:  EntryMapping[0][1] maps the first column's second parameter to its actual line number,
  2212.                 // thus effectively to its eventual y-value when actually displayed in JAH_Window_Status_Params.
  2213.                 //
  2214.                 // (EntryMapping, as with many of my other arrays, are zero-based.)
  2215.                 var rowPlacement = EntryMapping[columnPlacement][row];
  2216.           
  2217.                 if(symbol)
  2218.                 {
  2219.                         if(symbol.indexOf("elementRate") != -1)
  2220.                         {
  2221.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2222.                         }
  2223.                         else if(pdr_mdr_asResists && (symbol == "pdr" || symbol == "mdr"))
  2224.                         {
  2225.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2226.                         }
  2227.                         else if(symbol.indexOf("stateRate") != -1)
  2228.                         {
  2229.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterStateValues ? 'center' : 'right');
  2230.                         }
  2231.                         else
  2232.                         {
  2233.                                 if(percent == undefined)
  2234.                                         percent = true;
  2235.                                
  2236.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ParamEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth);
  2237.                         }
  2238.                        
  2239.                         colWidths[rowPlacement] = (colWidths[rowPlacement] || 0) + 1;
  2240.                 }
  2241.                
  2242.                 totalParams++;
  2243.                 i++;
  2244.         }
  2245. }

  2246. JahwsUF.StatusMenuCore.Param.TotalParams = totalParams;

  2247. // Elemental resistances page option.

  2248. var eleTextWidth = Number(JahwsUF.StatusMenuCore.Parameters['Ele. Col Txt Width']);
  2249. if(eleTextWidth == '' || eleTextWidth == undefined || isNaN(eleTextWidth))
  2250. {
  2251.         eleTextWidth = 160;
  2252. }

  2253. var eleValWidth = Number(JahwsUF.StatusMenuCore.Parameters['Ele. Col Val Width']);
  2254. if(eleValWidth == '' || eleValWidth == undefined || isNaN(eleValWidth))
  2255. {
  2256.         eleValWidth = 80;
  2257. }

  2258. var resistanceColumnCount = 1;

  2259. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageColumns; i++)
  2260. {
  2261.         var line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " Elements'])";
  2262.         var eles = eval(line);
  2263.         //JahwsUF.StatusMenuCore.Param.EleResistsInColumn[i-1] = eles;
  2264.        
  2265.         if(eles == 0 || eles == '' || isNaN(eles))
  2266.         {
  2267.                 break;
  2268.         }
  2269.         else
  2270.         {
  2271.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1]            = {};
  2272.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].TextWidth  = eleTextWidth;
  2273.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].ValueWidth = eleValWidth;
  2274.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].Entries    = [];
  2275.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].Size       = eles;
  2276.                
  2277.                 resistanceColumnCount = i;
  2278.         }
  2279. }

  2280. //JahwsUF.StatusMenuCore.Param.EleResistsColumnCount = resistanceColumnCount;

  2281. var elementsToOmit = eval("[" + JahwsUF.StatusMenuCore.Parameters['Hidden Elements'] + "]");

  2282. if(elementsToOmit == undefined)
  2283. {
  2284.         elementsToOmit = [];
  2285. }

  2286. //JahwsUF.StatusMenuCore.Param.EleResistsToHide = elementsToOmit;

  2287. // --------- Construct elemental resist page entry layout ------------
  2288. var eleHeader = JahwsUF.StatusMenuCore.Parameters['Ele. Resist Header'];

  2289. if(eleHeader == undefined)
  2290.         eleHeader == "";
  2291.        
  2292. if(typeof eleHeader == "string" && eleHeader.trim() == "")
  2293.         eleHeader = "";

  2294. var eleRowOffset = 0;
  2295. var elePage = JahwsUF.StatusMenuCore.Param.ResistPages.Elements;

  2296. if(eleHeader != "")
  2297. {
  2298.         eleRowOffset = 2; // We insert two lines for the text title.
  2299.        
  2300.         // Insert header into the page construction!
  2301.         var colCount = elePage.Columns.length;
  2302.        
  2303.         var mergeCols = [];
  2304.         for(var i = 0; i < colCount; i++)
  2305.                 mergeCols.push(i);
  2306.        
  2307.         elePage.Columns[0].Entries[0] = new JAH_StatusMenuCore_HeaderEntry(eleHeader, mergeCols, elePage);
  2308.         elePage.Columns[0].Entries[1] = new JAH_StatusMenuCore_HeaderEntry("", mergeCols, elePage);

  2309.         elePage.ColWidths[0] = colCount;
  2310.         elePage.ColWidths[1] = colCount;
  2311.                
  2312.         for(var i = 1; i < colCount; i++)
  2313.         {
  2314.                 elePage.Columns[i].Entries[0] = new JAH_StatusMenuCore_BlankEntry();
  2315.                 elePage.Columns[i].Entries[1] = new JAH_StatusMenuCore_BlankEntry();
  2316.         }
  2317. }

  2318. var i = 1;

  2319. for (var columnPlacement = 0; columnPlacement < elePage.Columns.length; columnPlacement++) {

  2320.         var currentColumn = elePage.Columns[columnPlacement];

  2321.         for (var row = 0; row < currentColumn.Size; row++) {
  2322.                
  2323.                 while(elementsToOmit.indexOf(i) > -1)
  2324.                 {
  2325.                         i++;
  2326.                 }
  2327.                
  2328.                 var rowPlacement = row + eleRowOffset;
  2329.           
  2330.                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry("elementRate(" + i + ")", undefined, undefined, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2331.                 elePage.ColWidths[rowPlacement] = (elePage.ColWidths[rowPlacement] || 0) + 1;
  2332.                
  2333.                 i++;
  2334.         }
  2335. }

  2336. //JahwsUF.StatusMenuCore.Param.EleResistsHeader = eleHeader;

  2337. var displayPercents = eval(JahwsUF.StatusMenuCore.Parameters['Display Ele. Percent']);
  2338. if(displayPercents == undefined) displayPercents = true;
  2339. JahwsUF.StatusMenuCore.Param.DisplayElePercents = displayPercents;

  2340. // -----------------------------

  2341. // State resistances page option.

  2342. // State Col Txt Width
  2343. // State Col Val Width

  2344. var stateTextWidth = Number(JahwsUF.StatusMenuCore.Parameters['State Col Txt Width']);
  2345. if(stateTextWidth == '' || stateTextWidth == undefined || isNaN(stateTextWidth))
  2346. {
  2347.         stateTextWidth = 160;
  2348. }

  2349. var stateValWidth = Number(JahwsUF.StatusMenuCore.Parameters['State Col Val Width']);
  2350. if(stateValWidth == '' || stateValWidth == undefined || isNaN(stateValWidth))
  2351. {
  2352.         stateValWidth = 80;
  2353. }

  2354. resistanceColumnCount = 1;

  2355. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageColumns; i++)
  2356. {
  2357.         var line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " States'])";
  2358.         var states = eval(line);
  2359.         //JahwsUF.StatusMenuCore.Param.StateResistsInColumn[i-1] = state;
  2360.        
  2361.         if(states == 0 || states == '' || isNaN(states))
  2362.         {
  2363.                 break;
  2364.         }
  2365.         else
  2366.         {
  2367.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1]            = {};
  2368.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].TextWidth  = stateTextWidth;
  2369.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].ValueWidth = stateValWidth;
  2370.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].Entries    = [];
  2371.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].Size       = states;
  2372.                 resistanceColumnCount = i;
  2373.         }
  2374. }

  2375. //JahwsUF.StatusMenuCore.Param.StateResistsColumnCount = resistanceColumnCount;

  2376. var statesToOmit = eval("[" + JahwsUF.StatusMenuCore.Parameters['Hidden States'] + "]");

  2377. if(statesToOmit == undefined)
  2378. {
  2379.         statesToOmit = [];
  2380. }

  2381. //JahwsUF.StatusMenuCore.Param.StateResistsToHide = statesToOmit;

  2382. // --------- Construct elemental resist page entry layout ------------
  2383. var stateHeader = JahwsUF.StatusMenuCore.Parameters['State Resist Header'];

  2384. if(stateHeader == undefined)
  2385.         stateHeader == "";
  2386.        
  2387. if(typeof stateHeader == "string" && stateHeader.trim() == "")
  2388.         stateHeader = "";

  2389. var stateRowOffset = 0;
  2390. var statePage = JahwsUF.StatusMenuCore.Param.ResistPages.States;

  2391. if(stateHeader != "")
  2392. {
  2393.         stateRowOffset = 2; // We insert two lines for the text title.
  2394.        
  2395.         // Insert header into the page construction!
  2396.         var colCount = statePage.Columns.length;
  2397.        
  2398.         var mergeCols = [];
  2399.         for(var i = 0; i < colCount; i++)
  2400.                 mergeCols.push(i);
  2401.        
  2402.         statePage.Columns[0].Entries[0] = new JAH_StatusMenuCore_HeaderEntry(stateHeader, mergeCols, statePage);
  2403.         statePage.Columns[0].Entries[1] = new JAH_StatusMenuCore_HeaderEntry("", mergeCols, statePage);

  2404.         statePage.ColWidths[0] = colCount;
  2405.         statePage.ColWidths[1] = colCount;
  2406.                
  2407.         for(var i = 1; i < colCount; i++)
  2408.         {
  2409.                 statePage.Columns[i].Entries[0] = new JAH_StatusMenuCore_BlankEntry();
  2410.                 statePage.Columns[i].Entries[1] = new JAH_StatusMenuCore_BlankEntry();
  2411.         }
  2412. }

  2413. //JahwsUF.StatusMenuCore.Param.StateResistsHeader = stateHeader;

  2414. var i = 1;

  2415. for (var columnPlacement = 0; columnPlacement < statePage.Columns.length; columnPlacement++) {

  2416.         var currentColumn = statePage.Columns[columnPlacement];

  2417.         for (var row = 0; row < currentColumn.Size; row++) {
  2418.                
  2419.                 while(statesToOmit.indexOf(i) > -1)
  2420.                 {
  2421.                         i++;
  2422.                 }
  2423.                
  2424.                 var rowPlacement = row + stateRowOffset;
  2425.           
  2426.                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry("stateRate(" + i + ")", undefined, undefined, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2427.                 statePage.ColWidths[rowPlacement] = (statePage.ColWidths[rowPlacement] || 0) + 1;
  2428.                
  2429.                 i++;
  2430.         }
  2431. }

  2432. var displayStatePercents = eval(JahwsUF.StatusMenuCore.Parameters['Display State Percent']);
  2433. if(displayStatePercents == undefined) displayStatePercents = true;
  2434. JahwsUF.StatusMenuCore.Param.DisplayStatePercents = displayStatePercents;

  2435. // Resistance classification data loading

  2436. var useColors = eval(JahwsUF.StatusMenuCore.Parameters['Use Color']);
  2437. if(useColors == undefined) useColors = true;
  2438. JahwsUF.StatusMenuCore.Param.ResistancesInColor = useColors;

  2439. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxCategories; i++)
  2440. {
  2441.         var line = "JahwsUF.StatusMenuCore.Parameters['Category " + i + " Color']";
  2442.         var colorID = eval(line);
  2443.        
  2444.         if(colorID == undefined) colorID = "";
  2445.        
  2446.         if(colorID.trim() == "")
  2447.                 colorID = undefined;
  2448.        
  2449.         var sysColor = true;
  2450.        
  2451.         if(useColors == false || colorID == undefined)
  2452.                 colorID = undefined;
  2453.         else {
  2454.                 if(colorID.indexOf("0x") != -1)
  2455.                 {
  2456.                         sysColor = false;
  2457.                         colorID = "#" + colorID.substring(colorID.indexOf("0x") + 2);
  2458.                 }
  2459.                 else if(colorID.indexOf("#") != -1)
  2460.                 {
  2461.                         sysColor = false;
  2462.                 }
  2463.                 else colorID = Number(colorID);
  2464.         }
  2465.        
  2466.         line = "JahwsUF.StatusMenuCore.Parameters['Category " + i + " Text']";
  2467.         var text = eval(line);
  2468.        
  2469.         line = "Number(JahwsUF.StatusMenuCore.Parameters['Threshold " + i + "'])";
  2470.         var percent = eval(line);
  2471.        
  2472.         JahwsUF.StatusMenuCore.Param.ResistanceLabels[i-1] = text;
  2473.         JahwsUF.StatusMenuCore.Param.ResistanceColors[i-1] = colorID;
  2474.         JahwsUF.StatusMenuCore.Param.ResistanceSysColors[i-1] = sysColor;
  2475.         JahwsUF.StatusMenuCore.Param.ResistanceThresholds[i-1] = percent / 100.0;
  2476. }


  2477. // Other parameters

  2478. var colorID = JahwsUF.StatusMenuCore.Parameters['Color: XP Gauge 1'];
  2479. if(colorID == undefined) colorID = 30;
  2480. JahwsUF.StatusMenuCore.Param.ColorXpGauge1 = colorID;

  2481. var colorID = JahwsUF.StatusMenuCore.Parameters['Color: XP Gauge 2'];
  2482. if(colorID == undefined) colorID = 31;
  2483. JahwsUF.StatusMenuCore.Param.ColorXpGauge2 = colorID;

  2484. var hideXP = eval(JahwsUF.StatusMenuCore.Parameters['Hide XP Bar']);
  2485. if(hideXP == undefined) hideXP = false;
  2486. JahwsUF.StatusMenuCore.Param.XpHidden = hideXP;

  2487. var hideLv = eval(JahwsUF.StatusMenuCore.Parameters['Hide Levels']);
  2488. if(hideLv == undefined) hideLv = false;
  2489. JahwsUF.StatusMenuCore.Param.LvHidden = hideLv;

  2490. var xpDisplayMode = eval(JahwsUF.StatusMenuCore.Parameters['XP - Show Remaining']);
  2491. if(xpDisplayMode == undefined) xpDisplayMode = false;
  2492. JahwsUF.StatusMenuCore.Param.XpDisplayOnlyRemaining = xpDisplayMode;

  2493. var nicknameSetting = eval(JahwsUF.StatusMenuCore.Parameters['Header - Name + Nick']);
  2494. if(nicknameSetting == undefined) nicknameSetting = true;
  2495. JahwsUF.StatusMenuCore.Param.NicknameInHeaders = nicknameSetting;

  2496. var nicknameFormat = JahwsUF.StatusMenuCore.Parameters['Nickname Format'];
  2497. if(nicknameFormat == undefined) nicknameSetting = "";
  2498. JahwsUF.StatusMenuCore.Param.NicknameFormat = nicknameFormat;

  2499. var scrollFactor = eval(JahwsUF.StatusMenuCore.Parameters['Scroll Multiplier']);
  2500. if(scrollFactor == undefined) scrollFactor = 1;
  2501. JahwsUF.StatusMenuCore.Param.ScrollFactor = scrollFactor;

  2502. var imgBuffer = Number(JahwsUF.StatusMenuCore.Parameters['Portrait Img Adjust']);
  2503. if(imgBuffer == undefined) imgBuffer = 0;
  2504. JahwsUF.StatusMenuCore.Param.ImgBuffer = imgBuffer;

  2505. var portraitsAll = eval(JahwsUF.StatusMenuCore.Parameters['Portraits On All']);
  2506. if(portraitsAll == undefined) portraitsAll = true;
  2507. JahwsUF.StatusMenuCore.Param.DefaultPortrait = portraitsAll;

  2508. var headerScrolling = eval(JahwsUF.StatusMenuCore.Parameters['Scrolling Headers']);
  2509. if(headerScrolling == undefined) headerScrolling = true;
  2510. JahwsUF.StatusMenuCore.Param.HeaderScrolling = headerScrolling;

  2511. var tpDisplay = JahwsUF.StatusMenuCore.Parameters['Add TP Gauge'];

  2512. if (tpDisplay == undefined)
  2513.         tpDisplay = "";

  2514. if(tpDisplay.trim() == "" && Imported.YEP_CoreEngine)
  2515. {
  2516.         tpDisplay = eval(Yanfly.Param.MenuTpGauge);
  2517. }
  2518. else
  2519. {
  2520.         tpDisplay = eval(tpDisplay);
  2521.        
  2522.         if(tpDisplay == undefined) tpDisplay = false;
  2523. }

  2524. JahwsUF.StatusMenuCore.Param.TpGauge = tpDisplay;

  2525. var blankAfterTP = eval(JahwsUF.StatusMenuCore.Parameters['Blank after TP']);
  2526. if(blankAfterTP == undefined) blankAfterTP = true;
  2527. JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank = blankAfterTP && tpDisplay;


  2528. }());




  2529. //=============================================================================
  2530. // DataManager
  2531. //=============================================================================

  2532. JahwsUF.StatusMenuCore.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
  2533. DataManager.isDatabaseLoaded = function() {
  2534.     if (!JahwsUF.StatusMenuCore.DataManager_isDatabaseLoaded.call(this)) return false;
  2535.                 this.processActorNotetags($dataActors);
  2536.                 return true;
  2537. };

  2538. // It's not a method that exists in the base RPG Maker, but it's still wise to back up any older
  2539. // versions of this method.
  2540. JahwsUF.StatusMenuCore.DataManager_processActorNotetags = DataManager.processActorNotetags;

  2541. DataManager.processActorNotetags = function(group) {
  2542.        
  2543.         if(!!JahwsUF.StatusMenuCore.DataManager_processActorNotetags)
  2544.         {
  2545.                 JahwsUF.StatusMenuCore.DataManager_processActorNotetags.call(this, group);
  2546.         }
  2547.        
  2548.         // Stage 1 - analyze all baseline content.
  2549.        
  2550.         var profileStart = /<(?:PROFILE)>/i;
  2551.         var profileEnd = /<\/(?:PROFILE)>/i;

  2552.         var switchedProfileStart = /<(?:PROFILE SWITCH):[ ]*(\d+)>/i;
  2553.         var switchedProfileEnd = /<\/(?:PROFILE SWITCH)>/i;
  2554.        
  2555.         var offsetMatcher = /<(?:PORTRAIT OFFSET):[ ]*(\d+)\s*,\s*(\d+)>/i;
  2556.         var adjustMatcher = /<(?:PORTRAIT ANTI-BUFFER):[ ]*(-?\d+)>/i;

  2557.         for (var n = 1; n < group.length; n++) {
  2558.                 var obj = group[n];
  2559.                                
  2560.                 var profile = "";
  2561.                 var profileSpec = false;
  2562.                 var profileSwitch = undefined;
  2563.                
  2564.                 // Set default value.
  2565.                 JahwsUF.StatusMenuCore.Param.SwitchedProfiles[n] = [];
  2566.                
  2567.                 // Base portrait parameters.
  2568.                
  2569.                 var portrait = undefined;
  2570.                 var DefaultScale = 1;
  2571.                 var DefaultOffset = [0, 0];
  2572.                 var DefaultAdjust = 0;
  2573.                
  2574.                 var notedata = obj.note.split(/\r?\n/);

  2575.                 for (var i = 0; i < notedata.length; i++) {
  2576.                        
  2577.                         var line = notedata[i];
  2578.                         if (line.match(/<(?:PORTRAIT):[ ]([\w\s]+)>/i)) {
  2579.                                 portrait = RegExp.$1;
  2580.                                 if (portrait == '') portrait = undefined;
  2581.                                 else ImageManager.loadPicture(portrait);  // Pre-load it!  Otherwise, the first attempt to do so later will fail.
  2582.                         }
  2583.                         else if (line.match(/<(?:PORTRAIT SCALE):[ ]*(\d+.?\d+)>/i)) {
  2584.                                 DefaultScale = parseFloat(RegExp.$1);
  2585.                                 if (DefaultScale < 0) DefaultScale = 0;
  2586.                         } else if (line.match(offsetMatcher)) {
  2587.                                 DefaultOffset = [parseInt(RegExp.$1), parseInt(RegExp.$2)];
  2588.                         } else if (line.match(adjustMatcher)) {
  2589.                                 DefaultAdjust = parseInt(RegExp.$1);
  2590.                         } else if (line.match(profileStart)) {
  2591.                                 profileSpec = true;
  2592.                                 profile = "";
  2593.                                 profileSwitch = undefined;
  2594.                         } else if (line.match(switchedProfileStart)){
  2595.                                 profileSpec = true;
  2596.                                 profile = "";
  2597.                                 profileSwitch = parseInt(RegExp.$1);
  2598.                         } else if (line.match(profileEnd) || line.match(switchedProfileEnd)) {
  2599.                                 if(profileSwitch == undefined)
  2600.                                         JahwsUF.StatusMenuCore.Param.ExtendedProfiles[n] = profile;
  2601.                                 else
  2602.                                 {
  2603.                                         JahwsUF.StatusMenuCore.Param.SwitchedProfiles[n].push([profileSwitch, profile]);
  2604.                                 }
  2605.                                
  2606.                                 profileSpec = false;
  2607.                         } else if (profileSpec) {
  2608.                                 if(profile != "")
  2609.                                         profile += "\n";
  2610.                                 profile += line;
  2611.                         }
  2612.                 }
  2613.                
  2614.                 // This sets the character's base portrait for this actor.
  2615.                 JahwsUF.StatusMenuCore.Param.Portraits[n] = [];
  2616.                 JahwsUF.StatusMenuCore.Param.Portraits[n][0]
  2617.                         = new JAH_StatusMenuCore_EnhancedPortrait(portrait, 0, DefaultScale, DefaultOffset, DefaultAdjust);
  2618.         }
  2619.        
  2620.         // Stage 2 - now that default parameters for Actor portraits are in place, we
  2621.         // read in all switched profiles.
  2622.        
  2623.         // New format:   <portrait "filename" switch: s scale: z offset: x, y antibuffer: b>
  2624.        
  2625.         // The below ought be safe - ':' is not a legal character in filenames.
  2626.        
  2627.         var portraitDetector = /<(?:PORTRAIT) \s*"(.+?)".+>/i;
  2628.         var offsetMatcher = /(?:OFFSET):[ ]*(\d+)\s*,\s*(\d+)/i;
  2629.         var adjustMatcher = /(?:ANTI-BUFFER):[ ]*(-?\d+)/i;
  2630.         var switchMatcher = /(?:SWITCH):[ ]*(\d+)\s*/i;
  2631.         var scaleMatcher  = /(?:SCALE):[ ]*(\d+.?\d+)/i

  2632.         for (var n = 1; n < group.length; n++) {
  2633.                 var obj = group[n];
  2634.                                
  2635.                 var profile = "";
  2636.                 var profileSpec = false;
  2637.                 var profileSwitch = undefined;
  2638.                
  2639.                 // Assimilate the original portrait data here.
  2640.                 var DefaultScale = JahwsUF.StatusMenuCore.Param.Portraits[n][0].Scale;
  2641.                 var DefaultOffset = JahwsUF.StatusMenuCore.Param.Portraits[n][0].Offset;
  2642.                 var DefaultAdjust = JahwsUF.StatusMenuCore.Param.Portraits[n][0].BorderAdjustment;
  2643.                
  2644.                 var notedata = obj.note.split(/\r?\n/);

  2645.                 for (var i = 0; i < notedata.length; i++) {
  2646.                        
  2647.                         var line = notedata[i];
  2648.                         if (line.match(portraitDetector)) {
  2649.                                 var portrait = RegExp.$1;
  2650.                                
  2651.                                 if (portrait == '') portrait = undefined;
  2652.                                 else ImageManager.loadPicture(portrait);  // Pre-load it!  Otherwise, the first attempt to do so later will fail.
  2653.                                
  2654.                                 // Now to read in the parameters.
  2655.                        
  2656.                                 var switchID = -1;
  2657.                                 var scale  = DefaultScale;
  2658.                                 var offset = DefaultOffset;
  2659.                                 var adjust = DefaultAdjust;
  2660.                        
  2661.                                 if (line.match(switchMatcher)) {
  2662.                                         switchID = parseInt(RegExp.$1);
  2663.                                 }
  2664.                                
  2665.                                 if (line.match(scaleMatcher)) {
  2666.                                         scale = parseFloat(RegExp.$1);
  2667.                                         if (scale < 0) scale = 0;
  2668.                                 }
  2669.                                
  2670.                                 if (line.match(offsetMatcher)) {
  2671.                                         offset = [parseInt(RegExp.$1), parseInt(RegExp.$2)];
  2672.                                 }
  2673.                                
  2674.                                 if (line.match(adjustMatcher)) {
  2675.                                         adjust = parseInt(RegExp.$1);
  2676.                                 }
  2677.                                
  2678.                                 if(switchID == 0)
  2679.                                 {
  2680.                                         JahwsUF.StatusMenuCore.Param.Portraits[n][0] = new JAH_StatusMenuCore_EnhancedPortrait(portrait, switchID, scale, offset, adjust);
  2681.                                 }
  2682.                                 else JahwsUF.StatusMenuCore.Param.Portraits[n].push(new JAH_StatusMenuCore_EnhancedPortrait(portrait, switchID, scale, offset, adjust));
  2683.                         }
  2684.                 }
  2685.         }
  2686. };

  2687. //================== END PARAMETER INITIALIZATION ===========================


  2688. //-----------------------------------------------------------------------------
  2689. // Window_Base
  2690. //
  2691. // A few extra methods/extensions for windows.

  2692. // It maps to Window.png, final row, last two colors.  A nice purple gradient by default.
  2693. Window_Base.prototype.xpGaugeColor1 = function() {
  2694.     return this.textColor(JahwsUF.StatusMenuCore.Param.ColorXpGauge1);
  2695. };

  2696. Window_Base.prototype.xpGaugeColor2 = function() {
  2697.     return this.textColor(JahwsUF.StatusMenuCore.Param.ColorXpGauge2);
  2698. };

  2699. Window_Base.prototype.xpColor = function(actor) {
  2700.     return this.normalColor();
  2701. };

  2702. Window_Base.prototype.drawActorXp = function(actor, x, y, width, hideNextLv) {
  2703.     width = width || 186;  // default value = 186.
  2704.     var color1 = this.xpGaugeColor1();
  2705.     var color2 = this.xpGaugeColor2();
  2706.        
  2707.         // Compute ratio and format appropriate values.
  2708.        
  2709.         var value1 = this._actor.currentExp() - this._actor.currentLevelExp();
  2710.         var value2 = this._actor.nextRequiredExp() + value1;
  2711.        
  2712.         var xpRate = value1 / value2;
  2713.        
  2714.     if (this._actor.isMaxLevel()) {
  2715.         value1 = 0;
  2716.         value2 = 0;
  2717.                 xpRate = 1;
  2718.     }
  2719.        
  2720.         var value3 = value2 - value1;
  2721.        
  2722.         // Only attempt this if YEP_CoreEngine is loaded; the digit-grouping function is defined there.
  2723.         if(Imported.YEP_CoreEngine)
  2724.         {
  2725.                 value1 = Yanfly.Util.toGroup(value1);
  2726.                 value2 = Yanfly.Util.toGroup(value2);
  2727.                 value3 = Yanfly.Util.toGroup(value3);
  2728.         }
  2729.        
  2730.         // Draw the gauge itself...
  2731.     this.drawGauge(x, y, width, xpRate, color1, color2);  // Should link to Yanfly's correctly.
  2732.     this.changeTextColor(this.systemColor());
  2733.        
  2734.         // Now for the text.  The FUN part.
  2735.         var spaceWidth = this.textWidth(" ");
  2736.         var expLabelWidth = this.textWidth(TextManager.expA);
  2737.        
  2738.         var expNext = TextManager.expNext.format(TextManager.levelA);
  2739.         var nextLvWidth = this.textWidth(expNext);
  2740.        
  2741.     this.drawText(TextManager.expA, x + width - expLabelWidth, y, expLabelWidth, 'right');
  2742.        
  2743.         if(!hideNextLv)
  2744.                 this.drawText(expNext, x, y, nextLvWidth);
  2745.        
  2746.         if(JahwsUF.StatusMenuCore.Param.XpDisplayOnlyRemaining)
  2747.                 this.drawExpRemaining(value3, x, y, width - expLabelWidth - spaceWidth, this.xpColor(actor));
  2748.         else
  2749.                 this.drawExpCurrentAndMax(value1, value2, x, y, width - expLabelWidth - spaceWidth,
  2750.                            this.xpColor(actor), this.normalColor());
  2751. };

  2752. Window_Base.prototype.drawExpRemaining = function(current, x, y, width, color) {
  2753.     this.changeTextColor(color);
  2754.     this.drawText(current, x, y, width, 'right');
  2755. };

  2756. Window_Base.prototype.drawExpCurrentAndMax = function(current, max, x, y,
  2757.                                                    width, color1, color2) {
  2758.     var labelWidth = this.textWidth('EXP');       
  2759.     var valueWidth = Math.max(this.textWidth('0000'), this.textWidth(max));  // Expands for more digits when necessary.
  2760.     var slashWidth = this.textWidth('/');
  2761.     var x1 = x + width - valueWidth;
  2762.     var x2 = x1 - slashWidth;
  2763.     var x3 = x2 - valueWidth;

  2764.         var fontSizeChange = 0;
  2765.        
  2766.         //Dynamic resizing if things get too cramped for the values.
  2767.         while(x3 < x + labelWidth)
  2768.         {
  2769.                 fontSizeChange += 4;
  2770.                 this.contents.fontSize -= 4;
  2771.                
  2772.                 valueWidth = Math.max(this.textWidth('0000'), this.textWidth(max));
  2773.                 slashWidth = this.textWidth('/');
  2774.                 x1 = x + width - valueWidth;
  2775.                 x2 = x1 - slashWidth;
  2776.                 x3 = x2 - valueWidth;
  2777.         }
  2778.        
  2779.     this.changeTextColor(color1);
  2780.     this.drawText(current, x3, y, valueWidth, 'right');
  2781.     this.changeTextColor(color2);
  2782.     this.drawText('/', x2, y, slashWidth, 'right');
  2783.     this.drawText(max, x1, y, valueWidth, 'right');
  2784.        
  2785.         this.contents.fontSize += fontSizeChange;
  2786. };



  2787. //-----------------------------------------------------------------------------
  2788. // Scene_Status
  2789. //
  2790. // The scene class of the status screen.  Based upon the original status screen,
  2791. // completely replacing it.

  2792. function Scene_Status() {
  2793.     this.initialize.apply(this, arguments);
  2794. }

  2795. Scene_Status.prototype = Object.create(Scene_MenuBase.prototype);
  2796. Scene_Status.prototype.constructor = Scene_Status;

  2797. Scene_Status.prototype.initialize = function() {
  2798.     Scene_MenuBase.prototype.initialize.call(this);
  2799. };

  2800. Scene_Status.prototype.create = function() {
  2801.     Scene_MenuBase.prototype.create.call(this);
  2802.        
  2803.         // Create the various status subwindows, pass them off to the pageMenuWindow.
  2804.         // It'll control which of them shows at any given point.
  2805.        
  2806.         // These two arrays track all needed data.
  2807.         // I'd use a Map, but apparently they're not supported well on mobile devices.  :(
  2808.         this._pageNames = [];
  2809.         this._pageWindows = [];
  2810.        
  2811.         // Each page is actually a window.
  2812.         // Now that we've got this structure in place, this could be parameterized on a plugin level!
  2813.        
  2814.         var paramPageId = 0;
  2815.        
  2816.         for(var i = 0; i < JahwsUF.StatusMenuCore.Param.TotalPages; i++)
  2817.         {
  2818.                 var window = JahwsUF.StatusMenuCore.Param.PageWindows[i];
  2819.                
  2820.                 var constructEval = "new " + window;
  2821.                
  2822.                 if(window == "JAH_Window_Status_Params")
  2823.                 {
  2824.                         constructEval = constructEval + "(" + paramPageId + ")";
  2825.                        
  2826.                         if(JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId] === undefined)
  2827.                                 throw "Parameter page ID " + paramPageId + " has no specification - cannot create!";
  2828.                        
  2829.                         paramPageId++;
  2830.                 }
  2831.                 else if(window == "JAH_Window_Status_Resistances")  // For backward compatibility.
  2832.                 {
  2833.                         window = "JAH_Window_Elemental_Resistances";
  2834.                         constructEval = "new " + window;
  2835.                 }
  2836.                 else constructEval = constructEval + "()";
  2837.                
  2838.                 //JAH_Window_Status_Params
  2839.                
  2840.                 var page = eval(constructEval);
  2841.                 this.addWindow(page);
  2842.                
  2843.                 if(i != 0) page.hide(); // Page 0 shows by default.
  2844.                
  2845.                 this._pageNames.push(JahwsUF.StatusMenuCore.Param.PageNames[i]);
  2846.                 this._pageWindows.push(page);
  2847.         }
  2848.        
  2849.         // Now to initialize the core control window.
  2850.         this._statusWindow = new JAH_Window_Status_PageSelect(this._pageNames, this._pageWindows);
  2851.         this._statusWindow.setHandler('cancel',   this.popScene.bind(this));
  2852.     this._statusWindow.setHandler('pagedown', this.nextActor.bind(this));
  2853.     this._statusWindow.setHandler('pageup',   this.previousActor.bind(this));
  2854.         this.addWindow(this._statusWindow);
  2855.        
  2856.         if(JahwsUF.StatusMenuCore.Param.TotalPages == 1)
  2857.         {
  2858.                 // Hide the status submenu, reclaim its space for the lone window.
  2859.                 // The submenu still exists and is active for input commands.
  2860.                 this._statusWindow.hide();
  2861.                
  2862.                 var page = this._pageWindows[0];
  2863.                
  2864.                 // Forced resizing of the window.
  2865.                 // The drawing contents are unfortunately not replaced on a resize,
  2866.                 // so I force the resize in the second line below.
  2867.                 page.move(0, 0, Graphics.boxWidth, Graphics.boxHeight);
  2868.                 page.contents = new Bitmap(Graphics.boxWidth, Graphics.boxHeight);
  2869.         }
  2870.        
  2871.     this.refreshActor();
  2872. };

  2873. Scene_Status.prototype.refreshActor = function() {
  2874.     var actor = this.actor();
  2875.        
  2876.         for (var page of this._pageWindows) {
  2877.                 page.setActor(actor);
  2878.                 page.refresh();
  2879.         }
  2880. };

  2881. Scene_Status.prototype.onActorChange = function() {
  2882.         Scene_MenuBase.prototype.onActorChange.call(this);
  2883.        
  2884.         for(var page of this._pageWindows)
  2885.         {
  2886.                 page.setActor(this.actor());
  2887.         }
  2888.        
  2889.         this._statusWindow.activate();  // By default, the system will DEACTIVATE this window on page up or page down.
  2890. }



  2891. //-----------------------------------------------------------------------------
  2892. // JAH_Window_Status_PageSelect
  2893. //
  2894. // The Status menu window - allows selection of the Status page to be viewed.
  2895. //
  2896. // In case it's not otherwise clear within the code, it is THIS WINDOW that
  2897. // actually receives all the input commands, not the displayed Status window page.
  2898. //
  2899. // It forwards the resulting instructions to the other windows as appropriate.

  2900. function JAH_Window_Status_PageSelect() {
  2901.         this.initialize.apply(this, arguments);
  2902. }

  2903. JAH_Window_Status_PageSelect.prototype = Object.create(Window_HorzCommand.prototype);
  2904. JAH_Window_Status_PageSelect.prototype.constructor = JAH_Window_Status_PageSelect;

  2905. JAH_Window_Status_PageSelect.prototype.initialize = function(pageNames, pageWindows) {

  2906.         this._pageNames = pageNames;
  2907.         this._pageWindows = pageWindows;

  2908.     Window_HorzCommand.prototype.initialize.call(this, 0, 0);
  2909.         this.activate();
  2910.        
  2911.         this._activePage = this.currentSymbol();  // Tracks the previously-open window.
  2912. };

  2913. JAH_Window_Status_PageSelect.prototype.windowWidth = function() {
  2914.     return Graphics.boxWidth;
  2915. };

  2916. JAH_Window_Status_PageSelect.prototype.maxCols = function() {
  2917.     return this._pageNames.length;
  2918. };

  2919. JAH_Window_Status_PageSelect.prototype.update = function() {

  2920.     Window_HorzCommand.prototype.update.call(this);
  2921.        
  2922.         // Each "page" is actually a window.  We need to hide the old page and show the new one
  2923.         // upon any change in selected Status page option.
  2924.         this._activePage.hide();
  2925.         this._activePage = this.currentSymbol();
  2926.         this._activePage.show();
  2927.        
  2928. };

  2929. // Extended with wiring + linking for compatibility with other plugins, should they have
  2930. // a need to manually refresh the status windows.
  2931. JAH_Window_Status_PageSelect.prototype.refresh = function() {

  2932.         Window_HorzCommand.prototype.refresh.call(this);
  2933.        
  2934.         if(this._pageWindows)
  2935.         {
  2936.                 for(var i=0; i < this._pageWindows.length; i++)
  2937.                 {
  2938.                         this._pageWindows[i].refresh();
  2939.                 }
  2940.         }       
  2941. };

  2942. JAH_Window_Status_PageSelect.prototype.makeCommandList = function() {

  2943.         // Dynamically constructs the menu given the setup command text and pre-made windows
  2944.         // from Scene_Status.
  2945.        
  2946.         for(var i=0; i < this._pageNames.length; i++)
  2947.         {
  2948.                 this.addCommand(this._pageNames[i], this._pageWindows[i]);
  2949.         }
  2950. };

  2951. JAH_Window_Status_PageSelect.prototype.setPageWindow = function(pageWindow) {
  2952.     this._pageWindow = pageWindow;
  2953.     this.update();
  2954. };

  2955. JAH_Window_Status_PageSelect.prototype.isOkEnabled = function() {
  2956.     return false;
  2957. };
  2958.        
  2959. JAH_Window_Status_PageSelect.prototype.cursorUp = function(wrap) {

  2960.         Window_Selectable.prototype.cursorUp.call(this, wrap);

  2961.         for(var i = 0; i < JahwsUF.StatusMenuCore.Param.ScrollFactor; i++)
  2962.                 this._activePage.scrollUp();
  2963. }

  2964. JAH_Window_Status_PageSelect.prototype.cursorDown = function(wrap) {

  2965.         Window_Selectable.prototype.cursorDown.call(this, wrap);

  2966.         for(var i = 0; i < JahwsUF.StatusMenuCore.Param.ScrollFactor; i++)
  2967.                 this._activePage.scrollDown();
  2968. }



  2969. //-----------------------------------------------------------------------------
  2970. // JAH_Window_Status_Base
  2971. //
  2972. // Implements standard functionality needed for all Status pages.

  2973. function JAH_Window_Status_Base() {
  2974.         this.initialize.apply(this, arguments);
  2975. }

  2976. JAH_Window_Status_Base.prototype = Object.create(Window_Selectable.prototype);
  2977. JAH_Window_Status_Base.prototype.constructor = JAH_Window_Status_Base;

  2978. // the this.redraw variable is an experimental variable - if the windows are redrawn too often, it could help reduce the unnecessary redraws?

  2979. JAH_Window_Status_Base.prototype.initialize = function() {

  2980.         var lineHeight = this.lineHeight();
  2981.     var width = Graphics.boxWidth;
  2982.         //this.redraw = true;
  2983.        
  2984.         //  It turns out that lineHeight * 2 is exactly the space taken up by the Status page selection menu.
  2985.     var height = Graphics.boxHeight - lineHeight * 2;
  2986.     Window_Selectable.prototype.initialize.call(this, 0, lineHeight*2, width, height);
  2987.     this.refresh();
  2988. };

  2989. JAH_Window_Status_Base.prototype.scrollDown = function() {
  2990.         //this.redraw = true;
  2991.         Window_Selectable.prototype.scrollDown.call(this);
  2992. }

  2993. JAH_Window_Status_Base.prototype.scrollUp = function() {
  2994.         //this.redraw = true;
  2995.         Window_Selectable.prototype.scrollUp.call(this);
  2996. }

  2997. JAH_Window_Status_Base.prototype.setActor = function(actor) {
  2998.     if (this._actor !== actor) {
  2999.         this._actor = actor;
  3000.                 //this.redraw = true;
  3001.                
  3002.                 this.resetScroll(); // Always reset scrolling when changing Actor.
  3003.         this.refresh();
  3004.     }
  3005. };

  3006. JAH_Window_Status_Base.prototype.refresh = function() {
  3007.    
  3008.         //if(this.redraw == false) return;
  3009.         //redraw = false;
  3010.        
  3011.         this.contents.clear();
  3012.        
  3013.     if (this._actor) {
  3014.        
  3015.         var lineHeight = this.lineHeight();
  3016.                
  3017.                 var lineIndex = 0;

  3018.                 if(JahwsUF.StatusMenuCore.Param.HeaderScrolling == true)
  3019.                         lineIndex -= this.topIndex();  // What is our scroll position?  We've gotta make adjustments based on this.
  3020.                        
  3021.                 // I like to think as the scroll position as the number of lines from the top we must remove.
  3022.                 // We have to "print negative lines" to even our balance before we print actual lines.
  3023.                 // It's probably quirky, but that line of reasoning helped me out.  That's why "lineIndex" is always <= 0 here.
  3024.                        
  3025.         var headerSize = this.drawHeaderBlock(lineHeight * 0, lineIndex);
  3026.                
  3027.                 var y = headerSize >= 0 ? headerSize : 0;     // Is our "print marker" off the top of the page (still offscreen) or not?
  3028.                 lineIndex = headerSize < 0 ? headerSize : 0;
  3029.                
  3030.                 if(JahwsUF.StatusMenuCore.Param.HeaderScrolling == true)
  3031.                         this.drawPageBlock(lineHeight * y, lineIndex);
  3032.                 else this.drawPageBlock(lineHeight * y, -this.topIndex());  // If our header is fixed-position, then the page block must absorb all scrolling req'ts.
  3033.     }
  3034. };

  3035. // Override this in derived pages/windows for their particular contents.
  3036. JAH_Window_Status_Base.prototype.drawPageBlock = function(y, lineIndex) {
  3037. }

  3038. JAH_Window_Status_Base.prototype.availableWidth = function(portraitMode) {
  3039.         if(portraitMode || this.isPortraitMode())
  3040.         {
  3041.                 var portraitInfo = this.getActorPortraitInfo();
  3042.                 var portrait = ImageManager.loadPicture(portraitInfo.Portrait);
  3043.                 var scale = portraitInfo.Scale;
  3044.                 var xOffset = portraitInfo.Offset[0];
  3045.                 var adjust = portraitInfo.BorderAdjustment;
  3046.                
  3047.                 return this.contentsWidth() - Math.floor(portrait.width * scale) - JahwsUF.StatusMenuCore.Param.ImgBuffer + xOffset + adjust;
  3048.         }
  3049.         else return this.contentsWidth();
  3050. }

  3051. JAH_Window_Status_Base.prototype.getActorPortraitInfo = function() {
  3052.        
  3053.         var switchedPortraitList = JahwsUF.StatusMenuCore.Param.Portraits[this._actor._actorId];
  3054.        
  3055.         // Index 0 is the default portrait instead.
  3056.        
  3057.         for(var i = 1; i < switchedPortraitList.length; i++)
  3058.         {
  3059.                 if($gameSwitches.value(switchedPortraitList[i].Switch))
  3060.                         return switchedPortraitList[i];
  3061.         }
  3062.        
  3063.         return JahwsUF.StatusMenuCore.Param.Portraits[this._actor._actorId][0];
  3064. };

  3065. JAH_Window_Status_Base.prototype.drawHeaderBlock = function(y, lineIndex) {

  3066.         if(this.isPortraitMode())
  3067.         {
  3068.                 return this.drawPortraitHeader(y, lineIndex);
  3069.         }
  3070.         else
  3071.         {
  3072.                 return this.drawVanillaHeader(y, lineIndex);
  3073.         }
  3074. };

  3075. JAH_Window_Status_Base.prototype.drawPortraitHeader = function(y, lineIndex)
  3076. {
  3077.         // Top-left of header:  name + nickname.
  3078.         var lineHeight = this.lineHeight();
  3079.        
  3080.         if(lineIndex == 0)
  3081.         {
  3082.                 this.drawActorName(this._actor, this.standardPadding(), y);
  3083.                
  3084.                 var x = this.textWidth(this._actor.name());
  3085.                 var nickname = this._actor.nickname();
  3086.                
  3087.                 if(nickname == undefined);
  3088.                         nickname = "";
  3089.                        
  3090.                 if(nickname.trim() != "")
  3091.                 {
  3092.                         nickname = JahwsUF.StatusMenuCore.Param.NicknameFormat.format(nickname);               
  3093.                         this.drawText(nickname, x + this.standardPadding(), y, this.textWidth(nickname));
  3094.                 }
  3095.                
  3096.                 // Top-right of header: lv + class.
  3097.                 this.changeTextColor(this.systemColor());       
  3098.                 var classText = " " + this._actor.currentClass().name;
  3099.                 var classWidth = this.textWidth(classText);
  3100.                 this.drawText(classText, this.contentsWidth() - classWidth, y, classWidth);
  3101.                
  3102.                 if(JahwsUF.StatusMenuCore.Param.LvHidden != true)
  3103.                 {
  3104.                         var topRightWidth = classWidth;
  3105.                         var levelValueWidth = this.textWidth(" ") + this.textWidth(this._actor.level);
  3106.                         topRightWidth += levelValueWidth;
  3107.                         this.drawText(this._actor.level, this.contentsWidth() - topRightWidth, y, levelValueWidth, 'right');
  3108.                        
  3109.                         var levelTextWidth = this.textWidth(TextManager.level);
  3110.                         topRightWidth += levelTextWidth;

  3111.                         this.drawText(TextManager.level, this.contentsWidth() - topRightWidth, y, levelTextWidth);
  3112.                 }
  3113.                 this.resetTextColor();
  3114.         }
  3115.        
  3116.         // Other left-side header lines:
  3117.         this.drawActorIcons(this._actor, this.standardPadding(), y + lineHeight * (1 + lineIndex));
  3118.        
  3119.         var xpBarWidth = Math.max(Math.floor(this.contentsWidth() / (2 * 1.61803398875)) - this.standardPadding(), 320);  // 1.618... = golden ratio, hence its use.
  3120.        
  3121.         if(JahwsUF.StatusMenuCore.Param.XpHidden != true)
  3122.         {
  3123.                 this.drawActorXp(this._actor, this.standardPadding(), y + lineHeight * (2 + lineIndex), xpBarWidth);
  3124.                 this.drawHorzLine(y + lineHeight * (3 + lineIndex));
  3125.         }
  3126.         else
  3127.         {
  3128.                 this.drawHorzLine(y + lineHeight * (2 + lineIndex));
  3129.         }
  3130.        
  3131.         // Bottom-left of page - auto-display the character's portrait.
  3132.         var portraitInfo = this.getActorPortraitInfo();
  3133.         var portrait = ImageManager.loadPicture(portraitInfo.Portrait);
  3134.         var scale = portraitInfo.Scale;

  3135.         //Bitmap object is specified in rpg_core.js.  You can check the specs there.
  3136.         //Profile image first in case anyone wants to get fancy and put text on top of it for some crazy reason.
  3137.        
  3138.         var offsets = portraitInfo.Offset;
  3139.        
  3140.         this.contents.blt(portrait, 0, 0, portrait.width, portrait.height,  // Image, top-left (x,y) from source image, source width + height to use
  3141.         this.contentsWidth() - Math.floor(portrait.width * scale) + offsets[0], this.contentsHeight() - Math.floor(portrait.height * scale) + offsets[1], // destination (x, y) to use.  Of note - anything past contentsWidth() + contentsHeight() is auto-clipped!
  3142.         Math.floor(portrait.width * scale), Math.floor(portrait.height * scale)); // destination width, height - can be used to scale!
  3143.        
  3144.         if(JahwsUF.StatusMenuCore.Param.XpHidden == true)
  3145.                 return 3 + lineIndex;
  3146.         else
  3147.                 return 4 + lineIndex;  // Number of lines drawn.  Includes horizontal line.
  3148. }

  3149. JAH_Window_Status_Base.prototype.drawVanillaHeader = function(y, lineIndex)
  3150. {
  3151.         var lineHeight = this.lineHeight();

  3152.         var offset = 0;
  3153.        
  3154.         var dropLine = JahwsUF.StatusMenuCore.Param.LvHidden && JahwsUF.StatusMenuCore.Param.XpHidden;

  3155.         if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true && !dropLine)
  3156.                 offset = Math.ceil(lineHeight / 2);
  3157.        
  3158.         this.drawActorFace(this._actor, this.standardPadding(), y + lineIndex * lineHeight + offset);
  3159.        
  3160.         // drawBasicInfo and drawGauges are artifacts left over from the original RPG Maker MX
  3161.         // Status window.  I've restructured them to be sure, but I never got around to actually
  3162.         // removing them as separate functions.
  3163.        
  3164.         var w = Math.max(367, 204 + this.width * 0.45);
  3165.         this.drawBasicInfo(204, y, w, lineIndex);
  3166.        
  3167.         var gaugeX = Math.max(571, w);
  3168.         this.drawGauges(gaugeX, y, this.contentsWidth() - gaugeX - this.standardPadding(), lineIndex);
  3169.        
  3170.         var dropLine = JahwsUF.StatusMenuCore.Param.LvHidden && JahwsUF.StatusMenuCore.Param.XpHidden;
  3171.                
  3172.         if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true)
  3173.         {
  3174.                 this.drawHorzLine(lineHeight * (5 + lineIndex - (dropLine ? 1 : 0)) + y);

  3175.                 return 6 + lineIndex - (dropLine ? 1 : 0);
  3176.         }
  3177.         else
  3178.         {
  3179.                 // The standard Actor images need 4 lines for display.  Leave them enough space.
  3180.                
  3181.                 this.drawHorzLine(lineHeight * (4 + lineIndex) + y);

  3182.                 return 5 + lineIndex;  // Number of lines drawn.  Includes horizontal line.
  3183.         }
  3184. }

  3185. JAH_Window_Status_Base.prototype.getHeaderLineCount = function(portraitMode) {
  3186.        
  3187.         if(portraitMode || this.isPortraitMode())
  3188.         {
  3189.                 if(JahwsUF.StatusMenuCore.Param.XpHidden == true)
  3190.                         return 3;
  3191.                 else
  3192.                         return 4;
  3193.         }
  3194.         else
  3195.         {
  3196.                 var dropLine = JahwsUF.StatusMenuCore.Param.LvHidden && JahwsUF.StatusMenuCore.Param.XpHidden;
  3197.                
  3198.                 if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true)
  3199.                         return 6 - (dropLine ? 1 : 0);
  3200.                 else return 5; // Minimum amount of space b/c of Actor image.
  3201.         }
  3202. }

  3203. JAH_Window_Status_Base.prototype.getVisibleHeaderLineCount = function(portraitMode) {
  3204.         return this.getHeaderLineCount() - this.topIndex();
  3205. }

  3206. JAH_Window_Status_Base.prototype.getLineCount = function(portraitMode) {
  3207.         return this.getHeaderLineCount();
  3208. }

  3209. JAH_Window_Status_Base.prototype.maxItems = function() {
  3210.         if(this._actor == undefined)
  3211.                 return 1;
  3212.         else return this.getLineCount();
  3213. }

  3214. JAH_Window_Status_Base.prototype.hasAvailablePortrait = function() {
  3215.         return this.getActorPortraitInfo().Portrait != undefined;
  3216. }

  3217. if(JahwsUF.StatusMenuCore.Param.DefaultPortrait)
  3218. {
  3219.         JAH_Window_Status_Base.prototype.isPortraitMode = function() {
  3220.         return this.hasAvailablePortrait();
  3221.         };
  3222. }
  3223. else
  3224. {
  3225.         JAH_Window_Status_Base.prototype.isPortraitMode = function() {
  3226.         return false;
  3227.         };
  3228. }

  3229. JAH_Window_Status_Base.prototype.drawHorzLine = function(y, width) {

  3230.         if(width == undefined)
  3231.                 width = this.contentsWidth();

  3232.     var lineY = y + this.lineHeight() / 2 - 1;
  3233.     this.contents.paintOpacity = 48;
  3234.     this.contents.fillRect(0, lineY, width, 2, this.lineColor());
  3235.     this.contents.paintOpacity = 255;
  3236. };

  3237. JAH_Window_Status_Base.prototype.lineColor = function() {
  3238.     return this.normalColor();
  3239. };

  3240. // Actor picture, name, nickname, level, etc.
  3241. JAH_Window_Status_Base.prototype.drawBasicInfo = function(x, y, width, lineIndex) {

  3242.     var lineHeight = this.lineHeight();
  3243.        
  3244.         if(JahwsUF.StatusMenuCore.Param.NicknameInHeaders)
  3245.         {
  3246.                 var nameWidth = this.textWidth(this._actor.name());
  3247.                
  3248.                 if(this._actor.nickname() != undefined && this._actor.nickname() != "")
  3249.                 {
  3250.                         var nickname = this._actor.nickname();
  3251.                        
  3252.                         nickname = JahwsUF.StatusMenuCore.Param.NicknameFormat.format(nickname);
  3253.                                
  3254.                         this.drawText(nickname, x + nameWidth, y + lineHeight * lineIndex, width - nameWidth - this.standardPadding());
  3255.                 }
  3256.         }
  3257.         this.drawActorName    (this._actor, x      , y + lineHeight * (0 + lineIndex));

  3258.         this.drawActorClass   (this._actor, x      , y + lineHeight * (1 + lineIndex));
  3259.     this.drawActorIcons   (this._actor, x      , y + lineHeight * (2 + lineIndex));
  3260.        
  3261.         if(JahwsUF.StatusMenuCore.Param.LvHidden != true)
  3262.         {
  3263.                 if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true)
  3264.                          this.drawActorLevel   (this._actor, x      , y + lineHeight * (4 + lineIndex));
  3265.                 else this.drawActorLevel   (this._actor, x      , y + lineHeight * (3 + lineIndex));
  3266.         }
  3267. };

  3268. // All of the gauges.  All of them.
  3269. JAH_Window_Status_Base.prototype.drawGauges = function(x, y, width, lineIndex) {
  3270.     var lineHeight = this.lineHeight();

  3271.     this.changeTextColor(this.systemColor());

  3272.         this.drawActorHp(this._actor, x, y + lineHeight * (0 + lineIndex), width);
  3273.     this.drawActorMp(this._actor, x, y + lineHeight * (1 + lineIndex), width);
  3274.        
  3275.         if(JahwsUF.StatusMenuCore.Param.TpGauge)
  3276.                 this.drawActorTp(this._actor, x, y + lineHeight * (2 + lineIndex), width);
  3277.                
  3278.        
  3279.         var xpBarWidth = Math.max(width, 320);  // Make sure the bar gets plenty of room.
  3280.         if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true && JahwsUF.StatusMenuCore.Param.XpHidden != true)
  3281.                 this.drawActorXp(this._actor, x + width - xpBarWidth, y + lineHeight * (4 + lineIndex), xpBarWidth);
  3282.         else if(JahwsUF.StatusMenuCore.Param.XpHidden != true)
  3283.                 this.drawActorXp(this._actor, x + width - xpBarWidth, y + lineHeight * (3 + lineIndex), xpBarWidth);
  3284. };


  3285. //-----------------------------------------------------------------------------
  3286. // JAH_Window_Status_Params
  3287. //
  3288. // Implements a Status page that displays a single Actor's parameters.

  3289. function JAH_Window_Status_Params() {
  3290.         this.initialize.apply(this, arguments);
  3291. }

  3292. JAH_Window_Status_Params.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3293. JAH_Window_Status_Params.prototype.constructor = JAH_Window_Status_Params;

  3294. JAH_Window_Status_Params.prototype.initialize = function(pageId, pageParam) {
  3295.     JAH_Window_Status_Base.prototype.initialize.call(this);
  3296.        
  3297.         if(!pageId) pageId = 0;
  3298.        
  3299.         // After the constructor, this field is only used for error messages.
  3300.         this.pageId = pageId;
  3301.        
  3302.         if(!pageParam)
  3303.                 this._pageParameterization = JahwsUF.StatusMenuCore.Param.ParamPages[pageId];
  3304.         else this._pageParameterization = pageParam;
  3305. };

  3306. // The Param page's master display method.  Does quite a fair bit of work.
  3307. JAH_Window_Status_Params.prototype.drawPageBlock = function(y, lineIndex) {

  3308.     var lineHeight = this.lineHeight();
  3309.        
  3310.         var paramColumnsRequested = this._pageParameterization.Columns.length;
  3311.        
  3312.         // --------------------------- STEP 1 --------------------------------
  3313.         // Analyze the amount of available horizontal space - can we show equipment?
  3314.        
  3315.         var requestedColumnSpacing = this._pageParameterization.RequiredColumnWidth + 2 * paramColumnsRequested * this.standardPadding();
  3316.         var availableWidth = this.availableWidth();  // Account for window margins + visual whitespace.
  3317.        
  3318.         var displayEquips = false;
  3319.        
  3320.         var totalRequiredWidthWithEquips = requestedColumnSpacing + this._pageParameterization.EquipColumnWidth + 2 * this.standardPadding();
  3321.        
  3322.         if(totalRequiredWidthWithEquips < availableWidth && eval(this._pageParameterization.DisplayEquips) == true)
  3323.         {
  3324.                 displayEquips = true;
  3325.         }
  3326.         else if(eval(this._pageParameterization.DisplayEquips) == true)
  3327.         {
  3328.                 console.log("Insufficient space to display the equipment listing on this Status window parameter page!  Page id = " + this.pageId);
  3329.         }
  3330.        
  3331.         // --------------------------- STEP 2 --------------------------------
  3332.         // Precompute all relevant column spacing data.
  3333.        
  3334.         // How much padding should be used when the given number of columns are in use?
  3335.         var EvenPaddings = [];
  3336.        
  3337.         // ColumnXCoords[totalcols][curCol];  // when there are a total of totalcols in use, curCol's x value is given here.
  3338.         var ColumnXCoords = [];
  3339.        
  3340.         for(var i = paramColumnsRequested; i >= 1; i--)
  3341.         {
  3342.                 var neededWidth = 0;
  3343.                
  3344.                 for(var j=0; j < i; j++)
  3345.                 {
  3346.                         neededWidth += this._pageParameterization.Columns[j].TextWidth + this._pageParameterization.Columns[j].ValueWidth;
  3347.                 }
  3348.                 neededWidth += 2 * i * this.standardPadding();
  3349.                 var availWidth = availableWidth;
  3350.                 var totalActivatedColumns = i;
  3351.                                
  3352.                 if(displayEquips && i == paramColumnsRequested)
  3353.                 {
  3354.                         neededWidth += 2 * this.standardPadding() + this._pageParameterization.EquipColumnWidth;
  3355.                         totalActivatedColumns += 1;
  3356.                 }
  3357.                 else if(displayEquips)
  3358.                 {
  3359.                         availWidth -= 2 * EvenPaddings[paramColumnsRequested] + this._pageParameterization.EquipColumnWidth;
  3360.                 }
  3361.                
  3362.                 // Determine the actual spacings to be utilized.
  3363.                 // We included the base this.standardPadding() amount in the req'd width... be sure to add it back!
  3364.                 EvenPaddings[i] = (availWidth - neededWidth) / (2 * totalActivatedColumns) + this.standardPadding();
  3365.                
  3366.                 // Determine the x-coords to be used for everything to be displayed.
  3367.                 ColumnXCoords[i] = [];               
  3368.                 ColumnXCoords[i][0] = EvenPaddings[i];  //Base position of first column.
  3369.                
  3370.                 for(var c = 1; c <= i; c++)
  3371.                 {
  3372.                         ColumnXCoords[i][c] = ColumnXCoords[i][c-1] + this._pageParameterization.Columns[c - 1].TextWidth + this._pageParameterization.Columns[c - 1].ValueWidth + 2 * EvenPaddings[i];
  3373.                 }
  3374.         }       
  3375.        
  3376.         // --------------------------- STEP 3 --------------------------------
  3377.         // Actually DRAW all the things.
  3378.                
  3379.         // Aethestics calculations now complete.  Time to actually display ALL the things!
  3380.     for (var column = 0; column < this._pageParameterization.Columns.length; column++) {
  3381.                
  3382.                 var y2 = y;
  3383.                 var l2 = lineIndex;
  3384.                
  3385.                 for (var row = 0; row < this._pageParameterization.Columns[column].Entries.length; row++) {
  3386.                
  3387.                         // Positioning of the entry.  
  3388.                         var x = ColumnXCoords[paramColumnsRequested][column];
  3389.                         var evenPaddingAmount = EvenPaddings[paramColumnsRequested];
  3390.                
  3391.                         if(this._pageParameterization.RebalanceColumns)
  3392.                         {
  3393.                                 // If this row HAS entries.  Some rows may be left blank intentionally,
  3394.                                 // in which case nothing will even be printed.
  3395.                                 if(this._pageParameterization.ColWidths[row])
  3396.                                 {
  3397.                                         x = ColumnXCoords[this._pageParameterization.ColWidths[row]][column];
  3398.                                         evenPaddingAmount = EvenPaddings[this._pageParameterization.ColWidths[row]];
  3399.                                 }
  3400.                                
  3401.                                 // Determine the true column - what if there's a blank in a column to our left?
  3402.                                 for(var c2 = 0; c2 < column; c2++)
  3403.                                 {
  3404.                                         if(!this._pageParameterization.Columns[c2].Entries[row])
  3405.                                                 // Erase the blank entry from existence, reclaiming its space.
  3406.                                                 x -= this._pageParameterization.Columns[c2].TextWidth + this._pageParameterization.Columns[c2].ValueWidth + 2 * EvenPaddings[paramColumnsRequested];
  3407.                                 }
  3408.                         }
  3409.                
  3410.                         var paramEntry = this._pageParameterization.Columns[column].Entries[row];
  3411.                        
  3412.                         if(!(paramEntry == undefined))
  3413.                         {
  3414.                                 if(l2 >= 0)
  3415.                                 {
  3416.                                         paramEntry.draw(this, x, y2, 2 * evenPaddingAmount);
  3417.                                 }
  3418.                         }
  3419.                        
  3420.                         l2 += 1;

  3421.                         if(l2 > 0)
  3422.                                 y2 += lineHeight;

  3423.                 }
  3424.     }
  3425.        
  3426.         if(displayEquips)
  3427.                 this.drawEquipments(ColumnXCoords[paramColumnsRequested][paramColumnsRequested], y + lineHeight * lineIndex);
  3428. };

  3429. JAH_Window_Status_Params.prototype.getLineCount = function(portraitMode) {
  3430.        
  3431.         var maxCol = 0;
  3432.        
  3433.         for(var i = 0; i < this._pageParameterization.Columns.length; i++)
  3434.         {
  3435.                 if(maxCol < this._pageParameterization.Columns[i].Entries.length)
  3436.                         maxCol = this._pageParameterization.Columns[i].Entries.length;
  3437.         }
  3438.        
  3439.         return maxCol + this.getHeaderLineCount();
  3440. }

  3441. JAH_Window_Status_Params.prototype.drawEquipments = function(x, y) {
  3442.     var equips = this._actor.equips();
  3443.     var count = equips.length;
  3444.     for (var i = 0; i < count; i++) {
  3445.         this.drawItemName(equips[i], x, y + this.lineHeight() * i);
  3446.     }
  3447. };

  3448. //-----------------------------------------------------------------------------
  3449. // JAH_Window_Elemental_Resistances
  3450. //
  3451. // Implements a Status page that displays a single Actor's ELEMENTAL resistance data.
  3452. // I'd love to change the name to something more fitting, but it'd break a few things.

  3453. function JAH_Window_Elemental_Resistances() {
  3454.         this.initialize.apply(this, arguments);
  3455. }

  3456. //JAH_Window_Elemental_Resistances.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3457. JAH_Window_Elemental_Resistances.prototype = Object.create(JAH_Window_Status_Params.prototype);
  3458. JAH_Window_Elemental_Resistances.prototype.constructor = JAH_Window_Elemental_Resistances;

  3459. JAH_Window_Elemental_Resistances.prototype.initialize = function() {
  3460.     //JAH_Window_Status_Base.prototype.initialize.call(this);
  3461.         JAH_Window_Status_Params.prototype.initialize.call(this, "Elemental Resistances", JahwsUF.StatusMenuCore.Param.ResistPages.Elements);
  3462. };


  3463. //-----------------------------------------------------------------------------
  3464. // JAH_Window_State_Resistances
  3465. //
  3466. // Implements a Status page that displays a single Actor's state resistance data.

  3467. function JAH_Window_State_Resistances() {
  3468.         this.initialize.apply(this, arguments);
  3469. }

  3470. //JAH_Window_State_Resistances.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3471. JAH_Window_State_Resistances.prototype = Object.create(JAH_Window_Status_Params.prototype);
  3472. JAH_Window_State_Resistances.prototype.constructor = JAH_Window_State_Resistances;

  3473. JAH_Window_State_Resistances.prototype.initialize = function() {
  3474.     //JAH_Window_Status_Base.prototype.initialize.call(this);
  3475.         JAH_Window_Status_Params.prototype.initialize.call(this, "State Resistances", JahwsUF.StatusMenuCore.Param.ResistPages.States);
  3476. };


  3477. //-----------------------------------------------------------------------------
  3478. // JAH_Window_Profile_Texter
  3479. //
  3480. // A hidden window utilized by the Profile page in order to do profile text operations.
  3481. // Facilitates escape codes, aids compatibility with word-wrapping plugins.
  3482. //
  3483. // Quite useful in enforcing an absolute margin on text to be displayed in the Profile
  3484. // window.
  3485. //
  3486. // This window is NEVER displayed; its contents are copied into the Profile window for
  3487. // display via the blt function.
  3488. //

  3489. function JAH_Window_Profile_Texter() {
  3490.         this.initialize.apply(this, arguments);
  3491. }

  3492. JAH_Window_Profile_Texter.prototype = Object.create(Window_Base.prototype);
  3493. JAH_Window_Profile_Texter.prototype.constructor = JAH_Window_Profile_Texter;

  3494. JAH_Window_Profile_Texter.prototype.initialize = function(cWidth, cHeight) {
  3495.         Window_Base.prototype.initialize.call(this, 0, 0, cWidth + 2 * this.standardPadding(),
  3496.                                                           cHeight + 2 * this.standardPadding());
  3497.        
  3498.         this.hide();
  3499. }

  3500. // Duplicate these methods from the base class.  It's actually safe, 'cause Javascript logic.
  3501. JAH_Window_Profile_Texter.prototype.drawHorzLine = JAH_Window_Status_Base.prototype.drawHorzLine;
  3502. JAH_Window_Profile_Texter.prototype.lineColor = JAH_Window_Status_Base.prototype.lineColor;

  3503. JAH_Window_Profile_Texter.prototype.convertEscapeCharacters = function(text) {

  3504.         text = Window_Base.prototype.convertEscapeCharacters.call(this, text);
  3505.        
  3506.         // Our custom conversion comes after the others; they eliminate '\n's.
  3507.         text = text.replace(/<hr>/g, '\x1bhr');
  3508.        
  3509.         return text;
  3510. }

  3511. JAH_Window_Profile_Texter.prototype.processEscapeCharacter = function(code, textState) {
  3512.         Window_Base.prototype.processEscapeCharacter.call(this, code, textState)
  3513.        
  3514.         if(code == "HR")
  3515.         {
  3516.                 this.drawHorzLine(textState.y);
  3517.         }
  3518. }
  3519. //-----------------------------------------------------------------------------
  3520. // JAH_Window_Status_Profile
  3521. //
  3522. // Implements a Status page that displays a single Actor's parameters.
  3523. //
  3524. // All text processing is actually handled by the Profile_Texter window and then
  3525. // copied internally via blt for display.

  3526. function JAH_Window_Status_Profile() {
  3527.         this.initialize.apply(this, arguments);
  3528. }

  3529. JAH_Window_Status_Profile.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3530. JAH_Window_Status_Profile.prototype.constructor = JAH_Window_Status_Profile;

  3531. JAH_Window_Status_Profile.prototype.initialize = function() {

  3532.     JAH_Window_Status_Base.prototype.initialize.call(this);
  3533.        
  3534.         this.hiddenTextWindow = new JAH_Window_Profile_Texter(this.contentsWidth(), this.contentsHeight());
  3535.         this.totalLineCount = undefined; // Stores pre-computed line count information; it's an expensive calculation when word-wrapping is enabled.
  3536. };

  3537. JAH_Window_Status_Profile.prototype.getExtendedActorProfile = function() {
  3538.         var profile = JahwsUF.StatusMenuCore.Param.ExtendedProfiles[this._actor._actorId];
  3539.        
  3540.         var switchedProfileList = JahwsUF.StatusMenuCore.Param.SwitchedProfiles[this._actor._actorId];
  3541.        
  3542.         for(var i = 0; i < switchedProfileList.length; i++)
  3543.         {
  3544.                 if($gameSwitches.value(switchedProfileList[i][0]))
  3545.                         return switchedProfileList[i][1];
  3546.         }
  3547.        
  3548.         return profile;
  3549. };

  3550. JAH_Window_Status_Profile.prototype.setActor = function(actor) {

  3551.         this.totalLineCount = undefined;
  3552.         JAH_Window_Status_Base.prototype.setActor.call(this, actor);
  3553.         this.totalLineCount = this.getLineCount();

  3554.         //this.refresh();
  3555. }

  3556. JAH_Window_Status_Profile.prototype.getLineCount = function() {
  3557.        
  3558.         if(this._actor == undefined) return 1;  // Nothing to see here if we've not yet loaded an Actor.

  3559.         if(this.totalLineCount) return this.totalLineCount;
  3560.        
  3561.         this.hiddenTextWindow.width = this.availableWidth() + 2 * this.standardPadding();
  3562.         this.hiddenTextWindow.height = this.contentsHeight() + 2 * this.standardPadding() - this.getVisibleHeaderLineCount() * this.lineHeight();
  3563.         this.hiddenTextWindow.updateTransform();
  3564.        
  3565.         // Sadly, the base code doesn't actually update the bitmap used for drawing!
  3566.         // We have to do this manually.
  3567.         this.hiddenTextWindow.contents = new Bitmap(this.availableWidth(), this.contentsHeight());
  3568.        
  3569.         var exProfile = this.getExtendedActorProfile();
  3570.         var totalHeight = 0;
  3571.        
  3572.         if(exProfile != undefined)
  3573.         {
  3574.                 // Compute the number of lines in the profile text.
  3575.                 var textState = { index: 0, x: 12, y: 0, left: 12 };
  3576.                 textState.text = this.hiddenTextWindow.convertEscapeCharacters.call(this.hiddenTextWindow, exProfile);  
  3577.                
  3578.                 totalHeight = Math.ceil(this.calcTextHeight.call(this.hiddenTextWindow, textState, true));
  3579.         }
  3580.                
  3581.         if(this._actor.profile() != undefined && this._actor.profile() != "")
  3582.         {
  3583.                 //totalLines += 3;
  3584.                
  3585.                 var textState = { index: 0, x: 12, y: 0, left: 12 };
  3586.                 textState.text = this.convertEscapeCharacters.call(this.hiddenTextWindow, this._actor.profile());  
  3587.                
  3588.                 totalHeight += this.calcTextHeight.call(this.hiddenTextWindow, textState, true) + this.lineHeight();
  3589.         }
  3590.                
  3591.         var totalLines = Math.ceil(totalHeight / this.lineHeight());
  3592.        
  3593.         totalLines += this.getHeaderLineCount();
  3594.        
  3595.         if(!(this.isPortraitMode() || JahwsUF.StatusMenuCore.Param.NicknameInHeaders))
  3596.         {
  3597.                 totalLines += 2; // Include space for the nickname!
  3598.         }
  3599.        
  3600.         this.totalLineCount = totalLines;
  3601.        
  3602.         return totalLines;
  3603. };

  3604. JAH_Window_Status_Profile.prototype.drawPageBlock = function(y, lineIndex) {
  3605.     this.drawProfile(12, y, lineIndex);
  3606. };

  3607. // Profiles will ALWAYS use the portrait if it's available.
  3608. JAH_Window_Status_Profile.prototype.isPortraitMode = function() {
  3609.         return this.hasAvailablePortrait();
  3610. };

  3611. JAH_Window_Status_Profile.prototype.drawProfile = function(x, y, lineOffset) {
  3612.        
  3613.         // If anything should be printed above the original y, based upon topIndex, it should never be printed.
  3614.         // Otherwise, offset.
  3615.        
  3616.         if(!this.isPortraitMode())
  3617.         {
  3618.                 var nickname = this._actor.nickname();
  3619.                
  3620.                 if(nickname == '') nickname = undefined;
  3621.        
  3622.                 // If we don't have a portrait...
  3623.                 if(!JahwsUF.StatusMenuCore.Param.NicknameInHeaders && nickname != undefined)
  3624.                 {
  3625.                         if(lineOffset == 0)
  3626.                         {
  3627.                                 var nickname = this._actor.nickname();
  3628.                                
  3629.                                 if(JahwsUF.StatusMenuCore.Param.NicknameFormat.indexOf(""") != -1)
  3630.                                 nickname = """ + nickname + """;
  3631.                                
  3632.                                 this.drawText(nickname, x, y, this.textWidth(nickname));
  3633.                         }
  3634.                                
  3635.                         lineOffset += 2;
  3636.                 }
  3637.                
  3638.                 if(this._actor.profile() != undefined && this._actor.profile() != "")
  3639.                 {
  3640.                         this.printScrolledText(this._actor.profile(), x, y, lineOffset);
  3641.                        
  3642.                         lineOffset += 3;
  3643.                 }
  3644.                
  3645.                 var exProfile = this.getExtendedActorProfile();
  3646.                
  3647.                 if(exProfile != undefined)
  3648.                         this.printScrolledText(exProfile, x, y, lineOffset);
  3649.         }
  3650.         else
  3651.         {
  3652.                 // In profile mode, the Base window class draws the image as part of the command of "portrait" mode when
  3653.                 // drawing the actor block.  (This makes things more general for future extensions, in case future pages
  3654.                 // want to use the profile image.)
  3655.        
  3656.                 // If we DO have a standard profile entry.
  3657.                 if(this._actor.profile() != undefined && this._actor.profile() != "")
  3658.                 {
  3659.                         this.printScrolledText(this._actor.profile(), x, y, lineOffset);
  3660.                        
  3661.                         lineOffset += 3;
  3662.                 }
  3663.                
  3664.                 var exProfile = this.getExtendedActorProfile();
  3665.                
  3666.                 if(exProfile != undefined)
  3667.                         this.printScrolledText(exProfile, x, y, lineOffset);
  3668.         }
  3669.        
  3670. }

  3671. JAH_Window_Status_Profile.prototype.printScrolledText = function(text, x, y, scroll) {

  3672.         // 1.0.3 - dramatic change in the code:  scrolling control is way different now, but
  3673.         // in a way that won't break word-wrapping plugin output.
  3674.         //
  3675.         // Word-wrap plugins still need to implement calcTextHeight properly for scrolling to work, however.
  3676.        
  3677.         var lineHeight = this.lineHeight();
  3678.         var lines = text.split('\n');
  3679.        
  3680.         var headerSize = 0;
  3681.         var saveState = undefined;
  3682.                
  3683.         y += scroll * lineHeight;
  3684.        
  3685.         this.hiddenTextWindow.contents.clear();
  3686.         this.hiddenTextWindow.drawTextEx.call(this.hiddenTextWindow, text, x, y);
  3687.        
  3688.         var yDelt = y > 0 ? y : 0;
  3689.                
  3690.         var heightToCopy = this.contentsHeight() - yDelt;
  3691.        
  3692.         // Copy the hiddenTextWindow's text to our window.  We can set a limit on what areas are copied,
  3693.         // which allows for a text border to be enforced on profile text!
  3694.         this.contents.blt(this.hiddenTextWindow.contents, 0, yDelt, this.hiddenTextWindow.contentsWidth(), heightToCopy, 0, yDelt);
  3695. };
复制代码

图1

图1

图2

图2
梦石
0
星屑
7089
在线时间
722 小时
注册时间
2021-3-5
回帖
731
发表于 2023-7-18 16:21:13 | 显示全部楼层
第二次才出?那我估计是缓存问题,要不楼主把立绘的路径放在Ysp_Preloader.js里试试?
回复

使用道具 举报

梦石
0
星屑
1336
在线时间
158 小时
注册时间
2006-2-12
回帖
157
 楼主| 发表于 2023-7-18 16:29:43 | 显示全部楼层
RyanYe 发表于 2023-7-18 16:21
第二次才出?那我估计是缓存问题,要不楼主把立绘的路径放在Ysp_Preloader.js里试试? ...

是的,需要重新进一次这个角色的属性界面才会出,请问你发的这个是另一个插件吗?我需要多加这个插件的意思?
回复

使用道具 举报

梦石
0
星屑
1336
在线时间
158 小时
注册时间
2006-2-12
回帖
157
 楼主| 发表于 2023-7-18 16:55:52 | 显示全部楼层
RyanYe 发表于 2023-7-18 16:21
第二次才出?那我估计是缓存问题,要不楼主把立绘的路径放在Ysp_Preloader.js里试试? ...

我已经解决了谢谢!就是用预加载插件,我用了Glav Image Cache MV也是可以的
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部