Switching Team Colors via vmt files

Sebi

L2: Junior Member
Aug 13, 2011
65
13
Hi there!
As you may have guessed, I'm gonna abandon my first map for the sake of creating a second one of the same game mode (Hold the Flag) but with less complexity and more fun in it.
I need to set the game mode keyvalue in the intelligence entity to Invade (instead of CTF or anything else), otherwise it won't work properly. I noticed that many players (even including myself!!) have lot of trouble with realizing that in my game mode, the team color of the intelligence briefcase is switched 180° from the normal ctf mode. That means, BLU ppl can pick up a BLU flag and vice versa, and not BLU can take RED flags like in normal ctf.
I came up with the idea to change the vmt files of the textures responsible for the team color and I was successful. Well... partially:

htf_sebi_a5_w10002ikta.png

This shows an intelligence which can can be picked up by a RED guy.

As you can see, I was successful in changing the color of the intelligence itself, and the related HUD stuff. But what I fail to change is the circular timer above it that still shows the color of the team that it should not show as well as the outline, which is also wrongly colored.

When I looked around the gcf file, I found a material called "flagtime_full" / "flagtime_empty" in the folder materials/vgui which looks just like what I am looking for but... It is grey! I feel like this is only a texture to be multiplicated with another texture. Same goes for the outline of the Briefcase. A plain white texture.

Which texture am I looking for? What needs to be changed to let Intel-Outline + Intel-Timer have the correct team color?
 
Last edited:

Seba

DR. BIG FUCKER, PHD
aa
Jun 9, 2009
2,364
2,728
I think you can just set the flag type to Invade, team to any, and have the flag set its colour to gray on picked up or dropped.

mke0r.png

7A40V.png


That was my setup for kingpin; the flag stays gray and pick-up-able no matter what.

I'm not sure if this is exactly what you're looking for. If so, you're welcome. If not, I may be able to help further.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,670
You shouldn't ever override default materials with custom content embedded in. It stays cached in memory and will persist to any subsequent maps since the client has no reason to think it should be reloading stock content.
 

Sebi

L2: Junior Member
Aug 13, 2011
65
13
You shouldn't ever override default materials with custom content embedded in. It stays cached in memory and will persist to any subsequent maps since the client has no reason to think it should be reloading stock content.

That seems logical. I tested it nevertheless and guess what! For some reason it is wrong, although it is logical.
I loaded my map via the "map" console-command with the custom vmts embedded via PakRat. It worked (as far as the screeny above shows.) I loaded 2fort. And... it worked too! The standard materials were used in 2fort, not the custom ones Pakratted into my map. This is nice :D

---
Sorry Seba. Although It's a plausible idea, I don't think it would help to have the intel carriable by it's defenders too.
If there is no possibility to change the timer's color, I think I'm gonna leave it that way. It is no game breaking problem after all.