Page 1 of 1

Mixing weapon hud dependencies around

Posted: Thu Oct 25, 2007 8:06 pm
by EchoRanger449
I'd like to use a sniper rifle but use the crosshairs/reticle from the pistol. I'd like to use the ammo indicator for the assault rifle also. I looked at the dependencies for the wphi for the sniper rifle: those elements are part of the bitmaps.

However, each element is in one file and the dependency won't let me switch around which part I want.

For example, ui\hud\bitmaps\combined\hud_reticles contains the reticles for all weapons (except the sniper rifle). If I had a pistol hud and I wanted to use the crosshair/reticle for the assault rifle, I would have to find out which offset the assault rifle's reticle was using and overwrite it on top of my pistol crosshair offset.

I don't know how to do this though. I think it should be pretty easy for someone who knows how to do hex. I can't hex though. Can someone help me?

I'm surprised there is no way to swap around those dependencies with HHT.

*EDIT: I looked at it with Eschaton, and I think there might be a way it names the offsets of the crosshair type).

I know this is possible, I just don't know how to explore the wphi meta. I'd do it if someone could explain how.

Posted: Fri Oct 26, 2007 11:16 am
by bcnipod
it is possible it might entail you making your own bitmaps.

Posted: Fri Oct 26, 2007 12:20 pm
by EchoRanger449
I'm surprised no one has written a plugin on this. It would really help people who're making custom Huds

Posted: Fri Oct 26, 2007 12:28 pm
by bcnipod
well most people that make custom huds do it in CE, so if you are feeling up to it then...

Posted: Fri Oct 26, 2007 12:51 pm
by Altimit01
<used to be talking about how there's lots that plugins can't do and how conure should have found all of this info thanks to HEK hax.>

...hehe, found it. Hex editor ftw.

In the crosshair overlays reflexive:

Code: Select all

<short name="bitmap subindex" offset="0x46" visible="true"/>
With the first index being zero (warthog, reticle plus a couple others), index = 1 is the turret I believe, index = 2 is rocket launcher, index = 3 is plasma pistol and so forth. Will post new plugin as an attachment in the Eschaton thread in utilities.

Posted: Fri Oct 26, 2007 1:36 pm
by EchoRanger449
w00t! Altimit01, you're our hero!
P.S. do you think you could include elements like the ammo bar, item icon (image you get before you swap a weapon), and the ammo meter (the plasma, flamethrower, and reload bars are the three different versions)?

Posted: Fri Oct 26, 2007 1:58 pm
by Altimit01
Possibly. It'd require a bit of research. Best place to look is in the correct reflexive and find gaps in the recorded data. Sometimes there's just padding, but other times it's values that were left out.

Offhand, I'd guess that the ammo bar/meter stuff is a sequence index since there's only one image in the bitmap.

As for the item icon, it looks like a mix between sequence index and bitmap indexing since there's 4 images in the bitm tag and multiple subimages within that image file (if that makes sense). wphi was pretty easy to figure out but hudg (which where I think the pick up icon is) is a bit more difficult. I might give it a try a bit later.