How to make a Hud.ini

Health Bar

On the way to get breakfast, was thinking, health shows in 2 numbers and kinda small, gonna try to convert this to a small multicolored bar similar to the cast timers in the plugin. will give it try in a little bit and repost if someone doesnt beat me to it.
 
Anyone have a string of code that might do this? Hoping to be able to make it look like a health bar, except I would like to either make the sections of it different colors, or make it change colors as the bar gets smaller, like at 70/30%s...

Been searching around trying to figure out how to write this code, but everything I think of wouldn't possibly perform a correct operation because of the data type conflicts.

I think I just can't see what order to put the variable in for the health/color, and don't know the code it would take to create a morphing bar in this location similar to the spell timers for mq2spelltimers.
 
Is there a way to round numbers.

There doesn't appear to be a Math.Round function?
 
Powersource percentage

I'm trying to display a currently equiped powersource's remaining power. And if removed, display nothing. This works fine if equipped, but gives a "Divide by zero in calculation" error if powersource is removed.
Code:
PowerSource2=3,741,565,0,240,0,${If[${InvSlot[21].ID},${Math.Calc[${InvSlot[21].Item.Power}/${InvSlot[21].Item.MaxPower}]}%,]}
 
Cleric Timer HUD

So reading through and trying some different posts out in the hud I have seen some very neat things. Recently, in one of the things I have tried, I got a "timer bar" of sorts that seems to work with damage mitigation or timing of a spell. It pops up when I cast my damage mitigation aura and fades as time goes on... I dont know exactly how it appeared or where i got it from, but it got me to thinking, and so I needed to ask for a very helpful tool if its possible:

Is it possible to add a "fading bar" or even a visible timer counter for cleric spells like Promised Renewal, or HoTs, visible over the top, or under the PC name in the group box, or next to it?

What I am imagining is something like this:

I cast a promised renewal on someone in my group, (or even extended target box would be even better) a timer of sorts pops up showing me when it expires without needing to hover over the spell in the target box.

I dont know if this is possible, or if it should not even be discussed in the hud section, but with everything in this world, just thought i would ask.

If it could work, getting it to work with players that you cast a hot on as well would be awesome. Please let me know, or slam me if I am an idiot :p

Any similar things out there, or your thoughts would be appreciated.

Thanks for everything!!
 
Try out MQ2SpellTimer . Has its own window with the targets name next ti the casted spell.
 
thanks

Yeah I have, and use it from time to time, was just looking for something that would be more convenient compared to the way i play and seeing the timer on another set up, was curious to see if it was possible.
 
nameds

Is there a way to limit the level of the nameds displayed by the hud? The question was kinda asked earlier, a lot of friendly NPCs like to clog up the list. Maybe segregate it by whether or not they are aggressive? probly not possible. just wondering
 
There are 2 methods for doing this. Additive or subtractive.

Create an ini that contains a list of mobs for each zone by zone name or id. ie:

Mob_Ignore_List.ini

Inside that ini, your list may look something like:
Code:
[IgnoreList]
[Ignores.somnium]
Ignore=|Sergeant Ghomar|Towerguard Raena|Buck Witherspoon|Salvonius|Seamus Greendream|
[Ignores.underquarry_raid]
Ignore=|an autarch captain|an autarch healer|an autarch warrior|an autarch avenger|an autarch basher|
[Ignores.GuildHall]
Ignore=|
[Ignores.GuildLobby]
Ignore=|
Alternatively you could do an MQ2Targets style ini (or literally just use the MQ2Targets.ini) and do:
Code:
[IgnoreList]
[Ignores.somnium]
Mob1=Sergeant Ghomar
Mob2=Towerguard Raena
Mob3=Buck Witherspoon
Mob4=Salvonius
Mob5=Seamus Greendream
[Ignores.underquarry_raid]
Mob1=an autarch captain
Mob2=an autarch healer
Mob3=an autarch warrior
[Ignores.GuildHall]
Mob1=
[Ignores.GuildLobby]
Mob1=
and inside that write out a list of names of mobs you either WANT to display (additive) or that you DONT want displayed (subtractive).

Then you make/run a macro to add each mob on the list to an alert. Then you display any named or mob with # in its name that is not on the list for subtractive method or you just display any alert mob that is up for additive.

Basically you either add mobs you want to an alert and say only display alert mobs. (Additive)

Or you say DONT display alert mobs and show me any other named or mobs with # that pop up. (Subtractive)

I use subtractive when expansions launch since i dont know full mob listing. then I just stick with it out of habit. So i made a list of non-aggro named NPCs and I run a macro that will /alert add 2 listname1, /alert add 2 listname2. then i have my hud only display "noalert" mobs with # in the name. This works perfect for HoT and UF, but not always in older zones.

here is the hud code for subtractive:

