Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Difference between revisions of "worldspawn"

From Quake Wiki

(fix infos about external music files)
Line 1: Line 1:
The '''worldspawn''' entity is a special entity that defines all the static geometry in a Quake level, along with various settings of the level, such as its title, the music played and other things. The worldspawn is always the first entity defined in a .map file, and in game, always the first entity loaded.
+
The '''worldspawn''' is a special entity that defines all the static geometry in a Quake level, along with various settings of the level, such as its title, the music played and other things. The worldspawn is always the first entity defined in a .map file, and in game, always the first entity loaded.
  
==Attributes==
 
  
===Keys===
+
===Keys / Values===
Note that the first table lists only the keys supported by the original [[Engines|engine]] and [[Map_compiling|compile tools]]. Modern compile tools and engines very frequently use keys stored in the worldspawn entity to do things the original tools and engines did not allow. Since the supported keys differ between different tools and engines, some of the most common keys are listed in a separate table below. Non-standard keys are usually prefixed with an underscore, which causes engines that do not support them to ignore them.
+
Note that the first table lists only the keys supported by the original [[Engines|engine]] and [[Map_compiling|compile tools]]. Modern map editors, compiling tools and engines very frequently use keys stored in the worldspawn entity to do things the original tools and engines did not allow. Since the supported keys differ between different tools and engines, some of the most common keys are listed in a separate table below. Non-standard keys are usually prefixed with an underscore, causing  map editors, compilers and engines that do not support them to ignore them.
  
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| ! bgcolor="#eeeeee" width="80px" | ''message'' || This is the text that will be printed to the console when the level loads. It is used for the level name, though some level designers also include their name. As an example, [[E1M1]], the first real level of episode 1, has the text "The Slipgate Complex" as the value for this key.
+
| ! bgcolor="#eeeeee" width="80px" | ''message'' || This is the text that will be printed to the console when the level loads. It is used for the level name, though some level designers also include their name. As an example, [[e1m1|E1M1]], the first real level of episode 1, has the text "the Slipgate Complex" as the value for this key.
 +
 
 +
'''Note''': Because this is also displayed in game on player's status bar that has limited space when +showscores command is used ('TAB' key by default), Quake and both Mission Packs limited their level titles to a maximum of 20 characters so they would fit. Modern engines allow longer level titles, scrolling them in the status bar if they don't fit.
 
|-
 
|-
| ! bgcolor="#eeeeee" | ''worldtype'' || This sets the ambience of the level. Depending on this value, some entities will play different sound effects, and the key items will display differently.
+
| ! bgcolor="#eeeeee" | ''worldtype'' || This sets the type of the level:
* 0 : Medieval
+
* 0 : Medieval (also known as Wizard)
* 1 : Metal
+
* 1 : Metal (also known as Runic)
* 2 : Base
+
* 2 : Base (also known as Tech)
 +
 
 +
Depending on this value:
 +
* keylocked doors will play different sound effects and display different messages
 +
* key items will have different appearance, pickup messages and pickup sounds
 +
 
 +
'''Note''': Based on some leftover and unused graphic assets, possible intention during the development was to have different status bar looks for each ''worldtype'', but this was not to be. The released game will always show a medieval key icon on the status bar even if player picks up a keycard or runekey.
 
|-
 
|-
| ! bgcolor="#eeeeee" | ''sounds'' || The number of the cd track to play. If using the original [[quake_soundtrack|Quake music]], valid tracks are 2 to 11.
+
| ! bgcolor="#eeeeee" | ''sounds'' || The number of the CD audio track to play. If using the original [[Quake_Soundtrack|Quake music]], valid tracks are 2 to 11. The original game used:
 +
 
 +
* 2 - opening theme during playback demo of The Necropolis
 +
* 3 - played at the end of the level during intermission screen
 +
* 4 to 11 - ambient music for the levels
  
Many modern engines support external music files. Usually a file named with the same number as the specified CD track will be loaded, if it exists. For example [[QuakeSpasm]] will try to load the file ''music/track02.ogg'' if ''sounds:2'' is specified. The exact location of the file lookup as well as the audio formats supported depend on the engine. Most commonly supported is Ogg Vorbis.
+
'''Note''': Many modern engines support external music files. Usually a file named with the same number as the specified CD track will be loaded, if it exists. For example [[QuakeSpasm]] will try to load the file ''music/track02.ogg'' if ''sounds:2'' is specified. The exact location of the file lookup as well as the audio formats supported depend on the engine. Most commonly supported is Ogg Vorbis.
 
|-
 
|-
 
| ! bgcolor="#eeeeee" | ''light'' || The ambient light level. The [[Light_(map_compiling)|light]] tool uses the value of this key to determine the minimum value of light in the level.
 
| ! bgcolor="#eeeeee" | ''light'' || The ambient light level. The [[Light_(map_compiling)|light]] tool uses the value of this key to determine the minimum value of light in the level.
 
