Worldspawn: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Cleaned up and added some game-specific keyvalues)
Line 5: Line 5:
* [[Brush]]es (except those used by [[Brush entity|entities]])
* [[Brush]]es (except those used by [[Brush entity|entities]])
* [[prop_static|Static props]]
* [[prop_static|Static props]]
* Map name, [[skybox]], [[context]]s... {{tip|Access these properties in Hammer with ''Main menu > Map > Map properties...''}}
* Map name, [[skybox]], [[context]]s...


Some other notes:
Some other notes:
Line 23: Line 23:


;Skybox
;Skybox
: [[env_fog_controller]]
: [[env_fog_controller]] (only in pre-L4D games)
: [[light_environment]]
: [[light_environment]]
: [[shadow_control]]
: [[shadow_control]]
: [[env_sun]] ({{TODO|actually, multiple suns might be allowable}})
: [[env_sun]] ({{confirm|actually, multiple suns might be allowable}})
: [[sky_camera]] (unique location)
: [[sky_camera]] (unique location)
; Optimisation
; Optimisation
Line 37: Line 37:
: [[info_intermission]] (unique location)
: [[info_intermission]] (unique location)
: [[env_global]]
: [[env_global]]


== Keyvalues ==
== Keyvalues ==
{{tip|Access these properties in Hammer with ''Main menu > Map > Map properties...''}}


