Materialsub.cfg: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Occurs before %compile flags are parsed)
No edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:materialsub.cfg}}{{stub}}
{{DISPLAYTITLE:materialsub.cfg}}
{{code|cfg/materialsub.cfg}} is a [[KeyValues]] file which, when the {{mono|-replacematerials}} parameter is used by [[VBSP]], causes the materials defined in the VMF to be swapped out in the compiled BSP.
{{code|cfg/materialsub.cfg}} is a [[KeyValues]] file which, when the {{mono|-replacematerials}} parameter is used by [[VBSP]], causes the materials defined in the VMF to be swapped out in the compiled BSP. Since this is parsed before [[material map compile flags]] are parsed, its main purpose is deprecating outdated materials.
{{codenote|Keyvalue handling occurs in [https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/utils/vbsp/materialsub.cpp materialsub.cpp].}}
{{codenote|Keyvalue handling occurs in [https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/utils/vbsp/materialsub.cpp materialsub.cpp].}}
== Syntax ==
== Syntax ==

Latest revision as of 08:48, 29 March 2025

cfg/materialsub.cfg is a KeyValues file which, when the -replacematerials parameter is used by VBSP, causes the materials defined in the VMF to be swapped out in the compiled BSP. Since this is parsed before material map compile flags are parsed, its main purpose is deprecating outdated materials.

Cpp.pngCode:Keyvalue handling occurs in materialsub.cpp.

Syntax

"MaterialReplacements"
{
	"AllMaps"
	{
		"material_in_vmf"	"material_in_bsp"
	}
	"mapname"
	{
		"material_in_vmf"	"material_in_bsp"
	}
}
Confirm:Verify this is accurate; it was determined by reading VBSP source code.