Biud436's HUD (Multiple HUD)

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
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














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




  • 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:

Yoshifull

Veteran
Veteran
Joined
Oct 31, 2015
Messages
49
Reaction score
4
First Language
French
Primarily Uses
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.
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
First Language
Korean
Primarily Uses
RMMV
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.


Thank you. Fixed a bug.
 

domsei

Warper
Member
Joined
Sep 21, 2014
Messages
1
Reaction score
0
First Language
German
Primarily Uses
What does this mean?


Type error:


Cannot read property show of undefined
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
First Language
Korean
Primarily Uses
RMMV
What does this mean?


Type error:


Cannot read property show of undefined


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.
 

Tiduril

Villager
Member
Joined
May 4, 2016
Messages
9
Reaction score
2
First Language
German, Dutch
Primarily Uses
is there a way to disable the MP and EXP bar? that would help me a lot! :)
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
First Language
Korean
Primarily Uses
RMMV
is there a way to disable the MP and EXP bar? that would help me a lot! :)


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)
 

Tiduril

Villager
Member
Joined
May 4, 2016
Messages
9
Reaction score
2
First Language
German, Dutch
Primarily Uses
Oh, wonderful! Looks perfect now! thank you so much for your work. :)


beispiel.png
 
Last edited by a moderator:

CrimsonNightfox

Veteran
Veteran
Joined
Mar 5, 2016
Messages
34
Reaction score
6
First Language
English
Primarily Uses
Is there a way to have it only shown in battle?
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
First Language
Korean
Primarily Uses
RMMV
Is there a way to have it only shown in battle?


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.




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 : 
 

CrimsonNightfox

Veteran
Veteran
Joined
Mar 5, 2016
Messages
34
Reaction score
6
First Language
English
Primarily Uses
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:

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
First Language
Korean
Primarily Uses
RMMV
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.


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)
 

sirgames

Veteran
Veteran
Joined
Jan 24, 2016
Messages
37
Reaction score
18
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?
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
First Language
Korean
Primarily Uses
RMMV
it's possible to see 5 battle hud in battle instead of 4 with 5 party members? and manually positioning the hud?





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];
  };
 

Krazymouse

Villager
Member
Joined
Jun 1, 2015
Messages
12
Reaction score
2
First Language
English
Primarily Uses
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!
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
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]
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
364
Reaction score
199
First Language
English
Primarily Uses
Never mind my question...as usual I got it right after I posted. Nice plugin!
 
Last edited by a moderator:

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
364
Reaction score
199
First Language
English
Primarily Uses
One question I do have...can I change the size or type of font used for the text on the HUD?
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
160
Reaction score
155
First Language
Korean
Primarily Uses
RMMV
One question I do have...can I change the size or type of font used for the text on the HUD?


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]
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly! Going to do another art stream tonight so that I can finish my Fauna Focus piece~ Feel free to drop by!
Humans are fallible creatures, we all know that. It's when we're forced to look at ourselves that we start to disagree. :p
Expectation: Working on boss battle.
Reality: "Look at how awful are these code and database organization. Let me clean this mess", *yet, casually adding more modules that I have no idea if I would use it later*
Trying to learn to read Japanese so I read my manga. I like to buy them without all the edits made during translation.
The only thing getting me through today so far is coffee. And lots of it.

Forum statistics

Threads
97,852
Messages
947,384
Members
129,079
Latest member
DerLaPux
Top