Code:
Spawn1a=3,5,328,0,255,0,#1
Spawn1b=3,35,328,255,255,0,${If[${NearestSpawn[1,npc noalert 2 #].Name.NotEqual["NULL"]},${NearestSpawn[1,npc noalert 2 #].Level},]}
Spawn1c=3,51,328,255,0,0,-
Spawn1d=3,60,328,255,255,255,${If[${NearestSpawn[1,npc noalert 2 #].Name.NotEqual["NULL"]},${NearestSpawn[1,npc noalert 2 #].CleanName},]}
Code for additive:
Code:
Spawn1a=3,5,328,0,255,0,#1
Spawn1b=3,35,328,255,255,0,${If[${NearestSpawn[1,alert].Name.NotEqual["NULL"]},${NearestSpawn[1,alert].Level},]}
Spawn1c=3,51,328,255,0,0,-
Spawn1d=3,60,328,255,255,255,${If[${NearestSpawn[1,alert].Name.NotEqual["NULL"]},${NearestSpawn[1,alert].CleanName},]}
There are pros and cons to each method. If you have a complete list of all named you want to ever know about, then use additive method aka add only the ones you want to an alert and only display alert mobs on the hud. its far cleaner.

If you dont have a full list or are just curious as to what named are popping, then use subtractive method of adding mobs you know you DONT want to an alert, then only display noalerts. This is more effective for new expansions.

I guess I could eventually get around to posting a version of the macro I use for this. Not today though as i would need to mod a few things for public consumption.
 
I'm trying to display a currently equiped powersource's remaining power. And if removed, display nothing. This works fine if equipped, but gives a "Divide by zero in calculation" error if powersource is removed.
Code:
PowerSource2=3,741,565,0,240,0,${If[${InvSlot[21].ID},${Math.Calc[${InvSlot[21].Item.Power}/${InvSlot[21].Item.MaxPower}]}%,]}

Lax over at MQ2 says:
Currently, all division by zero in calculations will report a fatal macro error. Previously, they would silently give 0 (e.g. no error, and no indication that you tried to divide by zero.. just gave you 0).

The following will give you an error:
${Math.Calc[1/0]}

Even if it is placed inside an ${If}, which will never use it, like this:
${If[0,${Math.Calc[1/0]},FAILED]}

This will always give "FAILED" because it will never use the 1/0 calculation. However, it will always give the divide by zero error! The reason for this is all of the inside ${} are handled before the outside ${}. -- The calculation is done before the If is.

To solve this issue, put the If inside the Calc, so that the If is handled before the calculation:
${Math.Calc[1/${If[0,0,9999999]}]}

This case will never give a divide by zero error, because the 0 part of the If is never used.

I dont know if this applies in this case tho, Im not smart enuf to figure it out.
 
HUD parameters/variables, whatever you call them

Hi all,

I have a question about all of these preset hud variables/parameters, whatever the word is for them.

Any of these for example: ${Me.Level} ${Me.Race} ${Me.Class}

Is there a list of all the possibilities out there somewhere? Because man that would make it so much easier for me at least, instead of having to ask, I could try them out and see what they show

Thanks!
 
if you go to the wiki on main mq2 site, search for "datatype", that will pretty much give you all the options. or you can search for "TLO"

You can also display any variable you create in a macro, but id suggest to make sure it checks that the macro is running for it to display.

http://www.macroquest2.com/wiki/index.php/Main_Page


 
Edit: found my answer, sorry for bumping this one.

My query was a spell recast timer countdown, which is apparently not trackable via HUD..
 
Last edited:
You can track recast time via hud if you are using a macro and a couple via plugin.

There are 3 methods at least, and thats just what I use. I am sure there are more than that.

http://www.macroquest2.com/wiki/index.php/MQ2Cast

1. using MQ2CastTimer, you can set the recast time as an option if you go that route.
2. Using MQ2Cast or spell_routines.inc you can /varset a variable as a timer and display the timer.
3. MQ2gemtimer is a graphic timer that shows a green/yellow/red bar next to your gem or aura window showing how long before gem is ready/aura wears off.
 
I want to add My location and Target location to HUD. What would I need to add to the INI?
 
Code:
TargetLocation1=3,5,159,255,255,255,Location
TargetLocation2=3,101,159,0,255,0,=
TargetLocation3=3,112,159,255,255,255,${If[${Target.ID},${Target.Y} ${Target.X} ${Target.Z},]}

MyLocation1=3,5,172,255,255,255,My Location
MyLocation2=3,101,172,0,255,0,=
MyLocation3=3,112,172,255,255,255,${Me.Y} ${Me.X} ${Me.Z}
and update the locs for your UI.

Thats the ghetto version, you can do it in a 1 liner as well.
 
Make sure if you use the UseFontSize=on option, that you put a font size in his example lines. Otherwise, the missing value will screw it up.

Example with font size:
Code:
ZoneShortNameText=3,2,330,100,0,240,0,${Zone.ShortName} 
ZoneShortName=3,2,245,100,255,234,8,ZoneShortName:

Example without font size:
Code:
ZoneShortNameText=3,330,100,0,240,0,${Zone.ShortName} 
ZoneShortName=3,245,100,255,234,8,ZoneShortName:

In the 1st set (with font size), the 2 (the second value) is the font size.

htw
 
I see on page 6 of this thread the head shot use on the HUD.ini but i was wondering if there is a way to show what your targets body type is and have that displayed?
 
${Target.Body} is to see it.

${Target.Body.Name.Equal[Humanoid]} if you want a TRUE/FALSE return for valid target.

Follow the other examples for color/placement.
 
Works great, but I changed ${Math.Calc[${Me.Level}/1.5]} to ${Math.Calc[${Me.Level}*(2/3)]} just becaus i'm a weirdo.

I'm still new to making my own HUDs, so I don't know the syntax to do it myself, but it'd be more helpful with a roundup rather than the 2 decimal places.


This worked well for me, last I played (stroke 6yrs ago), hope it still works :rolleyes:

Code:
GrpRange=3,1138,350,255,0,255,XP Group Range ${Math.Calc[${Me.Level}*0.665].Precision[0]}-${If[${Math.Calc[${Me.Level}/0.665].Precision[0]}<=85,${Math.Calc[${Me.Level}/0.665].Precision[0]},85]}