|-
 
|-
| ! bgcolor="#eeeeee" | ''wad'' || A string that tells [[QBSP]] where to look for wad files so that it can include the textures in the .bsp file it outputs
+
| ! bgcolor="#eeeeee" | ''wad'' || A string that tells [[QBSP]] where to look for wad files so that it can include the textures in the .bsp file it outputs.
 
|}
 
|}
  
 +
====Keys for modern tools====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 30: Line 42:
 
| ! bgcolor="#eeeeee" | ''_sun_mangle'' || Sets the angle of the sun using [[mangle|pitch, yaw and roll]].
 
| ! bgcolor="#eeeeee" | ''_sun_mangle'' || Sets the angle of the sun using [[mangle|pitch, yaw and roll]].
 
|}
 
|}
 +
More at: [https://ericwa.github.io/ericw-tools/doc/light.html#MODEL%20ENTITY%20KEYS ericw-tools documentation]
 +
  
 
===Spawnflags===
 
===Spawnflags===
The worldspawn entity has no spawnflags.
+
The worldspawn entity has no spawnflags and should not have any.
 +
 
 +
'''Note''': it is possible to add spawnflags manually to worldspawn, which might cause problems depending on editor, compiler or engine. For example, a map that has worldspawn with spawnflags of 2048 ("Not in Deathmatch") can be compiled and will run without problems in single player or cooperative mode, but might crash the engine if deathmatch mode is on. (This was tested on Quakespasm 0.94.3).
 +
 
 +
===Differences depending on 'worldtype' settings===
 +
'''Note''': in the original game the unlocking sound of a key locked door is [[Quake_bugs|not played]]. However, there are some mods that fix this issue.
 +
 
 +
====Medieval / Wizard (0)====
 +
 
 +
{| class="wikitable"
 +
|-
 +
| ! bgcolor="#eeeeee" width="160px" | ''Gold Key item model'' || progs/w_g_key.mdl
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Silver key item model'' || progs/w_s_key.mdl
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key item pickup sound'' || misc/medkey.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door sound'' || doors/medtry.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door unlock sound'' || doors/meduse.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key item pickup messages'' ||
 +
* You got the gold key
 +
* You got the silver key
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door messages'' ||
 +
* You need the gold key
 +
* You need the silver key
 +
|-
 +
| ! bgcolor="#eeeeee" | ''List of levels'' ||
 +
* e1m2, e1m3, e1m4, e1m5
 +
* e2m2, e2m3, e2m4, e2m5, e2m6, e2m7
 +
* e4m2, e4m3, e4m4, e4m5, e4m6, e4m7
 +
|}
  
==Differences depending on 'worldtype' settings==
+
====Metal / Runic (1)====
 +
 
 +
{| class="wikitable"
 +
|-
 +
| ! bgcolor="#eeeeee" width="160px" | ''Gold Key item model'' || progs/m_g_key.mdl
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Silver key item model'' || progs/m_s_key.mdl
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key item pickup sound'' || misc/runekey.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door sound'' || doors/runetry.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door unlock sound'' || doors/runeuse.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key item pickup messages'' ||
 +
* You got the gold runekey
 +
* You got the silver runekey
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door messages'' ||
 +
* You need the gold runekey
 +
* You need the silver runekey
 +
|-
 +
| ! bgcolor="#eeeeee" | ''List of levels'' ||
 +
* e1m6, e1m7, e1m8
 +
* e3m2, e3m3, e3m4, e3m5, e3m6, e3m7
 +
|}
 +
 
 +
====Base / Tech (2)====
 +
 
 +
{| class="wikitable"
 +
|-
 +
| ! bgcolor="#eeeeee" width="160px" | ''Gold Key item model'' || progs/b_g_key.mdl
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Silver key item model'' || progs/b_s_key.mdl
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key item pickup sound'' || misc/basekey.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door sound'' || doors/basetry.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door unlock sound'' || doors/baseuse.wav
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key item pickup messages'' ||
 +
* You got the gold keycard
 +
* You got the silver keycard
 +
|-
 +
| ! bgcolor="#eeeeee" | ''Key locked door messages'' ||
 +
* You need the gold keycard
 +
* You need the silver keycard
 +
|-
 +
| ! bgcolor="#eeeeee" | ''List of levels'' ||
 +
*  e1m1, e2m1, e3m1, e4m1
 +
|}
 
<!--
 
<!--
 
Notes:
 
Notes:
list different sound effects used (keys, plats)
+
* listed worldtype different values affecting keys and doors
items that have a different appearance (keys)
+
* plats, buttons etc are unaffected and have their own controls
 +
 
 
anything else?
 
anything else?
 
-->
 
-->
  
 
[[Category:Quake entities]]
 
[[Category:Quake entities]]

Revision as of 19:16, 28 May 2022

The worldspawn is a special entity that defines all the static geometry in a Quake level, along with various settings of the level, such as its title, the music played and other things. The worldspawn is always the first entity defined in a .map file, and in game, always the first entity loaded.


Keys / Values

Note that the first table lists only the keys supported by the original engine and compile tools. Modern map editors, compiling tools and engines very frequently use keys stored in the worldspawn entity to do things the original tools and engines did not allow. Since the supported keys differ between different tools and engines, some of the most common keys are listed in a separate table below. Non-standard keys are usually prefixed with an underscore, causing map editors, compilers and engines that do not support them to ignore them.

message This is the text that will be printed to the console when the level loads. It is used for the level name, though some level designers also include their name. As an example, E1M1, the first real level of episode 1, has the text "the Slipgate Complex" as the value for this key.

Note: Because this is also displayed in game on player's status bar that has limited space when +showscores command is used ('TAB' key by default), Quake and both Mission Packs limited their level titles to a maximum of 20 characters so they would fit. Modern engines allow longer level titles, scrolling them in the status bar if they don't fit.

worldtype This sets the type of the level:
  • 0 : Medieval (also known as Wizard)
  • 1 : Metal (also known as Runic)
  • 2 : Base (also known as Tech)

Depending on this value:

  • keylocked doors will play different sound effects and display different messages
  • key items will have different appearance, pickup messages and pickup sounds

Note: Based on some leftover and unused graphic assets, possible intention during the development was to have different status bar looks for each worldtype, but this was not to be. The released game will always show a medieval key icon on the status bar even if player picks up a keycard or runekey.

sounds The number of the CD audio track to play. If using the original Quake music, valid tracks are 2 to 11. The original game used:
  • 2 - opening theme during playback demo of The Necropolis
  • 3 - played at the end of the level during intermission screen
  • 4 to 11 - ambient music for the levels

Note: Many modern engines support external music files. Usually a file named with the same number as the specified CD track will be loaded, if it exists. For example QuakeSpasm will try to load the file music/track02.ogg if sounds:2 is specified. The exact location of the file lookup as well as the audio formats supported depend on the engine. Most commonly supported is Ogg Vorbis.

light The ambient light level. The light tool uses the value of this key to determine the minimum value of light in the level.
wad A string that tells QBSP where to look for wad files so that it can include the textures in the .bsp file it outputs.

Keys for modern tools

_sunlight Brightness of the light coming from any sky brushes in the level.
_sun_mangle Sets the angle of the sun using pitch, yaw and roll.

More at: ericw-tools documentation


Spawnflags

The worldspawn entity has no spawnflags and should not have any.

Note: it is possible to add spawnflags manually to worldspawn, which might cause problems depending on editor, compiler or engine. For example, a map that has worldspawn with spawnflags of 2048 ("Not in Deathmatch") can be compiled and will run without problems in single player or cooperative mode, but might crash the engine if deathmatch mode is on. (This was tested on Quakespasm 0.94.3).

Differences depending on 'worldtype' settings

Note: in the original game the unlocking sound of a key locked door is not played. However, there are some mods that fix this issue.

Medieval / Wizard (0)

Gold Key item model progs/w_g_key.mdl
Silver key item model progs/w_s_key.mdl
Key item pickup sound misc/medkey.wav
Key locked door sound doors/medtry.wav
Key locked door unlock sound doors/meduse.wav
Key item pickup messages
  • You got the gold key
  • You got the silver key
Key locked door messages
  • You need the gold key
  • You need the silver key
List of levels
  • e1m2, e1m3, e1m4, e1m5
  • e2m2, e2m3, e2m4, e2m5, e2m6, e2m7
  • e4m2, e4m3, e4m4, e4m5, e4m6, e4m7

Metal / Runic (1)

Gold Key item model progs/m_g_key.mdl
Silver key item model progs/m_s_key.mdl
Key item pickup sound misc/runekey.wav
Key locked door sound doors/runetry.wav
Key locked door unlock sound doors/runeuse.wav
Key item pickup messages
  • You got the gold runekey
  • You got the silver runekey
Key locked door messages
  • You need the gold runekey
  • You need the silver runekey
List of levels
  • e1m6, e1m7, e1m8
  • e3m2, e3m3, e3m4, e3m5, e3m6, e3m7

Base / Tech (2)

Gold Key item model progs/b_g_key.mdl
Silver key item model progs/b_s_key.mdl
Key item pickup sound misc/basekey.wav
Key locked door sound doors/basetry.wav
Key locked door unlock sound doors/baseuse.wav
Key item pickup messages
  • You got the gold keycard
  • You got the silver keycard
Key locked door messages
  • You need the gold keycard
  • You need the silver keycard
List of levels
  • e1m1, e2m1, e3m1, e4m1