$keyvalues: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
Embeds an arbitrary block of [[keyvalue]]s into the .mdl file. <code>[[Prop Data|prop_data]]</code> keyvalues are the most common, as they define various properties of Valve's <code>prop_*</code> entities, but there is no limit on what other KVs a mod's programmer might add support for.
The [[QC command]] [[$keyvalues]] embeds an block of arbitrary [[keyvalue]]s into the .mdl file.  
{{note|The [[Prop Data|prop_data]] keyvalues block is used heavily for prop_physics, etc models.}}


{{warning|Since the values are arbitrary, [[studiomdl]] can't check that they are correct when it compiles the model.}}
{{note|Since the values are arbitrary, [[studiomdl]] can't check that they are correct when it compiles the model.}}


== Example ==
== Example ==

Revision as of 15:06, 31 March 2008

The QC command $keyvalues embeds an block of arbitrary keyvalues into the .mdl file.

Note.pngNote:The prop_data keyvalues block is used heavily for prop_physics, etc models.
Note.pngNote:Since the values are arbitrary, studiomdl can't check that they are correct when it compiles the model.

Example

$keyvalues
{
	prop_data
	{
		base              Wooden.Small
		dmg.bullets       0
		explosive_damage  100
		explosive_radius  100
	}

	// hud_name has been made up for this article. It won't be recognised by any of Valve's games!
	// (If you were being picky, you might point out that it ought to be localised ...)

	hud_name "Rubber chicken with a pulley in the middle"
}