Team Fortress 2

Team Fortress 2

34 ratings
Disabling Decals Entirely (Casual & Community Servers)
By Zeugziumy
A technical & advanced guide to disable decals from downloading by editing a certain file on your PC. In theory, this should always work.
2
   
Award
Favorite
Favorited
Unfavorite
Before you do anything
Please make sure to read the entire guide before doing anything.
Thank you.
Introduction
In Team Fortress 2, there exists an item that lets players add custom images to their textures, called the Decal Tool. But, unlike Sprays (an in-game system that lets players put custom images on walls), Decals cannot be disabled in any shape or form.

There has been several mods in the past to disable decalbility on decalable items, which eventually stopped working due to patches:
  • At one point all mods were compatible on Casual Servers. This was shortly changed to not allow any sorts of mods (in technical terms, official Casual servers started enforcing sv_pure);
  • Some mods that could bypass sv_pure existed over the years. Some were exclusive to some files (sounds only), while others did work for disabling decals;
  • There has been different types of decal-disabling mods. Some that never worked on Casual, others that did. Eventually, it seems that all the Casual-compatible decal disabling mods are no longer working.
However, the method I'm about to present on this guide should, in theory, be unpatchable, due to how it works. This method would only be "fixed" if Valve changes the URL that decals are stored. Regardless, this would simply require an update to the guide, and it still would work after updating the necessary file.
How this works
This mod works by editing a file known as "hosts". This file exists on all Operational Systems, like WIndows, Linux, and MacOS. In theory, this should also be possible on the Steam Deck, as it runs under Linux (or any other OS if the user replaced it completely).

In short, "hosts" is a file that lets you block communication from certain IP addresses and certain domain URLS. By adding the URL that decals are downloaded from when playing TF2, the game cannot communicate with the server, so it's unable to download the decals, therefore, it does not show them.
About VAC
Would this be VAC-bannable?
No. It shouldn't be. Because we are not directly modifying the game's memory, or editing the game's client.dll and server.dll, this should not trigger a VAC ban.

I have tested this method myself by going to Casual Mode, and, I did not receive a VAC ban, neither any sort of errors related to VAC being misconfigured in my machine.

All this does is blocking your Network adaptor from communicating with steamuserimages.
Requirements
- Administrator rights on Windows / MacOS / Linux.
- A text editor. On Windows, regular Notepad will suffice.
Editing the hosts file on Windows
  • Open your Start Menu (the Windows logo on your Keyboard or at the corner of your screen);
  • Type Notepad;
  • Right-click on it, and press "Run as Administrator";
  • Go to File -> Open;
  • Navigate to c:\Windows\System32\Drivers\etc;
  • Click on the Text Documents (*.txt) dropdown menu, and choose All Files (*.*);
  • Open the hosts file;
  • At the end of the file, create a new line by pressing Enter on your keyboard, and add the following to the new line:
127.0.0.1 steamuserimages-a.akamaihd.net
  • Save it.
  • Once done, the file should look like this:


  • Whenever you wish to re-enable access to steamuserimages, just add a # at the start of the line. Like this:
# 127.0.0.1 steamuserimages-a.akamaihd.net
  • Once done, the file should look like this:
Editing the hosts file on Linux
Disclaimer: I have limited knowledge on Linux. The following information may not be as complete or exact depending on your Linux distro. The following steps for editing the hosts file on Linux was obtained from https://docs.rackspace.com/docs/modify-your-hosts-file

Disclaimer 2: I have not tested this under a Linux machine. If you are Linux user, please let me know if this method works.
  • Open your Terminal;
  • Enter the following command to open the hosts in a text editor:
sudo nano /etc/hosts
  • You must type the password set on your Linux's administrator account, as it's being run under sudo privileges;
  • At the end of the file, create a new line, and add the following to the new line:
127.0.0.1 steamuserimages-a.akamaihd.net
  • Press Control + X, and if it asks to save the changes, type y

  • Whenever you wish to re-enable access to steamuserimages, just add a # at the start of the line. Like this:
# 127.0.0.1 steamuserimages-a.akamaihd.net
Editing the hosts file on MacOS
Disclaimer: I have zero knowledge on MacOS. The following information may not be as complete or exact depending on your MacOS version. The following steps for editing the hosts file on Linux was obtained from https://docs.rackspace.com/docs/modify-your-hosts-file

Disclaimer 2: I have not tested this under a MacOS machine. If you are Mac user, please let me know if this method works. Apparently, this method may change depending on your MacOS X version. For MacOS X versions 10.0 through 10.1.5, please check the rackspace documentation.
  • Go to Applications -> Utilities, and click on Terminal to open the terminal window;
  • Enter the following command to open the hosts file in a text editor:
