Spawnarg: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
mNo edit summary
(add link to list)
Line 4: Line 4:


  "mass" "260"
  "mass" "260"
[note - in the game editor the quote marks should not be used but they are present in the map file itself]
 
'''Note:''' in the game editor the quote marks should not be used but they are present in the map file itself.


In this example, the ''name'' of the spawnarg (also called the "key") is "mass". The ''value'' of the spawnarg (also called simply "the value") is "260". This indicates that the mass of the entity is 260 units.
In this example, the ''name'' of the spawnarg (also called the "key") is "mass". The ''value'' of the spawnarg (also called simply "the value") is "260". This indicates that the mass of the entity is 260 units.
Line 15: Line 16:
Mappers will usually only change spawnargs via DarkRadiant or D3Ed.
Mappers will usually only change spawnargs via DarkRadiant or D3Ed.


[[Category:Editing]]
Please see also the [[Spawnargs_list|list of all spawnargs]].
 
{{editing}}

Revision as of 14:31, 4 November 2007

A spawnarg, also known as a key/value pair or a keyval, is a property on an entity. Spawnargs determine the behaviour and characteristics of entities.

For example, here's one spawnarg:

"mass" "260"

Note: in the game editor the quote marks should not be used but they are present in the map file itself.

In this example, the name of the spawnarg (also called the "key") is "mass". The value of the spawnarg (also called simply "the value") is "260". This indicates that the mass of the entity is 260 units.

There are a couple of ways to set spawnargs.

  1. In .def files. The key/value pairs listed in a .def file indicate the default values for various spawnargs on a given class of entity. For example, the spawnarg "mass" "260" is present in the file tdm_ai_builder_forger.def within the block of spawnargs labelled entityDef atdm:ai_builder_forger, indicating that all atdm:ai_builder_forger entities (Builder forger AIs) have a mass of 260 by default.
  2. Using DarkRadiant or D3Ed. Select an entity and press E to view the Entity window. You'll be presented with a list of keys and values; these are that entity's spawnargs. If you change a spawnarg here, you change it only for that particular entity.

Mappers will usually only change spawnargs via DarkRadiant or D3Ed.

Please see also the list of all spawnargs.