Upvote Upvoted 24 Downvote Downvoted
Active weapon name text for disabled viewmodels
posted in Customization
1
#1
0 Frags +

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:

  1. 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).
  2. 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.
  3. 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.
  4. 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"
    	}
  5. 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.
  6. 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
  7. 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.

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 [url=https://www.teamfortress.tv/30866/guide-weapon-specific-custom-crosshairs]this weapon-specific crosshair tutorial.[/url]
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.

[b]How to install it:[/b]
[olist]
[*] You're gonna need the mod first, [url=https://www.dropbox.com/s/dtr8jtzk804dnqg/ActiveWeaponText.zip?dl=0]download it here[/url]. 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:
[code] HudCrosshair
{
"fieldName" "HudCrosshair"
"visible" "1"
"enabled" "1"
"wide" "640"
"tall" "480"
}[/code]
Change it to:
[code] HudCrosshair
{
"fieldName" "HudCrosshair"
"visible" "1"
"enabled" "1"
"xpos" "0"
"ypos" "0"
"wide" "640"
"tall" "480"
}[/code]
[*] 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:[code] cl_crosshair_file ""[/code]
Adjust the text size from options or with:
[code]cl_crosshair_scale[/code]
20 is the sweet spot for me.

Turn the text on/off with:
[code]crosshair 1/0[/code]
You can also change the color from options or with: [code]cl_crosshair_red
cl_crosshair_green
cl_crosshair_blue[/code]
[*] If you have it in the lower middle like I do, you might wanna reposition target ID's with: [code]tf_hud_target_id_offset
tf_spectator_target_location [/code]
[/olist]

[b]No smoke scripts and customization[/b]

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 [url=https://www.teamfortress.tv/25647/no-explosion-smoke-script]this thread[/url] 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 ([url=https://wiki.alliedmods.net/Team_fortress_2_item_definition_indexes#Primary_.5BSlot_0.5D]check here what file represents what weapon[/url]), scroll down and change[code]"crosshair"
{
"file" "vgui\replay\thumbnails\whatever"[/code]
Instead of "whatever" use the right file name from ActiveWeaponText\materials\vgui\replay\thumbnails.

[b]Making your own text[/b]

If you wish to make your own text, the font is [url=https://www.dafont.com/tf2-build.font]Tf2 Build[/url], font size is 25. I used paint net with [url=https://gamebanana.com/tools/6791]the vtf plugin[/url] 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:
[code]"UnlitGeneric"
{
"$translucent" 1
"$basetexture" "vgui\replay\thumbnails\whatever"
"$vertexcolor" 1
"$no_fullbright" 1
"$ignorez" 1
}[/code]
Again, change "whatever".

And that's it, I hope someone will find this useful. Please let me know if there are any issues.
2
#2
10 Frags +

bro this is so cool wtf

bro this is so cool wtf
3
#3
5 Frags +

Wow, this fixed a big issue I had with disabled viewmodels. Thank you!

Wow, this fixed a big issue I had with disabled viewmodels. Thank you!
4
#4
2 Frags +

dudei lobe you

dudei lobe you
5
#5
8 Frags +

imagine you get killed by someone who stops to read his weapon name in the middle of the fight U rly just gotta end it at that point

imagine you get killed by someone who stops to read his weapon name in the middle of the fight U rly just gotta end it at that point
6
#6
1 Frags +
carnaticumimagine you get killed by someone who stops to read his weapon name in the middle of the fight U rly just gotta end it at that point

Thankfully it has the slot number before the weapon name for people who find it hard to read.

[quote=carnaticum]imagine you get killed by someone who stops to read his weapon name in the middle of the fight U rly just gotta end it at that point[/quote]

Thankfully it has the slot number before the weapon name for people who find it hard to read.
Please sign in through STEAM to post a comment.