Sprays

From Team Fortress Wiki
(Redirected from Spray)
Jump to: navigation, search
This page refers to sprays painted on surfaces in the PC version. For the tool that allows you to spray an image onto an item, see Decal Tool. For items that can be sprayed by that tool, see Category:Sprayable items.
An example of a user set spray being put on a wall near the RED spawn on Badwater Basin.
"Whoooowee, would ya look at that!"
The Engineer seeing a cool spray

Sprays are a feature in the PC version of Team Fortress 2 that allow players to "spray" their own images on surfaces within a game server such as walls, ceilings, or floors instantly. It may be compared to graffiti in real life.

To apply a spray, approach ~103.9 Hammer units (roughly 2 meters / 6.5 feet) of a valid surface and press your spray key button (default keyT). If done on a valid surface, a spray sound effect plays and the image is applied. If a spray is used on an invalid surface, such as a prop, the spray sound effect plays but the image is not applied (if the spray has been already applied somewhere, it will remain in its location). The direction of a spray depends on the orientation of the surface it is used on. Applying a spray to multiple surfaces (such as the corner where two walls meet) splits it between the different surfaces.

Sprays have a cooldown of 10 seconds before another one can be applied. If a player gets a kill while the spray is on cooldown, it is instantly reset.

Sprays are disabled in Casual Mode; whilst players can still spray their images, other players will not be able to see them (although, the sound effect for spraying can be heard). The main way to see sprays in the game is via Community servers, though they are disabled by default and must be opted-in by the Advanced options menu. They can also be enabled with the command cl_spraydisable 0 (default is 1).

Technical

An image file can be uploaded to your spray list via the Multiplayer menu. The file must be converted to a .vtf. The game can automatically convert .jpg, .bmp, .tga, and non-animated .gif files to a .vtf. Sprays can be bound to a key by typing bind <key> impulse 201, replacing <key> with the desired key.

.vtf files must be 512 KB or smaller in order to appear in-game. Typically, this means a regular image uploaded directly to the game can have dimensions no larger than 512x512 pixels. Third-party software can be used to create a .vtf with better compression and nonstandard resolutions, allowing for a maximum resolution of 1020x1020 for images with no transparency (DXT1 format) or 724x724 for images with transparency (DXT5 format). Images with an aspect ratio other than a square will be stretched/squashed to fit a 1:1 aspect ratio.

Sprays can also be animated. Animated sprays have a fixed framerate of 5 frames per second and have more limited resolution than static images due to their larger filesize. All other factors being equal, the maximum resolution of an animated spray decreases as the number of frames in the animation increases, as each frame of animation contributes to the .vtf's size.

Sprays can be either enabled or disabled in the game's Multiplayer options tab, but how many are displayed at once, if any, is dependent on the value that mp_decals is set to by the server. The value must be above 0 to show sprays, and the higher the value, the more sprays that can be loaded at once. Official Valve servers have sprays disabled.

Sprays are automatically stored in the Steam cloud, but can, like all other Steam cloud files, be ignored by the client. Like other temp files, spray thumbnails saved on the client's local game folder are deleted by default upon shutting down Team Fortress 2, and thus can't be "collected" over time in that default state. However, as of October 5, 2021 Patch, there is an option tf_delete_temp_files that can toggle temp files being deleted upon shutdown in the Advanced options menu.

In-game screenshots that have been saved using the game's screen capture system (default key: F5) are already formatted to be used as sprays, but will most likely have reduced image quality and be illegible to other players.

Uses

Sprays are used by players for many reasons including:

  • To advertise clans or groups
  • Lighten up the tension of a match with comical sprays
  • To leave their mark on the world using it as a signature
  • To entertain other players
  • To distract other players
  • To warn players

The practical application of sprays in-game is almost non-existent, although they can sometimes be used to distract enemies by making them believe that there are certain obstacles in their way that in most cases would want to be avoided such as distant Snipers, Sentry Guns, or Stickybombs.

Another use for sprays is for Spies to lay a trap for unwary opponents. A Spy equipped with a Cloak and Dagger can place a spray and then lie in wait for an enemy to stop and look at it, backstabbing them while their guard is down.

Another use for sprays is for advertising items for trading purposes. These sprays can serve to gather the attention of other traders in the server.

A more practical use of sprays is to warn players of location specific obstacles, such as a sentry or a Spy in the area.

There are sprays Engineers will sometimes put next to their Teleporter that denote which classes should use the Teleporter first. These lists generally put the Engineer himself on top, since he has to maintain his buildings, and the Scout on bottom, since a level 1 Teleporter charge rate would be about as fast as the Scout running to the frontlines on foot.

Update history

September 28, 2007 Patch
  • Added option to disable Player sprays.

November 7, 2007 Patch

  • Fixed crash on importing spray logo that claimed to be a valid jpeg file, but wasn't.

January 25, 2008 Patch

  • Fixed crash caused by trying to import a custom player spray.

February 14, 2011 Patch

  • Fixed a client crash caused by malformed custom client spray.

April 14, 2011 Patch

  • Fixed a couple cases where custom sprays would not import correctly.

May 2, 2013 Patch

  • Fixed user sprays not working.

June 11, 2015 Patch

  • Fixed a remote code Execution bug and a crash related to malformed custom spray files.

September 16, 2021 Patch

  • Updated custom player sprays to be disabled for players by default
    • Players can opt-in to see custom player sprays on community servers in the Advanced Options menu
    • Custom player sprays and other temp files will be deleted when disconnecting from a server

September 17, 2021 Patch

  • Updated custom player sprays and other temp files to only be deleted on shutdown

October 5, 2021 Patch

  • Added ConVar "tf_delete_temp_files" to control custom player sprays and other temp files being deleted on shutdown
    • Can be toggled in the Advanced Options dialog
    • Default is to delete the temp files

Spray Resources