DoubleX RMMZ Skill Item Triggers

Purpose
Lets you run some codes set by your notetags on some action execution cases

Introduction
1. This plugin lets you use notetags to set what happens when an action's just executed, and different cases like miss, evade, counter attack, magic reflection, critical hit, normal execution, substitute, right before starting to execute actions, and right after finished executing the actions, can have different notetags
2. You're expected to write JavaScript codes directly, as there are so much possibilities that most of them are just impossible to be covered by this plugin itself, so this plugin just lets you write JavaScript codes that are executed on some important timings

Video



Games using this plugin
None so far

Parameters
  1.  
  2.  * @param missNotetagDataTypePriorities
  3.  * @type select[]
  4.  * @option Data of the actor
  5.  * @value actor
  6.  * @option Data of the current class
  7.  * @value class
  8.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  9.  * @value skills
  10.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  11.  * @value usableSkills
  12.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  13.  * @value items
  14.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  15.  * @value usableItems
  16.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  17.  * @value latestSkillItem
  18.  * @option Data of equipped weapons
  19.  * @value weapons
  20.  * @option Data of equipped armors
  21.  * @value armors
  22.  * @option Data of the enemy
  23.  * @value enemy
  24.  * @option Data of effective states
  25.  * @value states
  26.  * @desc Sets data type priorities of the miss notetags
  27.  * You can use script calls/plugin commands to change this
  28.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  29.  *
  30.  * @param evaNotetagDataTypePriorities
  31.  * @type select[]
  32.  * @option Data of the actor
  33.  * @value actor
  34.  * @option Data of the current class
  35.  * @value class
  36.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  37.  * @value skills
  38.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  39.  * @value usableSkills
  40.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  41.  * @value items
  42.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  43.  * @value usableItems
  44.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  45.  * @value latestSkillItem
  46.  * @option Data of equipped weapons
  47.  * @value weapons
  48.  * @option Data of equipped armors
  49.  * @value armors
  50.  * @option Data of the enemy
  51.  * @value enemy
  52.  * @option Data of effective states
  53.  * @value states
  54.  * @desc Sets data type priorities of the eva notetags
  55.  * You can use script calls/plugin commands to change this
  56.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  57.  *
  58.  * @param cntNotetagDataTypePriorities
  59.  * @type select[]
  60.  * @option Data of the actor
  61.  * @value actor
  62.  * @option Data of the current class
  63.  * @value class
  64.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  65.  * @value skills
  66.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  67.  * @value usableSkills
  68.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  69.  * @value items
  70.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  71.  * @value usableItems
  72.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  73.  * @value latestSkillItem
  74.  * @option Data of equipped weapons
  75.  * @value weapons
  76.  * @option Data of equipped armors
  77.  * @value armors
  78.  * @option Data of the enemy
  79.  * @value enemy
  80.  * @option Data of effective states
  81.  * @value states
  82.  * @desc Sets data type priorities of the cnt notetags
  83.  * You can use script calls/plugin commands to change this
  84.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  85.  *
  86.  * @param mrfNotetagDataTypePriorities
  87.  * @type select[]
  88.  * @option Data of the actor
  89.  * @value actor
  90.  * @option Data of the current class
  91.  * @value class
  92.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  93.  * @value skills
  94.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  95.  * @value usableSkills
  96.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  97.  * @value items
  98.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  99.  * @value usableItems
  100.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  101.  * @value latestSkillItem
  102.  * @option Data of equipped weapons
  103.  * @value weapons
  104.  * @option Data of equipped armors
  105.  * @value armors
  106.  * @option Data of the enemy
  107.  * @value enemy
  108.  * @option Data of effective states
  109.  * @value states
  110.  * @desc Sets data type priorities of the mrf notetags
  111.  * You can use script calls/plugin commands to change this
  112.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  113.  *
  114.  * @param criNotetagDataTypePriorities
  115.  * @type select[]
  116.  * @option Data of the actor
  117.  * @value actor
  118.  * @option Data of the current class
  119.  * @value class
  120.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  121.  * @value skills
  122.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  123.  * @value usableSkills
  124.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  125.  * @value items
  126.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  127.  * @value usableItems
  128.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  129.  * @value latestSkillItem
  130.  * @option Data of equipped weapons
  131.  * @value weapons
  132.  * @option Data of equipped armors
  133.  * @value armors
  134.  * @option Data of the enemy
  135.  * @value enemy
  136.  * @option Data of effective states
  137.  * @value states
  138.  * @desc Sets data type priorities of the cri notetags
  139.  * You can use script calls/plugin commands to change this
  140.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  141.  *
  142.  * @param normNotetagDataTypePriorities
  143.  * @type select[]
  144.  * @option Data of the actor
  145.  * @value actor
  146.  * @option Data of the current class
  147.  * @value class
  148.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  149.  * @value skills
  150.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  151.  * @value usableSkills
  152.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  153.  * @value items
  154.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  155.  * @value usableItems
  156.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  157.  * @value latestSkillItem
  158.  * @option Data of equipped weapons
  159.  * @value weapons
  160.  * @option Data of equipped armors
  161.  * @value armors
  162.  * @option Data of the enemy
  163.  * @value enemy
  164.  * @option Data of effective states
  165.  * @value states
  166.  * @desc Sets data type priorities of the norm notetags
  167.  * You can use script calls/plugin commands to change this
  168.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  169.  *
  170.  * @param substituteNotetagDataTypePriorities
  171.  * @type select[]
  172.  * @option Data of the actor
  173.  * @value actor
  174.  * @option Data of the current class
  175.  * @value class
  176.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  177.  * @value skills
  178.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  179.  * @value usableSkills
  180.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  181.  * @value items
  182.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  183.  * @value usableItems
  184.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  185.  * @value latestSkillItem
  186.  * @option Data of equipped weapons
  187.  * @value weapons
  188.  * @option Data of equipped armors
  189.  * @value armors
  190.  * @option Data of the enemy
  191.  * @value enemy
  192.  * @option Data of effective states
  193.  * @value states
  194.  * @desc Sets data type priorities of the substitute notetags
  195.  * You can use script calls/plugin commands to change this
  196.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  197.  *
  198.  * @param preNotetagDataTypePriorities
  199.  * @type select[]
  200.  * @option Data of the actor
  201.  * @value actor
  202.  * @option Data of the current class
  203.  * @value class
  204.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  205.  * @value skills
  206.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  207.  * @value usableSkills
  208.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  209.  * @value items
  210.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  211.  * @value usableItems
  212.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  213.  * @value latestSkillItem
  214.  * @option Data of equipped weapons
  215.  * @value weapons
  216.  * @option Data of equipped armors
  217.  * @value armors
  218.  * @option Data of the enemy
  219.  * @value enemy
  220.  * @option Data of effective states
  221.  * @value states
  222.  * @desc Sets data type priorities of the pre notetags
  223.  * You can use script calls/plugin commands to change this
  224.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  225.  *
  226.  * @param postNotetagDataTypePriorities
  227.  * @type select[]
  228.  * @option Data of the actor
  229.  * @value actor
  230.  * @option Data of the current class
  231.  * @value class
  232.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  233.  * @value skills
  234.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  235.  * @value usableSkills
  236.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  237.  * @value items
  238.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  239.  * @value usableItems
  240.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  241.  * @value latestSkillItem
  242.  * @option Data of equipped weapons
  243.  * @value weapons
  244.  * @option Data of equipped armors
  245.  * @value armors
  246.  * @option Data of the enemy
  247.  * @value enemy
  248.  * @option Data of effective states
  249.  * @value states
  250.  * @desc Sets data type priorities of the post notetags
  251.  * You can use script calls/plugin commands to change this
  252.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  253.  *
  254.  * @param subjectMissNotetagDataTypePriorities
  255.  * @type select[]
  256.  * @option Data of the actor
  257.  * @value actor
  258.  * @option Data of the current class
  259.  * @value class
  260.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  261.  * @value skills
  262.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  263.  * @value usableSkills
  264.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  265.  * @value items
  266.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  267.  * @value usableItems
  268.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  269.  * @value latestSkillItem
  270.  * @option Data of equipped weapons
  271.  * @value weapons
  272.  * @option Data of equipped armors
  273.  * @value armors
  274.  * @option Data of the enemy
  275.  * @value enemy
  276.  * @option Data of effective states
  277.  * @value states
  278.  * @desc Sets data type priorities of the subjectMiss notetags
  279.  * You can use script calls/plugin commands to change this
  280.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  281.  *
  282.  * @param subjectEvaNotetagDataTypePriorities
  283.  * @type select[]
  284.  * @option Data of the actor
  285.  * @value actor
  286.  * @option Data of the current class
  287.  * @value class
  288.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  289.  * @value skills
  290.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  291.  * @value usableSkills
  292.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  293.  * @value items
  294.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  295.  * @value usableItems
  296.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  297.  * @value latestSkillItem
  298.  * @option Data of equipped weapons
  299.  * @value weapons
  300.  * @option Data of equipped armors
  301.  * @value armors
  302.  * @option Data of the enemy
  303.  * @value enemy
  304.  * @option Data of effective states
  305.  * @value states
  306.  * @desc Sets data type priorities of the subjectEva notetags
  307.  * You can use script calls/plugin commands to change this
  308.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  309.  *
  310.  * @param subjectCntNotetagDataTypePriorities
  311.  * @type select[]
  312.  * @option Data of the actor
  313.  * @value actor
  314.  * @option Data of the current class
  315.  * @value class
  316.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  317.  * @value skills
  318.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  319.  * @value usableSkills
  320.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  321.  * @value items
  322.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  323.  * @value usableItems
  324.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  325.  * @value latestSkillItem
  326.  * @option Data of equipped weapons
  327.  * @value weapons
  328.  * @option Data of equipped armors
  329.  * @value armors
  330.  * @option Data of the enemy
  331.  * @value enemy
  332.  * @option Data of effective states
  333.  * @value states
  334.  * @desc Sets data type priorities of the subjectCnt notetags
  335.  * You can use script calls/plugin commands to change this
  336.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  337.  *
  338.  * @param subjectMrfNotetagDataTypePriorities
  339.  * @type select[]
  340.  * @option Data of the actor
  341.  * @value actor
  342.  * @option Data of the current class
  343.  * @value class
  344.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  345.  * @value skills
  346.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  347.  * @value usableSkills
  348.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  349.  * @value items
  350.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  351.  * @value usableItems
  352.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  353.  * @value latestSkillItem
  354.  * @option Data of equipped weapons
  355.  * @value weapons
  356.  * @option Data of equipped armors
  357.  * @value armors
  358.  * @option Data of the enemy
  359.  * @value enemy
  360.  * @option Data of effective states
  361.  * @value states
  362.  * @desc Sets data type priorities of the subjectMrf notetags
  363.  * You can use script calls/plugin commands to change this
  364.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  365.  *
  366.  * @param subjectCriNotetagDataTypePriorities
  367.  * @type select[]
  368.  * @option Data of the actor
  369.  * @value actor
  370.  * @option Data of the current class
  371.  * @value class
  372.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  373.  * @value skills
  374.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  375.  * @value usableSkills
  376.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  377.  * @value items
  378.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  379.  * @value usableItems
  380.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  381.  * @value latestSkillItem
  382.  * @option Data of equipped weapons
  383.  * @value weapons
  384.  * @option Data of equipped armors
  385.  * @value armors
  386.  * @option Data of the enemy
  387.  * @value enemy
  388.  * @option Data of effective states
  389.  * @value states
  390.  * @desc Sets data type priorities of the subjectCri notetags
  391.  * You can use script calls/plugin commands to change this
  392.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  393.  *
  394.  * @param subjectNormNotetagDataTypePriorities
  395.  * @type select[]
  396.  * @option Data of the actor
  397.  * @value actor
  398.  * @option Data of the current class
  399.  * @value class
  400.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  401.  * @value skills
  402.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  403.  * @value usableSkills
  404.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  405.  * @value items
  406.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  407.  * @value usableItems
  408.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  409.  * @value latestSkillItem
  410.  * @option Data of equipped weapons
  411.  * @value weapons
  412.  * @option Data of equipped armors
  413.  * @value armors
  414.  * @option Data of the enemy
  415.  * @value enemy
  416.  * @option Data of effective states
  417.  * @value states
  418.  * @desc Sets data type priorities of the subjectNorm notetags
  419.  * You can use script calls/plugin commands to change this
  420.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  421.  *
  422.  * @param subjectSubstituteNotetagDataTypePriorities
  423.  * @type select[]
  424.  * @option Data of the actor
  425.  * @value actor
  426.  * @option Data of the current class
  427.  * @value class
  428.  * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
  429.  * @value skills
  430.  * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
  431.  * @value usableSkills
  432.  * @option Data of possessed items(Shouldn't be used with Data of usable items)
  433.  * @value items
  434.  * @option Data of usable items(Shouldn't be used with Data of possessed items)
  435.  * @value usableItems
  436.  * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
  437.  * @value latestSkillItem
  438.  * @option Data of equipped weapons
  439.  * @value weapons
  440.  * @option Data of equipped armors
  441.  * @value armors
  442.  * @option Data of the enemy
  443.  * @value enemy
  444.  * @option Data of effective states
  445.  * @value states
  446.  * @desc Sets data type priorities of subjectSubstitute notetags
  447.  * You can use script calls/plugin commands to change this
  448.  * @default ["actor", "class", "latestSkillItem", "weapons", "armors", "enemy", "states"]
  449.  
Expand to see the code.


Notetags
  1.  
  2.  *    ## Notetag Info
  3.  *       1. Among all the same notetag types in the same data, all can be
  4.  *          effective
  5.  *       2. Each line can only have at most 1 notetag
  6.  *       3. The following is the structure of all notetags in this plugin:
  7.  *          - <doublex rmmz skill item triggers>
  8.  *          - <skill item triggers>
  9.  *          Where contents are in the form of type suffixes: entries
  10.  *          Either of the above can be used, but the 1st one reduce the chance
  11.  *          of causing other plugins to treat the notetags of this plugin as
  12.  *          theirs, while the 2nd one is more user-friendly
  13.  *          - type is one of the following:
  14.  *            1. miss
  15.  *            2. eva
  16.  *            3. cnt
  17.  *            4. mrf
  18.  *            5. cri
  19.  *            6. norm
  20.  *            7. substitute
  21.  *            8. pre
  22.  *            9. post
  23.  *          - suffixes is the list of suffixes in the form of:
  24.  *            suffix1 suffix2 suffix3 ... suffixn
  25.  *            Where each suffix is either of the following:
  26.  *            val(The notetag value will be used as-is)
  27.  *            switch(The value of the game switch with id as the notetag value
  28.  *                   will be used)
  29.  *            event(The common event with id as the notetag value will be
  30.  *                  reserved)
  31.  *            (Advanced)script(The value of the game variable with id as the
  32.  *                            notetag value will be used as the contents of
  33.  *                            the functions to be called upon using the
  34.  *                            notetag)
  35.  *          - The this pointer of the script suffix is different for different
  36.  *            notetag types
  37.  *          - entries is the list of entries in the form of:
  38.  *            entry1, entry2, entry3, ..., entryn
  39.  *            Where entryi must conform with the suffixi specifications
  40.  *----------------------------------------------------------------------------
  41.  *    # Actor/Class/Learnt Skills/Usable Skills/Posessed Items/Usable Items/
  42.  *      Inputted Skill Or Item/Weapon/Armor/Enemy/States/This State Notetags
  43.  *      1. miss condSuffix eventSuffix: condEntry, eventEntry
  44.  *         - Triggers what specified in eventEntry when the action involved
  45.  *           just missed the target involved if condEntry returns a truthy
  46.  *           result
  47.  *         - condSuffix can be val, switch or script
  48.  *         - eventEntry can be event or script
  49.  *         - The result of condEntry can be anything as only whether it's
  50.  *           truthy matters
  51.  *         - If the result of condEntry is falsy, this notetag will be
  52.  *           discarded upon such use cases
  53.  *         - The result of eventEntry can be anything as it's supposed to run
  54.  *           commands instead of returning results
  55.  *         - The miss skill/item trigger also applies counter attack, but with
  56.  *           the target involved being that being hit by the counter attack
  57.  *         - The miss skill/item trigger also applies to magic reflection, but
  58.  *           with the target involved being the action execution subject
  59.  *           instead
  60.  *         - (Advanced)The this pointer of the script suffix is the target
  61.  *           involved
  62.  *         - E.g.:
  63.  *           <skill item triggers miss switch event: 1, 2> will reserve the
  64.  *           common event with id 2 when the action involved just missed the
  65.  *           target if the game switch with id 1 is on
  66.  *      2. eva condSuffix eventSuffix: condEntry, eventEntry
  67.  *         - Triggers what specified in eventEntry when the action involved is
  68.  *           just evaded by the target involved if condEntry returns a truthy
  69.  *           result
  70.  *         - condSuffix can be val, switch or script
  71.  *         - eventEntry can be event or script
  72.  *         - The result of condEntry can be anything as only whether it's
  73.  *           truthy matters
  74.  *         - If the result of condEntry is falsy, this notetag will be
  75.  *           discarded upon such use cases
  76.  *         - The result of eventEntry can be anything as it's supposed to run
  77.  *           commands instead of returning results
  78.  *         - The eva skill/item trigger also applies counter attack, but with
  79.  *           the target involved being that being hit by the counter attack
  80.  *         - The eva skill/item trigger also applies to magic reflection, but
  81.  *           with the target involved being the action execution subject
  82.  *         - (Advanced)The this pointer of the script suffix is the target
  83.  *           involved
  84.  *         - E.g.:
  85.  *           <skill item triggers eva val script&#058; true, 3> will always run the
  86.  *           JavaScript codes stored as a string in variable with id 3 when
  87.  *           the action involved is just evaded by the target involved
  88.  *      3. cnt condSuffix eventSuffix: condEntry, eventEntry
  89.  *         - Triggers what specified in eventEntry when the action involved is
  90.  *           just countered by the attack of the target involved if condEntry
  91.  *           returns a truthy result
  92.  *         - condSuffix can be val, switch or script
  93.  *         - eventEntry can be event or script
  94.  *         - The result of condEntry can be anything as only whether it's
  95.  *           truthy matters
  96.  *         - If the result of condEntry is falsy, this notetag will be
  97.  *           discarded upon such use cases
  98.  *         - The result of eventEntry can be anything as it's supposed to run
  99.  *           commands instead of returning results
  100.  *         - (Advanced)The this pointer of the script suffix is the target
  101.  *           involved
  102.  *         - E.g.:
  103.  *           <skill item triggers cnt switch event: 1, 2> will reserve the
  104.  *           common event with id 2 when the action involved is just countered
  105.  *           by the attack of the target involved if the game switch with id 1
  106.  *           is on
  107.  *      4. mrf condSuffix eventSuffix: condEntry, eventEntry
  108.  *         - Triggers what specified in eventEntry when the action involved is
  109.  *           just reflected by the target involved if condEntry returns a
  110.  *           truthy result
  111.  *         - condSuffix can be val, switch or script
  112.  *         - eventEntry can be event or script
  113.  *         - The result of condEntry can be anything as only whether it's
  114.  *           truthy matters
  115.  *         - If the result of condEntry is falsy, this notetag will be
  116.  *           discarded upon such use cases
  117.  *         - The result of eventEntry can be anything as it's supposed to run
  118.  *           commands instead of returning results
  119.  *         - (Advanced)The this pointer of the script suffix is the target
  120.  *           involved
  121.  *         - E.g.:
  122.  *           <skill item triggers mrf val script&#058; true, 3> will always run the
  123.  *           JavaScript codes stored as a string in variable with id 3 when
  124.  *           the action involved is just reflected by the target involved
  125.  *      5. cri condSuffix eventSuffix: condEntry, eventEntry
  126.  *         - Triggers what specified in eventEntry when the action involved
  127.  *           just critically hit the target involved if condEntry returns a
  128.  *           truthy result
  129.  *         - condSuffix can be val, switch or script
  130.  *         - eventEntry can be event or script
  131.  *         - The result of condEntry can be anything as only whether it's
  132.  *           truthy matters
  133.  *         - If the result of condEntry is falsy, this notetag will be
  134.  *           discarded upon such use cases
  135.  *         - The result of eventEntry can be anything as it's supposed to run
  136.  *           commands instead of returning results
  137.  *         - The cri skill/item trigger also applies counter attack, but with
  138.  *           the target involved being that being hit by the counter attack
  139.  *         - The cri skill/item trigger also applies to magic reflection, but
  140.  *           with the target involved being the action execution subject
  141.  *         - (Advanced)The this pointer of the script suffix is the target
  142.  *           involved
  143.  *         - E.g.:
  144.  *           <skill item triggers cri switch event: 1, 2> will reserve the
  145.  *           common event with id 2 when the action involved just critically
  146.  *           hit the target involved if the game switch with id 1 is on
  147.  *      6. norm condSuffix eventSuffix: condEntry, eventEntry
  148.  *         - Triggers what specified in eventEntry when the action involved is
  149.  *           just executed normally on the target involved if condEntry
  150.  *           returns a truthy result
  151.  *         - condSuffix can be val, switch or script
  152.  *         - eventEntry can be event or script
  153.  *         - The result of condEntry can be anything as only whether it's
  154.  *           truthy matters
  155.  *         - If the result of condEntry is falsy, this notetag will be
  156.  *           discarded upon such use cases
  157.  *         - The result of eventEntry can be anything as it's supposed to run
  158.  *           commands instead of returning results
  159.  *         - The norm skill/item trigger also applies counter attack, but with
  160.  *           the target involved being that being hit by the counter attack
  161.  *         - The norm skill/item trigger also applies to magic reflection, but
  162.  *           with the target involved being the action execution subject
  163.  *         - (Advanced)The this pointer of the script suffix is the target
  164.  *           involved
  165.  *         - E.g.:
  166.  *           <skill item triggers norm val script&#058; true, 3> will always run
  167.  *           the JavaScript codes stored as a string in variable with id 3
  168.  *           when the action involved is just executed normally on the target
  169.  *           involved
  170.  *      7. substitute condSuffix eventSuffix: condEntry, eventEntry
  171.  *         - Triggers what specified in eventEntry when the action involved
  172.  *           just hit the substitute instead of the original target involved
  173.  *           if condEntry returns a truthy result
  174.  *         - condSuffix can be val, switch or script
  175.  *         - eventEntry can be event or script
  176.  *         - The result of condEntry can be anything as only whether it's
  177.  *           truthy matters
  178.  *         - If the result of condEntry is falsy, this notetag will be
  179.  *           discarded upon such use cases
  180.  *         - The result of eventEntry can be anything as it's supposed to run
  181.  *           commands instead of returning results
  182.  *         - (Advanced)The this pointer of the script suffix is the substitute
  183.  *           target involved but not the original target involved
  184.  *         - E.g.:
  185.  *           <skill item triggers substitute switch event: 1, 2> will reserve
  186.  *           the common event with id 2 when the action involved just hit the
  187.  *           substitute instead of the original target involved if the game
  188.  *           switch with id 1 is on
  189.  *      8. pre condSuffix eventSuffix: condEntry, eventEntry
  190.  *         - Triggers what specified in eventEntry right before starting to
  191.  *           execute the action involved if condEntry returns a truthy
  192.  *           result
  193.  *         - condSuffix can be val, switch or script
  194.  *         - eventEntry can be event or script
  195.  *         - The result of condEntry can be anything as only whether it's
  196.  *           truthy matters
  197.  *         - If the result of condEntry is falsy, this notetag will be
  198.  *           discarded upon such use cases
  199.  *         - The result of eventEntry can be anything as it's supposed to run
  200.  *           commands instead of returning results
  201.  *         - (Advanced)The this pointer of the script suffix is the action
  202.  *           execution subject involved
  203.  *         - E.g.:
  204.  *           <skill item triggers pre switch event: 1, 2> will reserve the
  205.  *           common event with id 2 before starting to execute the action
  206.  *           involved if the game switch with id 1 is on
  207.  *      9. post condSuffix eventSuffix: condEntry, eventEntry
  208.  *         - Triggers what specified in eventEntry right after finished
  209.  *           executing the action involved if condEntry returns a truthy
  210.  *           result
  211.  *         - condSuffix can be val, switch or script
  212.  *         - eventEntry can be event or script
  213.  *         - The result of condEntry can be anything as only whether it's
  214.  *           truthy matters
  215.  *         - If the result of condEntry is falsy, this notetag will be
  216.  *           discarded upon such use cases
  217.  *         - The result of eventEntry can be anything as it's supposed to run
  218.  *           commands instead of returning results
  219.  *         - (Advanced)The this pointer of the script suffix is the action
  220.  *           execution subject involved
  221.  *         - E.g.:
  222.  *           <skill item triggers post val script&#058; true, 3> will always run
  223.  *           the JavaScript codes stored as a string in variable with id 3
  224.  *           right after finished executing the action involved
  225.  *      (v1.01a+)10. subjectMiss condSuffix eventSuffix: condEntry, eventEntry
  226.  *         - Triggers what specified in eventEntry on the action execution
  227.  *           subject involved when the action involved just missed a target if
  228.  *           condEntry returns a truthy result
  229.  *         - condSuffix can be val, switch or script
  230.  *         - eventEntry can be event or script
  231.  *         - The result of condEntry can be anything as only whether it's
  232.  *           truthy matters
  233.  *         - If the result of condEntry is falsy, this notetag will be
  234.  *           discarded upon such use cases
  235.  *         - The result of eventEntry can be anything as it's supposed to run
  236.  *           commands instead of returning results
  237.  *         - The subjectMiss skill/item trigger also applies to counter
  238.  *           attack, but with the action execution subject involved being that
  239.  *           countering the attack
  240.  *         - The subjectMiss skill/item trigger also applies to magic
  241.  *           reflection, but with the action execution subject involved being
  242.  *           that reflecting the magic
  243.  *         - (Advanced)The this pointer of the script suffix is the action
  244.  *           execution subject involved
  245.  *         - E.g.:
  246.  *           <skill item triggers subjectMiss switch event: 1, 2> will reserve
  247.  *           the common event with id 2 when the action involved executed by
  248.  *           the action execution subject involved just missed a target if the
  249.  *           game switch with id 1 is on
  250.  *      (v1.01a+)11. subjectEva condSuffix eventSuffix: condEntry, eventEntry
  251.  *         - Triggers what specified in eventEntry on the action execution
  252.  *           subject involved when the action involved is just evaded by a
  253.  *           target involved if condEntry returns a truthy result
  254.  *         - condSuffix can be val, switch or script
  255.  *         - eventEntry can be event or script
  256.  *         - The result of condEntry can be anything as only whether it's
  257.  *           truthy matters
  258.  *         - If the result of condEntry is falsy, this notetag will be
  259.  *           discarded upon such use cases
  260.  *         - The result of eventEntry can be anything as it's supposed to run
  261.  *           commands instead of returning results
  262.  *         - The subjectEva skill/item trigger also applies to counter
  263.  *           attack, but with the action execution subject involved being that
  264.  *           countering the attack
  265.  *         - The subjectEva skill/item trigger also applies to magic
  266.  *           reflection, but with the action execution subject involved being
  267.  *           that reflecting the magic
  268.  *         - (Advanced)The this pointer of the script suffix is the action
  269.  *           execution subject involved
  270.  *         - E.g.:
  271.  *           <skill item triggers subjectEva val script&#058; true, 3> will always
  272.  *           run the JavaScript codes stored as a string in variable with id 3
  273.  *           when the action involved executed by the action execution subject
  274.  *           involved is just evaded by a target
  275.  *      (v1.01a+)12. subjectCnt condSuffix eventSuffix: condEntry, eventEntry
  276.  *         - Triggers what specified in eventEntry on the action execution
  277.  *           subject involved when the action involved is just countered by
  278.  *           the attack of a target if condEntry returns a truthy result
  279.  *         - condSuffix can be val, switch or script
  280.  *         - eventEntry can be event or script
  281.  *         - The result of condEntry can be anything as only whether it's
  282.  *           truthy matters
  283.  *         - If the result of condEntry is falsy, this notetag will be
  284.  *           discarded upon such use cases
  285.  *         - The result of eventEntry can be anything as it's supposed to run
  286.  *           commands instead of returning results
  287.  *         - (Advanced)The this pointer of the script suffix is the action
  288.  *           execution subject involved
  289.  *         - E.g.:
  290.  *           <skill item triggers subjectCnt switch event: 1, 2> will reserve
  291.  *           the common event with id 2 when the action involved executed by
  292.  *           the action execution subject involved is just countered by the
  293.  *           attack of a target if the game switch with id 1 is on
  294.  *      (v1.01a+)13. subjectMrf condSuffix eventSuffix: condEntry, eventEntry
  295.  *         - Triggers what specified in eventEntry on the action execution
  296.  *           subject involved when the action involved is just reflected by a
  297.  *           target if condEntry returns a truthy result
  298.  *         - condSuffix can be val, switch or script
  299.  *         - eventEntry can be event or script
  300.  *         - The result of condEntry can be anything as only whether it's
  301.  *           truthy matters
  302.  *         - If the result of condEntry is falsy, this notetag will be
  303.  *           discarded upon such use cases
  304.  *         - The result of eventEntry can be anything as it's supposed to run
  305.  *           commands instead of returning results
  306.  *         - (Advanced)The this pointer of the script suffix is the action
  307.  *           execution subject involved
  308.  *         - E.g.:
  309.  *           <skill item triggers subjectMrf val script&#058; true, 3> will always
  310.  *           run the JavaScript codes stored as a string in variable with id 3
  311.  *           when the action involved executed by the action execution subject
  312.  *           involved is just reflected by a target
  313.  *      (v1.01a+)14. subjectCri condSuffix eventSuffix: condEntry, eventEntry
  314.  *         - Triggers what specified in eventEntry on the action execution
  315.  *           subject involved when the action involved just critically hit a
  316.  *           target if condEntry returns a truthy result
  317.  *         - condSuffix can be val, switch or script
  318.  *         - eventEntry can be event or script
  319.  *         - The result of condEntry can be anything as only whether it's
  320.  *           truthy matters
  321.  *         - If the result of condEntry is falsy, this notetag will be
  322.  *           discarded upon such use cases
  323.  *         - The result of eventEntry can be anything as it's supposed to run
  324.  *           commands instead of returning results
  325.  *         - The subjectCri skill/item trigger also applies to counter
  326.  *           attack, but with the action execution subject involved being that
  327.  *           countering the attack
  328.  *         - The subjectCri skill/item trigger also applies to magic
  329.  *           reflection, but with the action execution subject involved being
  330.  *           that reflecting the magic
  331.  *         - (Advanced)The this pointer of the script suffix is the action
  332.  *           execution subject involved
  333.  *         - E.g.:
  334.  *           <skill item triggers subjectCri switch event: 1, 2> will reserve
  335.  *           the common event with id 2 when the action involved executed by
  336.  *           the action execution subject involved just critically hit a
  337.  *           target if the game switch with id 1 is on
  338.  *      (v1.01a+)15. subjectNorm condSuffix eventSuffix: condEntry, eventEntry
  339.  *         - Triggers what specified in eventEntry on the action execution
  340.  *           subject involved when the action involved is just executed
  341.  *           normally on a target if condEntry returns a truthy result
  342.  *         - condSuffix can be val, switch or script
  343.  *         - eventEntry can be event or script
  344.  *         - The result of condEntry can be anything as only whether it's
  345.  *           truthy matters
  346.  *         - If the result of condEntry is falsy, this notetag will be
  347.  *           discarded upon such use cases
  348.  *         - The result of eventEntry can be anything as it's supposed to run
  349.  *           commands instead of returning results
  350.  *         - The subjectNorm skill/item trigger also applies to counter
  351.  *           attack, but with the action execution subject involved being that
  352.  *           countering the attack
  353.  *         - The subjectNorm skill/item trigger also applies to magic
  354.  *           reflection, but with the action execution subject involved being
  355.  *           that reflecting the magic
  356.  *         - (Advanced)The this pointer of the script suffix is the action
  357.  *           execution subject involved
  358.  *         - E.g.:
  359.  *           <skill item triggers subjectNorm val script&#058; true, 3> will always
  360.  *           run the JavaScript codes stored as a string in variable with id 3
  361.  *           when the action involved executed by the action execution subject
  362.  *           involved is just executed normally on a target
  363.  *      (v1.01a+)16. subjectSubstitute condSuffix eventSuffix: condEntry, eventEntry
  364.  *         - Triggers what specified in eventEntry on the action execution
  365.  *           subject involved when the action involved just hit a substitute
  366.  *           if condEntry returns a truthy result
  367.  *         - condSuffix can be val, switch or script
  368.  *         - eventEntry can be event or script
  369.  *         - The result of condEntry can be anything as only whether it's
  370.  *           truthy matters
  371.  *         - If the result of condEntry is falsy, this notetag will be
  372.  *           discarded upon such use cases
  373.  *         - The result of eventEntry can be anything as it's supposed to run
  374.  *           commands instead of returning results
  375.  *         - (Advanced)The this pointer of the script suffix is the action
  376.  *           execution subject involved
  377.  *         - E.g.:
  378.  *           <skill item triggers subjectSubstitute switch event: 1, 2> will
  379.  *           reserve the common event with id 2 when the action involved
  380.  *           executed by the action execution subject just hit a substitute if
  381.  *           the game switch with id 1 is on
  382.  
Expand to see the code.


Script Calls
  1.  
  2. *    # Parameter manipulations
  3. *      1. $gameSystem.setStateTriggersParam(param, val)
  4. *         - Sets the fully parsed value of the parameter param as val
  5. *         - param must be the name of a valid parameter of this plugin
  6. *         - val must be a valid new fully parsed value of the parameter param
  7. *         - Such parameter value changes will be saved
  8. *         - E.g.:
  9. *           $gameSystem.setStateTriggersParam("addNotetagDataTypePriorities", [
  10. *               "thisState"
  11. *           ]) sets the fully parsed value of the parameter
  12. *           addNotetagDataTypePriorities as ["thisState"]
  13. *      2. $gameSystem.stateTriggersParam(param)
  14. *         - Returns the fully parsed value of the parameter param
  15. *         - param must be the name of a valid parameter of this plugin
  16. *         - E.g.:
  17. *           $gameSystem.setStateTriggersParam("removeNotetagDataTypePriorities")
  18. *           returns the fully parsed value of the parameter
  19. *           removeNotetagDataTypePriorities, which should be
  20. *           ["thisState"] if it uses its default parameter value
  21.  
Expand to see the code.


Plugin Commands
  1.  
  2. * @command setSkillItemTriggersParam
  3. * @desc Applies script call $gameSystem.setSkillItemTriggersParam(param, val)
  4. * @arg param
  5. * @desc The name of a valid parameter of this plugin
  6. * @arg val
  7. * @desc A valid new fully parsed value of the parameter param
  8.  
Expand to see the code.


Prerequisites
Plugins:
1. DoubleX RMMZ Enhanced Codebase
Abilities:
1. Some RMMV plugin development proficiency
(Basic knowledge on what RMMV plugin development does in general with several easy, simple and small plugins written without nontrivial bugs up to 1000 LoC scale but still being inexperienced)

Terms Of Use
  1.  
  2. *      1. Commercial use's always allowed and crediting me's always optional.
  3. *      2. You shall keep this plugin's Plugin Info part's contents intact.
  4. *      3. You shalln't claim that this plugin's written by anyone other than
  5. *         DoubleX or my aliases. I always reserve the right to deny you from
  6. *         using any of my plugins anymore if you've violated this.
  7. *      4. If you repost this plugin directly(rather than just linking back),
  8. *         you shall inform me of these direct repostings. I always reserve
  9. *         the right to request you to edit those direct repostings.
  10. *      5. CC BY 4.0, except those conflicting with any of the above, applies
  11. *         to this plugin, unless you've my permissions not needing follow so.
  12. *      6. I always reserve the right to deny you from using this plugin
  13. *         anymore if you've violated any of the above.
  14.  
Expand to see the code.


Contributors
  1.  
  2. *      Authors:
  3. *      1. DoubleX
  4. *      Plugin Development Collaborators:
  5. *      - None So Far
  6. *      Bug Reporters:
  7. *      - None So Far
  8. *      Compatibility Issue Raisers:
  9. *      - None So Far
  10. *      Feature Requesters:
  11. *      - None So Far
  12.  
Expand to see the code.


Changelog
  1.  
  2.  *      { codebase: "1.1.1", plugin: "v1.01a" }(2020 Dec 26 GMT 1300):
  3.  *      1. Added the following notetag types:
  4.  *         subjectMiss
  5.  *         subjectEva
  6.  *         subjectCnt
  7.  *         subjectMrf
  8.  *         subjectCri
  9.  *         subjectNorm
  10.  *         subjectSubstitute
  11.  *      2. Added the following parameters:
  12.  *         subjectMissNotetagDataTypePriorities
  13.  *         subjectEvaNotetagDataTypePriorities
  14.  *         subjectCntNotetagDataTypePriorities
  15.  *         subjectMrfNotetagDataTypePriorities
  16.  *         subjectCriNotetagDataTypePriorities
  17.  *         subjectNormNotetagDataTypePriorities
  18.  *         subjectSubstituteNotetagDataTypePriorities
  19.  *      3. Fixed the eventEntry of all notetags not correctly accepting all
  20.  *         intended suffixes and rejecting the unintended ones
  21.  *      { codebase: "1.1.0", plugin: "v1.00b" }(2020 Dec 2 GMT 0300):
  22.  *      1. You no longer have to edit the value of
  23.  *         DoubleX_RMMZ.Skill_Item_Triggers.PLUGIN_NAME when changing this
  24.  *         plugin file name
  25. *      { codebase: "1.0.0", plugin: "v1.00a" }(2020 Aug 30 GMT 0900):
  26. *      1. 1st version of this plugin finished
  27.  
Expand to see the code.


Download Link
Demo Link
Updates
Added the Demo Link
Updates
  1. *      { codebase: "1.1.0", plugin: "v1.00b" }(2020 Dec 2 GMT 0300):
  2.  *      1. You no longer have to edit the value of
  3.  *         DoubleX_RMMZ.Skill_Item_Triggers.PLUGIN_NAME when changing this
  4.  *         plugin file name
Expand to see the code.
Updates
  1. *      { codebase: "1.1.1", plugin: "v1.01a" }(2020 Dec 26 GMT 1300):
  2.  *      1. Added the following notetag types:
  3.  *         subjectMiss
  4.  *         subjectEva
  5.  *         subjectCnt
  6.  *         subjectMrf
  7.  *         subjectCri
  8.  *         subjectNorm
  9.  *         subjectSubstitute
  10.  *      2. Added the following parameters:
  11.  *         subjectMissNotetagDataTypePriorities
  12.  *         subjectEvaNotetagDataTypePriorities
  13.  *         subjectCntNotetagDataTypePriorities
  14.  *         subjectMrfNotetagDataTypePriorities
  15.  *         subjectCriNotetagDataTypePriorities
  16.  *         subjectNormNotetagDataTypePriorities
  17.  *         subjectSubstituteNotetagDataTypePriorities
  18.  *      3. Fixed the eventEntry of all notetags not correctly accepting all
  19.  *         intended suffixes and rejecting the unintended ones
Expand to see the code.


The latest version of DoubleX RMMZ Enhanced Codebase is needed as well :)

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=80301