Jump to content
DoubleX

DoubleX RMMZ Skill Item Cooldown

Recommended Posts

Purpose

Lets you set some skills/items to have battler and skill/item cooldowns

 

Introduction

 *    1. This plugins lets you set 2 kinds of skill/item cooldowns:
 *       - Skill/Item cooldown - The number of turns(battle turn in turn based
 *                               individual turn in TPBS) needed for the
 *                               skill/item to cooldown before it becomes
 *                               usable again
 *       - Battler cooldown - The number of turns(battle turn in turn based
 *                            individual turn in TPBS) needed for the battler
 *                            just executed the skill/item to cooldown before
 *                            that battler can input actions again
 *    2. If the skill/item cooldown is 1 turn, it means battlers with multiple
 *       action slots can only input that skill/item once instead of as many
 *       as the action slots allow
 *       If the battler cooldown is negative, it means the TPB bar charging
 *       value will be positive instead of 0 right after executing the
 *       skill/item(So a -1 battler cooldown means the battler will become
 *       able to input actions again right after executing such skills/items)
 *    3. When updating the battler individual turn count in TPBS, the decimal
 *       parts of the battler will be discarded, but those parts will still be
 *       used when actually increasing the time needed for that battler to
 *       become able to input actions again
 *       In the turn based battle system, the decimal parts of the battler
 *       cooldown counts as 1 turn
 *       The decimal parts of the final skill/item cooldown value will be
 *       discarded
 *    4. Skill/item cooldown can be set to apply outside battles as well
 *       Skill/item cooldown won't be updated when the battler has fully
 *       charged the TPBS bar

 

Video

Video(v1.02a+)

 

Games using this plugin

None so far

 

Parameters

