DoubleX RMMV Popularized ATB Order

Discussion in 'JS Plugin Releases (RMMV)' started by DoubleX, Jun 2, 2016.

  1. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    Note


    This plugin's available for commercial use


    Purpose


    Lets you set the battle to show all battlers' atb in 1 bar


    Games using this plugin


    None so far


    Configurations

    * @param show_battler_order_window
    * @desc Setups a window in battle showing all battler atb statuses if
    * show_battler_order_window is set as true
    * @Default true
    *
    * @param battler_order_window_x
    * @desc Sets the x position of the battler order window as
    * battler_order_window_x
    * @Default 400
    *
    * @param battler_order_window_y
    * @desc Sets the y position of the battler order window as
    * battler_order_window_y
    * @Default 108
    *
    * @param battler_order_window_width
    * @desc Sets the width of the battler order window as
    * battler_order_window_width
    * @Default 416
    * @param battler_order_window_height
    * @desc Sets the height of the battler order window as
    * battler_order_window_height
    * @Default 120
    *
    * @param battler_order_bar_width
    * @desc Sets the width of each atb bar shown in the battler order window as
    * battler_order_bar_width
    * @Default 116
    *
    * @param battler_order_bar_x
    * @desc Sets the x position of the atb bars shown in the battler order window
    * as battler_order_bar_x
    * @Default 16
    *
    * @param battler_order_bar_y
    * @desc Sets the y position of the atb bars shown in the battler order window
    * as battler_order_bar_y
    * @Default 12
    *
    * @param battler_order_text_size
    * @desc Sets the size of the atb bar description texts shown in the battler
    * order window as battler_order_text_size
    * @Default 28
    *
    * @param battler_order_text_x
    * @desc Sets the x position of the atb bar description texts shown in the
    * battler order window as battler_order_text_x
    * @Default 18
    *
    * @param battler_order_text_y
    * @desc Sets the y position of the atb bar description texts shown in the
    * battler order window as battler_order_text_y
    * @Default 24
    *
    * @param battler_order_sprite_size
    * @desc Sets the size of the battler sprites in the battler order window as
    * battler_order_sprite_size
    * @Default 40
    *
    * @param battler_order_sprite_opacity
    * @desc Sets the opacity of the battler sprites in the battler order window
    * as battler_order_sprite_opacity
    * @Default 255
    *
    * @param battler_order_sheet_folder
    * @desc Sets the folder of the sprite sheet used by the battler sprites in the
    * battler order window as battler_order_sheet_folder
    * @Default img/system/
    *
    * @param battler_order_sheet_name
    * @desc Sets the filename of the sprite sheet in battler_order_sheet_folder
    * used by the battler sprites in the battler order window as
    * battler_order_sheet_name
    * @Default IconSet
    *
    * @param battler_order_sheet_hue
    * @desc Sets the hue of battler_order_sheet_name used by the battler sprites in
    * the battler order window as battler_order_sheet_hue
    * @Default 0
    *
    * @param battler_order_sheet_smooth
    * @desc Sets the smooth flag of battler_order_sheet_name used by the battler
    * sprites in the battler order window as battler_order_sheet_smooth
    * @Default true
    *
    * @param battler_order_sprite_width
    * @desc Sets the width of each sprite in sprite sheet used by the battler
    * sprites in the battler order window as battler_order_sprite_width
    * @Default 32
    *
    * @param battler_order_sprite_height
    * @desc Sets the height of each sprite in sprite sheet used by the battler
    * sprites in the battler order window as battler_order_sprite_height
    * @Default 32
    *
    * @param battler_order_sprite_x
    * @desc Sets the leftmost x position of the battler sprites in the battler
    * order window as battler_order_sprite_x
    * @Default 14
    *
    * @param actor_order_sprite_y
    * @desc Sets the y position of the actor sprites in the battler order window
    * as actor_order_sprite_y
    * @Default 8
    *
    * @param enemy_order_sprite_y
    * @desc Sets the y position of the enemy sprites in the battler order window
    * as enemy_order_sprite_y
    * @Default 72



    Notetags

    * # Actor/Class/Weapon/Armor/Enemy/State Notetags:
    * State notetags take the highest priority, followed by enemy, weapon,
    * armor, class and actor
    * Notetag settings override their correponding configuration settings
    * 1. <patb order icon index: row, column>
    * - Sets the row and column of icon used by this battler's sprite in
    * the battler order window as row and column respectively
    * - The row and column are used with battler_order_sheet_name
    * - The 1st notetag that's being read by the battler will be used
    * - If either row or column is neagtive or this notetag's absent, the
    * actors' face graphics will be used for actors and the enemies'
    * battler sprites will be used for enemies
    * 2. <patb order icon opacity: opacity>
    * - Sets the opacity of icon used by this battler's sprite in the
    * battler order window as opacity ranged from 0 to 255
    * - The 1st notetag that's being read by the battler will be used



    Plugin Calls

    * # 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
    * # Data actor/class/weapon/armor/enemy/state manipulations
    * 1. meta.patb_order_icon_index
    * - Returns the row and column of icon used by this battler's sprite
    * in the battler order window stored in
    * <patb order icon index: row, column> in the form of [row, column]
    * 2. meta.patb_order_icon_index = [row, column]
    * - Sets the index of icon used by this battler's sprite in the
    * battler order window stored in
    * <patb order icon index: row, column> in the form of [row, column]
    * - All meta.patb_order_icon_index changes can be saved if
    * DoubleX RMMV Dynamic Data is used
    * 3. meta.patb_order_icon_opacity
    * - Returns the opacity of icon used by this battler's sprite in the
    * battler order window stored in <patb order icon opacity: opacity>
    * as Number opacity ranged from 0 to 255
    * 4. meta.patb_order_icon_opacity = opacity
    * - Sets the opacity of icon used by this battler's sprite in the
    * battler order window stored in <patb order icon opacity: opacity>
    * as Number opacity ranged from 0 to 255
    * - All meta.patb_order_icon_opacity changes can be saved if
    * DoubleX RMMV Dynamic Data is used



    Video










    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

    * v1.01b(GMT 1400 5-8-2017):
    * 1. Fixed "missing this in forEach" bug causing crashes in battle tests
    * v1.01a(GMT 0500 16-7-2016):
    * 1. Added <patb order sheet folder: folder>,
    * <patb order sheet name: name>, <patb order icon hue: hue> and
    * <patb order icon smooth: smooth>
    * 2. Fixed <patb order icon index: row, column> and
    * <patb order icon opacity: opacity> notetag value not being number
    * 3. Increased this plugin's effectiveness, efficiency and simplicity
    * v1.00b(GMT 1400 2-7-2016):
    * 1. Fixed not updating the actor icon after changing actors in battle
    * 2. Fixed below configuration changes not taking place in same battle:
    * - battler_order_window_x
    * - battler_order_window_y
    * - battler_order_window_width
    * - battler_order_window_height
    * - battler_order_bar_width
    * - battler_order_bar_x
    * - battler_order_bar_y
    * - battler_order_text_size
    * - battler_order_text_x
    * - battler_order_text_y
    * - battler_order_sprite_size
    * - battler_order_sheet_folder
    * - battler_order_sheet_name
    * - battler_order_sheet_hue
    * - battler_order_sheet_smooth
    * - battler_order_sprite_width
    * - battler_order_sprite_height
    * - battler_order_sprite_x
    * - actor_order_sprite_y
    * - enemy_order_sprite_y
    * 3. Increased this plugin's effectiveness, efficiency and flexibility
    * v1.00a(GMT 1400 31-5-2016):
    * 1. 1st completed version of this plugin finished

    DoubleX RMMV Popularized ATB Order v101b.rar

    DoubleX RMMV Popularized ATB Order
     

    Attached Files:

    Last edited: Aug 5, 2017
    #1
    VanillaBrocker likes this.
  2. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    Updates

    Code:
     *      v1.00b(GMT 1400 2-7-2016):                                            
     *      1. Fixed not updating the actor icon after changing actors in battle  
     *      2. Fixed below configuration changes not taking place in same battle: 
     *         - battler_order_window_x                                           
     *         - battler_order_window_y                                           
     *         - battler_order_window_width                                       
     *         - battler_order_window_height                                      
     *         - battler_order_bar_width                                          
     *         - battler_order_bar_x                                              
     *         - battler_order_bar_y                                              
     *         - battler_order_text_size                                          
     *         - battler_order_text_x                                             
     *         - battler_order_text_y                                             
     *         - battler_order_sprite_size                                        
     *         - battler_order_sheet_folder                                       
     *         - battler_order_sheet_name                                         
     *         - battler_order_sheet_hue                                          
     *         - battler_order_sheet_smooth                                       
     *         - battler_order_sprite_width                                       
     *         - battler_order_sprite_height                                      
     *         - battler_order_sprite_x                                           
     *         - actor_order_sprite_y                                             
     *         - enemy_order_sprite_y                                             
     *      3. Increased this plugin's effectiveness, efficiency and flexibility  
     
    #2
  3. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    Updates

    Code:
     *      v1.01a(GMT 0500 16-7-2016):                                           
     *      1. Added <patb order sheet folder: folder>,                           
     *      <patb order sheet name: name>, <patb order icon hue: hue> and         
     *      <patb order icon smooth: smooth>                                      
     *      2. Fixed <patb order icon index: row, column> and                     
     *         <patb order icon opacity: opacity> notetag value not being number  
     *      3. Increased this plugin's effectiveness, efficiency and simplicity   
     
    #3
  4. Cinnamon

    Cinnamon Veteran Veteran

    Messages:
    605
    Likes Received:
    209
    First Language:
    English
    var patb = $gameSystem.patb);

    needed to be added to Sprite_Patb_Order_Battler_Icon.prototype.isSameIcon = function()

    :)

    I added the script but I don't see the bar anywhere?
     
    #4
  5. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    Where does that script come from?
    The bar should be shown just by setting show_battler_order_window as true and setting proper window configuration values :)
     
    #5
  6. Cinnamon

    Cinnamon Veteran Veteran

    Messages:
    605
    Likes Received:
    209
    First Language:
    English
    I just used the standard settings, I didn't change any settings. Is that wrong? The bar is not showing up at all. :/

    I had to add that one line because local variable patb wasn't being declared in that function, giving a JS error. It's not actually relevant to the bar showing up. It's just an error in the original script that I had to fix, I wanted to let you know. :)

    By the way, thank you for responding to all my messages. I'm not sure if there's any released game with your script yet, so I'm happy to do that & make it look great. :)
     

    Attached Files:

    #6
  7. Cinnamon

    Cinnamon Veteran Veteran

    Messages:
    605
    Likes Received:
    209
    First Language:
    English
    Code:
    TypeError: Cannot read property '_actor_sprites' of undefined
        at file:///C:/AJ/RPG%20Maker/OH!%202/OH!%20ANOTHER%20RPG!/js/plugins/DoubleX%20RMMV%20Popularized%20ATB%20Order%20v101a.js:886:17
        at Array.forEach (native)
        at Window_Patb_Order.addActorSprites (file:///C:/AJ/RPG%20Maker/OH!%202/OH!%20ANOTHER%20RPG!/js/plugins/DoubleX%20RMMV%20Popularized%20ATB%20Order%20v101a.js:885:37)
        at Window_Patb_Order.update (file:///C:/AJ/RPG%20Maker/OH!%202/OH!%20ANOTHER%20RPG!/js/plugins/DoubleX%20RMMV%20Popularized%20ATB%20Order%20v101a.js:798:10)
        at file:///C:/AJ/RPG%20Maker/OH!%202/OH!%20ANOTHER%20RPG!/js/rpg_core.js:7029:19
        at Array.forEach (native)
        at WindowLayer.update (file:///C:/AJ/RPG%20Maker/OH!%202/OH!%20ANOTHER%20RPG!/js/rpg_core.js:7027:19)
        at file:///C:/AJ/RPG%20Maker/OH!%202/OH!%20ANOTHER%20RPG!/js/rpg_scenes.js:262:19
        at Array.forEach (native)
        at Scene_Battle.Scene_Base.updateChildren (file:///C:/AJ/RPG%20Maker/OH!%202/OH!%20ANOTHER%20RPG!/js/rpg_scenes.js:260:19)
    for...

    Code:
    if (this._actor_sprites[actorId]) { return; }
    in...

    Code:
    Window_Patb_Order.prototype.addActorSprites = function() {
        var mem;
        $gameParty.added_patb_actor_ids.forEach(function(actorId) {
            if (this._actor_sprites[actorId]) { return; }
            mem = $gameActors.actor(actorId);
            this._actor_sprites[actorId] = new Sprite_Patb_Order_Actor_Icon(mem);
            this.addChild(this._actor_sprites[actorId]);
        });
        $gameParty.added_patb_actor_ids.length = 0;
    }; // Window_Patb_Order.prototype.addActorSprites
    :kaoback:
     
    #7
  8. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    Unfortunately, as you've so many other plugins, and this issue shouldn't even be possible to happen without compatibility issues, I'm afraid that you'll have to give me your project so I can have a better chance of knowing what's going on :)
     
    #8
    Cinnamon likes this.
  9. Cinnamon

    Cinnamon Veteran Veteran

    Messages:
    605
    Likes Received:
    209
    First Language:
    English
    Wow, would that be okay? I have all plugins in the project that I will ever use and need, so it'd be super amazing if you could take a quick look at this issue and the one where the targeting doesn't refresh properly.

    I'll cut down the file size and make it a nice testing set up. <3 <3 <3
     
    #9
  10. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    I failed to reproduce the error in RMMV 1.5.0 on Steam, as the order addon works just fine in your project in this case. Maybe the error occurred due to you not starting over the game right after adding that addon :). I've already attached the corresponding screenshot in the pm.

    P.S.: The death icon is due to the use of the notetag <patb order icon index: 1, 1> with battler_order_sheet_folder as img/system/ and battler_order_sheet_name as IconSet:
    Code:
     *      1. <patb order icon index: row, column>
     *         - Sets the row and column of icon used by this battler's sprite in
     *           the battler order window as row and column respectively
     *         - The row and column are used with battler_order_sheet_name
     *         - The 1st notetag that's being read by the battler will be used
     *         - If either row or column is neagtive or this notetag's absent, the
     *           actors' face graphics will be used for actors and the enemies'
     *           battler sprites will be used for enemies
     
    #10
  11. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    Updates
    Code:
     *      v1.01b(GMT 1400 5-8-2017):
     *      1. Fixed "missing this in forEach" bug causing crashes in battle tests
     
    #11
  12. wrap

    wrap Villager Member

    Messages:
    9
    Likes Received:
    6
    First Language:
    Japanese
    Primarily Uses:
    RMMV
    Is it possible to display the prediction on the bar while the actor is selecting a command?
    (It corresponds to speed Number.)

    Sorry, I'm using a translator.
     
    #12
    DoubleX likes this.
  13. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    542
    First Language:
    Chinese
    Primarily Uses:
    N/A
    I'm afraid that it's just impossible, at least for non full wait mode.
    It's because in order for the prediction to be effectively and efficiently displayed, the relative ordering among the battlers must be shown in the CTB style(i.e., who ).
    But for non full wait ATB, this relative ordering can change at any frame, meaning that it's possible to have cases where there would not have enough time to display a change in the relative ordering before another change takes place, leading to predictions that are worse than useless.
    Although I've thought about supporting prediction for full wait atb only, as players can change the atb wait mode from full wait to non full wait during the same battle, it'd mean constantly showing and hiding the prediction display, which could be even more confusing :)
     
    #13
  14. wrap

    wrap Villager Member

    Messages:
    9
    Likes Received:
    6
    First Language:
    Japanese
    Primarily Uses:
    RMMV
    Probably I understood what you mean.
    As you say, unless it is displayed effectively, it has no meaning.
    I want to make a game thinking strategy using time.
    So you do not choose non full wait.
    Thanks for the reply, DoubleX!
     
    #14
    DoubleX likes this.

Share This Page