worldspawn
Jump to navigation
Jump to search
Code classes:
CWorld
CBaseEntity
(all ents)
worldspawn
is a brush entity present in all Source games. This entity represents the entire map. It's not exactly a brush or point entity - its basically both. It holds the static props and brushes, including displacements, and many "global" settings which must be easily available to other entities at all times. When something refers to "the world", it means this entity.
You don't have to place this entity into the map. It's already made for you!
Tip: Access the keyvalues in Hammer by going to Map → Map Properties....
Bug: Paint in map and Max number of blobs are known to sometimes disappear from the Portal 2 FGD. The reason for this is not known.
Keyvalues[edit | edit source]
- Map Description / Title
(message)
<string>
- Doesn't affect anything. Just a spot to place any information about your map. This will be retained in the BSP.
- SkyBox Texture Name
(skyname)
<string>
- Skybox material. See Sky List.
- Chapter Title Message
(chaptertitle)
<string>
- A chapter title to show when the map is first started. This should match a string in
scripts/titles.txt
. For language support purposes, the actual content of that string will be inresource/[game]_[language].txt
(example: hl2_english.txt). - Level Fade In
(startdark)
<boolean>
- Makes the map fade in from pure black when loaded, even from a save.
- Display Game Title
(gametitle)
<boolean>
- Should the game's title appear on-screen when the map starts?
- To do: What file does the title come from?
- Max occludee area
(maxoccludeearea)
<float>
- Prevents occlusion testing for entities that take up more than X% of the screen.
- Min occluder area
(minoccluderarea)
<float>
- Prevents
func_occluder
s from being used if they take up less than X% of the screen. - Start Fade Pixels
(maxpropscreenwidth)
<float>
- Number of pixels wide at which all entities in the level start to fade. This number is ignored if the entity has a specific fade distance specified.
- End Fade Pixels
(minpropscreenwidth)
<float>
- Minimum number of pixels wide an entity must be for it to be drawn. This number is ignored if the entity has a specific fade distance specified.
- Detail.vbsp file
(detailvbsp)
<string>
- Detail.vbsp to use for emitting detail props.
- Detail material file
(detailmaterial)
<string>
- Material properties that apply to all detail props. Default value points to
materials/detail/detailsprites.vmt
. - World is cold
(coldworld)
<boolean>
- Tells the game that the environment is cold. The functionality seems to exist in all games, but it has only been used in Day of Defeat: Source to add a misty breathing effect to player models.
- New Level Unit
(newunit)
<boolean>
- Singleplayer only. Used to clear out savegame data of previous levels to keep the savegame size as small as possible. Set it to Yes if the player cannot return to any previous levels.
- 0: No, keep current
- 1: Yes, clear previous levels
- Response Contexts
(ResponseContext)
<string>
- Pre-defined response system contexts for this entity. May be filtered with
filter_activator_context
. Format iskey:value,key:value,...
. - World Mins (Not in FGD)
(world_mins)
<origin>
- The minimum extents (-X -Y -Z) of the world. Changing this value may cause odd behavior.
- World Maxs (Not in FGD)
(world_maxs)
<origin>
- The maximum extents (+X +Y +Z) of the world. Changing this value may cause odd behavior.
- Time of day
(timeofday)
<choices>
(only available in ) - Witches will wander if set to Afternoon, otherwise this has no effect, even on lighting.
- 0: Midnight
- 1: Dawn
- 2: Morning
- 3: Afternoon
- 4: Dusk
- 5: Evening
- Start Music Type
(startmusictype)
<choices>
(only available in ) - Which kind of music to play when everyone is in the safe room/area.
- 0: Mission Start
- 1: Check Point
- Music Post-Fix String
(musicpostfix)
<string>
(only available in ) - The musical theme of the map.
- To do: What does this affect? What values does this accept?
- Paint in map
(paintinmap)
<boolean>
(only available in ) - Allow gel to cover surfaces? Maps that don't use gel can save some resources by preventing gel-related code from running.
- Max number of blobs
(maxblobcount)
<integer>
(only available in ) - Maximum number of gel blobs that can be in the map at once. When the limit is reached, all gel spawners will temporarily shut off until there is space for more. The recommended maximum is 250; going over can cause visual bugs and lag spikes.
- To do: Does this also affect gel bombs?