; <code>message <[[string]]></code>
=== All Source games ===
: Map's description / title. Doesn't seem to be used anywhere any more.
{{KV|Map Description / Title.|string|Map's description / title. {{note|Doesn't seem to be used anywhere anymore.}}}}
; <code>skyname <sky material prefix></code>
{{KV|SkyBox Texture Name|string|[[Skybox]] material. See  [[Sky List]].}}
: [[Skybox]] material. See  [[Sky List]].
{{KV|Chapter Title Message|string|Chapter Title that appears onscreen when this level starts.}}
; <code>chaptertitle <string></code>
{{KV|Level Fade In|boolean|Fades the map in. {{bug|The fade is carried out every time the map loads, including when loading from a saved game. Use [[env_fade]] instead.}}}}
: Chapter Title that appears on screen when this level starts.
{{KV|Display Game Title|boolean|Should the game's title appear on-screen when the map starts?}}
; <code>startdark <[[bool]]></code>
{{KV|New Level Unit|choices|Used to clear out savegame data of previous levels to keep the savegame size as small as possible. Only set it to Yes if the player cannot return to any previous levels.}}
: Fades the map in {{bug|The fade is carried out every time the map loads, including when loading from a saved game. Use [[env_fade]] instead.}}
:* 0 : No, keep current
; <code>gametitle <bool></code>
:* 1 : Yes, clear previous levels
: Should the game's title appear on-screen when the map starts?
{{KV|Max occludee area|float|[Used on PC] Prevents occlusion testing for entities that take up more than X% of the screen.}}
; <code>newunit <bool></code>
{{KV|Min occluder area|float|[Used on PC] Prevents occluders from being used if they take up less than X% of the screen.}}
: Used to clear out saved data of previous maps, which reduces saves' filesize. Only enable if the player cannot return to any previous map.
{{KV|Max occludee area (Xbox)|float|[Used on 360] Prevents occlusion testing for entities that take up more than X% of the screen.}}
; <code>maxoccludeearea <[[float]]></code>
{{KV|Min occluder area (Xbox)|float|[Used on 360] Prevents occluders from being used if they take up less than X% of the screen.}}
: Prevents occlusion testing for entities that take up more than X% of the screen.
{{KV|Start Fade Pixels|float|Number of pixels wide at which all props in the level start to fade (<0 {{=}} use fademaxdist). This number is ignored if the prop has a specific fade distance specified.}}
; <code>minoccluderarea <float></code>
{{KV|End Fade Pixels|float|Minimum number of pixels wide at which the prop is visible (0 {{=}} don't fade out). This number is ignored if the prop has a specific fade distance specified.}}
: Prevents this occluder from being used if it takes up less than X% of the screen.
{{KV|Detail.vbsp file|string|Detail.vbsp file to use for emitting detail props (found in directory <root>/modname)}}
; <code>maxpropscreenwidth <float></code>
{{KV|Detail material file|string|Material for detail sprites to use for drawing detail props}}
: Number of pixels wide at which all props in the level start to fade (-1 = use <code>fademaxdist</code>). This number is ignored if the prop has a specific fade distance specified.
{{KV|World is cold|boolean|If set, [[Day of Defeat: Source]] player models will emit breath particles from their mouth [[attachment]]s. No effect elsewhere.}}
; <code>minpropscreenwidth <float></code>
: Minimum number of pixels wide at which the prop is visible (0 = don't fade out). This number is ignored if the prop has a specific fade distance specified.
; {{EP1 add|<code>detailvbsp <file></code>}}
: [[Detail.vbsp]] file to use for creating detail props. Must be located in game root.
; {{EP1 add|<code>detailmaterial <material></code>}}
: Detail material file
; <code>coldworld <bool></code>
: If set, [[Day of Defeat: Source]] player models will emit breath particles from their mouth [[attachment]]s. No effect elsewhere.
{{KV ResponseContext}}
{{KV ResponseContext}}
=== [[Left 4 Dead 2]] only ===
{{KV|Time of day|choices|Controls the spawning behavior of some special infected, such as Witches. {{note|Doesn't influence lighting or environment in any way. You still need to configure the [[light_environment]] so the sun/moon has the appropriate light color and brightness.}}}}
:* 0 : Midnight
:* 1 : Dawn
:* 2 : Morning
:* 3 : Afternoon
:* 4 : Dusk
:* 5 : Evening
{{KV|Start Music Type|choices|Music type of the safe room.}}
:* 0 : Mission Start
:* 1 : Check Point
{{KV|Music Post-Fix String|string|Music post-fix string. Controls the musical theme of the map.}}
=== [[Portal 2]] only ===
{{KV|Paint in map|boolean|Allow paint to cover surfaces? Set to No to save resources for maps that don't use paint.}}
{{KV|Max number of blobs|integer|Maximum number of [[paint_sphere|paint blobs]]. Should NOT exceed 250.}}


== Inputs ==
== Inputs ==
{{I ResponseContext}}
{{I ResponseContext}}


[[Category:Entities]]
[[Category:Entities]]

Revision as of 11:49, 7 June 2011

Worldspawn (or just "the world") is the single entity that stores the noninteractive parts of a map, alongside some global configuration options. In other words:

Some other notes:

  • There can be only one. (Since Hammer doesn't allow worldspawn to be created directly it's very difficult for this rule to be broken.)
  • Damage from the environment and suicide is ordinarily attributed to the world.
  • Constraints can be assigned to worldspawn by not specifying a name for their subject/target.

See also

Related entities

There are a few other 'map property' entities which should not have more than one instance in a map. They are:

Skybox
env_fog_controller (only in pre-L4D games)
light_environment
shadow_control
env_sun (
Confirm:actually, multiple suns might be allowable
)
sky_camera (unique location)
Optimisation
game_ragdoll_manager
game_weapon_manager
game_gib_manager
water_lod_control
Logic
game_end
info_intermission (unique location)
env_global


Keyvalues

Tip.pngTip:Access these properties in Hammer with Main menu > Map > Map properties...

All Source games

Map Description / Title. ([todo internal name (i)]) <string>
Map's description / title.
Note.pngNote:Doesn't seem to be used anywhere anymore.
SkyBox Texture Name ([todo internal name (i)]) <string>
Skybox material. See Sky List.
Chapter Title Message ([todo internal name (i)]) <string>
Chapter Title that appears onscreen when this level starts.
Level Fade In ([todo internal name (i)]) <boolean>
Fades the map in.
Icon-Bug.pngBug:The fade is carried out every time the map loads, including when loading from a saved game. Use env_fade instead.  [todo tested in ?]
Display Game Title ([todo internal name (i)]) <boolean>
Should the game's title appear on-screen when the map starts?
New Level Unit ([todo internal name (i)]) <choices>
Used to clear out savegame data of previous levels to keep the savegame size as small as possible. Only set it to Yes if the player cannot return to any previous levels.
  • 0 : No, keep current
  • 1 : Yes, clear previous levels
Max occludee area ([todo internal name (i)]) <float>
[Used on PC] Prevents occlusion testing for entities that take up more than X% of the screen.
Min occluder area ([todo internal name (i)]) <float>
[Used on PC] Prevents occluders from being used if they take up less than X% of the screen.
Max occludee area (Xbox) ([todo internal name (i)]) <float>
[Used on 360] Prevents occlusion testing for entities that take up more than X% of the screen.
Min occluder area (Xbox) ([todo internal name (i)]) <float>
[Used on 360] Prevents occluders from being used if they take up less than X% of the screen.
Start Fade Pixels ([todo internal name (i)]) <float>
Number of pixels wide at which all props in the level start to fade (<0 = use fademaxdist). This number is ignored if the prop has a specific fade distance specified.
End Fade Pixels ([todo internal name (i)]) <float>
Minimum number of pixels wide at which the prop is visible (0 = don't fade out). This number is ignored if the prop has a specific fade distance specified.
Detail.vbsp file ([todo internal name (i)]) <string>
Detail.vbsp file to use for emitting detail props (found in directory <root>/modname)
Detail material file ([todo internal name (i)]) <string>
Material for detail sprites to use for drawing detail props
World is cold ([todo internal name (i)]) <boolean>
If set, Day of Defeat: Source player models will emit breath particles from their mouth attachments. No effect elsewhere.
ResponseContext:
Response Contexts (ResponseContext) <string>
Pre-defined response system context{s} for this entity. Format is key:value,key:value,... When this entity speaks, the list of keys & values will be passed to the response rules system.

Left 4 Dead 2 only

Time of day ([todo internal name (i)]) <choices>
Controls the spawning behavior of some special infected, such as Witches.
Note.pngNote:Doesn't influence lighting or environment in any way. You still need to configure the light_environment so the sun/moon has the appropriate light color and brightness.
  • 0 : Midnight
  • 1 : Dawn
  • 2 : Morning
  • 3 : Afternoon
  • 4 : Dusk
  • 5 : Evening
Start Music Type ([todo internal name (i)]) <choices>
Music type of the safe room.
  • 0 : Mission Start
  • 1 : Check Point
Music Post-Fix String ([todo internal name (i)]) <string>
Music post-fix string. Controls the musical theme of the map.

Portal 2 only

Paint in map ([todo internal name (i)]) <boolean>
Allow paint to cover surfaces? Set to No to save resources for maps that don't use paint.
Max number of blobs ([todo internal name (i)]) <integer>
Maximum number of paint blobs. Should NOT exceed 250.

Inputs

ResponseContext:
AddContext <stringRedirectInput/string>
Adds to the entity's list of response contexts. Format is <key>:<value>.
RemoveContext <stringRedirectInput/string>
Remove a context from this entity's list. The name should match the key of an existing context.
ClearContext
Removes all contexts from this entity's list.