SHARE
TWEET

DoubleX RMMV Skill Hotkeys v100a

Double_X Sep 8th, 2017 (edited) 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*============================================================================
  2.  *    ## Plugin Info                                                          
  3.  *----------------------------------------------------------------------------
  4.  *    # Plugin Name                                                          
  5.  *      DoubleX RMMV Skill Hotkeys                                            
  6.  *----------------------------------------------------------------------------
  7.  *    # Introduction                                                          
  8.  *    1. When the party's out of battles, an actor can bind hotkeys to his/her
  9.  *       currently usable/unusable skills in the skill menu, unless the result
  10.  *       of the relevant notetags indicates otherwise                        
  11.  *       All these bindings will be saved                                    
  12.  *    2. When the party's inside battles, an actor having nonempty hotkey slot
  13.  *       can use hotkeys to use their corresponding usable skills directly,  
  14.  *       unless the result of the relevant notetags indicates otherwise      
  15.  *----------------------------------------------------------------------------
  16.  *    # Terms Of Use                                                          
  17.  *      1. Commercial use's always allowed and crediting me's always optional.
  18.  *      2. You shall keep this plugin's Plugin Info part's contents intact.  
  19.  *      3. You shalln't claim that this plugin's written by anyone other than
  20.  *         DoubleX or my aliases. I always reserve the right to deny you from
  21.  *         using any of my plugins anymore if you've violated this.          
  22.  *      4. CC BY 4.0, except those conflicting with any of the above, applies
  23.  *         to this plugin, unless you've my permissions not needing follow so.
  24.  *      5. I always reserve the right to deny you from using this plugin      
  25.  *         anymore if you've violated any of the above.                      
  26.  *----------------------------------------------------------------------------
  27.  *    # Prerequisites                                                        
  28.  *      Abilities:                                                            
  29.  *      1. Nothing special for most ordinary cases                            
  30.  *      2. Little RMMV plugin development proficiency for more advanced uses  
  31.  *      3. Some RMMV plugin development proficiency to fully utilize this    
  32.  *----------------------------------------------------------------------------
  33.  *    # Author Notes                                                          
  34.  *      1. DoubleX RMMV Skill Hotkeys aims to give extreme control and freedom
  35.  *         to users by making it as flexible as I can with as little damage to
  36.  *         user-friendliness as I can                                        
  37.  *----------------------------------------------------------------------------
  38.  *    # Links                                                                
  39.  *      This plugin:                                                          
  40.  *      1. https://pastebin.com/iEfRMhf3                                      
  41.  *      Video:                                                                
  42.  *      1. https://www.youtube.com/watch?v=iBaFP_cN5yE                        
  43.  *      DoubleX RMMV Skill Hotkeys Unit Test:                                
  44.  *      1. https://pastebin.com/iHh5frL3                                      
  45.  *----------------------------------------------------------------------------
  46.  *    # Instructions                                                          
  47.  *      1. If you want to edit configurations instead of parameters, you must
  48.  *         open this js file to access its configuration region              
  49.  *         Some settings, like the hotkey mappings, are only available as    
  50.  *         configurations                                                    
  51.  *      2. The default plugin file name is DoubleX RMMV Skill Hotkeys v100a  
  52.  *         If you want to change that, you must edit the value of            
  53.  *         DoubleX_RMMV.Skill_Hotkeys_File, which must be done via opening    
  54.  *         this plugin js file directly                                      
  55.  *      3. If you wish to use DoubleX RMMV Skill Hotkeys Unit Test, place it  
  56.  *         right below this plugin                                            
  57.  *----------------------------------------------------------------------------
  58.  *    # Author                                                                
  59.  *      DoubleX                                                              
  60.  *----------------------------------------------------------------------------
  61.  *    # Changelog                                                            
  62.  *      v1.00a(GMT 0900 8-9-2017):                                            
  63.  *      1. 1st version of this plugin finished                                
  64.  *============================================================================*/
  65. /*:
  66.  * @plugindesc Lets you bind hotkeys to skills for actors outside
  67.  * battles, and use them to select usable skills for actors inside battles
  68.  * @author DoubleX
  69.  *
  70.  * @param isEnabled
  71.  * @desc Sets whether this plugin will be enabled
  72.  * It'll be the contents of a function returning a Boolean
  73.  * @default return true;
  74.  *
  75.  * @param bindNotePriority
  76.  * @desc Sets the data type priority of <bind skill hotkey: BSHX>
  77.  * It'll be the contents of a function returning an Array of Strings
  78.  * @default return ["states", "armors", "weapons", "classes", "actors"];
  79.  *
  80.  * @param useNotePriority
  81.  * @desc Sets the data type priority of <use skill hotkey: USHX>
  82.  * It'll be the contents of a function returning an Array of Strings
  83.  * @default return ["states", "armors", "weapons", "classes", "actors"];
  84.  *
  85.  * @param bindNoteChainingRule
  86.  * @desc Sets how to use multiple <bind skill hotkey: BSHX> notetags
  87.  * It'll be the contents of a function returning a String
  88.  * @default return "first";
  89.  *
  90.  * @param useNoteChainingRule
  91.  * @desc Sets how to use multiple <use skill hotkey: USHX> notetags
  92.  * It'll be the contents of a function returning a String
  93.  * @default return "first";
  94.  *
  95.  * @param bindHotkeyText
  96.  * @desc Sets the bind hotkey text for skills without hotkeys
  97.  * It'll be the contents of a function returning a String
  98.  * @default return "Bind Hotkey";
  99.  *
  100.  * @param useSkillText
  101.  * @desc Sets the use skill text when showing the bind hotkey texts
  102.  * It'll be the contents of a function returning a String
  103.  * @default return "Use";
  104.  *
  105.  * @param unusableSkillCoverIconPath
  106.  * @desc Sets the path of the icon masking that of unusable skills
  107.  * It'll be the contents of a function returning a String
  108.  * @default return "img/pictures/";
  109.  *
  110.  * @param unusableSkillCoverIconName
  111.  * @desc Sets the name of the icon masking that of unusable skills
  112.  * It'll be the contents of a function returning a String
  113.  * @default return "UnusableSkill";
  114.  *
  115.  * @param unusableSkillCoverIconHue
  116.  * @desc Sets the hue of the icon masking that of unusable skills
  117.  * It'll be the contents of a function returning a Number
  118.  * @default return 0;
  119.  *
  120.  * @param unusableSkillCoverIconSmooth
  121.  * @desc Sets the smooth of the icon masking that of unusable skills
  122.  * It'll be the contents of a function returning a Boolean
  123.  * @default return true;
  124.  *
  125.  * @param hotkeyCmdWindowW
  126.  * @desc Sets the width of the window for binding hotkeys to skills
  127.  * It'll be the contents of a function returning a Number
  128.  * @default return Window_SkillHotkeyBase.prototype.windowWidth.call(this);
  129.  *
  130.  * @param hotkeyCmdWindowH
  131.  * @desc Sets the height of the window for binding hotkeys to skills
  132.  * It'll be the contents of a function returning a Number
  133.  * @default return Window_SkillHotkeyBase.prototype.windowHeight.call(this);
  134.  *
  135.  * @param hotkeyCmdWindowX
  136.  * @desc Sets the x position of the window for binding hotkeys
  137.  * It'll be the contents of a function returning a Number
  138.  * @default return 0;
  139.  *
  140.  * @param hotkeyCmdWindowY
  141.  * @desc Sets the y position of the window for binding hotkeys
  142.  * It'll be the contents of a function returning a Number
  143.  * @default return 0;
  144.  *
  145.  * @param hotkeyCmdLineH
  146.  * @desc Sets the line height of the window for binding hotkeys
  147.  * It'll be the contents of a function returning a Number
  148.  * @default return 36;
  149.  *
  150.  * @param hotkeyCmdFontSize
  151.  * @desc Sets the font size of the window for binding hotkeys
  152.  * It'll be the contents of a function returning a Number
  153.  * @default return 28;
  154.  *
  155.  * @param hotkeyCmdPadding
  156.  * @desc Sets the standard padding of the window for binding hotkeys
  157.  * It'll be the contents of a function returning a Number
  158.  * @default return 18;
  159.  *
  160.  * @param hotkeyCmdTextPadding
  161.  * @desc Sets the text padding of the window for binding hotkeys
  162.  * It'll be the contents of a function returning a Number
  163.  * @default return 6;
  164.  *
  165.  * @param hotkeyCmdBackOpacity
  166.  * @desc Sets the back opacity of the window for binding hotkeys
  167.  * It'll be the contents of a function returning a Number
  168.  * @default return 192;
  169.  *
  170.  * @param hotkeyCmdTranslucentOpacity
  171.  * @desc Sets the translucent opacity of the hotkey binding window
  172.  * It'll be the contents of a function returning a Number
  173.  * @default return 160;
  174.  *
  175.  * @param hotkeyCmdSpacing
  176.  * @desc Sets the spacing of the window for binding hotkeys
  177.  * It'll be the contents of a function returning a Number
  178.  * @default return 12;
  179.  *
  180.  * @param hotkeyListWindowW
  181.  * @desc Sets the width of the window listing the actor hotkey slots
  182.  * It'll be the contents of a function returning a Number
  183.  * @default return Graphics.boxWidth;
  184.  *
  185.  * @param hotkeyListWindowH
  186.  * @desc Sets the height of the window listing the actor hotkey slots
  187.  * It'll be the contents of a function returning a Number
  188.  * @default return this.fittingHeight(2);
  189.  *
  190.  * @param hotkeyListWindowX
  191.  * @desc Sets the x position of the window listing actor hotkey slots
  192.  * It'll be the contents of a function returning a Number
  193.  * @default return 0;
  194.  *
  195.  * @param hotkeyListWindowY
  196.  * @desc Sets the y position of the window listing actor hotkey slots
  197.  * It'll be the contents of a function returning a Number
  198.  * @default return 0;
  199.  *
  200.  * @param hotkeyListLineH
  201.  * @desc Sets the line height of the window listing actor hotkeys
  202.  * It'll be the contents of a function returning a Number
  203.  * @default return 36;
  204.  *
  205.  * @param hotkeyListFontSize
  206.  * @desc Sets the font size of the window listing actor hotkey slots
  207.  * It'll be the contents of a function returning a Number
  208.  * @default return 28;
  209.  *
  210.  * @param hotkeyListPadding
  211.  * @desc Sets the padding of the window listing actor hotkeys
  212.  * It'll be the contents of a function returning a Number
  213.  * @default return 18;
  214.  *
  215.  * @param hotkeyListTextPadding
  216.  * @desc Sets the text padding of the window listing actor hotkeys
  217.  * It'll be the contents of a function returning a Number
  218.  * @default return 6;
  219.  *
  220.  * @param hotkeyListBackOpacity
  221.  * @desc Sets the back opacity of the window listing actor hotkeys
  222.  * It'll be the contents of a function returning a Number
  223.  * @default return 192;
  224.  *
  225.  * @param hotkeyListTranslucentOpacity
  226.  * @desc Sets the translucent opacity of the actor hotkey list window
  227.  * It'll be the contents of a function returning a Number
  228.  * @default return 160;
  229.  *
  230.  * @param hotkeyListSpacing
  231.  * @desc Sets the spacing of the window listing actor hotkey slots
  232.  * It'll be the contents of a function returning a Number
  233.  * @default return 12;
  234.  *
  235.  * @param hotkeyCmdListWindowW
  236.  * @desc Sets the width of the window listing the hotkeys in battle
  237.  * It'll be the contents of a function returning a Number
  238.  * @default return Graphics.boxWidth;
  239.  *
  240.  * @param hotkeyCmdListWindowH
  241.  * @desc Sets the height of the window listing the hotkeys in battle
  242.  * It'll be the contents of a function returning a Number
  243.  * @default return this.fittingHeight(2);
  244.  *
  245.  * @param hotkeyCmdListWindowX
  246.  * @desc Sets the x position of the window listing hotkeys in battle
  247.  * It'll be the contents of a function returning a Number
  248.  * @default return 0;
  249.  *
  250.  * @param hotkeyCmdListWindowY
  251.  * @desc Sets the y position of the window listing hotkeys in battle
  252.  * It'll be the contents of a function returning a Number
  253.  * @default return Graphics.boxHeight - this.fittingHeight(4) - this.windowHeight();
  254.  *
  255.  * @param hotkeyCmdListLineH
  256.  * @desc Sets the line height of the window listing hotkeys in battle
  257.  * It'll be the contents of a function returning a Number
  258.  * @default return 36;
  259.  *
  260.  * @param hotkeyCmdListFontSize
  261.  * @desc Sets the font size of the window listing hotkeys in battle
  262.  * It'll be the contents of a function returning a Number
  263.  * @default return 28;
  264.  *
  265.  * @param hotkeyCmdListPadding
  266.  * @desc Sets the padding of the window listing hotkeys in battle
  267.  * It'll be the contents of a function returning a Number
  268.  * @default return 18;
  269.  *
  270.  * @param hotkeyCmdListTextPadding
  271.  * @desc Sets the text padding of the hotkey window in battle
  272.  * It'll be the contents of a function returning a Number
  273.  * @default return 6;
  274.  *
  275.  * @param hotkeyCmdListBackOpacity
  276.  * @desc Sets the back opacity of the hotkey window in battle
  277.  * It'll be the contents of a function returning a Number
  278.  * @default return 192;
  279.  *
  280.  * @param hotkeyCmdListTranslucentOpacity
  281.  * @desc Sets the translucent opacity of the hotkey window in battle
  282.  * It'll be the contents of a function returning a Number
  283.  * @default return 160;
  284.  *
  285.  * @param hotkeyCmdListSpacing
  286.  * @desc Sets the spacing of the window listing hotkeys in battle
  287.  * It'll be the contents of a function returning a Number
  288.  * @default return 12;
  289.  *
  290.  * @help
  291.  *============================================================================
  292.  *    ## Parameter/Configurations Info                                        
  293.  *----------------------------------------------------------------------------
  294.  *    # General                                                              
  295.  *      The below points apply to all parameters/configurations unless stated
  296.  *      otherwise:                                                            
  297.  *      1. If the value of a parameter's empty, its configuration counterpart
  298.  *         will be used instead(Reference tag: PARAMETERS_CONFIGURATIONS)    
  299.  *         - E.g.: Setting the parameter isEnabled as empty means that the    
  300.  *                 configuration isEnabled will be used instead              
  301.  *      2. The this pointer refers to the actor involved as the function      
  302.  *         contexts are Game_Actor.prototype                                  
  303.  *      3. The value of all parameters are contents of functions taking      
  304.  *         skillId - The id of the skill involved as the arguments            
  305.  *      4. Don't change the name nor the ordering of any function arguments  
  306.  *         unless you really know what you're truly doing                    
  307.  *    # Function arguments                                                    
  308.  *      1. isEnabled                                                          
  309.  *         None                                                              
  310.  *      2. bindNotePriority                                                  
  311.  *         Same as those mentioned in # General                              
  312.  *      3. useNotePriority                                                    
  313.  *         Same as those mentioned in # General                              
  314.  *      4. bindNoteChainingRule                                              
  315.  *         Same as those mentioned in # General                              
  316.  *      5. useNoteChainingRule                                                
  317.  *         Same as those mentioned in # General                              
  318.  *      6. bindHotkeyText                                                    
  319.  *         None                                                              
  320.  *      7. useSkillText                                                      
  321.  *         Same as those mentioned in # General                              
  322.  *      8. unusableSkillCoverIconPath                                        
  323.  *         None                                                              
  324.  *      9. unusableSkillCoverIconName                                        
  325.  *         None                                                              
  326.  *      10. unusableSkillCoverIconHue                                        
  327.  *         None                                                              
  328.  *      11. unusableSkillCoverIconSmooth                                      
  329.  *         None                                                              
  330.  *      12. hotkeyCmdWindowW                                                  
  331.  *         None                                                              
  332.  *      13. hotkeyCmdWindowH                                                  
  333.  *         None                                                              
  334.  *      14. hotkeyCmdWindowX                                                  
  335.  *         None                                                              
  336.  *      15. hotkeyCmdWindowY                                                  
  337.  *         None                                                              
  338.  *      16. hotkeyCmdLineH                                                    
  339.  *         None                                                              
  340.  *      17. hotkeyCmdFontSize                                                
  341.  *         None                                                              
  342.  *      18. hotkeyCmdPadding                                                  
  343.  *         None                                                              
  344.  *      19. hotkeyCmdTextPadding                                              
  345.  *         None                                                              
  346.  *      20. hotkeyCmdBackOpacity                                              
  347.  *         None                                                              
  348.  *      21. hotkeyCmdTranslucentOpacity                                      
  349.  *         None                                                              
  350.  *      22. hotkeyCmdWindowSpacing                                            
  351.  *         None                                                              
  352.  *      23. hotkeyListWindowW                                                
  353.  *         None                                                              
  354.  *      24. hotkeyListWindowH                                                
  355.  *         None                                                              
  356.  *      25. hotkeyListWindowX                                                
  357.  *         None                                                              
  358.  *      26. hotkeyListWindowY                                                
  359.  *         None                                                              
  360.  *      27. hotkeyListLineH                                                  
  361.  *         None                                                              
  362.  *      28. hotkeyListFontSize                                                
  363.  *         None                                                              
  364.  *      29. hotkeyListPadding                                                
  365.  *         None                                                              
  366.  *      30. hotkeyListTextPadding                                            
  367.  *         None                                                              
  368.  *      31. hotkeyListBackOpacity                                            
  369.  *         None                                                              
  370.  *      32. hotkeyListTranslucentOpacity                                      
  371.  *         None                                                              
  372.  *      33. hotkeyListSpacing                                                
  373.  *         None                                                              
  374.  *      34. hotkeyCmdListWindowW                                              
  375.  *         None                                                              
  376.  *      35. hotkeyCmdListWindowH                                              
  377.  *         None                                                              
  378.  *      36. hotkeyCmdListWindowX                                              
  379.  *         None                                                              
  380.  *      37. hotkeyCmdListWindowY                                              
  381.  *         None                                                              
  382.  *      38. hotkeyCmdListLineH                                                
  383.  *         None                                                              
  384.  *      39. hotkeyCmdListFontSize                                            
  385.  *         None                                                              
  386.  *      40. hotkeyCmdListPadding                                              
  387.  *         None                                                              
  388.  *      41. hotkeyCmdListTextPadding                                          
  389.  *         None                                                              
  390.  *      42. hotkeyCmdListBackOpacity                                          
  391.  *         None                                                              
  392.  *      43. hotkeyCmdListTranslucentOpacity                                  
  393.  *         None                                                              
  394.  *      44. hotkeyCmdListSpacing                                              
  395.  *         None                                                              
  396.  *    # Valid values                                                          
  397.  *      1. isEnabled                                                          
  398.  *         Any valid Javascript(It'll always be regarded as truthy/falsy)    
  399.  *         It'll only be used as a prerequisite when checking whether the    
  400.  *         actor inolved can bind/use hotkeys for the skill involved          
  401.  *      2. bindNotePriority                                                  
  402.  *         Note that skills always have the highest priority                  
  403.  *         Any valid Javascript returning any Array having the below String:  
  404.  *         - "states" States in the States category                          
  405.  *         - "armors" Armors in the Armors category                          
  406.  *         - "weapons" Weapons in the Weapons category                        
  407.  *         - "classes" Classes in the Classes category                        
  408.  *         - "actors" Actors in the Actors category                          
  409.  *         (Reference tag: NOTE_DATA_TYPES)                                  
  410.  *         The effective notetag priority among data types are sorted        
  411.  *         ascendingly in the array                                          
  412.  *         The effective notetag priority among the same data type are the    
  413.  *         same as the other priorities among there                          
  414.  *         Notetags of data belonging types not included in the array won't be
  415.  *         effective                                                          
  416.  *      3. useNotePriority                                                    
  417.  *         Note that skills always have the highest priority                  
  418.  *         Any valid Javascript returning any Array having the below String:  
  419.  *         - "states" States in the States category                          
  420.  *         - "armors" Armors in the Armors category                          
  421.  *         - "weapons" Weapons in the Weapons category                        
  422.  *         - "classes" Classes in the Classes category                        
  423.  *         - "actors" Actors in the Actors category                          
  424.  *         (Reference tag: NOTE_DATA_TYPES)                                  
  425.  *         The effective notetag priority among data types are sorted        
  426.  *         ascendingly in the array                                          
  427.  *         The effective notetag priority among the same data type are the    
  428.  *         same as the other priorities among there                          
  429.  *         Notetags of data belonging types not included in the array won't be
  430.  *         effective                                                          
  431.  *      4. bindNoteChainingRule                                              
  432.  *         Any valid Javascript returning any of the below String:            
  433.  *         - "first"(Only the notetag of the involved skill will be used)    
  434.  *         - "every"(All effective notetags must return truthy to be regarded
  435.  *                   as truthy)                                              
  436.  *         - "some"(All effective notetags must return falsy to be regarded as
  437.  *                 falsy)                                                    
  438.  *         All invalid values will be regarded as "first"                    
  439.  *         (Reference tag: DEFAULT_FIRST)                                    
  440.  *      5. useNoteChainingRule                                                
  441.  *         Any valid Javascript returning any of the below String:            
  442.  *         - "first"(Only the notetag of the involved skill will be used)    
  443.  *         - "every"(All effective notetags must return truthy to be regarded
  444.  *                   as truthy)                                              
  445.  *         - "some"(All effective notetags must return falsy to be regarded as
  446.  *                 falsy)                                                    
  447.  *         All invalid values will be regarded as "first"                    
  448.  *         (Reference tag: DEFAULT_FIRST)                                    
  449.  *      6. bindHotkeyText                                                    
  450.  *         Any valid Javascript returning any String                          
  451.  *      7. useSkillText                                                      
  452.  *         Any valid Javascript returning any String                          
  453.  *      8. unusableSkillCoverIconPath                                        
  454.  *         Any valid Javascript returning any String as the path of an image  
  455.  *         file in the project directory                                      
  456.  *         Returning random values would lead to heavy performance penalties  
  457.  *      9. unusableSkillCoverIconName                                        
  458.  *         Any valid Javascript returning any String as the name of an image  
  459.  *         file in the project directory                                      
  460.  *         Returning random values would lead to heavy performance penalties  
  461.  *      10. unusableSkillCoverIconHue                                        
  462.  *         Any valid Javascript returning any Number as the hue of an image  
  463.  *         file in the project directory                                      
  464.  *         Returning random values would lead to heavy performance penalties  
  465.  *      11. unusableSkillCoverIconSmooth                                      
  466.  *         Any valid Javascript returning any Boolean as the smooth flag of an
  467.  *         image file in the project directory                                
  468.  *         Returning random values would lead to heavy performance penalties  
  469.  *      12. hotkeyCmdWindowW                                                  
  470.  *         Any valid Javascript returning any positive Number                
  471.  *         Returning random values would lead to heavy performance penalties  
  472.  *      13. hotkeyCmdWindowH                                                  
  473.  *         Any valid Javascript returning any positive Number                
  474.  *         Returning random values would lead to heavy performance penalties  
  475.  *      14. hotkeyCmdWindowX                                                  
  476.  *         Any valid Javascript returning any non negative Number            
  477.  *         Returning random values would lead to heavy performance penalties  
  478.  *      15. hotkeyCmdWindowY                                                  
  479.  *         Any valid Javascript returning any non negative Number            
  480.  *         Returning random values would lead to heavy performance penalties  
  481.  *      16. hotkeyCmdLineH                                                    
  482.  *         Any valid Javascript returning any positive Number                
  483.  *         Returning random values would lead to heavy performance penalties  
  484.  *      17. hotkeyCmdFontSize                                                
  485.  *         Any valid Javascript returning any positive Number                
  486.  *         Returning random values would lead to heavy performance penalties  
  487.  *      18. hotkeyCmdPadding                                                  
  488.  *         Any valid Javascript returning any non negative Number            
  489.  *         Returning random values would lead to heavy performance penalties  
  490.  *      19. hotkeyCmdTextPadding                                              
  491.  *         Any valid Javascript returning any non negative Number            
  492.  *         Returning random values would lead to heavy performance penalties  
  493.  *      20. hotkeyCmdBackOpacity                                              
  494.  *         Any valid Javascript returning any Number ranging from 0 to 255    
  495.  *         Returning random values would lead to heavy performance penalties  
  496.  *      21. hotkeyCmdTranslucentOpacity                                      
  497.  *         Any valid Javascript returning any Number ranging from 0 to 255    
  498.  *         Returning random values would lead to heavy performance penalties  
  499.  *      22. hotkeyCmdSpacing                                                  
  500.  *         Any valid Javascript returning any non negative Number            
  501.  *         Returning random values would lead to heavy performance penalties  
  502.  *      23. hotkeyListWindowW                                                
  503.  *         Any valid Javascript returning any positive Number                
  504.  *         Returning random values would lead to heavy performance penalties  
  505.  *      24. hotkeyListWindowH                                                
  506.  *         Any valid Javascript returning any positive Number                
  507.  *         Returning random values would lead to heavy performance penalties  
  508.  *      25. hotkeyListWindowX                                                
  509.  *         Any valid Javascript returning any non negative Number            
  510.  *         Returning random values would lead to heavy performance penalties  
  511.  *      26. hotkeyListWindowY                                                
  512.  *         Any valid Javascript returning any non negative Number            
  513.  *         Returning random values would lead to heavy performance penalties  
  514.  *      27. hotkeyListLineH                                                  
  515.  *         Any valid Javascript returning any positive Number                
  516.  *         Returning random values would lead to heavy performance penalties  
  517.  *      28. hotkeyListFontSize                                                
  518.  *         Any valid Javascript returning any positive Number                
  519.  *         Returning random values would lead to heavy performance penalties  
  520.  *      29. hotkeyListPadding                                                
  521.  *         Any valid Javascript returning any non negative Number            
  522.  *         Returning random values would lead to heavy performance penalties  
  523.  *      30. hotkeyListTextPadding                                            
  524.  *         Any valid Javascript returning any non negative Number            
  525.  *         Returning random values would lead to heavy performance penalties  
  526.  *      31. hotkeyListBackOpacity                                            
  527.  *         Any valid Javascript returning any Number ranging from 0 to 255    
  528.  *         Returning random values would lead to heavy performance penalties  
  529.  *      32. hotkeyListTranslucentOpacity                                      
  530.  *         Any valid Javascript returning any Number ranging from 0 to 255    
  531.  *         Returning random values would lead to heavy performance penalties  
  532.  *      33. hotkeyListSpacing                                                
  533.  *         Any valid Javascript returning any non negative Number            
  534.  *         Returning random values would lead to heavy performance penalties  
  535.  *      34. hotkeyCmdListWindowW                                              
  536.  *         Any valid Javascript returning any positive Number                
  537.  *         Returning random values would lead to heavy performance penalties  
  538.  *      35. hotkeyCmdListWindowH                                              
  539.  *         Any valid Javascript returning any positive Number                
  540.  *         Returning random values would lead to heavy performance penalties  
  541.  *      36. hotkeyCmdListWindowX                                              
  542.  *         Any valid Javascript returning any non negative Number            
  543.  *         Returning random values would lead to heavy performance penalties  
  544.  *      37. hotkeyCmdListWindowY                                              
  545.  *         Any valid Javascript returning any non negative Number            
  546.  *         Returning random values would lead to heavy performance penalties  
  547.  *      38. hotkeyCmdListLineH                                                
  548.  *         Any valid Javascript returning any positive Number                
  549.  *         Returning random values would lead to heavy performance penalties  
  550.  *      39. hotkeyCmdListFontSize                                            
  551.  *         Any valid Javascript returning any positive Number                
  552.  *         Returning random values would lead to heavy performance penalties  
  553.  *      40. hotkeyCmdListPadding                                              
  554.  *         Any valid Javascript returning any non negative Number            
  555.  *         Returning random values would lead to heavy performance penalties  
  556.  *      41. hotkeyCmdListTextPadding                                          
  557.  *         Any valid Javascript returning any non negative Number            
  558.  *         Returning random values would lead to heavy performance penalties  
  559.  *      42. hotkeyCmdListBackOpacity                                          
  560.  *         Any valid Javascript returning any Number ranging from 0 to 255    
  561.  *         Returning random values would lead to heavy performance penalties  
  562.  *      43. hotkeyCmdListTranslucentOpacity                                  
  563.  *         Any valid Javascript returning any Number ranging from 0 to 255    
  564.  *         Returning random values would lead to heavy performance penalties  
  565.  *      44. hotkeyCmdListSpacing                                              
  566.  *         Any valid Javascript returning any non negative Number            
  567.  *         Returning random values would lead to heavy performance penalties  
  568.  *    # Examples                                                              
  569.  *      1. isEnabled                                                          
  570.  *          Setting isEnabled as return false; will disable this plugin      
  571.  *      2. bindNotePriority                                                  
  572.  *         Aside from the skills, which always have the highest priority,    
  573.  *         setting bindNotePriority as                                        
  574.  *         return ["states", "armors", "weapons", "classes"];                
  575.  *         will cause the <bind skill hotkey: BSHX> notetags in the States    
  576.  *         category to have the highest priorities, followed by the Armors,  
  577.  *         Weapons and Classes categories, whereas no notetags in the Actors  
  578.  *         categories will be effective                                      
  579.  *      3. useNotePriority                                                    
  580.  *         Aside from the skills, which always have the highest priority,    
  581.  *         setting useNotePriority as                                        
  582.  *         return ["states", "armors", "weapons", "classes"];                
  583.  *         will cause the <use skill hotkey: USHX> notetags in the States    
  584.  *         category to have the highest priorities, followed by the Armors,  
  585.  *         Weapons and Classes categories, whereas no notetags in the Actors  
  586.  *         categories will be effective                                      
  587.  *      4. bindNoteChainingRule                                              
  588.  *         Setting bindNoteChainingRule as return "every"; will cause the    
  589.  *         result to be truthy if and only if all effective                  
  590.  *         <bind skill hotkey: BSHX> notetags return truthy                  
  591.  *      5. useNoteChainingRule                                                
  592.  *         Setting useNoteChainingRule as return "every"; will cause the      
  593.  *         result to be truthy if and only if all effective                  
  594.  *         <use skill hotkey: USHX> notetags return truthy                    
  595.  *      6. bindHotkeyText                                                    
  596.  *         Setting bindHotkeyText as return "Set Hotkey"; will set the bind  
  597.  *         hotkey text for skills without hotkeys as Set Hotkey              
  598.  *      7. useSkillText                                                      
  599.  *         Setting useSkillText as return "Use"; will set the use skill text  
  600.  *         when showing the bind hotkey texts as Use                          
  601.  *      8. unusableSkillCoverIconPath                                        
  602.  *         Setting unusableSkillCoverIconPath as return "img/pictures/"; will
  603.  *         set the path of the icon covering theicon of unusable skills with  
  604.  *         hotkeys as thefolder pictures which is in the folder img          
  605.  *      9. unusableSkillCoverIconName                                        
  606.  *         Setting unusableSkillCoverIconName as return "UnusableSkill"; will
  607.  *         set the name of the icon covering the icon of unusable skills with
  608.  *         hotkeys as UnusableSkill.png                                      
  609.  *      10. unusableSkillCoverIconHue                                        
  610.  *         Setting unusableSkillCoverIconHue as return 0; will set the name of
  611.  *         the icon covering the icon of unusable skills with hotkeys as 0    
  612.  *      11. unusableSkillCoverIconSmooth                                      
  613.  *         Setting unusableSkillCoverIconSmooth as return true; will set the  
  614.  *         smooth flag of the icon covering the icon of unusable skills with  
  615.  *         hotkeys as true                                                    
  616.  *      12. hotkeyCmdWindowW                                                  
  617.  *         Setting hotkeyCmdWindowW as                                        
  618.  *         return Window_Command.prototype.windowWidth.call(this); will set  
  619.  *         the width of the window for binding hotkeys to skills as that of  
  620.  *         an ordinary command window                                        
  621.  *      13. hotkeyCmdWindowH                                                  
  622.  *         Setting hotkeyCmdWindowH as                                        
  623.  *         return Window_Command.prototype.windowHeight.call(this); will set  
  624.  *         the height of the window for binding hotkeys to skills as that of  
  625.  *         an ordinary command window                                        
  626.  *      14. hotkeyCmdWindowX                                                  
  627.  *         Setting hotkeyCmdWindowX as return 0; will set the x position of  
  628.  *         the window for binding hotkeys to skills as 0 pixel from the game  
  629.  *         screen                                                            
  630.  *      15. hotkeyCmdWindowY                                                  
  631.  *         Setting hotkeyCmdWindowY as return 0; will set the y position of  
  632.  *         the window for binding hotkeys to skills as 0 pixel from the game  
  633.  *         screen                                                            
  634.  *      16. hotkeyCmdLineH                                                    
  635.  *         Setting hotkeyCmdLineH as return 36; will set the line height of  
  636.  *         the window for binding hotkeys to skills as 36 pixels              
  637.  *      17. hotkeyCmdFontSize                                                
  638.  *         Setting hotkeyCmdFontSize as return 28; will set the standard font
  639.  *         size of the window for binding hotkeys to skills as 28 pixels      
  640.  *      18. hotkeyCmdPadding                                                  
  641.  *         Setting hotkeyCmdPadding as return 18; will set the standard      
  642.  *         padding of the window for binding hotkeys to skills as 18 pixels  
  643.  *      19. hotkeyCmdTextPadding                                              
  644.  *         Setting hotkeyCmdTextPadding as return 6; will set the text padding
  645.  *         of the window for binding hotkeys to skills as 6 pixels            
  646.  *      20. hotkeyCmdBackOpacity                                              
  647.  *         Setting hotkeyCmdBackOpacity as return 192; will set the standard  
  648.  *         back opacity of the window for binding hotkeys to skills as 192    
  649.  *      21. hotkeyCmdTranslucentOpacity                                      
  650.  *         Setting hotkeyCmdTranslucentOpacity as return 160; will set the    
  651.  *         translucent opacity opacity of the window for binding hotkeys to  
  652.  *         skills as 160                                                      
  653.  *      22. hotkeyCmdSpacing                                                  
  654.  *         Setting hotkeyCmdSpacing as return 12; will set the selectable    
  655.  *         spacing of the window for binding hotkeys to skills as 12          
  656.  *      23. hotkeyListWindowW                                                
  657.  *         Setting hotkeyListWindowW as return Graphics.boxWidth; will set the
  658.  *         width of the window listing the actor hotkey slots as that of the  
  659.  *         game screen                                                        
  660.  *      24. hotkeyListWindowH                                                
  661.  *         Setting hotkeyListWindowH as this.fittingHeight(2); will set the  
  662.  *         height of the window listing the actor hotkey slots as that of an  
  663.  *         ordinary window having 2 line contents                            
  664.  *      25. hotkeyListWindowX                                                
  665.  *         Setting hotkeyListWindowX as return 0; will set the x position of  
  666.  *         the window listing the actor hotkey slots as 0 pixel from the game
  667.  *         screen                                                            
  668.  *      26. hotkeyListWindowY                                                
  669.  *         Setting hotkeyListWindowY as return 0; will set the y position of  
  670.  *         the window listing the actor hotkey slots as 0 pixel from the game
  671.  *         screen                                                            
  672.  *      27. hotkeyListLineH                                                  
  673.  *         Setting hotkeyListLineH as return 36; will set the line height of  
  674.  *         the window listing the actor hotkey slots as 36 pixels            
  675.  *      28. hotkeyListFontSize                                                
  676.  *         Setting hotkeyListFontSize as return 28; will set the standard font
  677.  *         size of the window listing the actor hotkey slots as 28 pixels    
  678.  *      29. hotkeyListPadding                                                
  679.  *         Setting hotkeyListPadding as return 18; will set the standard      
  680.  *         padding of the window listing the actor hotkey slots as 18 pixels  
  681.  *      30. hotkeyListTextPadding                                            
  682.  *         Setting hotkeyListTextPadding as return 6; will set the text      
  683.  *         padding of the window listing the actor hotkey slots as 6 pixels  
  684.  *      31. hotkeyListBackOpacity                                            
  685.  *         Setting hotkeyListBackOpacity as return 192; will set the standard
  686.  *         back opacity of the window listing the actor hotkey slots as 192  
  687.  *      32. hotkeyListTranslucentOpacity                                      
  688.  *         Setting hotkeyListTranslucentOpacity as return 160; will set the  
  689.  *         translucent opacity of the window listing the actor hotkey slots as
  690.  *         160                                                                
  691.  *      33. hotkeyListSpacing                                                
  692.  *         Setting hotkeyListSpacing as return 12; will set the selectable    
  693.  *         spacing of the window listing the actor hotkey slots as 12        
  694.  *      34. hotkeyCmdListWindowW                                              
  695.  *         Setting hotkeyCmdListWindowW as return Graphics.boxWidth; will set
  696.  *         the width of the window listing the hotkeys in battle as that of  
  697.  *         the game screen                                                    
  698.  *      35. hotkeyCmdListWindowH                                              
  699.  *         Setting hotkeyListWindowH as this.fittingHeight(2); will set the  
  700.  *         height of the window listing the hotkeys in battle as that of an  
  701.  *         ordinary window having 2 line contents                            
  702.  *      36. hotkeyCmdListWindowX                                              
  703.  *         Setting hotkeyCmdListWindowX as return 0; will set the x position  
  704.  *         of the window listing the hotkeys in battle as 0 pixel from the    
  705.  *         game screen                                                        
  706.  *      37. hotkeyCmdListWindowY                                              
  707.  *         Setting hotkeyCmdListWindowY as                                    
  708.  *         return Graphics.boxHeight - this.fittingHeight(4) - this.windowHeight();
  709.  *         will set the window listing the hotkeys in battle to be placed    
  710.  *         right above the status window                                      
  711.  *      38. hotkeyListLineH                                                  
  712.  *         Setting hotkeyCmdListLineH as return 36; will set the line height  
  713.  *         of the window listing the hotkeys in battle as 36 pixels          
  714.  *      39. hotkeyListFontSize                                                
  715.  *         Setting hotkeyCmdListFontSize as return 28; will set the standard  
  716.  *         font size of the window listing the hotkeys in battle as 28 pixels
  717.  *      40. hotkeyListPadding                                                
  718.  *         Setting hotkeyCmdListPadding as return 18; will set the standard  
  719.  *         padding of the window listing the hotkeys in battle as 18 pixels  
  720.  *      41. hotkeyListTextPadding                                            
  721.  *         Setting hotkeyCmdListTextPadding as return 6; will set the text    
  722.  *         padding of the window listing the hotkeys in battle as 6 pixels    
  723.  *      42. hotkeyListBackOpacity                                            
  724.  *         Setting hotkeyCmdListBackOpacity as return 192; will set the      
  725.  *         standard back opacity of the window listing the hotkeys in battle  
  726.  *         as 192                                                            
  727.  *      43. hotkeyListTranslucentOpacity                                      
  728.  *         Setting hotkeyCmdListTranslucentOpacity as return 160; will set the
  729.  *         translucent opacity of the window listing the hotkeys in battle as
  730.  *         160                                                                
  731.  *      44. hotkeyListSpacing                                                
  732.  *         Setting hotkeyCmdListSpacing as return 12; will set the selectable
  733.  *         spacing of the window listing the hotkeys in battle as 12          
  734.  *============================================================================
  735.  *    ## Notetag Info                                                        
  736.  *       Among all the same notetag types in the same data, only the 1st one  
  737.  *       can be effective(Reference tag: NOTETAG_MONO)                        
  738.  *       Each line can only have at most 1 notetag(Reference tag: LINE_MONO)  
  739.  *----------------------------------------------------------------------------
  740.  *    # Actor/Class/Weapon/Armor/State/Skill Notetags:                        
  741.  *      Having no effective notetag means the actors can bind hotkeys        
  742.  *      to the skills(Reference tag: DEFAULT_TRUE)                            
  743.  *      1. <bind skill hotkey: BSHX>                                          
  744.  *         - Sets whether the actor can bind hotkeys for the skill as the    
  745.  *           value returned by function with name BSHX, which can only be    
  746.  *           edited in the configuration region, which is inside this plugin  
  747.  *           js file contents, directly                                      
  748.  *         - E.g.:                                                            
  749.  *           <bind skill hotkey: BSH1> will set the actor to always be able to
  750.  *           bind the skill due to BSH1, which is the name of a function in  
  751.  *           the configuration region, always returning true                  
  752.  *    # Actor/Class/Weapon/Armor/State Notetags:                              
  753.  *      Having no effective notetag means the actors can use hotkeys          
  754.  *      1. <use skill hotkey: USHX>                                          
  755.  *         - Sets whether the actor can use hotkeys as the value returned by  
  756.  *           function with name USHX, which can only be edited in the        
  757.  *           configuration region, which is inside this plugin js file        
  758.  *           contents, directly                                              
  759.  *         - E.g.:                                                            
  760.  *           <use skill hotkey: USH1> will set the actor to always be able to
  761.  *           use the skill due to USH1, which is the name of a function in the
  762.  *           configuration region, always returning true                      
  763.  *============================================================================
  764.  *    ## Plugin Call Info                                                    
  765.  *----------------------------------------------------------------------------
  766.  *    # Configuration manipulations                                          
  767.  *      1. $gameSystem.skillHotkeys.params.param                              
  768.  *         - Returns the stored value of param listed in the plugin manager or
  769.  *           their configuration counterpart                                  
  770.  *         - E.g.:                                                            
  771.  *           $gameSystem.skillHotkeys.params.isEnabled will return the        
  772.  *           contents of a function returning a Boolean indicating whether    
  773.  *           this plugin's enabled                                            
  774.  *      2. $gameSystem.skillHotkeys.params.param = funcContents              
  775.  *         - Sets the stored value of param listed in the plugin manager or  
  776.  *           their configuration counterpart as funcContents, which is the    
  777.  *           contents of a function                                          
  778.  *         - E.g.:                                                            
  779.  *           $gameSystem.skillHotkeys.params.isEnabled = return false; will  
  780.  *           set the stored value of parameter isEnabled shown on the plugin  
  781.  *           manager or its configuration counterpart as return false;,      
  782.  *           causing the corresponding function to always return false, thus  
  783.  *           always disabling this plugin                                    
  784.  *         - $gameSystem.skillHotkeys.params.param changes will be saved      
  785.  *         - DoubleX_RMMV.Skill_Hotkeys.params.param = func, where func is the
  786.  *           corresponding function having funcContents as its contents,      
  787.  *           should be explicitly called immediately afterwards              
  788.  *      3. $gameSystem.skillHotkeys.cfgs.cfg                                  
  789.  *         - Basically the same as $gameSystem.skillHotkeys.params.param,    
  790.  *           except that this plugin call applies to configurations found in  
  791.  *           the configuration region only                                    
  792.  *      4. $gameSystem.skillHotkeys.cfgs.cfg = funcContents                  
  793.  *         - Basically the same as                                            
  794.  *           $gameSystem.skillHotkeys.params.param = funcContents, except that
  795.  *           this plugin call applies to configurations found in the          
  796.  *           configuration region only                                        
  797.  *         - DoubleX_RMMV.Skill_Hotkeys.cfgs.cfg = func, where func is the    
  798.  *           corresponding function having funcContents as its contents,      
  799.  *           should be explicitly called immediately afterwards              
  800.  *      5. $gameSystem.skillHotkeys.notes.note                                
  801.  *         - Basically the same as $gameSystem.skillHotkeys.params.param,    
  802.  *           except that this plugin call applies to notetag values found in  
  803.  *           the configuration region                                        
  804.  *      6. $gameSystem.skillHotkeys.notes.note = funcContents                
  805.  *         - Basically the same as                                            
  806.  *           $gameSystem.skillHotkeys.params.param = funcContents, except that
  807.  *           this plugin call applies to notetag values found in the          
  808.  *           configuration region                                            
  809.  *         - DoubleX_RMMV.Skill_Hotkeys.notes.note = func, where func is the  
  810.  *           corresponding function having funcContents as its contents,      
  811.  *           should be explicitly called immediately afterwards              
  812.  *    # Actor/Class/Weapon/Armor/State/Skill notetag manipulations            
  813.  *      1. meta.skillHotkeys.canBind                                          
  814.  *         - Returns the function name BSHX, which is a String, in            
  815.  *           <bind skill hotkey: BSHX>                                        
  816.  *         - E.g.:                                                            
  817.  *           $dataStates[1].meta.skillHotkeys.canBind will return the function
  818.  *           name BSH1, which is a String, in <bind skill hotkey: BSH1>      
  819.  *           notetag of state with id 1                                      
  820.  *      2. meta.skillHotkeys.canBind = BSHX                                  
  821.  *         - Sets the <bind skill hotkey: BSHX> notetag to use the function  
  822.  *           with name BSHX, which is a String                                
  823.  *         - E.g.:                                                            
  824.  *           $dataActors[2].meta.skillHotkeys.canBind = BSH1 will set the    
  825.  *           <bind skill hotkey: BSHX> notetag of actor with id 2 to use the  
  826.  *           function with name BSH1, with is a String                        
  827.  *         - The function name must be one of the notetag values in the      
  828.  *           configuration region                                            
  829.  *         - All meta.statusBars changes can be saved if                      
  830.  *           DoubleX RMMV Dynamic Data is used                                
  831.  *      3. meta.skillHotkeys.canUse                                          
  832.  *         - Basically the same as meta.skillHotkeys.canBind, except that this
  833.  *           plugin call works with <use skill hotkey: USHX>                  
  834.  *      4. meta.skillHotkeys.canUse = USHX                                    
  835.  *         - Basically the same as meta.skillHotkeys.canBind = BSHX, except  
  836.  *           that this plugin call works with <use skill hotkey: USHX>        
  837.  *    # Actor manipulations                                                  
  838.  *      1. bindSkillHotkey(skillId, hotkey)                                  
  839.  *         - Binds the hotkey with symbol hotkey to the skill with id skillId
  840.  *           for the actor involved, bypassing all <bind skill hotkey: BSHX>  
  841.  *           notetags                                                        
  842.  *         - E.g.:                                                            
  843.  *           $gameParty.aliveMembers()[0].bindSkillHotkey(1, #1) will bind the
  844.  *           hotkey with symbol #1 to the skill with id 1 for the 1st alive  
  845.  *           party member                                                    
  846.  *         - Don't use this plugin call when players are                      
  847.  *           binding/using hotkeys unless you really know what you're truly  
  848.  *           doing                                                            
  849.  *      2. canBindSkillHotkey(skillId)                                        
  850.  *         - Returns whether the actor involved can bind hotkeys for the skill
  851.  *           with id skillId                                                  
  852.  *         - E.g.:                                                            
  853.  *           $gameParty.aliveMembers()[0].canBindSkillHotkey(1) will return  
  854.  *           whether the 1st alive party member can bind hotkeys for the skill
  855.  *           with id 1                                                        
  856.  *      3. canUseSkillHotkey(skillId)                                        
  857.  *         - Returns whether the actor involved can use the hotkey bound to  
  858.  *           the skill with id skillId                                        
  859.  *         - E.g.:                                                            
  860.  *           $gameActors.actor(1).canUseSkillHotkey(1) will return whether the
  861.  *           actor with id 1 can use the hotkey bound to the skill with id 1  
  862.  *      4. isSkillHotkeysBound(skillId)                                      
  863.  *         - Returns whether the actor has bound a hotkey for the skill with  
  864.  *           id skillId                                                      
  865.  *         - E.g.:                                                            
  866.  *           $gameParty.aliveMembers()[$gameParty.aliveMembers().length - 1].
  867.  *                   isSkillHotkeysBound(1) will return whether the last alive
  868.  *           party member has bound a hotkey for the skill with id 1          
  869.  *      5. boundSkillHotkeys(skillId)                                        
  870.  *         - Returns the list of symbols of hotkeys bound to the skill with id
  871.  *           skillId                                                          
  872.  *         - E.g.:                                                            
  873.  *           $gameParty.aliveMembers()[$gameParty.aliveMembers().length - 1].
  874.  *                   boundSkillHotkeys(1) will return the list of symbols of  
  875.  *           hotkeys bound to the skill with id 1                            
  876.  *      6. hotkeys()                                                          
  877.  *         - Returns the list of symbols of hotkeys bound to skills          
  878.  *         - E.g.:                                                            
  879.  *           $gameParty.aliveMembers()[$gameParty.aliveMembers().length - 1].
  880.  *                   hotkeys() will return the list of symbols of hotkeys    
  881.  *           bound to the skills                                              
  882.  *      7. raiseSkillHotkeyNoteChangeFactors()                                
  883.  *         - Notifys that all notetags might need to be reevaluated due to    
  884.  *           potential data source changes or changes in the actor involved  
  885.  *         - This plugin call should be called whenever there are potential  
  886.  *           changes in the bindNoteChainingRule/useNoteChainingRule          
  887.  *           parameter/configuration                                          
  888.  *         - E.g.:                                                            
  889.  *           $gameActors.actor(1).raiseSkillHotkeyNoteChangeFactors() will    
  890.  *           notify the actor with id 1 that all notetags might need to be    
  891.  *           reevaluated due to potential data source changes or changes in  
  892.  *           the actor involved                                              
  893.  *      8. skillHotkeys.hotkeyMapping                                        
  894.  *         - Access the mapping from the hotkey symbols to the skill ids where
  895.  *           the hotkey represented by the formers' bound to the skill        
  896.  *           referred by the latters                                          
  897.  *         - E.g.:                                                            
  898.  *           $gameActors.actor(1).skillHotkeys.hotkeyMapping will access the  
  899.  *           mapping from the hotkey symbols to the skill ids where the hotkey
  900.  *           represented by the formers' bound to the skill referred by the  
  901.  *           latters for the actor with id 1                                  
  902.  *      9. skillHotkeys.noteChangeFactors[note][factor] = true                
  903.  *         - Notifys that the notetag note might need to be reevaluated due to
  904.  *           potential changes in factor factor                              
  905.  *         - note is either "canBind", referring to the notetag              
  906.  *           <bind skill hotkey: BSHX>, or 'canUse", referring to the notetag
  907.  *           <use skill hotkey: USHX>                                        
  908.  *         - factor is either "states", meaning the changes in state notetags,
  909.  *           "armors", meaning the changes in armor notetags, "weapons",      
  910.  *           meaning the changes in weapon notetags, "classes", meaning the  
  911.  *           changes in classes notetags, "actors", meaning the changes in    
  912.  *           actors notetags, or "priority", meaning the changes in the      
  913.  *           bindNotePriority/useNotePriority parameter/configuration        
  914.  *         - E.g.:                                                            
  915.  *           $gameParty.aliveMembers()[$gameParty.aliveMembers().length - 1].
  916.  *                   skillHotkeys. noteChangeFactors[canBind][priority] = true
  917.  *           will notify the last alive party member that the                
  918.  *           <bind skill hotkey: BSHX> notetag might need to be reevaluated  
  919.  *           due to potential changes in the bindNotePriority                
  920.  *           parameter/configuration                                          
  921.  *           (The counterpart for <use skill hotkey: USHX> is useNotePriority)
  922.  *============================================================================
  923.  *    ## Plugin Command Info                                                  
  924.  *----------------------------------------------------------------------------
  925.  *      1. bindSkillHotkey actorId skillId hotkey                            
  926.  *         - The same as the plugin call bindSkillHotkey(skillId, hotkey) in  
  927.  *           Actor manipulations for the actor with id actorId                
  928.  *         - Don't use this plugin command for actors that don't exist yet    
  929.  *           unless you really know what you're truly doing                  
  930.  *      2. canBindSkillHotkey actorId skillId                                
  931.  *         - The same as the plugin call canBindSkillHotkey(skillId) in      
  932.  *           Actor manipulations for the actor with id actorId                
  933.  *         - Don't use this plugin command for actors that don't exist yet    
  934.  *           unless you really know what you're truly doing                  
  935.  *      3. canUseSkillHotkey actorId skillId                                  
  936.  *         - The same as the plugin call canUseSkillHotkey(skillId) in        
  937.  *           Actor manipulations for the actor with id actorId                
  938.  *         - Don't use this plugin command for actors that don't exist yet    
  939.  *           unless you really know what you're truly doing                  
  940.  *      4. isSkillHotkeysBound actorId skillId                                
  941.  *         - The same as the plugin call isSkillHotkeysBound(skillId) in      
  942.  *           Actor manipulations for the actor with id actorId                
  943.  *         - Don't use this plugin command for actors that don't exist yet    
  944.  *           unless you really know what you're truly doing                  
  945.  *      5. boundSkillHotkeys actorId skillId                                  
  946.  *         - The same as the plugin call boundSkillHotkeys(skillId) in        
  947.  *           Actor manipulations for the actor with id actorId                
  948.  *         - Don't use this plugin command for actors that don't exist yet    
  949.  *           unless you really know what you're truly doing                  
  950.  *      6. hotkeys actorId                                                    
  951.  *         - The same as the plugin call hotkeys() in Actor manipulations for
  952.  *           the actor with id actorId                                        
  953.  *         - Don't use this plugin command for actors that don't exist yet    
  954.  *           unless you really know what you're truly doing                  
  955.  *      7. raiseSkillHotkeyNoteChangeFactors actorId                          
  956.  *         - The same as the plugin call raiseSkillHotkeyNoteChangeFactors()  
  957.  *           in Actor manipulations for the actor with id actorId            
  958.  *         - Don't use this plugin command for actors that don't exist yet    
  959.  *           unless you really know what you're truly doing                  
  960.  *============================================================================
  961.  */
  962.  
  963. var DoubleX_RMMV = DoubleX_RMMV || {};
  964. DoubleX_RMMV["Skill Hotkeys"] = "v1.00a";
  965.  
  966. // The plugin file name must be the same as DoubleX_RMMV.Skill_Hotkeys_File
  967. DoubleX_RMMV.Skill_Hotkeys_File = "DoubleX RMMV Skill Hotkeys v100a";
  968. //
  969.  
  970. /*============================================================================
  971.  *    ## Plugin Configurations                                                
  972.  *       You only need to edit this part as it's about what this plugin does  
  973.  *----------------------------------------------------------------------------*/
  974.  
  975. DoubleX_RMMV.Skill_Hotkeys = {
  976.  
  977. /*----------------------------------------------------------------------------
  978.  *    Parameter counterparts                                                  
  979.  *    - These configurations will only be used when their counterparts' empty
  980.  *----------------------------------------------------------------------------*/
  981.  
  982.     params: {
  983.  
  984.         /**
  985.          * The this pointer refers to the actor involved
  986.          * Sets whether this plugin will be enabled
  987.          * Hotspot/Nullipotent
  988.          * @returns {Boolean} The check result
  989.          * @since v1.00a
  990.          * @version v1.00a
  991.          */
  992.         isEnabled: function() { return true; /* Always enable this plugin */ },
  993.  
  994.         /**
  995.          * The this pointer refers to the actor involved
  996.          * Note that skills always have the highest priority
  997.          * Sets the priority of effective <bind skill hotkey: BSHX> notetags
  998.          * among all data types
  999.          * Potential Hotspot/Nullipotent
  1000.          * @param {Number} skillId - The id of the skill involved
  1001.          * @returns {Array[String]} The requested data type priority queue
  1002.          * @since v1.00a
  1003.          * @version v1.00a
  1004.          */
  1005.         bindNotePriority: function(skillId) {
  1006.             // States and Actors have the highest and lowest priorities
  1007.             return [
  1008.                 "states",
  1009.                 "armors",
  1010.                 "weapons",
  1011.                 "classes",
  1012.                 "actors"
  1013.             ];
  1014.             //
  1015.         }, // bindNotePriority
  1016.  
  1017.         /**
  1018.          * The this pointer refers to the actor involved
  1019.          * Note that skills always have the highest priority
  1020.          * Sets the priority of effective <use skill hotkey: USHX> notetags
  1021.          * among all data types
  1022.          * Potential Hotspot/Nullipotent
  1023.          * @param {Number} skillId - The id of the skill involved
  1024.          * @returns {Array[String]} The requested data type priority queue
  1025.          * @since v1.00a
  1026.          * @version v1.00a
  1027.          */
  1028.         useNotePriority: function(skillId) {
  1029.             // States and Actors have the highest and lowest priorities
  1030.             return [
  1031.                 "states",
  1032.                 "armors",
  1033.                 "weapons",
  1034.                 "classes",
  1035.                 "actors"
  1036.             ];
  1037.             //
  1038.         }, // useNotePriority
  1039.  
  1040.         /**
  1041.          * The this pointer refers to the actor involved
  1042.          * Sets the priority of effective <bind skill hotkey: BSHX> notetags
  1043.          * among all data types
  1044.          * Potential Hotspot/Nullipotent
  1045.          * @param {Number} skillId - The id of the skill involved
  1046.          * @returns {String} The requested effective notetag chaining rule
  1047.          * @since v1.00a
  1048.          * @version v1.00a
  1049.          */
  1050.         bindNoteChainingRule: function(skillId) {
  1051.             return "first"; // Only the 1st effective notetag will be used
  1052.         }, // bindNoteChainingRule
  1053.  
  1054.         /**
  1055.          * The this pointer refers to the actor involved
  1056.          * Sets the priority of effective <use skill hotkey: USHX> notetags
  1057.          * among all data types
  1058.          * Potential Hotspot/Nullipotent
  1059.          * @param {Number} skillId - The id of the skill involved
  1060.          * @returns {String} The requested effective notetag chaining rule
  1061.          * @since v1.00a
  1062.          * @version v1.00a
  1063.          */
  1064.         useNoteChainingRule: function(skillId) {
  1065.             return "first"; // Only the 1st effective notetag will be used
  1066.         }, // useNoteChainingRule
  1067.  
  1068.         /**
  1069.          * The this pointer refers to the actor involved
  1070.          * Sets the bind hotkey text for skills without hotkeys
  1071.          * Nullipotent
  1072.          * @returns {String} The requested bind hotkey text
  1073.          * @since v1.00a
  1074.          * @version v1.00a
  1075.          */
  1076.         bindHotkeyText: function() {
  1077.             return "Bind Hotkey"; // The bind hotkey text will be Bind Hotkey
  1078.         }, // bindHotkeyText
  1079.  
  1080.         /**
  1081.          * The this pointer refers to the actor involved
  1082.          * Sets the use skill text when showing the bind hotkey texts
  1083.          * Nullipotent
  1084.          * @param {Number} skillId - The id of the skill involved
  1085.          * @returns {String} The requested use skill text
  1086.          * @since v1.00a
  1087.          * @version v1.00a
  1088.          */
  1089.         useSkillText: function(skillId) {
  1090.             return "Use"; // The use skill text will be Use
  1091.         }, // useSkillText
  1092.  
  1093.         /**
  1094.          * The this pointer refers to the actor involved
  1095.          * Sets the path of the icon covering the icon of unusable skills
  1096.          * Returning random values would lead to heavy performance penalties
  1097.          * Hotspot/Nullipotent
  1098.          * @returns {String} The requested cover icon path
  1099.          * @since v1.00a
  1100.          * @version v1.00a
  1101.          */
  1102.         unusableSkillCoverIconPath: function() {
  1103.             // The path of the icon will be in pictures which is in img
  1104.             return "img/pictures/";
  1105.             //
  1106.         }, // unusableSkillCoverIconPath
  1107.  
  1108.         /**
  1109.          * The this pointer refers to the actor involved
  1110.          * Sets the name of the icon covering the icon of unusable skills
  1111.          * Returning random values would lead to heavy performance penalties
  1112.          * Hotspot/Nullipotent
  1113.          * @returns {String} The requested cover icon name
  1114.          * @since v1.00a
  1115.          * @version v1.00a
  1116.          */
  1117.         unusableSkillCoverIconName: function() {
  1118.             // The name of the icon will be UnusableSkill.png
  1119.             return "UnusableSkill";
  1120.             //
  1121.         }, // unusableSkillCoverIconName
  1122.  
  1123.         /**
  1124.          * The this pointer refers to the actor involved
  1125.          * Sets the hue of the icon covering the icon of unusable skills
  1126.          * Returning random values would lead to heavy performance penalties
  1127.          * Hotspot/Nullipotent
  1128.          * @returns {Number} The requested cover icon hue
  1129.          * @since v1.00a
  1130.          * @version v1.00a
  1131.          */
  1132.         unusableSkillCoverIconHue: function() {
  1133.             return 0; // The hue of the icon will be 0
  1134.         }, // unusableSkillCoverIconName
  1135.  
  1136.         /**
  1137.          * The this pointer refers to the actor involved
  1138.          * Sets the smooth flag of the icon covering the icon of unusable skills
  1139.          * Returning random values would lead to heavy performance penalties
  1140.          * Hotspot/Nullipotent
  1141.          * @returns {Boolean} The requested cover icon smooth flag
  1142.          * @since v1.00a
  1143.          * @version v1.00a
  1144.          */
  1145.         unusableSkillCoverIconSmooth: function() {
  1146.             return true; // The smooth flag of the icon will be true
  1147.         }, // unusableSkillCoverIconSmooth
  1148.  
  1149.         /**
  1150.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1151.          * Sets the width of the window for binding hotkeys to skills
  1152.          * Returning random values would lead to heavy performance penalties
  1153.          * Hotspot/Nullipotent
  1154.          * @returns {Number} The requested window width
  1155.          * @since v1.00a
  1156.          * @version v1.00a
  1157.          */
  1158.         hotkeyCmdWindowW: function() {
  1159.             // The width will be that of an ordinary command window
  1160.             return Window_SkillHotkeyBase.prototype.windowWidth.call(this);
  1161.             //
  1162.         }, // hotkeyCmdWindowW
  1163.  
  1164.         /**
  1165.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1166.          * Sets the height of the window for binding hotkeys to skills
  1167.          * Returning random values would lead to heavy performance penalties
  1168.          * Hotspot/Nullipotent
  1169.          * @returns {Number} The requested window height
  1170.          * @since v1.00a
  1171.          * @version v1.00a
  1172.          */
  1173.         hotkeyCmdWindowH: function() {
  1174.             // The height will be that of an ordinary command window
  1175.             return Window_SkillHotkeyBase.prototype.windowHeight.call(this);
  1176.             //
  1177.         }, // hotkeyCmdWindowH
  1178.  
  1179.         /**
  1180.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1181.          * Sets the x position of the window for binding hotkeys to skills
  1182.          * Returning random values would lead to heavy performance penalties
  1183.          * Hotspot/Nullipotent
  1184.          * @returns {Number} The requested window x position
  1185.          * @since v1.00a
  1186.          * @version v1.00a
  1187.          */
  1188.         hotkeyCmdWindowX: function() {
  1189.             return 0; // The x position will be 0 pixel from the game screen
  1190.         }, // hotkeyCmdWindowX
  1191.  
  1192.         /**
  1193.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1194.          * Sets the y position of the window for binding hotkeys to skills
  1195.          * Returning random values would lead to heavy performance penalties
  1196.          * Hotspot/Nullipotent
  1197.          * @returns {Number} The requested window y position
  1198.          * @since v1.00a
  1199.          * @version v1.00a
  1200.          */
  1201.         hotkeyCmdWindowY: function() {
  1202.             return 0; // The y position will be 0 pixel from the game screen
  1203.         }, // hotkeyCmdWindowY
  1204.  
  1205.         /**
  1206.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1207.          * Sets the line height of the window for binding hotkeys to skills
  1208.          * Returning random values would lead to heavy performance penalties
  1209.          * Hotspot/Nullipotent
  1210.          * @returns {Number} The requested window line height
  1211.          * @since v1.00a
  1212.          * @version v1.00a
  1213.          */
  1214.         hotkeyCmdLineH: function() {
  1215.             return 36; // The line height will be 36 pixels
  1216.         }, // hotkeyCmdLineH
  1217.  
  1218.         /**
  1219.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1220.          * Sets the standard font size of the window for binding hotkeys to
  1221.          * skills
  1222.          * Returning random values would lead to heavy performance penalties
  1223.          * Hotspot/Nullipotent
  1224.          * @returns {Number} The requested window standard font size
  1225.          * @since v1.00a
  1226.          * @version v1.00a
  1227.          */
  1228.         hotkeyCmdFontSize: function() {
  1229.             return 28; // The standard font size will be 28 pixels
  1230.         }, // hotkeyCmdFontSize
  1231.  
  1232.         /**
  1233.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1234.          * Sets the standard padding of the window for binding hotkeys to skills
  1235.          * Returning random values would lead to heavy performance penalties
  1236.          * Hotspot/Nullipotent
  1237.          * @returns {Number} The requested window standard padding
  1238.          * @since v1.00a
  1239.          * @version v1.00a
  1240.          */
  1241.         hotkeyCmdPadding: function() {
  1242.             return 18; // The standard padding will be 18 pixels
  1243.         }, // hotkeyCmdPadding
  1244.  
  1245.         /**
  1246.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1247.          * Sets the text padding of the window for binding hotkeys to skills
  1248.          * Returning random values would lead to heavy performance penalties
  1249.          * Hotspot/Nullipotent
  1250.          * @returns {Number} The requested window text padding
  1251.          * @since v1.00a
  1252.          * @version v1.00a
  1253.          */
  1254.         hotkeyCmdTextPadding: function() {
  1255.             return 6; // The text padding will be 6 pixels
  1256.         }, // hotkeyCmdTextPadding
  1257.  
  1258.         /**
  1259.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1260.          * Sets the standard back opacity of the window for binding hotkeys to
  1261.          * skills
  1262.          * Returning random values would lead to heavy performance penalties
  1263.          * Hotspot/Nullipotent
  1264.          * @returns {Number} The requested window standard back opacity
  1265.          * @since v1.00a
  1266.          * @version v1.00a
  1267.          */
  1268.         hotkeyCmdBackOpacity: function() {
  1269.             return 192; // The standard back opacity will be 192
  1270.         }, // hotkeyCmdBackOpacity
  1271.  
  1272.         /**
  1273.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1274.          * Sets the translucent opacity of the window for binding hotkeys to
  1275.          * skills
  1276.          * Returning random values would lead to heavy performance penalties
  1277.          * Hotspot/Nullipotent
  1278.          * @returns {Number} The requested window translucent opacity
  1279.          * @since v1.00a
  1280.          * @version v1.00a
  1281.          */
  1282.         hotkeyCmdTranslucentOpacity: function() {
  1283.             return 160; // The translucent opacity will be 160
  1284.         }, // hotkeyCmdTranslucentOpacity
  1285.  
  1286.         /**
  1287.          * The this pointer refers to the window(Window_SkillHotkeyCmd) involved
  1288.          * Sets the selectable spacing of the window for binding hotkeys to
  1289.          * skills
  1290.          * Returning random values would lead to heavy performance penalties
  1291.          * Hotspot/Nullipotent
  1292.          * @returns {Number} The requested window selectable spacing
  1293.          * @since v1.00a
  1294.          * @version v1.00a
  1295.          */
  1296.         hotkeyCmdSpacing: function() {
  1297.             return 12; // The selectable spacing will be 12 pixels
  1298.         }, // hotkeyCmdSpacing
  1299.  
  1300.         /**
  1301.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1302.          * involved
  1303.          * Sets the width of the window listing skill hotkeys for binding
  1304.          * Returning random values would lead to heavy performance penalties
  1305.          * Hotspot/Nullipotent
  1306.          * @returns {Number} The requested window width
  1307.          * @since v1.00a
  1308.          * @version v1.00a
  1309.          */
  1310.         hotkeyListWindowW: function() {
  1311.             // The width will be that of the game screen
  1312.             return Graphics.boxWidth;
  1313.             //
  1314.         }, // hotkeyListWindowW
  1315.  
  1316.         /**
  1317.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1318.          * involved
  1319.          * Sets the height of the window listing skill hotkeys for binding
  1320.          * Returning random values would lead to heavy performance penalties
  1321.          * Hotspot/Nullipotent
  1322.          * @returns {Number} The requested window height
  1323.          * @since v1.00a
  1324.          * @version v1.00a
  1325.          */
  1326.         hotkeyListWindowH: function() {
  1327.             // The height will be that of ordinary window having 2 line contents
  1328.             return this.fittingHeight(2);
  1329.             //
  1330.         }, // hotkeyListWindowH
  1331.  
  1332.         /**
  1333.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1334.          * involved
  1335.          * Sets the x position of the window listing skill hotkeys for binding
  1336.          * Returning random values would lead to heavy performance penalties
  1337.          * Hotspot/Nullipotent
  1338.          * @returns {Number} The requested window x position
  1339.          * @since v1.00a
  1340.          * @version v1.00a
  1341.          */
  1342.         hotkeyListWindowX: function() {
  1343.             return 0; // The x position will be 0 pixel from the game screen
  1344.         }, // hotkeyListWindowX
  1345.  
  1346.         /**
  1347.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1348.          * involved
  1349.          * Sets the y position of the window listing skill hotkeys for binding
  1350.          * Returning random values would lead to heavy performance penalties
  1351.          * Hotspot/Nullipotent
  1352.          * @returns {Number} The requested window y position
  1353.          * @since v1.00a
  1354.          * @version v1.00a
  1355.          */
  1356.         hotkeyListWindowY: function() {
  1357.             return 0; // The y position will be 0 pixel from the game screen
  1358.         }, // hotkeyListWindowY
  1359.  
  1360.         /**
  1361.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1362.          * involved
  1363.          * Sets the line height of the window listing skill hotkeys for binding
  1364.          * Returning random values would lead to heavy performance penalties
  1365.          * Hotspot/Nullipotent
  1366.          * @returns {Number} The requested window line height
  1367.          * @since v1.00a
  1368.          * @version v1.00a
  1369.          */
  1370.         hotkeyListLineH: function() {
  1371.             return 36; // The line height will be 36 pixels
  1372.         }, // hotkeyListLineH
  1373.  
  1374.         /**
  1375.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1376.          * involved
  1377.          * Sets the standard font size of the window listing skill hotkeys for
  1378.          * binding
  1379.          * Returning random values would lead to heavy performance penalties
  1380.          * Hotspot/Nullipotent
  1381.          * @returns {Number} The requested window standard font size
  1382.          * @since v1.00a
  1383.          * @version v1.00a
  1384.          */
  1385.         hotkeyListFontSize: function() {
  1386.             return 28; // The standard font size will be 28 pixels
  1387.         }, // hotkeyListFontSize
  1388.  
  1389.         /**
  1390.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1391.          * involved
  1392.          * Sets the standard padding of the window listing skill hotkeys for
  1393.          * binding
  1394.          * Returning random values would lead to heavy performance penalties
  1395.          * Hotspot/Nullipotent
  1396.          * @returns {Number} The requested window standard padding
  1397.          * @since v1.00a
  1398.          * @version v1.00a
  1399.          */
  1400.         hotkeyListPadding: function() {
  1401.             return 18; // The standard padding will be 18 pixels
  1402.         }, // hotkeyListPadding
  1403.  
  1404.         /**
  1405.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1406.          * involved
  1407.          * Sets the text padding of the window listing skill hotkeys for binding
  1408.          * Returning random values would lead to heavy performance penalties
  1409.          * Hotspot/Nullipotent
  1410.          * @returns {Number} The requested window text padding
  1411.          * @since v1.00a
  1412.          * @version v1.00a
  1413.          */
  1414.         hotkeyListTextPadding: function() {
  1415.             return 6; // The text padding will be 6 pixels
  1416.         }, // hotkeyListTextPadding
  1417.  
  1418.         /**
  1419.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1420.          * involved
  1421.          * Sets the standard back opacity of the window listing skill hotkeys
  1422.          * for binding
  1423.          * Returning random values would lead to heavy performance penalties
  1424.          * Hotspot/Nullipotent
  1425.          * @returns {Number} The requested window standard back opacity
  1426.          * @since v1.00a
  1427.          * @version v1.00a
  1428.          */
  1429.         hotkeyListBackOpacity: function() {
  1430.             return 192; // The standard back opacity will be 192
  1431.         }, // hotkeyListBackOpacity
  1432.  
  1433.         /**
  1434.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1435.          * involved
  1436.          * Sets the translucent opacity of the window listing skill hotkeys for
  1437.          * binding
  1438.          * Returning random values would lead to heavy performance penalties
  1439.          * Hotspot/Nullipotent
  1440.          * @returns {Number} The requested window translucent opacity
  1441.          * @since v1.00a
  1442.          * @version v1.00a
  1443.          */
  1444.         hotkeyListTranslucentOpacity: function() {
  1445.             return 160; // The translucent opacity will be 160
  1446.         }, // hotkeyListTranslucentOpacity
  1447.  
  1448.         /**
  1449.          * The this pointer refers to the window(Window_SkillHotkeyList)
  1450.          * involved
  1451.          * Sets the selectable spacing of the window listing skill hotkeys for
  1452.          * binding
  1453.          * Returning random values would lead to heavy performance penalties
  1454.          * Hotspot/Nullipotent
  1455.          * @returns {Number} The requested window selectable spacing
  1456.          * @since v1.00a
  1457.          * @version v1.00a
  1458.          */
  1459.         hotkeyListSpacing: function() {
  1460.             return 12; // The selectable spacing will be 12 pixels
  1461.         }, // hotkeyListSpacing
  1462.  
  1463.         /**
  1464.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1465.          * involved
  1466.          * Sets the width of the window listing actor skill hotkeys in battle
  1467.          * Returning random values would lead to heavy performance penalties
  1468.          * Hotspot/Nullipotent
  1469.          * @returns {Number} The requested window width
  1470.          * @since v1.00a
  1471.          * @version v1.00a
  1472.          */
  1473.         hotkeyCmdListWindowW: function() {
  1474.             // The width will be that of the game screen
  1475.             return Graphics.boxWidth;
  1476.             //
  1477.         }, // hotkeyCmdListWindowW
  1478.  
  1479.         /**
  1480.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1481.          * involved
  1482.          * Sets the height of the window listing actor skill hotkeys in battle
  1483.          * Returning random values would lead to heavy performance penalties
  1484.          * Hotspot/Nullipotent
  1485.          * @returns {Number} The requested window height
  1486.          * @since v1.00a
  1487.          * @version v1.00a
  1488.          */
  1489.         hotkeyCmdListWindowH: function() {
  1490.             // The height will be that of ordinary window having 2 line contents
  1491.             return this.fittingHeight(2);
  1492.             //
  1493.         }, // hotkeyCmdListWindowH
  1494.  
  1495.         /**
  1496.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1497.          * involved
  1498.          * Sets the x position of the window listing actor skill hotkeys in
  1499.          * battle
  1500.          * Returning random values would lead to heavy performance penalties
  1501.          * Hotspot/Nullipotent
  1502.          * @returns {Number} The requested window x position
  1503.          * @since v1.00a
  1504.          * @version v1.00a
  1505.          */
  1506.         hotkeyCmdListWindowX: function() {
  1507.             return 0; // The x position will be 0 pixel from the game screen
  1508.         }, // hotkeyCmdListWindowX
  1509.  
  1510.         /**
  1511.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1512.          * involved
  1513.          * Sets the y position of the window listing actor skill hotkeys in
  1514.          * battle
  1515.          * Returning random values would lead to heavy performance penalties
  1516.          * Hotspot/Nullipotent
  1517.          * @returns {Number} The requested window y position
  1518.          * @since v1.00a
  1519.          * @version v1.00a
  1520.          */
  1521.         hotkeyCmdListWindowY: function() {
  1522.             // The window will be placed right above the status window
  1523.             return Graphics.boxHeight - this.fittingHeight(4) -
  1524.                     this.windowHeight();
  1525.             //
  1526.         }, // hotkeyCmdListWindowY
  1527.  
  1528.         /**
  1529.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1530.          * involved
  1531.          * Sets the line height of the window listing actor skill hotkeys in
  1532.          * battle
  1533.          * Returning random values would lead to heavy performance penalties
  1534.          * Hotspot/Nullipotent
  1535.          * @returns {Number} The requested window line height
  1536.          * @since v1.00a
  1537.          * @version v1.00a
  1538.          */
  1539.         hotkeyCmdListLineH: function() {
  1540.             return 36; // The line height will be 36 pixels
  1541.         }, // hotkeyCmdListLineH
  1542.  
  1543.         /**
  1544.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1545.          * involved
  1546.          * Sets the standard font size of the window listing actor skill hotkeys
  1547.          * in battle
  1548.          * Returning random values would lead to heavy performance penalties
  1549.          * Hotspot/Nullipotent
  1550.          * @returns {Number} The requested window standard font size
  1551.          * @since v1.00a
  1552.          * @version v1.00a
  1553.          */
  1554.         hotkeyCmdListFontSize: function() {
  1555.             return 28; // The standard font size will be 28 pixels
  1556.         }, // hotkeyCmdListFontSize
  1557.  
  1558.         /**
  1559.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1560.          * involved
  1561.          * Sets the standard padding of the window listing actor skill hotkeys
  1562.          * in battle
  1563.          * Returning random values would lead to heavy performance penalties
  1564.          * Hotspot/Nullipotent
  1565.          * @returns {Number} The requested window standard padding
  1566.          * @since v1.00a
  1567.          * @version v1.00a
  1568.          */
  1569.         hotkeyCmdListPadding: function() {
  1570.             return 18; // The standard padding will be 18 pixels
  1571.         }, // hotkeyCmdListPadding
  1572.  
  1573.         /**
  1574.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1575.          * involved
  1576.          * Sets the text padding of the window listing actor skill hotkeys in
  1577.          * battle
  1578.          * Returning random values would lead to heavy performance penalties
  1579.          * Hotspot/Nullipotent
  1580.          * @returns {Number} The requested window text padding
  1581.          * @since v1.00a
  1582.          * @version v1.00a
  1583.          */
  1584.         hotkeyCmdListTextPadding: function() {
  1585.             return 6; // The text padding will be 6 pixels
  1586.         }, // hotkeyCmdListTextPadding
  1587.  
  1588.         /**
  1589.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1590.          * involved
  1591.          * Sets the standard back opacity of the window listing actor skill
  1592.          * hotkeys in battle
  1593.          * Returning random values would lead to heavy performance penalties
  1594.          * Hotspot/Nullipotent
  1595.          * @returns {Number} The requested window standard back opacity
  1596.          * @since v1.00a
  1597.          * @version v1.00a
  1598.          */
  1599.         hotkeyCmdListBackOpacity: function() {
  1600.             return 192; // The standard back opacity will be 192
  1601.         }, // hotkeyCmdListBackOpacity
  1602.  
  1603.         /**
  1604.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1605.          * involved
  1606.          * Sets the translucent opacity of the window listing actor skill
  1607.          * hotkeys in battle
  1608.          * Returning random values would lead to heavy performance penalties
  1609.          * Hotspot/Nullipotent
  1610.          * @returns {Number} The requested window translucent opacity
  1611.          * @since v1.00a
  1612.          * @version v1.00a
  1613.          */
  1614.         hotkeyCmdListTranslucentOpacity: function() {
  1615.             return 160; // The translucent opacity will be 160
  1616.         }, // hotkeyCmdListTranslucentOpacity
  1617.  
  1618.         /**
  1619.          * The this pointer refers to the window(Window_BattleSkillHotkeys)
  1620.          * involved
  1621.          * Sets the selectable spacing of the window listing actor skill hotkeys
  1622.          * in battle
  1623.          * Returning random values would lead to heavy performance penalties
  1624.          * Hotspot/Nullipotent
  1625.          * @returns {Number} The requested window selectable spacing
  1626.          * @since v1.00a
  1627.          * @version v1.00a
  1628.          */
  1629.         hotkeyCmdListSpacing: function() {
  1630.             return 12; // The selectable spacing will be 12 pixels
  1631.         } // hotkeyCmdListSpacing
  1632.  
  1633.     }, // params
  1634.  
  1635. /*----------------------------------------------------------------------------
  1636.  *    Configurations                                                          
  1637.  *    - These configurations don't have any parameter counterparts            
  1638.  *----------------------------------------------------------------------------*/
  1639.  
  1640.     cfgs: {
  1641.  
  1642.         /**
  1643.          * The this pointer refers to the actor involved
  1644.          * Sets the list of hotkeys mapped with their corresponding names
  1645.          * None of the hotkeys are supposed to be changed during the same battle
  1646.          * Using a keyboard mapping plugin, like Quasi Input, can be useful here
  1647.          * Ensure it won't return different values when binding/using hotkeys
  1648.          * unless you really know what you're truly doing
  1649.          * Potential Hotspot/Nullipotent
  1650.          * @returns {Object[String, String]} The requested hotkey-name mapping
  1651.          * @since v1.00a
  1652.          * @version v1.00a
  1653.          */
  1654.         hotkeyNames: function() {
  1655.             return {
  1656.                 "#1" : "1", // Hotkey #1 with name 1
  1657.                 "#2" : "2", // Hotkey #2 with name 2
  1658.                 "#3" : "3", // Hotkey #3 with name 3
  1659.                 "#4" : "4", // Hotkey #4 with name 4
  1660.                 "#5" : "5", // Hotkey #5 with name 5
  1661.                 "#6" : "6", // Hotkey #6 with name 6
  1662.                 "#7" : "7", // Hotkey #7 with name 7
  1663.                 "#8" : "8", // Hotkey #8 with name 8
  1664.                 "#9" : "9", // Hotkey #9 with name 9
  1665.                 "#0" : "0" // Hotkey #0 with name 0
  1666.             };
  1667.         } // hotkeyNames
  1668.  
  1669.     }, // cfgs
  1670.  
  1671. /*----------------------------------------------------------------------------
  1672.  *    Notetag values                                                          
  1673.  *    - These functions are used by notetags using function name as values    
  1674.  *----------------------------------------------------------------------------*/
  1675.  
  1676.     notes: {
  1677.  
  1678.         /*--------------------------------------------------------------------
  1679.          *    Bind Skill Hotkey Functions                                    
  1680.          *    - Setups BSHX used by this plugin's notetags                    
  1681.          *--------------------------------------------------------------------*/
  1682.         /* BSHX names can only use alphanumeric characters
  1683.          * The 1st character of BSHX can't be a number
  1684.          * The below BSHX are examples added to help you set your BSHX
  1685.          * You can freely use, rewrite and/or delete these examples
  1686.          */
  1687.  
  1688.         /**
  1689.          * The this pointer refers to the actor involved
  1690.          * Nullipotent
  1691.          * @param {Number} skillId - The id of the skill involved
  1692.          * @param {Object} data - The data having this notetag
  1693.          * @returns {Boolean} The check result
  1694.          * @since v1.00a
  1695.          * @version v1.00a
  1696.          */
  1697.         "BSH1": function(skillId, data) { return true; },
  1698.  
  1699.         /**
  1700.          * The this pointer refers to the actor involved
  1701.          * Nullipotent
  1702.          * @param {Number} skillId - The id of the skill involved
  1703.          * @param {Object} data - The data having this notetag
  1704.          * @returns {Boolean} The check result
  1705.          * @since v1.00a
  1706.          * @version v1.00a
  1707.          */
  1708.         "BSH2": function(skillId, data) { return false; },
  1709.  
  1710.         /**
  1711.          * The this pointer refers to the actor involved
  1712.          * Nullipotent
  1713.          * @param {Number} skillId - The id of the skill involved
  1714.          * @param {Object} data - The data having this notetag
  1715.          * @returns {Boolean} The check result
  1716.          * @since v1.00a
  1717.          * @version v1.00a
  1718.          */
  1719.         "BSH3": function(skillId, data) {
  1720.             // Returns the value in the game switch with id x
  1721.             return $gameSwitches.value(x);
  1722.             //
  1723.         }, // BSH3
  1724.  
  1725.         // Adds new BSHX here
  1726.        
  1727.  
  1728.         /*--------------------------------------------------------------------
  1729.          *    Use Skill Hotkey Functions                                      
  1730.          *    - Setups USHX used by this plugin's notetags                    
  1731.          *--------------------------------------------------------------------*/
  1732.         /* USHX names can only use alphanumeric characters
  1733.          * The 1st character of USHX can't be a number
  1734.          * The below USHX are examples added to help you set your USHX
  1735.          * You can freely use, rewrite and/or delete these examples
  1736.          */
  1737.  
  1738.         /**
  1739.          * The this pointer refers to the actor involved
  1740.          * Nullipotent
  1741.          * @param {Number} skillId - The id of the skill involved
  1742.          * @param {Object} data - The data having this notetag
  1743.          * @returns {Boolean} The check result
  1744.          * @since v1.00a
  1745.          * @version v1.00a
  1746.          */
  1747.         "USH1": function(skillId, data) { return true; },
  1748.  
  1749.         /**
  1750.          * The this pointer refers to the actor involved
  1751.          * Nullipotent
  1752.          * @param {Number} skillId - The id of the skill involved
  1753.          * @param {Object} data - The data having this notetag
  1754.          * @returns {Boolean} The check result
  1755.          * @since v1.00a
  1756.          * @version v1.00a
  1757.          */
  1758.         "USH2": function(skillId, data) {
  1759.             // Returns whether the id of the actor involved's 4
  1760.             return this._actorId === 4;
  1761.             //
  1762.         }, // USH2
  1763.  
  1764.         /**
  1765.          * The this pointer refers to the actor involved
  1766.          * Nullipotent
  1767.          * @param {Number} skillId - The id of the skill involved
  1768.          * @param {Object} data - The data having this notetag
  1769.          * @returns {Boolean} The check result
  1770.          * @since v1.00a
  1771.          * @version v1.00a
  1772.          */
  1773.         "USH3": function(skillId, data) {
  1774.             // Returns whether the id of the actor involved's not equal to 4
  1775.             return this._actorId !== 4;
  1776.             //
  1777.         } // USH3
  1778.  
  1779.         // Adds new USHX here
  1780.        
  1781.  
  1782.     } // notes
  1783.  
  1784. }; // DoubleX_RMMV.Skill_Hotkeys
  1785.  
  1786. /*============================================================================
  1787.  *    ## Plugin Implementations                                              
  1788.  *       You need not edit this part as it's about how this plugin works      
  1789.  *----------------------------------------------------------------------------
  1790.  *    # Plugin Support Info:                                                  
  1791.  *      1. Prerequisites                                                      
  1792.  *         - Solid understanding on how all those edited window and scene    
  1793.  *           classes work                                                    
  1794.  *         - Decent RMMV plugin development proficiency to fully comprehend  
  1795.  *           this                                                            
  1796.  *----------------------------------------------------------------------------*/
  1797.  
  1798. /*----------------------------------------------------------------------------
  1799.  *    # New classes:                                                          
  1800.  *      - Implements the UIs for binding/using hotkeys                        
  1801.  *----------------------------------------------------------------------------*/
  1802.  
  1803. function Window_SkillHotkeyBase() { this.initialize.apply(this, arguments); };
  1804.  
  1805. function Window_SkillHotkeyCmd() { this.initialize.apply(this, arguments); };
  1806.  
  1807. function Window_SkillHotkeyList() { this.initialize.apply(this, arguments); };
  1808.  
  1809. function Window_BattleSkillHotkeys() { this.initialize.apply(this, arguments); };
  1810.  
  1811. /*----------------------------------------------------------------------------
  1812.  *    # Edit class: DataManager                                              
  1813.  *      - Reads all notetags for binding/using hotkeys                        
  1814.  *----------------------------------------------------------------------------*/
  1815.  
  1816. (function(SH) {
  1817.  
  1818.     "use strict";
  1819.  
  1820.     SH.DataManager = { orig: {}, new: {} };
  1821.     var _DM = SH.DataManager.orig, $ = DataManager;
  1822.     var _SH = SH.DataManager.new;
  1823.     _SH._REG_EXPS = {
  1824.         canBind: /< *bind[-_ ]+skill[-_ ]+hotkeys *: *(\w+) *>/i,
  1825.         canUse: /< *use[-_ ]+skill[-_ ]+hotkeys *: *(\w+) *>/i
  1826.     };
  1827.     _SH._areAllNotesLoaded = false;
  1828.  
  1829.     _DM.isDatabaseLoaded = $.isDatabaseLoaded;
  1830.     $.isDatabaseLoaded = function() { // v1.00a - v1.00a; Extended
  1831.         // Edited to read all notetags of this plugin as well
  1832.         return _DM.isDatabaseLoaded.apply(this, arguments) &&
  1833.                 _SH._isDatabaseLoaded.call(this);
  1834.         //
  1835.     }; // $.isDatabaseLoaded
  1836.  
  1837.     _DM.extractSaveContents = $.extractSaveContents;
  1838.     $.extractSaveContents = function(contents) {
  1839.     // v1.00a - v1.00a; Extended
  1840.         _DM.extractSaveContents.apply(this, arguments);
  1841.         // Added to use the stored function contents
  1842.         _SH._extractSaveContents.call(this);
  1843.         //
  1844.     }; // $.extractSaveContents
  1845.  
  1846.     /**
  1847.      * The this pointer is DataManager
  1848.      * DataManager.isDatabaseLoaded was Nullipotent but is now Idempotent
  1849.      * Idempotent
  1850.      * @author DoubleX
  1851.      * @returns {Boolean} The database loaded flag
  1852.      * @since v1.00a
  1853.      * @todo: Make this function Nullipotent to preserve the contract integrity
  1854.      * @version v1.00a
  1855.      */
  1856.     _SH._isDatabaseLoaded = function() {
  1857.         // Ensures the notetags will only be read exactly once upon game start
  1858.         if (_SH._areAllNotesLoaded) return true;
  1859.         _SH._loadAllNotes.call(this);
  1860.         _SH._areAllNotesLoaded = true;
  1861.         return _SH._areAllNotesLoaded;
  1862.         //
  1863.     }; // _SH._isDatabaseLoaded
  1864.  
  1865.     /**
  1866.      * The this pointer is DataManager
  1867.      * Idempotent
  1868.      * @author DoubleX
  1869.      * @since v1.00a
  1870.      * @version v1.00a
  1871.      */
  1872.     _SH._loadAllNotes = function() {
  1873.         _SH._dataTypes.call(this).forEach(_SH._loadDataTypeNotes, this);
  1874.     }; // _SH._loadAllNotes
  1875.  
  1876.     /**
  1877.      * The this pointer is DataManager
  1878.      * Nullipotent
  1879.      * @author DoubleX
  1880.      * @returns {Array[Object]} The list of data types to have notetags loaded
  1881.      * @since v1.00a
  1882.      * @version v1.00a
  1883.      */
  1884.     _SH._dataTypes = function() {
  1885.         return [
  1886.             $dataActors,
  1887.             $dataClasses,
  1888.             $dataWeapons,
  1889.             $dataArmors,
  1890.             $dataStates,
  1891.             $dataSkills
  1892.         ];
  1893.     }; // _SH._dataTypes
  1894.  
  1895.     /**
  1896.      * The this pointer is DataManager
  1897.      * Idempotent
  1898.      * @author DoubleX
  1899.      * @param {Object} type - The data type to have notetags loaded
  1900.      * @since v1.00a
  1901.      * @version v1.00a
  1902.      */
  1903.     _SH._loadDataTypeNotes = function(type) {
  1904.         type.forEach(_SH._loadDataNotes, this);
  1905.     }; // _SH._loadDataTypeNotes
  1906.  
  1907.     /**
  1908.      * The this pointer is DataManager
  1909.      * Idempotent
  1910.      * @author DoubleX
  1911.      * @param {Object/Nullable} data - The data to have notetags loaded
  1912.      * @since v1.00a
  1913.      * @version v1.00a
  1914.      */
  1915.     _SH._loadDataNotes = function(data) {
  1916.         if (data) _SH._loadNotes.call(this, data);
  1917.     }; // _SH._loadDataNotes
  1918.  
  1919.     /**
  1920.      * The this pointer is DataManager
  1921.      * Idempotent
  1922.      * @author DoubleX
  1923.      * @param {Object} data - The data to have notetags loaded
  1924.      * @since v1.00a
  1925.      * @version v1.00a
  1926.      */
  1927.     _SH._loadNotes = function(data) {
  1928.         // Plugin call/command
  1929.         data.note.split(/[\r\n]+/).forEach(
  1930.                 _SH._loadLineNotesFunc(data.meta.skillHotkeys = {}), this);
  1931.         //
  1932.     }; // _SH._loadNotes
  1933.  
  1934.     /**
  1935.      * The this pointer is DataManager
  1936.      * Pure function
  1937.      * @author DoubleX
  1938.      * @param {Object[String, String]} skillHotkeys - The loaded notetag values
  1939.      * @returns {Function(String)} The function scanning the line for notetags
  1940.      * @since v1.00a
  1941.      * @version v1.00a
  1942.      */
  1943.     _SH._loadLineNotesFunc = function(skillHotkeys) {
  1944.         /**
  1945.          * The this pointer is DataManager
  1946.          * Idempotent
  1947.          * @author DoubleX
  1948.          * @param {String} line - The line being scanned for notetags
  1949.          * @since v1.00a
  1950.          * @version v1.00a
  1951.          */
  1952.         return function(line) {
  1953.             _SH._loadLineNotes.call(this, skillHotkeys, line);
  1954.         };
  1955.     }; // _SH._loadLineNotesFunc
  1956.  
  1957.     /**
  1958.      * The this pointer is DataManager
  1959.      * Idempotent
  1960.      * @author DoubleX
  1961.      * @param {Object[String, String]} skillHotkeys - The loaded notetag values
  1962.      * @param {String} line - The line being scanned for notetags to be loaded
  1963.      * @since v1.00a
  1964.      * @version v1.00a
  1965.      */
  1966.     _SH._loadLineNotes = function(skillHotkeys, line) {
  1967.         Object.keys(_SH._REG_EXPS).forEach(
  1968.                 _SH._loadNoteFunc(skillHotkeys, line), this);
  1969.     }; // _SH._loadLineNotes
  1970.  
  1971.     /**
  1972.      * The this pointer is DataManager
  1973.      * Pure function
  1974.      * @author DoubleX
  1975.      * @param {Object[String, String]} skillHotkeys - The loaded notetag values
  1976.      * @param {String} line - The line being scanned for notetags to be loaded
  1977.      * @returns {Function(String)} The function scanning the line for notetags
  1978.      * @since v1.00a
  1979.      * @version v1.00a
  1980.      */
  1981.     _SH._loadNoteFunc = function(skillHotkeys, line) {
  1982.        /**
  1983.          * The this pointer is DataManager
  1984.          * Idempotent
  1985.          * @author DoubleX
  1986.          * @param {String} note - The notetag to be loaded from the line
  1987.          * @since v1.00a
  1988.          * @version v1.00a
  1989.          */
  1990.         return function(note) {
  1991.             _SH._loadNote.call(this, skillHotkeys, line, note);
  1992.         };
  1993.     }; // _SH._loadNoteFunc
  1994.  
  1995.     /**
  1996.      * The this pointer is DataManager
  1997.      * Idempotent
  1998.      * @author DoubleX
  1999.      * @param {Object[String, String]} skillHotkeys - The loaded notetag values
  2000.      * @param {String} line - The line being scanned for notetags to be loaded
  2001.      * @param {String} note - The name of the notetag to be loaded
  2002.      * @since v1.00a
  2003.      * @version v1.00a
  2004.      */
  2005.     _SH._loadNote = function(skillHotkeys, line, note) {
  2006.         // Refer to reference tag LINE_MONO
  2007.         if (line.match(_SH._REG_EXPS[note])) skillHotkeys[note] = RegExp.$1;
  2008.         if (!skillHotkeys[note]) return;
  2009.         //
  2010.     }; // _SH._loadNote
  2011.  
  2012.     /**
  2013.      * The this pointer is DataManager
  2014.      * Idempotent
  2015.      * @author DoubleX
  2016.      * @since v1.00a
  2017.      * @version v1.00a
  2018.      */
  2019.     _SH._extractSaveContents = function() {
  2020.         _SH._extractFuncContents.call(this, "params");
  2021.         _SH._extractFuncContents.call(this, "cfgs");
  2022.         _SH._extractFuncContents.call(this, "notes");
  2023.     }; // _SH._extractSaveContents
  2024.  
  2025.     /**
  2026.      * The this pointer is DataManager
  2027.      * Idempotent
  2028.      * @author DoubleX
  2029.      * @param {String} funcType - The parameter/configuration/notetag label
  2030.      * @since v1.00a
  2031.      * @version v1.00a
  2032.      */
  2033.     _SH._extractFuncContents = function(funcType) {
  2034.         Object.keys($gameSystem.skillHotkeys[funcType]).forEach(
  2035.                 _SH._extractFuncContentFunc(funcType), this);
  2036.     }; // _SH._extractFuncContents
  2037.  
  2038.     /**
  2039.      * The this pointer is DataManager
  2040.      * Pure function
  2041.      * @author DoubleX
  2042.      * @param {String} funcType - The parameter/configuration/notetag label
  2043.      * @returns {Function(String)} The function extracting stored func content
  2044.      * @since v1.00a
  2045.      * @version v1.00a
  2046.      */
  2047.     _SH._extractFuncContentFunc = function(funcType) {
  2048.         /**
  2049.          * The this pointer is DataManager
  2050.          * Idempotent
  2051.          * @author DoubleX
  2052.          * @param {String} content - The name of the stored function content
  2053.          * @since v1.00a
  2054.          * @version v1.00a
  2055.          */
  2056.         return function(content) {
  2057.             _SH._extractFuncContent.call(this, funcType, content);
  2058.         };
  2059.     }; // _SH._extractFuncContentFunc
  2060.  
  2061.     /**
  2062.      * The this pointer is DataManager
  2063.      * Idempotent
  2064.      * @author DoubleX
  2065.      * @param {String} funcType - The parameter/configuration/notetag label
  2066.      * @param {String} content - The name of the stored function content
  2067.      * @since v1.00a
  2068.      * @version v1.00a
  2069.      */
  2070.     _SH._extractFuncContent = function(funcType, content) {
  2071.         SH[funcType][content] = $gameSystem.skillHotkeysFunc(
  2072.                 $gameSystem.skillHotkeys[funcType][content]);
  2073.     }; // _SH._extractFuncContent
  2074.  
  2075. })(DoubleX_RMMV.Skill_Hotkeys);
  2076.  
  2077. /*----------------------------------------------------------------------------
  2078.  *    # Edit class: Game_System                                              
  2079.  *      - Stores all params/configurations for binding/using hotkeys          
  2080.  *----------------------------------------------------------------------------*/
  2081.  
  2082. (function(SH) {
  2083.  
  2084.     "use strict";
  2085.  
  2086.     SH.Game_System = { orig: {}, new: {} };
  2087.     var _GS = SH.Game_System.orig, $ = Game_System.prototype;
  2088.     var _SH = SH.Game_System.new;
  2089.  
  2090.     _GS.initialize = $.initialize;
  2091.     $.initialize = function() { // v1.00a - v1.00a; Extended
  2092.         _GS.initialize.apply(this, arguments);
  2093.         // Added to setup parameters/configurations/notetags
  2094.         _SH._init.call(this);
  2095.         //
  2096.     }; // $.initialize
  2097.  
  2098.     /*------------------------------------------------------------------------
  2099.      *    New public instance variable                                        
  2100.      *------------------------------------------------------------------------*/
  2101.     // {Object}skillHotkeys: The container of all other new variables
  2102.     // {Object}params: The container of all parameter/configuration values
  2103.     // {Object}cfgs: The container of all configuration only function contents
  2104.     // {Object}notes: The container of all notetag function contents
  2105.  
  2106.     /**
  2107.      * Pure function
  2108.      * @author DoubleX
  2109.      * @interface
  2110.      * @param {String} content - The stored function content
  2111.      * @returns {Function} The requested function with the stored content
  2112.      * @since v1.00a
  2113.      * @version v1.00a
  2114.      */
  2115.     $.skillHotkeysFunc = function(content) {
  2116.         // This argument list covers all cases so unused args' the only problem
  2117.         return new Function("skillId", "data", content);
  2118.         //
  2119.     }; // _SH._extractedFuncContent
  2120.  
  2121.     /**
  2122.      * The this pointer is Game_System.prototype
  2123.      * Idempotent
  2124.      * @author DoubleX
  2125.      * @since v1.00a
  2126.      * @version v1.00a
  2127.      */
  2128.     _SH._init = function() {
  2129.         _SH._initContainers.call(this);
  2130.         _SH._storeParams.call(this);
  2131.         _SH._storeCfgs.call(this, "cfgs");
  2132.         _SH._storeCfgs.call(this, "notes");
  2133.     }; // _SH._init
  2134.  
  2135.     /**
  2136.      * The this pointer is Game_System.prototype
  2137.      * Idempotent
  2138.      * @author DoubleX
  2139.      * @since v1.00a
  2140.      * @version v1.00a
  2141.      */
  2142.     _SH._initContainers = function() {
  2143.         this.skillHotkeys = { params: {}, cfgs: {}, notes: {} };
  2144.     }; // _SH._initContainers
  2145.  
  2146.     /**
  2147.      * The this pointer is Game_System.prototype
  2148.      * Idempotent
  2149.      * @author DoubleX
  2150.      * @since v1.00a
  2151.      * @version v1.00a
  2152.      */
  2153.     _SH._storeParams = function() {
  2154.         var params = _SH._rawParams.call(this);
  2155.         Object.keys(params).forEach(_SH._storeParamFunc(params), this);
  2156.     }; // _SH._storeParams
  2157.  
  2158.     /**
  2159.      * The this pointer is Game_System.prototype
  2160.      * Pure function
  2161.      * @author DoubleX
  2162.      * @returns {Object[String, String]} The requested name-value mapping
  2163.      * @since v1.00a
  2164.      * @version v1.00a
  2165.      */
  2166.     _SH._rawParams = function() {
  2167.         return PluginManager.parameters(DoubleX_RMMV.Skill_Hotkeys_File);
  2168.     }; // _SH._rawParams
  2169.  
  2170.     /**
  2171.      * The this pointer is Game_System.prototype
  2172.      * Pure function
  2173.      * @author DoubleX
  2174.      * @param {Object[String, String]} params - The params/cfgs name-value map
  2175.      * @returns {Function(String)} The function storing the params/cfg values
  2176.      * @since v1.00a
  2177.      * @version v1.00a
  2178.      */
  2179.     _SH._storeParamFunc = function(params) {
  2180.         /**
  2181.          * The this pointer is Game_System.prototype
  2182.          * Idempotent
  2183.          * @author DoubleX
  2184.          * @param {String} param - The name of the parameter/configuration
  2185.          * @since v1.00a
  2186.          * @version v1.00a
  2187.          */
  2188.         return function(param) { _SH._storeParam.call(this, params, param); };
  2189.     }; // _SH._storeParamFunc
  2190.  
  2191.     /**
  2192.      * The this pointer is Game_System.prototype
  2193.      * Idempotent
  2194.      * @author DoubleX
  2195.      * @param {Object[String, String]} params - The params/cfgs name-value map
  2196.      * @param {String} param - The name of the parameter/configuration
  2197.      * @since v1.00a
  2198.      * @version v1.00a
  2199.      */
  2200.     _SH._storeParam = function(params, param) {
  2201.         var contents = _SH._param.call(this, params, param);
  2202.         this.skillHotkeys.params[param] = contents;
  2203.         SH.params[param] = this.skillHotkeysFunc(contents);
  2204.     }; // _SH._storeParam
  2205.  
  2206.     /**
  2207.      * The this pointer is Game_System.prototype
  2208.      * Nullipotent
  2209.      * @author DoubleX
  2210.      * @param {Object[String, String]} params - The params/cfgs name-value map
  2211.      * @param {String} param - The name of the parameter/configuration
  2212.      * @retruns {String} The requested function contents as parameter values
  2213.      * @since v1.00a
  2214.      * @version v1.00a
  2215.      */
  2216.     _SH._param = function(params, param) {
  2217.         // Refer to reference tag PARAMETERS_CONFIGURATIONS
  2218.         return params[param] || _SH._cfg.call(this, SH.params[param]);
  2219.         //
  2220.     }; // _SH._param
  2221.  
  2222.     /**
  2223.      * The this pointer is Game_System.prototype
  2224.      * Idempotent
  2225.      * @author DoubleX
  2226.      * @param {String} cfgType - The configuration type label
  2227.      * @since v1.00a
  2228.      * @version v1.00a
  2229.      */
  2230.     _SH._storeCfgs = function(cfgType) {
  2231.         Object.keys(SH[cfgType]).forEach(_SH._storeCfgFunc(cfgType), this);
  2232.     }; // _SH._storeCfgs
  2233.  
  2234.     /**
  2235.      * The this pointer is Game_System.prototype
  2236.      * Pure function
  2237.      * @author DoubleX
  2238.      * @param {String} cfgType - The configuration type label
  2239.      * @returns {Function(String)} The function storing the params/cfg values
  2240.      * @since v1.00a
  2241.      * @version v1.00a
  2242.      */
  2243.     _SH._storeCfgFunc = function(cfgType) {
  2244.         /**
  2245.          * The this pointer is Game_System.prototype
  2246.          * Idempotent
  2247.          * @author DoubleX
  2248.          * @param {String} cfg - The name of the configuration
  2249.          * @since v1.00a
  2250.          * @version v1.00a
  2251.          */
  2252.         return function(cfg) { _SH._storeCfg.call(this, cfgType, cfg); };
  2253.     }; // _SH._storeCfgFunc
  2254.  
  2255.     /**
  2256.      * The this pointer is Game_System.prototype
  2257.      * Idempotent
  2258.      * @author DoubleX
  2259.      * @param {String} cfgType - The configuration type label
  2260.      * @param {String} cfg - The name of the configuration
  2261.      * @since v1.00a
  2262.      * @version v1.00a
  2263.      */
  2264.     _SH._storeCfg = function(cfgType, cfg) {
  2265.         this.skillHotkeys[cfgType][cfg] = _SH._cfg.call(this, SH[cfgType][cfg]);
  2266.     }; // _SH._storeCfg
  2267.  
  2268.     /**
  2269.      * The this pointer is Game_System.prototype
  2270.      * Pure function
  2271.      * @author DoubleX
  2272.      * @param {Function} cfg - The function as the value of the configuration
  2273.      * @returns {String} The requested parameters in the configuration region
  2274.      * @since v1.00a
  2275.      * @version v1.00a
  2276.      */
  2277.     _SH._cfg = function(cfg) {
  2278.         // Only the function contents are stored in save files
  2279.         return cfg.toString().
  2280.                 replace(/^[^{]*{\s*/, '').replace(/\s*}[^}]*$/, '');
  2281.         //
  2282.     }; // _SH._cfg
  2283.  
  2284. })(DoubleX_RMMV.Skill_Hotkeys);
  2285.  
  2286. /*----------------------------------------------------------------------------
  2287.  *    # Edit class: Game_Actor                                                
  2288.  *      - Uses all parameters/configurations/notetags to run plugin functions
  2289.  *----------------------------------------------------------------------------*/
  2290.  
  2291. (function(SH) {
  2292.  
  2293.     "use strict";
  2294.  
  2295.     SH.Game_Actor = { orig: {}, new: {} };
  2296.     var _GA = SH.Game_Actor.orig, $ = Game_Actor.prototype;
  2297.     var _SH = SH.Game_Actor.new;
  2298.     // Refer to reference tag NOTE_DATA_TYPES
  2299.     _SH._DATA_TYPE_FUNCS = {
  2300.         "actors": "actor",
  2301.         "classes": "currentClass",
  2302.         "weapons": "weapons",
  2303.         "armors": "armors",
  2304.         "states": "states"
  2305.     };
  2306.     //
  2307.     _SH._NOTE_CHAINING_RULES = ["every", "some"];
  2308.     _SH._NOTE_CHAINING_RULE_FUNCS = {
  2309.         "canBind": "bindNoteChainingRule",
  2310.         "canUse": "useNoteChainingRule"
  2311.     };
  2312.     _SH._NOTE_PRIORITIES = {
  2313.         "canBind": "bindNotePriority",
  2314.         "canUse": "useNotePriority"
  2315.     };
  2316.  
  2317.     /*------------------------------------------------------------------------
  2318.      *    New public instance variable                                        
  2319.      *------------------------------------------------------------------------*/
  2320.     // {Object}skillHotkeys: The container of all other new variables
  2321.     // {Object}hotkeyMapping: The mapping from the hotkey symbol to the skill id
  2322.     // {Object}noteChangeFactors: (Plugin Call)Map from factor to change flag
  2323.  
  2324.     /*------------------------------------------------------------------------
  2325.      *    New private instance variable                                      
  2326.      *------------------------------------------------------------------------*/
  2327.     // {Object}_noteResults: The mapping from the factor to the cached result
  2328.  
  2329.     _GA.initialize = $.initialize;
  2330.     $.initialize = function(actorId) {
  2331.         // v1.00a - v1.00a; Extended
  2332.         _SH._init.call(this); // Added to setup all internal skill hotkey states
  2333.         _GA.initialize.apply(this, arguments);
  2334.     }; // $.initialize
  2335.  
  2336.     _GA.refresh = $.refresh;
  2337.     $.refresh = function() { // v1.00a - v1.00a; Extended
  2338.         _GA.refresh.apply(this, arguments);
  2339.         // Added to raise the change notification flags
  2340.         this.raiseSkillHotkeyNoteChangeFactors();
  2341.         //
  2342.     }; // $.refresh
  2343.  
  2344.     /**
  2345.      * Plugin call/Idempotent
  2346.      * @author DoubleX
  2347.      * @interface
  2348.      * @param {String} skillId - The id of the skill to have its hotkey bound
  2349.      * @param {String} hotkey - The symbol of the hotkey to be bound
  2350.      * @since v1.00a
  2351.      * @version v1.00a
  2352.      */
  2353.     $.bindSkillHotkey = function(skillId, hotkey) {
  2354.         if (!SH.params.isEnabled.call(this)) return;
  2355.         _SH._bind.call(this, +skillId, hotkey);
  2356.     }; // $.bindSkillHotkey
  2357.  
  2358.     /**
  2359.      * This function isn't nullipotent as it uses change notification flags
  2360.      * This function isn't idempotent as functions might return random values
  2361.      * Plugin call
  2362.      * @author DoubleX
  2363.      * @interface
  2364.      * @param {String} skillId - The id of the skill to have its hotkey bound
  2365.      * @returns {Boolean} The check result
  2366.      * @since v1.00a
  2367.      * @todo: Make this function Nullipotent without losing performance
  2368.      * @version v1.00a
  2369.      */
  2370.     $.canBindSkillHotkeys = function(skillId) {
  2371.         return SH.params.isEnabled.call(this) &&
  2372.                 _SH._notesResult.call(this, +skillId, "canBind");
  2373.     }; // $.canBindSkillHotkeys
  2374.  
  2375.     /**
  2376.      * This function isn't nullipotent as it uses change notification flags
  2377.      * This function isn't idempotent as functions might return random values
  2378.      * Potential Hotspot/Plugin call
  2379.      * @author DoubleX
  2380.      * @interface
  2381.      * @param {String} skillId - The id of the skill to have its hotkey bound
  2382.      * @returns {Boolean} The check result
  2383.      * @since v1.00a
  2384.      * @todo: Make this function Nullipotent without losing performance
  2385.      * @version v1.00a
  2386.      */
  2387.     $.canUseSkillHotkeys = function(skillId) {
  2388.         return SH.params.isEnabled.call(this) &&
  2389.                 this.canUse($dataSkills[skillId]) &&
  2390.                 this.isSkillHotkeysBound(skillId) &&
  2391.                 _SH._notesResult.call(this, +skillId, "canUse");
  2392.     }; // $.canUseSkillHotkeys
  2393.  
  2394.     /**
  2395.      * Plugin call/Potential Hotspot/Nullipotent
  2396.      * @author DoubleX
  2397.      * @interface
  2398.      * @param {String} skillId - The id of the skill to have its hotkey bound
  2399.      * @returns {Boolean} The check result
  2400.      * @since v1.00a
  2401.      * @version v1.00a
  2402.      */
  2403.     $.isSkillHotkeysBound = function(skillId) {
  2404.         return this.boundSkillHotkeys(skillId).length > 0;
  2405.     }; // $.isSkillHotkeysBound
  2406.  
  2407.     /**
  2408.      * Plugin call/Potential Hotspot/Nullipotent
  2409.      * @author DoubleX
  2410.      * @interface
  2411.      * @param {String} skillId - The id of the skill to have its hotkey bound
  2412.      * @returns {Array[String]} The list of smybols of hotkeys bound to skillId
  2413.      * @since v1.00a
  2414.      * @version v1.00a
  2415.      */
  2416.     $.boundSkillHotkeys = function(skillId) {
  2417.         return this.hotkeys().filter(_SH._isSameSkillFunc(skillId), this);
  2418.     }; // $.boundSkillHotkeys
  2419.  
  2420.     /**
  2421.      * Plugin call/Potential Hotspot/Nullipotent
  2422.      * @author DoubleX
  2423.      * @interface
  2424.      * @returns {Array[String]} The requested list of hotkey symbols
  2425.      * @since v1.00a
  2426.      * @version v1.00a
  2427.      */
  2428.     $.hotkeys = function() {
  2429.         return Object.keys(this.skillHotkeys.hotkeyMapping);
  2430.     }; // $.hotkeys
  2431.  
  2432.     /**
  2433.      * Plugin call/Idempotent
  2434.      * @author DoubleX
  2435.      * @interface
  2436.      * @since v1.00a
  2437.      * @version v1.00a
  2438.      */
  2439.     $.raiseSkillHotkeyNoteChangeFactors = function() {
  2440.         this.skillHotkeys.noteChangeFactors =
  2441.                 _SH._raisedNoteChangeFactors.call(this);
  2442.     }; // $.raiseSkillHotkeyNoteChangeFactors
  2443.  
  2444.     /**
  2445.      * The this pointer is Game_Actor.prototype
  2446.      * Idempotent
  2447.      * @author DoubleX
  2448.      * @since v1.00a
  2449.      * @version v1.00a
  2450.      */
  2451.     _SH._init = function() {
  2452.         // These codes are easy, simple and small enough to stick together
  2453.         this.skillHotkeys = { hotkeyMapping: {}, _noteResults: {} };
  2454.         this.raiseSkillHotkeyNoteChangeFactors();
  2455.         //
  2456.     }; // _SH._init
  2457.  
  2458.     /**
  2459.      * The this pointer is Game_Actor.prototype
  2460.      * Pure function
  2461.      * @author DoubleX
  2462.      * @returns {Object[String, Object[String, Boolean]]} The requested factors
  2463.      * @since v1.00a
  2464.      * @version v1.00a
  2465.      */
  2466.     _SH._raisedNoteChangeFactors = function() {
  2467.         return {
  2468.             canBind: _SH._raisedNoteChangeFactor.call(this),
  2469.             canUse: _SH._raisedNoteChangeFactor.call(this)
  2470.         };
  2471.     }; // _SH._raisedNoteChangeFactors
  2472.  
  2473.     /**
  2474.      * The this pointer is Game_Actor.prototype
  2475.      * Pure function
  2476.      * @author DoubleX
  2477.      * @returns {Object[String, Boolean]} The requested notetag change factors
  2478.      * @since v1.00a
  2479.      * @version v1.00a
  2480.      */
  2481.     _SH._raisedNoteChangeFactor = function() {
  2482.         return {
  2483.             "actors": true,
  2484.             "classes": true,
  2485.             "weapons": true,
  2486.             "armors": true,
  2487.             "states": true,
  2488.             "priority": true // Raised when the notetag priority may be changed
  2489.         };
  2490.     }; // _SH._raisedNoteChangeFactor
  2491.  
  2492.     /**
  2493.      * The this pointer is Game_Actor.prototype
  2494.      * Idempotent
  2495.      * @author DoubleX
  2496.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2497.      * @param {String} hotkey - The symbol of the hotkey to be bound
  2498.      * @since v1.00a
  2499.      * @version v1.00a
  2500.      */
  2501.     _SH._bind = function(skillId, hotkey) {
  2502.         this.skillHotkeys.hotkeyMapping[hotkey] = skillId;
  2503.     }; // _SH._bind
  2504.  
  2505.     /**
  2506.      * The this pointer is Game_Actor.prototype
  2507.      * Potential Hotspot/Pure function
  2508.      * @author DoubleX
  2509.      * @param {String} skillId - The id of the skill to have its hotkey bound
  2510.      * @returns {Function(String) -> Boolean} The function returning check flag
  2511.      * @since v1.00a
  2512.      * @version v1.00a
  2513.      */
  2514.     _SH._isSameSkillFunc = function(skillId) {
  2515.         /**
  2516.          * Nullipotent
  2517.          * @author DoubleX
  2518.          * @param {String} hotkey - The symbol of the hotkey to be checked
  2519.          * @returns {Boolean} The check result
  2520.          * @since v1.00a
  2521.          * @version v1.00a
  2522.          */
  2523.         return function(hotkey) {
  2524.             return _SH._isSameSkill.call(this, skillId, hotkey);
  2525.         };
  2526.     }; // _SH._isSameSkillFunc
  2527.  
  2528.     /**
  2529.      * The this pointer is Game_Actor.prototype
  2530.      * Potential Hotspot/Nullipotent
  2531.      * @author DoubleX
  2532.      * @param {String} skillId - The id of the skill to have its hotkey bound
  2533.      * @param {String} hotkey - The symbol of the hotkey to be checked
  2534.      * @returns {Boolean} The check result
  2535.      * @since v1.00a
  2536.      * @version v1.00a
  2537.      */
  2538.     _SH._isSameSkill = function(skillId, hotkey) {
  2539.         return this.skillHotkeys.hotkeyMapping[hotkey] === skillId;
  2540.     }; // _SH._isSameSkill
  2541.  
  2542.     /**
  2543.      * This function isn't nullipotent as it uses change notification flags
  2544.      * This function isn't idempotent as functions might return random values
  2545.      * The this pointer is Game_Actor.prototype
  2546.      * Potential Hotspot
  2547.      * @author DoubleX
  2548.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2549.      * @param {String} note - The notetag to be checked against
  2550.      * @returns {Boolean} The notetags result
  2551.      * @since v1.00a
  2552.      * @todo: Make this function Nullipotent without losing performance
  2553.      * @version v1.00a
  2554.      */
  2555.     _SH._notesResult = function(skillId, note) {
  2556.         var skillResult =
  2557.                 _SH._noteResult.call(this, skillId, note, $dataSkills[skillId]);
  2558.         if (_SH._isSkillOnly.call(this, skillId, note)) return skillResult;
  2559.         return _SH._nonSkillNotesResult.call(this, skillId, note, skillResult);
  2560.     }; // _SH._notesResult
  2561.  
  2562.     /**
  2563.      * The this pointer is Game_Actor.prototype
  2564.      * Potential Hotspot/Pure function
  2565.      * @author DoubleX
  2566.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2567.      * @param {String} note - The notetag to be checked against
  2568.      * @returns {Boolean} The check result
  2569.      * @since v1.00a
  2570.      * @version v1.00a
  2571.      */
  2572.     _SH._isSkillOnly = function(skillId, note) {
  2573.         // Refer to reference tag DEFAULT_FIRST
  2574.         return _SH._NOTE_CHAINING_RULES.indexOf(
  2575.                 _SH._noteChainingRule.call(this, skillId, note)) < 0;
  2576.         //
  2577.     }; // _SH._isSkillOnly
  2578.  
  2579.     /**
  2580.      * This function isn't nullipotent as it uses change notification flags
  2581.      * This function isn't idempotent as functions might return random values
  2582.      * The this pointer is Game_Actor.prototype
  2583.      * Potential Hotspot
  2584.      * @author DoubleX
  2585.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2586.      * @param {String} note - The notetag to be checked against
  2587.      * @param {Boolean} initResult - The result as the start of the note chain
  2588.      * @returns {Boolean} The notetags result
  2589.      * @since v1.00a
  2590.      * @todo: Make this function Nullipotent without losing performance
  2591.      * @version v1.00a
  2592.      */
  2593.     _SH._nonSkillNotesResult = function(skillId, note, initResult) {
  2594.         // Changing the notetag chaining rule means _canNoteChanges returns true
  2595.         _SH._checkCanNoteChange.call(this, skillId, note, initResult);
  2596.         return _SH._noteResults.call(this, note).combined;
  2597.         //
  2598.     }; // _SH._nonSkillNotesResult
  2599.  
  2600.     /**
  2601.      * This function isn't idempotent as functions might return random values
  2602.      * The this pointer is Game_Actor.prototype
  2603.      * Potential Hotspot
  2604.      * @author DoubleX
  2605.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2606.      * @param {String} note - The notetag to be checked against
  2607.      * @param {Boolean} initResult - The result as the start of the note chain
  2608.      * @returns {Boolean} The notetags result
  2609.      * @since v1.00a
  2610.      * @version v1.00a
  2611.      */
  2612.     _SH._checkCanNoteChange = function(skillId, note, initResult) {
  2613.         // Changing the notetag chaining rule means _canNoteChanges returns true
  2614.         if (!_SH._canNoteChange.call(this, note)) return;
  2615.         _SH._setCombinedNoteResult.call(this, skillId, note, initResult);
  2616.         //
  2617.     }; // _SH._nonSkillNotesResult
  2618.  
  2619.     /**
  2620.      * The this pointer is Game_Actor.prototype
  2621.      * Potential Hotspot/Nullipotent
  2622.      * @author DoubleX
  2623.      * @param {String} note - The notetag to be checked against
  2624.      * @returns {Boolean} The check result
  2625.      * @since v1.00a
  2626.      * @version v1.00a
  2627.      */
  2628.     _SH._canNoteChange = function(note) {
  2629.         return Object.keys(_SH._noteChangeFactors.call(this, note)).some(
  2630.                 _SH._canNoteFactorChangeFunc(note), this);
  2631.     }; // _SH._canNoteChange
  2632.  
  2633.     /**
  2634.      * The this pointer is Game_Actor.prototype
  2635.      * Potential Hotspot/Pure function
  2636.      * @author DoubleX
  2637.      * @param {String} note - The notetag to be checked against
  2638.      * @returns {Function(String) -> Boolean} The function checking the factor
  2639.      * @since v1.00a
  2640.      * @version v1.00a
  2641.      */
  2642.     _SH._canNoteFactorChangeFunc = function(note) {
  2643.         /**
  2644.          * The this pointer is Game_Actor.prototype
  2645.          * Nullipotent
  2646.          * @author DoubleX
  2647.          * @param {String} factor - The notetag factor to be checked against
  2648.          * @returns {Boolean} The check result
  2649.          * @since v1.00a
  2650.          * @version v1.00a
  2651.          */
  2652.         return function(factor) {
  2653.             return _SH._canNoteFactorChange.call(this, note, factor);
  2654.         };
  2655.     }; // _SH._canNoteFactorChangeFunc
  2656.  
  2657.     /**
  2658.      * The this pointer is Game_Actor.prototype
  2659.      * Potential Hotspot/Nullipotent
  2660.      * @author DoubleX
  2661.      * @param {String} note - The notetag to be checked against
  2662.      * @param {String} factor - The notetag factor to be checked against
  2663.      * @returns {Boolean} The check result
  2664.      * @since v1.00a
  2665.      * @version v1.00a
  2666.      */
  2667.     _SH._canNoteFactorChange = function(note, factor) {
  2668.         return _SH._noteChangeFactors.call(this, note)[factor];
  2669.     }; // _SH._canNoteFactorChange
  2670.  
  2671.     /**
  2672.      * This function isn't idempotent as functions might return random values
  2673.      * The this pointer is Game_Actor.prototype
  2674.      * Potential Hotspot
  2675.      * @author DoubleX
  2676.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2677.      * @param {String} note - The notetag to be checked against
  2678.      * @param {Boolean} initResult - The result as the start of the note chain
  2679.      * @since v1.00a
  2680.      * @version v1.00a
  2681.      */
  2682.     _SH._setCombinedNoteResult = function(skillId, note, initResult) {
  2683.         _SH._noteResults.call(this, note).combined =
  2684.                 _SH._combinedNoteResult.call(this, skillId, note, initResult);
  2685.     }; // _SH._setCombinedNoteResult
  2686.  
  2687.     /**
  2688.      * This function isn't nullipotent as it uses change notification flags
  2689.      * This function isn't idempotent as functions might return random values
  2690.      * The this pointer is Game_Actor.prototype
  2691.      * Potential Hotspot
  2692.      * @author DoubleX
  2693.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2694.      * @param {String} note - The notetag to be checked against
  2695.      * @param {Boolean} initResult - The result as the start of the note chain
  2696.      * @returns {Boolean} The requested combined notetag result
  2697.      * @since v1.00a
  2698.      * @todo: Make this function Nullipotent without losing performance
  2699.      * @version v1.00a
  2700.      */
  2701.     _SH._combinedNoteResult = function(skillId, note, initResult) {
  2702.         return _SH._noteFactors.call(this, skillId,
  2703.                 note)[_SH._noteChainingRule.call(this, skillId, note)](
  2704.                 _SH._noteFactorResultFunc(skillId, note, initResult), this);
  2705.     }; // _SH._combinedNoteResult
  2706.  
  2707.     /**
  2708.      * The this pointer is Game_Actor.prototype
  2709.      * Potential Hotspot/Nullipotent
  2710.      * @author DoubleX
  2711.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2712.      * @param {String} note - The notetag to be checked against
  2713.      * @returns {Array[String]} The requested list of notetag factors
  2714.      * @since v1.00a
  2715.      * @version v1.00a
  2716.      */
  2717.     _SH._noteFactors = function(skillId, note) {
  2718.         // "skill" isn't really a data but just using the initial notetag result
  2719.         return ["skill"].concat(
  2720.                 SH.params[_SH._NOTE_PRIORITIES[note]].call(this, skillId));
  2721.         //
  2722.     }; // _SH._noteFactors
  2723.  
  2724.     /**
  2725.      * The this pointer is Game_Actor.prototype
  2726.      * Potential Hotspot/Pure function
  2727.      * @author DoubleX
  2728.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2729.      * @param {String} note - The notetag to be checked against
  2730.      * @param {Boolean} initResult - The result as the start of the note chain
  2731.      * @returns {Function(String) -> Boolean} The requested notetag result
  2732.      * @since v1.00a
  2733.      * @version v1.00a
  2734.      */
  2735.     _SH._noteFactorResultFunc = function(skillId, note, initResult) {
  2736.         /**
  2737.          * This function isn't nullipotent as it uses change notification flags
  2738.          * This function isn't idempotent as functions might return random value
  2739.          * The this pointer is Game_Actor.prototype
  2740.          * Potential Hotspot
  2741.          * @author DoubleX
  2742.          * @param {String} factor - The notetag factor to have its result
  2743.          * @returns {Boolean} The requested notetag result
  2744.          * @since v1.00a
  2745.          * @todo: Make this function Nullipotent without losing performance
  2746.          * @version v1.00a
  2747.          */
  2748.         return function(factor) {
  2749.             return _SH._noteFactorResult.call(
  2750.                     this, skillId, note, initResult, factor);
  2751.         };
  2752.     }; // _SH._noteFactorResultFunc
  2753.  
  2754.     /**
  2755.      * This function isn't nullipotent as it uses change notification flags
  2756.      * This function isn't idempotent as functions might return random values
  2757.      * The this pointer is Game_Actor.prototype
  2758.      * Potential Hotspot
  2759.      * @author DoubleX
  2760.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2761.      * @param {String} note - The notetag to be checked against
  2762.      * @param {Boolean} initResult - The result as the start of the note chain
  2763.      * @param {String} factor - The notetag factor to have its result returned
  2764.      * @returns {Boolean} The requested notetag result
  2765.      * @since v1.00a
  2766.      * @todo: Make this function Nullipotent without losing performance
  2767.      * @version v1.00a
  2768.      */
  2769.     _SH._noteFactorResult = function(skillId, note, initResult, factor) {
  2770.         return _SH._DATA_TYPE_FUNCS[factor] ? _SH._noteDataTypeResult.call(
  2771.                 this, skillId, note, factor) : initResult;
  2772.     }; // _SH._noteFactorResult
  2773.  
  2774.     /**
  2775.      * This function isn't nullipotent as it uses change notification flags
  2776.      * This function isn't idempotent as functions might return random values
  2777.      * The this pointer is Game_Actor.prototype
  2778.      * Potential Hotspot
  2779.      * @author DoubleX
  2780.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2781.      * @param {String} note - The notetag to be checked against
  2782.      * @param {String} factor - The notetag factor to have its result returned
  2783.      * @returns {Boolean} The requested notetag result
  2784.      * @since v1.00a
  2785.      * @todo: Make this function Nullipotent without losing performance
  2786.      * @version v1.00a
  2787.      */
  2788.     _SH._noteDataTypeResult = function(skillId, note, factor) {
  2789.         _SH._checkNoteChangeFactor.call(this, skillId, note, factor);
  2790.         return _SH._noteResults.call(this, note)[factor];
  2791.     }; // _SH._noteDataTypeResult
  2792.  
  2793.     /**
  2794.      * This function isn't idempotent as functions might return random values
  2795.      * The this pointer is Game_Actor.prototype
  2796.      * Potential Hotspot
  2797.      * @author DoubleX
  2798.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2799.      * @param {String} note - The notetag to be checked against
  2800.      * @param {String} factor - The notetag factor to have its result returned
  2801.      * @since v1.00a
  2802.      * @version v1.00a
  2803.      */
  2804.     _SH._checkNoteChangeFactor = function(skillId, note, factor) {
  2805.         var noteChangeFactors = _SH._noteChangeFactors.call(this, note);
  2806.         if (!noteChangeFactors[factor]) return;
  2807.         _SH._resetNoteChangeFactors.call(
  2808.                 this, skillId, note, factor, noteChangeFactors);
  2809.     }; // _SH._checkNoteChangeFactor
  2810.  
  2811.     /**
  2812.      * The this pointer is Game_Actor.prototype
  2813.      * Potential Hotspot/Nullipotent
  2814.      * @author DoubleX
  2815.      * @param {String} note - The notetag to be checked against
  2816.      * @returns {Object[String, Boolean]} The requested notetag change factors
  2817.      * @since v1.00a
  2818.      * @version v1.00a
  2819.      */
  2820.     _SH._noteChangeFactors = function(note) {
  2821.         // Serves as a hooking point for possible future uses
  2822.         return this.skillHotkeys.noteChangeFactors[note];
  2823.         //
  2824.     }; // _SH._noteChangeFactors
  2825.  
  2826.     /**
  2827.      * This function isn't idempotent as functions might return random values
  2828.      * The this pointer is Game_Actor.prototype
  2829.      * Potential Hotspot
  2830.      * @author DoubleX
  2831.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2832.      * @param {String} note - The notetag to be checked against
  2833.      * @param {String} factor - The notetag factor to have its result returned
  2834.      * @param {Object[String, Boolean]} noteChangeFactors - The change flags
  2835.      * @since v1.00a
  2836.      * @version v1.00a
  2837.      */
  2838.     _SH._resetNoteChangeFactors = function(
  2839.             skillId, note, factor, noteChangeFactors) {
  2840.         noteChangeFactors[factor] = false;
  2841.         _SH._noteResults.call(this, note)[factor] =
  2842.                 _SH._newNoteDataTypeResult.call(this, skillId, note, factor);
  2843.     }; // _SH._resetNoteChangeFactors
  2844.  
  2845.     /**
  2846.      * The this pointer is Game_Actor.prototype
  2847.      * Potential Hotspot/Nullipotent
  2848.      * @author DoubleX
  2849.      * @param {String} note - The notetag to be checked against
  2850.      * @returns {Object[String, Boolean]} The requested notetag result mapping
  2851.      * @since v1.00a
  2852.      * @version v1.00a
  2853.      */
  2854.     _SH._noteResults = function(note) {
  2855.         // Serves as a hooking point for possible future uses
  2856.         return this.skillHotkeys._noteResults[note];
  2857.         //
  2858.     }; // _SH._noteResults
  2859.  
  2860.     /**
  2861.      * The this pointer is Game_Actor.prototype
  2862.      * Potential Hotspot/Nullipotent
  2863.      * @author DoubleX
  2864.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2865.      * @param {String} note - The notetag to be checked against
  2866.      * @param {String} factor - The notetag factor to have its result returned
  2867.      * @returns {Boolean} The requested notetag result
  2868.      * @since v1.00a
  2869.      * @version v1.00a
  2870.      */
  2871.     _SH._newNoteDataTypeResult = function(skillId, note, factor) {
  2872.         return _SH._noteDataType.call(
  2873.                 this, factor)[_SH._noteChainingRule.call(this, skillId, note)](
  2874.                 _SH._noteResultFunc(skillId, note), this);
  2875.     }; // _SH._newNoteDataTypeResult
  2876.  
  2877.     /**
  2878.      * The this pointer is Game_Actor.prototype
  2879.      * Potential Hotspot/Nullipotent
  2880.      * @author DoubleX
  2881.      * @param {String} factor - The notetag factor to have its result returned
  2882.      * @returns {Array[Object]} The requested list of data to be checked against
  2883.      * @since v1.00a
  2884.      * @version v1.00a
  2885.      */
  2886.     _SH._noteDataType = function(factor) {
  2887.         // Makes sure the result is an Array of data for all data types
  2888.         return [].concat(this[_SH._DATA_TYPE_FUNCS[factor]]());
  2889.         //
  2890.     }; // _SH._noteDataType
  2891.  
  2892.     /**
  2893.      * The this pointer is Game_Actor.prototype
  2894.      * Potential Hotspot/Pure function
  2895.      * @author DoubleX
  2896.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2897.      * @param {String} note - The notetag to be checked against
  2898.      * @returns {String} The requested name of the notetag chaining rule
  2899.      * @since v1.00a
  2900.      * @version v1.00a
  2901.      */
  2902.     _SH._noteChainingRule = function(skillId, note) {
  2903.         return SH.params[_SH._NOTE_CHAINING_RULE_FUNCS[note]].call(
  2904.                 this, skillId);
  2905.     }; // _SH._noteChainingRule
  2906.  
  2907.     /**
  2908.      * The this pointer is Game_Actor.prototype
  2909.      * Potential Hotspot/Pure function
  2910.      * @author DoubleX
  2911.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2912.      * @param {String} note - The notetag to be checked against
  2913.      * @returns {Function(Object) -> Boolean} The function returning note result
  2914.      * @since v1.00a
  2915.      * @version v1.00a
  2916.      */
  2917.     _SH._noteResultFunc = function(skillId, note) {
  2918.         /**
  2919.          * The this pointer is Game_Actor.prototype
  2920.          * Potential Hotspot/Nullipotent
  2921.          * @author DoubleX
  2922.          * @param {Object} data - The data to have its notetags checked
  2923.          * @returns {Boolean} The notetag result
  2924.          * @since v1.00a
  2925.          * @version v1.00a
  2926.          */
  2927.         return function(data) {
  2928.             return _SH._noteResult.call(this, skillId, note, data);
  2929.         };
  2930.     }; // _SH._noteResultFunc
  2931.  
  2932.     /**
  2933.      * The this pointer is Game_Actor.prototype
  2934.      * Potential Hotspot/Nullipotent
  2935.      * @author DoubleX
  2936.      * @param {Number} skillId - The id of the skill to have its hotkey bound
  2937.      * @param {String} note - The notetag to be checked against
  2938.      * @param {Object/Nullable} data - The data to have its notetags checked
  2939.      * @returns {Boolean} The notetag result
  2940.      * @since v1.00a
  2941.      * @version v1.00a
  2942.      */
  2943.     _SH._noteResult = function(skillId, note, data) {
  2944.         // Refer to reference tag DEFAULT_TRUE
  2945.         var skillHotkeys = data ? data.meta.skillHotkeys : null;
  2946.         if (!skillHotkeys) return true;
  2947.         var func = skillHotkeys ? SH.notes[skillHotkeys[note]] : null;
  2948.         return !func || func.call(this, skillId, data);
  2949.         //
  2950.     }; // _SH._noteResult
  2951.  
  2952. })(DoubleX_RMMV.Skill_Hotkeys);
  2953.  
  2954. /*----------------------------------------------------------------------------
  2955.  *    # Edit class: Game_Interpreter                                          
  2956.  *      - Intercepts plugin command coming from this plugin as plugin calls  
  2957.  *----------------------------------------------------------------------------*/
  2958.  
  2959. (function(SH) {
  2960.  
  2961.     "use strict";
  2962.  
  2963.     SH.Game_Interpreter = { orig: {}, new: {} };
  2964.     var _GI = SH.Game_Interpreter.orig, $ = Game_Interpreter.prototype;
  2965.     var _SH = SH.Game_Interpreter.new;
  2966.     _SH._CMDS = [
  2967.         "bindSkillHotkey",
  2968.         "canBindSkillHotkey",
  2969.         "canUseSkillHotkey",
  2970.         "isSkillHotkeysBound",
  2971.         "boundSkillHotkeys",
  2972.         "hotkeys",
  2973.         "raiseSkillHotkeyNoteChangeFactors"
  2974.     ];
  2975.  
  2976.     _GI.pluginCommand = $.pluginCommand;
  2977.     $.pluginCommand = function(command, args) {
  2978.         // v1.00a - v1.00a; Extended
  2979.         _GI.pluginCommand.apply(this, arguments);
  2980.         // Added to invoke the plugin command from this plugin
  2981.         _SH._pluginCmd.call(this, command, args);
  2982.         //
  2983.     }; // $.pluginCommand
  2984.  
  2985.     /**
  2986.      * The this pointer is Game_Interpreter.prototype
  2987.      * Idempotent
  2988.      * @author DoubleX
  2989.      * @param {String} cmd - The plugin command name
  2990.      * @param {Array} args - The plugin command arguments
  2991.      * @since v1.00a
  2992.      * @version v1.00a
  2993.      */
  2994.     _SH._pluginCmd = function(cmd, args) {
  2995.         if (!_SH._isPluginCmd.call(this, cmd)) return;
  2996.         _SH._usePluginCmd.call(this, args);
  2997.     }; // _SH._pluginCmd
  2998.  
  2999.     /**
  3000.      * The this pointer is Game_Interpreter.prototype
  3001.      * Nullipotent
  3002.      * @author DoubleX
  3003.      * @param {String} cmd - The plugin command name
  3004.      * @returns {Boolean} The check result
  3005.      * @since v1.00a
  3006.      * @version v1.00a
  3007.      */
  3008.     _SH._isPluginCmd = function(cmd) { return _SH._CMDS.indexOf(cmd) >= 0; };
  3009.  
  3010.     /**
  3011.      * Plugin call's just another way of using plugin commands
  3012.      * The this pointer is Game_Interpreter.prototype
  3013.      * Idempotent
  3014.      * @author DoubleX
  3015.      * @param {String} cmd - The plugin command name
  3016.      * @param {Array} args - The plugin command arguments
  3017.      * @since v1.00a
  3018.      * @version v1.00a
  3019.      */
  3020.     _SH._usePluginCmd = function(cmd, args) {
  3021.         // The 1st argument must always be the id of the actor involved
  3022.         $gameActors.actor(+args.shift())[cmd].apply(this, args);
  3023.         //
  3024.     }; // _SH._usePluginCmd
  3025.  
  3026. })(DoubleX_RMMV.Skill_Hotkeys);
  3027.  
  3028. /*----------------------------------------------------------------------------
  3029.  *    # Edit class: Window_SkillList                                          
  3030.  *      - Lets players bind hotkeys for unusable skills outside battle        
  3031.  *----------------------------------------------------------------------------*/
  3032.  
  3033. (function(SH) {
  3034.  
  3035.     "use strict";
  3036.  
  3037.     SH.Window_SkillList = { orig: {}, new: {} };
  3038.     var _WSL = SH.Window_SkillList.orig, $ = Window_SkillList.prototype;
  3039.     var _SH =  SH.Window_SkillList.new;
  3040.  
  3041.     _WSL.isCurrentItemEnabled = $.isCurrentItemEnabled;
  3042.     $.isCurrentItemEnabled = function() { // v1.00a - v1.00a; Extended
  3043.         // Edited to let players bind hotkeys for unusable skills outside battle
  3044.         return _WSL.isCurrentItemEnabled.call(this) ||
  3045.                 _SH._isCurrentItemEnabled.call(this);
  3046.         //
  3047.     }; // $.isCurrentItemEnabled
  3048.  
  3049.     /**
  3050.      * The this pointer is Window_SkillList.prototype
  3051.      * Nullipotent
  3052.      * @author DoubleX
  3053.      * @returns {Boolean} The check result
  3054.      * @since v1.00a
  3055.      * @version v1.00a
  3056.      */
  3057.     _SH._isCurrentItemEnabled = function() {
  3058.         var item = this.item();
  3059.         return item && this._actor.canBindSkillHotkeys(item.id);
  3060.     }; // _SH._isCurrentItemEnabled
  3061.  
  3062. })(DoubleX_RMMV.Skill_Hotkeys);
  3063.  
  3064. /*----------------------------------------------------------------------------
  3065.  *    # Edit class: Window_ActorCommand                                      
  3066.  *      - Adds skill hotkey commands for the currently inputable actor        
  3067.  *----------------------------------------------------------------------------*/
  3068.  
  3069. (function(SH) {
  3070.  
  3071.     "use strict";
  3072.  
  3073.     SH.Window_ActorCommand = { orig: {}, new: {} };
  3074.     var _WAC = SH.Window_ActorCommand.orig, $ = Window_ActorCommand.prototype;
  3075.     var _SH = SH.Window_ActorCommand.new;
  3076.  
  3077.     _WAC.processHandling = $.processHandling;
  3078.     $.processHandling = function() { // New
  3079.         _WAC.processHandling.apply(this, arguments);
  3080.         // Added to process the bound skill hotkeys for the actor in battle
  3081.         _SH._processHandling.call(this);
  3082.         //
  3083.     }; // $.processHandling
  3084.  
  3085.     /**
  3086.      * Idempotent
  3087.      * @author DoubleX
  3088.      * @interface
  3089.      * @param {String} hotkey - The symbol of the involved hotkey
  3090.      * @since v1.00a
  3091.      * @version v1.00a
  3092.      */
  3093.     $.onUseSkillHotkey = function(hotkey) {
  3094.         if (_SH._canUseHotkey.call(this, hotkey)) {
  3095.             return _SH._onCallHandler.call(this, hotkey);
  3096.         }
  3097.         this.playBuzzerSound();
  3098.     }; // $.onUseSkillHotkey
  3099.  
  3100.     /**
  3101.      * The this pointer is Window_ActorCommand.prototype
  3102.      * Hotspot/Idempotent
  3103.      * @author DoubleX
  3104.      * @since v1.00a
  3105.      * @version v1.00a
  3106.      */
  3107.     _SH._processHandling = function() {
  3108.         if (_SH._isProcessHotkeys.call(this)) _SH._processHotkeys.call(this);
  3109.     }; // _SH._processHandling
  3110.  
  3111.     /**
  3112.      * The this pointer is Window_ActorCommand.prototype
  3113.      * Hotspot/Idempotent
  3114.      * @author DoubleX
  3115.      * @returns {Boolean} The check result
  3116.      * @since v1.00a
  3117.      * @version v1.00a
  3118.      */
  3119.     _SH._isProcessHotkeys = function() {
  3120.         return this.isOpenAndActive() && SH.params.isEnabled.call(this._actor);
  3121.     }; // _SH._isProcessHotkeys
  3122.  
  3123.     /**
  3124.      * The this pointer is Window_ActorCommand.prototype
  3125.      * Hotspot/Idempotent
  3126.      * @author DoubleX
  3127.      * @since v1.00a
  3128.      * @version v1.00a
  3129.      */
  3130.     _SH._processHotkeys = function() {
  3131.         this._actor.hotkeys().forEach(_SH._processHotkey, this);
  3132.     }; // _SH._processHotkeys
  3133.  
  3134.     /**
  3135.      * The this pointer is Window_ActorCommand.prototype
  3136.      * Hotspot/Idempotent
  3137.      * @author DoubleX
  3138.      * @param {String} hotkey - The symbol of the involved hotkey
  3139.      * @since v1.00a
  3140.      * @version v1.00a
  3141.      */
  3142.     _SH._processHotkey = function(hotkey) {
  3143.         if (Input.isTriggered(hotkey)) this.onUseSkillHotkey(hotkey);
  3144.     }; // _SH._processHotkey
  3145.  
  3146.     /**
  3147.      * The this pointer is Window_ActorCommand.prototype
  3148.      * Potential Hotspot/Nullipotent
  3149.      * @author DoubleX
  3150.      * @param {String} hotkey - The symbol of the involved hotkey
  3151.      * @returns {Boolean} The check result
  3152.      * @since v1.00a
  3153.      * @version v1.00a
  3154.      */
  3155.     _SH._canUseHotkey = function(hotkey) {
  3156.         return this._actor.canUseSkillHotkeys(
  3157.                 _SH._hotkeyMapping.call(this)[hotkey]);
  3158.     }; // _SH._canUseHotkey
  3159.  
  3160.     /**
  3161.      * The this pointer is Window_ActorCommand.prototype
  3162.      * Potential Hotspot/Nullipotent
  3163.      * @author DoubleX
  3164.      * @returns {Object[String, Number]} The requested hotkey mapping
  3165.      * @since v1.00a
  3166.      * @version v1.00a
  3167.      */
  3168.     _SH._hotkeyMapping = function() {
  3169.         return this._actor.skillHotkeys.hotkeyMapping;
  3170.     }; // _SH._hotkeyMapping
  3171.  
  3172.     /**
  3173.      * The this pointer is Window_ActorCommand.prototype
  3174.      * Potential Hotspot/Idempotent
  3175.      * @author DoubleX
  3176.      * @param {String} hotkey - The symbol of the involved hotkey
  3177.      * @since v1.00a
  3178.      * @version v1.00a
  3179.      */
  3180.     _SH._onCallHandler = function(hotkey) {
  3181.         this.playOkSound();
  3182.         this.callHandler(hotkey);
  3183.     }; // _SH._onCallHandler
  3184.  
  3185. })(DoubleX_RMMV.Skill_Hotkeys);
  3186.  
  3187. /*----------------------------------------------------------------------------
  3188.  *    # Edit class: Window_BattleSkill                                        
  3189.  *      - Selects the skill bound to the used hotkey by the actor in battle  
  3190.  *----------------------------------------------------------------------------*/
  3191.  
  3192. (function(SH) {
  3193.  
  3194.     "use strict";
  3195.  
  3196.     SH.Window_BattleSkill = { orig: {}, new: {} };
  3197.     var $ = Window_BattleSkill.prototype, _SH = SH.Window_BattleSkill.new;
  3198.  
  3199.     /**
  3200.      * Idempotent
  3201.      * @author DoubleX
  3202.      * @interface
  3203.      * @param {String} hotkey - The symbol of ther hotkey involved
  3204.      * @since v1.00a
  3205.      * @version v1.00a
  3206.      */
  3207.     $.selectHotkeySkill = function(hotkey) {
  3208.         var skill = _SH._hotkeySkill.call(this, hotkey);
  3209.         // Otherwise there would have no skill to be selected
  3210.         this.setStypeId(skill.stypeId);
  3211.         this.refresh();
  3212.         //
  3213.         this.select(_SH._hotkeySkillIndex.call(this, skill));
  3214.     }; // $.selectHotkeySkill
  3215.  
  3216.     /**
  3217.      * The this pointer is Window_BattleSkill.prototype
  3218.      * Nullipotent
  3219.      * @author DoubleX
  3220.      * @param {String} hotkey - The symbol of ther hotkey involved
  3221.      * @returns {Object} The requested skill bound to the hotkey
  3222.      * @since v1.00a
  3223.      * @version v1.00a
  3224.      */
  3225.     _SH._hotkeySkill = function(hotkey) {
  3226.         return $dataSkills[_SH._hotkeyMapping.call(this)[hotkey]];
  3227.     }; // _SH._hotkeySkill
  3228.  
  3229.     /**
  3230.      * The this pointer is Window_BattleSkill.prototype
  3231.      * Nullipotent
  3232.      * @author DoubleX
  3233.      * @returns {Object[String, Number]} The requested hotkey mapping
  3234.      * @since v1.00a
  3235.      * @version v1.00a
  3236.      */
  3237.     _SH._hotkeyMapping = function() {
  3238.         return this._actor.skillHotkeys.hotkeyMapping;
  3239.     }; // _SH._hotkeyMapping
  3240.  
  3241.     /**
  3242.      * The this pointer is Window_BattleSkill.prototype
  3243.      * Nullipotent
  3244.      * @author DoubleX
  3245.      * @param {Object} skill - The skill bound to the hokey
  3246.      * @returns {Number} The requested index of the skill bound to the hotkey
  3247.      * @since v1.00a
  3248.      * @version v1.00a
  3249.      */
  3250.     _SH._hotkeySkillIndex = function(skill) {
  3251.         return this._data.indexOf(skill);
  3252.     }; // _SH._hotkeySkillIndex
  3253.  
  3254. })(DoubleX_RMMV.Skill_Hotkeys);
  3255.  
  3256. /*----------------------------------------------------------------------------
  3257.  *    # New class: Window_SkillHotkeyBase                                    
  3258.  *      - Be the abstract base class for all the new hotkey window classes    
  3259.  *----------------------------------------------------------------------------*/
  3260.  
  3261. (function(SH) {
  3262.  
  3263.     "use strict";
  3264.  
  3265.     var $ = Window_SkillHotkeyBase.prototype =
  3266.             Object.create(Window_Command.prototype);
  3267.     $.constructor = Window_SkillHotkeyBase;
  3268.  
  3269.     /*------------------------------------------------------------------------
  3270.      *    New private instance variables                                      
  3271.      *------------------------------------------------------------------------*/
  3272.     // {Number}_lineH: The cached window line height
  3273.     // {Number}_fontSize: The cached window font size
  3274.     // {Number}_padding: The cached window padding
  3275.     // {Number}_textPadding: The cached window text padding
  3276.     // {Number}_backOpacity: The cached window back opacity
  3277.     // {Number}_spacing: The cached selectable window spacing
  3278.  
  3279.     $.update = function() {
  3280.         Window_Command.prototype.update.call(this);
  3281.         this._update();
  3282.     }; // $.update
  3283.  
  3284.     /**
  3285.      * Hotspot/Idempotent
  3286.      * @author DoubleX
  3287.      * @since v1.00a
  3288.      * @version v1.00a
  3289.      */
  3290.     $._update = function() {
  3291.         this._updateWithoutRefreshes();
  3292.         this._updateWithRefreshes();
  3293.         this._onRefresh();
  3294.     }; // $._update
  3295.  
  3296.     /**
  3297.      * Hotspot/Idempotent
  3298.      * @author DoubleX
  3299.      * @since v1.00a
  3300.      * @version v1.00a
  3301.      */
  3302.     $._updateWithoutRefreshes = function() {
  3303.         this._updateWithoutRefresh("width", this.windowWidth());
  3304.         this._updateWithoutRefresh("height", this.windowHeight());
  3305.         this._updateWithoutRefresh("x", this.windowX());
  3306.         this._updateWithoutRefresh("y", this.windowY());
  3307.     }; // $._updateWithoutRefreshes
  3308.  
  3309.     /**
  3310.      * Hotspot/Idempotent
  3311.      * @author DoubleX
  3312.      * @param {String} valName - The name of the variable to be updated
  3313.      * @param {Number} newVal - The new value of the variable to be updated
  3314.      * @since v1.00a
  3315.      * @version v1.00a
  3316.      */
  3317.     $._updateWithoutRefresh = function(valName, newVal) {
  3318.         if (this[valName] !== newVal) this[valName] = newVal;
  3319.     }; // $._updateWithoutRefresh
  3320.  
  3321.     /**
  3322.      * Hotspot/Idempotent
  3323.      * @author DoubleX
  3324.      * @since v1.00a
  3325.      * @version v1.00a
  3326.      */
  3327.     $._updateWithRefreshes = function() {
  3328.         this._updateWithRefresh("_lineH", this.lineHeight());
  3329.         this._updateWithRefresh("_fontSize", this.standardFontSize());
  3330.         this._updateWithRefresh("_padding", this.standardPadding());
  3331.         this._updateWithRefresh("_textPadding", this.textPadding());
  3332.         this._updateWithRefresh("_backOpacity", this.standardBackOpacity());
  3333.         this._updateWithRefresh(
  3334.                 "_translucentOpacity", this.translucentOpacity());
  3335.         this._updateWithRefresh("_spacing", this.spacing());
  3336.     }; // $._updateWithRefreshes
  3337.  
  3338.     /**
  3339.      * Hotspot/Idempotent
  3340.      * @author DoubleX
  3341.      * @param {String} valName - The name of the variable to be updated
  3342.      * @param {Number} newVal - The new value of the variable to be updated
  3343.      * @since v1.00a
  3344.      * @version v1.00a
  3345.      */
  3346.     $._updateWithRefresh = function(valName, newVal) {
  3347.         this._isRefresh = this[valName] !== newVal;
  3348.         if (this._isRefresh) this[valName] = newVal;
  3349.     }; // $._updateWithRefresh
  3350.  
  3351.     /**
  3352.      * Hotspot/Idempotent
  3353.      * @author DoubleX
  3354.      * @since v1.00a
  3355.      * @version v1.00a
  3356.      */
  3357.     $._onRefresh = function() {
  3358.         if (!this._isRefresh) return;
  3359.         this._isRefresh = false;
  3360.         this.refresh();
  3361.     }; // $._onRefresh
  3362.  
  3363. })(DoubleX_RMMV.Skill_Hotkeys);
  3364.  
  3365. /*----------------------------------------------------------------------------
  3366.  *    # New class: Window_SkillHotkeyCmd                                      
  3367.  *      - Lets players bind hotkeys to skills for the actors involved        
  3368.  *----------------------------------------------------------------------------*/
  3369.  
  3370. (function(SH) {
  3371.  
  3372.     "use strict";
  3373.  
  3374.     var $ = Window_SkillHotkeyCmd.prototype =
  3375.             Object.create(Window_SkillHotkeyBase.prototype);
  3376.     $.constructor = Window_SkillHotkeyCmd;
  3377.  
  3378.     /**
  3379.      * Idempotent
  3380.      * @author DoubleX
  3381.      * @constructor
  3382.      * @param {Game_Actor} actor - The actor using this window
  3383.      * @since v1.00a
  3384.      * @version v1.00a
  3385.      */
  3386.     $.initialize = function(actor) {
  3387.         // This must be run first or _makeCmdList would use a null actor
  3388.         this._actor = actor;
  3389.         //
  3390.         Window_SkillHotkeyBase.prototype.initialize.call(
  3391.                 this, this.windowX(), this.windowY());
  3392.         this.openness = 0; // This must be run last or the game would crash
  3393.         // This must be run last or the parent would activate the window again
  3394.         this.deactivate();
  3395.         //
  3396.     }; // $.initialize
  3397.  
  3398.     $.lineHeight = function() { return SH.params.hotkeyCmdLineH.call(this); };
  3399.  
  3400.     $.standardFontSize = function() {
  3401.         return SH.params.hotkeyCmdFontSize.call(this);
  3402.     }; // $.standardFontSize
  3403.  
  3404.     $.standardPadding = function() {
  3405.         return SH.params.hotkeyCmdPadding.call(this);
  3406.     }; // $.standardPadding
  3407.  
  3408.     $.textPadding = function() {
  3409.         return SH.params.hotkeyCmdTextPadding.call(this);
  3410.     }; // $.textPadding
  3411.  
  3412.     $.standardBackOpacity = function() {
  3413.         return SH.params.hotkeyCmdBackOpacity.call(this);
  3414.     }; // $.standardBackOpacity
  3415.  
  3416.     $.translucentOpacity = function() {
  3417.         return SH.params.hotkeyCmdTranslucentOpacity.call(this);
  3418.     }; // $.translucentOpacity
  3419.  
  3420.     $.spacing = function() { return SH.params.hotkeyCmdSpacing.call(this); };
  3421.  
  3422.     $.windowWidth = function() {
  3423.         return SH.params.hotkeyCmdWindowW.call(this);
  3424.     }; // $.windowWidth
  3425.  
  3426.     $.windowHeight = function() {
  3427.         return SH.params.hotkeyCmdWindowH.call(this);
  3428.     }; // $.windowHeight
  3429.  
  3430.     /**
  3431.      * Idempotent
  3432.      * @author DoubleX
  3433.      * @interface
  3434.      * @param {Number} skillId - The id of the skill involved
  3435.      * @since v1.00a
  3436.      * @version v1.00a
  3437.      */
  3438.     $.makeCommandList = function(skillId) {
  3439.         // It's just to play safe
  3440.         Window_SkillHotkeyBase.prototype.makeCommandList.call(this);
  3441.         //
  3442.         // Otherwise _makeCmdList would take the undefined skillId
  3443.         this._makeCmdList(skillId || this._skillId);
  3444.         //
  3445.     }; // $.makeCommandList
  3446.  
  3447.     /**
  3448.      * Idempotent
  3449.      * @author DoubleX
  3450.      * @interface
  3451.      * @param {Number} skillId - The id of the skill involved
  3452.      * @since v1.00a
  3453.      * @version v1.00a
  3454.      */
  3455.     $.setup = function(skillId) {
  3456.         // Otherwise makeCommandList would pass undefined to _makeCmdList
  3457.         this._skillId = skillId;
  3458.         //
  3459.         this.clearCommandList();
  3460.         this.makeCommandList(skillId);
  3461.         this.refresh();
  3462.         this.select(0);
  3463.         this.activate();
  3464.         this.open();
  3465.     }; // $.setup
  3466.  
  3467.     /**
  3468.      * Hotspot/Nullipotent
  3469.      * @author DoubleX
  3470.      * @interface
  3471.      * @returns {Number} The requested window x position
  3472.      * @since v1.00a
  3473.      * @version v1.00a
  3474.      */
  3475.     $.windowX = function() { return SH.params.hotkeyCmdWindowX.call(this); };
  3476.  
  3477.     /**
  3478.      * Hotspot/Nullipotent
  3479.      * @author DoubleX
  3480.      * @interface
  3481.      * @returns {Number} The requested window y position
  3482.      * @since v1.00a
  3483.      * @version v1.00a
  3484.      */
  3485.     $.windowY = function() { return SH.params.hotkeyCmdWindowY.call(this); };
  3486.  
  3487.     /**
  3488.      * Idempotent
  3489.      * @author DoubleX
  3490.      * @param {Number/Nullable} skillId - The id of the skill involved
  3491.      * @since v1.00a
  3492.      * @version v1.00a
  3493.      */
  3494.     $._makeCmdList = function(skillId) {
  3495.         // These commands must be available or this window wouldn't be setup
  3496.         this.addCommand(SH.params.bindHotkeyText.call(this._actor), 'bind');
  3497.         //
  3498.         this.addCommand(SH.params.useSkillText.call(this._actor, skillId),
  3499.                 'use', this._actor.canUse($dataSkills[skillId]));
  3500.     }; // $._makeCmdList
  3501.  
  3502. })(DoubleX_RMMV.Skill_Hotkeys);
  3503.  
  3504. /*----------------------------------------------------------------------------
  3505.  *    # New class: Window_SkillHotkeyList                                    
  3506.  *      - Shows the list of hotkey slots when binding skill hotkeys          
  3507.  *----------------------------------------------------------------------------*/
  3508.  
  3509. (function(SH) {
  3510.  
  3511.     "use strict";
  3512.  
  3513.     var $ = Window_SkillHotkeyList.prototype =
  3514.             Object.create(Window_SkillHotkeyBase.prototype);
  3515.     $.constructor = Window_SkillHotkeyList;
  3516.  
  3517.     /*------------------------------------------------------------------------
  3518.      *    New private instance variable                                      
  3519.      *------------------------------------------------------------------------*/
  3520.     // {Bitmap}_unusableSkillCoverIcon: The cached unusable skill cover icon
  3521.  
  3522.     /**
  3523.      * Idempotent
  3524.      * @author DoubleX
  3525.      * @constructor
  3526.      * @param {Game_Actor} actor - The actor using this window
  3527.      * @since v1.00a
  3528.      * @version v1.00a
  3529.      */
  3530.     $.initialize = function(actor) {
  3531.         // Otherwise this._actor would be null in the function this._skillId
  3532.         this._actor = actor, this._data = this._hotkeyMapping();
  3533.         //
  3534.         Window_SkillHotkeyBase.prototype.initialize.call(
  3535.                 this, this.windowX(), this.windowY());
  3536.     }; // $.initialize
  3537.  
  3538.     $.lineHeight = function() { return SH.params.hotkeyListLineH.call(this); };
  3539.  
  3540.     $.standardFontSize = function() {
  3541.         return SH.params.hotkeyListFontSize.call(this);
  3542.     }; // $.standardFontSize
  3543.  
  3544.     $.standardPadding = function() {
  3545.         return SH.params.hotkeyListPadding.call(this);
  3546.     }; // $.standardPadding
  3547.  
  3548.     $.textPadding = function() {
  3549.         return SH.params.hotkeyListTextPadding.call(this);
  3550.     }; // $.textPadding
  3551.  
  3552.     $.standardBackOpacity = function() {
  3553.         return SH.params.hotkeyListBackOpacity.call(this);
  3554.     }; // $.standardBackOpacity
  3555.  
  3556.     $.translucentOpacity = function() {
  3557.         return SH.params.hotkeyListTranslucentOpacity.call(this);
  3558.     }; // $.translucentOpacity
  3559.  
  3560.     $.spacing = function() { return SH.params.hotkeyListSpacing.call(this); };
  3561.  
  3562.     $.windowWidth = function() {
  3563.         return SH.params.hotkeyListWindowW.call(this);
  3564.     }; // $.windowWidth
  3565.  
  3566.     $.windowHeight = function() {
  3567.         return SH.params.hotkeyListWindowH.call(this);
  3568.     }; // $.windowHeight
  3569.  
  3570.     $.maxCols = function() { return this.maxItems(); };
  3571.  
  3572.     $.maxItems = function() { return this._hotkeyList().length; };
  3573.  
  3574.     $.itemHeight = function() {
  3575.         return this.lineHeight() + Window_Base._iconHeight + 1;
  3576.     }; // $.itemHeight
  3577.  
  3578.     $.drawItem = function(index) {
  3579.         var skillId = this._skillId(index), rect = this.itemRect(index);
  3580.         var iconIndex = this._iconIndex(skillId);
  3581.         this.drawIcon(iconIndex, rect.x, rect.y);
  3582.         if (this._isDrawUnusableSkillCoverIcon(skillId)) {
  3583.             this._drawUnusableSkillCoverIcon(rect.x, rect.y);
  3584.         }
  3585.         this.drawText(this._hotkeyName(index), rect.x,
  3586.                 rect.y + Window_Base._iconHeight + 1);
  3587.     }; // $.drawItem
  3588.  
  3589.     $.refresh = function() {
  3590.         Window_Selectable.prototype.refresh.call(this);
  3591.     }; // $.refresh
  3592.  
  3593.     $.isCurrentItemEnabled = function() { return true; };
  3594.  
  3595.     $.processHandling = function() {
  3596.         Window_SkillHotkeyBase.prototype.processHandling.apply(this, arguments);
  3597.         this._processHandling(this);
  3598.     }; // $.processHandling
  3599.  
  3600.     /**
  3601.      * Hotspot/Nullipotent
  3602.      * @author DoubleX
  3603.      * @interface
  3604.      * @returns {Number} The requested window x position
  3605.      * @since v1.00a
  3606.      * @version v1.00a
  3607.      */
  3608.     $.windowX = function() { return SH.params.hotkeyListWindowX.call(this); };
  3609.  
  3610.     /**
  3611.      * Hotspot/Nullipotent
  3612.      * @author DoubleX
  3613.      * @interface
  3614.      * @returns {Number} The requested window y position
  3615.      * @since v1.00a
  3616.      * @version v1.00a
  3617.      */
  3618.     $.windowY = function() { return SH.params.hotkeyListWindowY.call(this); };
  3619.  
  3620.     /**
  3621.      * Hotspot/Idempotent
  3622.      * @author DoubleX
  3623.      * @since v1.00a
  3624.      * @version v1.00a
  3625.      */
  3626.     $._update = function() {
  3627.         Window_SkillHotkeyBase.prototype._update.call(this);
  3628.         this._updateUnusableSkillCoverIcon();
  3629.     }; // $._update
  3630.  
  3631.     /**
  3632.      * Hotspot/Idempotent
  3633.      * @author DoubleX
  3634.      * @since v1.00a
  3635.      * @version v1.00a
  3636.      */
  3637.     $._updateUnusableSkillCoverIcon = function() {
  3638.         if (!this._canHaveNewUnusableSkillCoverIcon()) return;
  3639.         this._onSetNewUnusableSkillCoverIcon();
  3640.     }; // $._updateUnusableSkillCoverIcon
  3641.  
  3642.     /**
  3643.      * This function isn't nullipotent as new values will be assigned as well
  3644.      * Hotspot/Idempotent
  3645.      * @author DoubleX
  3646.      * @returns {Boolean} The check result
  3647.      * @since v1.00a
  3648.      * @todo: Make this function Nullipotent without losing performance
  3649.      * @version v1.00a
  3650.      */
  3651.     $._canHaveNewUnusableSkillCoverIcon = function() {
  3652.         return this._hasNewUnusableSkillCoverIcon("Path") ||
  3653.                 this._hasNewUnusableSkillCoverIcon("Name") ||
  3654.                 this._hasNewUnusableSkillCoverIcon("Hue") ||
  3655.                 this._hasNewUnusableSkillCoverIcon("Smooth");
  3656.     }; // $._canHaveNewUnusableSkillCoverIcon
  3657.  
  3658.     /**
  3659.      * This function isn't nullipotent as new values will be assigned as well
  3660.      * Hotspot/Idempotent
  3661.      * @author DoubleX
  3662.      * @param {String} part - The name of the part consituiting the cover icon
  3663.      * @returns {Boolean} The check result
  3664.      * @since v1.00a
  3665.      * @todo: Make this function Nullipotent without losing performance
  3666.      * @version v1.00a
  3667.      */
  3668.     $._hasNewUnusableSkillCoverIcon = function(part) {
  3669.         // These codes are easy, simple and small enough to stick together
  3670.         var newPart =
  3671.                 SH.params["unusableSkillCoverIcon" + part].call(this._actor);
  3672.         var hasNew = this["_unusableSkillCoverIcon" + part] !== newPart;
  3673.         if (hasNew) this["_unusableSkillCoverIcon" + part] = newPart;
  3674.         return hasNew;
  3675.         //
  3676.     }; // $._hasNewUnusableSkillCoverIcon
  3677.  
  3678.     /**
  3679.      * Potential Hotspot/Idempotent
  3680.      * @author DoubleX
  3681.      * @since v1.00a
  3682.      * @version v1.00a
  3683.      */
  3684.     $._onSetNewUnusableSkillCoverIcon = function() {
  3685.         this._setNewUnusableSkillCoverIcon();
  3686.         // Otherwise the new icon might not be drawn as it needs time to load
  3687.         this.refresh();
  3688.         //
  3689.     }; // $._onSetNewUnusableSkillCoverIcon
  3690.  
  3691.     /**
  3692.      * Potential Hotspot/Idempotent
  3693.      * @author DoubleX
  3694.      * @since v1.00a
  3695.      * @version v1.00a
  3696.      */
  3697.     $._setNewUnusableSkillCoverIcon = function() {
  3698.         this._unusableSkillCoverIcon = this._newUnusableSkillCoverIcon();
  3699.     }; // $._setNewUnusableSkillCoverIcon
  3700.  
  3701.     /**
  3702.      * Potential Hotspot/Nullipotent
  3703.      * @author DoubleX
  3704.      * @returns {Bitmap} The requested unusable skill ocver icon
  3705.      * @since v1.00a
  3706.      * @version v1.00a
  3707.      */
  3708.     $._newUnusableSkillCoverIcon = function() {
  3709.         return ImageManager.loadBitmap(this._unusableSkillCoverIconPath,
  3710.                 this._unusableSkillCoverIconName,
  3711.                 this._unusableSkillCoverIconHue,
  3712.                 this._unusableSkillCoverIconSmooth);
  3713.     }; // $._newUnusableSkillCoverIcon
  3714.  
  3715.     /**
  3716.      * Nullipotent
  3717.      * @author DoubleX
  3718.      * @param {Number} index - The hotkey slot index
  3719.      * @returns {String} The requested hotkey name
  3720.      * @since v1.00a
  3721.      * @version v1.00a
  3722.      */
  3723.     $._hotkeyName = function(index) {
  3724.         return SH.cfgs.hotkeyNames.call(this._actor)[this._hotkey(index)];
  3725.     }; // $._hotkeyName
  3726.  
  3727.     /**
  3728.      * Nullipotent
  3729.      * @author DoubleX
  3730.      * @param {Number} index - The hotkey slot index
  3731.      * @returns {String} The requested hotkey symbol
  3732.      * @since v1.00a
  3733.      * @version v1.00a
  3734.      */
  3735.     $._hotkey = function(index) { return this._hotkeyList()[index]; };
  3736.  
  3737.     /**
  3738.      * Nullipotent
  3739.      * @author DoubleX
  3740.      * @param {Number} index - The hotkey slot index
  3741.      * @returns {Number/Nullable} The requested skill id
  3742.      * @since v1.00a
  3743.      * @version v1.00a
  3744.      */
  3745.     $._skillId = function(index) {
  3746.         return this._hotkeyMapping()[this._hotkeyList()[index]];
  3747.     }; // $._skillId
  3748.  
  3749.     /**
  3750.      * Nullipotent
  3751.      * @author DoubleX
  3752.      * @param {Number/Nullable} skillId - The id of the skil involved
  3753.      * @returns {Number} The requested icon index
  3754.      * @since v1.00a
  3755.      * @version v1.00a
  3756.      */
  3757.     $._iconIndex = function(skillId) {
  3758.         return skillId ? $dataSkills[skillId].iconIndex : 0;
  3759.     }; // $._iconIndex
  3760.  
  3761.     /**
  3762.      * Nullipotent
  3763.      * @author DoubleX
  3764.      * @returns {Object[String, Number]} The requested hotkey mapping
  3765.      * @since v1.00a
  3766.      * @version v1.00a
  3767.      */
  3768.     $._hotkeyMapping = function() {
  3769.         return this._actor.skillHotkeys.hotkeyMapping;
  3770.     }; // $._hotkeyMapping
  3771.  
  3772.     /**
  3773.      * Nullipotent
  3774.      * @author DoubleX
  3775.      * @param {Number/Nullable} skillId - The id of the skil involved
  3776.      * @returns {Boolean} The check result
  3777.      * @since v1.00a
  3778.      * @version v1.00a
  3779.      */
  3780.     $._isDrawUnusableSkillCoverIcon = function(skillId) {
  3781.         return skillId && !this._actor.canUse($dataSkills[skillId]);
  3782.     }; // $._isDrawUnusableSkillCoverIcon
  3783.  
  3784.     /**
  3785.      * Idempotent
  3786.      * @author DoubleX
  3787.      * @param {Number} x - The icon x position
  3788.      * @param {Number} y - The icon y position
  3789.      * @since v1.00a
  3790.      * @version v1.00a
  3791.      */
  3792.     $._drawUnusableSkillCoverIcon = function(x, y) {
  3793.         if (!this._unusableSkillCoverIcon) return;
  3794.         this.contents.blt(this._unusableSkillCoverIcon, 0, 0,
  3795.                 Window_Base._iconWidth, Window_Base._iconHeight, x, y);
  3796.     }; // $._drawUnusableSkillCoverIcon
  3797.  
  3798.     /**
  3799.      * Hotspot/Idempotent
  3800.      * @author DoubleX
  3801.      * @since v1.00a
  3802.      * @version v1.00a
  3803.      */
  3804.     $._processHandling = function() {
  3805.         // Not enabling this plugin shouldn't be able to activate this window
  3806.         if (this.isOpenAndActive()) this._processHotkeys();
  3807.         //
  3808.     }; // $._processHandling
  3809.  
  3810.     /**
  3811.      * Hotspot/Idempotent
  3812.      * @author DoubleX
  3813.      * @since v1.00a
  3814.      * @version v1.00a
  3815.      */
  3816.     $._processHotkeys = function() {
  3817.         this._hotkeyList().forEach(this._processHotkey, this);
  3818.     }; // $._processHotkeys
  3819.  
  3820.     /**
  3821.      * Hotspot/Idempotent
  3822.      * @author DoubleX
  3823.      * @param {String} hotkey - The symbol of the involved hotkey
  3824.      * @since v1.00a
  3825.      * @version v1.00a
  3826.      */
  3827.     $._processHotkey = function(hotkey) {
  3828.         if (Input.isTriggered(hotkey)) this._useHotkey(hotkey);
  3829.     }; // $._processHotkey
  3830.  
  3831.     /**
  3832.      * Potential Hotspot/Idempotent
  3833.      * @author DoubleX
  3834.      * @param {String} hotkey - The symbol of the involved hotkey
  3835.      * @since v1.00a
  3836.      * @version v1.00a
  3837.      */
  3838.     $._useHotkey = function(hotkey) {
  3839.         // Otherwise the handlers would bind the wrong hotkey to the skill
  3840.         this.select(this._hotkeyList().indexOf(hotkey));
  3841.         //
  3842.         this.playOkSound();
  3843.         this.callHandler(hotkey);
  3844.     }; // $._useHotkey
  3845.  
  3846.     /**
  3847.      * Potential Hotspot/Nullipotent
  3848.      * @author DoubleX
  3849.      * @returns {Array[String]} The requested list of hotkey symbols
  3850.      * @since v1.00a
  3851.      * @version v1.00a
  3852.      */
  3853.     $._hotkeyList = function() {
  3854.         return Object.keys(SH.cfgs.hotkeyNames.call(this._actor));
  3855.     }; // $._hotkeyList
  3856.  
  3857. })(DoubleX_RMMV.Skill_Hotkeys);
  3858.  
  3859. /*----------------------------------------------------------------------------
  3860.  *    # New class: Window_BattleSkillHotkeys                                  
  3861.  *      - Shows the list of hotkeys for the currently inpuable actor in battle
  3862.  *----------------------------------------------------------------------------*/
  3863.  
  3864. (function(SH) {
  3865.  
  3866.     "use strict";
  3867.  
  3868.     var $ = Window_BattleSkillHotkeys.prototype =
  3869.             Object.create(Window_SkillHotkeyList.prototype);
  3870.     $.constructor = Window_BattleSkillHotkeys;
  3871.  
  3872.     /*------------------------------------------------------------------------
  3873.      *    New private instance variable                                      
  3874.      *------------------------------------------------------------------------*/
  3875.     // {Function(String)}_touchCallback: The function handling touched hotkey
  3876.  
  3877.     /**
  3878.      * Idempotent
  3879.      * @author DoubleX
  3880.      * @constructor
  3881.      * @param {Game_Actor} actor - The actor using this window
  3882.      * @param {Function(String)} touchCallback - The function handling the
  3883.      *                                            touched hotkey slot
  3884.      * @since v1.00a
  3885.      * @version v1.00a
  3886.      */
  3887.     $.initialize = function(actor, touchCallback) {
  3888.         Window_SkillHotkeyList.prototype.initialize.call(this, actor);
  3889.         this._touchCallback = touchCallback;
  3890.     }; // $.initialize
  3891.  
  3892.     $.lineHeight = function() {
  3893.         return SH.params.hotkeyCmdListLineH.call(this);
  3894.     }; // $.lineHeight
  3895.  
  3896.     $.standardFontSize = function() {
  3897.         return SH.params.hotkeyCmdListFontSize.call(this);
  3898.     }; // $.standardFontSize
  3899.  
  3900.     $.standardPadding = function() {
  3901.         return SH.params.hotkeyCmdListPadding.call(this);
  3902.     }; // $.standardPadding
  3903.  
  3904.     $.textPadding = function() {
  3905.         return SH.params.hotkeyCmdListTextPadding.call(this);
  3906.     }; // $.textPadding
  3907.  
  3908.     $.standardBackOpacity = function() {
  3909.         return SH.params.hotkeyCmdListBackOpacity.call(this);
  3910.     }; // $.standardBackOpacity
  3911.  
  3912.     $.translucentOpacity = function() {
  3913.         return SH.params.hotkeyCmdListTranslucentOpacity.call(this);
  3914.     }; // $.translucentOpacity
  3915.  
  3916.     $.spacing = function() {
  3917.         return SH.params.hotkeyCmdListSpacing.call(this);
  3918.     }; // $.spacing
  3919.  
  3920.     $.windowWidth = function() {
  3921.         return SH.params.hotkeyCmdListWindowW.call(this);
  3922.     }; // $.windowWidth
  3923.  
  3924.     $.windowHeight = function() {
  3925.         return SH.params.hotkeyCmdListWindowH.call(this);
  3926.     }; // $.windowHeight
  3927.  
  3928.     $.isCurrentItemEnabled = function() {
  3929.         return Window_SkillHotkeyBase.prototype.isCurrentItemEnabled.call(this);
  3930.     }; // $.isCurrentItemEnabled
  3931.  
  3932.     $.processTouch = function() {
  3933.         // Only isOpenAndActive changed to isOpen and everything else's intact
  3934.         if (!this.isOpen()) return this._touching = false;
  3935.         if (TouchInput.isTriggered() && this.isTouchedInsideFrame()) {
  3936.             this._touching = true;
  3937.             this.onTouch(true);
  3938.         } else if (TouchInput.isCancelled()) {
  3939.             if (this.isCancelEnabled()) this.processCancel();
  3940.         }
  3941.         if (!this._touching) return;
  3942.         TouchInput.isPressed() ? this.onTouch(false) : this._touching = false;
  3943.         //
  3944.     }; // $.processTouch
  3945.  
  3946.     $.onTouch = function(triggered) {
  3947.         // These codes are easy, simple and small enough to stick together
  3948.         if (!triggered) return;
  3949.         var hitIndex = this._hitIndex(), hotkey = this._hotkeyList()[hitIndex];
  3950.         if (this._isHitHotkey(hotkey)) this._touchCallback(hotkey);
  3951.         //
  3952.     }; // $.onTouch
  3953.  
  3954.     /**
  3955.      * Hotspot/Nullipotent
  3956.      * @author DoubleX
  3957.      * @interface
  3958.      * @returns {Number} The requested window x position
  3959.      * @since v1.00a
  3960.      * @version v1.00a
  3961.      */
  3962.     $.windowX = function() {
  3963.         return SH.params.hotkeyCmdListWindowX.call(this);
  3964.     }; // $.windowX
  3965.  
  3966.     /**
  3967.      * Hotspot/Nullipotent
  3968.      * @author DoubleX
  3969.      * @interface
  3970.      * @returns {Number} The requested window y position
  3971.      * @since v1.00a
  3972.      * @version v1.00a
  3973.      */
  3974.     $.windowY = function() {
  3975.         return SH.params.hotkeyCmdListWindowY.call(this);
  3976.     }; // $.windowY
  3977.  
  3978.     /**
  3979.      * Nullipotent
  3980.      * @author DoubleX
  3981.      * @param {Number/Nullable} skillId - The id of the skil involved
  3982.      * @returns {Boolean} The check result
  3983.      * @since v1.00a
  3984.      * @version v1.00a
  3985.      */
  3986.     $._isDrawUnusableSkillCoverIcon = function(skillId) {
  3987.         return Window_SkillHotkeyList.prototype._isDrawUnusableSkillCoverIcon.
  3988.                 call(this, skillId) ||
  3989.                 skillId && !this._actor.canUseSkillHotkeys(skillId);
  3990.     }; // $._isDrawUnusableSkillCoverIcon
  3991.  
  3992.     /**
  3993.      * Potential Hotspot/Nullipotent
  3994.      * @author DoubleX
  3995.      * @returns {Number} The requested hit selection index
  3996.      * @since v1.00a
  3997.      * @version v1.00a
  3998.      */
  3999.     $._hitIndex = function() {
  4000.         return this.hitTest(this.canvasToLocalX(TouchInput.x),
  4001.                 this.canvasToLocalY(TouchInput.y));
  4002.     }; // $._hitIndex
  4003.  
  4004.     /**
  4005.      * Potential Hotspot/Nullipotent
  4006.      * @author DoubleX
  4007.      * @param {String} hotkey - The symbol of the hotkey involved
  4008.      * @returns {Boolean} The check result
  4009.      * @since v1.00a
  4010.      * @version v1.00a
  4011.      */
  4012.     $._isHitHotkey = function(hotkey) { return this._hotkeyMapping()[hotkey]; };
  4013.  
  4014. })(DoubleX_RMMV.Skill_Hotkeys);
  4015.  
  4016. /*----------------------------------------------------------------------------
  4017.  *    # Edit class: Scene_Skill                                              
  4018.  *      - Show the bind option when using skills that can do so              
  4019.  *----------------------------------------------------------------------------*/
  4020.  
  4021. (function(SH) {
  4022.  
  4023.     "use strict";
  4024.  
  4025.     SH.Scene_Skill = { orig: {}, new: {} };
  4026.     var _SS = SH.Scene_Skill.orig, $ = Scene_Skill.prototype;
  4027.     var _SH = SH.Scene_Skill.new;
  4028.  
  4029.     /*------------------------------------------------------------------------
  4030.      *    New public instance variable                                        
  4031.      *------------------------------------------------------------------------*/
  4032.     // {Object}skillHotkeys: The container of all other new variables
  4033.  
  4034.     /*------------------------------------------------------------------------
  4035.      *    New private instance variables                                      
  4036.      *------------------------------------------------------------------------*/
  4037.     // {Window_SkillHotkeyCmd}_cmdWindow: The bind skill hotkey command window
  4038.     // {Window_SkillHotkeyList}_listWindow: The skill hotkey slot command window
  4039.  
  4040.     _SS.create = $.create;
  4041.     $.create = function() { // v1.00a - v1.00a; Extended
  4042.         _SS.create.apply(this, arguments);
  4043.         _SH._createWindows.call(this); // Added to create the hotkey windows
  4044.     }; // $.create
  4045.  
  4046.     _SS.onItemOk = $.onItemOk;
  4047.     $.onItemOk = function() { // v1.00a - v1.00a; Extended
  4048.         // Added to let players choose to bind skills that can do so
  4049.         if (_SH._isSetupCmdWindow.call(this)) {
  4050.             return _SH._setupCmdWindow.call(this);
  4051.         }
  4052.         //
  4053.         _SS.onItemOk.apply(this, arguments);
  4054.     }; // $.onItemOk
  4055.  
  4056.     /**
  4057.      * The this pointer is Scene_Skill.prototype
  4058.      * Idempotent
  4059.      * @author DoubleX
  4060.      * @since v1.00a
  4061.      * @version v1.00a
  4062.      */
  4063.     _SH._createWindows = function() {
  4064.         this.skillHotkeys = {};
  4065.         _SH._createHotkeyCmdWindow.call(this);
  4066.         _SH._createHotkeyListWindow.call(this);
  4067.     }; // _SH._createWindows
  4068.  
  4069.     /**
  4070.      * The this pointer is Scene_Skill.prototype
  4071.      * Idempotent
  4072.      * @author DoubleX
  4073.      * @since v1.00a
  4074.      * @version v1.00a
  4075.      */
  4076.     _SH._createHotkeyCmdWindow = function() {
  4077.         this.skillHotkeys._cmdWindow = _SH._hotkeyCmdWindow.call(this);
  4078.         this.addWindow(this.skillHotkeys._cmdWindow);
  4079.     }; // _SH._createHotkeyCmdWindow
  4080.  
  4081.     /**
  4082.      * The this pointer is Scene_Skill.prototype
  4083.      * Nullipotent
  4084.      * @author DoubleX
  4085.      * @returns {Window_SkillHotkeyCmd} The requested hotkey command window
  4086.      * @since v1.00a
  4087.      * @version v1.00a
  4088.      */
  4089.     _SH._hotkeyCmdWindow = function() {
  4090.         var cmdWindow = new Window_SkillHotkeyCmd(this.user());
  4091.         cmdWindow.setHandler('bind', _SH._onBind.bind(this));
  4092.         cmdWindow.setHandler('use', _SH._onUse.bind(this));
  4093.         cmdWindow.setHandler('cancel', _SH._onCmdWindowCancel.bind(this));
  4094.         cmdWindow.deselect();
  4095.         return cmdWindow;
  4096.     }; // _SH._hotkeyCmdWindow
  4097.  
  4098.     /**
  4099.      * The this pointer is Scene_Skill.prototype
  4100.      * Idempotent
  4101.      * @author DoubleX
  4102.      * @since v1.00a
  4103.      * @version v1.00a
  4104.      */
  4105.     _SH._createHotkeyListWindow = function() {
  4106.         this.skillHotkeys._listWindow = _SH._hotkeyListWindow.call(this);
  4107.         this.addWindow(this.skillHotkeys._listWindow);
  4108.     }; // _SH._createHotkeyListWindow
  4109.  
  4110.     /**
  4111.      * The this pointer is Scene_Skill.prototype
  4112.      * Nullipotent
  4113.      * @author DoubleX
  4114.      * @returns {Window_SkillHotkeyList} The requested hotkey list window
  4115.      * @since v1.00a
  4116.      * @version v1.00a
  4117.      */
  4118.     _SH._hotkeyListWindow = function() {
  4119.         var listWindow = new Window_SkillHotkeyList(this.user());
  4120.         listWindow.setHandler('ok', _SH._onchangeSlot.bind(this));
  4121.         listWindow.setHandler('cancel', _SH._onCancelChangeSlot.bind(this));
  4122.         _SH._hotkeyList.call(this).forEach(
  4123.                 _SH._setHotkeyListHandlerFunc(listWindow), this);
  4124.         _SH._closeListWindow.call(this, listWindow);
  4125.         return listWindow;
  4126.     }; // _SH._hotkeyListWindow
  4127.  
  4128.     /**
  4129.      * The this pointer is Scene_Skill.prototype
  4130.      * Pure function
  4131.      * @author DoubleX
  4132.      * @param {Window_SkillHotkeyList} listWindow - The hotkey list window
  4133.      * @returns {Function(String)} The function adding handler for hotkey symbol
  4134.      * @since v1.00a
  4135.      * @version v1.00a
  4136.      */
  4137.     _SH._setHotkeyListHandlerFunc = function(listWindow) {
  4138.         /**
  4139.          * The this pointer is Scene_Skill.prototype
  4140.          * Idempotent
  4141.          * @author DoubleX
  4142.          * @param {String} hotkey - The symbol of the hotkey involved
  4143.          * @since v1.00a
  4144.          * @version v1.00a
  4145.          */
  4146.         return function(hotkey) {
  4147.             _SH._setHotkeyListHandler.call(this, listWindow, hotkey);
  4148.         };
  4149.     }; // _SH._setHotkeyListHandlerFunc
  4150.  
  4151.     /**
  4152.      * The this pointer is Scene_Skill.prototype
  4153.      * Idempotent
  4154.      * @author DoubleX
  4155.      * @param {Window_SkillHotkeyList} listWindow - The hotkey list window
  4156.      * @param {String} hotkey - The symbol of the hotkey involved
  4157.      * @since v1.00a
  4158.      * @version v1.00a
  4159.      */
  4160.     _SH._setHotkeyListHandler = function(listWindow, hotkey) {
  4161.         // The hotkey list window will automatically adjust the selection index
  4162.         listWindow.setHandler(hotkey, _SH._onchangeSlot.bind(this));
  4163.         //
  4164.     }; // _SH._setHotkeyListHandler
  4165.  
  4166.     /**
  4167.      * The this pointer is Scene_Skill.prototype
  4168.      * Nullipotent
  4169.      * @author DoubleX
  4170.      * @returns {Boolean} The check result
  4171.      * @since v1.00a
  4172.      * @version v1.00a
  4173.      */
  4174.     _SH._isSetupCmdWindow = function() {
  4175.         return this.user().canBindSkillHotkeys(this.item().id);
  4176.     }; // _SH._isSetupCmdWindow
  4177.  
  4178.     /**
  4179.      * The this pointer is Scene_Skill.prototype
  4180.      * Idempotent
  4181.      * @author DoubleX
  4182.      * @since v1.00a
  4183.      * @version v1.00a
  4184.      */
  4185.     _SH._setupCmdWindow = function() {
  4186.         this.skillHotkeys._cmdWindow.setup(this.item().id);
  4187.         this.showSubWindow(this.skillHotkeys._cmdWindow);
  4188.     }; //_SH._setupCmdWindow
  4189.  
  4190.     /**
  4191.      * The this pointer is Scene_Skill.prototype
  4192.      * Idempotent
  4193.      * @author DoubleX
  4194.      * @since v1.00a
  4195.      * @version v1.00a
  4196.      */
  4197.     _SH._onBind = function() {
  4198.         _SH._onCmdWindowCancel.call(this);
  4199.         // Otherwise the item window would be active when calling determineItem
  4200.         this._itemWindow.deactivate();
  4201.         //
  4202.         _SH._openListWindow.call(this);
  4203.     }; // _SH._onBind
  4204.  
  4205.     /**
  4206.      * The this pointer is Scene_Skill.prototype
  4207.      * Idempotent
  4208.      * @author DoubleX
  4209.      * @since v1.00a
  4210.      * @version v1.00a
  4211.      */
  4212.     _SH._openListWindow = function() {
  4213.         this.skillHotkeys._listWindow.refresh();
  4214.         this.skillHotkeys._listWindow.show();
  4215.         this.skillHotkeys._listWindow.activate();
  4216.         // Otherwise no selection would be made for its 1st appearance
  4217.         this.skillHotkeys._listWindow.select(0);
  4218.         //
  4219.     }; // _SH._openListWindow
  4220.  
  4221.     /**
  4222.      * The this pointer is Scene_Skill.prototype
  4223.      * Idempotent
  4224.      * @author DoubleX
  4225.      * @since v1.00a
  4226.      * @version v1.00a
  4227.      */
  4228.     _SH._onUse = function() {
  4229.         _SH._onCmdWindowCancel.call(this);
  4230.         // Otherwise the item window would be active when calling determineItem
  4231.         this._itemWindow.deactivate();
  4232.         //
  4233.         _SS.onItemOk.call(this);
  4234.     }; // _SH._onUse
  4235.  
  4236.     /**
  4237.      * The this pointer is Scene_Skill.prototype
  4238.      * Idempotent
  4239.      * @author DoubleX
  4240.      * @since v1.00a
  4241.      * @version v1.00a
  4242.      */
  4243.     _SH._onCmdWindowCancel = function() {
  4244.         this.hideSubWindow(this.skillHotkeys._cmdWindow);
  4245.         this.skillHotkeys._cmdWindow.close();
  4246.     }; // _SH._onCmdWindowCancel
  4247.  
  4248.     /**
  4249.      * The this pointer is Scene_Skill.prototype
  4250.      * Idempotent
  4251.      * @author DoubleX
  4252.      * @since v1.00a
  4253.      * @version v1.00a
  4254.      */
  4255.     _SH._onchangeSlot = function() {
  4256.         _SH._changeSlot.call(this);
  4257.         _SH._onCancelChangeSlot.call(this);
  4258.         this.commandSkill();
  4259.     }; // _SH._onchangeSlot
  4260.  
  4261.     /**
  4262.      * The this pointer is Scene_Skill.prototype
  4263.      * Idempotent
  4264.      * @author DoubleX
  4265.      * @since v1.00a
  4266.      * @version v1.00a
  4267.      */
  4268.     _SH._changeSlot = function() {
  4269.         // If both flags are false then regard it as bind rather than error
  4270.         this.user().bindSkillHotkey(
  4271.                 this.item().id, _SH._changedSlot.call(this));
  4272.         //
  4273.     }; // _SH._changeSlot
  4274.  
  4275.     /**
  4276.      * The this pointer is Scene_Skill.prototype
  4277.      * Idempotent
  4278.      * @author DoubleX
  4279.      * @returns {String} The requested hotkey symbol to have its slot changed
  4280.      * @since v1.00a
  4281.      * @version v1.00a
  4282.      */
  4283.     _SH._changedSlot = function() {
  4284.         return _SH._hotkeyList.call(
  4285.                 this)[this.skillHotkeys._listWindow.index()];
  4286.     }; // _SH._changedSlot
  4287.  
  4288.     /**
  4289.      * The this pointer is Scene_Skill.prototype
  4290.      * Nullipotent
  4291.      * @author DoubleX
  4292.      * @returns {Array[String]} Ther requested list of hotkey symbols
  4293.      * @since v1.00a
  4294.      * @version v1.00a
  4295.      */
  4296.     _SH._hotkeyList = function() {
  4297.         return Object.keys(SH.cfgs.hotkeyNames.call(this.user()));
  4298.     }; // _SH._hotkeyList
  4299.  
  4300.     /**
  4301.      * The this pointer is Scene_Skill.prototype
  4302.      * Idempotent
  4303.      * @author DoubleX
  4304.      * @since v1.00a
  4305.      * @version v1.00a
  4306.      */
  4307.     _SH._onCancelChangeSlot = function() {
  4308.         _SH._closeListWindow.call(this, this.skillHotkeys._listWindow);
  4309.         this.commandSkill();
  4310.     }; // _SH._onCancelChangeSlot
  4311.  
  4312.     /**
  4313.      * The this pointer is Scene_Skill.prototype
  4314.      * Idempotent
  4315.      * @author DoubleX
  4316.      * @param {Window_SkillHotkeyList} listWindow - The hotkey list window
  4317.      * @since v1.00a
  4318.      * @version v1.00a
  4319.      */
  4320.     _SH._closeListWindow = function(listWindow) {
  4321.         listWindow.deactivate();
  4322.         listWindow.deselect();
  4323.         listWindow.hide();
  4324.     }; // _SH._closeListWindow
  4325.  
  4326. })(DoubleX_RMMV.Skill_Hotkeys);
  4327.  
  4328. /*----------------------------------------------------------------------------
  4329.  *    # Edit class: Scene_Battle                                              
  4330.  *      - Lets players use the bound skill hotkeys for actors in battle      
  4331.  *----------------------------------------------------------------------------*/
  4332.  
  4333. (function(SH) {
  4334.  
  4335.     "use strict";
  4336.  
  4337.     SH.Scene_Battle = { orig: {}, new: {} };
  4338.     var _SB = SH.Scene_Battle.orig, $ = Scene_Battle.prototype;
  4339.     var _SH = SH.Scene_Battle.new;
  4340.  
  4341.     /*------------------------------------------------------------------------
  4342.      *    New public instance variable                                        
  4343.      *------------------------------------------------------------------------*/
  4344.     // {Object}skillHotkeys: The container of all other new variables
  4345.  
  4346.     /*------------------------------------------------------------------------
  4347.      *    New private instance variable                                      
  4348.      *------------------------------------------------------------------------*/
  4349.     // {Window_BattleSkillHotkeys}_hotkeyWindow: The hotkey slot command window
  4350.  
  4351.     _SB.stop = $.stop;
  4352.     $.stop = function() { // v1.00a - v1.00a; Extended
  4353.         _SB.stop.apply(this, arguments);
  4354.         // Added to close the hotkey window when closing actor command window
  4355.         _SH._closeHotkeyWindow.call(this);
  4356.         //
  4357.     }; // $.stop
  4358.  
  4359.     _SB.updateStatusWindow = $.updateStatusWindow;
  4360.     $.updateStatusWindow = function() { // v1.00a - v1.00a; Extended
  4361.         _SB.updateStatusWindow.apply(this, arguments);
  4362.         // Added to close the hotkey window when closing actor command window
  4363.         if ($gameMessage.isBusy()) _SH._closeHotkeyWindow.call(this);
  4364.         //
  4365.     }; // $.updateStatusWindow
  4366.  
  4367.     _SB.startPartyCommandSelection = $.startPartyCommandSelection;
  4368.     $.startPartyCommandSelection = function() { // v1.00a - v1.00a; Extended
  4369.         _SB.startPartyCommandSelection.apply(this, arguments);
  4370.         // Added to close the hotkey window when closing actor command window
  4371.         _SH._closeHotkeyWindow.call(this);
  4372.         //
  4373.     }; // $.startPartyCommandSelection
  4374.  
  4375.     _SB.startActorCommandSelection = $.startActorCommandSelection;
  4376.     $.startActorCommandSelection = function() { // v1.00a - v1.00a; Extended
  4377.         _SB.startActorCommandSelection.apply(this, arguments);
  4378.         // Added to add the actor skill hotkey handlers
  4379.         _SH._startActorCommandSelection.call(this);
  4380.         //
  4381.     }; // $.startActorCommandSelection
  4382.  
  4383.     _SB.onActorCancel = $.onActorCancel;
  4384.     $.onActorCancel = function() { // v1.00a - v1.00a; Extended
  4385.         _SB.onActorCancel.apply(this, arguments);
  4386.         // Added to go straight back to the actor command window for hotkeys
  4387.         _SH._onHotkeyCancel.call(this);
  4388.         //
  4389.     }; // $.onActorCancel
  4390.  
  4391.     _SB.onEnemyCancel = $.onEnemyCancel;
  4392.     $.onEnemyCancel = function() { // v1.00a - v1.00a; Extended
  4393.         _SB.onEnemyCancel.apply(this, arguments);
  4394.         // Added to go straight back to the actor command window for hotkeys
  4395.         _SH._onHotkeyCancel.call(this);
  4396.         //
  4397.     }; // $.onEnemyCancel
  4398.  
  4399.     _SB.endCommandSelection = $.endCommandSelection;
  4400.     $.endCommandSelection = function() { // v1.00a - v1.00a; Extended
  4401.         _SB.endCommandSelection.apply(this, arguments);
  4402.         // Added to close the hotkey window when closing actor command window
  4403.         _SH._closeHotkeyWindow.call(this);
  4404.         //
  4405.     }; // $.endCommandSelection
  4406.  
  4407.     /**
  4408.      * The this pointer is Scene_Battle.prototype
  4409.      * Idempotent
  4410.      * @author DoubleX
  4411.      * @since v1.00a
  4412.      * @todo: Removes the performance penalty without sacrificing code qualities
  4413.      * @version v1.00a
  4414.      */
  4415.     _SH._startActorCommandSelection = function() {
  4416.         // Creating the hotkey window on the fly's clean but costs performance
  4417.         _SH._onCreateHotkeyWindow.call(this);
  4418.         //
  4419.         _SH._setHotkeyHandlers.call(this);
  4420.     }; // _SH._startActorCommandSelection
  4421.  
  4422.     /**
  4423.      * The this pointer is Scene_Battle.prototype
  4424.      * Idempotent
  4425.      * @author DoubleX
  4426.      * @since v1.00a
  4427.      * @version v1.00a
  4428.      */
  4429.     _SH._onCreateHotkeyWindow = function() {
  4430.         var actor = BattleManager.actor();
  4431.         if (!SH.params.isEnabled.call(actor)) return;
  4432.         _SH._createHotkeyWindow.call(this, actor);
  4433.     }; //  _SH._onCreateHotkeyWindow
  4434.  
  4435.     /**
  4436.      * The this pointer is Scene_Battle.prototype
  4437.      * Idempotent
  4438.      * @author DoubleX
  4439.      * @param {Game_Actor} actor - The actor involved
  4440.      * @since v1.00a
  4441.      * @version v1.00a
  4442.      */
  4443.     _SH._createHotkeyWindow = function(actor) {
  4444.         // Otherwise the old hotkey command list window would be leaked
  4445.         if (_SH._hasHotkeyWindow.call(this)) {
  4446.             this._windowLayer.removeChild(this.skillHotkeys._hotkeyWindow);
  4447.         }
  4448.         //
  4449.         this.skillHotkeys = this.skillHotkeys || {};
  4450.         this.skillHotkeys._hotkeyWindow = _SH._hotkeyWindow.call(this, actor);
  4451.         this.addWindow(this.skillHotkeys._hotkeyWindow);
  4452.     }; // _SH._createHotkeyWindow
  4453.  
  4454.     /**
  4455.      * The this pointer is Scene_Battle.prototype
  4456.      * Nullipotent
  4457.      * @author DoubleX
  4458.      * @param {Game_Actor} actor - The actor involved
  4459.      * @returns {Window_BattleSkillHotkeys} The requested hotkey window
  4460.      * @since v1.00a
  4461.      * @version v1.00a
  4462.      */
  4463.     _SH._hotkeyWindow = function(actor) {
  4464.         var hotkeyWindow = new Window_BattleSkillHotkeys(
  4465.                 actor, this._actorCommandWindow.onUseSkillHotkey.bind(
  4466.                 this._actorCommandWindow));
  4467.         hotkeyWindow.refresh();
  4468.         hotkeyWindow.show();
  4469.         // This window's only for showing the list of available hotkey commands
  4470.         hotkeyWindow.deactivate();
  4471.         hotkeyWindow.deselect();
  4472.         //
  4473.         return hotkeyWindow;
  4474.     }; // _SH._hotkeyWindow
  4475.  
  4476.     /**
  4477.      * The this pointer is Scene_Battle.prototype
  4478.      * Idempotent
  4479.      * @author DoubleX
  4480.      * @since v1.00a
  4481.      * @todo: Caching BattleManager.actor without sacrificing code qualities
  4482.      * @version v1.00a
  4483.      */
  4484.     _SH._setHotkeyHandlers = function() {
  4485.         // Caching BattleManager.actor here would lead to even more boilerplates
  4486.         _SH._hotkeyList.call(this, BattleManager.actor()).forEach(
  4487.                 _SH._setHotkeyHandler, this);
  4488.         //
  4489.     }; // _SH._setHotkeyHandlers
  4490.  
  4491.     /**
  4492.      * The this pointer is Scene_Battle.prototype
  4493.      * Idempotent
  4494.      * @author DoubleX
  4495.      * @param {String} hotkey - The symbol of the hotkey involved
  4496.      * @since v1.00a
  4497.      * @version v1.00a
  4498.      */
  4499.     _SH._setHotkeyHandler = function(hotkey) {
  4500.         this._actorCommandWindow.setHandler(hotkey,
  4501.                 _SH._onUseHotkeyFunc(hotkey, BattleManager.actor()).bind(this));
  4502.     }; // _SH._setHotkeyHandler
  4503.  
  4504.     /**
  4505.      * The this pointer is Scene_Battle.prototype
  4506.      * Pure function
  4507.      * @author DoubleX
  4508.      * @param {String} hotkey - The symbol of the hotkey involved
  4509.      * @param {Game_Actor} actor - The actor involved
  4510.      * @returns {Function()} The function handling the used hotkey
  4511.      * @since v1.00a
  4512.      * @version v1.00a
  4513.      */
  4514.     _SH._onUseHotkeyFunc = function(hotkey, actor) {
  4515.         return function() { _SH._onUseHotkey.call(this, hotkey, actor); };
  4516.     }; // _SH._onUseHotkeyFunc
  4517.  
  4518.     /**
  4519.      * The this pointer is Scene_Battle.prototype
  4520.      * Idempotent
  4521.      * @author DoubleX
  4522.      * @param {String} hotkey - The symbol of the hotkey involved
  4523.      * @param {Game_Actor} actor - The actor involved
  4524.      * @since v1.00a
  4525.      * @version v1.00a
  4526.      */
  4527.     _SH._onUseHotkey = function(hotkey, actor) {
  4528.         if (_SH._hasHotkeyWindow.call(this)) {
  4529.             this.skillHotkeys._hotkeyWindow.select(
  4530.                     _SH._hotkeyIndex.call(this, hotkey, actor));
  4531.         }
  4532.         // Otherwise it'd be cancelled instead of triggering on target cancel
  4533.         this._actorCommandWindow.deactivate();
  4534.         //
  4535.         // Otherwise the skill window wouldn't know which actor's using it
  4536.         this._skillWindow.setActor(actor);
  4537.         //
  4538.         this._skillWindow.selectHotkeySkill(hotkey);
  4539.         // Otherwise the target selection window won't have time to refresh
  4540.         setTimeout(this.onSkillOk.bind(this));
  4541.         //
  4542.     }; // _SH._onUseHotkey
  4543.  
  4544.     /**
  4545.      * The this pointer is Scene_Battle.prototype
  4546.      * Nullipotent
  4547.      * @author DoubleX
  4548.      * @param {String} hotkey - The symbol of the hotkey involved
  4549.      * @param {Game_Actor} actor - The actor involved
  4550.      * @returns {Number} The requested hotkey window selection index
  4551.      * @since v1.00a
  4552.      * @version v1.00a
  4553.      */
  4554.     _SH._hotkeyIndex = function(hotkey, actor) {
  4555.         return _SH._hotkeyList.call(this, actor).indexOf(hotkey);
  4556.     }; // _SH._hotkeyIndex
  4557.  
  4558.     /**
  4559.      * The this pointer is Scene_Battle.prototype
  4560.      * Idempotent
  4561.      * @author DoubleX
  4562.      * @since v1.00a
  4563.      * @version v1.00a
  4564.      */
  4565.     _SH._onHotkeyCancel = function() {
  4566.         if (_SH._isHoykeyCancel.call(this)) this._actorCommandWindow.activate();
  4567.     }; // _SH._onHotkeyCancel
  4568.  
  4569.     /**
  4570.      * The this pointer is Scene_Battle.prototype
  4571.      * Nullipotent
  4572.      * @author DoubleX
  4573.      * @returns {Boolean} The check result
  4574.      * @since v1.00a
  4575.      * @version v1.00a
  4576.      */
  4577.     _SH._isHoykeyCancel = function() {
  4578.         return _SH._hotkeyList.call(this, BattleManager.actor()).indexOf(
  4579.                 this._actorCommandWindow.currentSymbol()) >= 0;
  4580.     }; // _SH._isHoykeyCancel
  4581.  
  4582.     /**
  4583.      * The this pointer is Scene_Battle.prototype
  4584.      * Nullipotent
  4585.      * @author DoubleX
  4586.      * @param {Game_Actor} actor - The actor involved
  4587.      * @returns {Array[String]} Ther requested list of hotkey symbols
  4588.      * @since v1.00a
  4589.      * @version v1.00a
  4590.      */
  4591.     _SH._hotkeyList = function(actor) {
  4592.         return Object.keys(SH.cfgs.hotkeyNames.call(actor));
  4593.     }; // _SH._hotkeyList
  4594.  
  4595.     /**
  4596.      * The this pointer is Scene_Battle.prototype
  4597.      * Idempotent
  4598.      * @author DoubleX
  4599.      * @since v1.00a
  4600.      * @version v1.00a
  4601.      */
  4602.     _SH._closeHotkeyWindow = function() {
  4603.         // Variable integrity check must always stick to the variable actions
  4604.         if (!_SH._hasHotkeyWindow.call(this)) return;
  4605.         this.skillHotkeys._hotkeyWindow.hide();
  4606.         this.skillHotkeys._hotkeyWindow.deselect();
  4607.         //
  4608.     }; // _SH._closeHotkeyWindow
  4609.  
  4610.     /**
  4611.      * The this pointer is Scene_Battle.prototype
  4612.      * Nullipotent
  4613.      * @author DoubleX
  4614.      * @returns {Boolean} The check result
  4615.      * @since v1.00a
  4616.      * @version v1.00a
  4617.      */
  4618.     _SH._hasHotkeyWindow = function() {
  4619.         return this.skillHotkeys && this.skillHotkeys._hotkeyWindow;
  4620.     }; // _SH._hasHotkeyWindow
  4621.  
  4622. })(DoubleX_RMMV.Skill_Hotkeys);
  4623.  
  4624. /*============================================================================*/
RAW Paste Data
Pastebin PRO Summer Special!
Get 60% OFF on Pastebin PRO accounts!
Top