Jump to content

Q3Map2/Entity keys

From Wikibooks, open books for an open world

Q3Map2-specific entity keys:

[edit | edit source]
  • Let it be known that entity keys with a preceeding underscore ("_") character are keys read by the compiler, and keys with no preceeding underscore are read by both the compiler and the game.

_indexmap

[edit | edit source]
  • Path to an art file (typically .pcx or .bmp) used to guide the mapping of shaders onto a metashaded surface, such as Quake III: Team Arena-style terrain.
  • The path for _indexmap should start in the same directory as is used by your game's fs_basepath switch (i.e. "baseq3"). If your indexmap were found at "C:\path\to\Quake III Arena\baseq3\indexmap.pcx", a value of "indexmap.pcx" for the _indexmap key would be sufficient.
  • _indexmap used to be "alphamap", though the latter is now deprecated. A key of "alphamap" will still work, but (as it does not follow the underscored compiler key format) its use is not encouraged.
  • _indexmap is used on func_group entities.

_layers

[edit | edit source]
  • Number of unique root shaders found in a terrain metashader, such as those used by Quake III: Team Arena-style terrain.
  • _layers used to be "layers", though the latter is now deprecated.
  • _layers is used on func_group entities.

_shader

[edit | edit source]
  • Path to the metashader used to assign textures to a terrain (func_group) entity. Omit the "textures/" prefix.
  • _shader used to be "shader", though the latter is now deprecated.
  • _shader is used on func_group entities.

_lightmapscale

[edit | edit source]
  • Floating point value scaling the resolution of lightmaps on brushes/patches in this entity (default 1.0). A _lightmapscale of 0.25 would result in four times as much lightmap detail as 1.0, while 4.0 would only have one quarter of 1.0's detail.
  • _lightmapscale is used on func_group entities; though worldspawn supports _lightmapscale, use of lightmap scaling on the world is not recommended.

_cs or _castshadows

[edit | edit source]
  • Allows per-entity control over shadow casting.
  • Defaults to 0 on entities, 1 on world. 0 = no shadow casting, 1 = casts shadows on world.
  • Can be used in conjunction with _rs (or _receiveshadows) for tighter control of where, exactly, certain shadows fall.
  • A _cs value greater than 1 (say, "7") would cast shadows on the world, and on any entity with a corresponding _rs value ("7" again, in our case) as well.
  • A _cs value less than 1 (say, "-7") would cast shadows only on entities with a corresponding _rs value ("-7") and not cast shadows on the world.
  • _cs is used on any entity.
  • misc_model entities, which are static, belongs to world.

_rs or _receiveshadows

[edit | edit source]
  • Allows per-entity control over shadow reception.
  • Defaults to 1 on everything. 0 = receives no shadows, 1 = receives world shadows.
  • Can be used in conjunction with _cs (or _castshadows) for tighter control of where, exactly, certain shadows fall.
  • A _rs value greater than 1 (say, "7") would receive world shadows, as well as shadows from any entity with a corresponding _cs value ("7" again).
  • A _rs value less than 1 (say, "-7") would receive shadows only from entities with a corresponding _cs value ("-7") and not receive world shadows.
  • _rs is used on any entity.

_celshader

[edit | edit source]
  • Sets the cel shader used for this entity. Omit the "textures/" prefix.
  • _celshader is used on any entity.

_targetname

[edit | edit source]
  • Used to attach a misc_model entity to func_whatever entities (i.e. func_bobbing, func_rotating, etc).
  • _targetname is generally used on motion entities.

_keepLights

[edit | edit source]
  • By default q3map2 removes light entities from the BSP.
  • Set "_keepLights" "1" on the worldspawn to keep light entities in the BSP entity lump.

Q3Map2-specific spawnflags

[edit | edit source]

misc_model entity

[edit | edit source]
Spawnflag 1
[edit | edit source]
  • Toggles the model casting shadows on the map surfaces.
Spawnflag 2
[edit | edit source]
  • Sets the autoclipping spawnflag, automatically assigning q3map_clipmodel to any shaders used by the model.
  • Use of Q3Map2 autoclipping for models is only recommended for large models with relatively few triangles in their mesh (i.e. terrain). The Q3Map2 autoclipping algorithm is a bit of a hack, and can hurt in-game performance (as well as produce erroneous clipping results) when used on small, dense models.
Spawnflag 3
[edit | edit source]
  • Spawnflag 1 plus Spawnflag 2.
Spawnflag 4
[edit | edit source]
  • Sets the forcemeta spawnflag, automatically adding q3map_forcemeta to any shaders used by the model (which, in turn, allows the model to become lightmapped).
  • This, effectively, is the "lightmapped model" spawnflag.
Spawnflag 5
[edit | edit source]
  • Spawnflag 1 plus Spawnflag 4.
Spawnflag 6
[edit | edit source]
  • Spawnflag 2 plus Spawnflag 4.
Spawnflag 7
[edit | edit source]
  • Spawnflag 1 plus Spawnflag 2 plus Spawnflag 4.