$keyvalues: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(I will eradicate unnecessary VDF quote marks from this website!)
No edit summary
Line 1: Line 1:
Embeds an arbitrary block of [[keyvalue]]s into the .mdl file. <code>[[prop_data]]</code> keyvalues are the most common, as they define various properties of [[prop_physics]] models, but there is no limit on what other KVs a mod's programmer might add support for.
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.


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


== Examples ==
== Examples ==
Line 15: Line 15:
  }
  }
  }
  }
 
<!-- What does this teach the reader that the other two examples don't?
  $keyvalues
  $keyvalues
  {
  {
Line 34: Line 34:
  }
  }
  }
  }
  }
  }-->


  $keyvalues
  $keyvalues
  {
  {
  ''// This is an example KV. It won't be recongised by any of Valve's games!''
  ''// This is an example KV. It won't be recognised by any of Valve's games!''
  ''// (If you were being picky, you might point out that this ought to be a [[localised]] string...)''
  ''// (If you were being picky, you might point out that this ought to be a [[localised]] string...)''
  hud_name "Rubber chicken with a pulley in the middle"
  hud_name "Rubber chicken with a pulley in the middle"
   
   
  ''// Of course, we can still include other KVs that ARE read.''
  ''// Of course, we can still include other KVs that ARE read by stock code.''
  prop_data
  prop_data
  {
  {

Revision as of 12:50, 28 March 2008

Embeds an arbitrary block of keyvalues into the .mdl file. prop_data keyvalues are the most common, as they define various properties of Valve's prop_* entities, but there is no limit on what other KVs a mod's programmer might add support for.

Warning.pngWarning:Since the values are arbitrary, studiomdl can't check that they re correct when it compiles the model.

Examples

$keyvalues
{
	prop_data
	{
		base              Wooden.Small
		dmg.bullets       0
		explosive_damage  100
		explosive_radius  100
	}
}
$keyvalues
{
	// This is an example KV. It won't be recognised by any of Valve's games!
	// (If you were being picky, you might point out that this ought to be a localised string...)
	hud_name "Rubber chicken with a pulley in the middle"

	// Of course, we can still include other KVs that ARE read by stock code.
	prop_data
	{
		(...)
	}
}