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

Project1

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

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

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1246
在线时间
153 小时
注册时间
2006-2-12
帖子
226
跳转到指定楼层
1
发表于 2023-7-18 13:26:14 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

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

下面是插件代码:
JAVASCRIPT 代码复制下载
  1. //=============================================================================
  2. // JahwsUF - Status Menu Core
  3. // JAH_StatusMenuCore.js
  4. // Version: 2.0.0 alpha
  5. //=============================================================================
  6.  
  7. var Imported = Imported || {};                         // If YEP_CoreEngine is imported, this has a boolean variable stating so.
  8. Imported.JahwsUF_StatusMenuCore = true;  // Oh yeah, may as well say we're here, too.
  9.  
  10. var JahwsUF = JahwsUF || {};
  11.  
  12. //=============================================================================
  13. /*:
  14.  * @plugindesc v2.0.0 alpha
  15.  * Creates an advanced Status window with multiple pages for each Actor.  Supports profiles and portraits.
  16.  * @author JahwsUF
  17.  *
  18.  * @param ---Scrolling Params---
  19.  * @default
  20.  *
  21.  * @param Scroll Multiplier
  22.  * @desc The number of lines that the profile page should scroll at a time.  Default: 1
  23.  * @default 1
  24.  *
  25.  * @param Scrolling Headers
  26.  * @desc true if the header should be subject to scrolling.
  27.  * false if they should remain stationary.  Default:  true
  28.  * @default true
  29.  *
  30.  * @param ---Portrait Params---
  31.  * @default
  32.  *
  33.  * @param Portrait Img Adjust
  34.  * @desc Adds buffer space before all Actor portraits, except on profiles.  Default: 0
  35.  * @default 0
  36.  *
  37.  * @param Portraits On All
  38.  * @desc All pages will display an Actor's portrait if available.
  39.  * A more vanilla version will be used if not.  Default: true
  40.  * @default true
  41.  *
  42.  *
  43.  * @param ---TP Gauge Params---
  44.  * @default
  45.  *
  46.  * @param Add TP Gauge
  47.  * @desc Add the TP Gauge between MP and EXP on the default header.
  48.  * Blank imports from Yanfly, false = hide, true = show.
  49.  * @default
  50.  *
  51.  * @param Blank after TP
  52.  * @desc If the TP gauge is visible, adds a blank line after.
  53.  * Default: true
  54.  * @default true
  55.  *
  56.  * @param ---XP + Level Params---
  57.  * @default
  58.  *
  59.  * @param Hide Levels
  60.  * @desc Hide each Actor's level, rendering it invisible on the Status pages.
  61.  * @default false
  62.  *
  63.  * @param Hide XP Bar
  64.  * @desc Hide all XP information from the Status windows.
  65.  * Default:  false
  66.  * @default false
  67.  *
  68.  * @param XP - Show Remaining
  69.  * @desc true - Gauges show the remaining XP until the next level.
  70.  * false - Gauges show XP since last level + total XP needed for next.
  71.  *
  72.  * (Values are not cumulative - 0 marks the beginning of the current level for both values.)
  73.  * Default: true   
  74.  * @default true
  75.  *
  76.  * @param Color: XP Gauge 1
  77.  * @desc Color gradient component for the XP gauge.
  78.  * Default: 30   
  79.  * @default 30
  80.  *
  81.  * @param Color: XP Gauge 2
  82.  * @desc The other color gradient component for the XP gauge.
  83.  * Default: 31   
  84.  * @default 31
  85.  *
  86.  *
  87.  * @param ---Nickname Settings---
  88.  * @default
  89.  *
  90.  * @param Header - Name + Nick
  91.  * @desc true - Display both name and nickname in page headers.
  92.  * false - Only shows the nickname on the profile page.
  93.  * Default: true
  94.  * @default true
  95.  *
  96.  * @param Nickname Format
  97.  * @desc The pattern used to insert nicknames in page headers.
  98.  * Default: , "%1"    (%1 = position for nickname.)
  99.  * @default , "%1"
  100.  *
  101.  *
  102.  * @param ---Page 1---
  103.  * @default
  104.  *
  105.  * @param Page 1 Name
  106.  * @desc Menu name for the first page.
  107.  * Default:  Parameters
  108.  * @default Parameters
  109.  *
  110.  * @param Page 1 Window
  111.  * @desc Window corresponding to the first status page.
  112.  * Default:  JAH_Window_Status_Params
  113.  * @default JAH_Window_Status_Params
  114.  *
  115.  * @param ---Page 2---
  116.  * @default
  117.  *
  118.  * @param Page 2 Name
  119.  * @desc Menu name for the second page.
  120.  * Default: Elemental Rates
  121.  * @default Elemental Rates
  122.  *
  123.  * @param Page 2 Window
  124.  * @desc Window corresponding to the first status page.
  125.  * Default: JAH_Window_Elemental_Resistances
  126.  * @default JAH_Window_Elemental_Resistances
  127.  *
  128.  * @param ---Page 3---
  129.  * Default:
  130.  * @default
  131.  *
  132.  * @param Page 3 Name
  133.  * @desc Menu name for the third page.
  134.  * Default: State Rates  
  135.  * @default State Rates
  136.  *
  137.  * @param Page 3 Window
  138.  * @desc Window corresponding to the third status page.
  139.  * Default: JAH_Window_State_Resistances
  140.  * @default JAH_Window_State_Resistances
  141.  *
  142.  * @param ---Page 4---
  143.  * @default
  144.  *
  145.  * @param Page 4 Name
  146.  * @desc Menu name for the fourth page.
  147.  * Default: Profile
  148.  * @default Profile
  149.  *
  150.  * @param Page 4 Window
  151.  * @desc Window corresponding to the fourth status page.
  152.  * Default: JAH_Window_Status_Profile
  153.  * @default JAH_Window_Status_Profile
  154.  *
  155.  * @param ---Page 5---
  156.  * @default
  157.  *
  158.  * @param Page 5 Name
  159.  * @desc Menu name for the fifth page.
  160.  * Default:   
  161.  * @default  
  162.  *
  163.  * @param Page 5 Window
  164.  * @desc Window corresponding to the fifth status page.
  165.  * Default:   
  166.  * @default  
  167.  *
  168.  * @param ---Page 6---
  169.  * @default
  170.  *
  171.  * @param Page 6 Name
  172.  * @desc Menu name for the sixth page.
  173.  * Default:   
  174.  * @default  
  175.  *
  176.  * @param Page 6 Window
  177.  * @desc Window corresponding to the sixth status page.
  178.  * Default:   
  179.  * @default  
  180.  *
  181.  * @param ---Page Header 1---
  182.  * @desc Any "grouping" with a blank row placement will not be used.
  183.  * @default
  184.  *
  185.  * @param Grouping Title 1
  186.  * @desc A raw text entry to print on the param page.
  187.  * Can be left blank to create empty space.
  188.  * @default Basic Parameters
  189.  *
  190.  * @param Row Placement 1
  191.  * @desc The row where this text entry should be inserted.
  192.  * Parameter placement will be adjusted accordingly.
  193.  * @default 1
  194.  *
  195.  * @param Group Columns 1
  196.  * @desc The column(s) in which the text should be inserted.
  197.  * Columns must be adjacent.
  198.  * @default 1
  199.  *
  200.  * @param ---Page Header 2---
  201.  * @desc Any "grouping" with a blank row placement will not be used.
  202.  * @default
  203.  *
  204.  * @param Grouping Title 2
  205.  * @desc A raw text entry to print on the param page.
  206.  * Can be left blank to create empty space.
  207.  * @default
  208.  *
  209.  * @param Row Placement 2
  210.  * @desc The row where this text entry should be inserted.
  211.  * Parameter placement will be adjusted accordingly.
  212.  * @default 2
  213.  *
  214.  * @param Group Columns 2
  215.  * @desc The column(s) in which the text should be inserted.
  216.  * Columns must be adjacent.
  217.  * @default 1
  218.  *
  219.  * @param ---Page Header 3---
  220.  * @desc Any "grouping" with a blank row placement will not be used.
  221.  * @default
  222.  *
  223.  * @param Grouping Title 3
  224.  * @desc A raw text entry to print on the param page.
  225.  * Can be left blank to create empty space.
  226.  * @default
  227.  *
  228.  * @param Row Placement 3
  229.  * @desc The row where this text entry should be inserted.
  230.  * Parameter placement will be adjusted accordingly.
  231.  * @default
  232.  *
  233.  * @param Group Columns 3
  234.  * @desc The column(s) in which the text should be inserted.
  235.  * Columns must be adjacent.
  236.  * @default  
  237.  *
  238.  * @param ---Page Header 4---
  239.  * @desc Any "grouping" with a blank row placement will not be used.
  240.  * @default
  241.  *
  242.  * @param Grouping Title 4
  243.  * @desc A raw text entry to print on the param page.
  244.  * Can be left blank to create empty space.
  245.  * @default
  246.  *
  247.  * @param Row Placement 4
  248.  * @desc The row where this text entry should be inserted.
  249.  * Parameter placement will be adjusted accordingly.
  250.  * @default
  251.  *
  252.  * @param Group Columns 4
  253.  * @desc The column(s) in which the text should be inserted.
  254.  * Columns must be adjacent.
  255.  * @default  
  256.  *
  257.  * @param ---Page Header 5---
  258.  * @desc Any "grouping" with a blank row placement will not be used.
  259.  * @default
  260.  *
  261.  * @param Grouping Title 5
  262.  * @desc A raw text entry to print on the param page.
  263.  * Can be left blank to create empty space.
  264.  * @default
  265.  *
  266.  * @param Row Placement 5
  267.  * @desc The row where this text entry should be inserted.
  268.  * Parameter placement will be adjusted accordingly.
  269.  * @default
  270.  *
  271.  * @param Group Columns 5
  272.  * @desc The column(s) in which the text should be inserted.
  273.  * Columns must be adjacent.
  274.  * @default  
  275.  *
  276.  * @param ---Page Header 6---
  277.  * @desc Any "grouping" with a blank row placement will not be used.
  278.  * @default
  279.  *
  280.  * @param Grouping Title 6
  281.  * @desc A raw text entry to print on the param page.
  282.  * Can be left blank to create empty space.
  283.  * @default
  284.  *
  285.  * @param Row Placement 6
  286.  * @desc The row where this text entry should be inserted.
  287.  * Parameter placement will be adjusted accordingly.
  288.  * @default
  289.  *
  290.  * @param Group Columns 6
  291.  * @desc The column(s) in which the text should be inserted.
  292.  * Columns must be adjacent.
  293.  * @default  
  294.  *
  295.  * @param ---Page Header 7---
  296.  * @desc Any "grouping" with a blank row placement will not be used.
  297.  * @default
  298.  *
  299.  * @param Grouping Title 7
  300.  * @desc A raw text entry to print on the param page.
  301.  * Can be left blank to create empty space.
  302.  * @default
  303.  *
  304.  * @param Row Placement 7
  305.  * @desc The row where this text entry should be inserted.
  306.  * Parameter placement will be adjusted accordingly.
  307.  * @default
  308.  *
  309.  * @param Group Columns 7
  310.  * @desc The column(s) in which the text should be inserted.
  311.  * Columns must be adjacent.
  312.  * @default  
  313.  *
  314.  * @param ---Page Header 8---
  315.  * @desc Any "grouping" with a blank row placement will not be used.
  316.  * @default
  317.  *
  318.  * @param Grouping Title 8
  319.  * @desc A raw text entry to print on the param page.
  320.  * Can be left blank to create empty space.
  321.  * @default
  322.  *
  323.  * @param Row Placement 8
  324.  * @desc The row where this text entry should be inserted.
  325.  * Parameter placement will be adjusted accordingly.
  326.  * @default
  327.  *
  328.  * @param Group Columns 8
  329.  * @desc The column(s) in which the text should be inserted.
  330.  * Columns must be adjacent.
  331.  * @default  
  332.  *
  333.  * @param ---Page Header 9---
  334.  * @desc Any "grouping" with a blank row placement will not be used.
  335.  * @default
  336.  *
  337.  * @param Grouping Title 9
  338.  * @desc A raw text entry to print on the param page.
  339.  * Can be left blank to create empty space.
  340.  * @default
  341.  *
  342.  * @param Row Placement 9
  343.  * @desc The row where this text entry should be inserted.
  344.  * Parameter placement will be adjusted accordingly.
  345.  * @default
  346.  *
  347.  * @param Group Columns 9
  348.  * @desc The column(s) in which the text should be inserted.
  349.  * Columns must be adjacent.
  350.  * @default  
  351.  *
  352.  * @param ---Page Header 10---
  353.  * @desc Any "grouping" with a blank row placement will not be used.
  354.  * @default
  355.  *
  356.  * @param Grouping Title 10
  357.  * @desc A raw text entry to print on the param page.
  358.  * Can be left blank to create empty space.
  359.  * @default
  360.  *
  361.  * @param Row Placement 10
  362.  * @desc The row where this text entry should be inserted.
  363.  * Parameter placement will be adjusted accordingly.
  364.  * @default
  365.  *
  366.  * @param Group Columns 10
  367.  * @desc The column(s) in which the text should be inserted.
  368.  * Columns must be adjacent.
  369.  * @default  
  370.  *
  371.  *
  372.  * @param ---Extended Params---
  373.  * @default
  374.  *
  375.  * @param Parameter 1 Symbol
  376.  * @desc The system abbreviation for parameter #1.
  377.  * Default: atk
  378.  * @default atk
  379.  *
  380.  * @param Parameter 1 Name
  381.  * @desc The text name of parameter #1.
  382.  * Default:          - leave blank to use the database's entry.
  383.  * @default
  384.  *
  385.  * @param Parameter 1 as %
  386.  * @desc true - parameter should be displayed as a percent.
  387.  * false - otherwise.
  388.  * Default: false
  389.  * @default false
  390.  *
  391.  * @param Parameter 2 Symbol
  392.  * @desc The system abbreviation for parameter #2.
  393.  * Default: def
  394.  * @default def
  395.  *
  396.  * @param Parameter 2 Name
  397.  * @desc The text name of parameter #2.
  398.  * Default:          - leave blank to use the database's entry.
  399.  * @default
  400.  *
  401.  * @param Parameter 2 as %
  402.  * @desc true - parameter should be displayed as a percent.
  403.  * false - otherwise.
  404.  * Default: false
  405.  * @default false
  406.  *
  407.  * @param Parameter 3 Symbol
  408.  * @desc The system abbreviation for parameter #3.
  409.  * Default: mat
  410.  * @default mat
  411.  *
  412.  * @param Parameter 3 Name
  413.  * @desc The text name of parameter #3.
  414.  * Default:          - leave blank to use the database's entry.
  415.  * @default
  416.  *
  417.  * @param Parameter 3 as %
  418.  * @desc true - parameter should be displayed as a percent.
  419.  * false - otherwise.
  420.  * Default: false
  421.  * @default false
  422.  *
  423.  * @param Parameter 4 Symbol
  424.  * @desc The system abbreviation for parameter #4.
  425.  * Default: mdf
  426.  * @default mdf
  427.  *
  428.  * @param Parameter 4 Name
  429.  * @desc The text name of parameter #4.
  430.  * Default:          - leave blank to use the database's entry.
  431.  * @default  
  432.  *
  433.  * @param Parameter 4 as %
  434.  * @desc true - parameter should be displayed as a percent.
  435.  * false - otherwise.
  436.  * Default: false
  437.  * @default false
  438.  *
  439.  * @param Parameter 5 Symbol
  440.  * @desc The system abbreviation for parameter #5.
  441.  * Default: agi
  442.  * @default agi
  443.  *
  444.  * @param Parameter 5 Name
  445.  * @desc The text name of parameter #5.
  446.  * Default:          - leave blank to use the database's entry.
  447.  * @default  
  448.  *
  449.  * @param Parameter 5 as %
  450.  * @desc true - parameter should be displayed as a percent.
  451.  * false - otherwise.
  452.  * Default: false
  453.  * @default false
  454.  *
  455.  * @param Parameter 6 Symbol
  456.  * @desc The system abbreviation for parameter #6.
  457.  * Default: luk
  458.  * @default luk
  459.  *
  460.  * @param Parameter 6 Name
  461.  * @desc The text name of parameter #6.
  462.  * Default:          - leave blank to use the database's entry.
  463.  * @default
  464.  *
  465.  * @param Parameter 6 as %
  466.  * @desc true - parameter should be displayed as a percent.
  467.  * false - otherwise.
  468.  * Default: false
  469.  * @default false
  470.  *
  471.  * @param Parameter 7 Symbol
  472.  * @desc The system abbreviation for parameter #7.
  473.  * Space = blank.
  474.  * @default
  475.  *
  476.  * @param Parameter 7 Name
  477.  * @desc The text name of parameter #7.
  478.  * Default:          - leave blank to use the database's entry.
  479.  *
  480.  * @default   
  481.  *
  482.  * @param Parameter 7 as %
  483.  * @desc true - parameter should be displayed as a percent.
  484.  * false - otherwise.
  485.  * Default:
  486.  * @default
  487.  *
  488.  * @param Parameter 8 Symbol
  489.  * @desc The system abbreviation for parameter #8.
  490.  * Default: hit
  491.  * @default hit
  492.  *
  493.  * @param Parameter 8 Name
  494.  * @desc The text name of parameter #8.
  495.  * Default:          - leave blank to use the database's entry.
  496.  * @default
  497.  *
  498.  * @param Parameter 8 as %
  499.  * @desc true - parameter should be displayed as a percent.
  500.  * false - otherwise.
  501.  * Default:
  502.  * @default
  503.  *
  504.  * @param Parameter 9 Symbol
  505.  * @desc The system abbreviation for parameter #9.
  506.  * Default: eva
  507.  * @default eva
  508.  *
  509.  * @param Parameter 9 Name
  510.  * @desc The text name of parameter #9.
  511.  * Default:         
  512.  * @default
  513.  *
  514.  * @param Parameter 9 as %
  515.  * @desc true - parameter should be displayed as a percent.
  516.  * false - otherwise.
  517.  * Default:
  518.  * @default
  519.  *
  520.  * @param Parameter 10 Symbol
  521.  * @desc The system abbreviation for parameter #10.
  522.  * Space = blank.
  523.  * @default
  524.  *
  525.  * @param Parameter 10 Name
  526.  * @desc The text name of parameter #10.
  527.  * Default:         
  528.  * @default
  529.  *
  530.  * @param Parameter 10 as %
  531.  * @desc true - parameter should be displayed as a percent.
  532.  * false - otherwise.
  533.  * Default:
  534.  * @default
  535.  *
  536.  * @param Parameter 11 Symbol
  537.  * @desc The system abbreviation for parameter #11.
  538.  * Space = blank.
  539.  * @default
  540.  *
  541.  * @param Parameter 11 Name
  542.  * @desc The text name of parameter #11.
  543.  * Default:         
  544.  * @default
  545.  *
  546.  * @param Parameter 11 as %
  547.  * @desc true - parameter should be displayed as a percent.
  548.  * false - otherwise.
  549.  * Default:
  550.  * @default
  551.  *
  552.  * @param Parameter 12 Symbol
  553.  * @desc The system abbreviation for parameter #12.
  554.  * Space = blank.
  555.  * @default
  556.  *
  557.  * @param Parameter 12 Name
  558.  * @desc The text name of parameter #12.
  559.  * Default:         
  560.  * @default
  561.  *
  562.  * @param Parameter 12 as %
  563.  * @desc true - parameter should be displayed as a percent.
  564.  * false - otherwise.
  565.  * Default:
  566.  * @default
  567.  *
  568.  * @param Parameter 13 Symbol
  569.  * @desc The system abbreviation for parameter #13.
  570.  * Space = blank.
  571.  * @default
  572.  *
  573.  * @param Parameter 13 Name
  574.  * @desc The text name of parameter #13.
  575.  * Default:         
  576.  * @default
  577.  *
  578.  * @param Parameter 13 as %
  579.  * @desc true - parameter should be displayed as a percent.
  580.  * false - otherwise.
  581.  * Default:
  582.  * @default
  583.  *
  584.  * @param Parameter 14 Symbol
  585.  * @desc The system abbreviation for parameter #14.
  586.  * Space = blank.
  587.  * @default
  588.  *
  589.  * @param Parameter 14 Name
  590.  * @desc The text name of parameter #14.
  591.  * Default:         
  592.  * @default
  593.  *
  594.  * @param Parameter 14 as %
  595.  * @desc true - parameter should be displayed as a percent.
  596.  * false - otherwise.
  597.  * Default:
  598.  * @default
  599.  *
  600.  * @param Parameter 15 Symbol
  601.  * @desc The system abbreviation for parameter #15.
  602.  * Space = blank.
  603.  * @default
  604.  *
  605.  * @param Parameter 15 Name
  606.  * @desc The text name of parameter #15.
  607.  * Default:         
  608.  * @default
  609.  *
  610.  * @param Parameter 15 as %
  611.  * @desc true - parameter should be displayed as a percent.
  612.  * false - otherwise.
  613.  * Default:
  614.  * @default
  615.  *
  616.  * @param Parameter 16 Symbol
  617.  * @desc The system abbreviation for parameter #16.
  618.  * Space = blank.
  619.  * @default
  620.  *
  621.  * @param Parameter 16 Name
  622.  * @desc The text name of parameter #16.
  623.  * Default:         
  624.  * @default
  625.  *
  626.  * @param Parameter 16 as %
  627.  * @desc true - parameter should be displayed as a percent.
  628.  * false - otherwise.
  629.  * Default:
  630.  * @default
  631.  *
  632.  * @param Parameter 17 Symbol
  633.  * @desc The system abbreviation for parameter #17.
  634.  * Space = blank.
  635.  * @default
  636.  *
  637.  * @param Parameter 17 Name
  638.  * @desc The text name of parameter #17.
  639.  * Default:         
  640.  * @default
  641.  *
  642.  * @param Parameter 17 as %
  643.  * @desc true - parameter should be displayed as a percent.
  644.  * false - otherwise.
  645.  * Default:
  646.  * @default
  647.  *
  648.  * @param Parameter 18 Symbol
  649.  * @desc The system abbreviation for parameter #18.
  650.  * Space = blank.
  651.  * @default
  652.  *
  653.  * @param Parameter 18 Name
  654.  * @desc The text name of parameter #18.
  655.  * Default:         
  656.  * @default
  657.  *
  658.  * @param Parameter 18 as %
  659.  * @desc true - parameter should be displayed as a percent.
  660.  * false - otherwise.
  661.  * Default:
  662.  * @default
  663.  *
  664.  * @param Parameter 19 Symbol
  665.  * @desc The system abbreviation for parameter #19.
  666.  * Default:
  667.  * @default
  668.  *
  669.  * @param Parameter 19 Name
  670.  * @desc The text name of parameter #19.
  671.  * Default:         
  672.  * @default
  673.  *
  674.  * @param Parameter 19 as %
  675.  * @desc true - parameter should be displayed as a percent.
  676.  * false - otherwise.
  677.  * Default:
  678.  * @default
  679.  *
  680.  * @param Parameter 20 Symbol
  681.  * @desc The system abbreviation for parameter #20.
  682.  * Space = blank.
  683.  * @default
  684.  *
  685.  * @param Parameter 20 Name
  686.  * @desc The text name of parameter #20.
  687.  * Default:         
  688.  * @default
  689.  *
  690.  * @param Parameter 20 as %
  691.  * @desc true - parameter should be displayed as a percent.
  692.  * false - otherwise.
  693.  * Default:
  694.  * @default
  695.  *
  696.  * @param Parameter 21 Symbol
  697.  * @desc The system abbreviation for parameter #21.
  698.  * Space = blank.
  699.  * @default
  700.  *
  701.  * @param Parameter 21 Name
  702.  * @desc The text name of parameter #21.
  703.  * Default:         
  704.  * @default
  705.  *
  706.  * @param Parameter 21 as %
  707.  * @desc true - parameter should be displayed as a percent.
  708.  * false - otherwise.
  709.  * Default:
  710.  * @default
  711.  *
  712.  * @param Parameter 22 Symbol
  713.  * @desc The system abbreviation for parameter #22.
  714.  * Space = blank.
  715.  * @default
  716.  *
  717.  * @param Parameter 22 Name
  718.  * @desc The text name of parameter #22.
  719.  * Default:         
  720.  * @default
  721.  *
  722.  * @param Parameter 22 as %
  723.  * @desc true - parameter should be displayed as a percent.
  724.  * false - otherwise.
  725.  * Default:
  726.  * @default
  727.  *
  728.  * @param Parameter 23 Symbol
  729.  * @desc The system abbreviation for parameter #23.
  730.  * Space = blank.
  731.  * @default
  732.  *
  733.  * @param Parameter 23 Name
  734.  * @desc The text name of parameter #23.
  735.  * Default:         
  736.  * @default
  737.  *
  738.  * @param Parameter 23 as %
  739.  * @desc true - parameter should be displayed as a percent.
  740.  * false - otherwise.
  741.  * Default:
  742.  * @default
  743.  *
  744.  * @param Parameter 24 Symbol
  745.  * @desc The system abbreviation for parameter #24.
  746.  * Space = blank.
  747.  * @default
  748.  *
  749.  * @param Parameter 24 Name
  750.  * @desc The text name of parameter #24.
  751.  * Default:         
  752.  * @default
  753.  *
  754.  * @param Parameter 24 as %
  755.  * @desc true - parameter should be displayed as a percent.
  756.  * false - otherwise.
  757.  * Default:
  758.  * @default
  759.  *
  760.  * @param Parameter 25 Symbol
  761.  * @desc The system abbreviation for parameter #25.
  762.  * Space = blank.
  763.  * @default
  764.  *
  765.  * @param Parameter 25 Name
  766.  * @desc The text name of parameter #25.
  767.  * Default:         
  768.  * @default
  769.  *
  770.  * @param Parameter 25 as %
  771.  * @desc true - parameter should be displayed as a percent.
  772.  * false - otherwise.
  773.  * Default:
  774.  * @default
  775.  *
  776.  * @param Parameter 26 Symbol
  777.  * @desc The system abbreviation for parameter #26.
  778.  * Space = blank.
  779.  * @default
  780.  *
  781.  * @param Parameter 26 Name
  782.  * @desc The text name of parameter #26.
  783.  * Default:         
  784.  * @default
  785.  *
  786.  * @param Parameter 26 as %
  787.  * @desc true - parameter should be displayed as a percent.
  788.  * false - otherwise.
  789.  * Default:
  790.  * @default
  791.  *
  792.  * @param Parameter 27 Symbol
  793.  * @desc The system abbreviation for parameter #27.
  794.  * Space = blank.
  795.  * @default
  796.  *
  797.  * @param Parameter 27 Name
  798.  * @desc The text name of parameter #27.
  799.  * Default:         
  800.  * @default
  801.  *
  802.  * @param Parameter 27 as %
  803.  * @desc true - parameter should be displayed as a percent.
  804.  * false - otherwise.
  805.  * Default:
  806.  * @default
  807.  *
  808.  * @param Parameter 28 Symbol
  809.  * @desc The system abbreviation for parameter #28.
  810.  * Space = blank.
  811.  * @default
  812.  *
  813.  * @param Parameter 28 Name
  814.  * @desc The text name of parameter #28.
  815.  * Default:         
  816.  * @default
  817.  *
  818.  * @param Parameter 28 as %
  819.  * @desc true - parameter should be displayed as a percent.
  820.  * false - otherwise.
  821.  * Default:
  822.  * @default
  823.  *
  824.  * @param Parameter 29 Symbol
  825.  * @desc The system abbreviation for parameter #29.
  826.  * Space = blank.
  827.  * @default
  828.  *
  829.  * @param Parameter 29 Name
  830.  * @desc The text name of parameter #29.
  831.  * Default:         
  832.  * @default
  833.  *
  834.  * @param Parameter 29 as %
  835.  * @desc true - parameter should be displayed as a percent.
  836.  * false - otherwise.
  837.  * Default:
  838.  * @default
  839.  *
  840.  * @param Parameter 30 Symbol
  841.  * @desc The system abbreviation for parameter #30.
  842.  * Space = blank.
  843.  * @default
  844.  *
  845.  * @param Parameter 30 Name
  846.  * @desc The text name of parameter #30.
  847.  * Default:         
  848.  * @default
  849.  *
  850.  * @param Parameter 30 as %
  851.  * @desc true - parameter should be displayed as a percent.
  852.  * false - otherwise.
  853.  * Default:
  854.  * @default
  855.  *
  856.  * @param Parameter 31 Symbol
  857.  * @desc The system abbreviation for parameter #31.
  858.  * Space = blank.
  859.  * @default
  860.  *
  861.  * @param Parameter 31 Name
  862.  * @desc The text name of parameter #31.
  863.  * Default:         
  864.  * @default
  865.  *
  866.  * @param Parameter 31 as %
  867.  * @desc true - parameter should be displayed as a percent.
  868.  * false - otherwise.
  869.  * Default:
  870.  * @default
  871.  *
  872.  * @param Parameter 32 Symbol
  873.  * @desc The system abbreviation for parameter #32.
  874.  * Space = blank.
  875.  * @default
  876.  *
  877.  * @param Parameter 32 Name
  878.  * @desc The text name of parameter #32.
  879.  * Default:         
  880.  * @default
  881.  *
  882.  * @param Parameter 32 as %
  883.  * @desc true - parameter should be displayed as a percent.
  884.  * false - otherwise.
  885.  * Default:
  886.  * @default
  887.  *
  888.  * @param Parameter 33 Symbol
  889.  * @desc The system abbreviation for parameter #33.
  890.  * Space = blank.
  891.  * @default
  892.  *
  893.  * @param Parameter 33 Name
  894.  * @desc The text name of parameter #33.
  895.  * Default:         
  896.  * @default
  897.  *
  898.  * @param Parameter 33 as %
  899.  * @desc true - parameter should be displayed as a percent.
  900.  * false - otherwise.
  901.  * Default:
  902.  * @default
  903.  *
  904.  * @param Parameter 34 Symbol
  905.  * @desc The system abbreviation for parameter #34.
  906.  * Space = blank.
  907.  * @default
  908.  *
  909.  * @param Parameter 34 Name
  910.  * @desc The text name of parameter #34.
  911.  * Default:         
  912.  * @default
  913.  *
  914.  * @param Parameter 34 as %
  915.  * @desc true - parameter should be displayed as a percent.
  916.  * false - otherwise.
  917.  * Default:
  918.  * @default
  919.  *
  920.  * @param Parameter 35 Symbol
  921.  * @desc The system abbreviation for parameter #35.
  922.  * Space = blank.
  923.  * @default
  924.  *
  925.  * @param Parameter 35 Name
  926.  * @desc The text name of parameter #35.
  927.  * Default:         
  928.  * @default
  929.  *
  930.  * @param Parameter 35 as %
  931.  * @desc true - parameter should be displayed as a percent.
  932.  * false - otherwise.
  933.  * Default:
  934.  * @default
  935.  *
  936.  * @param Parameter 36 Symbol
  937.  * @desc The system abbreviation for parameter #36.
  938.  * Space = blank.
  939.  * @default
  940.  *
  941.  * @param Parameter 36 Name
  942.  * @desc The text name of parameter #36.
  943.  * Default:         
  944.  * @default
  945.  *
  946.  * @param Parameter 36 as %
  947.  * @desc true - parameter should be displayed as a percent.
  948.  * false - otherwise.
  949.  * Default:
  950.  * @default
  951.  *
  952.  * @param Parameter 37 Symbol
  953.  * @desc The system abbreviation for parameter #37.
  954.  * Space = blank.
  955.  * @default
  956.  *
  957.  * @param Parameter 37 Name
  958.  * @desc The text name of parameter #37.
  959.  * Default:         
  960.  * @default
  961.  *
  962.  * @param Parameter 37 as %
  963.  * @desc true - parameter should be displayed as a percent.
  964.  * false - otherwise.
  965.  * Default:
  966.  * @default
  967.  *
  968.  * @param Parameter 38 Symbol
  969.  * @desc The system abbreviation for parameter #38.
  970.  * Space = blank.
  971.  * @default
  972.  *
  973.  * @param Parameter 38 Name
  974.  * @desc The text name of parameter #38.
  975.  * Default:         
  976.  * @default
  977.  *
  978.  * @param Parameter 38 as %
  979.  * @desc true - parameter should be displayed as a percent.
  980.  * false - otherwise.
  981.  * Default:
  982.  * @default
  983.  *
  984.  * @param Parameter 39 Symbol
  985.  * @desc The system abbreviation for parameter #39.
  986.  * Space = blank.
  987.  * @default
  988.  *
  989.  * @param Parameter 39 Name
  990.  * @desc The text name of parameter #39.
  991.  * Default:         
  992.  * @default
  993.  *
  994.  * @param Parameter 39 as %
  995.  * @desc true - parameter should be displayed as a percent.
  996.  * false - otherwise.
  997.  * Default:
  998.  * @default
  999.  *
  1000.  * @param Parameter 40 Symbol
  1001.  * @desc The system abbreviation for parameter #40.
  1002.  * Space = blank.
  1003.  * @default
  1004.  *
  1005.  * @param Parameter 40 Name
  1006.  * @desc The text name of parameter #40.
  1007.  * Default:         
  1008.  * @default
  1009.  *
  1010.  * @param Parameter 40 as %
  1011.  * @desc true - parameter should be displayed as a percent.
  1012.  * false - otherwise.
  1013.  * Default:
  1014.  * @default
  1015.  *
  1016.  * @param Parameter 41 Symbol
  1017.  * @desc The system abbreviation for parameter #41.
  1018.  * Space = blank.
  1019.  * @default
  1020.  *
  1021.  * @param Parameter 41 Name
  1022.  * @desc The text name of parameter #41.
  1023.  * Default:         
  1024.  * @default
  1025.  *
  1026.  * @param Parameter 41 as %
  1027.  * @desc true - parameter should be displayed as a percent.
  1028.  * false - otherwise.
  1029.  * Default:
  1030.  * @default
  1031.  *
  1032.  * @param Parameter 42 Symbol
  1033.  * @desc The system abbreviation for parameter #42.
  1034.  * Space = blank.
  1035.  * @default
  1036.  *
  1037.  * @param Parameter 42 Name
  1038.  * @desc The text name of parameter #42.
  1039.  * Default:         
  1040.  * @default
  1041.  *
  1042.  * @param Parameter 42 as %
  1043.  * @desc true - parameter should be displayed as a percent.
  1044.  * false - otherwise.
  1045.  * Default:
  1046.  * @default
  1047.  *
  1048.  * @param Parameter 43 Symbol
  1049.  * @desc The system abbreviation for parameter #43.
  1050.  * Space = blank.
  1051.  * @default
  1052.  *
  1053.  * @param Parameter 43 Name
  1054.  * @desc The text name of parameter #43.
  1055.  * Default:         
  1056.  * @default
  1057.  *
  1058.  * @param Parameter 43 as %
  1059.  * @desc true - parameter should be displayed as a percent.
  1060.  * false - otherwise.
  1061.  * Default:
  1062.  * @default
  1063.  *
  1064.  * @param Parameter 44 Symbol
  1065.  * @desc The system abbreviation for parameter #44.
  1066.  * Space = blank.
  1067.  * @default
  1068.  *
  1069.  * @param Parameter 44 Name
  1070.  * @desc The text name of parameter #44.
  1071.  * Default:         
  1072.  * @default
  1073.  *
  1074.  * @param Parameter 44 as %
  1075.  * @desc true - parameter should be displayed as a percent.
  1076.  * false - otherwise.
  1077.  * Default:
  1078.  * @default
  1079.  *
  1080.  * @param Parameter 45 Symbol
  1081.  * @desc The system abbreviation for parameter #45.
  1082.  * Space = blank.
  1083.  * @default
  1084.  *
  1085.  * @param Parameter 45 Name
  1086.  * @desc The text name of parameter #45.
  1087.  * Default:         
  1088.  * @default
  1089.  *
  1090.  * @param Parameter 45 as %
  1091.  * @desc true - parameter should be displayed as a percent.
  1092.  * false - otherwise.
  1093.  * Default:
  1094.  * @default
  1095.  *
  1096.  * @param Parameter 46 Symbol
  1097.  * @desc The system abbreviation for parameter #46.
  1098.  * Space = blank.
  1099.  * @default
  1100.  *
  1101.  * @param Parameter 46 Name
  1102.  * @desc The text name of parameter #46.
  1103.  * Default:         
  1104.  * @default
  1105.  *
  1106.  * @param Parameter 46 as %
  1107.  * @desc true - parameter should be displayed as a percent.
  1108.  * false - otherwise.
  1109.  * Default:
  1110.  * @default
  1111.  *
  1112.  * @param Parameter 47 Symbol
  1113.  * @desc The system abbreviation for parameter #47.
  1114.  * Space = blank.
  1115.  * @default
  1116.  *
  1117.  * @param Parameter 47 Name
  1118.  * @desc The text name of parameter #47.
  1119.  * Default:         
  1120.  * @default
  1121.  *
  1122.  * @param Parameter 47 as %
  1123.  * @desc true - parameter should be displayed as a percent.
  1124.  * false - otherwise.
  1125.  * Default:
  1126.  * @default
  1127.  *
  1128.  * @param Parameter 48 Symbol
  1129.  * @desc The system abbreviation for parameter #48.
  1130.  * Space = blank.
  1131.  * @default
  1132.  *
  1133.  * @param Parameter 48 Name
  1134.  * @desc The text name of parameter #48.
  1135.  * Default:         
  1136.  * @default
  1137.  *
  1138.  * @param Parameter 48 as %
  1139.  * @desc true - parameter should be displayed as a percent.
  1140.  * false - otherwise.
  1141.  * Default:
  1142.  * @default
  1143.  *
  1144.  * @param ---Param Formatting---
  1145.  * @default
  1146.  *
  1147.  * @param Params in Col 1
  1148.  * @desc The number of parameters to list in the first column.
  1149.  * Default: 9
  1150.  * @default 9
  1151.  *
  1152.  * @param Column 1 Text Width
  1153.  * @desc Width (pixels) alloted to column 1's parameter names.
  1154.  * Default: 160
  1155.  * @default 160
  1156.  *
  1157.  * @param Column 1 Value Width
  1158.  * @desc Width (pixels) alloted to column 1's parameter values.
  1159.  * Default: 60
  1160.  * @default 60
  1161.  *
  1162.  * @param Params in Col 2
  1163.  * @desc The number of parameters to list in the second column.
  1164.  * If zero or blank, all parameters will be listed in a single column.
  1165.  * Default: 0
  1166.  * @default 0
  1167.  *
  1168.  * @param Column 2 Text Width
  1169.  * @desc Width (pixels) alloted to column 2's parameter names.
  1170.  * Default: 160
  1171.  * @default 160
  1172.  *
  1173.  * @param Column 2 Value Width
  1174.  * @desc Width (pixels) alloted to column 2's parameter values.
  1175.  * Default: 60
  1176.  * @default 60
  1177.  *
  1178.  * @param Params in Col 3
  1179.  * @desc The number of parameters to list in the third column.
  1180.  * Zero hides the column.
  1181.  * Default: 0
  1182.  * @default 0
  1183.  *
  1184.  * @param Column 3 Text Width
  1185.  * @desc Width (pixels) alloted to column 3's parameter names.
  1186.  * Default: 160
  1187.  * @default 160
  1188.  *
  1189.  * @param Column 3 Value Width
  1190.  * @desc Width (pixels) alloted to column 3's parameter values.
  1191.  * Default: 60
  1192.  * @default 60
  1193.  *
  1194.  * @param Display Equips?
  1195.  * @desc true - Attempt to show equips on the parameter page.
  1196.  * false - hide the equips.
  1197.  * Default: true
  1198.  * @default true
  1199.  *
  1200.  * @param Equip Column Width
  1201.  * @desc Width (pixels) for equipment listings on pages if shown.
  1202.  * Default: 320
  1203.  * @default 320
  1204.  *
  1205.  * @param pdr/mdr as Resists
  1206.  * @desc Treat the mdr and mdr parameters as elemental resistances when they appear on the Parameter page.
  1207.  * @default false
  1208.  *
  1209.  * @param Rebalance Emptiness
  1210.  * @desc If not all parameters on a line are blank, recenter the arrangement of those present.
  1211.  * @default true
  1212.  *
  1213.  * @param ---Category Options---
  1214.  * @desc The common set of text classifications for elemental or state resistance rates.
  1215.  *
  1216.  * @param Use Color
  1217.  * @desc true - color all resistance values (text or %age)
  1218.  * false - disables all color options below.
  1219.  * @default true
  1220.  *
  1221.  * @param Threshold 1
  1222.  * @desc The minimum %-value required for the highest category. (#1)
  1223.  * Default: 201
  1224.  * @default 201
  1225.  *
  1226.  * @param Category 1 Text
  1227.  * @desc The label for this resistance category.
  1228.  * Default: Very Weak
  1229.  * @default Very Weak
  1230.  *
  1231.  * @param Category 1 Color
  1232.  * @desc The color for values from this category.
  1233.  * Leave blank to use the default color.
  1234.  * @default 10
  1235.  *
  1236.  * @param Threshold 2
  1237.  * @desc The minimum %-value required for this category.
  1238.  * Default: 101
  1239.  * @default 101
  1240.  *
  1241.  * @param Category 2 Text
  1242.  * @desc The label for this resistance category.
  1243.  * Default: Weak
  1244.  * @default Weak
  1245.  *
  1246.  * @param Category 2 Color
  1247.  * @desc The color for values from this category.
  1248.  * Leave blank to use the default color.
  1249.  * @default 2
  1250.  *
  1251.  * @param Threshold 3
  1252.  * @desc The minimum %-value required for this category.
  1253.  * Default: 100
  1254.  * @default 100
  1255.  *
  1256.  * @param Category 3 Text
  1257.  * @desc The label for this resistance category.
  1258.  * Default: Normal
  1259.  * @default Normal
  1260.  *
  1261.  * @param Category 3 Color
  1262.  * @desc The color for values from this category.
  1263.  * Leave blank to use the default color.
  1264.  * @default
  1265.  *
  1266.  * @param Threshold 4
  1267.  * @desc The minimum %-value required for this category.
  1268.  * Default: 50
  1269.  * @default 50
  1270.  *
  1271.  * @param Category 4 Text
  1272.  * @desc The label for this resistance category.
  1273.  * Default: Resist
  1274.  * @default Resist
  1275.  *
  1276.  * @param Category 4 Color
  1277.  * @desc The color for values from this category.
  1278.  * Leave blank to use the default color.
  1279.  * @default 5
  1280.  *
  1281.  * @param Threshold 5
  1282.  * @desc The minimum %-value required for this category.
  1283.  * Default: 1
  1284.  * @default 1
  1285.  *
  1286.  * @param Category 5 Text
  1287.  * @desc The label for this resistance category.
  1288.  * Default: Resist
  1289.  * @default Resist
  1290.  *
  1291.  * @param Category 5 Color
  1292.  * @desc The color for values from this category.
  1293.  * Leave blank to use the default color.
  1294.  * @default 13
  1295.  *
  1296.  * @param Threshold 6
  1297.  * @desc The minimum %-value required for this category.
  1298.  * Default: 0
  1299.  * @default 0
  1300.  *
  1301.  * @param Category 6 Text
  1302.  * @desc The label for this resistance category.
  1303.  * Default: Immune
  1304.  * @default Immune
  1305.  *
  1306.  * @param Category 6 Color
  1307.  * @desc The color for values from this category.
  1308.  * Leave blank to use the default color.
  1309.  * @default 14
  1310.  *
  1311.  * @param Threshold 7
  1312.  * @desc The minimum %-value required for this category.
  1313.  * Default: -99
  1314.  * @default -99
  1315.  *
  1316.  * @param Category 7 Text
  1317.  * @desc The label for this resistance category.
  1318.  * Default: Absorb
  1319.  * @default Absorb
  1320.  *
  1321.  * @param Category 7 Color
  1322.  * @desc The color for values from this category.
  1323.  * Leave blank to use the default color.
  1324.  * @default 3
  1325.  *
  1326.  * @param Threshold 8
  1327.  * @desc The minimum %-value required for this category.
  1328.  * Default: -1000
  1329.  * @default -1000
  1330.  *
  1331.  * @param Category 8 Text
  1332.  * @desc The label for this resistance category.
  1333.  * Default: Absorb
  1334.  * @default Absorb
  1335.  *
  1336.  * @param Category 8 Color
  1337.  * @desc The color for values from this category.
  1338.  * Leave blank to use the default color.
  1339.  * @default 11
  1340.  *
  1341.  *
  1342.  * @param ---Element Options---
  1343.  * @default
  1344.  *
  1345.  * @param Ele. Resist Header
  1346.  * @desc The text header explaining the elemental defense rates listed on
  1347.  * the Resistances page.  Can be removed if this is left blank.
  1348.  * Default:  Elemental Damage Received
  1349.  * @default Elemental Damage Received
  1350.  *
  1351.  * @param Ele. Col Txt Width
  1352.  * @desc The amount of space to give each state's name on the state page.
  1353.  * @default 160
  1354.  *
  1355.  * @param Ele. Col Val Width
  1356.  * @desc The amount of space to give each state's value / classification on the state page.
  1357.  * @default 80
  1358.  *
  1359.  * @param Column 1 Elements
  1360.  * @desc The number of elements to list in the first column.
  1361.  * Setting this to zero will erase all columns and empty the Resistances page.
  1362.  * Default: 4
  1363.  * @default 4
  1364.  *
  1365.  * @param Column 2 Elements
  1366.  * @desc The number of elements to list in the second column.
  1367.  * Setting this to zero will eliminate columns 2 and 3.
  1368.  * Default: 4
  1369.  * @default 4
  1370.  *
  1371.  * @param Column 3 Elements
  1372.  * @desc The number of elements to list in the third column.
  1373.  * Setting this to zero will eliminate the column.
  1374.  * Default: 0
  1375.  * @default 0
  1376.  *
  1377.  * @param Hidden Elements
  1378.  * @desc A list of the element IDs to keep hidden.
  1379.  * Example: 1, 2 will hide Physical and Fire if unchanged.
  1380.  * @default 1
  1381.  *
  1382.  * @param Display Ele. Percent
  1383.  * @desc true - show exact resistance percent
  1384.  * false - categorize resistance strength (like "weak")
  1385.  * @default false
  1386.  *
  1387.  * @param Center Ele. Values
  1388.  * @desc true - element rates / categories will be centered.
  1389.  * false - right-aligned instead.
  1390.  * @default true
  1391.  *
  1392.  * @param ---State Options---
  1393.  * @default
  1394.  *
  1395.  * @param State Resist Header
  1396.  * @desc The text header explaining the state defense rates listed on
  1397.  * the State Resistances page.  Can be removed if this is left blank.
  1398.  * Default: State Resistance
  1399.  * @default State Resistance
  1400.  *
  1401.  * @param State Col Txt Width
  1402.  * @desc The amount of space to give each state's name on the state page.
  1403.  * @default 160
  1404.  *
  1405.  * @param State Col Val Width
  1406.  * @desc The amount of space to give each state's value / classification on the state page.
  1407.  * @default 80
  1408.  *
  1409.  * @param Column 1 States
  1410.  * @desc The number of states to list in the first column.
  1411.  * Setting this to zero will erase all columns and empty the page.
  1412.  * Default: 4
  1413.  * @default 4
  1414.  *
  1415.  * @param Column 2 States
  1416.  * @desc The number of elements to list in the second column.
  1417.  * Setting this to zero will eliminate columns 2 and 3.
  1418.  * Default: 4
  1419.  * @default 4
  1420.  *
  1421.  * @param Column 3 States
  1422.  * @desc The number of elements to list in the third column.
  1423.  * Setting this to zero will eliminate the column.
  1424.  * Default: 0
  1425.  * @default 0
  1426.  *
  1427.  * @param Hidden States
  1428.  * @desc A list of the state IDs to keep hidden.
  1429.  * Example: 1, 2, 3 will hide Knockout, Guard, and Immortal.
  1430.  * @default 1, 2, 3
  1431.  *
  1432.  * @param Display State Percent
  1433.  * @desc true - show exact resistance percent
  1434.  * false - categorize resistance strength (like "weak")
  1435.  * @default true
  1436.  *
  1437.  * @param Center State Values
  1438.  * @desc true - state rates / categories will be centered.
  1439.  * false - right-aligned instead.
  1440.  * @default true
  1441.  *
  1442.  *
  1443.  * @help
  1444.  * ============================================================================
  1445.  * Introduction
  1446.  * ============================================================================
  1447.  *
  1448.  * For those who might desire to customize their Status further than the
  1449.  * default behavior provided by this plugin, note that this plugin takes
  1450.  * parameters allowing you to specify the menu name and window corresponding to
  1451.  * each Status page.
  1452.  *
  1453.  * Even without any editing, this plugin automatically provides for extended
  1454.  * Status functionality for use in your own projects.
  1455.  *
  1456.  * ============================================================================
  1457.  * How to Use This Plugin
  1458.  * ============================================================================
  1459.  *
  1460.  *
  1461.  * Extended Parameters
  1462.  * ===================
  1463.  * Rather than assume that you always want the parameters listed in a specific
  1464.  * order, this plugin allows you to choose what order all parameters are listed
  1465.  * in.  This is also helpful to allow some degree of control of how they're
  1466.  * arranged on the screen.
  1467.  *
  1468.  * By default, RPG Maker doesn't provide any in-text names or abbreviations for
  1469.  * many extended or special parameters.  As a result, you need to specify these
  1470.  * values for any such additional parameters.  If left blank, this plugin will
  1471.  * attempt to find the names and abbreviations from the database's TextManager,
  1472.  * which will succeed for the basic parameters.
  1473.  *
  1474.  * Table of built-in parameters:
  1475.  *
  1476.  * ==========================================
  1477.  * | Symbol |      Name       | %age-based? |
  1478.  * ==========================================
  1479.  * | atk    | Attack          | false       |
  1480.  * | def    | Defense         | false       |
  1481.  * | mat    | M.Attack        | false       |
  1482.  * | mdf    | M.Defense       | false       |
  1483.  * | agi    | Agility         | false       |
  1484.  * | luk    | Luck            | false       |
  1485.  * ==========================================
  1486.  * | hit    | Hit Rate        | true        |
  1487.  * | eva    | Evasion         | true        |
  1488.  * | cri    | Critical Rate   | true        |
  1489.  * | cev    | Crit Evasion    | true        |
  1490.  * | mev    | Magic Evasion   | true        |
  1491.  * | mrf    | M. Reflection   | true        |
  1492.  * | cnt    | Counterattack   | true        |
  1493.  * | hrg    | HP Regen Rate   | true        |
  1494.  * | mrg    | MP Regen Rate   | true        |
  1495.  * | trg    | TP Regen Rate   | true        |
  1496.  * ==========================================
  1497.  * | tgr    | Target Rate     | true        |
  1498.  * | grd    | Guard Effect    | true        |
  1499.  * | rec    | Recovery Effect | true        |
  1500.  * | pha    | Pharmacology    | true        |
  1501.  * | mcr    | MP Cost Rate    | true        |
  1502.  * | tcr    | TP Cost Rate    | true        |
  1503.  * | pdr    | Phys Damage %   | true        |
  1504.  * | mdr    | Magic Damage %  | true        |
  1505.  * | fdr    | Floor Damage %  | true        |
  1506.  * | exr    | Exp Gain Rate   | true        |
  1507.  * ==========================================
  1508.  *
  1509.  * Additionally, you can control how the Parameter page is organized through
  1510.  * the "Param Formatting" options.  The parameters may be listed on their
  1511.  * respective page in up to three columns, and each column may independently
  1512.  * be given a different length and width for its information in order to
  1513.  * fine-tune the page's visual appearance.  The default values provided
  1514.  * match those used by default for the original parameters in the vanilla
  1515.  * version of the Status window.
  1516.  *
  1517.  * If any parameter location has a blank symbol, it will be interpreted as a blank
  1518.  * to be left on the parameter page and will be counted as one of the parameters in
  1519.  * its column.  This allows you to create visual groupings of parameters should you so desire.
  1520.  *
  1521.  * Note that assigning any column 0 parameters hides that column and those
  1522.  * after it.
  1523.  *
  1524.  * Want even more options with this?
  1525.  *
  1526.  * In place of a symbol, you can use elementRate(1) - with 1 being the element's ID here -
  1527.  * to put elemental rate data on the parameters page.  Likewise, stateRate(1) - with 1 as
  1528.  * the state's ID - will put state rate / resistance data on the parameters page in that slot.
  1529.  *
  1530.  * For both of these, the name will be autodetected if left blank.
  1531.  * Furthermore, if you leave the "Parameter # as %" option blank, it will
  1532.  * default to the global setting for elements or states set toward the bottom
  1533.  * of the options.
  1534.  *
  1535.  * You can select whether or not the value/category (again, global option) is
  1536.  * centered or right-aligned via option.  This can be set differently for elements and
  1537.  * states as a group, but not individually.  (If not centered, they will be right-aligned.)
  1538.  *
  1539.  *
  1540.  * Param Groupings
  1541.  * ==================
  1542.  * A new feature in 2.0.0 is the ability to use header grouping titles.
  1543.  * You can now put raw text within the parameter page for extra organization.
  1544.  * The row you specify is the row at which the text will be placed; all parameters
  1545.  * will shift around it, adjusting their rows instead.  No header titles will be
  1546.  * moved.
  1547.  *
  1548.  * Another new feature is the ability to have any row with blanks in one or more columns
  1549.  * to be recentered, visually filling in the holes as a result.  This can give the
  1550.  * effect of having extra columns.
  1551.  *
  1552.  * If you enable this option, but wish to preserve a particular blank or two, you
  1553.  * can insert empty headers in that location to preserve the space; just remember
  1554.  * that all parameters afterward will be offset.
  1555.  *
  1556.  *
  1557.  * Resistance Options
  1558.  * ==================
  1559.  * This plugin also provides a page to display elemental resistances on the
  1560.  * status page.  As the Elements are included in the "Terms" part of the
  1561.  * game database and are nearly all relevant in many game types, this page
  1562.  * is far easier to automatically generate.
  1563.  *
  1564.  * It is possible to hide certain elements by listing them within the
  1565.  * "Hidden Elements" parameter - make sure the values therein are
  1566.  * comma-separated.  Past that, you can control the arrangement of elements
  1567.  * into columns, though their ordering is determined by their numerical IDs.
  1568.  *
  1569.  * New in v 1.02 is the ability to classify resistance levels by text and/or
  1570.  * color visually within the Resistances tab.  You can set up to 8 thresholds
  1571.  * that define the different tiers of resistance, and all colors can be killed
  1572.  * with a single swap of the "Use Color" option.
  1573.  *
  1574.  * As for selecting the colors, you can go with one of the system default 32
  1575.  * options provided by RPG Maker (see img/system/Window.png), OR you can
  1576.  * define a color via hexadecimal value, like 0x006600 for a dark green.
  1577.  * This plugin will adapt to whichever choice you take.
  1578.  *
  1579.  *
  1580.  * Profile Options
  1581.  * ===============
  1582.  * By default, RPG Maker provides limited space to provide background info
  1583.  * for each actor.  With the extended Status window functionality provided
  1584.  * by this plugin, we gain more space, and as a result a more in-depth
  1585.  * profile can be provided in-game.
  1586.  *
  1587.  * To provide an extended profile for any particular actor, use the following
  1588.  * tags:
  1589.  *
  1590.  *
  1591.  * <portrait: x> - x must be the corresponding filename from the img/pictures
  1592.  * folder.  If an actor lacks this tag, a vanilla version of the Profile
  1593.  * will appear that is organized more closely to the standard Status window
  1594.  * appearance.
  1595.  *
  1596.  * For those who purchased the "Cover Art Characters Pack" and copied the data
  1597.  * into their projects, <Portrait: Package1_1> would be a good example use.
  1598.  *
  1599.  * <portrait scale: x> - Specifies the desired default scaling of the profile portrait.
  1600.  * x = 1 provides the default scaling behavior; x = 0.5 halves the size, while
  1601.  * x = 2 doubles it.  Note that the image is confined to within the profile
  1602.  * portrait window.
  1603.  *
  1604.  * If not provided, the scaling factor will default to 1 and use the original
  1605.  * image size.
  1606.  *
  1607.  *
  1608.  * <portrait offset: x, y> - Specifies a default offset from baseline automatic positioning
  1609.  * to use for the portrait.  (Enables somewhat manual positioning.)  Positive
  1610.  * x moves the image further right, while positive y moves the image further
  1611.  * down - but note that the image will be clipped as a result of such adjustments.
  1612.  * The profile window's border will automatically overwrite such parts of the
  1613.  * image; this cannot be helped.
  1614.  *
  1615.  *
  1616.  * <portrait anti-buffer: x> - Use to set a default adjustment for any transparency/whitespace
  1617.  * that your portraits cause on non-profile pages.  Positive values allow each page
  1618.  * to display over the left side of the portrait by the amount set, while negative values
  1619.  * provide additional buffering between the image and text.
  1620.  *
  1621.  * If this is too confusing, you can always edit the portrait to add/remove
  1622.  * whitespace - the system DOES look at image width, just not its contents.
  1623.  * This tag exists so that you don't HAVE to edit the contents.
  1624.  *
  1625.  *  * To provide full custom specs on a per-portrait basis, use the following tag structure
  1626.  * for any "portrait switch".  The default behavior for missing options can be selected
  1627.  * globally via plugin option.
  1628.  *
  1629.  *
  1630.  * If you want different portraits at different times for your actors:
  1631.  *
  1632.  * <portrait "filename" switch: s scale: z offset: x, y antibuffer: b>
  1633.  *
  1634.  * Note that filename and switch are absolutely required, while you can leave out the
  1635.  * scale, offset, and antibuffer components at your leisure.  (They'll use the default
  1636.  * values set by their individual tags as listed above.)  All data per portrait is
  1637.  * to be specified inside a single complex tag.  Aside from filename, all the other
  1638.  * details may be specified in whatever order you prefer; the restrictions mentioned here
  1639.  * are necessary to distinguish between tag types.
  1640.  *
  1641.  * The portrait switching behavior follows the same rules as for profile switching, as
  1642.  * mentioned later below.
  1643.  *
  1644.  * Please note that "filename" must be enclosed within double quotes - this is necessary
  1645.  * to allow spaces in the middle of a portrait's filename without breaking the ability
  1646.  * of this plugin to actually process the tag.
  1647.  *
  1648.  *
  1649.  * <profile>
  1650.  * Line 1 of extended backstory here...
  1651.  * Line 2...
  1652.  *
  1653.  * Even more backstory...
  1654.  * </profile>
  1655.  *
  1656.  *
  1657.  * Not satisfied with the limited two lines of background text alloted to you
  1658.  * by the base engine?  Feel free to write something much more in-depth via this
  1659.  * set of tags!  All whitespace will be recognized and preserved, allowing you
  1660.  * to easily write a paragraph or two.
  1661.  *
  1662.  * Do note, however, that there is no automatic line-breaking, as well as nothing
  1663.  * preventing your text from overlapping with your Actors' portraits.
  1664.  *
  1665.  * <profile Switch: x>
  1666.  * Line 1 of extended backstory here...
  1667.  * Line 2...
  1668.  *
  1669.  * Even more backstory...
  1670.  * </profile>
  1671.  *
  1672.  *
  1673.  * Want your baseline extended backstory to change after certain game events?
  1674.  * You can use the "Profile Switch" tag to create alternate text that only
  1675.  * activates when the selected Switch is On.
  1676.  *
  1677.  * In the case of conflict (via multiple Profile Switch tags meeting their
  1678.  * conditions) the earliest defined Profile Switch will be used.
  1679.  *
  1680.  *
  1681.  * One extra thing - you may freely use <hr> on its own line within a <profile> tag
  1682.  * to produce a horizontal line within the text profile!  (Any other text on that
  1683.  * line will block this.)
  1684.  *
  1685.  *
  1686.  * Page Selection
  1687.  * ==============
  1688.  * Each "Page _ Name" parameter allows you to specify the name of its
  1689.  * corresponding page on the Status menu.
  1690.  *
  1691.  * Each "Page _ Window" parameter allows you to choose a Window object to act
  1692.  * as a Status menu page.  Two have been provided by default, both based upon
  1693.  * the JAH_Window_Status_Base class.  
  1694.  *
  1695.  * Extending the JAH_Window_Status_Base class will allow you to create your OWN
  1696.  * custom windows that can be included as part of your game's status menu
  1697.  * option!  For the simplest provided example on how to use it, should you be
  1698.  * up to the coding involved, check the JAH_Window_Status_Profile class for how
  1699.  * to effectively do so.
  1700.  */
  1701.  
  1702. //========= OBJECT DEFINITIONS - RESULTS FROM PARAMETER PROCESSING ==========
  1703. //
  1704. // The objects defined here (before the plugin parameters are loaded) are all
  1705. // used to specify the layout and display patterns of the parameter-oriented
  1706. // window classes used within the Status menu.
  1707. //
  1708.  
  1709. // -------------------------------------------------------
  1710. // JAH_StatusMenuCore_ParamEntry
  1711. //
  1712. // Stores all data for one Parameter listing on the Parameter page.
  1713. // Localizes all its info and saves certain details for mild optimization.
  1714.  
  1715. function JAH_StatusMenuCore_ParamEntry() {
  1716.         this.initialize.apply(this, arguments);
  1717. }
  1718.  
  1719. JAH_StatusMenuCore_ParamEntry.prototype.constructor = JAH_StatusMenuCore_ParamEntry;
  1720.  
  1721. JAH_StatusMenuCore_ParamEntry.prototype.initialize = function(symbol, name, asPercent, txtWidth, valWidth, align) {
  1722.         this._eval = "window._actor." + symbol;
  1723.  
  1724.         this._symbol = symbol;
  1725.         this._name = name;
  1726.         this._asPercent = asPercent || false;
  1727.         this._txtWidth = txtWidth;
  1728.         this._valWidth = valWidth;
  1729.         this._align = align || 'right';
  1730. };
  1731.  
  1732. JAH_StatusMenuCore_ParamEntry.prototype.initName = function() {
  1733.  
  1734.         var name = this._name;
  1735.  
  1736.         // Grab default name.
  1737.         if(name == undefined || name.trim() == "")
  1738.         {
  1739.                 switch(this._symbol)
  1740.                 {
  1741.                         case 'atk':
  1742.                                 name = TextManager.param(2);
  1743.                                 break;
  1744.                         case 'def':
  1745.                                 name = TextManager.param(3);
  1746.                                 break;
  1747.                         case 'mat':
  1748.                                 name = TextManager.param(4);
  1749.                                 break;
  1750.                         case 'mdf':
  1751.                                 name = TextManager.param(5);
  1752.                                 break;
  1753.                         case 'agi':
  1754.                                 name = TextManager.param(6);
  1755.                                 break;
  1756.                         case 'luk':
  1757.                                 name = TextManager.param(7);
  1758.                                 break;
  1759.                         case 'hit':
  1760.                                 name = TextManager.param(8);
  1761.                                 break;
  1762.                         case 'eva':
  1763.                                 name = TextManager.param(9);
  1764.                                 break;
  1765.                         default:
  1766.                                 name = "undefined";
  1767.                 }
  1768.         }
  1769.  
  1770.         this._name = name;
  1771. }
  1772.  
  1773. JAH_StatusMenuCore_ParamEntry.prototype.draw = function(window, x, y, columnPadding) {
  1774.  
  1775.         if(!this._name) this.initName();
  1776.  
  1777.         window.changeTextColor(window.systemColor());
  1778.         window.drawText(this._name, x, y, this._txtWidth);
  1779.         window.resetTextColor();
  1780.  
  1781.         var value = eval(this._eval);
  1782.  
  1783.         if(this._asPercent)
  1784.         {
  1785.                 value = Math.round(value * 100) + "%";
  1786.         }
  1787.  
  1788.         window.drawText(value, x + this._txtWidth, y, this._valWidth, this._align);
  1789. };
  1790.  
  1791. // -------------------------------------------------------
  1792. // JAH_StatusMenuCore_ResistEntry
  1793. //
  1794. // Stores all data for one Resistance listing on the Parameter page.
  1795. // Localizes all its info and saves certain details for mild optimization.
  1796.  
  1797. function JAH_StatusMenuCore_ResistEntry() {
  1798.         this.initialize.apply(this, arguments);
  1799. }
  1800.  
  1801. JAH_StatusMenuCore_ResistEntry.prototype.constructor = JAH_StatusMenuCore_ResistEntry;
  1802.  
  1803. JAH_StatusMenuCore_ResistEntry.prototype.initialize = function(symbol, name, asPercent, txtWidth, valWidth, align) {
  1804.         this._eval = "window._actor." + symbol;
  1805.  
  1806.         this._symbol = symbol;
  1807.         this._name = name;
  1808.  
  1809.         if(asPercent === undefined || asPercent == "")
  1810.         {
  1811.                 if(symbol == "pdr" || symbol == "mdr" || symbol.indexOf("elementRate") > -1)
  1812.                 {
  1813.                         asPercent = JahwsUF.StatusMenuCore.Param.DisplayElePercents;
  1814.                 }
  1815.                 else asPercent = JahwsUF.StatusMenuCore.Param.DisplayStatePercents;
  1816.         }
  1817.  
  1818.         this._asPercent = asPercent || false;
  1819.         this._txtWidth = txtWidth;
  1820.         this._valWidth = valWidth;
  1821.         this._align = align || 'right';
  1822. };
  1823.  
  1824. JAH_StatusMenuCore_ResistEntry.prototype.initName = function() {
  1825.  
  1826.         var name = this._name;
  1827.  
  1828.         // Grab default name.
  1829.         if(name === undefined || name.trim() == "")
  1830.         {
  1831.                 if(this._symbol.match(/elementRate\((\d+)\)/i))
  1832.                 {
  1833.                         var elementID = RegExp.$1;
  1834.  
  1835.                         name = $dataSystem.elements[elementID];
  1836.  
  1837.                         if(name == undefined) name = "undefined";
  1838.                 }
  1839.                 else if(this._symbol.match(/stateRate\((\d+)\)/i))
  1840.                 {
  1841.                         var stateID = RegExp.$1;
  1842.  
  1843.                         var state = $dataStates[stateID];
  1844.  
  1845.                         if(!!state)
  1846.                         {
  1847.                                 name = state.name;
  1848.                         }
  1849.                         else name = "undefined";
  1850.                 }
  1851.                 else name = "undefined";  // includes if they don't name pdr or mdr.
  1852.         }
  1853.  
  1854.         this._name = name;
  1855. }
  1856.  
  1857. JAH_StatusMenuCore_ResistEntry.prototype.categorizePercentValue = function(val) {
  1858.  
  1859.         for(var i = 0; i < JahwsUF.StatusMenuCore.Constants.MaxCategories; i++)
  1860.         {
  1861.                 if(val >= JahwsUF.StatusMenuCore.Param.ResistanceThresholds[i])
  1862.                 {
  1863.                         return i;
  1864.                 }
  1865.         }
  1866.  
  1867.         return 7;
  1868. }
  1869.  
  1870. JAH_StatusMenuCore_ResistEntry.prototype.draw = function(window, x, y, columnPadding) {
  1871.  
  1872.         if(!this._name) this.initName();
  1873.  
  1874.         window.changeTextColor(window.systemColor());
  1875.         window.drawText(this._name, x, y, this._txtWidth);
  1876.         window.resetTextColor();
  1877.  
  1878.         var value = eval(this._eval);
  1879.         var categoryIndex = this.categorizePercentValue(value);
  1880.  
  1881.         if(this._asPercent)
  1882.         {
  1883.                 value = Math.round(value * 100) + "%";
  1884.         }
  1885.         else
  1886.         {
  1887.                 // Resistance categorization.
  1888.                 value = JahwsUF.StatusMenuCore.Param.ResistanceLabels[categoryIndex];
  1889.         }
  1890.  
  1891.         // Check color details too!
  1892.         var color = JahwsUF.StatusMenuCore.Param.ResistanceColors[categoryIndex];
  1893.  
  1894.         // Initialization automatically undefines all colors if they're not to be used.
  1895.         if(color != undefined)
  1896.         {
  1897.                 if(JahwsUF.StatusMenuCore.Param.ResistanceSysColors[categoryIndex] == false)
  1898.                         window.changeTextColor(color);  // We interpreted a hex color.
  1899.                 else window.changeTextColor(window.textColor(color));
  1900.         }
  1901.  
  1902.         window.drawText(value, x + this._txtWidth, y, this._valWidth, this._align);
  1903.         window.resetTextColor();
  1904. };
  1905.  
  1906. function JAH_StatusMenuCore_EnhancedPortrait() {
  1907.         this.initialize.apply(this, arguments);
  1908. }
  1909.  
  1910. JAH_StatusMenuCore_EnhancedPortrait.prototype.constructor = JAH_StatusMenuCore_EnhancedPortrait;
  1911.  
  1912. JAH_StatusMenuCore_EnhancedPortrait.prototype.initialize = function(imageName, switchID, scale, offset, padding) {
  1913.         this.Portrait = imageName;
  1914.         this.Switch = switchID;
  1915.         this.Scale = scale;
  1916.         this.Offset = offset;
  1917.         this.BorderAdjustment = padding;
  1918. };
  1919.  
  1920. // -------------------------------------------------------
  1921. // JAH_StatusMenuCore_HeaderEntry
  1922. //
  1923. // Stores a text header for insertion within a parameter page,
  1924. // allowing custom text in the page's body.
  1925.  
  1926. function JAH_StatusMenuCore_HeaderEntry() {
  1927.         this.initialize.apply(this, arguments);
  1928. }
  1929.  
  1930. JAH_StatusMenuCore_HeaderEntry.prototype.constructor = JAH_StatusMenuCore_HeaderEntry;
  1931.  
  1932. JAH_StatusMenuCore_HeaderEntry.prototype.initialize = function(text, colsToMerge, page, align) {
  1933.         this._text = text;
  1934.         this._knownWidth = 0;
  1935.  
  1936.         var colData = page.Columns;
  1937.  
  1938.         for(var c = 0; c < colsToMerge.length; c++)
  1939.         {
  1940.                 var col = colsToMerge[c];
  1941.                 this._knownWidth += colData[col].TextWidth + colData[col].ValueWidth;  // absorb the standard column entry space.
  1942.         }
  1943.  
  1944.         // How many EXTRA columns did we absorb? (Don't count the first in padding calcs.)
  1945.         this._colsToMerge = colsToMerge.length - 1;
  1946.         this._align = align || 'center';
  1947. };
  1948.  
  1949. JAH_StatusMenuCore_HeaderEntry.prototype.draw = function(window, x, y, columnPadding) {
  1950.  
  1951.         if(!this._text) return;
  1952.  
  1953.         window.changeTextColor(window.systemColor());
  1954.  
  1955.         var width = this._knownWidth + columnPadding * this._colsToMerge;
  1956.  
  1957.         window.drawText(this._text, x, y, width, this._align);
  1958.         window.resetTextColor();
  1959. };
  1960.  
  1961. // -------------------------------------------------------
  1962. // JAH_StatusMenuCore_BlankEntry
  1963. //
  1964. // A completely empty entry in the parameter page.  Generally used when a
  1965. // HeaderEntry to the left absorbs the position this one fills, to keep the buffer.
  1966.  
  1967. function JAH_StatusMenuCore_BlankEntry() {
  1968.         this.initialize.apply(this, arguments);
  1969. }
  1970.  
  1971. JAH_StatusMenuCore_BlankEntry.prototype.constructor = JAH_StatusMenuCore_BlankEntry;
  1972.  
  1973. JAH_StatusMenuCore_BlankEntry.prototype.initialize = function() {
  1974. };
  1975.  
  1976. JAH_StatusMenuCore_BlankEntry.prototype.draw = function(window, x, y, columnPadding) {
  1977.         return;
  1978. };
  1979.  
  1980.  
  1981. //=============== START PARAMETER INITIALIZATION ===========================
  1982.  
  1983. JahwsUF.StatusMenuCore = JahwsUF.StatusMenuCore || {};
  1984.  
  1985. JahwsUF.StatusMenuCore.Parameters = PluginManager.parameters('JAH_StatusMenuCore');
  1986.  
  1987. JahwsUF.StatusMenuCore.Param = JahwsUF.StatusMenuCore.Param || {};
  1988.  
  1989. // For extra parameter pages - a plugin extension.
  1990. // Each parameter page will store its data in the array under its own page ID.
  1991. // The page will be constructed from a base window class that takes in the ID,
  1992. // making the copied code in the extension absolutely minimal.
  1993.  
  1994. JahwsUF.StatusMenuCore.Constants = {};
  1995. JahwsUF.StatusMenuCore.Constants.MaxPageColumns   = 3;
  1996. JahwsUF.StatusMenuCore.Constants.MaxPageCount     = 6;
  1997. JahwsUF.StatusMenuCore.Constants.MaxPageGroupings = 10;
  1998. JahwsUF.StatusMenuCore.Constants.MaxCategories    = 8;
  1999. JahwsUF.StatusMenuCore.Constants.MaxPageEntries   = 48;
  2000.  
  2001. JahwsUF.StatusMenuCore.Param.ParamPages           = [];
  2002. JahwsUF.StatusMenuCore.Param.ParamPages[0]        = {};
  2003.  
  2004. // Column data is implied with the data storage pattern here.
  2005. JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns       = [];
  2006. JahwsUF.StatusMenuCore.Param.ParamPages[0].ColWidths     = [];
  2007.  
  2008. // JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns[i].TextWidth
  2009. // JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns[i].ValueWidth
  2010. // JahwsUF.StatusMenuCore.Param.ParamPages[0].Columns[i].Entries = [];  // Entries will contain special organization objects!
  2011. // JahwsUF.StatusMenuCore.Param.ParamPages[0].DisplayEquips
  2012.  
  2013. JahwsUF.StatusMenuCore.Param.ResistPages                           = {};
  2014. JahwsUF.StatusMenuCore.Param.ResistPages.Elements                  = {};
  2015. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns          = [];
  2016. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.ColWidths        = [];
  2017. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.RebalanceColumns = false;
  2018. JahwsUF.StatusMenuCore.Param.ResistPages.Elements.DisplayEquips    = false;
  2019. JahwsUF.StatusMenuCore.Param.ResistPages.States                    = {};
  2020. JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns            = [];
  2021. JahwsUF.StatusMenuCore.Param.ResistPages.States.RebalanceColumns   = {};
  2022. JahwsUF.StatusMenuCore.Param.ResistPages.States.ColWidths          = [];
  2023. JahwsUF.StatusMenuCore.Param.ResistPages.States.DisplayEquips      = false;
  2024.  
  2025.  
  2026. // JahwsUF.StatusMenuCore.Param.EleResistsInColumn             = [];
  2027. // JahwsUF.StatusMenuCore.Param.StateResistsInColumn           = [];
  2028.  
  2029. JahwsUF.StatusMenuCore.Param.PageNames            = [];
  2030. JahwsUF.StatusMenuCore.Param.PageWindows          = [];
  2031.  
  2032. JahwsUF.StatusMenuCore.Param.ResistanceColors     = [];
  2033. JahwsUF.StatusMenuCore.Param.ResistanceSysColors  = [];
  2034. JahwsUF.StatusMenuCore.Param.ResistanceLabels     = [];
  2035. JahwsUF.StatusMenuCore.Param.ResistanceThresholds = [];
  2036.  
  2037. JahwsUF.StatusMenuCore.Param.Portraits            = [];
  2038. JahwsUF.StatusMenuCore.Param.ExtendedProfiles     = [];
  2039. JahwsUF.StatusMenuCore.Param.SwitchedProfiles     = [];
  2040.  
  2041. // Keep all local variables in here as purely local.
  2042. // Used to obtain and initialize all plugin parameters.
  2043. (function() {
  2044.  
  2045. // For the core plugin, the page ID is automatically set, rather than read from the plugin.
  2046.  
  2047. var paramPageId = 0;
  2048.  
  2049. // Read in page specification data.
  2050.  
  2051. var totalPages = 0;
  2052.  
  2053. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageCount; i++) {
  2054.   var line = "JahwsUF.StatusMenuCore.Parameters['Page " + i + " Name']";
  2055.   var name = eval(line);
  2056.   line = "JahwsUF.StatusMenuCore.Parameters['Page " + i + " Window']";
  2057.   var page = eval(line);
  2058.  
  2059.   if(!(name == undefined || page == undefined || name == '' || page == ''))
  2060.   {
  2061.         JahwsUF.StatusMenuCore.Param.PageNames[totalPages] = name;
  2062.         JahwsUF.StatusMenuCore.Param.PageWindows[totalPages] = page;
  2063.  
  2064.         totalPages++;
  2065.   }
  2066. }
  2067.  
  2068. JahwsUF.StatusMenuCore.Param.TotalPages = totalPages;
  2069.  
  2070. // Step 1:  Read in the param column formatting data.  
  2071. // 1)  How many entries per column?
  2072. // 2)  How many columns on the page?
  2073. // 3)  How wide should the columns be?
  2074.  
  2075. var colCount = 1;
  2076. var column = {};
  2077.  
  2078. var totalColumnWidths = 0;
  2079. var MaxColumnLength = 0;
  2080.  
  2081. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageColumns; i++)
  2082. {
  2083.         var line = "Number(JahwsUF.StatusMenuCore.Parameters['Params in Col " + i + "'])";
  2084.         var count = eval(line);
  2085.  
  2086.         if(count == '' || count == undefined || isNaN(count))
  2087.         {
  2088.                 if(i == 1) count = 8;
  2089.                 else count = 0;
  2090.         }
  2091.  
  2092.         if(count > MaxColumnLength) MaxColumnLength = count;
  2093.  
  2094.         line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " Text Width'])";
  2095.         var textWidth = eval(line);
  2096.  
  2097.         if(textWidth == '' || textWidth == undefined || isNaN(textWidth))
  2098.         {
  2099.                 textWidth = 160;
  2100.         }
  2101.  
  2102.         line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " Value Width'])";
  2103.         var valWidth = eval(line);
  2104.  
  2105.         if(valWidth == '' || valWidth == undefined || isNaN(valWidth))
  2106.         {
  2107.                 valWidth = 60;
  2108.         }
  2109.  
  2110.         column.Size = count;
  2111.         column.TextWidth = textWidth;
  2112.         column.ValueWidth = valWidth;
  2113.  
  2114.         // Holds all displayables for the column.  In particular, pre-computed objects
  2115.         // corresponding to the game designer's desired page specification.
  2116.         //
  2117.         // This is done here at load time for optimization and reduction of windowing code
  2118.         // complexity.  (Object orientation = good.)
  2119.         //
  2120.         // Admittedly, I don't pre-analyze the final positions based on resolution, in case
  2121.         // someone eventually makes a dynamically resolution-changing plugin.
  2122.  
  2123.         column.Entries = [];   // An EXTREMELY important field.
  2124.  
  2125.         if(count == 0)
  2126.         {
  2127.                 break;
  2128.         }
  2129.         else
  2130.         {
  2131.                 JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].Columns[i-1] = column;
  2132.                 column = {};
  2133.  
  2134.                 colCount = i;               
  2135.                 totalColumnWidths += textWidth + valWidth;
  2136.         }
  2137. }
  2138.  
  2139. // Display equipment options.  (It's a part of the makeup of a page.)
  2140.  
  2141. JahwsUF.StatusMenuCore.Param.DisplayEquips = JahwsUF.StatusMenuCore.Parameters['Display Equips?'];
  2142. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].DisplayEquips = JahwsUF.StatusMenuCore.Parameters['Display Equips?'];
  2143.  
  2144. var equipWidth = Number(JahwsUF.StatusMenuCore.Parameters['Equip Column Width']);
  2145.  
  2146. if(equipWidth == '' || equipWidth == undefined || isNaN(equipWidth))
  2147. {
  2148.         equipWidth = 320;
  2149. }
  2150.  
  2151. var pdr_mdr_asResists = eval(JahwsUF.StatusMenuCore.Parameters['pdr/mdr as Resists']);
  2152.  
  2153. if(pdr_mdr_asResists != true)
  2154.         pdr_mdr_asResists = false;
  2155.  
  2156. var rebalance = eval(JahwsUF.StatusMenuCore.Parameters['Rebalance Emptiness']);
  2157.  
  2158. if(rebalance != true)
  2159.         rebalance = false;
  2160. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].RebalanceColumns = rebalance;
  2161.  
  2162. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].EquipColumnWidth = equipWidth;
  2163. JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].RequiredColumnWidth = totalColumnWidths;
  2164.  
  2165. // Read in parameter grouping title spec data.  Construct their page entries now so that
  2166. // we can detect what page positions are occupied and make the necessary adjustments.
  2167.  
  2168. var GroupingTitles = [];
  2169. var GroupingRows = [];
  2170. var GroupingCols = [];
  2171.  
  2172. var pageSpecs = JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId];
  2173.  
  2174. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageGroupings; i++)
  2175. {
  2176.         GroupingTitles[i] = JahwsUF.StatusMenuCore.Parameters['Grouping Title ' + i];
  2177.  
  2178.         GroupingRows[i] = Number(JahwsUF.StatusMenuCore.Parameters['Row Placement ' + i]);
  2179.         if(!GroupingRows[i])
  2180.                 GroupingRows[i] = undefined;
  2181.         else GroupingRows[i]--;
  2182.  
  2183.         var colSpec = JahwsUF.StatusMenuCore.Parameters['Group Columns ' + i ];
  2184.  
  2185.         if(colSpec && colSpec.trim() != "")
  2186.         {
  2187.                 line = '[' + colSpec + ']';
  2188.  
  2189.                 GroupingCols[i] = eval(line);
  2190.  
  2191.                 // Validate the column data.
  2192.                 for(var j = 1; j < GroupingCols[i].length; j++)
  2193.                 {
  2194.                         if(GroupingCols[i][j] != GroupingCols[i][0] + j)
  2195.                                 throw "Columns to be grouped on the Status window Parameter page must be adjacent!";
  2196.                 }
  2197.  
  2198.                 for(var j = 0; j < GroupingCols[i].length; j++)
  2199.                 {
  2200.                         GroupingCols[i][j]--;
  2201.                 }
  2202.         }
  2203.  
  2204.         // If we actually are defining a header grouping.
  2205.         if(GroupingRows[i] != undefined)
  2206.         {
  2207.                 var entry = new JAH_StatusMenuCore_HeaderEntry(GroupingTitles[i], GroupingCols[i], pageSpecs);
  2208.                 pageSpecs.Columns[GroupingCols[i][0]].Entries[GroupingRows[i]] = entry;
  2209.  
  2210.                 for(var j = 1; j < GroupingCols[i].length; j++)
  2211.                 {
  2212.                         var c = GroupingCols[i][j];
  2213.  
  2214.                         pageSpecs.Columns[c].Entries[GroupingRows[i]] = new JAH_StatusMenuCore_BlankEntry();
  2215.                 }
  2216.         }
  2217. }
  2218.  
  2219. // Analyze the text grouping headers and pre-compute any needed adjustments to param entry placement.
  2220. // If a slot is occupied, map all parameters previously positioned here or below down an extra row.
  2221. // (can occur multiple times)
  2222.  
  2223. var EntryMapping = [];  // This 2D array will hold the positions at which parameters ought be placed
  2224.                         // within each column.
  2225.  
  2226. var colWidths = JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].ColWidths;
  2227.  
  2228. for(var c = 0; c < pageSpecs.Columns.length; c++)
  2229. {
  2230.         EntryMapping[c] = [];  // [column][row]
  2231.         var row = 0;
  2232.  
  2233.         for(var r = 0; row < pageSpecs.Columns[c].Size; r++)
  2234.         {
  2235.                 // All headers and intentional blanks are already defined.
  2236.                 // Parameters are not, so we find empty spaces and make note of
  2237.                 // which parameter in the column gets mapped to each.
  2238.  
  2239.                 if(pageSpecs.Columns[c].Entries[r] === undefined)  
  2240.                 {
  2241.                         EntryMapping[c][row] = r;
  2242.                         row++;
  2243.                 }
  2244.                 else
  2245.                 {
  2246.                         colWidths[r] = (colWidths[r] || 0) + 1;
  2247.                         continue;
  2248.                 }
  2249.         }
  2250. }
  2251.  
  2252. // Resistance alignment formatting data.  Awkwardly read here because its data needs
  2253. // to be passed into any resistance-oriented Param page entry structures when initialized.
  2254.  
  2255. // Only has bearing on the alignment of text within its page entry.  Does not affect the
  2256. // actual position of entries.
  2257.  
  2258. JahwsUF.StatusMenuCore.Param.CenterEleValues   = eval(JahwsUF.StatusMenuCore.Parameters['Center Ele. Values']);
  2259. JahwsUF.StatusMenuCore.Param.CenterStateValues = eval(JahwsUF.StatusMenuCore.Parameters['Center State Values']);
  2260.  
  2261. JahwsUF.StatusMenuCore.Param.CenterEleValues   = JahwsUF.StatusMenuCore.Param.CenterEleValues || false;
  2262. JahwsUF.StatusMenuCore.Param.CenterStateValues = JahwsUF.StatusMenuCore.Param.CenterStateValues || false;
  2263.  
  2264. // Read in parameter specification data.
  2265.  
  2266. var totalParams = 0;
  2267.  
  2268. var i = 1;
  2269.  
  2270. for (var columnPlacement = 0; columnPlacement < JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].Columns.length; columnPlacement++) {
  2271.  
  2272.         var currentColumn = JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId].Columns[columnPlacement];
  2273.  
  2274.         for (var row = 0; row < currentColumn.Size; row++) {
  2275.  
  2276.                 var line = "JahwsUF.StatusMenuCore.Parameters['Parameter " + i + " Symbol']";
  2277.                 var symbol = eval(line);
  2278.                 line = "JahwsUF.StatusMenuCore.Parameters['Parameter " + i + " Name']";
  2279.                 var name = eval(line);
  2280.                 line = "JahwsUF.StatusMenuCore.Parameters['Parameter " + i + " as %']";
  2281.                 var percent = eval(eval(line));
  2282.  
  2283.                 // Undefined = blank space on the parameter page.
  2284.                 if(symbol == '')
  2285.                         symbol = undefined;
  2286.  
  2287.                 if(!(symbol == undefined))
  2288.                 {
  2289.                         if(symbol.trim() == "")
  2290.                                 symbol = undefined;
  2291.                 }
  2292.  
  2293.                 // The precomputed position for this parameter.  
  2294.                 // Ex:  EntryMapping[0][1] maps the first column's second parameter to its actual line number,
  2295.                 // thus effectively to its eventual y-value when actually displayed in JAH_Window_Status_Params.
  2296.                 //
  2297.                 // (EntryMapping, as with many of my other arrays, are zero-based.)
  2298.                 var rowPlacement = EntryMapping[columnPlacement][row];
  2299.  
  2300.                 if(symbol)
  2301.                 {
  2302.                         if(symbol.indexOf("elementRate") != -1)
  2303.                         {
  2304.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2305.                         }
  2306.                         else if(pdr_mdr_asResists && (symbol == "pdr" || symbol == "mdr"))
  2307.                         {
  2308.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2309.                         }
  2310.                         else if(symbol.indexOf("stateRate") != -1)
  2311.                         {
  2312.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterStateValues ? 'center' : 'right');
  2313.                         }
  2314.                         else
  2315.                         {
  2316.                                 if(percent == undefined)
  2317.                                         percent = true;
  2318.  
  2319.                                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ParamEntry(symbol, name, percent, currentColumn.TextWidth, currentColumn.ValueWidth);
  2320.                         }
  2321.  
  2322.                         colWidths[rowPlacement] = (colWidths[rowPlacement] || 0) + 1;
  2323.                 }
  2324.  
  2325.                 totalParams++;
  2326.                 i++;
  2327.         }
  2328. }
  2329.  
  2330. JahwsUF.StatusMenuCore.Param.TotalParams = totalParams;
  2331.  
  2332. // Elemental resistances page option.
  2333.  
  2334. var eleTextWidth = Number(JahwsUF.StatusMenuCore.Parameters['Ele. Col Txt Width']);
  2335. if(eleTextWidth == '' || eleTextWidth == undefined || isNaN(eleTextWidth))
  2336. {
  2337.         eleTextWidth = 160;
  2338. }
  2339.  
  2340. var eleValWidth = Number(JahwsUF.StatusMenuCore.Parameters['Ele. Col Val Width']);
  2341. if(eleValWidth == '' || eleValWidth == undefined || isNaN(eleValWidth))
  2342. {
  2343.         eleValWidth = 80;
  2344. }
  2345.  
  2346. var resistanceColumnCount = 1;
  2347.  
  2348. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageColumns; i++)
  2349. {
  2350.         var line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " Elements'])";
  2351.         var eles = eval(line);
  2352.         //JahwsUF.StatusMenuCore.Param.EleResistsInColumn[i-1] = eles;
  2353.  
  2354.         if(eles == 0 || eles == '' || isNaN(eles))
  2355.         {
  2356.                 break;
  2357.         }
  2358.         else
  2359.         {
  2360.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1]            = {};
  2361.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].TextWidth  = eleTextWidth;
  2362.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].ValueWidth = eleValWidth;
  2363.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].Entries    = [];
  2364.                 JahwsUF.StatusMenuCore.Param.ResistPages.Elements.Columns[i-1].Size       = eles;
  2365.  
  2366.                 resistanceColumnCount = i;
  2367.         }
  2368. }
  2369.  
  2370. //JahwsUF.StatusMenuCore.Param.EleResistsColumnCount = resistanceColumnCount;
  2371.  
  2372. var elementsToOmit = eval("[" + JahwsUF.StatusMenuCore.Parameters['Hidden Elements'] + "]");
  2373.  
  2374. if(elementsToOmit == undefined)
  2375. {
  2376.         elementsToOmit = [];
  2377. }
  2378.  
  2379. //JahwsUF.StatusMenuCore.Param.EleResistsToHide = elementsToOmit;
  2380.  
  2381. // --------- Construct elemental resist page entry layout ------------
  2382. var eleHeader = JahwsUF.StatusMenuCore.Parameters['Ele. Resist Header'];
  2383.  
  2384. if(eleHeader == undefined)
  2385.         eleHeader == "";
  2386.  
  2387. if(typeof eleHeader == "string" && eleHeader.trim() == "")
  2388.         eleHeader = "";
  2389.  
  2390. var eleRowOffset = 0;
  2391. var elePage = JahwsUF.StatusMenuCore.Param.ResistPages.Elements;
  2392.  
  2393. if(eleHeader != "")
  2394. {
  2395.         eleRowOffset = 2; // We insert two lines for the text title.
  2396.  
  2397.         // Insert header into the page construction!
  2398.         var colCount = elePage.Columns.length;
  2399.  
  2400.         var mergeCols = [];
  2401.         for(var i = 0; i < colCount; i++)
  2402.                 mergeCols.push(i);
  2403.  
  2404.         elePage.Columns[0].Entries[0] = new JAH_StatusMenuCore_HeaderEntry(eleHeader, mergeCols, elePage);
  2405.         elePage.Columns[0].Entries[1] = new JAH_StatusMenuCore_HeaderEntry("", mergeCols, elePage);
  2406.  
  2407.         elePage.ColWidths[0] = colCount;
  2408.         elePage.ColWidths[1] = colCount;
  2409.  
  2410.         for(var i = 1; i < colCount; i++)
  2411.         {
  2412.                 elePage.Columns[i].Entries[0] = new JAH_StatusMenuCore_BlankEntry();
  2413.                 elePage.Columns[i].Entries[1] = new JAH_StatusMenuCore_BlankEntry();
  2414.         }
  2415. }
  2416.  
  2417. var i = 1;
  2418.  
  2419. for (var columnPlacement = 0; columnPlacement < elePage.Columns.length; columnPlacement++) {
  2420.  
  2421.         var currentColumn = elePage.Columns[columnPlacement];
  2422.  
  2423.         for (var row = 0; row < currentColumn.Size; row++) {
  2424.  
  2425.                 while(elementsToOmit.indexOf(i) > -1)
  2426.                 {
  2427.                         i++;
  2428.                 }
  2429.  
  2430.                 var rowPlacement = row + eleRowOffset;
  2431.  
  2432.                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry("elementRate(" + i + ")", undefined, undefined, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2433.                 elePage.ColWidths[rowPlacement] = (elePage.ColWidths[rowPlacement] || 0) + 1;
  2434.  
  2435.                 i++;
  2436.         }
  2437. }
  2438.  
  2439. //JahwsUF.StatusMenuCore.Param.EleResistsHeader = eleHeader;
  2440.  
  2441. var displayPercents = eval(JahwsUF.StatusMenuCore.Parameters['Display Ele. Percent']);
  2442. if(displayPercents == undefined) displayPercents = true;
  2443. JahwsUF.StatusMenuCore.Param.DisplayElePercents = displayPercents;
  2444.  
  2445. // -----------------------------
  2446.  
  2447. // State resistances page option.
  2448.  
  2449. // State Col Txt Width
  2450. // State Col Val Width
  2451.  
  2452. var stateTextWidth = Number(JahwsUF.StatusMenuCore.Parameters['State Col Txt Width']);
  2453. if(stateTextWidth == '' || stateTextWidth == undefined || isNaN(stateTextWidth))
  2454. {
  2455.         stateTextWidth = 160;
  2456. }
  2457.  
  2458. var stateValWidth = Number(JahwsUF.StatusMenuCore.Parameters['State Col Val Width']);
  2459. if(stateValWidth == '' || stateValWidth == undefined || isNaN(stateValWidth))
  2460. {
  2461.         stateValWidth = 80;
  2462. }
  2463.  
  2464. resistanceColumnCount = 1;
  2465.  
  2466. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxPageColumns; i++)
  2467. {
  2468.         var line = "Number(JahwsUF.StatusMenuCore.Parameters['Column " + i + " States'])";
  2469.         var states = eval(line);
  2470.         //JahwsUF.StatusMenuCore.Param.StateResistsInColumn[i-1] = state;
  2471.  
  2472.         if(states == 0 || states == '' || isNaN(states))
  2473.         {
  2474.                 break;
  2475.         }
  2476.         else
  2477.         {
  2478.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1]            = {};
  2479.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].TextWidth  = stateTextWidth;
  2480.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].ValueWidth = stateValWidth;
  2481.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].Entries    = [];
  2482.                 JahwsUF.StatusMenuCore.Param.ResistPages.States.Columns[i-1].Size       = states;
  2483.                 resistanceColumnCount = i;
  2484.         }
  2485. }
  2486.  
  2487. //JahwsUF.StatusMenuCore.Param.StateResistsColumnCount = resistanceColumnCount;
  2488.  
  2489. var statesToOmit = eval("[" + JahwsUF.StatusMenuCore.Parameters['Hidden States'] + "]");
  2490.  
  2491. if(statesToOmit == undefined)
  2492. {
  2493.         statesToOmit = [];
  2494. }
  2495.  
  2496. //JahwsUF.StatusMenuCore.Param.StateResistsToHide = statesToOmit;
  2497.  
  2498. // --------- Construct elemental resist page entry layout ------------
  2499. var stateHeader = JahwsUF.StatusMenuCore.Parameters['State Resist Header'];
  2500.  
  2501. if(stateHeader == undefined)
  2502.         stateHeader == "";
  2503.  
  2504. if(typeof stateHeader == "string" && stateHeader.trim() == "")
  2505.         stateHeader = "";
  2506.  
  2507. var stateRowOffset = 0;
  2508. var statePage = JahwsUF.StatusMenuCore.Param.ResistPages.States;
  2509.  
  2510. if(stateHeader != "")
  2511. {
  2512.         stateRowOffset = 2; // We insert two lines for the text title.
  2513.  
  2514.         // Insert header into the page construction!
  2515.         var colCount = statePage.Columns.length;
  2516.  
  2517.         var mergeCols = [];
  2518.         for(var i = 0; i < colCount; i++)
  2519.                 mergeCols.push(i);
  2520.  
  2521.         statePage.Columns[0].Entries[0] = new JAH_StatusMenuCore_HeaderEntry(stateHeader, mergeCols, statePage);
  2522.         statePage.Columns[0].Entries[1] = new JAH_StatusMenuCore_HeaderEntry("", mergeCols, statePage);
  2523.  
  2524.         statePage.ColWidths[0] = colCount;
  2525.         statePage.ColWidths[1] = colCount;
  2526.  
  2527.         for(var i = 1; i < colCount; i++)
  2528.         {
  2529.                 statePage.Columns[i].Entries[0] = new JAH_StatusMenuCore_BlankEntry();
  2530.                 statePage.Columns[i].Entries[1] = new JAH_StatusMenuCore_BlankEntry();
  2531.         }
  2532. }
  2533.  
  2534. //JahwsUF.StatusMenuCore.Param.StateResistsHeader = stateHeader;
  2535.  
  2536. var i = 1;
  2537.  
  2538. for (var columnPlacement = 0; columnPlacement < statePage.Columns.length; columnPlacement++) {
  2539.  
  2540.         var currentColumn = statePage.Columns[columnPlacement];
  2541.  
  2542.         for (var row = 0; row < currentColumn.Size; row++) {
  2543.  
  2544.                 while(statesToOmit.indexOf(i) > -1)
  2545.                 {
  2546.                         i++;
  2547.                 }
  2548.  
  2549.                 var rowPlacement = row + stateRowOffset;
  2550.  
  2551.                 currentColumn.Entries[rowPlacement] = new JAH_StatusMenuCore_ResistEntry("stateRate(" + i + ")", undefined, undefined, currentColumn.TextWidth, currentColumn.ValueWidth, JahwsUF.StatusMenuCore.Param.CenterEleValues ? 'center' : 'right');
  2552.                 statePage.ColWidths[rowPlacement] = (statePage.ColWidths[rowPlacement] || 0) + 1;
  2553.  
  2554.                 i++;
  2555.         }
  2556. }
  2557.  
  2558. var displayStatePercents = eval(JahwsUF.StatusMenuCore.Parameters['Display State Percent']);
  2559. if(displayStatePercents == undefined) displayStatePercents = true;
  2560. JahwsUF.StatusMenuCore.Param.DisplayStatePercents = displayStatePercents;
  2561.  
  2562. // Resistance classification data loading
  2563.  
  2564. var useColors = eval(JahwsUF.StatusMenuCore.Parameters['Use Color']);
  2565. if(useColors == undefined) useColors = true;
  2566. JahwsUF.StatusMenuCore.Param.ResistancesInColor = useColors;
  2567.  
  2568. for (var i = 1; i <= JahwsUF.StatusMenuCore.Constants.MaxCategories; i++)
  2569. {
  2570.         var line = "JahwsUF.StatusMenuCore.Parameters['Category " + i + " Color']";
  2571.         var colorID = eval(line);
  2572.  
  2573.         if(colorID == undefined) colorID = "";
  2574.  
  2575.         if(colorID.trim() == "")
  2576.                 colorID = undefined;
  2577.  
  2578.         var sysColor = true;
  2579.  
  2580.         if(useColors == false || colorID == undefined)
  2581.                 colorID = undefined;
  2582.         else {
  2583.                 if(colorID.indexOf("0x") != -1)
  2584.                 {
  2585.                         sysColor = false;
  2586.                         colorID = "#" + colorID.substring(colorID.indexOf("0x") + 2);
  2587.                 }
  2588.                 else if(colorID.indexOf("#") != -1)
  2589.                 {
  2590.                         sysColor = false;
  2591.                 }
  2592.                 else colorID = Number(colorID);
  2593.         }
  2594.  
  2595.         line = "JahwsUF.StatusMenuCore.Parameters['Category " + i + " Text']";
  2596.         var text = eval(line);
  2597.  
  2598.         line = "Number(JahwsUF.StatusMenuCore.Parameters['Threshold " + i + "'])";
  2599.         var percent = eval(line);
  2600.  
  2601.         JahwsUF.StatusMenuCore.Param.ResistanceLabels[i-1] = text;
  2602.         JahwsUF.StatusMenuCore.Param.ResistanceColors[i-1] = colorID;
  2603.         JahwsUF.StatusMenuCore.Param.ResistanceSysColors[i-1] = sysColor;
  2604.         JahwsUF.StatusMenuCore.Param.ResistanceThresholds[i-1] = percent / 100.0;
  2605. }
  2606.  
  2607.  
  2608. // Other parameters
  2609.  
  2610. var colorID = JahwsUF.StatusMenuCore.Parameters['Color: XP Gauge 1'];
  2611. if(colorID == undefined) colorID = 30;
  2612. JahwsUF.StatusMenuCore.Param.ColorXpGauge1 = colorID;
  2613.  
  2614. var colorID = JahwsUF.StatusMenuCore.Parameters['Color: XP Gauge 2'];
  2615. if(colorID == undefined) colorID = 31;
  2616. JahwsUF.StatusMenuCore.Param.ColorXpGauge2 = colorID;
  2617.  
  2618. var hideXP = eval(JahwsUF.StatusMenuCore.Parameters['Hide XP Bar']);
  2619. if(hideXP == undefined) hideXP = false;
  2620. JahwsUF.StatusMenuCore.Param.XpHidden = hideXP;
  2621.  
  2622. var hideLv = eval(JahwsUF.StatusMenuCore.Parameters['Hide Levels']);
  2623. if(hideLv == undefined) hideLv = false;
  2624. JahwsUF.StatusMenuCore.Param.LvHidden = hideLv;
  2625.  
  2626. var xpDisplayMode = eval(JahwsUF.StatusMenuCore.Parameters['XP - Show Remaining']);
  2627. if(xpDisplayMode == undefined) xpDisplayMode = false;
  2628. JahwsUF.StatusMenuCore.Param.XpDisplayOnlyRemaining = xpDisplayMode;
  2629.  
  2630. var nicknameSetting = eval(JahwsUF.StatusMenuCore.Parameters['Header - Name + Nick']);
  2631. if(nicknameSetting == undefined) nicknameSetting = true;
  2632. JahwsUF.StatusMenuCore.Param.NicknameInHeaders = nicknameSetting;
  2633.  
  2634. var nicknameFormat = JahwsUF.StatusMenuCore.Parameters['Nickname Format'];
  2635. if(nicknameFormat == undefined) nicknameSetting = "";
  2636. JahwsUF.StatusMenuCore.Param.NicknameFormat = nicknameFormat;
  2637.  
  2638. var scrollFactor = eval(JahwsUF.StatusMenuCore.Parameters['Scroll Multiplier']);
  2639. if(scrollFactor == undefined) scrollFactor = 1;
  2640. JahwsUF.StatusMenuCore.Param.ScrollFactor = scrollFactor;
  2641.  
  2642. var imgBuffer = Number(JahwsUF.StatusMenuCore.Parameters['Portrait Img Adjust']);
  2643. if(imgBuffer == undefined) imgBuffer = 0;
  2644. JahwsUF.StatusMenuCore.Param.ImgBuffer = imgBuffer;
  2645.  
  2646. var portraitsAll = eval(JahwsUF.StatusMenuCore.Parameters['Portraits On All']);
  2647. if(portraitsAll == undefined) portraitsAll = true;
  2648. JahwsUF.StatusMenuCore.Param.DefaultPortrait = portraitsAll;
  2649.  
  2650. var headerScrolling = eval(JahwsUF.StatusMenuCore.Parameters['Scrolling Headers']);
  2651. if(headerScrolling == undefined) headerScrolling = true;
  2652. JahwsUF.StatusMenuCore.Param.HeaderScrolling = headerScrolling;
  2653.  
  2654. var tpDisplay = JahwsUF.StatusMenuCore.Parameters['Add TP Gauge'];
  2655.  
  2656. if (tpDisplay == undefined)
  2657.         tpDisplay = "";
  2658.  
  2659. if(tpDisplay.trim() == "" && Imported.YEP_CoreEngine)
  2660. {
  2661.         tpDisplay = eval(Yanfly.Param.MenuTpGauge);
  2662. }
  2663. else
  2664. {
  2665.         tpDisplay = eval(tpDisplay);
  2666.  
  2667.         if(tpDisplay == undefined) tpDisplay = false;
  2668. }
  2669.  
  2670. JahwsUF.StatusMenuCore.Param.TpGauge = tpDisplay;
  2671.  
  2672. var blankAfterTP = eval(JahwsUF.StatusMenuCore.Parameters['Blank after TP']);
  2673. if(blankAfterTP == undefined) blankAfterTP = true;
  2674. JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank = blankAfterTP && tpDisplay;
  2675.  
  2676.  
  2677. }());
  2678.  
  2679.  
  2680.  
  2681.  
  2682. //=============================================================================
  2683. // DataManager
  2684. //=============================================================================
  2685.  
  2686. JahwsUF.StatusMenuCore.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
  2687. DataManager.isDatabaseLoaded = function() {
  2688.     if (!JahwsUF.StatusMenuCore.DataManager_isDatabaseLoaded.call(this)) return false;
  2689.                 this.processActorNotetags($dataActors);
  2690.                 return true;
  2691. };
  2692.  
  2693. // It's not a method that exists in the base RPG Maker, but it's still wise to back up any older
  2694. // versions of this method.
  2695. JahwsUF.StatusMenuCore.DataManager_processActorNotetags = DataManager.processActorNotetags;
  2696.  
  2697. DataManager.processActorNotetags = function(group) {
  2698.  
  2699.         if(!!JahwsUF.StatusMenuCore.DataManager_processActorNotetags)
  2700.         {
  2701.                 JahwsUF.StatusMenuCore.DataManager_processActorNotetags.call(this, group);
  2702.         }
  2703.  
  2704.         // Stage 1 - analyze all baseline content.
  2705.  
  2706.         var profileStart = /<(?:PROFILE)>/i;
  2707.         var profileEnd = /<\/(?:PROFILE)>/i;
  2708.  
  2709.         var switchedProfileStart = /<(?:PROFILE SWITCH):[ ]*(\d+)>/i;
  2710.         var switchedProfileEnd = /<\/(?:PROFILE SWITCH)>/i;
  2711.  
  2712.         var offsetMatcher = /<(?:PORTRAIT OFFSET):[ ]*(\d+)\s*,\s*(\d+)>/i;
  2713.         var adjustMatcher = /<(?:PORTRAIT ANTI-BUFFER):[ ]*(-?\d+)>/i;
  2714.  
  2715.         for (var n = 1; n < group.length; n++) {
  2716.                 var obj = group[n];
  2717.  
  2718.                 var profile = "";
  2719.                 var profileSpec = false;
  2720.                 var profileSwitch = undefined;
  2721.  
  2722.                 // Set default value.
  2723.                 JahwsUF.StatusMenuCore.Param.SwitchedProfiles[n] = [];
  2724.  
  2725.                 // Base portrait parameters.
  2726.  
  2727.                 var portrait = undefined;
  2728.                 var DefaultScale = 1;
  2729.                 var DefaultOffset = [0, 0];
  2730.                 var DefaultAdjust = 0;
  2731.  
  2732.                 var notedata = obj.note.split(/\r?\n/);
  2733.  
  2734.                 for (var i = 0; i < notedata.length; i++) {
  2735.  
  2736.                         var line = notedata[i];
  2737.                         if (line.match(/<(?:PORTRAIT):[ ]([\w\s]+)>/i)) {
  2738.                                 portrait = RegExp.$1;
  2739.                                 if (portrait == '') portrait = undefined;
  2740.                                 else ImageManager.loadPicture(portrait);  // Pre-load it!  Otherwise, the first attempt to do so later will fail.
  2741.                         }
  2742.                         else if (line.match(/<(?:PORTRAIT SCALE):[ ]*(\d+.?\d+)>/i)) {
  2743.                                 DefaultScale = parseFloat(RegExp.$1);
  2744.                                 if (DefaultScale < 0) DefaultScale = 0;
  2745.                         } else if (line.match(offsetMatcher)) {
  2746.                                 DefaultOffset = [parseInt(RegExp.$1), parseInt(RegExp.$2)];
  2747.                         } else if (line.match(adjustMatcher)) {
  2748.                                 DefaultAdjust = parseInt(RegExp.$1);
  2749.                         } else if (line.match(profileStart)) {
  2750.                                 profileSpec = true;
  2751.                                 profile = "";
  2752.                                 profileSwitch = undefined;
  2753.                         } else if (line.match(switchedProfileStart)){
  2754.                                 profileSpec = true;
  2755.                                 profile = "";
  2756.                                 profileSwitch = parseInt(RegExp.$1);
  2757.                         } else if (line.match(profileEnd) || line.match(switchedProfileEnd)) {
  2758.                                 if(profileSwitch == undefined)
  2759.                                         JahwsUF.StatusMenuCore.Param.ExtendedProfiles[n] = profile;
  2760.                                 else
  2761.                                 {
  2762.                                         JahwsUF.StatusMenuCore.Param.SwitchedProfiles[n].push([profileSwitch, profile]);
  2763.                                 }
  2764.  
  2765.                                 profileSpec = false;
  2766.                         } else if (profileSpec) {
  2767.                                 if(profile != "")
  2768.                                         profile += "\n";
  2769.                                 profile += line;
  2770.                         }
  2771.                 }
  2772.  
  2773.                 // This sets the character's base portrait for this actor.
  2774.                 JahwsUF.StatusMenuCore.Param.Portraits[n] = [];
  2775.                 JahwsUF.StatusMenuCore.Param.Portraits[n][0]
  2776.                         = new JAH_StatusMenuCore_EnhancedPortrait(portrait, 0, DefaultScale, DefaultOffset, DefaultAdjust);
  2777.         }
  2778.  
  2779.         // Stage 2 - now that default parameters for Actor portraits are in place, we
  2780.         // read in all switched profiles.
  2781.  
  2782.         // New format:   <portrait "filename" switch: s scale: z offset: x, y antibuffer: b>
  2783.  
  2784.         // The below ought be safe - ':' is not a legal character in filenames.
  2785.  
  2786.         var portraitDetector = /<(?:PORTRAIT) \s*\"(.+?)\".+>/i;
  2787.         var offsetMatcher = /(?:OFFSET):[ ]*(\d+)\s*,\s*(\d+)/i;
  2788.         var adjustMatcher = /(?:ANTI-BUFFER):[ ]*(-?\d+)/i;
  2789.         var switchMatcher = /(?:SWITCH):[ ]*(\d+)\s*/i;
  2790.         var scaleMatcher  = /(?:SCALE):[ ]*(\d+.?\d+)/i
  2791.  
  2792.         for (var n = 1; n < group.length; n++) {
  2793.                 var obj = group[n];
  2794.  
  2795.                 var profile = "";
  2796.                 var profileSpec = false;
  2797.                 var profileSwitch = undefined;
  2798.  
  2799.                 // Assimilate the original portrait data here.
  2800.                 var DefaultScale = JahwsUF.StatusMenuCore.Param.Portraits[n][0].Scale;
  2801.                 var DefaultOffset = JahwsUF.StatusMenuCore.Param.Portraits[n][0].Offset;
  2802.                 var DefaultAdjust = JahwsUF.StatusMenuCore.Param.Portraits[n][0].BorderAdjustment;
  2803.  
  2804.                 var notedata = obj.note.split(/\r?\n/);
  2805.  
  2806.                 for (var i = 0; i < notedata.length; i++) {
  2807.  
  2808.                         var line = notedata[i];
  2809.                         if (line.match(portraitDetector)) {
  2810.                                 var portrait = RegExp.$1;
  2811.  
  2812.                                 if (portrait == '') portrait = undefined;
  2813.                                 else ImageManager.loadPicture(portrait);  // Pre-load it!  Otherwise, the first attempt to do so later will fail.
  2814.  
  2815.                                 // Now to read in the parameters.
  2816.  
  2817.                                 var switchID = -1;
  2818.                                 var scale  = DefaultScale;
  2819.                                 var offset = DefaultOffset;
  2820.                                 var adjust = DefaultAdjust;
  2821.  
  2822.                                 if (line.match(switchMatcher)) {
  2823.                                         switchID = parseInt(RegExp.$1);
  2824.                                 }
  2825.  
  2826.                                 if (line.match(scaleMatcher)) {
  2827.                                         scale = parseFloat(RegExp.$1);
  2828.                                         if (scale < 0) scale = 0;
  2829.                                 }
  2830.  
  2831.                                 if (line.match(offsetMatcher)) {
  2832.                                         offset = [parseInt(RegExp.$1), parseInt(RegExp.$2)];
  2833.                                 }
  2834.  
  2835.                                 if (line.match(adjustMatcher)) {
  2836.                                         adjust = parseInt(RegExp.$1);
  2837.                                 }
  2838.  
  2839.                                 if(switchID == 0)
  2840.                                 {
  2841.                                         JahwsUF.StatusMenuCore.Param.Portraits[n][0] = new JAH_StatusMenuCore_EnhancedPortrait(portrait, switchID, scale, offset, adjust);
  2842.                                 }
  2843.                                 else JahwsUF.StatusMenuCore.Param.Portraits[n].push(new JAH_StatusMenuCore_EnhancedPortrait(portrait, switchID, scale, offset, adjust));
  2844.                         }
  2845.                 }
  2846.         }
  2847. };
  2848.  
  2849. //================== END PARAMETER INITIALIZATION ===========================
  2850.  
  2851.  
  2852. //-----------------------------------------------------------------------------
  2853. // Window_Base
  2854. //
  2855. // A few extra methods/extensions for windows.
  2856.  
  2857. // It maps to Window.png, final row, last two colors.  A nice purple gradient by default.
  2858. Window_Base.prototype.xpGaugeColor1 = function() {
  2859.     return this.textColor(JahwsUF.StatusMenuCore.Param.ColorXpGauge1);
  2860. };
  2861.  
  2862. Window_Base.prototype.xpGaugeColor2 = function() {
  2863.     return this.textColor(JahwsUF.StatusMenuCore.Param.ColorXpGauge2);
  2864. };
  2865.  
  2866. Window_Base.prototype.xpColor = function(actor) {
  2867.     return this.normalColor();
  2868. };
  2869.  
  2870. Window_Base.prototype.drawActorXp = function(actor, x, y, width, hideNextLv) {
  2871.     width = width || 186;  // default value = 186.
  2872.     var color1 = this.xpGaugeColor1();
  2873.     var color2 = this.xpGaugeColor2();
  2874.  
  2875.         // Compute ratio and format appropriate values.
  2876.  
  2877.         var value1 = this._actor.currentExp() - this._actor.currentLevelExp();
  2878.         var value2 = this._actor.nextRequiredExp() + value1;
  2879.  
  2880.         var xpRate = value1 / value2;
  2881.  
  2882.     if (this._actor.isMaxLevel()) {
  2883.         value1 = 0;
  2884.         value2 = 0;
  2885.                 xpRate = 1;
  2886.     }
  2887.  
  2888.         var value3 = value2 - value1;
  2889.  
  2890.         // Only attempt this if YEP_CoreEngine is loaded; the digit-grouping function is defined there.
  2891.         if(Imported.YEP_CoreEngine)
  2892.         {
  2893.                 value1 = Yanfly.Util.toGroup(value1);
  2894.                 value2 = Yanfly.Util.toGroup(value2);
  2895.                 value3 = Yanfly.Util.toGroup(value3);
  2896.         }
  2897.  
  2898.         // Draw the gauge itself...
  2899.     this.drawGauge(x, y, width, xpRate, color1, color2);  // Should link to Yanfly's correctly.
  2900.     this.changeTextColor(this.systemColor());
  2901.  
  2902.         // Now for the text.  The FUN part.
  2903.         var spaceWidth = this.textWidth(" ");
  2904.         var expLabelWidth = this.textWidth(TextManager.expA);
  2905.  
  2906.         var expNext = TextManager.expNext.format(TextManager.levelA);
  2907.         var nextLvWidth = this.textWidth(expNext);
  2908.  
  2909.     this.drawText(TextManager.expA, x + width - expLabelWidth, y, expLabelWidth, 'right');
  2910.  
  2911.         if(!hideNextLv)
  2912.                 this.drawText(expNext, x, y, nextLvWidth);
  2913.  
  2914.         if(JahwsUF.StatusMenuCore.Param.XpDisplayOnlyRemaining)
  2915.                 this.drawExpRemaining(value3, x, y, width - expLabelWidth - spaceWidth, this.xpColor(actor));
  2916.         else
  2917.                 this.drawExpCurrentAndMax(value1, value2, x, y, width - expLabelWidth - spaceWidth,
  2918.                            this.xpColor(actor), this.normalColor());
  2919. };
  2920.  
  2921. Window_Base.prototype.drawExpRemaining = function(current, x, y, width, color) {
  2922.     this.changeTextColor(color);
  2923.     this.drawText(current, x, y, width, 'right');
  2924. };
  2925.  
  2926. Window_Base.prototype.drawExpCurrentAndMax = function(current, max, x, y,
  2927.                                                    width, color1, color2) {
  2928.     var labelWidth = this.textWidth('EXP');       
  2929.     var valueWidth = Math.max(this.textWidth('0000'), this.textWidth(max));  // Expands for more digits when necessary.
  2930.     var slashWidth = this.textWidth('/');
  2931.     var x1 = x + width - valueWidth;
  2932.     var x2 = x1 - slashWidth;
  2933.     var x3 = x2 - valueWidth;
  2934.  
  2935.         var fontSizeChange = 0;
  2936.  
  2937.         //Dynamic resizing if things get too cramped for the values.
  2938.         while(x3 < x + labelWidth)
  2939.         {
  2940.                 fontSizeChange += 4;
  2941.                 this.contents.fontSize -= 4;
  2942.  
  2943.                 valueWidth = Math.max(this.textWidth('0000'), this.textWidth(max));
  2944.                 slashWidth = this.textWidth('/');
  2945.                 x1 = x + width - valueWidth;
  2946.                 x2 = x1 - slashWidth;
  2947.                 x3 = x2 - valueWidth;
  2948.         }
  2949.  
  2950.     this.changeTextColor(color1);
  2951.     this.drawText(current, x3, y, valueWidth, 'right');
  2952.     this.changeTextColor(color2);
  2953.     this.drawText('/', x2, y, slashWidth, 'right');
  2954.     this.drawText(max, x1, y, valueWidth, 'right');
  2955.  
  2956.         this.contents.fontSize += fontSizeChange;
  2957. };
  2958.  
  2959.  
  2960.  
  2961. //-----------------------------------------------------------------------------
  2962. // Scene_Status
  2963. //
  2964. // The scene class of the status screen.  Based upon the original status screen,
  2965. // completely replacing it.
  2966.  
  2967. function Scene_Status() {
  2968.     this.initialize.apply(this, arguments);
  2969. }
  2970.  
  2971. Scene_Status.prototype = Object.create(Scene_MenuBase.prototype);
  2972. Scene_Status.prototype.constructor = Scene_Status;
  2973.  
  2974. Scene_Status.prototype.initialize = function() {
  2975.     Scene_MenuBase.prototype.initialize.call(this);
  2976. };
  2977.  
  2978. Scene_Status.prototype.create = function() {
  2979.     Scene_MenuBase.prototype.create.call(this);
  2980.  
  2981.         // Create the various status subwindows, pass them off to the pageMenuWindow.
  2982.         // It'll control which of them shows at any given point.
  2983.  
  2984.         // These two arrays track all needed data.
  2985.         // I'd use a Map, but apparently they're not supported well on mobile devices.  :(
  2986.         this._pageNames = [];
  2987.         this._pageWindows = [];
  2988.  
  2989.         // Each page is actually a window.
  2990.         // Now that we've got this structure in place, this could be parameterized on a plugin level!
  2991.  
  2992.         var paramPageId = 0;
  2993.  
  2994.         for(var i = 0; i < JahwsUF.StatusMenuCore.Param.TotalPages; i++)
  2995.         {
  2996.                 var window = JahwsUF.StatusMenuCore.Param.PageWindows[i];
  2997.  
  2998.                 var constructEval = "new " + window;
  2999.  
  3000.                 if(window == "JAH_Window_Status_Params")
  3001.                 {
  3002.                         constructEval = constructEval + "(" + paramPageId + ")";
  3003.  
  3004.                         if(JahwsUF.StatusMenuCore.Param.ParamPages[paramPageId] === undefined)
  3005.                                 throw "Parameter page ID " + paramPageId + " has no specification - cannot create!";
  3006.  
  3007.                         paramPageId++;
  3008.                 }
  3009.                 else if(window == "JAH_Window_Status_Resistances")  // For backward compatibility.
  3010.                 {
  3011.                         window = "JAH_Window_Elemental_Resistances";
  3012.                         constructEval = "new " + window;
  3013.                 }
  3014.                 else constructEval = constructEval + "()";
  3015.  
  3016.                 //JAH_Window_Status_Params
  3017.  
  3018.                 var page = eval(constructEval);
  3019.                 this.addWindow(page);
  3020.  
  3021.                 if(i != 0) page.hide(); // Page 0 shows by default.
  3022.  
  3023.                 this._pageNames.push(JahwsUF.StatusMenuCore.Param.PageNames[i]);
  3024.                 this._pageWindows.push(page);
  3025.         }
  3026.  
  3027.         // Now to initialize the core control window.
  3028.         this._statusWindow = new JAH_Window_Status_PageSelect(this._pageNames, this._pageWindows);
  3029.         this._statusWindow.setHandler('cancel',   this.popScene.bind(this));
  3030.     this._statusWindow.setHandler('pagedown', this.nextActor.bind(this));
  3031.     this._statusWindow.setHandler('pageup',   this.previousActor.bind(this));
  3032.         this.addWindow(this._statusWindow);
  3033.  
  3034.         if(JahwsUF.StatusMenuCore.Param.TotalPages == 1)
  3035.         {
  3036.                 // Hide the status submenu, reclaim its space for the lone window.
  3037.                 // The submenu still exists and is active for input commands.
  3038.                 this._statusWindow.hide();
  3039.  
  3040.                 var page = this._pageWindows[0];
  3041.  
  3042.                 // Forced resizing of the window.
  3043.                 // The drawing contents are unfortunately not replaced on a resize,
  3044.                 // so I force the resize in the second line below.
  3045.                 page.move(0, 0, Graphics.boxWidth, Graphics.boxHeight);
  3046.                 page.contents = new Bitmap(Graphics.boxWidth, Graphics.boxHeight);
  3047.         }
  3048.  
  3049.     this.refreshActor();
  3050. };
  3051.  
  3052. Scene_Status.prototype.refreshActor = function() {
  3053.     var actor = this.actor();
  3054.  
  3055.         for (var page of this._pageWindows) {
  3056.                 page.setActor(actor);
  3057.                 page.refresh();
  3058.         }
  3059. };
  3060.  
  3061. Scene_Status.prototype.onActorChange = function() {
  3062.         Scene_MenuBase.prototype.onActorChange.call(this);
  3063.  
  3064.         for(var page of this._pageWindows)
  3065.         {
  3066.                 page.setActor(this.actor());
  3067.         }
  3068.  
  3069.         this._statusWindow.activate();  // By default, the system will DEACTIVATE this window on page up or page down.
  3070. }
  3071.  
  3072.  
  3073.  
  3074. //-----------------------------------------------------------------------------
  3075. // JAH_Window_Status_PageSelect
  3076. //
  3077. // The Status menu window - allows selection of the Status page to be viewed.
  3078. //
  3079. // In case it's not otherwise clear within the code, it is THIS WINDOW that
  3080. // actually receives all the input commands, not the displayed Status window page.
  3081. //
  3082. // It forwards the resulting instructions to the other windows as appropriate.
  3083.  
  3084. function JAH_Window_Status_PageSelect() {
  3085.         this.initialize.apply(this, arguments);
  3086. }
  3087.  
  3088. JAH_Window_Status_PageSelect.prototype = Object.create(Window_HorzCommand.prototype);
  3089. JAH_Window_Status_PageSelect.prototype.constructor = JAH_Window_Status_PageSelect;
  3090.  
  3091. JAH_Window_Status_PageSelect.prototype.initialize = function(pageNames, pageWindows) {
  3092.  
  3093.         this._pageNames = pageNames;
  3094.         this._pageWindows = pageWindows;
  3095.  
  3096.     Window_HorzCommand.prototype.initialize.call(this, 0, 0);
  3097.         this.activate();
  3098.  
  3099.         this._activePage = this.currentSymbol();  // Tracks the previously-open window.
  3100. };
  3101.  
  3102. JAH_Window_Status_PageSelect.prototype.windowWidth = function() {
  3103.     return Graphics.boxWidth;
  3104. };
  3105.  
  3106. JAH_Window_Status_PageSelect.prototype.maxCols = function() {
  3107.     return this._pageNames.length;
  3108. };
  3109.  
  3110. JAH_Window_Status_PageSelect.prototype.update = function() {
  3111.  
  3112.     Window_HorzCommand.prototype.update.call(this);
  3113.  
  3114.         // Each "page" is actually a window.  We need to hide the old page and show the new one
  3115.         // upon any change in selected Status page option.
  3116.         this._activePage.hide();
  3117.         this._activePage = this.currentSymbol();
  3118.         this._activePage.show();
  3119.  
  3120. };
  3121.  
  3122. // Extended with wiring + linking for compatibility with other plugins, should they have
  3123. // a need to manually refresh the status windows.
  3124. JAH_Window_Status_PageSelect.prototype.refresh = function() {
  3125.  
  3126.         Window_HorzCommand.prototype.refresh.call(this);
  3127.  
  3128.         if(this._pageWindows)
  3129.         {
  3130.                 for(var i=0; i < this._pageWindows.length; i++)
  3131.                 {
  3132.                         this._pageWindows[i].refresh();
  3133.                 }
  3134.         }       
  3135. };
  3136.  
  3137. JAH_Window_Status_PageSelect.prototype.makeCommandList = function() {
  3138.  
  3139.         // Dynamically constructs the menu given the setup command text and pre-made windows
  3140.         // from Scene_Status.
  3141.  
  3142.         for(var i=0; i < this._pageNames.length; i++)
  3143.         {
  3144.                 this.addCommand(this._pageNames[i], this._pageWindows[i]);
  3145.         }
  3146. };
  3147.  
  3148. JAH_Window_Status_PageSelect.prototype.setPageWindow = function(pageWindow) {
  3149.     this._pageWindow = pageWindow;
  3150.     this.update();
  3151. };
  3152.  
  3153. JAH_Window_Status_PageSelect.prototype.isOkEnabled = function() {
  3154.     return false;
  3155. };
  3156.  
  3157. JAH_Window_Status_PageSelect.prototype.cursorUp = function(wrap) {
  3158.  
  3159.         Window_Selectable.prototype.cursorUp.call(this, wrap);
  3160.  
  3161.         for(var i = 0; i < JahwsUF.StatusMenuCore.Param.ScrollFactor; i++)
  3162.                 this._activePage.scrollUp();
  3163. }
  3164.  
  3165. JAH_Window_Status_PageSelect.prototype.cursorDown = function(wrap) {
  3166.  
  3167.         Window_Selectable.prototype.cursorDown.call(this, wrap);
  3168.  
  3169.         for(var i = 0; i < JahwsUF.StatusMenuCore.Param.ScrollFactor; i++)
  3170.                 this._activePage.scrollDown();
  3171. }
  3172.  
  3173.  
  3174.  
  3175. //-----------------------------------------------------------------------------
  3176. // JAH_Window_Status_Base
  3177. //
  3178. // Implements standard functionality needed for all Status pages.
  3179.  
  3180. function JAH_Window_Status_Base() {
  3181.         this.initialize.apply(this, arguments);
  3182. }
  3183.  
  3184. JAH_Window_Status_Base.prototype = Object.create(Window_Selectable.prototype);
  3185. JAH_Window_Status_Base.prototype.constructor = JAH_Window_Status_Base;
  3186.  
  3187. // the this.redraw variable is an experimental variable - if the windows are redrawn too often, it could help reduce the unnecessary redraws?
  3188.  
  3189. JAH_Window_Status_Base.prototype.initialize = function() {
  3190.  
  3191.         var lineHeight = this.lineHeight();
  3192.     var width = Graphics.boxWidth;
  3193.         //this.redraw = true;
  3194.  
  3195.         //  It turns out that lineHeight * 2 is exactly the space taken up by the Status page selection menu.
  3196.     var height = Graphics.boxHeight - lineHeight * 2;
  3197.     Window_Selectable.prototype.initialize.call(this, 0, lineHeight*2, width, height);
  3198.     this.refresh();
  3199. };
  3200.  
  3201. JAH_Window_Status_Base.prototype.scrollDown = function() {
  3202.         //this.redraw = true;
  3203.         Window_Selectable.prototype.scrollDown.call(this);
  3204. }
  3205.  
  3206. JAH_Window_Status_Base.prototype.scrollUp = function() {
  3207.         //this.redraw = true;
  3208.         Window_Selectable.prototype.scrollUp.call(this);
  3209. }
  3210.  
  3211. JAH_Window_Status_Base.prototype.setActor = function(actor) {
  3212.     if (this._actor !== actor) {
  3213.         this._actor = actor;
  3214.                 //this.redraw = true;
  3215.  
  3216.                 this.resetScroll(); // Always reset scrolling when changing Actor.
  3217.         this.refresh();
  3218.     }
  3219. };
  3220.  
  3221. JAH_Window_Status_Base.prototype.refresh = function() {
  3222.  
  3223.         //if(this.redraw == false) return;
  3224.         //redraw = false;
  3225.  
  3226.         this.contents.clear();
  3227.  
  3228.     if (this._actor) {
  3229.  
  3230.         var lineHeight = this.lineHeight();
  3231.  
  3232.                 var lineIndex = 0;
  3233.  
  3234.                 if(JahwsUF.StatusMenuCore.Param.HeaderScrolling == true)
  3235.                         lineIndex -= this.topIndex();  // What is our scroll position?  We've gotta make adjustments based on this.
  3236.  
  3237.                 // I like to think as the scroll position as the number of lines from the top we must remove.
  3238.                 // We have to "print negative lines" to even our balance before we print actual lines.
  3239.                 // It's probably quirky, but that line of reasoning helped me out.  That's why "lineIndex" is always <= 0 here.
  3240.  
  3241.         var headerSize = this.drawHeaderBlock(lineHeight * 0, lineIndex);
  3242.  
  3243.                 var y = headerSize >= 0 ? headerSize : 0;     // Is our "print marker" off the top of the page (still offscreen) or not?
  3244.                 lineIndex = headerSize < 0 ? headerSize : 0;
  3245.  
  3246.                 if(JahwsUF.StatusMenuCore.Param.HeaderScrolling == true)
  3247.                         this.drawPageBlock(lineHeight * y, lineIndex);
  3248.                 else this.drawPageBlock(lineHeight * y, -this.topIndex());  // If our header is fixed-position, then the page block must absorb all scrolling req'ts.
  3249.     }
  3250. };
  3251.  
  3252. // Override this in derived pages/windows for their particular contents.
  3253. JAH_Window_Status_Base.prototype.drawPageBlock = function(y, lineIndex) {
  3254. }
  3255.  
  3256. JAH_Window_Status_Base.prototype.availableWidth = function(portraitMode) {
  3257.         if(portraitMode || this.isPortraitMode())
  3258.         {
  3259.                 var portraitInfo = this.getActorPortraitInfo();
  3260.                 var portrait = ImageManager.loadPicture(portraitInfo.Portrait);
  3261.                 var scale = portraitInfo.Scale;
  3262.                 var xOffset = portraitInfo.Offset[0];
  3263.                 var adjust = portraitInfo.BorderAdjustment;
  3264.  
  3265.                 return this.contentsWidth() - Math.floor(portrait.width * scale) - JahwsUF.StatusMenuCore.Param.ImgBuffer + xOffset + adjust;
  3266.         }
  3267.         else return this.contentsWidth();
  3268. }
  3269.  
  3270. JAH_Window_Status_Base.prototype.getActorPortraitInfo = function() {
  3271.  
  3272.         var switchedPortraitList = JahwsUF.StatusMenuCore.Param.Portraits[this._actor._actorId];
  3273.  
  3274.         // Index 0 is the default portrait instead.
  3275.  
  3276.         for(var i = 1; i < switchedPortraitList.length; i++)
  3277.         {
  3278.                 if($gameSwitches.value(switchedPortraitList[i].Switch))
  3279.                         return switchedPortraitList[i];
  3280.         }
  3281.  
  3282.         return JahwsUF.StatusMenuCore.Param.Portraits[this._actor._actorId][0];
  3283. };
  3284.  
  3285. JAH_Window_Status_Base.prototype.drawHeaderBlock = function(y, lineIndex) {
  3286.  
  3287.         if(this.isPortraitMode())
  3288.         {
  3289.                 return this.drawPortraitHeader(y, lineIndex);
  3290.         }
  3291.         else
  3292.         {
  3293.                 return this.drawVanillaHeader(y, lineIndex);
  3294.         }
  3295. };
  3296.  
  3297. JAH_Window_Status_Base.prototype.drawPortraitHeader = function(y, lineIndex)
  3298. {
  3299.         // Top-left of header:  name + nickname.
  3300.         var lineHeight = this.lineHeight();
  3301.  
  3302.         if(lineIndex == 0)
  3303.         {
  3304.                 this.drawActorName(this._actor, this.standardPadding(), y);
  3305.  
  3306.                 var x = this.textWidth(this._actor.name());
  3307.                 var nickname = this._actor.nickname();
  3308.  
  3309.                 if(nickname == undefined);
  3310.                         nickname = "";
  3311.  
  3312.                 if(nickname.trim() != "")
  3313.                 {
  3314.                         nickname = JahwsUF.StatusMenuCore.Param.NicknameFormat.format(nickname);               
  3315.                         this.drawText(nickname, x + this.standardPadding(), y, this.textWidth(nickname));
  3316.                 }
  3317.  
  3318.                 // Top-right of header: lv + class.
  3319.                 this.changeTextColor(this.systemColor());       
  3320.                 var classText = " " + this._actor.currentClass().name;
  3321.                 var classWidth = this.textWidth(classText);
  3322.                 this.drawText(classText, this.contentsWidth() - classWidth, y, classWidth);
  3323.  
  3324.                 if(JahwsUF.StatusMenuCore.Param.LvHidden != true)
  3325.                 {
  3326.                         var topRightWidth = classWidth;
  3327.                         var levelValueWidth = this.textWidth(" ") + this.textWidth(this._actor.level);
  3328.                         topRightWidth += levelValueWidth;
  3329.                         this.drawText(this._actor.level, this.contentsWidth() - topRightWidth, y, levelValueWidth, 'right');
  3330.  
  3331.                         var levelTextWidth = this.textWidth(TextManager.level);
  3332.                         topRightWidth += levelTextWidth;
  3333.  
  3334.                         this.drawText(TextManager.level, this.contentsWidth() - topRightWidth, y, levelTextWidth);
  3335.                 }
  3336.                 this.resetTextColor();
  3337.         }
  3338.  
  3339.         // Other left-side header lines:
  3340.         this.drawActorIcons(this._actor, this.standardPadding(), y + lineHeight * (1 + lineIndex));
  3341.  
  3342.         var xpBarWidth = Math.max(Math.floor(this.contentsWidth() / (2 * 1.61803398875)) - this.standardPadding(), 320);  // 1.618... = golden ratio, hence its use.
  3343.  
  3344.         if(JahwsUF.StatusMenuCore.Param.XpHidden != true)
  3345.         {
  3346.                 this.drawActorXp(this._actor, this.standardPadding(), y + lineHeight * (2 + lineIndex), xpBarWidth);
  3347.                 this.drawHorzLine(y + lineHeight * (3 + lineIndex));
  3348.         }
  3349.         else
  3350.         {
  3351.                 this.drawHorzLine(y + lineHeight * (2 + lineIndex));
  3352.         }
  3353.  
  3354.         // Bottom-left of page - auto-display the character's portrait.
  3355.         var portraitInfo = this.getActorPortraitInfo();
  3356.         var portrait = ImageManager.loadPicture(portraitInfo.Portrait);
  3357.         var scale = portraitInfo.Scale;
  3358.  
  3359.         //Bitmap object is specified in rpg_core.js.  You can check the specs there.
  3360.         //Profile image first in case anyone wants to get fancy and put text on top of it for some crazy reason.
  3361.  
  3362.         var offsets = portraitInfo.Offset;
  3363.  
  3364.         this.contents.blt(portrait, 0, 0, portrait.width, portrait.height,  // Image, top-left (x,y) from source image, source width + height to use
  3365.         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!
  3366.         Math.floor(portrait.width * scale), Math.floor(portrait.height * scale)); // destination width, height - can be used to scale!
  3367.  
  3368.         if(JahwsUF.StatusMenuCore.Param.XpHidden == true)
  3369.                 return 3 + lineIndex;
  3370.         else
  3371.                 return 4 + lineIndex;  // Number of lines drawn.  Includes horizontal line.
  3372. }
  3373.  
  3374. JAH_Window_Status_Base.prototype.drawVanillaHeader = function(y, lineIndex)
  3375. {
  3376.         var lineHeight = this.lineHeight();
  3377.  
  3378.         var offset = 0;
  3379.  
  3380.         var dropLine = JahwsUF.StatusMenuCore.Param.LvHidden && JahwsUF.StatusMenuCore.Param.XpHidden;
  3381.  
  3382.         if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true && !dropLine)
  3383.                 offset = Math.ceil(lineHeight / 2);
  3384.  
  3385.         this.drawActorFace(this._actor, this.standardPadding(), y + lineIndex * lineHeight + offset);
  3386.  
  3387.         // drawBasicInfo and drawGauges are artifacts left over from the original RPG Maker MX
  3388.         // Status window.  I've restructured them to be sure, but I never got around to actually
  3389.         // removing them as separate functions.
  3390.  
  3391.         var w = Math.max(367, 204 + this.width * 0.45);
  3392.         this.drawBasicInfo(204, y, w, lineIndex);
  3393.  
  3394.         var gaugeX = Math.max(571, w);
  3395.         this.drawGauges(gaugeX, y, this.contentsWidth() - gaugeX - this.standardPadding(), lineIndex);
  3396.  
  3397.         var dropLine = JahwsUF.StatusMenuCore.Param.LvHidden && JahwsUF.StatusMenuCore.Param.XpHidden;
  3398.  
  3399.         if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true)
  3400.         {
  3401.                 this.drawHorzLine(lineHeight * (5 + lineIndex - (dropLine ? 1 : 0)) + y);
  3402.  
  3403.                 return 6 + lineIndex - (dropLine ? 1 : 0);
  3404.         }
  3405.         else
  3406.         {
  3407.                 // The standard Actor images need 4 lines for display.  Leave them enough space.
  3408.  
  3409.                 this.drawHorzLine(lineHeight * (4 + lineIndex) + y);
  3410.  
  3411.                 return 5 + lineIndex;  // Number of lines drawn.  Includes horizontal line.
  3412.         }
  3413. }
  3414.  
  3415. JAH_Window_Status_Base.prototype.getHeaderLineCount = function(portraitMode) {
  3416.  
  3417.         if(portraitMode || this.isPortraitMode())
  3418.         {
  3419.                 if(JahwsUF.StatusMenuCore.Param.XpHidden == true)
  3420.                         return 3;
  3421.                 else
  3422.                         return 4;
  3423.         }
  3424.         else
  3425.         {
  3426.                 var dropLine = JahwsUF.StatusMenuCore.Param.LvHidden && JahwsUF.StatusMenuCore.Param.XpHidden;
  3427.  
  3428.                 if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true)
  3429.                         return 6 - (dropLine ? 1 : 0);
  3430.                 else return 5; // Minimum amount of space b/c of Actor image.
  3431.         }
  3432. }
  3433.  
  3434. JAH_Window_Status_Base.prototype.getVisibleHeaderLineCount = function(portraitMode) {
  3435.         return this.getHeaderLineCount() - this.topIndex();
  3436. }
  3437.  
  3438. JAH_Window_Status_Base.prototype.getLineCount = function(portraitMode) {
  3439.         return this.getHeaderLineCount();
  3440. }
  3441.  
  3442. JAH_Window_Status_Base.prototype.maxItems = function() {
  3443.         if(this._actor == undefined)
  3444.                 return 1;
  3445.         else return this.getLineCount();
  3446. }
  3447.  
  3448. JAH_Window_Status_Base.prototype.hasAvailablePortrait = function() {
  3449.         return this.getActorPortraitInfo().Portrait != undefined;
  3450. }
  3451.  
  3452. if(JahwsUF.StatusMenuCore.Param.DefaultPortrait)
  3453. {
  3454.         JAH_Window_Status_Base.prototype.isPortraitMode = function() {
  3455.         return this.hasAvailablePortrait();
  3456.         };
  3457. }
  3458. else
  3459. {
  3460.         JAH_Window_Status_Base.prototype.isPortraitMode = function() {
  3461.         return false;
  3462.         };
  3463. }
  3464.  
  3465. JAH_Window_Status_Base.prototype.drawHorzLine = function(y, width) {
  3466.  
  3467.         if(width == undefined)
  3468.                 width = this.contentsWidth();
  3469.  
  3470.     var lineY = y + this.lineHeight() / 2 - 1;
  3471.     this.contents.paintOpacity = 48;
  3472.     this.contents.fillRect(0, lineY, width, 2, this.lineColor());
  3473.     this.contents.paintOpacity = 255;
  3474. };
  3475.  
  3476. JAH_Window_Status_Base.prototype.lineColor = function() {
  3477.     return this.normalColor();
  3478. };
  3479.  
  3480. // Actor picture, name, nickname, level, etc.
  3481. JAH_Window_Status_Base.prototype.drawBasicInfo = function(x, y, width, lineIndex) {
  3482.  
  3483.     var lineHeight = this.lineHeight();
  3484.  
  3485.         if(JahwsUF.StatusMenuCore.Param.NicknameInHeaders)
  3486.         {
  3487.                 var nameWidth = this.textWidth(this._actor.name());
  3488.  
  3489.                 if(this._actor.nickname() != undefined && this._actor.nickname() != "")
  3490.                 {
  3491.                         var nickname = this._actor.nickname();
  3492.  
  3493.                         nickname = JahwsUF.StatusMenuCore.Param.NicknameFormat.format(nickname);
  3494.  
  3495.                         this.drawText(nickname, x + nameWidth, y + lineHeight * lineIndex, width - nameWidth - this.standardPadding());
  3496.                 }
  3497.         }
  3498.         this.drawActorName    (this._actor, x      , y + lineHeight * (0 + lineIndex));
  3499.  
  3500.         this.drawActorClass   (this._actor, x      , y + lineHeight * (1 + lineIndex));
  3501.     this.drawActorIcons   (this._actor, x      , y + lineHeight * (2 + lineIndex));
  3502.  
  3503.         if(JahwsUF.StatusMenuCore.Param.LvHidden != true)
  3504.         {
  3505.                 if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true)
  3506.                          this.drawActorLevel   (this._actor, x      , y + lineHeight * (4 + lineIndex));
  3507.                 else this.drawActorLevel   (this._actor, x      , y + lineHeight * (3 + lineIndex));
  3508.         }
  3509. };
  3510.  
  3511. // All of the gauges.  All of them.
  3512. JAH_Window_Status_Base.prototype.drawGauges = function(x, y, width, lineIndex) {
  3513.     var lineHeight = this.lineHeight();
  3514.  
  3515.     this.changeTextColor(this.systemColor());
  3516.  
  3517.         this.drawActorHp(this._actor, x, y + lineHeight * (0 + lineIndex), width);
  3518.     this.drawActorMp(this._actor, x, y + lineHeight * (1 + lineIndex), width);
  3519.  
  3520.         if(JahwsUF.StatusMenuCore.Param.TpGauge)
  3521.                 this.drawActorTp(this._actor, x, y + lineHeight * (2 + lineIndex), width);
  3522.  
  3523.  
  3524.         var xpBarWidth = Math.max(width, 320);  // Make sure the bar gets plenty of room.
  3525.         if(JahwsUF.StatusMenuCore.Param.ExtraVanillaBlank == true && JahwsUF.StatusMenuCore.Param.XpHidden != true)
  3526.                 this.drawActorXp(this._actor, x + width - xpBarWidth, y + lineHeight * (4 + lineIndex), xpBarWidth);
  3527.         else if(JahwsUF.StatusMenuCore.Param.XpHidden != true)
  3528.                 this.drawActorXp(this._actor, x + width - xpBarWidth, y + lineHeight * (3 + lineIndex), xpBarWidth);
  3529. };
  3530.  
  3531.  
  3532. //-----------------------------------------------------------------------------
  3533. // JAH_Window_Status_Params
  3534. //
  3535. // Implements a Status page that displays a single Actor's parameters.
  3536.  
  3537. function JAH_Window_Status_Params() {
  3538.         this.initialize.apply(this, arguments);
  3539. }
  3540.  
  3541. JAH_Window_Status_Params.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3542. JAH_Window_Status_Params.prototype.constructor = JAH_Window_Status_Params;
  3543.  
  3544. JAH_Window_Status_Params.prototype.initialize = function(pageId, pageParam) {
  3545.     JAH_Window_Status_Base.prototype.initialize.call(this);
  3546.  
  3547.         if(!pageId) pageId = 0;
  3548.  
  3549.         // After the constructor, this field is only used for error messages.
  3550.         this.pageId = pageId;
  3551.  
  3552.         if(!pageParam)
  3553.                 this._pageParameterization = JahwsUF.StatusMenuCore.Param.ParamPages[pageId];
  3554.         else this._pageParameterization = pageParam;
  3555. };
  3556.  
  3557. // The Param page's master display method.  Does quite a fair bit of work.
  3558. JAH_Window_Status_Params.prototype.drawPageBlock = function(y, lineIndex) {
  3559.  
  3560.     var lineHeight = this.lineHeight();
  3561.  
  3562.         var paramColumnsRequested = this._pageParameterization.Columns.length;
  3563.  
  3564.         // --------------------------- STEP 1 --------------------------------
  3565.         // Analyze the amount of available horizontal space - can we show equipment?
  3566.  
  3567.         var requestedColumnSpacing = this._pageParameterization.RequiredColumnWidth + 2 * paramColumnsRequested * this.standardPadding();
  3568.         var availableWidth = this.availableWidth();  // Account for window margins + visual whitespace.
  3569.  
  3570.         var displayEquips = false;
  3571.  
  3572.         var totalRequiredWidthWithEquips = requestedColumnSpacing + this._pageParameterization.EquipColumnWidth + 2 * this.standardPadding();
  3573.  
  3574.         if(totalRequiredWidthWithEquips < availableWidth && eval(this._pageParameterization.DisplayEquips) == true)
  3575.         {
  3576.                 displayEquips = true;
  3577.         }
  3578.         else if(eval(this._pageParameterization.DisplayEquips) == true)
  3579.         {
  3580.                 console.log("Insufficient space to display the equipment listing on this Status window parameter page!  Page id = " + this.pageId);
  3581.         }
  3582.  
  3583.         // --------------------------- STEP 2 --------------------------------
  3584.         // Precompute all relevant column spacing data.
  3585.  
  3586.         // How much padding should be used when the given number of columns are in use?
  3587.         var EvenPaddings = [];
  3588.  
  3589.         // ColumnXCoords[totalcols][curCol];  // when there are a total of totalcols in use, curCol's x value is given here.
  3590.         var ColumnXCoords = [];
  3591.  
  3592.         for(var i = paramColumnsRequested; i >= 1; i--)
  3593.         {
  3594.                 var neededWidth = 0;
  3595.  
  3596.                 for(var j=0; j < i; j++)
  3597.                 {
  3598.                         neededWidth += this._pageParameterization.Columns[j].TextWidth + this._pageParameterization.Columns[j].ValueWidth;
  3599.                 }
  3600.                 neededWidth += 2 * i * this.standardPadding();
  3601.                 var availWidth = availableWidth;
  3602.                 var totalActivatedColumns = i;
  3603.  
  3604.                 if(displayEquips && i == paramColumnsRequested)
  3605.                 {
  3606.                         neededWidth += 2 * this.standardPadding() + this._pageParameterization.EquipColumnWidth;
  3607.                         totalActivatedColumns += 1;
  3608.                 }
  3609.                 else if(displayEquips)
  3610.                 {
  3611.                         availWidth -= 2 * EvenPaddings[paramColumnsRequested] + this._pageParameterization.EquipColumnWidth;
  3612.                 }
  3613.  
  3614.                 // Determine the actual spacings to be utilized.
  3615.                 // We included the base this.standardPadding() amount in the req'd width... be sure to add it back!
  3616.                 EvenPaddings[i] = (availWidth - neededWidth) / (2 * totalActivatedColumns) + this.standardPadding();
  3617.  
  3618.                 // Determine the x-coords to be used for everything to be displayed.
  3619.                 ColumnXCoords[i] = [];               
  3620.                 ColumnXCoords[i][0] = EvenPaddings[i];  //Base position of first column.
  3621.  
  3622.                 for(var c = 1; c <= i; c++)
  3623.                 {
  3624.                         ColumnXCoords[i][c] = ColumnXCoords[i][c-1] + this._pageParameterization.Columns[c - 1].TextWidth + this._pageParameterization.Columns[c - 1].ValueWidth + 2 * EvenPaddings[i];
  3625.                 }
  3626.         }       
  3627.  
  3628.         // --------------------------- STEP 3 --------------------------------
  3629.         // Actually DRAW all the things.
  3630.  
  3631.         // Aethestics calculations now complete.  Time to actually display ALL the things!
  3632.     for (var column = 0; column < this._pageParameterization.Columns.length; column++) {
  3633.  
  3634.                 var y2 = y;
  3635.                 var l2 = lineIndex;
  3636.  
  3637.                 for (var row = 0; row < this._pageParameterization.Columns[column].Entries.length; row++) {
  3638.  
  3639.                         // Positioning of the entry.  
  3640.                         var x = ColumnXCoords[paramColumnsRequested][column];
  3641.                         var evenPaddingAmount = EvenPaddings[paramColumnsRequested];
  3642.  
  3643.                         if(this._pageParameterization.RebalanceColumns)
  3644.                         {
  3645.                                 // If this row HAS entries.  Some rows may be left blank intentionally,
  3646.                                 // in which case nothing will even be printed.
  3647.                                 if(this._pageParameterization.ColWidths[row])
  3648.                                 {
  3649.                                         x = ColumnXCoords[this._pageParameterization.ColWidths[row]][column];
  3650.                                         evenPaddingAmount = EvenPaddings[this._pageParameterization.ColWidths[row]];
  3651.                                 }
  3652.  
  3653.                                 // Determine the true column - what if there's a blank in a column to our left?
  3654.                                 for(var c2 = 0; c2 < column; c2++)
  3655.                                 {
  3656.                                         if(!this._pageParameterization.Columns[c2].Entries[row])
  3657.                                                 // Erase the blank entry from existence, reclaiming its space.
  3658.                                                 x -= this._pageParameterization.Columns[c2].TextWidth + this._pageParameterization.Columns[c2].ValueWidth + 2 * EvenPaddings[paramColumnsRequested];
  3659.                                 }
  3660.                         }
  3661.  
  3662.                         var paramEntry = this._pageParameterization.Columns[column].Entries[row];
  3663.  
  3664.                         if(!(paramEntry == undefined))
  3665.                         {
  3666.                                 if(l2 >= 0)
  3667.                                 {
  3668.                                         paramEntry.draw(this, x, y2, 2 * evenPaddingAmount);
  3669.                                 }
  3670.                         }
  3671.  
  3672.                         l2 += 1;
  3673.  
  3674.                         if(l2 > 0)
  3675.                                 y2 += lineHeight;
  3676.  
  3677.                 }
  3678.     }
  3679.  
  3680.         if(displayEquips)
  3681.                 this.drawEquipments(ColumnXCoords[paramColumnsRequested][paramColumnsRequested], y + lineHeight * lineIndex);
  3682. };
  3683.  
  3684. JAH_Window_Status_Params.prototype.getLineCount = function(portraitMode) {
  3685.  
  3686.         var maxCol = 0;
  3687.  
  3688.         for(var i = 0; i < this._pageParameterization.Columns.length; i++)
  3689.         {
  3690.                 if(maxCol < this._pageParameterization.Columns[i].Entries.length)
  3691.                         maxCol = this._pageParameterization.Columns[i].Entries.length;
  3692.         }
  3693.  
  3694.         return maxCol + this.getHeaderLineCount();
  3695. }
  3696.  
  3697. JAH_Window_Status_Params.prototype.drawEquipments = function(x, y) {
  3698.     var equips = this._actor.equips();
  3699.     var count = equips.length;
  3700.     for (var i = 0; i < count; i++) {
  3701.         this.drawItemName(equips[i], x, y + this.lineHeight() * i);
  3702.     }
  3703. };
  3704.  
  3705. //-----------------------------------------------------------------------------
  3706. // JAH_Window_Elemental_Resistances
  3707. //
  3708. // Implements a Status page that displays a single Actor's ELEMENTAL resistance data.
  3709. // I'd love to change the name to something more fitting, but it'd break a few things.
  3710.  
  3711. function JAH_Window_Elemental_Resistances() {
  3712.         this.initialize.apply(this, arguments);
  3713. }
  3714.  
  3715. //JAH_Window_Elemental_Resistances.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3716. JAH_Window_Elemental_Resistances.prototype = Object.create(JAH_Window_Status_Params.prototype);
  3717. JAH_Window_Elemental_Resistances.prototype.constructor = JAH_Window_Elemental_Resistances;
  3718.  
  3719. JAH_Window_Elemental_Resistances.prototype.initialize = function() {
  3720.     //JAH_Window_Status_Base.prototype.initialize.call(this);
  3721.         JAH_Window_Status_Params.prototype.initialize.call(this, "Elemental Resistances", JahwsUF.StatusMenuCore.Param.ResistPages.Elements);
  3722. };
  3723.  
  3724.  
  3725. //-----------------------------------------------------------------------------
  3726. // JAH_Window_State_Resistances
  3727. //
  3728. // Implements a Status page that displays a single Actor's state resistance data.
  3729.  
  3730. function JAH_Window_State_Resistances() {
  3731.         this.initialize.apply(this, arguments);
  3732. }
  3733.  
  3734. //JAH_Window_State_Resistances.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3735. JAH_Window_State_Resistances.prototype = Object.create(JAH_Window_Status_Params.prototype);
  3736. JAH_Window_State_Resistances.prototype.constructor = JAH_Window_State_Resistances;
  3737.  
  3738. JAH_Window_State_Resistances.prototype.initialize = function() {
  3739.     //JAH_Window_Status_Base.prototype.initialize.call(this);
  3740.         JAH_Window_Status_Params.prototype.initialize.call(this, "State Resistances", JahwsUF.StatusMenuCore.Param.ResistPages.States);
  3741. };
  3742.  
  3743.  
  3744. //-----------------------------------------------------------------------------
  3745. // JAH_Window_Profile_Texter
  3746. //
  3747. // A hidden window utilized by the Profile page in order to do profile text operations.
  3748. // Facilitates escape codes, aids compatibility with word-wrapping plugins.
  3749. //
  3750. // Quite useful in enforcing an absolute margin on text to be displayed in the Profile
  3751. // window.
  3752. //
  3753. // This window is NEVER displayed; its contents are copied into the Profile window for
  3754. // display via the blt function.
  3755. //
  3756.  
  3757. function JAH_Window_Profile_Texter() {
  3758.         this.initialize.apply(this, arguments);
  3759. }
  3760.  
  3761. JAH_Window_Profile_Texter.prototype = Object.create(Window_Base.prototype);
  3762. JAH_Window_Profile_Texter.prototype.constructor = JAH_Window_Profile_Texter;
  3763.  
  3764. JAH_Window_Profile_Texter.prototype.initialize = function(cWidth, cHeight) {
  3765.         Window_Base.prototype.initialize.call(this, 0, 0, cWidth + 2 * this.standardPadding(),
  3766.                                                           cHeight + 2 * this.standardPadding());
  3767.  
  3768.         this.hide();
  3769. }
  3770.  
  3771. // Duplicate these methods from the base class.  It's actually safe, 'cause Javascript logic.
  3772. JAH_Window_Profile_Texter.prototype.drawHorzLine = JAH_Window_Status_Base.prototype.drawHorzLine;
  3773. JAH_Window_Profile_Texter.prototype.lineColor = JAH_Window_Status_Base.prototype.lineColor;
  3774.  
  3775. JAH_Window_Profile_Texter.prototype.convertEscapeCharacters = function(text) {
  3776.  
  3777.         text = Window_Base.prototype.convertEscapeCharacters.call(this, text);
  3778.  
  3779.         // Our custom conversion comes after the others; they eliminate '\n's.
  3780.         text = text.replace(/<hr>/g, '\x1bhr');
  3781.  
  3782.         return text;
  3783. }
  3784.  
  3785. JAH_Window_Profile_Texter.prototype.processEscapeCharacter = function(code, textState) {
  3786.         Window_Base.prototype.processEscapeCharacter.call(this, code, textState)
  3787.  
  3788.         if(code == "HR")
  3789.         {
  3790.                 this.drawHorzLine(textState.y);
  3791.         }
  3792. }
  3793. //-----------------------------------------------------------------------------
  3794. // JAH_Window_Status_Profile
  3795. //
  3796. // Implements a Status page that displays a single Actor's parameters.
  3797. //
  3798. // All text processing is actually handled by the Profile_Texter window and then
  3799. // copied internally via blt for display.
  3800.  
  3801. function JAH_Window_Status_Profile() {
  3802.         this.initialize.apply(this, arguments);
  3803. }
  3804.  
  3805. JAH_Window_Status_Profile.prototype = Object.create(JAH_Window_Status_Base.prototype);
  3806. JAH_Window_Status_Profile.prototype.constructor = JAH_Window_Status_Profile;
  3807.  
  3808. JAH_Window_Status_Profile.prototype.initialize = function() {
  3809.  
  3810.     JAH_Window_Status_Base.prototype.initialize.call(this);
  3811.  
  3812.         this.hiddenTextWindow = new JAH_Window_Profile_Texter(this.contentsWidth(), this.contentsHeight());
  3813.         this.totalLineCount = undefined; // Stores pre-computed line count information; it's an expensive calculation when word-wrapping is enabled.
  3814. };
  3815.  
  3816. JAH_Window_Status_Profile.prototype.getExtendedActorProfile = function() {
  3817.         var profile = JahwsUF.StatusMenuCore.Param.ExtendedProfiles[this._actor._actorId];
  3818.  
  3819.         var switchedProfileList = JahwsUF.StatusMenuCore.Param.SwitchedProfiles[this._actor._actorId];
  3820.  
  3821.         for(var i = 0; i < switchedProfileList.length; i++)
  3822.         {
  3823.                 if($gameSwitches.value(switchedProfileList[i][0]))
  3824.                         return switchedProfileList[i][1];
  3825.         }
  3826.  
  3827.         return profile;
  3828. };
  3829.  
  3830. JAH_Window_Status_Profile.prototype.setActor = function(actor) {
  3831.  
  3832.         this.totalLineCount = undefined;
  3833.         JAH_Window_Status_Base.prototype.setActor.call(this, actor);
  3834.         this.totalLineCount = this.getLineCount();
  3835.  
  3836.         //this.refresh();
  3837. }
  3838.  
  3839. JAH_Window_Status_Profile.prototype.getLineCount = function() {
  3840.  
  3841.         if(this._actor == undefined) return 1;  // Nothing to see here if we've not yet loaded an Actor.
  3842.  
  3843.         if(this.totalLineCount) return this.totalLineCount;
  3844.  
  3845.         this.hiddenTextWindow.width = this.availableWidth() + 2 * this.standardPadding();
  3846.         this.hiddenTextWindow.height = this.contentsHeight() + 2 * this.standardPadding() - this.getVisibleHeaderLineCount() * this.lineHeight();
  3847.         this.hiddenTextWindow.updateTransform();
  3848.  
  3849.         // Sadly, the base code doesn't actually update the bitmap used for drawing!
  3850.         // We have to do this manually.
  3851.         this.hiddenTextWindow.contents = new Bitmap(this.availableWidth(), this.contentsHeight());
  3852.  
  3853.         var exProfile = this.getExtendedActorProfile();
  3854.         var totalHeight = 0;
  3855.  
  3856.         if(exProfile != undefined)
  3857.         {
  3858.                 // Compute the number of lines in the profile text.
  3859.                 var textState = { index: 0, x: 12, y: 0, left: 12 };
  3860.                 textState.text = this.hiddenTextWindow.convertEscapeCharacters.call(this.hiddenTextWindow, exProfile);  
  3861.  
  3862.                 totalHeight = Math.ceil(this.calcTextHeight.call(this.hiddenTextWindow, textState, true));
  3863.         }
  3864.  
  3865.         if(this._actor.profile() != undefined && this._actor.profile() != "")
  3866.         {
  3867.                 //totalLines += 3;
  3868.  
  3869.                 var textState = { index: 0, x: 12, y: 0, left: 12 };
  3870.                 textState.text = this.convertEscapeCharacters.call(this.hiddenTextWindow, this._actor.profile());  
  3871.  
  3872.                 totalHeight += this.calcTextHeight.call(this.hiddenTextWindow, textState, true) + this.lineHeight();
  3873.         }
  3874.  
  3875.         var totalLines = Math.ceil(totalHeight / this.lineHeight());
  3876.  
  3877.         totalLines += this.getHeaderLineCount();
  3878.  
  3879.         if(!(this.isPortraitMode() || JahwsUF.StatusMenuCore.Param.NicknameInHeaders))
  3880.         {
  3881.                 totalLines += 2; // Include space for the nickname!
  3882.         }
  3883.  
  3884.         this.totalLineCount = totalLines;
  3885.  
  3886.         return totalLines;
  3887. };
  3888.  
  3889. JAH_Window_Status_Profile.prototype.drawPageBlock = function(y, lineIndex) {
  3890.     this.drawProfile(12, y, lineIndex);
  3891. };
  3892.  
  3893. // Profiles will ALWAYS use the portrait if it's available.
  3894. JAH_Window_Status_Profile.prototype.isPortraitMode = function() {
  3895.         return this.hasAvailablePortrait();
  3896. };
  3897.  
  3898. JAH_Window_Status_Profile.prototype.drawProfile = function(x, y, lineOffset) {
  3899.  
  3900.         // If anything should be printed above the original y, based upon topIndex, it should never be printed.
  3901.         // Otherwise, offset.
  3902.  
  3903.         if(!this.isPortraitMode())
  3904.         {
  3905.                 var nickname = this._actor.nickname();
  3906.  
  3907.                 if(nickname == '') nickname = undefined;
  3908.  
  3909.                 // If we don't have a portrait...
  3910.                 if(!JahwsUF.StatusMenuCore.Param.NicknameInHeaders && nickname != undefined)
  3911.                 {
  3912.                         if(lineOffset == 0)
  3913.                         {
  3914.                                 var nickname = this._actor.nickname();
  3915.  
  3916.                                 if(JahwsUF.StatusMenuCore.Param.NicknameFormat.indexOf("\"") != -1)
  3917.                                 nickname = "\"" + nickname + "\"";
  3918.  
  3919.                                 this.drawText(nickname, x, y, this.textWidth(nickname));
  3920.                         }
  3921.  
  3922.                         lineOffset += 2;
  3923.                 }
  3924.  
  3925.                 if(this._actor.profile() != undefined && this._actor.profile() != "")
  3926.                 {
  3927.                         this.printScrolledText(this._actor.profile(), x, y, lineOffset);
  3928.  
  3929.                         lineOffset += 3;
  3930.                 }
  3931.  
  3932.                 var exProfile = this.getExtendedActorProfile();
  3933.  
  3934.                 if(exProfile != undefined)
  3935.                         this.printScrolledText(exProfile, x, y, lineOffset);
  3936.         }
  3937.         else
  3938.         {
  3939.                 // In profile mode, the Base window class draws the image as part of the command of "portrait" mode when
  3940.                 // drawing the actor block.  (This makes things more general for future extensions, in case future pages
  3941.                 // want to use the profile image.)
  3942.  
  3943.                 // If we DO have a standard profile entry.
  3944.                 if(this._actor.profile() != undefined && this._actor.profile() != "")
  3945.                 {
  3946.                         this.printScrolledText(this._actor.profile(), x, y, lineOffset);
  3947.  
  3948.                         lineOffset += 3;
  3949.                 }
  3950.  
  3951.                 var exProfile = this.getExtendedActorProfile();
  3952.  
  3953.                 if(exProfile != undefined)
  3954.                         this.printScrolledText(exProfile, x, y, lineOffset);
  3955.         }
  3956.  
  3957. }
  3958.  
  3959. JAH_Window_Status_Profile.prototype.printScrolledText = function(text, x, y, scroll) {
  3960.  
  3961.         // 1.0.3 - dramatic change in the code:  scrolling control is way different now, but
  3962.         // in a way that won't break word-wrapping plugin output.
  3963.         //
  3964.         // Word-wrap plugins still need to implement calcTextHeight properly for scrolling to work, however.
  3965.  
  3966.         var lineHeight = this.lineHeight();
  3967.         var lines = text.split('\n');
  3968.  
  3969.         var headerSize = 0;
  3970.         var saveState = undefined;
  3971.  
  3972.         y += scroll * lineHeight;
  3973.  
  3974.         this.hiddenTextWindow.contents.clear();
  3975.         this.hiddenTextWindow.drawTextEx.call(this.hiddenTextWindow, text, x, y);
  3976.  
  3977.         var yDelt = y > 0 ? y : 0;
  3978.  
  3979.         var heightToCopy = this.contentsHeight() - yDelt;
  3980.  
  3981.         // Copy the hiddenTextWindow's text to our window.  We can set a limit on what areas are copied,
  3982.         // which allows for a text border to be enforced on profile text!
  3983.         this.contents.blt(this.hiddenTextWindow.contents, 0, yDelt, this.hiddenTextWindow.contentsWidth(), heightToCopy, 0, yDelt);
  3984. };

4791689657631_.pic.jpg (277.28 KB, 下载次数: 0)

图1

图1

4781689657583_.pic.jpg (288.04 KB, 下载次数: 0)

图2

图2

Lv4.逐梦者

梦石
0
星屑
7089
在线时间
722 小时
注册时间
2021-3-5
帖子
821
2
发表于 2023-7-18 16:21:13 | 只看该作者
第二次才出?那我估计是缓存问题,要不楼主把立绘的路径放在Ysp_Preloader.js里试试?
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1246
在线时间
153 小时
注册时间
2006-2-12
帖子
226
3
 楼主| 发表于 2023-7-18 16:29:43 | 只看该作者
RyanYe 发表于 2023-7-18 16:21
第二次才出?那我估计是缓存问题,要不楼主把立绘的路径放在Ysp_Preloader.js里试试? ...

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

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1246
在线时间
153 小时
注册时间
2006-2-12
帖子
226
4
 楼主| 发表于 2023-7-18 16:55:52 | 只看该作者
RyanYe 发表于 2023-7-18 16:21
第二次才出?那我估计是缓存问题,要不楼主把立绘的路径放在Ysp_Preloader.js里试试? ...

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

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-17 08:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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