Difference between revisions of "Metamod:Source VDF Files"

From AlliedModders Wiki
Jump to: navigation, search
m (New page: As of Metamod:Source 1.4.3, there is a new automated plugin loading mechanism. This was designed such that plugin authors could distribute uniform packages without any configuration neede...)
 
m
Line 19: Line 19:
  
 
Metamod:Source will auto-correct path separator characters for the platform it's running on.
 
Metamod:Source will auto-correct path separator characters for the platform it's running on.
 +
 +
[[Category:Metamod:Source Documentation]]
 +
[[Category:Metamod:Source Development]]

Revision as of 21:45, 24 January 2008

As of Metamod:Source 1.4.3, there is a new automated plugin loading mechanism. This was designed such that plugin authors could distribute uniform packages without any configuration needed on behalf of the user.

The file's extension must be .vdf and it must reside in addons/metamod (or whatever mm_basedir is set to). Plugin authors should choose uniquely identifying names.

The contents of a .vdf file must be in Valve's KeyValues format (not SourceMod's SMC format, which has subtle differences). The file must have a root section called "Metamod Plugin" with one or more properties. The allowed properties:

  • "file" - Specifies the file to load as it would appear in metaplugins.ini.
  • "alias" - Specifies the alias as it would appear in metaplugins.ini.

The "file" directive is required and "alias" is optional. If an alias is chosen, it should be uniquely identifying (i.e., SourceMod uses "sourcemod" rather than "sm," which could reasonably collide with another plugin).

Example reference contents of sourcemod.vdf:

"Metamod Plugin"
{
	"alias"		"sourcemod"
	"file"		"addons/sourcemod/bin/sourcemod_mm"
}

Metamod:Source will auto-correct path separator characters for the platform it's running on.