Orange HUD

Thanks, Hudell!  I'll give this a shot as soon as I get home!  Can't wait! 🙂
@Hudell Okay I'm here ^_^ What you were saying about the 5% thing - I was kind of thinking about that actually, but not sure if that'd work here of what I'm thinking ((because I was thinking for a space game the "Shields" value could use 10 images (each image representing 10% of the shields value - 10 little pips ^_^)) however, for this I think I will try your new gauge. 🙂 Love your scripts by the way; been modifying some of them to work with my game ((like the OrangeHudClock I did my own edits to get a 12 or 24 hour clock by making the Pattern an array:

Spoiler
line.Pattern = line.Pattern.split(',');


Inserting a new parameter:



if (line.MilitaryTime === undefined || line.MilitaryTime.trim() === "") {
line.MilitaryTime = line.MilitaryTime == "true";
}


EDIT: Forgot I had to also change this (since I'm using an array now):



OrangeHudClock.getValue = function(variableData) {
var pattern = variableData.Pattern[0]; // Edited this part


and then finally adjusting the hour section to account for > 12 hours, etc and setting the pattern itself (I used 3 patterns [24HourPattern, 12Hour'am', 12Hour'pm']) 



if (variableData.VariableHour > 0) {
hour = Number($gameVariables.value(variableData.VariableHour)).padZero(2);
if (variableData.MilitaryTime === 'false') {
if (hour > 12) {
hour -= 12;
pattern = variableData.Pattern[2];
} else {
pattern = variableData.Pattern[1];
}
}
}



<<Let me know if you want me to take these down; I only posted my additions just in case for any reason>>


Here's my current pattern setup:
 


[\C[7]%1\C[0]H:\C[7]%2\C[0]M:\C[7]%3\C[0]S],[\C[7]%1\C[0]:\C[7]%2\C[6]am\C[0]],[\C[7]%1\C[0]:\C[7]%2\C[26]pm\C[0]]


And here's what it looks like (also have your Day/Night cycle on so that's why the 8pm background is darker 😛):
screeny.png
@Hudell just curious how did you calculate the 5%?  Var = maxVar; Var /= 20? (events), or did you use actual script/coding? I've decided to make 20-22 pictures, 5% increments (then plus the 0% and 100%) 

 EDIT: Nevermind, I figured out a method ^_^
Loving the new features! And I got my stuff to finally work. Had to update the original plugin xD. Learn from my mistakes, folks.

I added 4 new params to the gauge add on:


ScriptValue, ScriptMaxValue, Height and AutoRefresh


if you set something to the ScriptValue and ScriptMaxValue params, that will be used instead of the variables. 


You can use the following script line to get the HP of the first member of the party:



$gameActors._data[$gameParty._actors[0] || 1].hp


If there's nobody on the party, it will pick the HP from Actor 1 instead (just so it doesn't throw an error).


For the max hp, just change "hp" for "mhp" on that line.


The new AutoRefresh param allow you to disable the auto refresh of the gauge. You can use this if you're experiencing some kind of lag because of a complex script being called to check if the HUD needs to be updated (you shouldn't have a problem with simple scripts).


I also updated the main OrangeHud plugin with an AutoRefresh param that affects all HUDs.



@Hudell Is there a way to display no gauge if the party slot is empty? I plan to display the HP gauges of the 4 party members in the current party, but if the player chooses to just take 3 people with them, I'd like the 4th gauge to not display at all. Is this possible?
Hi there Hudell,


I have a glitch with the gauges


My variable is counting down from 100 to 1 every 60 frames, and this variable is being passed to the gauge.


However, the gauge is blinking on every refresh - it goes completely blank and then comes back again with the new value. Any idea?
Has anyone been able to successfully change the font face for the HUD text? I've tried changing it in the main HUD plugin and the individual line plugins but can't seem to get it working....
Hi there Hudell,


I have a glitch with the gauges


My variable is counting down from 100 to 1 every 60 frames, and this variable is being passed to the gauge.


However, the gauge is blinking on every refresh - it goes completely blank and then comes back again with the new value. Any idea?



Can you make me a simple demo so that I can debug that?

Has anyone been able to successfully change the font face for the HUD text? I've tried changing it in the main HUD plugin and the individual line plugins but can't seem to get it working....



Inside the "fonts" folder of your game, there's a file called gamefont.css. Open that file with a text editor. You'll see the following lines:


@font-face {
font-family: GameFont;
src: url("mplus-1m-regular.ttf");
}


That's the default font used by rpg maker. To be able to use another one, you have do duplicate those lines and replace the name of the file and the name of the font-family. Then you can write the same font-family on OrangeHud and it will work.


I'll also add new options to control the gauge visibility.
Can you make me a simple demo so that I can debug that?



Have sent you a link in a PM, thank you!
Can you make me a simple demo so that I can debug that?


Inside the "fonts" folder of your game, there's a file called gamefont.css. Open that file with a text editor. You'll see the following lines:



@font-face {
font-family: GameFont;
src: url("mplus-1m-regular.ttf");
}


That's the default font used by rpg maker. To be able to use another one, you have do duplicate those lines and replace the name of the file and the name of the font-family. Then you can write the same font-family on OrangeHud and it will work.


I'll also add new options to control the gauge visibility.



It worked, thanks!
Okay so um... I'm not really sure how to use this? All I need is for the HUD to display the name and variable number of 5 variables in the corner but... it doesn't seem to be working? I must be doing something wrong, so could someone help?


jAILSzF.jpg



The first OrangeHudLine is for Days Remaining, which is variable 1. This isn't displaying any number, however...


The second OrangeHudLine is supposed to say Percent Complete, which is variable 2, but it doesn't even appear onscreen.


What am I doing wrong?


All I need is for it to show something like...


"Days Remaining 30"


"Percent Complete 10"
you added the same file to the plugin list twice, but rpgmaker doesn't understands that. you have to duplicate the .js file inside the plugins folder and use a different filename for the copied one
you added the same file to the plugin list twice, but rpgmaker doesn't understands that. you have to duplicate the .js file inside the plugins folder and use a different filename for the copied one



Okay, that fixed why the other lines weren't showing up... but why isn't it displaying the variable numbers?
what did you put on the pattern param?
what did you put on the pattern param?



ksHHRSO.jpg
Change it to:

Code:
Days Remaining %1
Change it to:



Days Remaining %1



So THAT'S what the %1 in the box was for! lol


Thanks 🙂
Are variable counts in OrangeHUDLine meant to stop at 99? I can set a variable to, say, 2000 - and it shows this fine. When incrementing though, it just stops at 99.
That's weird. Have you tried with different variables? I can't think of anything on my plugin that could cause this behavior.
Ah, no worries - narrowed it down. Items have a cap of 99 per, the var was drawing from item quantities.
Hey Hudell,


Thanks for your amazing with with Orange HUD and time systems! I was originally only looking for a plugin to automate day/night tints, but now I can't imagine working without everything else.


I'm having the same issue with DarkSlayerEX from your Time System Variables thread where everything seems to work but the Variables (and hence the Clock on the HUD) aren't updating. I believe I have the latest versions of your files, so I'm not sure if I'm being derpy and missing something obvious? 

Original thread: https://forums.rpgmakerweb.com/threads/orange-hud.47186/