Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 2.58 KB

1-Getting-Started.md

File metadata and controls

67 lines (50 loc) · 2.58 KB

Getting Started

custom folder

To begin with, every hud must have a folder in custom. This takes the form of:

steamapps\common\Team Fortress 2\tf\custom\HudName\

HudName can be any name of the hud. Inside of this hud will be various files and folders, taking the directory structure like so:

custom\HudName\info.vdf
custom\HudName\materials\
custom\HudName\resource\
custom\HudName\scripts\

info.vdf

The info.vdf file is one used to specify what version of tf2 a hud is updated for, to protect against outdated huds causing crashes. As such, every hud needs to have an info.vdf file. It should contain:

"HudName"
{
    "ui_version"    "3"
}

As before, HudName can be whatever you want it to be, and its name doesn't matter. The "ui_version" value needs to be updated whenever a new update comes out. If the file does not exist, or "ui_version" is too low, the majority of hud files will not load.

Basic Folders

There are a few folders that are essential to all huds.

Resource folder

The resource folder contains most hud files. It's easier to list what hud files are not in the resource folder, in fact.

There are two main parts to the resource folder: the scheme files, and the ui files. The scheme files control colors, fonts, borders, etc. and add definitions that are used between most hud files. The ui files control how each element in the hud looks.

Scripts folder

The scripts folder doesn't have very many hud files, but it has a few very important ones.

The first one is hud_layout.res, which is needed to position nearly every hud element.

The other big ones are hudanimations_tf.txt and hudanimations_manifest.txt. The manifest file controls what animations files are loaded, which hudanimations_tf.txt is by default (you can change this though, as some huds do). Hudanimations_tf.txt is what controls the actual animations themselves, which will be discussed later.

Other folders

There are some other folders that are often used in huds, but are not strictly needed. They are listed here so that you can expect them and know where to look when you want to make use of them.

Folder Description
cfg Contains scripts and config files
materials Contains all materials and textures used by the hud
sound Contains any sound effects used. Will be autogenerated with sound.cache regardless

Prev Home Next