sudo nano /private/etc/hosts
  • You must type the password set on your Mac OS' administrator account, as it's being run under sudo privileges;
  • At the end of the file, create a new line, and add the following to the new line:
127.0.0.1 steamuserimages-a.akamaihd.net
  • Press Control + X, and if it asks to save the changes, type y

  • Whenever you wish to re-enable access to steamuserimages, just add a # at the start of the line. Like this:
# 127.0.0.1 steamuserimages-a.akamaihd.net
Caveats when using this method
Because we are blocking access from steamuserimages-a.akamaihd.net, anything that also comes from this domain will also not load. This can cause some issues on Steam Community and certain Third-Party Websites.

A couple things that will stop loading include:
  • Nearly everything user-generated on Steam (with the exception of Profile Pictures), including:
  • Screenshots;
  • Artworks;
  • Guide Icons;
  • Guide Screenshots;
  • Workshop thumbnails;
  • Workshop screenshots;
  • Images sent through the Steam chat;
  • And possibly more.

Note that uploading Screenshots from the Steam Client still works, but you will not be able to see them online until you re-enable the access to steamuserimages. Once the file is uploaded, however, the thumbnail will stop showing from your Screenshot Manager.

On third-party websites, such as backpack.tf, decals will not load from player's backpacks, as well the classifieds, meaning you cannot see what decals are coming with your item in case there are any applied.

You will still, however, see an empty white box, on the space where the decal was supposed to be in. So at least you can still tell what items have decals applied, and which ones doesn't. But... since the Trade interface never shows decals anyway, and the seller has more than 1 of the item you want, your mileage may vary, just like trading any sort of decalable item without even using the hosts method.
Troubleshooting
I can't save the changes to the hosts file
Make sure you a running Notepad, Notepad++, or any text editor of your preference, with Adminstrator privileges. Because this file resides on C:/Windows, you must have Adminstrator rights to save it. If you are regular User on your computer, you will not be able to edit it. Ask your Adminstrator if that's the case.

I can't edit the hosts file no matter what I do, even with Adminstrator rights.
Some anti-viruses and firewall software will automatically deny users from editing the hosts file, as a security mechanism. Because this can differ per product, I suggest looking at your anti-virus / firewall's options, and see for anything along the lines of "deny editing hosts file", "lock hosts file", "protect hosts file", etc.

If you do not mind having certain parts of the Steam Community not work, and certain bugs on the Steam Client, then you can re-enable that option from your anti-virus and / or firewall software once edited. Just keep in mind you will have to always disable when you want to edit the hosts file again.

Please read the Warnings section, as it's very important regarding this case.

I can't see my own decals! Did you just wipe all my decals!?!
No. Your decals are still fine as they are stored on Valve's servers. What is happening, however, is that the game is unable to download the image files as steamuserimages was blocked by the hosts file.

If you wish to see your decals back, you will add a # at the line we just added to the hosts file.

If you equip any decaled item, even if they aren't visible to you, should still be visible to other players.

Additionally, if you wish to still see your own decals, you can save the edited hosts file only after checking out your items first. You can move all your decaled items to the first page of your backpack, open your backpack screen once launching TF2, then saving the hosts file once all decals are downloaded. This will restrict the download of other player's decals, but yours should stay as they were downloaded before we restricted access for steamuserimages.

Keep in mind that Objectors that fell to the ground by other players technically still have their decals on, it's just you that can't see them. If you are unsure what kind of imagery another player's objector may have, it's better to not actually grab them from the ground.

127.0.0.1?
127.0.0.1 represents localhost, and it's not my actual IP Address. This value is always the same on every machine. localhost represents the hostname of the current computer used to access it You should not type your IP Address on the hosts file, and instead just type how it was explained step by step, with 127.0.0.1

If for some reason you are under a IPv6 connection, replace 127.0.0.1 with ::1

Please note that trying this under a IPv6 connection and using ::1 was untested prior to making this guide.
Warnings
Outside the things that will stop loading on Steam Community, there are other Warnings to be mentioned:
  • It's possible for some games on Steam to use direct steamuserimages communications on their games, causing problems specific to each game. This may be rare, however;
  • I do NOT recommend applying your own Decals with the hosts file edited to block steamuserimages. You will not be able to actually see the decal right after applying it, and, I don't know if the process actually goes through once the decal is applied, as I haven't tested it myself. Better safe than sorry.
  • The options from anti-viruses and firewalls that blocks modifying the hosts file are security measures, so malwares can't edit the hosts file. Theoretically, malware can block access to all websites, only specific websites (leaving you scratching your head), and worse of all, redirect you to fake websites that can steal your info, if there's no security in place that blocks from editing. Malware can still edit the hosts file if it's ran with Administrator rights, and in rarer cases, with Windows exploits that bypass Administrator entirely. This is a good time to always remind to keep your computer and software up-to-date with the latest security fixes.
