SHARE
TWEET

DoubleX RMMV Skill Hotkeys v101a

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