weapon_hud_interface

🚧 This article is a stub. You can help expand it by submitting content in pull requests or issues in this wiki's source repo.

...

Structure and fields #

Field Type Comments
flags bitfield(16)
Flag Mask Comments
use parent hud flashing parameters 0x1
pad(2)
total ammo cutoff u16
loaded ammo cutoff u16
heat cutoff u16
age cutoff u16
pad(32)
anchor enum
Option Value Comments
top left 0x0
top right 0x1
bottom left 0x2
bottom right 0x3
center 0x4
pad(2)
pad(32)
static elements Block?
Field Type Comments
state attached to enum
Option Value Comments
total ammo 0x0
loaded ammo 0x1
heat 0x2
age 0x3
secondary weapon total ammo 0x4
secondary weapon loaded ammo 0x5
distance to target 0x6
elevation to target 0x7
pad(2)
can use on map type enum
Option Value Comments
any 0x0
solo 0x1
multiplayer 0x2
pad(2)
pad(28)
anchor offset
Point2DInt
  • x: i16
  • y: i16
width scale f32
  • Default value: 1.
height scale f32
  • Default value: 1.
scaling flags bitfield(16)
Flag Mask Comments
don't scale offset 0x1
don't scale size 0x2
use high res scale 0x4
pad(2)
pad(20)
default color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flashing color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flash period f32
flash delay f32
number of flashes u16
flash flags bitfield(16)
Flag Mask Comments
reverse default flashing colors 0x1
flash length f32
disabled color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
pad(4)
sequence index Index: u16
pad(2)
multitex overlay Block?
Field Type Comments
pad(2)
type i16
framebuffer blend function enum
Option Value Comments
alpha blend 0x0
multiply 0x1
double multiply 0x2
add 0x3
subtract 0x4
component min 0x5
component max 0x6
alpha multiply add 0x7
pad(2)
pad(32)
primary anchor enum
Option Value Comments
top left 0x0
top right 0x1
bottom left 0x2
bottom right 0x3
center 0x4
secondary anchor enum
Option Value Comments
texture 0x0
screen 0x1
tertiary anchor enum
Option Value Comments
texture 0x0
screen 0x1
zero to one blend function enum
Option Value Comments
add 0x0
subtract 0x1
multiply 0x2
multiply2x 0x3
dot 0x4
one to two blend function enum
Option Value Comments
add 0x0
subtract 0x1
multiply 0x2
multiply2x 0x3
dot 0x4
pad(2)
primary scale
Point2D
  • x: f32
  • y: f32
secondary scale
Point2D
  • x: f32
  • y: f32
tertiary scale
Point2D
  • x: f32
  • y: f32
primary offset
Point2D
  • x: f32
  • y: f32
secondary offset
Point2D
  • x: f32
  • y: f32
tertiary offset
Point2D
  • x: f32
  • y: f32
primary wrap mode enum
Option Value Comments
clamp 0x0
wrap 0x1
secondary wrap mode enum
Option Value Comments
clamp 0x0
wrap 0x1
tertiary wrap mode enum
Option Value Comments
clamp 0x0
wrap 0x1
pad(2)
pad(184)
effectors Block?
Field Type Comments
pad(64)
destination type enum
Option Value Comments
tint 0 1 0x0
horizontal offset 0x1
vertical offset 0x2
fade 0 1 0x3
destination enum
Option Value Comments
geometry offset 0x0
primary map 0x1
secondary map 0x2
tertiary map 0x3
source enum
Option Value Comments
player pitch 0x0
player pitch tangent 0x1
player yaw 0x2
weapon ammo total 0x3
weapon ammo loaded 0x4
weapon heat 0x5
explicit uses low bound 0x6
weapon zoom level 0x7
pad(2)
in bounds f32 (source units) (min & max)
out bounds f32 (pixels) (min & max)
pad(64)
tint color lower bound
ColorRGB
  • red: f32
  • green: f32
  • blue: f32
tint color upper bound
ColorRGB
  • red: f32
  • green: f32
  • blue: f32
