DoubleX RMMV Popularized ATB Bar

● ARCHIVED · READ-ONLY
Started by DoubleX 15 posts View original ↗
  1. Note
    This plugin's available for commercial use

    Purpose
    Lets users set when/how ATB bars are shown on battler sprites

    Games using this plugin
    None so far

    Configurations
    Spoiler
    * @param bar_show
    * @desc Sets the code as bar_show determining when the battler ATB bars will be
    * shown on the battler sprites
    * It'll only be used by battlers not using <patb bar show: code> notetags
    * Available bar_show codes:
    * always - The battler ATB bars will always be shown on the enemy sprites
    * defeat - The actor ATB bars will always be shown on the actor sprites
    * while the enemy ATB bars will only be shown on the enemy
    * sprites for those being defeated before
    * This code will only be available if DoubleX RMMV Death Records
    * is used
    * Setting bar_show as an unavailable code means the battler ATB bars will
    * never be shown on the battler sprites
    * @Default always
    *
    * @param bar_w
    * @desc Sets the width of the ATB bars shown on the battler sprites as bar_w
    * It'll only be used by battlers not using any <patb bar w: w> notetag
    * @Default 87
    *
    * @param bar_h
    * @desc Sets the height of the ATB bars shown on the battler sprites as bar_h
    * It'll only be used by battlers not using any <patb bar h: h> notetag
    * @Default 16
    *
    * @param bar_x
    * @desc Sets the x offset of the ATB bars shown on the battler sprites as bar_x
    * It'll only be used by battlers not using any <patb bar x: x> notetag
    * @Default 0
    *
    * @param bar_y
    * @desc Sets the y offset of the ATB bars shown on the battler sprites as bar_y
    * It'll only be used by battlers not using any <patb bar y: y> notetag
    * @Default 0
    *
    * @param bar_opacity
    * @desc Sets the opacity of the ATB bars shown on the battler sprites as
    * bar_opacity
    * It'll only be used by battlers not using any
    * <patb bar opacity: opacity> notetag
    * @Default 255
    *
    * @param bar_text_size
    * @desc Sets the size of the description text of the ATB bars shown on the
    * battler sprites as bar_text_size
    * It'll only be used by battlers not using any <patb bar text size: size>
    * notetag
    * @Default 13

    Notetags
    Spoiler
    * # Actor/Class/Weapon/Armor/Enemy/State Notetags:
    * State notetags take the highest priority, followed by enemy, weapon,
    * armor, class and actor
    * The 1st notetag that's being read by the battler will be used
    * 1. <patb bar show: code>
    * - Sets the code determining when the battler ATB bars will be shown
    * on the battler sprites as code
    * Available codes are those of bar_show
    * - Setting code as an unavailable code means the battler ATB bars
    * will never be shown on the battler sprites
    * 2. <patb bar w: w>
    * - Sets the width of the ATB bars shown on the battler sprites as w
    * 3. <patb bar h: h>
    * - Sets the height of the ATB bars shown on the battler sprites as h
    * 4. <patb bar x: x>
    * - Sets the x offset of the ATB bars shown on the battler sprites as
    * x
    * 5. <patb bar y: y>
    * - Sets the y offset of the ATB bars shown on the battler sprites as
    * y
    * 6. <patb bar opacity: opacity>
    * - Sets the opacity of the ATB bars shown on the battler sprites as
    * opacity
    * 7. <patb bar text size: size>
    * - Sets the size of the description text of the ATB bars shown on
    * the battler sprites as size

    Plugin Calls
    Spoiler
    * # Configuration manipulations
    * 1. $gameSystem.patb.param
    * - Returns the value of param listed in the plugin manager
    * 2. $gameSystem.patb.param = val
    * - Sets the value of param listed in the plugin manager as val
    * - All $gameSystem.patb.param changes will be saved
    * # Actor/Class/Weapon/Armor/Enemy/State manipulations
    * 1. meta.patb_bar_show
    * - Returns the code determining when the battler ATB bars will be
    * shown on the battler sprites
    * 2. meta.patb_bar_show = code
    * - Sets the code determining when the battler ATB bars will be shown
    * on the battler sprites as code
    * - All meta.patb_bar_show changes can be saved if
    * DoubleX RMMV Dynamic Data is used
    * 3. meta.patb_bar_w
    * - Returns the width of the ATB bars shown on the battler sprites
    * 4. meta.patb_bar_w = w
    * - Sets the width of the ATB bars shown on the battler sprites as w
    * - All meta.patb_bar_w changes can be saved if
    * DoubleX RMMV Dynamic Data is used
    * 5. meta.patb_bar_h
    * - Returns the height of the ATB bars shown on the battler sprites
    * 6. meta.patb_bar_w = h
    * - Sets the height of the ATB bars shown on the battler sprites as h
    * - All meta.patb_bar_h changes can be saved if
    * DoubleX RMMV Dynamic Data is used
    * 7. meta.patb_bar_x
    * - Returns the x offset of the ATB bars shown on the battler sprites
    * 8. meta.patb_bar_y = x
    * - Sets the x offset of the ATB bars shown on the battler sprites as
    * x
    * - All meta.patb_bar_x changes can be saved if
    * DoubleX RMMV Dynamic Data is used
    * 9. meta.patb_bar_y
    * - Returns the y offset of the ATB bars shown on the battler sprites
    * 10. meta.patb_bar_y = y
    * - Sets the y offset of the ATB bars shown on the battler sprites
    * as y
    * - All meta.patb_bar_y changes can be saved if
    * DoubleX RMMV Dynamic Data is used
    * 11. meta.patb_bar_opacity
    * - Returns the opacity of the ATB bars shown on the battler sprites
    * 12. meta.patb_bar_opacity = opacity
    * - Sets the opacity of the ATB bars shown on the battler sprites
    * as opacity
    * - All meta.patb_bar_opacity changes can be saved if
    * DoubleX RMMV Dynamic Data is used
    * 13. meta.patb_bar_text_size
    * - Returns the size of the description text of the ATB bars shown
    * on the battler sprites
    * 14. meta.patb_bar_text_size = size
    * - Sets the size of the description text of the ATB bars shown on
    * the battler sprites as size
    * - All meta.patb_bar_size changes can be saved if
    * DoubleX RMMV Dynamic Data is used

    Video
    [embedded media]

    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

    Changelog
    Spoiler
    * v1.00d(GMT 0600 19-5-2021):
    * 1. Fixed all notetags not working bug
    * v1.00c(GMT 1700 16-9-2016):
    * 1. Improved this plugin's effectiveness, efficiency and robustness
    * v1.00b(GMT 1400 31-5-2016):
    * 1. Improved this plugin's effectiveness, efficiency and readibility
    * v1.00a(GMT 1500 19-2-2016):
    * 1. 1st completed version of this plugin finished

    DoubleX RMMV Popularized ATB Bar
  2. Updates

    Code:
     *      v1.00b(GMT 1400 31-5-2016):                                           
     *      1. Improved this plugin's effectiveness, efficiency and readibility
  3. Updates

    Code:
     *      v1.00c(GMT 1700 16-9-2016):                                           
     *      1. Improved this plugin's effectiveness, efficiency and robustness
  4. Hi DoubleX, your PATB is working really well for me but I'm having trouble with this plugin, particularly:

    * 1. <patb bar show: code>
    * - Setting code as an unavailable code means the battler ATB bars [won't appear]

    I just want to show ATB bars on the enemies and not the actors (who have them already in the status window). What is an example of 'unavailable code'? I've tried things like $gameSwitches.value(1) == true in the Actor notebox but the bar still shows up on the actor.
  5. Because of these:
    Code:
    * @param bar_show
    * @desc Sets the code as bar_show determining when the battler ATB bars will be
    * shown on the battler sprites
    * It'll only be used by battlers not using <patb bar show: code> notetags
    * Available bar_show codes:
    * always - The battler ATB bars will always be shown on the enemy sprites
    * defeat - The actor ATB bars will always be shown on the actor sprites
    * while the enemy ATB bars will only be shown on the enemy
    * sprites for those being defeated before
    * This code will only be available if DoubleX RMMV Death Records
    * is used
    * Setting bar_show as an unavailable code means the battler ATB bars will
    * never be shown on the battler sprites
    Code:
    * 1. <patb bar show: code>
    * - Sets the code determining when the battler ATB bars will be shown
    * on the battler sprites as code
    * Available codes are those of bar_show
    * - Setting code as an unavailable code means the battler ATB bars
    * will never be shown on the battler sprites
    Setting code in <patb bar show: code> as anything other than always and defeat will cause the ATB bar to not appear for the notetag owners.
    In your case, things like $gameSwitches.value(1) == true doesn't work because the notetag won't be able to read properly.
    You can try something like <patb bar show: false> for all actors, and the ATB bars shouldn't shown on their sprites, which is what you want :)
  6. Thanks for your quick reply. Hmm, I did try <patb bar show: false> in the Actor notebox initially and it didn't remove the bar. I tried it again on all actors and still appears. I also put <patb bar show: false> tag in a state notebox and added it as a passive state to the actor but it still appears....
  7. Updates
    Code:
     *      v1.00d(GMT 0600 19-5-2021):                                           
     *      1. Fixed all notetags not working bug
  8. Working now, thanks!
  9. Is there a way to put the AP Bar below the Status bar Plugin?

    AP Bar over Status Bar.PNG
  10. There's a way, but you'll have to edit the parameters of both plugins:

    DoubleX RMMZ Popularized ATB Bar -
    Code:
    * @param bar_y
    * @desc Sets the y offset of the ATB bars shown on the battler sprites as bar_y
    * It'll only be used by battlers not using any <patb bar y: y> notetag
    * @Default 0

    DoubleX RMMZ Status Bars -
    Code:
        /*------------------------------------------------------------------------
         *    Status Bar Functions
         *    - Setups SBX used by <status bar: SBX>
         *------------------------------------------------------------------------*/
        /* SBX are used by Window_Status_Bar at this._cfg = SB[this._cfgName](); in
         * _updateCfg
         * SBX are Javascript functions which must return an Object having at least
         * the following:
         * {
         *     visible: function(battler), // Hotspot
         *     opacity: function(battler), // Hotspot
         *     backColor: function(battler), // Hotspot
         *     color1: function(battler), // Hotspot
         *     color2: function(battler), // Hotspot
         *     x: function(battler), // Hotspot
         *     y: function(battler), // Hotspot
         *     w: function(battler), // Hotspot
         *     h, function(battler), // Hotspot
         *     text, function(battler), // Hotspot
         *     textX: function(battler), // Hotspot
         *     textY: function(battler), // Hotspot
         *     textSize: function(battler), // Hotspot
         *     textColor: function(battler), // Hotspot
         *     min: function(battler), // Hotspot
         *     max: function(battler), // Hotspot
         *     (v1.01a+)showProc: function(battler), // Hotspot
         *     (v1.01a+)procUpdateRate: function(battler) // Hotspot
         * }
         * All functions will be bound to the Window_Status_Bar upon its creation
         * and must take the battler and database item using the SBX as their
         * arguments
         *
         * Status bar configuration functions:
         * The function result of visible, which is the status bar visibility, will
         * be interpreted as truthy or falsy only
         * The function of opacity, which is the status bar opacity, must return a
         * Number between 0 and 255
         * The functions of backColor, color1 and color2, which are the status bar
         * back, 1st and 2nd colors respectively, must return a Number between
         * #00000000 and #FFFFFFFF
         * The functions of x and y, which are the status bar x and y offsets from
         * the battler sprites respectively, must return a Number
         * The functions of w and h, which are the status bar width and height
         * respectively, must return a positive Number
         * The function of text, which is the status bar description text, must
         * return a String
         * The functions of textX, textY and textSize, which are the status bar
         * description text x and y offset from the status bar, and size
         * respectively, must return a positive Number
         * The functions of min and max, which are the minimum and maximum value of
         * the status respiectively, must return a Number that must be not greater
         * than and not less than all the possible values of the current value
         * respectively
         * (v1.01a+)The functions of showProc, which is whether the stat change
         * processes will be shown on the status bars, will be interpreted as truthy
         * or falsy only
         * (v1.01a+)The functions of procUpdateRate, which is the rate relative to
         * the max length of the stat bar per second, must return a Number between 0
         * and 1
         * (v1.01a+)The functions of procColor1 and procColor2, which are the status
         * bar 1st and 2nd stat change colors respectively, must return a Number
         * between #00000000 and #FFFFFFFF
         *
         * SBX names can only use alphanumeric characters
         * The below SBX are examples added to help you set your SBX
         * You can freely use, rewrite and/or delete these examples
         *
         * Advanced:
         * The status bar prototype's inherited from Window_Base.prototype
         * All status bar configuration functions are used by Window_Status_Bar
         * visible and opacity are used in _updateBarVisibility
         * backColor, color1, color2, textColor, text, textX and textY are used in
         * _updateSetting
         * x, y, w and h are used in initialize
         * x is also used in _updateX
         * y is also used in _updateY
         * w is also used in _updateW
         * h is also used in _updateH
         * min and max are used in _updateFillW
         * (v1.01a+)showProc
         */
    You'll have to change the value returned by the y function of the SBX you're using, like HP, MP and TP :)

    You'll have to test these values yourself until you find those that work for you, but you may first try the following y values:
    bar_y - 48
    y function of HP - 0
    y function of MP - 16
    y function of TP - 32
  11. DoubleX said:
    There's a way, but you'll have to edit the parameters of both plugins:

    DoubleX RMMZ Popularized ATB Bar -
    Code:
    * @param bar_y
    * @desc Sets the y offset of the ATB bars shown on the battler sprites as bar_y
    * It'll only be used by battlers not using any <patb bar y: y> notetag
    * @Default 0

    DoubleX RMMZ Status Bars -
    Code:
        /*------------------------------------------------------------------------
         *    Status Bar Functions
         *    - Setups SBX used by <status bar: SBX>
         *------------------------------------------------------------------------*/
        /* SBX are used by Window_Status_Bar at this._cfg = SB[this._cfgName](); in
         * _updateCfg
         * SBX are Javascript functions which must return an Object having at least
         * the following:
         * {
         *     visible: function(battler), // Hotspot
         *     opacity: function(battler), // Hotspot
         *     backColor: function(battler), // Hotspot
         *     color1: function(battler), // Hotspot
         *     color2: function(battler), // Hotspot
         *     x: function(battler), // Hotspot
         *     y: function(battler), // Hotspot
         *     w: function(battler), // Hotspot
         *     h, function(battler), // Hotspot
         *     text, function(battler), // Hotspot
         *     textX: function(battler), // Hotspot
         *     textY: function(battler), // Hotspot
         *     textSize: function(battler), // Hotspot
         *     textColor: function(battler), // Hotspot
         *     min: function(battler), // Hotspot
         *     max: function(battler), // Hotspot
         *     (v1.01a+)showProc: function(battler), // Hotspot
         *     (v1.01a+)procUpdateRate: function(battler) // Hotspot
         * }
         * All functions will be bound to the Window_Status_Bar upon its creation
         * and must take the battler and database item using the SBX as their
         * arguments
         *
         * Status bar configuration functions:
         * The function result of visible, which is the status bar visibility, will
         * be interpreted as truthy or falsy only
         * The function of opacity, which is the status bar opacity, must return a
         * Number between 0 and 255
         * The functions of backColor, color1 and color2, which are the status bar
         * back, 1st and 2nd colors respectively, must return a Number between
         * #00000000 and #FFFFFFFF
         * The functions of x and y, which are the status bar x and y offsets from
         * the battler sprites respectively, must return a Number
         * The functions of w and h, which are the status bar width and height
         * respectively, must return a positive Number
         * The function of text, which is the status bar description text, must
         * return a String
         * The functions of textX, textY and textSize, which are the status bar
         * description text x and y offset from the status bar, and size
         * respectively, must return a positive Number
         * The functions of min and max, which are the minimum and maximum value of
         * the status respiectively, must return a Number that must be not greater
         * than and not less than all the possible values of the current value
         * respectively
         * (v1.01a+)The functions of showProc, which is whether the stat change
         * processes will be shown on the status bars, will be interpreted as truthy
         * or falsy only
         * (v1.01a+)The functions of procUpdateRate, which is the rate relative to
         * the max length of the stat bar per second, must return a Number between 0
         * and 1
         * (v1.01a+)The functions of procColor1 and procColor2, which are the status
         * bar 1st and 2nd stat change colors respectively, must return a Number
         * between #00000000 and #FFFFFFFF
         *
         * SBX names can only use alphanumeric characters
         * The below SBX are examples added to help you set your SBX
         * You can freely use, rewrite and/or delete these examples
         *
         * Advanced:
         * The status bar prototype's inherited from Window_Base.prototype
         * All status bar configuration functions are used by Window_Status_Bar
         * visible and opacity are used in _updateBarVisibility
         * backColor, color1, color2, textColor, text, textX and textY are used in
         * _updateSetting
         * x, y, w and h are used in initialize
         * x is also used in _updateX
         * y is also used in _updateY
         * w is also used in _updateW
         * h is also used in _updateH
         * min and max are used in _updateFillW
         * (v1.01a+)showProc
         */
    You'll have to change the value returned by the y function of the SBX you're using, like HP, MP and TP :)

    You'll have to test these values yourself until you find those that work for you, but you may first try the following y values:
    bar_y - 48
    y function of HP - 0
    y function of MP - 16
    y function of TP - 32
    Thank you i changed the parameters and got this as result. One more thing i didnt also find the option to include the HP, MP, TP Text in the Bars. Is there an option the the plugin which i may have overlooked?
  12. Step43 said:
    Thank you i changed the parameters and got this as result. One more thing i didnt also find the option to include the HP, MP, TP Text in the Bars. Is there an option the the plugin which i may have overlooked?
    This time you'll have to use their text functions, and for instance, the default of that of HP is this:
    Code:
                text: function(battler) { // Hotspot
                    return battler.hp.toString() + '/' + battler.mhp.toString();
                },
    So if you want something like HP 5000/5000, you can simply change the text function of HP to this:
    Code:
                text: function(battler) { // Hotspot
                    return 'HP ' + battler.hp.toString() + '/' + battler.mhp.toString();
                },
    The same applies to MP and TP as well :)
  13. Thank you just like i wanted to have!Statusbar_Fixed.PNG :XP1:
  14. Hi DoubleX its me again! While making my game i tried to add a sv_actor as enemy. My result was that the enemy actor was shown but the status/atb bar is mirroring. Probably in order to position the actor in the right direction.

    Any solution to this?

    1640795633033.png
  15. I recall that someone else had the same compatibility issue with Yanfly's Animated sideview earlier, but I failed to reproduce the issue back then, so would you mind sending me your project(with all paid plugins stripped off of course) in pm so I can have a better hope of reproducing it?