Upvote Upvoted 33 Downvote Downvoted
speedometer in any hud
posted in Customization
1
#1
0 Frags +

recently, i made a speedometer for tf2. saw the idea from aimisadick about 7 months ago. i've generated about 3,500 images and combined them into one vtf so that it can display speeds of 0 to 3500 (most servers cap speed to 3500) and it takes up around 14 megabytes. it looks like

https://youtu.be/5LCuYVeoMjY

to add to your own hud, simply download this zip and copy it's "materials" folder to your own hud. then, create a new file inside [your hud here]/resource/ui called "speedometer.res" and inside paste the following:

"Resource/UI/HudPlayerClass.res"
{
	"speedometer"
	{
		"visible"			"1"
		"enabled"			"1"
		"controlName"		"ImagePanel"
		"fieldName"			"speedometer"
		"zpos"				"-100"
		"xpos"				"cs-0.5"
		"ypos"				"c85"
		"wide"				"50"
		"tall"				"12"
		"image"				"replay/thumbnails/numbers"
		"scaleImage"		"1"
	}
}

you can adjust the "wide" and "tall" values to get a better size, and you can add more to the "ypos" value to get it further down.

then, at the top of [your hud here]/resource/ui/hudplayerclass.res, paste the following text:

#base	"speedometer.res"

you can edit the transparency and color of the speedometer by going into "vgui/replay/thumbnails/speedometer.vmt" and adding things like

"$alpha" "0.5"

for the transparency (between 0 and 1) or

"$color" "{ 255 50 200 }"

for color (rgb 0-255).

enjoy!

recently, i made a speedometer for tf2. saw the idea from aimisadick about 7 months ago. i've generated about 3,500 images and combined them into one vtf so that it can display speeds of 0 to 3500 (most servers cap speed to 3500) and it takes up around 14 megabytes. it looks like [youtube]https://youtu.be/5LCuYVeoMjY[/youtube]

