Biud436's HUD (Multiple HUD)

Discussion in 'JS Plugin Releases (RMMV)' started by biud436, Mar 18, 2016.

    Tags:
  1. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV

    Biud436's HUD (Multiple HUD) 1.2.8


    by Biud436


    Introduction


    This plugin draws the HUD that displays the hp and mp and exp and level of each party members.


    Screenshots



    [​IMG]





    [​IMG]






    How to Use

    • Adding a Plugin to your Project

    Download the plugin and place it in the folder called your_project_directory/js/plugins.


    Then In Plugin Manager, Select the RS_HUD_4m plugin and add it.

    • Adding Resources to your Project


    Download the resources and place them in the folder called img/pictures.


    All the resources can download in the following link.


    Resources Download


    [​IMG]

    • Plugin Manager / Plugin Parameters
    In Plugin Manager, You have to pre-load the resources using the parameter called 'preloadImportantFaces'. It basically pre-loads the face called 'Actor1' and 'Actor2' and 'Actor3'. (If you do not set this parameter, It can cause errors in the game)


    • Custom Position
    To display in correct place, you need to know which predefined variables are currently available. You can be available predefined variables as belows when specifying the parameter named 'Custom Pos'. So you can quickly set up positions for a hud itself.

    Predefined Variables :
    W - 'W' is the same as a parameter named 'Width' in Plugin Manager.
    H - 'H' is the same as a parameter named 'Height' in Plugin Manager
    PD - 'PD' is the same as a parameter named 'Margin' in Plugin Manager
    BW - 'BW' is the same as a maximum width of the game canvas.
    BH - 'BH' is the same as a maximum height of the game canvas.

    Each sprites draw at changing position relative to the background sprite. Therefore, this custom position is pretty important values.

    Note Tags

    Insert the following the notetag into the map property window as below.

    <DISABLE_HUD> : A notetag can use in the map that does not wish create each huds.

    Code

    Set Opacity
    Sets the opacity of the HUD to x.

    $gameHud.opacity = x;

    That is a number between 0 and 255.

    For example :
    $gameHud.opacity = 128;


    Set visibility
    This variable will change the visible option of the HUD.

    $gameHud.show = true/false;

    For example :
    $gameHud.show = false;

    Refresh Texts
    In general, text and gauge sprites refresh when requesting a refresh so this one is not updated on every frame. Therefore if you need to immediately refresh all texts for themselves, you will use as belows.

    $gameTemp.notifyHudTextRefresh();

    Clear and create all huds
    if you need to immediately recreate for all Huds, you will use as belows.

    $gameTemp.notifyHudRefresh();



    Plugin Commands

    This plugin command adjusts the opacity of the HUD. The x is number value between 0 and 255.

    Code:
    
    RS_HUD Opacity x
    This plugin command sets the HUD's visible status to true.

    Code:
    
    RS_HUD Visible true


    This plugin command sets the HUD's visible status to false.

    Code:
    
    RS_HUD Visible false

    Import the parameter as the json file from your data folder.

    Code:
    
    RS_HUD import file_name


    Export the current parameter as the json file to your data folder.

    Code:
    
    RS_HUD export file_name



    Demo

    The demo file can download in the following link.


    Demo Download


    Plugins


    This plugin can be found in the following link.


    - Github RAW


    - Battle Addon : This plugin requires YEP_BattleEngineCore and YEP_X_BattleSysATB files and then you should put additional image file in your project/img/pictures folder.


    Change Log

    2015.10.31 (v1.0.0) - First Release
    2016.02.24 (v1.0.1) - Added the Plugin Command.
    2016.03.04 (v1.0.2) - Added the note called @requiredAssets which is added in 1.1.0 version.
    2016.03.18 (v1.0.3) - Added the parameter called 'Arrangement'


    2016.03.26 (v1.0.4) - Fixed a bug that the HUD is always displayed regardless of the setting whenever transferring the player to the other map.


    2016.05.05 (v1.0.5) - Fixed a bug that the text does not change.


    2016.05.17 (v1.0.6) - Fixed a structure of the class.


    2016.05.21 (v1.0.7) - Added the plugin parameter that can be able to display the plugin in battle mode only.
    2016.05.21 (v1.0.8) - Fixed a bug of the opacity.


    2016.06.30 (v1.0.9) - Added the parameter that displays the values with commas every three digits.


    2016.07.30 (v1.1.0) - Added the parameter for setting fonts.


    2016.09.05 (v1.1.1) - Now you can change the image file name, and can also be used the option called 'exclude the unused files'.


    2016.09.13 (v1.1.2) - Added Max Exp Text and Fixed the exp rate.


    2016.09.26 (v1.1.3) :
    - Added the function that could be re-positioning with all the components.
    - Added the glittering gauge-bar effects in lower HP or MP value.
    - Added the function that can display the name.
    - HUD's opacity will decrease if the player is colliding with HUD.
    - The HUDs opacity will be decreased if the party member is dead.


    2016.09.27 (v1.1.4) :
    - HUD's visible setting sets as the false before calling the battle.
    - Added the function that allows all plugin parameters to import or export.


    2016.10.08 (v1.1.5) - Fixed a bug that happens in battle.


    2016.10.11 (v1.1.6) :
    - Fixed the bug that happens when certain party member is removed.
    - Fixed the bug about the global opacity variable.


    2016.10.14 (v1.1.7) - Fixed the bug that causes the error called 'undefined bitmap' when you are adding certain party member.


    2016.11.16 (v1.1.8) - Fixed a bug with the Battle Background.


    2016.12.19 (v1.1.8b) - Fixed a bug that is not set up the coordinates of the face image.


    2016.12.22 (v1.1.9) :
    - Now this plugin does not perform a changing opacity and tone in mobile devices, because of poor performance.
    - Fixed to update the texts through event handlers.
    - Fixed an issue that plugins did not work due to image position data parsing errors in crosswalk.


    - Fixed an issue that can not be saved due to this update.


    2017.01.06 (v1.2.0) :
    - Fixed to redraw the Hud when using the $gameParty.swapOrder method.
    - Fixed the hud to process the refresh when the event lisnter listens a refresh request.
    $gameHud.refresh() -> $gameTemp.notifyHudRefresh();


    2017.01.25 (v1.2.1) - Fixed a bug that causes the null when 'battle only' parameter is true.


    2017.01.26 (v1.2.2) :
    - Fixed a bug that is not working to preload
    - Added a new parameter that could increase the number of the HUD.
    - Added parameters for user custom HUD position.
    - Fixed an issue that is not working in battle test mode

    2017.03.06 (v1.2.3) :
    - Added many descriptions for plugin parameters and help section.
    - Altered the hud to be updated all parameters once when initializing.

    2017.04.13 (v1.2.4) - Fixed the issue that the parameters update function is properly not working in case of you're not using the battle addon, in a community version.
    2017.06.08 (v1.2.5) - Fixed the issue that is not displaying specific image in RMMV 1.5
    2017.09.17 (v1.2.6) - Fixed the bug that cause the error when restarting the game.
    2017.10.26 (v1.2.7) - This plugin has applied with the new plugin manager features in the plugin parameters.
    2017.10.27 (v1.2.7b) - Fixed the issue that has the endless loading when using the custom font.
    2018.05.09 (v1.2.8) - Supported a face image that is made using SumRndmDde's CharacterCreatorEX plugin.



    Credit and Thanks
    - Biud436


    Terms of Use
    Free for commercial and non-commercial use.
     
    Last edited: May 9, 2018
    #1
    SimProse, JosephSeraph, Volis and 8 others like this.
  2. Yoshifull

    Yoshifull Veteran Veteran

    Messages:
    44
    Likes Received:
    4
    First Language:
    French
    That's a nice plugin, but it always displays the HUD again after teleporting to another script, even when $gameHud.show is false.


    That may be a problem.
     
    #2
  3. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV


    Thank you. Fixed a bug.
     
    #3
  4. domsei

    domsei Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    German
    What does this mean?


    Type error:


    Cannot read property show of undefined
     
    #4
  5. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV


    I guess that sometimes you can happen the error message when you are using specific plugin. So you delete this plugin to solve for error message and then you need to add the plugin in the last section of the plugin manager. If It has not been solved yet, I will need for more information to solve the error message. Could you give me more details about the error message? To fix the error, you will have capturing the error message from the developer tools.
     
    #5
  6. Tiduril

    Tiduril Villager Member

    Messages:
    9
    Likes Received:
    2
    First Language:
    German, Dutch
    is there a way to disable the MP and EXP bar? that would help me a lot! :)
     
    #6
  7. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV


    To disable specific image, before that I think you should be able to prepare a new empty image (hud_window_empty.png).


    After that you should modify the RS_HUD_4m.js by executing the text editor such as Atom


    And here are some important instance variables:


    - A variable called this._mpText is the text variable that indicates the MP of specific party member.
    - A variable called this._expText is the text variable that indicates the EXP of specific party member.
    - A variable called this._mp is the ratio variable that indicates the MP of specific party member.
    - A variable called this._exp is the ratio variable that indicates the EXP of specific party member.


    I think that you should set them that these are invisible or you should handle them as a comment. It looks like this (example)

    HUD.prototype.initialize = function(config) {
    Stage.prototype.initialize.call(this);
    this.visible = false;
    this.createHud();
    this.setAnchor(config.szAnchor || "LeftBottom");
    this.setMemberIndex(parseInt(config.nIndex) || 0);
    this.createFace();
    this.createHp();
    //this.createMp();
    //this.createExp();
    this.createText();
    this.setPosition();
    };

    HUD.prototype.createText = function() {
    this._hpText = this.addText(this.getHp.bind(this));
    // this._mpText = this.addText(this.getMp.bind(this));
    // this._expText = this.addText(this.getExp.bind(this));
    this._levelText = this.addText(this.getLevel.bind(this));
    };

    HUD.prototype.setPosition = function() {
    if(this._face) { this.setCoord(this._face, 0, 0); }
    this.setCoord(this._hp, 160, 43);
    // this.setCoord(this._mp, 160, 69);
    // this.setCoord(this._exp, 83, 91);
    this.setCoord(this._hpText, 160, 43);
    // this.setCoord(this._mpText, 160, 69);
    this.setCoord(this._levelText, 60, 71);
    // this.setCoord(this._expText, 120.5, 83);
    };

    HUD.prototype.paramUpdate = function() {
    this._hp.setFrame(0, 0, this.getHpRate(), this._hp.height );
    // this._mp.setFrame(0, 0, this.getMpRate(), this._mp.height );
    // this._exp.setFrame(0, 0, this.getExpRate(), this._exp.height );
    this._hpText.update();
    // this._mpText.update();
    // this._expText.update();
    this._levelText.update();

    if(this._face.bitmap._image === (null || undefined)) {
    this.removeChild(this._face);
    this.createFace();
    }

    };


    * The comment starts with //
    * A property called visible determines whether the object is visible or invisible. (true = visible, false = invisible)
     
    #7
    Tiduril likes this.
  8. Tiduril

    Tiduril Villager Member

    Messages:
    9
    Likes Received:
    2
    First Language:
    German, Dutch
    Oh, wonderful! Looks perfect now! thank you so much for your work. :)


    beispiel.png
     
    Last edited by a moderator: May 20, 2016
    #8
    StefSan and biud436 like this.
  9. CrimsonNightfox

    CrimsonNightfox Veteran Veteran

    Messages:
    34
    Likes Received:
    6
    Location:
    Clarksville, TN
    First Language:
    English
    Is there a way to have it only shown in battle?
     
    #9
  10. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV


    I added that function via the add-on.


    To add that function, You need to change the status of specific parameter. Also, To use it, You must have RS_HUD_4m 1.0.8, or later versions. In Plugin Manager, double-click RS_HUD_4m plugin, and then select the parameter called 'Battle Only'. The default value of the parameter called 'Battle Only' is false. HUD will be invisible status if it is true. 


    An add-on plugin also requires a new image. Click the following link, and then Right-Click the image and Select the button called Save image as.

    [​IMG]



    Link : https://github.com/biud436/MV/blob/master/HUD/hud_window_empty_inbattle.png


    After that, Copy the image called 'hud_window_empty_inBattle.png' to img/pictures folder. 


    The following demo game shows the example. (For information about the add-on, see RS_HUD_4m_InBattle plugin on the demo game.)


    Link : https://www.dropbox.com/s/v6prurtempabqqv/hud.zip?dl=0


    Test Video : 
     
    #10
    kovak likes this.
  11. CrimsonNightfox

    CrimsonNightfox Veteran Veteran

    Messages:
    34
    Likes Received:
    6
    Location:
    Clarksville, TN
    First Language:
    English
    Ok, it worked with the actors I made and so far it is awesome. May suggest an ATB gauge? I'm currently using yanfly's ATB plugin.
     
    Last edited by a moderator: May 24, 2016
    #11
  12. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV


    In Addon,


    I updated function that could place a circular gauge-bar on the left of the hud using Yanfly's ATB plugin and Yanfly's Battle Engine Core plugin when Battle Screen starts.


    For information about the add-on, See the demo game or the YouTube video.


    Demo (Dropbox)
     
    #12
  13. sirgames

    sirgames Veteran Veteran

    Messages:
    37
    Likes Received:
    19
    First Language:
    Italian
    Primarily Uses:
    N/A
    it's possible to see 5 battle hud in battle instead of 4 with 5 party members? and manually positioning the hud?
     
    #13
  14. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV


    [​IMG]



    In the plugin-parameter called 'Arrangement' of Plugin Manager, You need to add more than one new element to an array as follows.


    ['LeftTop', 'LeftBottom', 'RightTop', 'RightBottom', 'Custom1']



    If you can modify some of the code as follows, That will be possible.

    Code:
      // RS_HUD_4m.js : line 265
      HUD.prototype.getAnchor = function(magnet) {
        var anchor = {
        "LeftTop": {x: nPD, y: nPD},
        "LeftBottom": {x: nPD, y: Graphics.boxHeight - nHeight - nPD},
        "RightTop": {x: Graphics.boxWidth - nWidth - nPD, y: nPD},
        "RightBottom": {x: Graphics.boxWidth - nWidth - nPD, y: Graphics.boxHeight - nHeight - nPD},
        'Custom1': {x: nPD, y: nPD + nHeight}
        };
        return anchor[magnet];
      };
     
    #14
  15. CrimsonNightfox

    CrimsonNightfox Veteran Veteran

    Messages:
    34
    Likes Received:
    6
    Location:
    Clarksville, TN
    First Language:
    English
    This is pretty awesome I gotta say. :D
     
    #15
    biud436 likes this.
  16. Krazymouse

    Krazymouse Villager Member

    Messages:
    12
    Likes Received:
    2
    First Language:
    English
    Hey, loving the plugin, but I was wondering, how to make the action menu rise up in the battle menu, because I wasn't a fan of the menu being on top of the enemies. If it would be possible to move the health bars over on the bottom and move the menu back down, that would be great!
     
    #16
  17. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV
    Multiple HUD v1.0.9 Updated: 
    - Added the parameter that displays the values with commas every three digits.
    - Added a new parameter called 'Auto Windows Alignment' on Multiple HUD Addon 1.1.1
    - Demo Game updated [demo download]
     
    #17
    SimProse and Crashic like this.
  18. SimProse

    SimProse Veteran Veteran

    Messages:
    307
    Likes Received:
    159
    Location:
    United States
    First Language:
    English
    Never mind my question...as usual I got it right after I posted. Nice plugin!
     
    Last edited by a moderator: Jul 28, 2016
    #18
    biud436 likes this.
  19. SimProse

    SimProse Veteran Veteran

    Messages:
    307
    Likes Received:
    159
    Location:
    United States
    First Language:
    English
    One question I do have...can I change the size or type of font used for the text on the HUD?
     
    #19
  20. biud436

    biud436 Veteran Veteran

    Messages:
    135
    Likes Received:
    119
    Location:
    South Korea
    First Language:
    Korean
    Primarily Uses:
    RMMV


    In demo file, You can check a few plugin parameters for setting up text's size or its color or a custom font or the type of the font.


    Multiple HUD v1.1.0 Updated: 
    - Added the parameter for setting fonts.
    - Demo Game updated [demo download]
     
    #20

Share This Page