Switching Team Colors via vmt files

Discussion in 'Mapping Questions & Discussion' started by Sebi, Sep 25, 2011.

  1. Sebi

    Sebi L2: Junior Member

    Messages:
    65
    Positive Ratings:
    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:

    [​IMG]
    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: Sep 25, 2011
  2. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    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.

    [​IMG]
    [​IMG]

    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.
     
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    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.
     
  4. Sebi

    Sebi L2: Junior Member

    Messages:
    65
    Positive Ratings:
    13
    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.
     
  5. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    Hrm. I was not saying it from logic, but from experience. That is how it is/was. I will have to investigate to see if Valve actually fixed it.