DoubleX RMMV Popularized ATB Cooldown

0 Members and 1 Guest are viewing this topic.

***
Scripter
Rep:
Level 34
Changelog
Code: [Select]
*      v1.01b(GMT 1500 11-8-2016):                                           
 *      1. In sync with the latest DoubleX RMMV Popularized ATB Core version 
 *      v1.01a(GMT 0200 20-2-2016):                                           
 *      1. Lets users set the cooldown bar description text via notetags     
 *      2. Lets users trigger a common event upon battler cooldown finish     
 *      3. Fixed not refreshing the battler upon finishing cooldown bug       
 *      4. Fixed a compatibility issue with charge addon upon cooldown finish 
*      v1.00a(GMT 1100 9-2-2016):                                           
 *      1. 1st testing version of this plugin finished                       

Authors
DoubleX

Credits
DoubleX(Optional)

Purpose
Lets users set skills/items causing user to cooldown after user

Games using this plugin
None so far

Configurations
Code: [Select]
* @param cooldown_c1
 * @desc Sets the 1st atb cooldown bar color as text color cooldown_c1
 *       cooldown_c1 must return a valid text color code
 *       cooldown_c1 should return the same value during the same battle to
 *       ensure proper atb cooldown bar color displays
 * @default 19
 *
 * @param cooldown_c2
 * @desc Sets the 2nd atb cooldown bar color as text color cooldown_c2
 *       cooldown_c2 must return a valid text color code
 *       cooldown_c2 should return the same value during the same battle to
 *       ensure proper atb cooldown bar color displays
 * @default 26
 *
 * @param cooldown_bar_text
 * @desc Sets the code of the cooldown bar description text as cooldown_bar_text
 *       It'll only be used if no <patb cooldown text: text> notetag's used
 *       Available cooldown_bar_text code:
 *       item - The skill/item name causing the cooldown will be the cooldown
 *              bar description text
 *       Setting cooldown_bar_text as an unavailable code means atb_bar_text
 *       will be the cooldown bar description text
 *       cooldown_bar_text should return the same code during the same battle to
 *       ensure proper cooldown bar text displays
 * @default item
 *
 * @param post_cooldown_common_event_id
 * @desc Sets the common event with id post_cooldown_common_event_id to be
 *       called right after a battler has finished cooling down
 *       post_cooldown_common_event_id must return a Number
 *       If post_cooldown_common_event_id doesn't return the id of an existing
 *       common event, no common event will be called with this timing
 * @default 0

Notetags
Code: [Select]
*    # Skill/Item Notetags:                                                 
 *      1. <patb cooldown: scale, code>                                       
 *         - Sets the cooldown rate to use the skill/item's invocation speed,
 *           which will be multiplied by scale                               
 *         - code can be either of the below:                                 
 *           set - The cooldown value per frame will be the skill/item's     
 *                 invocation speed * scale, which should be nonnegative     
 *           add - The cooldown value per frame will be the absolute value of
 *                 the battler atb gain value per frame + the skill/item's   
 *                 invocation speed * scale                                   
 *           multiply - If the skill/item's invocation speed * scale is       
 *                      positive, the cooldown value per frame will be the   
 *                      battler atb gain value per frame * the skill/item's   
 *                      invocation speed * scale                             
 *                      If the skill/item's invocation speed * scale is       
 *                      negative, the cooldown value per frame will be the   
 *                      battler atb gain value per frame / (the skill/item's 
 *                      invocation speed * scale)                             
 *                      If the skill/item's invocation speed * scale is 0, the
 *                      battler using the skill/item will be fully cooled down
 *                      in 1 frame                                           
 *      2. <patb cooldown colors: text color 1, text color 2>                 
 *         - Changes the atb cooldown bar color 1 and 2 to text color 1 and 2
 *           respectively when this notetag's used                           
 *      3. <patb cooldown text: text>                                         
 *         - Changes the atb cooldown bar description text as text when this 
 *           notetag's used                                                   

Plugin Calls
Code: [Select]
*    # Data Skill/Item manipulations                                         
 *      1. meta.patb_cooldown                                                 
 *         - Returns the skill/item invocation speed scale and cooldown rate 
 *           code in the form of { scale: scale, code: code }                 
 *      2. meta.patb_cooldown = { scale: scale, code: code }                 
 *         - Sets the skill/item invocation speed scale and cooldown rate code
 *           in the form of { scale: scale, code: code }                     
 *         - All meta.patb_cooldown changes can be saved if                   
 *           DoubleX RMMV Dynamic Data is used                               
 *      3. meta.patb_cooldown_colors                                         
 *         - Returns the text colors stored in                               
 *           <patb cooldown colors: text color 1, text color 2> in the form of
 *           [text color 1, text color 2]                                     
 *      4. meta.patb_cooldown_colors = [text color 1, text color 2]           
 *         - Sets the text colors stored in                                   
 *           <patb cooldown colors: text color 1, text color 2> as text color
 *           1 and 2                                                         
 *         - All meta.patb_cooldown_colors changes can be saved if           
 *           DoubleX RMMV Dynamic Data is used                               
 *      5. meta.patb_cooldown_text                                           
 *         - Returns the text stored in <patb cooldown text: text>           
 *      6. meta.patb_cooldown_text = text                                     
 *         - Sets the text stored in <patb cooldown text: text> as text       
 *         - All meta.patb_cooldown_text changes can be saved if             
 *           DoubleX RMMV Dynamic Data is used                               
 *    # Battler manipulations                                                 
 *      1. patb_val.cooldown                                                 
 *         - Returns the battler's cooldown value                             
 *      2. patb_val.cooldown = val                                           
 *         - Set the battler's cooldown value as val                         
 *      3. patb_rate.cooldown                                                 
 *         - Returns the battler's cooldown rate                             
 *      4. patb_rate.cooldown = rate                                         
 *         - Set the battler's cooldown rate as rate                         
 *         - It'll be reevaluated if it can be changed without plugin calls   
 *      5. patb_val_change.cooldown = true                                   
 *         - Notifies that the cooldown value's changed                       
 *         - It must be used right after the atb bar length changed           

Video
https://www.youtube.com/watch?v=tjR2RdGZ5Uw

Prerequisites
Plugins:
1. DoubleX RMMV Popularized ATB Core
Abilities:
1. Little Javascript coding proficiency to fully utilize this plugin

Terms Of Use
You shall keep this plugin's Plugin Info part's contents intact
You shalln't claim that this plugin's written by anyone other than DoubleX or his aliases
None of the above applies to DoubleX or his/her aliases

Instructions
Code: [Select]
* The default plugin file name is DoubleX RMMV Popularized ATB Cooldown v101b
 * If you want to change that, you must edit the value of
 * DoubleX_RMMV.PATB_Cooldown_File, which must be done via opening this plugin
 * js file directly
« Last Edit: August 14, 2016, 06:29:14 AM by DoubleX »

***
Scripter
Rep:
Level 34
Updates
Code: [Select]
*      v1.01a(GMT 0200 20-2-2016):                                           
 *      1. Lets users set the cooldown bar description text via notetags     
 *      2. Lets users trigger a common event upon battler cooldown finish     
 *      3. Fixed not refreshing the battler upon finishing cooldown bug       
 *      4. Fixed a compatibility issue with charge addon upon cooldown finish

***
Scripter
Rep:
Level 34
Updates
Code: [Select]
*      v1.01b(GMT 1500 11-8-2016):                                           
 *      1. In sync with the latest DoubleX RMMV Popularized ATB Core version