periodic function enum
Option Value Comments
one 0x0
zero 0x1
cosine 0x2
cosine variable period 0x3
diagonal wave 0x4
diagonal wave variable period 0x5
slide 0x6
slide variable period 0x7
noise 0x8
jitter 0x9
wander 0xa
spark 0xb
pad(2)
function period f32 (seconds)
function phase f32 (seconds)
pad(32)
pad(128)
pad(4)
pad(40)
meter elements Block?
Field Type Comments
state attached to enum
Option Value Comments
total ammo 0x0
loaded ammo 0x1
heat 0x2
age 0x3
secondary weapon total ammo 0x4
secondary weapon loaded ammo 0x5
distance to target 0x6
elevation to target 0x7
pad(2)
can use on map type enum
Option Value Comments
any 0x0
solo 0x1
multiplayer 0x2
pad(2)
pad(28)
anchor offset
Point2DInt
  • x: i16
  • y: i16
width scale f32
  • Default value: 1.
height scale f32
  • Default value: 1.
scaling flags bitfield(16)
Flag Mask Comments
don't scale offset 0x1
don't scale size 0x2
use high res scale 0x4
pad(2)
pad(20)
color at meter minimum
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
color at meter maximum
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flash color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
empty color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flags bitfield(8)
Flag Mask Comments
use min max for state changes 0x1
interpolate between min max flash colors as state changes 0x2
interpolate color along hsv space 0x4
more colors for hsv interpolation 0x8
invert interpolation 0x10
minimum meter value i8
sequence index Index: u16
alpha multiplier i8
alpha bias i8
value scale i16
opacity f32
translucency f32
disabled color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
pad(16)
pad(40)
number elements Block?
Field Type Comments
state attached to enum
Option Value Comments
total ammo 0x0
loaded ammo 0x1
heat 0x2
age 0x3
secondary weapon total ammo 0x4
secondary weapon loaded ammo 0x5
distance to target 0x6
elevation to target 0x7
pad(2)
can use on map type enum
Option Value Comments
any 0x0
solo 0x1
multiplayer 0x2
pad(2)
pad(28)
anchor offset
Point2DInt
  • x: i16
  • y: i16
width scale f32
height scale f32
scaling flags bitfield(16)
Flag Mask Comments
don't scale offset 0x1
don't scale size 0x2
use high res scale 0x4
pad(2)
pad(20)
default color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flashing color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flash period f32
flash delay f32
number of flashes u16
flash flags bitfield(16)
Flag Mask Comments
reverse default flashing colors 0x1
flash length f32
disabled color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
pad(4)
maximum number of digits i8
flags bitfield(8)
Flag Mask Comments
show leading zeros 0x1
only show when zoomed 0x2
draw a trailing m 0x4
number of fractional digits i8
pad(1)
pad(12)
weapon specific flags bitfield(16)
Flag Mask Comments
divide number by clip size 0x1
pad(2)
pad(36)
crosshairs Block?
Field Type Comments
crosshair type enum
Option Value Comments
aim 0x0
zoom 0x1
charge 0x2
should reload 0x3
flash heat 0x4
flash total ammo 0x5
flash battery 0x6
reload overheat 0x7
flash when firing and no ammo 0x8
flash when throwing and no grenade 0x9
low ammo and none left to reload 0xa
should reload secondary trigger 0xb
flash secondary total ammo 0xc
flash secondary reload 0xd
flash when firing secondary trigger with no ammo 0xe
low secondary ammo and none left to reload 0xf
primary trigger ready 0x10
secondary trigger ready 0x11
flash when firing with depleted battery 0x12
pad(2)
can use on map type enum
Option Value Comments
any 0x0
solo 0x1
multiplayer 0x2
pad(2)
pad(28)
crosshair overlays Block?
Field Type Comments
anchor offset
Point2DInt
  • x: i16
  • y: i16
width scale f32
  • Default value: 1.
height scale f32
  • Default value: 1.
