Material Types

From Valve Developer Community
Jump to navigation Jump to search

Stub

This article or section is a stub. You can help by expanding it.

Todo: What's the difference between this and material surface properties? This seems to be a leftover from GoldSrc materials.txt.
Bullet impacts on the car.

Material types are bullet impacts. To make a material use a particular material type, editscripts/surfaceproperties.txt (or scripts/surfaceproperties_mod.txt) file and set "gamematerial" to a string containing the letter shown below. For example, to make something metal:

"custom_surface"
{
	// ...

	"gamematerial"	"M"
}
Cpp.pngCode:To add or change material types do the following:
  • Find code file decals.h (found in \server\decals.h).
  • To add, place #define CHAR_TEX_CUSTOMNAME '2' (any character).
  • To change, find CHAR_TEX_UNUSED (or used) change it to CHAR_TEX_CUSTOMNAME 'R' (any character).
  • Don't forget to modify the s_pImpactEffect array in fx_impact.cpp (found in \client\fx_impact.cpp).

List of Material Types

Half-Life 2 Half-Life 2

Material Type Character Description
ANTLION A
BLOODYFLESH B
CONCRETE C
DIRT D
FLESH F
GRATE G
ALIENFLESH H
CLIP I
PLASTIC L
METAL M
SAND N
FOLIAGE O
COMPUTER P
SLOSH S
TILE T
VENT V
WOOD W
GLASS Y

Half-Life 2: Episode Two Half-Life 2: Episode Two

Material Type Character Description
EGGSHELL E The egg sacs in the tunnels.
WARPSHIELD Z Wierd-looking jello effect for advisor shield.
Note.pngNoteWARPSHIELD uses a non-existent impact effect.
Note.pngFix:Create particle system warp_shield_impact and saved it as new_impact.pcf file.

Alien Swarm Alien Swarm

Material Type Character Description
GRASS J
MUD K
LEAVES O Renamed from FOLIAGE
ASPHALT Q
BRICK R
CARDBOARD U
FAKE X "Fake" materials use this (ladders, wading, clips, etc).
CLAY 1
PLASTER 2
ROCK 3
RUBBER 4
SHEETROCK 5
CLOTH 6
CARPET 7
PAPER 8
UPHOLSTERY 9
PUDDLE 10
STEAM_PIPE 11

See Also