Spoiler

 * @param BattleManager
 *
 * @param clearBattlerSkillItemCooldownOnBattleStart
 * @parent BattleManager
 * @type note
 * @desc Let you clear battler/skill/item cooldowns on battle start
 * actor is the actor to have all those cooldowns cleared
 * @default "actor.clearBattlerSkillItemCooldowns();"
 *
 * @param clearBattlerSkillItemCooldownOnBattleEnd
 * @parent BattleManager
 * @type note
 * @desc Lets you clear battler/skill/item cooldowns on battle end
 * actor is the actor to have all those cooldowns cleared
 * @default "actor.clearBattlerSkillItemCooldowns();"
 *
 * @param Battler
 *
 * @param canCancelBattlerCooldown
 * @parent Battler
 * @type note
 * @desc Lets you set if a battler can cancel the battler cooldown
 * if no canCancelBattler notetags are present
 * @default "return true;"
 *
 * @param canCancelSkillItemCooldown
 * @parent Battler
 * @type note
 * @desc Lets you set if a battler can cancel the skill/item
 * cooldown if no canCancelSkillItem notetags are present
 * @default "return true;"
 *
 * @param cancelBattlerCooldownFail
 * @parent Battler
 * @type note
 * @desc Lets you set what happens when a battler failed to cancel
 * the battler cooldown
 * @default "SoundManager.playBuzzer();"
 *
 * @param cancelSkillItemCooldownFail
 * @parent Battler
 * @type note
 * @desc Lets you set what happens when a battler failed to cancel
 * the skill/item cooldown
 * @default "SoundManager.playBuzzer();"
 *
 * @param cancelBattlerCooldownSuc
 * @parent Battler
 * @type note
 * @desc Lets you set what happens when a battler successfully
 * cancel the battler cooldown
 * @default "SoundManager.playOk();"
 *
 * @param cancelSkillItemCooldownSuc
 * @parent Battler
 * @type note
 * @desc Lets you set what happens when a battler successfully
 * cancel the skill/item cooldown
 * @default "SoundManager.playOk();"
 *
 * @param onCancelCooldownClick
 * @parent Battler
 * @type note
 * @desc Lets you set what happens when the sprite of the actor
 * get clicked for triggering a cooldown cancel attempt
 * @default "this.cancelBattlerCooldown();\nthis.cancelSkillItemCooldown();"
 *
 * @param SpriteGauge
 *
 * @param skillItemCooldownGaugeColor1
 * @parent SpriteGauge
 * @type note
 * @desc Sets the 1st actor TPB battler cooldown gague sprite color
 * The gauge sprite involved can be referred by the this keyword
 * @default "return ColorManager.textColor(18);"
 *
 * @param skillItemCooldownGaugeColor2
 * @parent SpriteGauge
 * @type note
 * @desc Sets the 2nd actor TPB battler cooldown gague sprite color
 * The gauge sprite involved can be referred by the this keyword
 * @default "return ColorManager.textColor(10);"
 *
 * @param Hotkeys
 *
 * @param cancelBattlerCooldownHotkeys
 * @parent Hotkeys
 * @type struct<Hotkey>[]
 * @desc Sets the list of hotkeys cancelling the battler cooldown
 * of the actor with the corresponding hotkey indices
 * @default []
 *
 * @param cancelSkillItemCooldownHotkeys
 * @parent Hotkeys
 * @type struct<Hotkey>[]
 * @desc Sets the list of hotkeys cancelling the skill/item
 * cooldown of the actor with the corresponding hotkey indices
 * @default []
 *
 * @param NotetagDataTypePriorities
 *
 * @param battlerNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of the battler notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]
 *
 * @param skillItemNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of the skillItem notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]
 *
 * @param canCancelBattlerNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of the canCancelBattler notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]
 *
 * @param canCancelSkillItemNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of canCancelSkillItem notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]
 *
 * @param cancelBattlerSucNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of the cancelBattlerSuc notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]
 *
 * @param cancelSkillItemSucNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of cancelSkillItemSuc notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]
 *
 * @param cancelBattlerFailNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of cancelBattlerFail notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]
 *
 * @param cancelSkillItemFailNotetagDataTypePriorities
 * @parent NotetagDataTypePriorities
 * @type select[]
 * @option Data of the actor
 * @value actor
 * @option Data of the current class
 * @value class
 * @option Data of learnt skills/action list(Shouldn't be used with Data of usable skills)
 * @value skills
 * @option Data of usable skills(Shouldn't be used with Data of learnt skills)
 * @value usableSkills
 * @option Data of possessed items(Shouldn't be used with Data of usable items)
 * @value items
 * @option Data of usable items(Shouldn't be used with Data of possessed items)
 * @value usableItems
 * @option Data of the latest skill/item being used(Can double-count with skills/items/usableSkills/usableItems)
 * @value latestSkillItem
 * @option Data of equipped weapons
 * @value weapons
 * @option Data of equipped armors
 * @value armors
 * @option Data of the enemy
 * @value enemy
 * @option Data of effective states
 * @value states
 * @desc Sets data type priorities of cancelSkillItemFail notetags
 * You can use script calls/plugin commands to change this
 * @default ["latestSkillItem","states","enemy","armors","weapons","class","actor"]

 

 

Notetags

Spoiler

 *    ## Notetag Info
 *       1. Among all the same notetag types in the same data, all can be
 *          effective
 *       2. Each line can only have at most 1 notetag
 *       3. The following is the structure of all notetags in this plugin:
 *          - <doublex rmmz cooldown contents>
 *          - <cooldown contents>
 *          Where contents are in the form of type suffixes: entries
 *          Either of the above can be used, but the 1st one reduce the chance
 *          of causing other plugins to treat the notetags of this plugin as
 *          theirs, while the 2nd one is more user-friendly
 *          - type is one of the following:
 *            1. battler
 *            2. skillItem
 *            (Search tag: NOTE_TYPE)
 *          - suffixes is the list of suffixes in the form of:
 *            suffix1 suffix2 suffix3 ... suffixn
 *            Where each suffix is either of the following:
 *            val(The notetag value will be used as-is)
 *            switch(The value of the game switch with id as the notetag value
 *                   will be used)
 *            var(The value of the game variable with id as the notetag value
 *                will be used)
 *            (Advanced)script(The value of the game variable with id as the
 *                            notetag value will be used as the contents of
 *                            the functions to be called upon using the
 *                            notetag)
 *          - The this pointer of the script suffix is the battler involved
 *            (Game_Battler.prototype)
 *          - entries is the list of entries in the form of:
 *            entry1, entry2, entry3, ..., entryn
 *            Where entryi must conform with the suffixi specifications
 *----------------------------------------------------------------------------
 *    # Actor/Class/Learnt Skills/Usable Skills/Posessed Items/Usable Items/
 *      Inputted Skill Or Item/Weapon/Armor/Enemy/States Notetags
 *      1. battler condSuffix opSuffix valSuffix: condEntry, opEntry, valEntry
 *         - Applies the following formula on the current battler cooldown:
 *           current = current operator value
 *           if condEntry returns a turthy result
 *           Where current is the current battler cooldown, operator is the
 *           operator specified by opEntry, and value is the value specified
 *           by valEntry
 *         - If there are no notetags, current will be 0, as it's the default
 *           battler cooldown value
 *         - condSuffix can be val, switch or script
 *         - Both opSuffix and valSuffix can be val, var or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - The result of opSuffix must be either of the following:
 *           +
 *           -
 *           *
 *           /
 *           %
 *           =
 *         - The result of valEntry can be any number
 *         - E.g.:
 *           <cooldown battler script val val: 1, +, 1> will cause the
 *           battler to wait for 1 turn before the TPB bar starts to charge
 *           again, and the individual turn count will be added by 1 after
 *           this wait, in the case of TPBS, and the battler won't be able to
 *           input actions in the next turn for turn based battles, but the
 *           battler cooldown won't be triggered by using skills/items outside
 *           battles, because the value of variable with id 1 is
 *           return $gameParty.inBattle(); meaning that this notetag will only
 *           be effective inside battles
 *           Cooldowns triggered inside battles can still carry over outside
 *           battles if the battle ends but the cooldown's still not expired
 *           if it's not cleared in clearBattlerSkillItemCooldownOnBattleEnd,
 *           and vice verse if it's not cleared in
 *           clearBattlerSkillItemCooldownOnBattleStart
 *      2. skillItem condSuffix opSuffix valSuffix: condEntry, opEntry, valEntry
 *         - Applies the following formula on the current skill/item cooldown:
 *           current = current operator value
 *           if condEntry returns a turthy result
 *           Where current is the current skill/item cooldown, operator is the
 *           operator specified by opEntry, and value is the value specified
 *           by valEntry
 *         - If there are no notetags, current will be 0, as it's the default
 *           skill/item cooldown value
 *         - condSuffix can be val, switch or script
 *         - Both opSuffix and valSuffix can be val, var or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - The result of opSuffix must be either of the following:
 *           +
 *           -
 *           *
 *           /
 *           %
 *           =
 *         - The result of valEntry can be any number
 *         - THIS NOTETAG DOESN'T WORK WITH ATTACK, GUARD NOR FORCED ACTIONS
 *         - E.g.:
 *           <cooldown skillItem switch val val: 1, +, 2> will cause the
 *           battler to be unable to input the skill/item in the next turn if
 *           the game switch with id 1 is on(regrdless of whether it's inside
 *           or outside battles)
 *           Cooldowns triggered outside battles can still carry over inside
 *           battles if the battle ends but the cooldown's still not expired
 *           if it's not cleared in
 *           clearBattlerSkillItemCooldownOnBattleStart, and vice verse if
 *           it's not cleared in clearBattlerSkillItemCooldownOnBattleEnd
 *      3.(v1.02a+) canCancelBattler condSuffix opSuffix: condEntry, opEntry
 *         - Applies the following formula on whether the battler involved can
 *           cancel the battler cooldown: current = current operator condition
 *           Where current is the current boolean value, operator is the
 *           operator specified by opEntry, and condition is the value
 *           specified by condEntry
 *         - If there are no notetags, the result returned by the default
 *           parameter function will be used
 *         - condSuffix can be val, switch or script
 *         - opSuffix can be val, var or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - The result of opSuffix must be either of the following:
 *           and
 *           or
 *           nand
 *           nor
 *           xor
 *           xnor
 *           set
 *         - BATTLER COOLDOWNS CAN'T BE PARTIALLY CANCELLED
 *         - BATTLER COOLDOWNS CAN'T BE CANCELLED OUTSIDE BATTLES
 *         - E.g.:
 *           <cooldown canCancelBattler switch val: 1, set> will cause the
 *           battler to be able to cancel the battler cooldown if the game
 *           switch with id 1 is on, regardless of the result of the previous
 *           effective notetags, as long as this is the last effective notetag
 *      4.(v1.02a+) canCancelSkillItem condSuffix opSuffix: condEntry, opEntry
 *         - Applies the following formula on whether the battler involved can
 *           cancel the skill/item cooldown:
 *           current = current operator condition
 *           Where current is the current boolean value, operator is the
 *           operator specified by opEntry, and condition is the value
 *           specified by condEntry
 *         - If there are no notetags, the result returned by the default
 *           parameter function will be used
 *         - condSuffix can be val, switch or script
 *         - opSuffix can be val, var or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - The result of opSuffix must be either of the following:
 *           and
 *           or
 *           nand
 *           nor
 *           xor
 *           xnor
 *           set
 *         - EITHER ALL OR NONE OF THE SKILL/ITEM COOLDOWNS WILL BE CANCELLED
 *         - SKILL/ITEM COOLDOWNS CAN'T BE CANCELLED OUTSIDE BATTLES
 *         - E.g.:
 *           <cooldown canCancelSkillItem script val: 1, and> will cause the
 *           battler to be unable to cancel the skill/item cooldown if the
 *           game variable with id 1 stores the string of a script returning a
 *           falsy value, as long as this is the last effective notetag
 *      5.(v1.02a+) cancelBattlerSuc condSuffix eventSuffix: condEntry, eventEntry
 *         - Triggers what specified in eventEntry when the battler involved
 *           successfully cancels the battler cooldown if condEntry returns a
 *           truthy result
 *         - condSuffix can be val, switch or script
 *         - eventEntry can be event or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - If the result of condEntry is falsy, this notetag will be
 *           discarded upon such use cases
 *         - The result of eventEntry can be anything as it's supposed to run
 *           commands instead of returning results
 *         - E.g.:
 *           <cooldown cancelBattlerSuc switch event: 1, 2> will reserve the
 *           common event with id 2 when the battler involved successfully
 *           cancels the battler cooldown if the game switch with id 1 is on
 *      6.(v1.02a+) cancelSkillItemSuc condSuffix eventSuffix: condEntry, eventEntry
 *         - Triggers what specified in eventEntry when the battler involved
 *           successfully cancels the skill/item cooldown if condEntry returns
 *           a truthy result
 *         - condSuffix can be val, switch or script
 *         - eventEntry can be event or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - If the result of condEntry is falsy, this notetag will be
 *           discarded upon such use cases
 *         - The result of eventEntry can be anything as it's supposed to run
 *           commands instead of returning results
 *         - E.g.:
 *           <cooldown cancelSkillItemSuc val event: true, 2> will always
 *           reserve the common event with id 2 when the battler involved
 *           successfully cancels the skill/item cooldown
 *      7.(v1.02a+) cancelBattlerFail condSuffix eventSuffix: condEntry, eventEntry
 *         - Triggers what specified in eventEntry when the battler involved
 *           fails to cancel the battler cooldown if condEntry returns a
 *           truthy result
 *         - condSuffix can be val, switch or script
 *         - eventEntry can be event or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - If the result of condEntry is falsy, this notetag will be
 *           discarded upon such use cases
 *         - The result of eventEntry can be anything as it's supposed to run
 *           commands instead of returning results
 *         - E.g.:
 *           <cooldown cancelBattlerFail switch event: 1, 2> will reserve the
 *           common event with id 2 when the battler involved fails to cancel
 *           the battler cooldown if the game switch with id 1 is on
 *      8.(v1.02a+) cancelSkillItemFail condSuffix eventSuffix: condEntry, eventEntry
 *         - Triggers what specified in eventEntry when the battler involved
 *           fails to cancel the skill/item cooldown if condEntry returns a
 *           truthy result
 *         - condSuffix can be val, switch or script
 *         - eventEntry can be event or script
 *         - The result of condEntry can be anything as only whether it's
 *           truthy matters
 *         - If the result of condEntry is falsy, this notetag will be
 *           discarded upon such use cases
 *         - The result of eventEntry can be anything as it's supposed to run
 *           commands instead of returning results
 *         - E.g.:
 *           <cooldown cancelSkillItemFail val event: true, 2> will always
 *           reserve the common event with id 2 when the battler involved
 *           fails to cancel the skill/item cooldown

 

 

Script Calls

Spoiler

 *    # Parameter manipulations
 *      1. $gameSystem.setSkillItemCooldownParam(param, val)
 *         - Sets the fully parsed value of the parameter param as val
 *         - param must be the name of a valid parameter of this plugin
 *         - val must be a valid new fully parsed value of the parameter param
 *         - Such parameter value changes will be saved
 *         - E.g.:
 *           $gameSystem.setSkillItemCooldownParam("battlerNotetagDataTypePriorities", [
 *               "latestSkillItem",
 *               "states",
 *               "armors",
 *               "weapons",
 *               "class",
 *               "actor",
 *               "enemy"
 *           ]) sets the fully parsed value of the parameter
 *           battlerNotetagDataTypePriorities as
 *           ["latestSkillItem","states", "armors", "weapons", "class", "actor", "enemy"]
 *      2. $gameSystem.skillItemCooldownParam(param)
 *         - Returns the fully parsed value of the parameter param
 *         - param must be the name of a valid parameter of this plugin
 *         - E.g.:
 *           $gameSystem.skillItemCooldownParam("skillItemNotetagDataTypePriorities")
 *           returns the fully parsed value of the parameter
 *           skillItemNotetagDataTypePriorities, which should be
 *           ["latestSkillItem","states", "armors", "weapons", "class", "actor", "enemy"]
 *           if it uses its default parameter value
 *    # Battler manipulations
 *      1. clearBattlerSkillItemCooldowns()
 *         - Clears all battler and skill/item cooldowns for the battler
 *           involved
 *         - E.g.:
 *           $gameActors.actor(1).clearBattlerSkillItemCooldowns(1) will clear
 *           all battler and skill/item cooldowns for the game actor with id 1
 *      2. setBattlerCooldown(turnCount)
 *         - Sets the battler cooldown turn count as turnCount for the battler
 *           involved
 *         - turnCount must be a number
 *         - E.g.:
 *           $gameActors.actor(1).setBattlerCooldown(1) will set the battler
 *           cooldown turn count of the actor with id 1 as 1, meaning that the
 *           battler will take 1 idle individual turn right after executing
 *           all actions but before charging the TPB bar again(in the case of
 *           TPBS) and in the case of the turn based battle system, that
 *           battler won't be able to input actions in the next turn
 *      3. battlerCooldown()
 *         - Returns the battler cooldown turn count of the battler involed
 *         - E.g.:
 *           $gameParty.battleMembers(0).battlerCooldown() will return the
 *           battler cooldown turn count of the 1st game party member in the
 *           battle
 *      4. isBattlerCooldown()
 *         - Returns if the battler involved is having battler cooldown
 *         - E.g.:
 *           $gameParty.aliveMembers(1).isBattlerCooldown() will return if the
 *           2nd alive game party member is having battler cooldown
 *      5. setSkillItemCooldown(item, turnCount)
 *         - Sets the skill/item cooldown turn count of item as turnCount for
 *           the battler involved
 *         - item must be the data of the skill/item to have its cooldown set
 *         - turnCount must be a number
 *         - E.g.:
 *           $gameParty.movableMembers(2).setSkillItemCooldown($dataSkills[3], 2)
 *           will set the skill/item cooldown turn count of the skill with id
 *           3 for the 3rd movable game party member as 2, meaning that that
 *           battler can't input that skill for the next 2 turns
 *      6. skillItemCooldown(item)
 *         - Returns the skill/item cooldown with item of the battler involved
 *         - E.g.:
 *           $gameTroop.members(0).skillItemCooldown($dataItems[1]) will
 *           return the skill/item cooldown with item with id 1 of the 1st
 *           game troop member
 *      7. isSkillItemCooldown(item)
 *         - Returns if the battler involved is having skill/item cooldown
 *           with item
 *         - E.g.:
 *           $gameParty.deadMembers(1).isSkillItemCooldown($dataItems[2]) will
 *           return if the 2nd dead game troop member is having skill/item
 *           cooldown with item with id 2
 *      8.(v1.02a+) canCancelBattlerCooldown()
 *         - Returns if the battler involved can cancel the battler cooldown
 *         - E.g.:
 *           $gameParty.aliveMembers(1).canCancelBattlerCooldown() will return
 *           if the 2nd alive game party member can canel the battler cooldown
 *      9.(v1.02a+) canCancelSkillItemCooldown()
 *         - Returns if the battler involved can cancel the skill/item
 *           cooldown
 *         - E.g.:
 *           $gameParty.deadMembers(1).canCancelSkillItemCooldown() will
 *           return if the 2nd dead game troop member can cancel the
 *           skill/item cooldown
 *      10.(v1.02a+) cancelBattlerCooldown()
 *         - Cancels the battler cooldown of the battler involved if that
 *           battler cooldown can be cancelled
 *         - E.g.:
 *           $gameParty.aliveMembers(1).cancelBattlerCooldown() will cancel
 *           the battler cooldown of the 2nd alive game party member if that
 *           battler cooldown can be cancelled
 *      11.(v1.02a+) cancelSkillItemCooldown()
 *         - Cancels the skill/item cooldown of the battler involved if that
 *           skill/item cooldown can be cancelled
 *         - E.g.:
 *           $gameParty.deadMembers(1).cancelSkillItemCooldown() will cancel
 *           the skill/item cooldown of the 2nd dead game troop member if that
 *           skill/item cooldown can be cancelled

 

 

Plugin Commands

Spoiler

 * @command setSkillItemCooldownParam
 * @desc Applies script call $gameSystem.setSkillItemCooldownParam(param, val)
 * @arg param
 * @desc The name of a valid parameter of this plugin
 * @arg val
 * @desc A valid new fully parsed value of the parameter param
 *
 * @command clearBattlerSkillItemCooldowns
 * @desc Applies script call battler.clearBattlerSkillItemCooldowns()
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler setting the battler cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler setting the battler cooldown
 *
 * @command setBattlerCooldown
 * @desc Applies script call battler.setBattlerCooldown(turnCount)
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler setting the battler cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler setting the battler cooldown
 * @arg turnCount
 * @type number
 * @min -999999
 * @desc The new battler cooldown turn count of the battler involved
 *
 * @command setSkillItemCooldown
 * @desc Applies script call battler.setSkillItemCooldown(item, turnCount)
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler setting the skill/item cooldown
 * with the skill/item involved
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler setting the
 * skill/item cooldown with the skill/item involved
 * @arg type
 * @type select
 * @option Skill
 * @value skill
 * @option Item
 * @value item
 * @desc The skill/item to have its skill/item cooldown set for the
 * battler involved
 * @arg id
 * @type number
 * @desc The id of the skill/item to have its skill/item cooldown
 * set for the battler involved
 * @arg turnCount
 * @type number
 * @min -999999
 * @desc The new skill/item cooldown turn count of the skill/item involved
 *
 * @command battlerCooldown
 * @desc Stores the battler.battlerCooldown() script call results
 * into the game variable with id varId
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler querying the battler cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler querying the battler cooldown
 * @arg varId
 * @type number
 * @desc The id of the game variable storing the script call result
 *
 * @command isBattlerCooldown
 * @desc Stores the battler.isBattlerCooldown() script call results
 * into the game switch with id switchId
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler querying the battler cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler querying the battler cooldown
 * @arg switchId
 * @type number
 * @desc The id of the game switch storing the script call result
 *
 * @command skillItemCooldown
 * @desc Stores the battler.skillItemCooldown(item) script call
 * results into the game variable with id varId
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler querying the skill/item cooldown
 * with the skill/item involved
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler querying the
 * skill/item cooldown with the skill/item involved
 * @arg type
 * @type select
 * @option Skill
 * @value skill
 * @option Item
 * @value item
 * @desc The skill/item to have its skill/item cooldown set for the
 * battler involved
 * @arg id
 * @type number
 * @desc The id of the skill/item to have its skill/item cooldown
 * set for the battler involved
 * @arg varId
 * @type number
 * @desc The id of the game variable storing the script call result
 *
 * @command isSkillItemCooldown
 * @desc Stores the battler.isSkillItemCooldown(item) script call
 * results into the game switch with id switchId
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler querying the skill/item cooldown
 * with the skill/item involved
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler querying the
 * skill/item cooldown with the skill/item involved
 * @arg type
 * @type select
 * @option Skill
 * @value skill
 * @option Item
 * @value item
 * @desc The skill/item to have its skill/item cooldown set for the
 * battler involved
 * @arg id
 * @type number
 * @desc The id of the skill/item to have its skill/item cooldown
 * set for the battler involved
 * @arg switchId
 * @type number
 * @desc The id of the game switch storing the script call result
 *
 * @command canCancelBattlerCooldown
 * @desc Stores the battler.canCancelBattlerCooldown() script call
 * results into the game switch with id switchId
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler querying the battler cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler querying the
 * battler cooldown
 * @arg switchId
 * @type number
 * @desc The id of the game switch storing the script call result
 *
 * @command canCancelSkillItemCooldown
 * @desc Stores the battler.canCancelSkillItemCooldown() script
 * call results into the game switch with id switchId
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler querying the skill/item cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler querying the
 * skill/item cooldown
 * @arg switchId
 * @type number
 * @desc The id of the game switch storing the script call result
 *
 * @command cancelBattlerCooldown
 * @desc Applies script call battler.cancelBattlerCooldown()
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler cancelling the battler cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler cancelling the battler
 * cooldown
 *
 * @command cancelSkillItemCooldown
 * @desc Applies script call battler.cancelSkillItemCooldown()
 * @arg side
 * @type select
 * @option Actor
 * @value actor
 * @option Enemy
 * @value enemy
 * @desc The side of the battler cancelling the skill/item cooldown
 * @arg label
 * @type number
 * @desc The actor id/enemy index of the battler cancelling the skill/item
 * cooldown

 

 

Plugin Query Info

Spoiler

1. You need to use DoubleX_RMMZ_Plugin_Query as well in order to use the plugin queries of this plugin


 *      1. battlerCooldown side label
 *         - Applies the script call battler.battlerCooldown()
 *         - battler is the battler identified by side and label
 *         - side is either actor or enemy
 *         - label is the actor id for side actor and troop member index for
 *           side enemy
 *      2. isBattlerCooldown side label
 *         - Applies the script call battler.isBattlerCooldown()
 *         - battler is the battler identified by side and label
 *         - side is either actor or enemy
 *         - label is the actor id for side actor and troop member index for
 *           side enemy
 *      3. skillItemCooldown side label type id
 *         - Applies the script call battler.skillItemCooldown(item)
 *         - battler is the battler identified by side and label
 *         - side is either actor or enemy
 *         - label is the actor id for side actor and troop member index for
 *           side enemy
 *         - item is the skill/item identified by type and id
 *         - type is either skill or item
 *         - id is the id of the skill/item
 *      4. isSkillItemCooldown side label type id
 *         - Applies the script call battler.isSkillItemCooldown(item)
 *         - battler is the battler identified by side and label
 *         - side is either actor or enemy
 *         - label is the actor id for side actor and troop member index for
 *           side enemy
 *         - item is the skill/item identified by type and id
 *         - type is either skill or item
 *         - id is the id of the skill/item
 *      5.(v1.02a+) canCancelBattlerCooldown side label
 *         - Applies the script call battler.canCancelBattlerCooldown()
 *         - battler is the battler identified by side and label
 *         - side is either actor or enemy
 *         - label is the actor id for side actor and troop member index for
 *           side enemy
 *      6.(v1.02a+) canCancelSkillItemCooldown side label
 *         - Applies the script call battler.canCancelSkillItemCooldown()
 *         - battler is the battler identified by side and label
 *         - side is either actor or enemy
 *         - label is the actor id for side actor and troop member index for
 *           side enemy

 

 

Prerequisites

Spoiler

Plugins:
1. DoubleX RMMZ Enhanced Codebase
Abilities:
1. Nothing special for most ordinary cases
2. Little RMMZ plugin development proficiency for more advanced usages(Elementary Javascript exposures being able to write beginner codes up to 300LoC scale)
3. Some RMMV plugin development proficiency to fully utilize this(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

Spoiler

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

 

 

Contributors

Spoiler

 *      Authors:
 *      1. DoubleX
 *      Plugin Development Collaborators:
 *      - None So Far
 *      Bug Reporters:
 *      - None So Far
 *      Compatibility Issue Raisers:
 *      - None So Far
 *      Feature Requesters:
 *      - None So Far

 

 

Changelog

Spoiler

 *      { codebase: "1.1.1", plugin: "v1.02a" }(2021 Feb 7 GMT 1300):
 *      1. Added skillItemCooldownGaugeColor1 and skillItemCooldownGaugeColor2
 *         to let you show the TPB battler cooldown bar inside battles with
 *         configurable colors
 *      2. Added cancelBattlerCooldownHotkeys and
 *         cancelSkillItemCooldownHotkeys to let you set some hotkeys to
 *         cancel the battler/skill item cooldown of the corresponding actors
 *         respectively
 *      3. Added the following parameters:
 *         - canCancelBattlerCooldown
 *         - canCancelSkillItemCooldown
 *         - cancelBattlerCooldownFail
 *         - cancelSkillItemCooldownFail
 *         - cancelBattlerCooldownSuc
 *         - cancelSkillItemCooldownSuc
 *         - canCancelBattlerCooldownNotetagDataTypePriorities
 *         - canCancelSkillItemCooldownNotetagDataTypePriorities
 *         - cancelBattlerCooldownFailNotetagDataTypePriorities
 *         - cancelSkillItemCooldownFailNotetagDataTypePriorities
 *         - cancelBattlerCooldownSucNotetagDataTypePriorities
 *         - cancelSkillItemCooldownSucNotetagDataTypePriorities
 *      4. Added the following plugin commands:
 *         - canCancelBattlerCooldown
 *         - canCancelSkillItemCooldown
 *         - cancelBattlerCooldown
 *         - cancelSkillItemCooldown
 *      5. Added the following notetags:
 *         - canCancelBattler
 *         - canCancelSkillItem
 *         - cancelBattlerFail
 *         - cancelSkillItemFail
 *         - cancelBattlerSuc
 *         - cancelSkillItemSuc
*      { codebase: "1.1.0", plugin: "v1.01b" }(2020 Nov 27 GMT 0500):
 *      1. You no longer have to edit the value of
 *         DoubleX_RMMZ.Skill_Item_Cooldown.PLUGIN_NAME when changing this
 *         plugin file name
*      { codebase: "1.0.2", plugin: "v1.01a" }(2020 Oct 11 GMT 0900):
 *      1. Added the plugin query and command counterparts for the following
 *         script calls of this plugin:
 *         - battlerCooldown()
 *         - isBattlerCooldown()
 *         - skillItemCooldown(item)
 *         - isSkillItemCooldown(item)
*      { codebase: "1.0.0", plugin: "v1.00a" }(2020 Aug 27 GMT 0300):
 *      1. 1st version of this plugin finished

 

 

Download Link

Edited by DoubleX

Share this post


Link to post
Share on other sites

Updates

 *      { codebase: "1.0.2", plugin: "v1.01a" }(2020 Oct 11 GMT 0900):
 *      1. Added the plugin query and command counterparts for the following
 *         script calls of this plugin:
 *         - battlerCooldown()
 *         - isBattlerCooldown()
 *         - skillItemCooldown(item)
 *         - isSkillItemCooldown(item)

 

Share this post


Link to post
Share on other sites

Updates

 *      { codebase: "1.1.0", plugin: "v1.01b" }(2020 Nov 27 GMT 0500):
 *      1. You no longer have to edit the value of
 *         DoubleX_RMMZ.Skill_Item_Cooldown.PLUGIN_NAME when changing this
 *         plugin file name

 

Share this post


Link to post
Share on other sites

  

Updates

 *      { codebase: "1.1.1", plugin: "v1.02a" }(2021 Feb 7 GMT 1300):
 *      1. Added skillItemCooldownGaugeColor1 and skillItemCooldownGaugeColor2
 *         to let you show the TPB battler cooldown bar inside battles with
 *         configurable colors
 *      2. Added cancelBattlerCooldownHotkeys and
 *         cancelSkillItemCooldownHotkeys to let you set some hotkeys to
 *         cancel the battler/skill item cooldown of the corresponding actors
 *         respectively
 *      3. Added the following parameters:
 *         - canCancelBattlerCooldown
 *         - canCancelSkillItemCooldown
 *         - cancelBattlerCooldownFail
 *         - cancelSkillItemCooldownFail
 *         - cancelBattlerCooldownSuc
 *         - cancelSkillItemCooldownSuc
 *         - canCancelBattlerCooldownNotetagDataTypePriorities
 *         - canCancelSkillItemCooldownNotetagDataTypePriorities
 *         - cancelBattlerCooldownFailNotetagDataTypePriorities
 *         - cancelSkillItemCooldownFailNotetagDataTypePriorities
 *         - cancelBattlerCooldownSucNotetagDataTypePriorities
 *         - cancelSkillItemCooldownSucNotetagDataTypePriorities
 *      4. Added the following plugin commands:
 *         - canCancelBattlerCooldown
 *         - canCancelSkillItemCooldown
 *         - cancelBattlerCooldown
 *         - cancelSkillItemCooldown
 *      5. Added the following notetags:
 *         - canCancelBattler
 *         - canCancelSkillItem
 *         - cancelBattlerFail
 *         - cancelSkillItemFail
 *         - cancelBattlerSuc
 *         - cancelSkillItemSuc

Video

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted