-
-
Notifications
You must be signed in to change notification settings - Fork 90
budhud Dev Reference
Used as a reference by me because i forget EVERYTHING. Not in any particular order
Downloads: 393,280 | Views: 1,165,827
big number cause neuron activation :)
- speedo - i was lazy, this is implemented now
- uber timer - don't want to, takes up voicemenu + kinda perf heavy
- VTF crosshairs - varies too much on someone's preferences
- Center ammo pickup that appears in the lower center of the screen (can't center for all three digit places)
- Adjust wide value of text in Voice UI
- Ability to change colors of itemeffectmeters (you can with a modulate material but i mean......)
- Ability to use directional arrows in
vgui_drawtree
again (pls)
- hud_reloadscheme - most basic hud reload command
- mat_aaquality - used if reloadscheme doesnt work
- mat_reloadallmaterials - used whenever working on VTFs/VMTs
- showschemevisualizer
- cl_panelanimation
- testhudanim <event_name> - test an animation in hudanimations
- Scoreboard font: resource/clientscheme -> Default
- Scoreboard name/ping/score/etc font -> "DefaultVerySmall" (set to "" to disable)
- Killfeed font: /scripts/hudlayout.res -> "font" under "HudDeathNotice"
- Equipped item font: resource/clientscheme -> ItemFontNameSmallest, ItemFontNameSmall, ItemFontNameLarge, ItemFontNameLarger
- Change Item Preset names (A, B, C, D) by adding the following to chat_english.txt:
"TF_ItemPresetName0" "<name>"
"TF_ItemPresetName1" "<name>"
"TF_ItemPresetName2" "<name>"
"TF_ItemPresetName3" "<name>"
(will probably muck up the quickswitch menu)
- Medic vaccinator icon
For VMTs, the following are (in my experience) the only parameters you need to have:
- Required to locate the VTF
- Must be set to 1 for VTFs with any transparency
- Can safely be left set to 1 for all VMTs with no issue
- Must be set to 1 for VTFs that can be changed with
image_drawcolor
/image_armedcolor
- Can safely be left set to 1 for all VMTs with no issue
- Must be set to 1 for VTFs that can be changed with image_drawcolor / image_armedcolor AND the RGBA value used is not fully opaque (e.g., alpha value is a value between 0 and 254)
- Example in budhud:
cog.vtf
is used in the main menu to change your rank from casual to competitive. Since the RGBA used forimage_drawcolor
has transparency (255 255 255 001),$vertexalpha
must be set to 1
This is mainly for my own reference, and is a bizarre bit of valve tech
-
= 0x01 (SOH) - Use normal color from this point forward
-
= 0x02 (STX) - Use team color up to the end of the player name. This only works at the start of the string, and precludes using the other control characters.
-
= 0x03 (ETX) - Use team color from this point forward
-
= 0x04 (EOT) - Use location color from this point forward
-
= 0x05 (ENQ) - Use achievement color from this point forward
-
= 0x07 (SOH) - Use HEX color code
-
(BEL),
(ETX),
(SOH)
For example:
Use team colored text ETX
for user's name (%s1
), followed by the HEX of red, blue, and green
Used in PLR:
- cart_home__square
- cart_, cart__bottom
- cart_track__opaque
- cart_point_
Used in PL:
- cart_
- cart_home__opaque
- cart_point__opaque
- bh_b_NESW - Borders on NORTH, EAST, SOUTH, and WEST side of element
- bh_b_NEW - Borders on NORTH, EAST, and WEST side of element
- bh_b_ESW - Borders on EAST, SOUTH, and WEST side of element
- bh_b_EW - Borders on EAST and WEST side of element
- bh_b_N - Border on NORTH side of element
- bh_b_E - Border on EAST side of element
- bh_b_S - Border on SOUTH side of element
- bh_b_W - Border on WEST side of element
- ReplayGrayDialogBorder - Previously used a lot for tooltips, now using bh_ToolTipBG
- bh_TooltipBG - Replaces ReplayGrayDialogBorder
No text, just image
"CloseButton"
{
"image_drawcolor" "255 255 255 255"
"image_armedcolor" "240 134 049 255"
"SubImage"
{
"image" "replay/thumbnails/menu_icons/close"
}
}
Generic image panel with fillcolor
"bh_Template_Block"
{
"ControlName" "ImagePanel"
"fieldName" "bh_Template_Block"
"xpos" "0"
"ypos" "420"
"zpos" "0"
"wide" "f0"
"tall" "60"
"autoResize" "0"
"pinCorner" "0"
"labeltext" ""
"visible" "1"
"enabled" "1"
"fillcolor" "bh_Theme_BG20"
"image" ""
"paintbackgroundtype" "0"
}
Generic CExButton with command execution
"bh_Template_Button"
{
"ControlName" "CExButton"
"fieldName" "bh_Template_Button"
"xpos" "30"
"ypos" "75"
"zpos" "0"
"wide" "100"
"tall" "26"
"autoResize" "0"
"pinCorner" "0"
"visible" "1"
"enabled" "1"
"paintbackgroundtype" "0"
"labeltext" "DRAWTREE 0/1"
"textalignment" "center"
"font" "bh_Font12"
"command" "engine incrementvar vgui_drawtree 0 1 1"
"sound_depressed" "UI/buttonclick.wav"
"sound_released" "UI/buttonclickrelease.wav"
"defaultBgColor_override" "bh_Theme_BG20"
"armedBgColor_override" "bh_Theme_BG30"
"depressedBgColor_override" "bh_Theme_BG30"
"defaultFgColor_override" "bh_Theme_TextSecondary"
"armedFgColor_override" "bh_Theme_TextAccent"
"depressedFgColor_override" "bh_ButtonDepressed"
"border_default" "bh_b_NESW"
"border_armed" "bh_b_NESW"
}
Standard button colors used in budhud
"defaultFgColor_override" "bh_Theme_TextSecondary"
"armedFgColor_override" "bh_Theme_TextAccent"
"depressedFgColor_override" "bh_ButtonDepressed"
"defaultBgColor_override" "bh_Theme_BG20"
"armedBgColor_override" "bh_Theme_BG30"
"depressedBgColor_override" "bh_Theme_BG30"
"border_default" "bh_b_NESW"
"border_armed" "bh_b_NESW"
"image_drawcolor" "255 255 255 255"
"image_armedcolor" "240 134 49 255"
Standard combobox (filter search) colors used in budhud
"fgcolor_override" "bh_white"
"bgcolor_override" "bh_blank"
"disabledFgColor_override" "bh_white"
"selectionColor_override" "bh_blank"
"selectionTextColor_override" "bh_white"
"bh_BackgroundFooter"
{
"ControlName" "ImagePanel"
"fieldName" "bh_BackgroundFooter"
"xpos" "0"
"ypos" "420"
"zpos" "0"
"wide" "f0"
"tall" "61"
"autoResize" "0"
"pinCorner" "0"
"labeltext" ""
"visible" "1"
"enabled" "1"
"fillcolor" "bh_Theme_BG20"
"border" "bh_b_N"
"image" ""
"paintbackgroundtype" "0"
}
- A pinned element will always move relative to their parent element
- Good for things like shadows, etc.
- Bear in mind x/y values move the pinned element oppositely as they usually do
- xpos 100 will move it 100 units to the LEFT instead of RIGHT, etc
- I think there might actually be a way to change this reversing pin behavior by changing the pin corner or something
"bh_PinTemplate"
{
"ControlName" "Label"
"fieldName" "bh_PinTemplate"
"xpos" "c0"
"ypos" "10"
"zpos" "0"
"wide" "100"
"tall" "0"
"visible" "1"
"enabled" "1"
"bgcolor_override" "0 0 0 0"
}
"pin_to_sibling" "bh_PinTemplate"
"xpos" "-1"
"ypos" "-1"
- "Button" is what controls the drop-down arrow's appearance in the dropdown box
"fgcolor_override" "bh_black"
"selectionColor_override" "bh_Theme_TextAccent"
"selectionTextColor_override" "bh_white"
"bgcolor_override" "bh_white"
"Button"
{
"defaultBgColor_override" "bh_ButtonBlank"
"armedBgColor_override" "bh_ButtonBlank"
"depressedBgColor_override" "bh_ButtonBlank"
"defaultFgColor_override" "bh_gray"
"armedFgColor_override" "bh_Theme_TextAccent"
"depressedFgColor_override" "bh_ButtonDepressed"
}
- For text entry box (border no worky)
"fgcolor_override" "bh_black"
"selectionColor_override" "bh_Theme_TextAccent"
"selectionTextColor_override" "bh_white"
"bgcolor_override" "bh_white"
Information courtesy of peaches
- DXT1 - Use for images with no transparency
- DXT5 - Use for images with transparency
From TF Team's hudanimations_tf.txt
event IsAnExample
{
Animate <panel name> <variable> <target value> <interpolator> <start time> <duration>
}
variables:
FgColor
BgColor
Position
Size
Blur (hud panels only)
TextColor (hud panels only)
Ammo2Color (hud panels only)
Alpha (hud weapon selection only)
SelectionAlpha (hud weapon selection only)
TextScan (hud weapon selection only)
Interpolator:
Linear
Accel - starts moving slow, ends fast
Deaccel - starts moving fast, ends slow
Spline - simple ease in/out curve
Pulse - < freq > over the duration, the value is pulsed (cosine) freq times ending at the dest value (assuming freq is integral)
Flicker - < randomness factor 0.0 to 1.0 > over duration, each frame if random # is less than factor, use end value, otherwise use prev value
Gain - < bias > Lower bias values bias towards 0.5 and higher bias values bias away from it.
Bias - < bias > Lower values bias the curve towards 0 and higher values bias it towards 1.
RunEvent <event name> <start time>
starts another even running at the specified time
StopEvent <event name> <start time>
stops another event that is current running at the specified time
StopAnimation <panel name> <variable> <start time>
stops all animations refering to the specified variable in the specified panel
StopPanelAnimations <panel name> <start time>
stops all active animations operating on the specified panel
SetFont <panel name> <fontparameter> <fontname from scheme> <set time>
SetTexture <panel name> <textureidname> <texturefilename> <set time>
SetString <panel name> <string varname> <stringvalue> <set time>
Info courtesy of Hypnotize
0 - Straight edges
1 - Burnt paper edges
2 - Round edge
3 - Gradient edges
With help from @qkeitoe
Ranges consist of a starting and ending unicode code point. A code point block is a number/letter/symbol (collectively referred to as a "glyph") represented as a hexadecimal.
Some examples:
0x0020
- Represents a blank or whitespace character
0x0061
- Represents the letter "a"
0x0031
- Represents the number "1"
... and so on. Ranges define what glyphs the font actually supports.
Lato supports the following ranges:
- 0x0020 0x007F (Basic Latin)
- 0x0080 0x00FF (Latin-1 Supplement)
- 0x0100 0x017F (Latin Extended-A)
- 0x0370 0x03FF (Greek and Coptic)
- 0x0400 0x04FF (Cyrillic)
- 0x0590 0x05FF (Hebrew)
- 0x0600 0x06FF (Arabic)
- 0x0102 0x0111 (Vietnamese)
However, it appears you can only set one "range", so we use 0x0020 0x1EFF
. This range encapsulates all of the ranges above, but unfortunately also includes some glyphs that are not supported by Lato. Some examples (from the Armenian character set):
- 0x0487 (uni0487): ԇ
- 0x051A (uni051A): Қ
- 0xA71C (uniA71C): ꜜ
Interestingly, TF2 does seem to try and display these glyphs, but their positioning is not quite correct.
Default font range: Range 0x0020 0x1EFF:
We can't just use the default range because it shows many other glyphs with the default Verdana font, too (e.g. Cyrillic). It seems the only solution would be to merge the missing glyphs with Lato, but qkeitoe was done this and it results in a much larger font file.
- ⭐ Popular topics
- ⚡ Quick customizations
- Home
- Installation
- HUD Troubleshooting
- Downloading Older Versions
- Translating budhud
- FAQs
- Credits
- Known Issues
- Lore Zone
- budhud Dev Reference
- 🔗 Screenshots
- 🔗 Discord
- 🔗 huds.tf
- 🔗 Steam
- ⭐⚡ 3D Player Class Model
- ⭐⚡ Closed Captions
- ⭐⚡ YouTube/Twitch #User HUDs
- ⭐ Crosshairs
- ⭐ Modifying Colors
- ⚡ Speedometer
- ⚡ Chat Location
- ⚡ Streamer HUD
- ⚡ Transparent Viewmodels
- Damage Numbers