to add to your own hud, simply download [url=https://www.dropbox.com/s/4m45t5qnayqdt0c/speedometer.zip?dl=1]this zip[/url] and copy it's "materials" folder to your own hud. then, create a new file inside [your hud here]/resource/ui called "speedometer.res" and inside paste the following:
[code]
"Resource/UI/HudPlayerClass.res"
{
"speedometer"
{
"visible" "1"
"enabled" "1"
"controlName" "ImagePanel"
"fieldName" "speedometer"
"zpos" "-100"
"xpos" "cs-0.5"
"ypos" "c85"
"wide" "50"
"tall" "12"
"image" "replay/thumbnails/numbers"
"scaleImage" "1"
}
}
[/code]
you can adjust the "wide" and "tall" values to get a better size, and you can add more to the "ypos" value to get it further down.

then, at the top of [your hud here]/resource/ui/hudplayerclass.res, paste the following text:
[code]
#base "speedometer.res"
[/code]

you can edit the transparency and color of the speedometer by going into "vgui/replay/thumbnails/speedometer.vmt" and adding things like [code]"$alpha" "0.5"[/code] for the transparency (between 0 and 1) or [code]"$color" "{ 255 50 200 }"[/code] for color (rgb 0-255).

enjoy!
2
#2
5 Frags +

I saw other peoples povs where they had like a speedo thing and was wondering how they got it, nice work

I saw other peoples povs where they had like a speedo thing and was wondering how they got it, nice work
3
#3
2 Frags +

is there a way too make it track only horizontal//x axis movement? That's what most people are looking for, to begin with, and without it, it's virtually impossible to actually know what speed you're at.

is there a way too make it track only horizontal//x axis movement? That's what most people are looking for, to begin with, and without it, it's virtually impossible to actually know what speed you're at.
4
#4
0 Frags +
chellis there a way too make it track only horizontal//x axis movement?

i dont believe so. the current vmt that the speedometer uses is made with a "material proxy" and looks like this:

"UnlitGeneric"
{
	"$basetexture" "vgui/replay/thumbnails/numbers"
	"$translucent" 1
	"$vertexcolor" 1
	"$no_fullbright" 1
	"$ignorez" 1
	"$speed" 0
	Proxies {
		PlayerSpeed {
			scale 1
			resultVar $speed
		}
		Clamp {
			min 0
			max 9999
			srcVar1 $speed
			resultVar $frame
		}
	}
}

right now it just takes the vmt proxy "PlayerSpeed" and if you have a look in this list of material proxies there doesnt appear to be an alternative that gets only horizontal speed.

[quote=chell]is there a way too make it track only horizontal//x axis movement?[/quote]
i dont believe so. the current vmt that the speedometer uses is made with a "material proxy" and looks like this:
[code]
"UnlitGeneric"
{
"$basetexture" "vgui/replay/thumbnails/numbers"
"$translucent" 1
"$vertexcolor" 1
"$no_fullbright" 1
"$ignorez" 1
"$speed" 0
Proxies {
PlayerSpeed {
scale 1
resultVar $speed
}
Clamp {
min 0
max 9999
srcVar1 $speed
resultVar $frame
}
}
}
[/code]

right now it just takes the vmt proxy "PlayerSpeed" and if you have a look in [url=https://developer.valvesoftware.com/wiki/List_Of_Material_Proxies]this list of material proxies[/url] there doesnt appear to be an alternative that gets [i]only[/i] horizontal speed.
5
#5
1 Frags +

cannot get it to work on deli hud neue, though i could just have a derpy setting

cannot get it to work on deli hud neue, though i could just have a derpy setting
6
#6
0 Frags +
aieracannot get it to work on deli hud neue, though i could just have a derpy setting

having the same issue, cant get it to work with sayo2 i also tried some of the other huds that were on the github that already had it and those didnt work either

[quote=aiera]cannot get it to work on deli hud neue, though i could just have a derpy setting[/quote]

having the same issue, cant get it to work with sayo2 i also tried some of the other huds that were on the github that already had it and those didnt work either
7
#7
0 Frags +
crazyaieracannot get it to work on deli hud neue, though i could just have a derpy setting
having the same issue, cant get it to work with sayo2 i also tried some of the other huds that were on the github that already had it and those didnt work either

got it to work by moving it i guess?

[quote=crazy][quote=aiera]cannot get it to work on deli hud neue, though i could just have a derpy setting[/quote]

having the same issue, cant get it to work with sayo2 i also tried some of the other huds that were on the github that already had it and those didnt work either[/quote]
got it to work by moving it i guess?
8
#8
19 Frags +

I did this about 6 months ago and have streamed with it + sent it around; I'm surprised someone else made one independently.

You don't need to have 10000 frames since you can do each digit individually with some arithmetic.

Here's the proof-of-concept which I've been using, no comically large textures needed:
https://mega.nz/file/oe5yELKB#Wc5HRl7PW1DZjgynS-tpqrOP9_k8cx-PRd7-tUIrrXc

The speed you get from the material proxy is an absolute speed, so there is no way to convert it into components and make an x/z-only speedometer like the speedo plugins in jump servers. There's a PlayerPosition material proxy which you can split into components, but it's ultimately not useful since there's no way to take the derivative using material proxy math.

I did this about 6 months ago and have streamed with it + sent it around; I'm surprised someone else made one independently.

You don't need to have 10000 frames since you can do each digit individually with some arithmetic.

Here's the proof-of-concept which I've been using, no comically large textures needed:
https://mega.nz/file/oe5yELKB#Wc5HRl7PW1DZjgynS-tpqrOP9_k8cx-PRd7-tUIrrXc

The speed you get from the material proxy is an absolute speed, so there is no way to convert it into components and make an x/z-only speedometer like the speedo plugins in jump servers. There's a PlayerPosition material proxy which you can split into components, but it's ultimately not useful since there's no way to take the derivative using material proxy math.
9
#9
0 Frags +

nvm waldo's version fixed my issues

nvm waldo's version fixed my issues
10
#10
1 Frags +

how come waldo's one works but the other one doesn't? same thing for me, couldn't get the original one to show no matter what i did with the positions and size

how come waldo's one works but the other one doesn't? same thing for me, couldn't get the original one to show no matter what i did with the positions and size
11
#11
0 Frags +
crazynvm waldo's version fixed my issuesapa3how come waldo's one works but the other one doesn't? same thing for me, couldn't get the original one to show no matter what i did with the positions and size

im not a hud editing expert or anything, so i dont really know. most editing i did also places the speedometer in a separate file and has hudplayerhealth load it using #base, but i assumed it didnt matter. all i know is i can get it working myself in the huds i upkeep. the other speedometer might be better anyways, since it takes up less space. i've edited the original post to include the step of creating a second file.

[quote=crazy]nvm waldo's version fixed my issues[/quote]
[quote=apa3]how come waldo's one works but the other one doesn't? same thing for me, couldn't get the original one to show no matter what i did with the positions and size[/quote]
im not a hud editing expert or anything, so i dont really know. most editing i did also places the speedometer in a separate file and has hudplayerhealth load it using #base, but i assumed it didnt matter. all i know is i can get it working myself in the huds i upkeep. the other speedometer might be better anyways, since it takes up less space. i've edited the original post to include the step of creating a second file.
12
#12
5 Frags +

I assume the main problem comes from pasting the element inside HudPlayerHealth.res, in many HUDs that panel is not set to cover the whole screen so the speedometer could very easily endup off screen, I would suggest pasting it inside HudPlayerClass.res instead as it is basically the same thing but in 99% of the HUDs it covers the whole screen.

I assume the main problem comes from pasting the element inside HudPlayerHealth.res, in many HUDs that panel is not set to cover the whole screen so the speedometer could very easily endup off screen, I would suggest pasting it inside HudPlayerClass.res instead as it is basically the same thing but in 99% of the HUDs it covers the whole screen.
13
#13
2 Frags +

i made some better looking numbers for waldo's version
screenshot: https://i.imgur.com/mdgPzMg.png
dl: https://transfer.sh/3xv5lg/hudspeed-wswnums.zip

i made some better looking numbers for waldo's version
screenshot: https://i.imgur.com/mdgPzMg.png
dl: https://transfer.sh/3xv5lg/hudspeed-wswnums.zip
14
#14
20 Frags +

i think this game needs a pedometer rather than a speedometer

i think this game needs a pedometer rather than a speedometer
15
#15
0 Frags +

computers aren't using 128 bits yet bro

computers aren't using 128 bits yet bro
16
#16
-3 Frags +

yo is there anyway to change the font numbers???

yo is there anyway to change the font numbers???
Please sign in through STEAM to post a comment.