Custom HUD - Multiple Reticules
Moderator: Moderators
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Custom HUD - Multiple Reticules
Just wondering, before I do too much work on a custom HUD, is it at all possible to use a different reticule mesh for individual weapons? So when one changes the current primary weapon, the reticule changes with it?
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: Custom HUD - Multiple Reticules
Using the standard method the stock game uses to display reticles? Nope, as to the best of my knowledge, but I'll just wait for Ace or Zerted to correct me.
(I'm kidding, I'm just referencing the fact that while I may be capable, but I'm not all-knowing when it comes to modding).
Using a workaround method? Yes, in theory. If you've ever used FragMe!'s Floating Icon Fix, then you already know half the work you'd need to do. Basically, my theory is that you could assign a reticle icon to each weapon, and some could be different. Different ones for shotguns, pistols, rifles, etc.
Drawbacks include, but are not limited to: the heaps work required to do this (ever single weapon would have to be referenced, and the stock reticle would have to be removed), there would probably be no room for the ammo ticks, or the reloading ticks, so they'd have to be removed as well, and it wouldn't changed colors (blue, red and yellow) like the normal reticle does.
Using a workaround method? Yes, in theory. If you've ever used FragMe!'s Floating Icon Fix, then you already know half the work you'd need to do. Basically, my theory is that you could assign a reticle icon to each weapon, and some could be different. Different ones for shotguns, pistols, rifles, etc.
Drawbacks include, but are not limited to: the heaps work required to do this (ever single weapon would have to be referenced, and the stock reticle would have to be removed), there would probably be no room for the ammo ticks, or the reloading ticks, so they'd have to be removed as well, and it wouldn't changed colors (blue, red and yellow) like the normal reticle does.
Last edited by THEWULFMAN on Thu Apr 26, 2012 4:40 pm, edited 1 time in total.
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Custom HUD - Multiple Reticules
That's sneaky. I like it. 
I get what you're saying about not being able to have different colours for the reticle icon, but why exactly couldn't you still have the ammo ticks and everything else?
I get what you're saying about not being able to have different colours for the reticle icon, but why exactly couldn't you still have the ammo ticks and everything else?
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: Custom HUD - Multiple Reticules
Because all of the reticle icons would have to line up perfectly with the existing ammo/reload ticks, or it'd look weird and unprofessional. If all the reticles you want to add line up with it, then fantastic. Otherwise they'd need to be removed.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Custom HUD - Multiple Reticules
Well don't wait for me. I know Lua scripting and shell scripts better than anyone, but all that time spent in Lua means I didn't spend it in other areas. I've never done HUD work other than trying to restore green team chat. What I did learn from that is that you can specifiy colors in the HUD files. One of the color values represents the color of the team you're pointing at. I don't know if that works with transparent icons (I'd assume it does).THEWULFMAN wrote:but I'll just wait for Ace or Zerted to correct me ...itt wouldn't changed colors (blue, red and yellow) like the normal reticle does.
I wouldn't have thought of the floating icon fix. My hack would be asking players to use a fake zoom that changes the reticle. The sniper's reticle changes when you zoom, so I assume you can change it for different weapons. I don't know if you're required to be in a zoomed state for that to happen.
You could also place a shell interface screen on top of the game and place your reticle image there (this is what the full screen map does). However, that just seems too hackish and I don't recommend it. But it would 'work'
In general all my suggestions are Lua based. If there's a non-Lua solution, it's best to try that first.
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: Custom HUD - Multiple Reticules
The floating icon solution is possible, I've tried it and have gotten very close to the final result.
1: The main reticule is an invisible msh, or it is small enough to fit in between the other weapon reticules.
2: If there was a way to show the zoom texture without zooming in.
I'll look into this.
This could work if:[RDH]Zerted wrote: I wouldn't have thought of the floating icon fix. My hack would be asking players to use a fake zoom that changes the reticle. The sniper's reticle changes when you zoom, so I assume you can change it for different weapons. I don't know if you're required to be in a zoomed state for that to happen.
1: The main reticule is an invisible msh, or it is small enough to fit in between the other weapon reticules.
2: If there was a way to show the zoom texture without zooming in.
I'll look into this.
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Custom HUD - Multiple Reticules
So you're saying its possible to make any icon with transparency change colour depending on who you're aiming at, even if it's not the reticule? How hard would this be to achieve in terms of scripting? If its quite difficult I probably would need a bit of help setting it up....[RDH]Zerted wrote:You can specifiy colors in the HUD files. One of the color values represents the color of the team you're pointing at. I don't know if that works with transparent icons (I'd assume it does).
So can you force the player to automatically zoom in to a rate of something like x1.01, so that the difference is negligible, and then add the reticule to your zoom view.....if you did this would you still be able to zoom normally, to like 3x zoom or whatever?[RDH]Zerted wrote:My hack would be asking players to use a fake zoom that changes the reticle. The sniper's reticle changes when you zoom, so I assume you can change it for different weapons. I don't know if you're required to be in a zoomed state for that to happen.
Your ideas sound awesome Zerted, but I'm afraid they're probably all a bit difficult for me to accomplish unless someone walks me through it.
What if you don't want the ammo ticks inside the reticule?THEWULFMAN wrote:Because all of the reticle icons would have to line up perfectly with the existing ammo/reload ticks, or it'd look weird and unprofessional. If all the reticles you want to add line up with it, then fantastic. Otherwise they'd need to be removed.
Hidden/Spoiler:
EDIT: Hmm. I've got my custom reticule ingame, but the stock one still loads alongside it. What am I forgetting to do?
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: Custom HUD - Multiple Reticules
You need to override the stock one. To do that, just name your msh hud_main_reticule. Make sure it's named that in the HUD file.lucasfart wrote: EDIT: Hmm. I've got my custom reticule ingame, but the stock one still loads alongside it. What am I forgetting to do?
By the way, your Halo layout is totally possible. You will need a global ingame.lvl to see the full changes, however.
Here is a screeny of mine. Again I only get full changes with a global ingame.lvl. Without it, the minimap and other things would just be duplicated.
Hidden/Spoiler:
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Custom HUD - Multiple Reticules
Could I just leave my reticule as the same name and create a dummy/invisible model named hud_main_reticule? And what do you mean by a "global" ingame.lvl - do you mean totally replacing the stock ingame.lvl in the data folder?
With the duplicating items, couldn't you just replace the default models with invisible ones, so that the default ingame layout would still be there but you wouldn't see it?
What the two posts Cerfoun.
Nice HUD btw.
With the duplicating items, couldn't you just replace the default models with invisible ones, so that the default ingame layout would still be there but you wouldn't see it?
What the two posts Cerfoun.
Nice HUD btw.
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: Custom HUD - Multiple Reticules
lucasfart wrote:Could I just leave my reticule as the same name and create a dummy/invisible model named hud_main_reticule? - do you mean totally replacing the stock ingame.lvl in the data folder?
Yes to both questions.
With the duplicating items, couldn't you just replace the default models with invisible ones, so that the default ingame layout would still be there but you wouldn't see it?
Yes, but some things can't be removed using models. The Chat/text lines, and the Minimap for instance.
What the two posts Cerfoun.
Meh, my mistake.
Nice HUD btw.
Thanks, it took a great deal of time to get right.![]()
Just tell me if you need any help with your custom HUD and I'll be glad to help.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Custom HUD - Multiple Reticules
I thought we couldn't completely replace the ingame.lvl since we don't have everything that went into it? Also, if you replace HUD elements with invisible models, wouldn't those have the same visual problems any model with an alpha layer has (showing up as an outline against a CP's glow, for example)?
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: Custom HUD - Multiple Reticules
Those visual problems only occur if an object is semi-transparent and if it doesn't have hard edge enabled.
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: Custom HUD - Multiple Reticules
Fiodis wrote:I thought we couldn't completely replace the ingame.lvl since we don't have everything that went into it?
We can replace the ingame, I've done it myself (I think, or did I... anyway). Zerted has said it can be done(and he has done it, see the unofficial patch), regardless of whether I did it or not.
I recommend replacing the HUD with a reeeeaaaly tiny model with one polygon, that's what I did anyway. Or using hard-edged transparency, that solves that issue as well.Fiodis wrote:Also, if you replace HUD elements with invisible models, wouldn't those have the same visual problems any model with an alpha layer has (showing up as an outline against a CP's glow, for example)?
Edit - Ninja'd by AQT.
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Custom HUD - Multiple Reticules
What else does the minimap use? Surely it'd just be a matter of finding the right parts and changing them.
EDIT: And I'd still appreciate help in configuring the setup of my original question, with a custom reticule for each weapon. Is it possible to force the weapon to zoom in ever so slightly, and still enable the normal zoom?
EDIT2: Heh. I've got alot of questions on the HUD. Where would I edit the ammo tick information? The only section I can find relating to ammo is the number which is located next to the weapon icon...
EDIT3: Is this is?
EDIT: And I'd still appreciate help in configuring the setup of my original question, with a custom reticule for each weapon. Is it possible to force the weapon to zoom in ever so slightly, and still enable the normal zoom?
EDIT2: Heh. I've got alot of questions on the HUD. Where would I edit the ammo tick information? The only section I can find relating to ammo is the number which is located next to the weapon icon...
EDIT3: Is this is?
Hidden/Spoiler:
- Cerfon Rournes
- Master Bounty Hunter

- Posts: 1558
- Joined: Thu Jul 08, 2010 5:53 pm
- Projects :: WIP. I will reveal what it is later on..
- xbox live or psn: No gamertag set
- Location: New York, USA
- Contact:
Re: Custom HUD - Multiple Reticules
Yup, that's it.
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Custom HUD - Multiple Reticules
3.How do i make the ammo ticks straight? By default they curl around inside the reticle, but I want to make them appear in a straight line, like the halo HUD. Would I just change this line:lucasfart wrote: 1. What else does the minimap use? Surely it'd just be a matter of finding the right parts and changing them.
2.Is it possible to force the weapon to zoom in ever so slightly, and still enable the normal zoom?
Code: Select all
AngleStart(-135.296936)
AngleEnd(144.795883)Code: Select all
AngleStart(0)
AngleEnd(0)5.Also, does anyone know what the "Rect" line refers to?
EDIT:Well I tried changing the Angle values to 0 and the Position values, but I'm not seeing any changes in my HUD. Here's what the section looks like in my hud file:
Code: Select all
BarSegmented("player1weapon1clipbar")
{
AngleStart(0)
AngleEnd(0)
NumSegments(60)
Value(1.000000)
EventValue("player1.weapon1.totalClipFraction")
Rect(0.087831, 0.111404, "Center", "Center", "Viewport")
PropagateAlpha(1)
Position(55.00, 55.00, 10.000000, "Viewport")- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: Custom HUD - Multiple Reticules
No, I'm saying any HUD element can change colors based off of what you're pointing at. I don't know if an icon is considered a HUD element. It's impossible to do through scripting. You must edit the HUD files.lucasfart wrote:So you're saying its possible to make any icon with transparency change colour depending on who you're aiming at, even if it's not the reticule? How hard would this be to achieve in terms of scripting?
I don't know that. That's why I would ask the players to zoom in.lucasfart wrote:So can you force the player to automatically zoom in
We can replace ingame.lvl. Both v1.2 and v1.3 do so. What we can't do is fully replace core.lvl. That has some optimizations we don't have.
If you don't think your changes are having an effect, change something you know works, like changing color and see if that shows up. If not, then you know there's most likely a munging problem. If so, then you know there's a problem with your initial changes.
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Custom HUD - Multiple Reticules
I'm guessing this is the relevant line?[RDH]Zerted wrote:No, I'm saying any HUD element can change colors based off of what you're pointing at. I don't know if an icon is considered a HUD element. It's impossible to do through scripting. You must edit the HUD files.lucasfart wrote:So you're saying its possible to make any icon with transparency change colour depending on who you're aiming at, even if it's not the reticule? How hard would this be to achieve in terms of scripting?
Code: Select all
EventColor("player1.weapon1.target.teamColor")- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: Custom HUD - Multiple Reticules
I believe so, yes. If you play AQT's/Duck's/Ande's Republic Commando maps, the first-person commando helmet overlay is a HUD element, I think. (Or it's just modelled into the first-person mesh, I can't remember which.) I've inserted my own HUD elements, mainly meshes, before.lucasfart wrote:Was also curious - is it possible to insert your own HUD element?
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: Custom HUD - Multiple Reticules
Awesome.
Thanks for that Fiodis.
I'm having trouble figuring out the values to use for positioning. It seems really inconsistent/difficult to use, relying on several different elements. Why didn't they just make a simple (x,y) system? Any help in understanding the HUD positioning would be appreciated.
I'm having trouble figuring out the values to use for positioning. It seems really inconsistent/difficult to use, relying on several different elements. Why didn't they just make a simple (x,y) system? Any help in understanding the HUD positioning would be appreciated.

