Hello! Sometimes I like playing without viewmodels so I made a little mod to show you what weapon you have active. Here's what it looks like: https://imgur.com/a/DhTRZmU
Thought I'd share in case anyone wants something like this.
It's made using this weapon-specific crosshair tutorial.
It has been done before in different ways, like using custom icons for different weapons, entire static viewmodels etc.
The problem is that some weapons share the same crosshair file and it looks a bit off sometimes. You could be using the Beggar's Bazooka for example and it would show a Rocket Launcher icon.
That's why I tried to group as many weapons as I could together. For example all rocket launchers will simply display "Rockets", all shotguns "Shotgun", mad milk, gas passer, jarate and cleaver "Throwable", all grenade launchers "Grenades" etc.
How to install it:
- You're gonna need the mod first, download it here. You're also gonna need a custom hud with hud crosshairs OR the default hud's hudlayout.res file and a separate hud crosshair (have not tested this option but it should work).
- After you download it, unzip the "ActiveWeaponText" folder in your game's custom folder. Now your crosshairs are replaced with the text but they are still in the middle of the screen.
You should also enable hud crosshairs at this point.
- Now you have to change the text's position on the screen. Open your custom hud's folder and find the file "hudlayout.res", most of the time it's in hudfolder/scripts but some huds might have it somewhere else. For example the proper hudlayout.res to edit for m0rehud is in resource/default.
Once you find it, open it with a text editor.
- Inside the file, find the line "HudCrosshair", it should look something like this:
HudCrosshair
{
"fieldName" "HudCrosshair"
"visible" "1"
"enabled" "1"
"wide" "640"
"tall" "480"
}
Change it to: HudCrosshair
{
"fieldName" "HudCrosshair"
"visible" "1"
"enabled" "1"
"xpos" "0"
"ypos" "0"
"wide" "640"
"tall" "480"
}
- Edit the "xpos" and "ypos" values to your liking, for example I use "xpos" "0" and "ypos" "144" to have it in the lower middle of the screen like in the screenshots, it lines up nicely with m0rehud. You can have the text pretty much anywhere you want. You don't have to restart your game after each change, just adjust the values, save the file and reload the hud with the "hud_reloadscheme" command.
- Make sure the crosshair is set to "none" in options > multiplayer, or use:
cl_crosshair_file ""
Adjust the text size from options or with:cl_crosshair_scale
20 is the sweet spot for me.
Turn the text on/off with:crosshair 1/0
You can also change the color from options or with: cl_crosshair_red
cl_crosshair_green
cl_crosshair_blue
- If you have it in the lower middle like I do, you might wanna reposition target ID's with:
tf_hud_target_id_offset
tf_spectator_target_location
No smoke scripts and customization
Since this uses the same files that the no smoke scripts use, it won't be compatible. But I did include 3 different no smoke scripts for this, just go in ActiveWeaponText/No Smoke Scripts. Simple to install, just read the readme.
If you want to use different effects check this thread and edit the mod's files accordingly.
If you want to change what certain weapons say, I did include a few extra VTFs for stuff like "L. Cannon" and "Direct Hit". Or more formal names, instead of "Rockets" theres also a file for "Rocket L.". There's also a blank file named "none" if you want a specific weapon to not show anything.
Naming scheme is pretty simple: the "1scattergun" file will show "1. Scattergun" in game, the "1sniperr" file will show "1. Sniper R.", the "1rescuerr" file will show "1. Rescue R.".
Once you pick the file you want, go to ActiveWeaponText/Scripts, open the file for the weapon you want (check here what file represents what weapon), scroll down and change
"crosshair"
{
"file" "vgui\replay\thumbnails\whatever"
Instead of "whatever" use the right file name from ActiveWeaponText\materials\vgui\replay\thumbnails.
Making your own text
If you wish to make your own text, the font is Tf2 Build, font size is 25. I used paint net with the vtf plugin and KrisVDM's Plugin Pack for shadows.
Just go to ActiveWeaponText\materials\vgui\replay\thumbnails and use none.vtf as a template and then save as a different file.
Don't forget to make a vmt file too with the same name and these settings:
"UnlitGeneric"
{
"$translucent" 1
"$basetexture" "vgui\replay\thumbnails\whatever"
"$vertexcolor" 1
"$no_fullbright" 1
"$ignorez" 1
}
Again, change "whatever".
And that's it, I hope someone will find this useful. Please let me know if there are any issues.