scaling flags bitfield(16)
Flag Mask Comments
don't scale offset 0x1
don't scale size 0x2
use high res scale 0x4
pad(2)
pad(20)
default color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flashing color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flash period f32
flash delay f32
number of flashes u16
flash flags bitfield(16)
Flag Mask Comments
reverse default flashing colors 0x1
flash length f32
disabled color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
pad(4)
frame rate u16
sequence index Index: u16
flags bitfield(32)
Flag Mask Comments
flashes when active 0x1
not a sprite 0x2
show only when zoomed 0x4
show sniper data 0x8
hide area outside reticle 0x10
one zoom level 0x20
don't show when zoomed 0x40
pad(32)
pad(40)
overlay elements Block?
Field Type Comments
state attached to enum
Option Value Comments
total ammo 0x0
loaded ammo 0x1
heat 0x2
age 0x3
secondary weapon total ammo 0x4
secondary weapon loaded ammo 0x5
distance to target 0x6
elevation to target 0x7
pad(2)
can use on map type enum
Option Value Comments
any 0x0
solo 0x1
multiplayer 0x2
pad(2)
pad(28)
overlays Block?
Field Type Comments
anchor offset
Point2DInt
  • x: i16
  • y: i16
width scale f32
  • Default value: 1.
height scale f32
  • Default value: 1.
scaling flags bitfield(16)
Flag Mask Comments
don't scale offset 0x1
don't scale size 0x2
use high res scale 0x4
pad(2)
pad(20)
default color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flashing color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
flash period f32
flash delay f32
number of flashes u16
flash flags bitfield(16)
Flag Mask Comments
reverse default flashing colors 0x1
flash length f32
disabled color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
pad(4)
frame rate u16
pad(2)
sequence index Index: u16
type bitfield(16)
Flag Mask Comments
show on flashing 0x1
show on empty 0x2
show on reload overheating 0x4
show on default 0x8
show always 0x10
flags bitfield(32)
Flag Mask Comments
flashes when active 0x1
pad(16)
pad(40)
pad(40)
crosshair types bitfield(32) (little endian?)
  • Only set when the tag is compiled into a map cache.
Flag Mask Comments
aim 0x1
zoom 0x2
charge 0x4
should reload 0x8
flash heat 0x10
flash total ammo 0x20
flash battery 0x40
reload overheat 0x80
flash when firing and no ammo 0x100
flash when throwing and no grenade 0x200
low ammo and none left to reload 0x400
should reload secondary trigger 0x800
flash secondary total ammo 0x1000
flash secondary reload 0x2000
flash when firing secondary trigger with no ammo 0x4000
low secondary ammo and none left to reload 0x8000
primary trigger ready 0x10000
secondary trigger ready 0x20000
flash when firing with depleted battery 0x40000
pad(12)
screen effect Block?
Field Type Comments
pad(4)
mask flags bitfield(16)
Flag Mask Comments
only when zoomed 0x1
pad(2)
pad(16)
pad(8)
convolution flags bitfield(16)
Flag Mask Comments
only when zoomed 0x1
pad(2)
convolution fov in bounds Angle: f32 (min & max)
convolution radius out bounds f32 (pixels) (min & max)
pad(24)
even more flags bitfield(16)
Flag Mask Comments
only when zoomed 0x1
connect to flashlight 0x2
masked 0x4
night vision script source i16
night vision intensity Fraction: f32
  • Maximum: 1
pad(24)
desaturation flags bitfield(16)
Flag Mask Comments
only when zoomed 0x1
connect to flashlight 0x2
additive 0x4
masked 0x8
desaturation script source i16
desaturation intensity Fraction: f32
  • Maximum: 1
effect tint
ColorRGB
  • red: f32
  • green: f32
  • blue: f32
pad(24)
pad(132)
sequence index Index: u16
width offset i16
offset from reference corner
Point2DInt
  • x: i16
  • y: i16
override icon color
ColorARGBInt
  • alpha: u8
  • red: u8
  • green: u8
  • blue: u8
frame rate i8
more flags bitfield(8)
Flag Mask Comments
use text from string list instead 0x1
override default color 0x2
width offset is absolute icon width 0x4
text index Index: u16
pad(48)

This information was partially generated using Invader tag definitions.

Acknowledgements

Thanks to the following individuals for their research or contributions to this topic:

  • Kavawuvi (Invader tag definitions)
  • MosesOfEgypt (Tag structure research)