Double_X

DoubleX RMMV Skill Hotkeys v101b

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