PLEASE BE AWARE THAT DISABLING THOSE SECURITY MEASURES MAY POSE A RISK TO YOUR COMPUTER IF YOU END UP GETTING MALWARE THAT DOES IN FACT EDIT THE HOSTS FILE. YOU MAY NOT BE ABLE TO ACCESS WEBSITES ANYMORE, WEBSITES MAY END UP BEING REDIRECTED TO FAKE ONES (THAT CAN STEAL YOUR INFORMATION, OR DOWNLOAD OTHER TYPES OF MALWARE), AND / OR YOU MAY NOT BE ABLE TO USE THE INTERNET AT ALL.

THIS DOES NOT APPLY TO ONLY WINDOWS, BUT TO ANY OPERATIONAL SYSTEM. WHILE MALWARE IS MUCH MORE COMMON ON WINDOWS MACHINES, INFORMATION STEALING MALWARE CAN HAPPEN TO ANY OS, SPECIALLY THOSE THAT EDIT THE HOSTS FILE IN BAD FAITH, AS IT RELIES ON BROWSERS THAT ARE AVAILABLE ON EVERY OS.
Ideas of making this more straight-forward
It should be possible in creating an application (that works on Windows, Linux, and MacOS), that makes the whole process a lot more straight-forward, and facilitates the whole process as a result.

Right now, the guide only explains how to do it manually.

If any talented programmers would like to reach out to me, and help me making a working and optimized application that makes the process easier, please let me know!
DISCLAIMER
I AM NOT RESPONSIBLE IF ANYTHING GOES BAD ON YOUR COMPUTER WHEN FOLLOWING THIS GUIDE. THIS APPLIES TO THE WINDOWS, LINUX AND MacOS METHODS. PLEASE PROCEED WITH CAUTION.

I AM ALSO NOT RESPONSIBLE FOR ANY DAMAGES TO YOUR COMPUTER IF THE HOSTS FILE IS LEFT UNPROTECTED BY YOUR ANTI-VIRUS AND / OR FIREWALL SOFTWARE, AND YOU END UP GETTING MALWARE THAT EDIT HOSTS FILES IN BAD FAITH, FROM OUTSIDE SOURCES.

NEITHER I AM RESPONSIBLE FOR THE MISUSE OF EDITING RANDOM SYSTEM-COMPONENTS WHILE RUNNING NOTEPAD AS ADMINISTRATOR, AS IT CAN CAUSE PROBLEMS WITH YOUR COMPUTER.
21 Comments
Zeugziumy  [author] Jul 26, 2024 @ 4:59am 
As of the Summer 2024 update, Valve finally gave us the option to disable custom decals, rendering this guide obsolete.

This will still be up for archival purposes. However, this can still be used if you'd like to see your friends decals, but you would require checking everything they have before editing the hosts file.

Here hoping Valve expands the disable decals option to include "Enable", "Enable only for me, friends and party", "Disable all except mine". The game has already some code built-in related to do stuff only if you are friends with someone (trade notifications, inspecting on MVM, etc.).
Zeugziumy  [author] Jul 3, 2024 @ 3:43am 
You can still do in the manual way, the .bat way just makes things easier. There should be other ways to make the .bat work, but this is the approach I took.
Zeugziumy  [author] Jul 3, 2024 @ 3:41am 
Yes. I made a .bat script that automatically launches when TF2 is launched. This batch script works by renaming 2 files on the drivers/etc folder and pretty much disables decals when TF2 is launched and enables it when it's TF2 is closed.

There are two files, one that blocks network communication with steamuserimages, and the other one that is my default hosts file. The bat will simply rename them to stay in effect.

I was unable to make it work via AutoHotkey, but it should be possible. Right now, I use it in conjunction with DisplayFusion.
MAYO Jul 2, 2024 @ 10:01pm 
Does this still work?
dew Apr 22, 2024 @ 7:44pm 
This is really dumb
Smelly Man Tits IV Apr 19, 2024 @ 9:18am 
if you need this guide you're probably too young to be playing TF2
Zeugziumy  [author] Apr 19, 2024 @ 4:09am 
Correct. While I haven't encountered anyone with a malicious decal, it's most likely fixed.

Though the guide will still be up as it was made to disable decals on Casual, conveniently, it could also be used as a workaround of the exploit before the patch.
mrswormsweat Apr 18, 2024 @ 9:58pm 
An update patch notes claims the exploit is fixed
chillrend_morphs_high_lod6 Apr 17, 2024 @ 10:20am 
thx :gnumz_heart:
Zeugziumy  [author] Apr 17, 2024 @ 4:17am 
much welcome:ibrabbit: