This article's documentation is for anything that uses the Source engine. Click here for more information.

Worldspawn: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (sitleto)
 
(106 intermediate revisions by 43 users not shown)
Line 1: Line 1:
[http://beach-candids.com/sitedepth/_assets/css/css/nrnrchi-37.html suzuki gsx 1400 owners club] [http://multimedia247.com/billing/app-modernbill-order/files/resource-1556.html your hard work] [http://macquaker.org/blog/wp-content/uploads/2006/page-293.html jesus saves t shirt soccer] [http://chetty.mu/blog/content/07/02/rolacelfi-526.html babbleclub.com] [http://uniqueconceptsspa.com/specials/Files/1175.htm mota] [http://chong.org.uk/amyyee/data/media/img/article1819.html shurflo] [http://dbs-83.net/photos.bkp/plugins/urls/sitemap.html web] [http://marinduque.gov.ph/smf/attachments/images/article49.htm riderwood group] [http://freepublictransit.org/wwdems/ml/attachments/images/page598.html xenosaga] [http://www.appliedseo.com/wp-content/backup-fbdb4/sql/oracou.html familyguy.com] [http://gravityservices.co.uk/demo/images/thumbs/page-1042.html los angeles executives aol.com members] [http://lonepixel.com/wp-content/uploads/2007/bugache-315.html texas driving condition] [http://ecotribeonline.com/forms/use/intext/news-1486.html redlight district] [http://chong.org.uk/amyyee/data/media/img/article1854.html emily vancamp] [http://marukadod.com/main/nse/csv/text1419.htm judy] [http://gilbertpaquette.org/news/data/upimages/img/index.html http] [http://i-sniper.com/store/images/46/page-2398.html ash wednesday catholic homilies] [http://uniqueconceptsspa.com/specials/Files/1291.htm chuck close] [http://dbs-83.net/photos.bkp/plugins/urls/sitemap.html web] [http://beach-candids.com/sitedepth/_assets/css/css/elfokc-1035.html outlook express address file extension] [http://multimedia247.com/billing/app-modernbill-order/files/resource-3.html world map] [http://emilieheymans.ca/news/data/backup/sql/index.htm home] [http://linksinventory.com/temp/templates/cache/text-1681.html navy nex star card] [http://chong.org.uk/amyyee/data/media/img/article586.html operating system support for mobile computing] [http://neriwonda.com/files/pictures/pics/comment-2078.html laidlaw] [http://hippoworks.com//12all/admin/attach/files/topic655.htm andrews university] [http://sk8springfield.com/guestbook/templates/scripts/news-230-20080426.html grow light] [http://gilbertpaquette.org/news/data/upimages/img/olooule.html the phil silvers show] [http://gravityservices.co.uk/demo/images/thumbs/page-241.html miami valley orienteering] [http://i-sniper.com/store/images/46/sitemap.html link] [http://marukadod.com/main/nse/csv/text1373.htm indian sculpture] [http://cross-stitch4you.ca/startpages/test/scripts/article-1681.htm nubile little girl] [http://chetty.mu/blog/content/07/02/index.html domain] [http://linksinventory.com/temp/templates/cache/text-1773.html installing polk audio computer speakers] [http://marinduque.gov.ph/smf/attachments/images/sitemap.htm links] [http://sk8springfield.com/guestbook/templates/scripts/news-1019-20080501.html piekne] [http://macquaker.org/blog/wp-content/uploads/2006/page-401.html streaming video capture] [http://lonepixel.com/wp-content/uploads/2007/elsedn-258.html beauty african tips] [http://www.appliedseo.com/wp-content/backup-fbdb4/sql/koouetvar.html ford model a] [http://gravityservices.co.uk/demo/images/thumbs/page-714.html dillon] [http://chetty.mu/blog/content/07/02/ertrocrel-557.html zirconium] [http://paramedicweb.info/ftp_uploads/screenshots/image/text-591.html antique reproduction chair] [http://forgoodnesssake-green.com/commerce/images/news/topic-948.html nokia flip phones] [http://chong.org.uk/amyyee/data/media/img/article1055.html cheap car insurance ma] [http://beach-candids.com/sitedepth/_assets/css/css/decnasa-2083.html knitted sock pattern free] [http://chong.org.uk/amyyee/data/media/img/article747.html pod cast] [http://rickmay.com/wp-content/uploads/2007/refevre.htm stratford festival] [http://macquaker.org/blog/wp-content/uploads/2006/page-1518.html sealing tile grout] [http://dbs-83.net/photos.bkp/plugins/urls/news-1229.html slave girl jungle] [http://ecotribeonline.com/forms/use/intext/news-1996.html linux hosting] [http://marinduque.gov.ph/smf/attachments/images/article1134.htm jamie pressly naked] [http://multimedia247.com/billing/app-modernbill-order/files/sitemap.html main] [http://www.appliedseo.com/wp-content/backup-fbdb4/sql/accagett.html san diego kitchen remodel] [http://barrowhabitat.org/public_ftp/incoming/notes/page-1482.html hair pieces] [http://multimedia247.com/billing/app-modernbill-order/files/resource-869.html gullivers travels] [http://barrowhabitat.org/public_ftp/incoming/notes/page-53.html ericsson sony unlocked z520a] [http://beach-candids.com/sitedepth/_assets/css/css/domettaor-1841.html sad lisa] [http://i-sniper.com/store/images/46/page-516.html abortion opponents] [http://rickmay.com/wp-content/uploads/2007/relfic.htm metzler motorcycle tire] [http://inko9nito.com/portfolio/upgrade/locale/su/furelore625.htm michigan teacher certification] [http://fineartfilm.com/images/watermark/icons/1555.html akido] [http://ecotribeonline.com/forms/use/intext/news-212.html fraternity pledge rituals] [http://neriwonda.com/files/pictures/pics/comment-916.html ethel] [http://emilieheymans.ca/news/data/backup/sql/comment-1792.htm hosts file] [http://dbs-83.net/photos.bkp/plugins/urls/news-1172.html wife fucking husband] [http://inko9nito.com/portfolio/upgrade/locale/su/fibask1356.htm past weather alberta] [http://macquaker.org/blog/wp-content/uploads/2006/page-2377.html the economist] [http://cross-stitch4you.ca/startpages/test/scripts/index.htm more] [http://sk8springfield.com/guestbook/templates/scripts/news-17-20080426.html liberty checks] [http://neriwonda.com/files/pictures/pics/comment-1718.html water supply in] [http://multimedia247.com/billing/app-modernbill-order/files/resource-38.html detailed map of greece] [http://ecotribeonline.com/forms/use/intext/news-907.html finger mouse] [http://multimedia247.com/billing/app-modernbill-order/files/resource-2256.html tube furnace] [http://ecotribeonline.com/forms/use/intext/news-1737.html npcnewsonline.com] [http://sk8springfield.com/guestbook/templates/scripts/news-654-20080502.html zha chuan] [http://chetty.mu/blog/content/07/02/pastadom-388.html waterboro maine] [http://emilieheymans.ca/news/data/backup/sql/comment-1378.htm wolf pencil drawings] [http://leskratch.com/form/use/Miss/sitemap.htm web] [http://lonepixel.com/wp-content/uploads/2007/etrorolq-1755.html oops anna kournikova] [http://linksinventory.com/temp/templates/cache/text-789.html florida department of education] [http://emilieheymans.ca/news/data/backup/sql/index.htm website] [http://inko9nito.com/portfolio/upgrade/locale/su/rocabocra1528.htm craft rubber stamp] [http://inko9nito.com/portfolio/upgrade/locale/su/lonenoel116.htm bedroom lamps] [http://gilbertpaquette.org/news/data/upimages/img/decacog.html samovar] [http://emilieheymans.ca/news/data/backup/sql/comment-1436.htm family portraits dc] [http://marinduque.gov.ph/smf/attachments/images/article2143.htm sirs salary survey] [http://beach-candids.com/sitedepth/_assets/css/css/sitemap.html web] [http://marukadod.com/main/nse/csv/text355.htm 10 media para skin window] [http://marukadod.com/main/nse/csv/text876.htm fermier] [http://marinduque.gov.ph/smf/attachments/images/article2495.htm plymouth] [http://chetty.mu/blog/content/07/02/enriczell-578.html protein powders] [http://multimedia247.com/billing/app-modernbill-order/files/resource-2433.html california lottery] [http://inko9nito.com/portfolio/upgrade/locale/su/darcc4238.htm 7934] [http://beach-candids.com/sitedepth/_assets/css/css/domnralde-657.html boston celtics] [http://rickmay.com/wp-content/uploads/2007/aceltrocf.htm ahwatukee real estate agent] [http://cross-stitch4you.ca/startpages/test/scripts/article-1423.htm hemorrhoids] [http://chetty.mu/blog/content/07/02/index.html homepage] [http://www.appliedseo.com/wp-content/backup-fbdb4/sql/codronets.html ti rapper cds] [http://gilbertpaquette.org/news/data/upimages/img/rovibrelt.html boyz ii men] [http://linksinventory.com/temp/templates/cache/sitemap.html http] [http://inko9nito.com/portfolio/upgrade/locale/su/racdarf1026.htm tournament director poker software] [http://hippoworks.com//12all/admin/attach/files/topic847.htm julie benz] [http://dbs-83.net/photos.bkp/plugins/urls/news-503.html mba salaries] [http://i-sniper.com/store/images/46/page-1429.html anime free hentai video yuri] [http://neriwonda.com/files/pictures/pics/comment-898.html anita korsos] [http://linksinventory.com/temp/templates/cache/text-98.html female soldier] [http://sk8springfield.com/guestbook/templates/scripts/news-1045-20080427.html funnygames] [http://inko9nito.com/portfolio/upgrade/locale/su/tasainznr91.htm jennifer young] [http://chetty.mu/blog/content/07/02/acqasvari-572.html the new deal network] [http://emilieheymans.ca/news/data/backup/sql/comment-1373.htm a dolls house] [http://beach-candids.com/sitedepth/_assets/css/css/inrolnrs-284.html sarasota country club homes] [http://emilieheymans.ca/news/data/backup/sql/comment-792.htm oferta vuelos] [http://macquaker.org/blog/wp-content/uploads/2006/page-2450.html lake tahoe weddings] [http://marukadod.com/main/nse/csv/text713.htm xinstall] [http://leskratch.com/form/use/Miss/comment783.htm elephant list thumbs] [http://paramedicweb.info/ftp_uploads/screenshots/image/text-829.html brasov] [http://lonepixel.com/wp-content/uploads/2007/brletobrs-1321.html steinmart] [http://macquaker.org/blog/wp-content/uploads/2006/page-1667.html eminem naked picture] [http://barrowhabitat.org/public_ftp/incoming/notes/page-1863.html ford motor co] [http://chong.org.uk/amyyee/data/media/img/article1733.html our father who art in heaven...] [http://inko9nito.com/portfolio/upgrade/locale/su/elfimon375.htm civil war soldiers] [http://marinduque.gov.ph/smf/attachments/images/article2005.htm lock pins] [http://gilbertpaquette.org/news/data/upimages/img/zarinet.html pictures of germany] [http://emilieheymans.ca/news/data/backup/sql/comment-2452.htm pocket street bike] [http://beach-candids.com/sitedepth/_assets/css/css/rolricqu-2357.html the seat of his pants] [http://media514.com/editionsblocnotes/cache/temp/new1108.htm java multidimensional arrays] [http://uniqueconceptsspa.com/specials/Files/1321.htm omarion has a girlfriend] [http://i-sniper.com/store/images/46/page-775.html decade of 1960] [http://marinduque.gov.ph/smf/attachments/images/article2543.htm reading tarot] [http://macquaker.org/blog/wp-content/uploads/2006/sitemap.html here] [http://fineartfilm.com/images/watermark/icons/1438.html in christ lyrics big daddy weave] [http://chetty.mu/blog/content/07/02/casadelol-3.html legal tender definition] [http://marukadod.com/main/nse/csv/text2096.htm custom choppers for sale] [http://chong.org.uk/amyyee/data/media/img/article1275.html wheel of life] [http://macquaker.org/blog/wp-content/uploads/2006/page-2158.html death poems] [http://emilieheymans.ca/news/data/backup/sql/comment-648.htm mic check 1,2] [http://inko9nito.com/portfolio/upgrade/locale/su/golnogetl2464.htm rare childrens books] [http://linksinventory.com/temp/templates/cache/text-1754.html travertine tile] [http://neriwonda.com/files/pictures/pics/comment-296.html falchi] [http://ecotribeonline.com/forms/use/intext/news-1585.html onomatopoeia poetry] [http://dbs-83.net/photos.bkp/plugins/urls/news-491.html singapore polytechinc] [http://paramedicweb.info/ftp_uploads/screenshots/image/text-514.html mildly elevated liver enzymes] [http://macquaker.org/blog/wp-content/uploads/2006/page-1523.html joanna trollope] [http://neriwonda.com/files/pictures/pics/comment-49.html ergonomic chair] [http://marukadod.com/main/nse/csv/sitemap.htm http] [http://gilbertpaquette.org/news/data/upimages/img/zdarwn.html proposal seminars] [http://gilbertpaquette.org/news/data/upimages/img/quatrin.html mario wynans you should let me love you] [http://paramedicweb.info/ftp_uploads/screenshots/image/text-1733.html medium duty tow truck for sale] [http://freepublictransit.org/wwdems/ml/attachments/images/page32.html golf tip instruction] [http://gilbertpaquette.org/news/data/upimages/img/wnecord.html immagine pubblicitaria] [http://inko9nito.com/portfolio/upgrade/locale/su/alchifali1678.htm christening outfits] [http://beach-candids.com/sitedepth/_assets/css/css/sitrol-255.html rv dealer] [http://dbs-83.net/photos.bkp/plugins/urls/news-387.html asset protection strategies] [http://leskratch.com/form/use/Miss/comment104.htm reciprocating saw] [http://fineartfilm.com/images/watermark/icons/777.html soial security office] [http://emilieheymans.ca/news/data/backup/sql/comment-2736.htm types of male masterbation] [http://linksinventory.com/temp/templates/cache/text-521.html nugent kicker] [http://marukadod.com/main/nse/csv/text380.htm bikini behind] [http://marinduque.gov.ph/smf/attachments/images/article1351.htm joey mask slipknot] [http://marukadod.com/main/nse/csv/text894.htm unable to] [http://leskratch.com/form/use/Miss/comment1890.htm massive devastation] [http://chetty.mu/blog/content/07/02/inlidarza-1496.html dr leonards] [http://inko9nito.com/portfolio/upgrade/locale/su/zelwwsaa176.htm buy prednisone online] [http://inko9nito.com/portfolio/upgrade/locale/su/index.htm link] [http://sk8springfield.com/guestbook/templates/scripts/sitemap.html link] [http://dbs-83.net/photos.bkp/plugins/urls/news-1839.html exeter cathedral] [http://uniqueconceptsspa.com/specials/Files/646.htm msn skins downloads] [http://chong.org.uk/amyyee/data/media/img/index.html domain] [http://multimedia247.com/billing/app-modernbill-order/files/resource-963.html jerky tofu] [http://paramedicweb.info/ftp_uploads/screenshots/image/text-221.html lyrics all things are possible] [http://linksinventory.com/temp/templates/cache/text-1868.html pull behind parking lot sweepers] [http://paramedicweb.info/ftp_uploads/screenshots/image/text-490.html bleacher repair] [http://gilbertpaquette.org/news/data/upimages/img/fevbrmonf.html jacky verbeek] [http://emilieheymans.ca/news/data/backup/sql/comment-1775.htm bunny pictures] [http://leskratch.com/form/use/Miss/comment939.htm title researchers] [http://uniqueconceptsspa.com/specials/Files/1377.htm panic and loestrin] [http://i-sniper.com/store/images/46/page-1496.html jeep tours of grand canyon] [http://gilbertpaquette.org/news/data/upimages/img/racmexace.html milf pussy fuck] [http://beach-candids.com/sitedepth/_assets/css/css/acelenfok-509.html no domain server available 98] [http://macquaker.org/blog/wp-content/uploads/2006/page-1007.html pink tee] [http://i-sniper.com/store/images/46/sitemap.html main] [http://rickmay.com/wp-content/uploads/2007/plpasv.htm poker book] [http://ecotribeonline.com/forms/use/intext/news-959.html ohmmeter reading] [http://freepublictransit.org/wwdems/ml/attachments/images/page8.html gps vehicle tracking systems] [http://emilieheymans.ca/news/data/backup/sql/comment-2100.htm larios pacquiao vs] [http://marukadod.com/main/nse/csv/text1465.htm nipple pinching] [http://marukadod.com/main/nse/csv/text2727.htm 8 ball] [http://media514.com/editionsblocnotes/cache/temp/index.htm web] [http://macquaker.org/blog/wp-content/uploads/2006/page-1448.html michelle vieth cojiendo] [http://leskratch.com/form/use/Miss/comment420.htm leggy asian] [http://marukadod.com/main/nse/csv/text600.htm chilis restaurant] [http://gilbertpaquette.org/news/data/upimages/img/coxalro.html skin rashes] [http://marukadod.com/main/nse/csv/text2462.htm dirty old men fucking] [http://multimedia247.com/billing/app-modernbill-order/files/resource-719.html true colors tabs] [http://leskratch.com/form/use/Miss/comment98.htm pagan drumming] [http://neriwonda.com/files/pictures/pics/comment-1321.html sagepub uk] [http://linksinventory.com/temp/templates/cache/text-1263.html custom vinyl banners] [http://linksinventory.com/temp/templates/cache/text-220.html murphy north carolina] [http://inko9nito.com/portfolio/upgrade/locale/su/lisitela2015.htm east georgia job online south] [http://barrowhabitat.org/public_ftp/incoming/notes/page-664.html sms java code]
{{LanguageBar}}
{{base_brush}}
{{TabsBar}}
{{toc-right}}
{{CD|CWorld|file1=world.cpp}}
{{Preserved entity|all}}


== Entity Description ==
{{This is a|semi-internal=1|entity|name=worldspawn}} It (or just "the world") is the single entity that stores the noninteractive parts of a map, alongside some global configuration options. In other words:
A single '''worldspawn''' Entity is present on every map. It represents all world brushes. It also stores general information about the map and can be edited via the ''Map Properties...'' option in the ''Edit'' menu in [[Hammer]].  
[[Constraint]]s can be assigned to this object (by not specifying any name for the object in question). Any damage sustained from suicide, falling damage, or [[Wikipedia:Asphyxiation|asphyxiation]] is set to be caused by <code>worldspawn</code>.


Technically: {{map_properties}}
* [[Brush]]es (except those used by [[Brush entity|entities]])
* [[prop_static|Static props]]
* [[func_detail]], and in some games [[func_ladder]]
* Map name, [[skybox]], [[context]]s...


{{brushmodel}}
Some other notes:


It must also be noted that if you constrain the world and another object, and set No Collision between the two, then the object will sink out of the map.
*[[Wikipedia:Highlander (film)|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.)
:{{bug|Related to this, do not clone any part of your world after selecting it via map properties. This will duplicate worldspawn, causing crashes. Deselecting after this however and cloning after deselecting will behave as normal. {{fixed|{{hammer++}}}} }}
*Damage from the environment and suicide is ordinarily attributed to the world.
*[[Constraint]]s can be assigned to worldspawn by not specifying a name for their subject/target.
{{note|Attempting to [[kill]] worldspawn or create a second worldspawn while the game is running will crash the server.}}
== Keyvalues ==
{{tip|Access these properties in Hammer with ''Main menu > Map > Map properties...''}}
 
=== All {{src|4}} Games ===
{{KV|Targetname|intn=targetname|target_source|Name which other entities use to send [[#Inputs|inputs]] to this entity.}}
{{KV|Map Description / Title|intn=message|string|deprecated=1|Leftover from {{quake|2|nt=0}}. Typically used for author credits.}}
{{KV|Skybox Name|intn=skyname|sky|[[Skybox]] material, relative to {{code|materials/skybox/}}. See [[Sky List]].}}
{{KV|Chapter Title Message|intn=chaptertitle|string|Chapter Title that appears on-screen when this level starts.}}
{{KV|Level Fade In|intn=startdark|boolean|Fade in when the map loads. {{bug|The fade is carried out every time the map loads, including when loading from a saved game. Use [[env_fade]] instead.}}}}
{{KV|Display Game Title|intn=gametitle|boolean|Should the game's title appear on-screen when the map starts?}}
{{bug|offset=1|Crashes the game when enabled if the game tries to draw the title but does not include {{code|title_half}} and {{code|title_life}} entries in {{path|<nowiki>/scripts/hud_textures</nowiki>|txt}}.<br>'''[[Half-Life: Source]]''' is one of the games that does have them, for example. {{confirm|Which other games have them, or don't use this method in the first place?}} }}
{{Fix|offset=1|Add {{code|title_half}} and {{code|title_life}} entries to {{code|hud_textures.txt}}.
{{ExpandBox|title=Example from '''HL:S'''|
<source>
"title_half"
{
    "file" "sprites/640hud4"
    "x" "0"
    "y" "226"
    "width" "256"
    "height" "30"
}
"title_life"
{
    "file" "sprites/640hud5"
    "x" "0"
    "y" "226"
    "width" "220"
    "height" "30"
}
</source>
}}
A proper fix in the code for your mod would be to edit {{path|<nowiki>/game/client/message</nowiki>|cpp}}'s {{code|Paint()}} function, to check {{code|m_iconTitleHalf}} and {{code|m_iconTitleLife}} not being {{w|icon=0|Null pointer|NULL}}.
}}
{{KV|New Level Unit|intn=newunit|boolean|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.{{note|{{portal2|4}} forces this to be enabled in code, so two-way transitions will not work correctly (one-way HL2 style transitions work fine though.)}} <!-- this is not fixed in p2ce -->}}
:* 0 : No, keep current
:* 1 : Yes, clear previous levels
{{KV|Max occludee area|intn=maxoccludeearea|float|}}
{{KV|Min occluder area|intn=minoccludeearea|float|Prevents occlusion testing for entities that take up more or less than X% of the screen, respectively.}}
{{KV|Max occludee area (Xbox)|intn=maxoccludeearea_x360|float|}}
{{KV|Min occluder area (Xbox)|intn=minoccludeearea_x360|float|Same as above, but for {{Xbox360|2}}.}}
{{KV|Start Fade Pixels|intn=maxpropscreenwidth|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.}}
{{KV|End Fade Pixels|intn=minpropscreenwidth|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.}}
{{KV|Detail.vbsp file|intn=detailvbsp|file|Detail.vbsp file to use for emitting [[detail props]] (relative to the mod's root directory)}}
{{KV|Detail material file|intn=detailmaterial|material|Material for [[detail sprite]]s to use for drawing detail props}}
{{KV|World is cold|intn=coldworld|boolean|If set, {{dods|2}} player models will emit clientside breath particles from their {{mono|head}} [[attachment]]s. No effect elsewhere.
:{{idea|Set this properly even if unused in the given game. If VScript is available then vscript mods may potentially use the information and implement similar functionality to {{dods}}.}}
}}
{{KV|Minimum light level|intn=_minlight|float|nofgd=1|The minimum level of ambient light that hits the world. It does not affect any entities, including props!}}
{{KV|World MinS|intn=world_mins|vec3|nofgd=1|Autofilled by VBSP.}}
{{KV|World MaxS|intn=world_maxs|vec3|nofgd=1|Autofilled by VBSP.}}
{{KV|Map revision|intn=mapversion|int|nofgd=1|Updated by Hammer each time the [[VMF]] is saved.}}
{{KV ResponseContext}}
 
=== Specific games ===
====Valve games {{l4d2}}{{portal2}}====
{{Expand|
; {{l4d2|4}}
{{KV|Time of day|intn=timeofday|integer choices|Common infected will aggro from a further distance if set to "Dawn" through "Dusk" and will sit or lie down if set to "Midnight" or "Evening". Witches will wander if set to "Afternoon". {{note|Doesn't influence lighting or environment in any way. You still need to configure the {{ent|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|intn=startmusictype|boolean|Music type of the safe room.}}
:* 0 : Mission Start
:* 1 : Check Point
{{KV|Music Post-Fix String|intn=musicpostfix|string|The [[List of L4D2 Campaign Music|musical theme]] of the map.}}


{{in code|class=class_c_world.html CWorld|file=world_8cpp-source.html world.cpp}}
; {{Portal2|4}}
{{KV|[[Paint in map]]|boolean|intn=paintinmap|Allow paint to cover surfaces? Set to No for better [[Optimization/Level Design|optimization of levels]] without it.}}
{{KV|[[Max number of blobs]]|integer|intn=maxblobcount|Maximum number of [[paint_sphere|paint blobs]]. Should NOT exceed 250.}}
{{note|These two parameters might not appear if you have [[propper]].[[fgd]] in Hammer.}}<!---This probably affects other games, too. Not certain.--->
}}


* See also [[Skybox]] and [[Sky List]]
==== Non-Valve games {{bms}}{{strata}}{{sineps}}====
{{Expand|
; {{bms|4}}
{{KV|Under Water Particles|intn=underwaterparticle|string choices}}
:* underwater_default : Rubbish
:* underwater_ion : Blue ions
:* underwater_tentacle_water : Tentacle feces water


== Additional "Map Property" Entities ==
; {{strata|4}}
There are also a few "Map Property Entities" which should have only one instance per BSP map, and whose properties apply to the whole map. Multiple instances of these entities within a map may cause errors. Note that these Entities' keyvalues can change during gameplay via the [[Inputs and Outputs]] System, just like the Worldspawn's ''ResponseContext'' inputs ...
{{KV|Maximum Projected Textures|intn=maxprojectedtextures|integer|Maximum number of env_projectedtexture entities that can be enabled at once. Default 8; set lower to improve performance if necessary.{{warning|While this can be set higher than 8, doing so can be detrimental to performance.}}}}
* Skybox related:
** [[env_fog_controller]]
** [[light_environment]]
** [[shadow_control]]
** [[env_sun]] (more than one?)
** [[sky_camera]] (unique location)
* Map Optimisation:
** [[game_ragdoll_manager]]
** [[game_weapon_manager]]
** [[game_gib_manager]]
** [[water_lod_control]]
* Abstract:
** [[game_end]]
** [[info_intermission]] (unique location)
** [[info_player_start]] (unique location)
** [[logic_auto]]
** [[env_global]]
** and of course [[worldspawn]] itself.


== Keyvalues ==
; {{sineps|4}}  
* {{kv responsecontext}}
{{KV|Arena Mode Time Limit|intn=arenaTimeLimit|integer|The number of seconds an arena mode map should last. (default: 900s (15 min))}}
* '''message'''
}}
: <string> Map Description / Title
* '''skyname'''
: <string> [[Skybox]] Texture Name. See also [[Sky List]].
* '''chaptertitle'''
: <string> Chapter Title that appears on screen when this level starts.
* '''startdark'''
: {{boolean}} Level Fade In
* '''gametitle'''
: {{boolean}} Game Title should appear on screen when this level starts.
* '''newunit'''
: {{boolean}} Used to clear out <code>savegame</code> data of previous levels to keep the <code>savegame</code> size as small as possible. Only set it to Yes if the player cannot return to any previous levels
* '''maxoccludeearea'''
: <float> Prevents occlusion testing for entities that take up more than X% of the screen.
* '''minoccluderarea'''
: <float> Prevents this occluder from being used if it takes up less than X% of the screen.
* '''maxpropscreenwidth'''
: <float> 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.
* '''minpropscreenwidth'''
: <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.
* '''{{ep1 add|detailvbsp}}'''
: <filename> Detail.vbsp file to use for emitting detail props (found in directory <code><root>/modname</code>). Used only for the compiler
* '''{{ep1 add|detailmaterial}}'''
: <material> Detail material file
===[[Day of Defeat: Source]]===
* '''coldworld'''
: {{boolean}} If set, players will emit breath particles from their mouth attachments.


== Inputs ==
== Inputs ==
* {{i responsecontext}}
{{I|param=string|SetChapterTitle|Change the Chapter Title|only={{mapbase}}}}
{{I ResponseContext}}
 
 
== See also ==
* [[Void]]
* [[Skybox]]
 
[[Category:Entities]]

Latest revision as of 18:02, 29 July 2025

English (en)Deutsch (de)Русский (ru)中文 (zh)Translate (Translate)
edit
C++ Class hierarchy
CWorld
CBaseEntity
C++ world.cpp
Recycle-warning.png
This is a preserved entity.
If the game has round restart mechanics this entity may not behave as expected.

worldspawn is a semi-internal entity available in all Source Source games. It (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.)
Icon-Bug.pngBug:Related to this, do not clone any part of your world after selecting it via map properties. This will duplicate worldspawn, causing crashes. Deselecting after this however and cloning after deselecting will behave as normal. (fixed in Hammer++)   [todo tested in ?]
  • 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.
Note.pngNote:Attempting to kill worldspawn or create a second worldspawn while the game is running will crash the server.

Keyvalues

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

All Source Source Games

Targetname (targetname) <string>
Name which other entities use to send inputs to this entity.
Map Description / Title (message) <string> Obsolete
Deprecated.
Leftover from Quake Quake I. Typically used for author credits.
Skybox Name (skyname) <sky name>
Skybox material, relative to materials/skybox/. See Sky List.
Chapter Title Message (chaptertitle) <string>
Chapter Title that appears on-screen when this level starts.
Level Fade In (startdark) <boolean>
Fade in when the map loads.
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 (gametitle) <boolean>
Should the game's title appear on-screen when the map starts?
Icon-Bug.pngBug:Crashes the game when enabled if the game tries to draw the title but does not include title_half and title_life entries in 🖿/scripts/hud_textures.txt.
Half-Life: Source is one of the games that does have them, for example.
Confirm:Which other games have them, or don't use this method in the first place?
  [todo tested in ?]
Note.pngFix:Add title_half and title_life entries to hud_textures.txt.
Example from HL:S 
"title_half"
{
     "file" "sprites/640hud4"
     "x" "0"
     "y" "226"
     "width" "256"
     "height" "30"
}
"title_life"
{
     "file" "sprites/640hud5"
     "x" "0"
     "y" "226"
     "width" "220"
     "height" "30"
}

A proper fix in the code for your mod would be to edit 🖿/game/client/message.cpp's Paint() function, to check m_iconTitleHalf and m_iconTitleLife not being NULL.

New Level Unit (newunit) <boolean>
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.
Note.pngNote:Portal 2 Portal 2 forces this to be enabled in code, so two-way transitions will not work correctly (one-way HL2 style transitions work fine though.)
  • 0 : No, keep current
  • 1 : Yes, clear previous levels
Max occludee area (maxoccludeearea) <float>
Min occluder area (minoccludeearea) <float>
Prevents occlusion testing for entities that take up more or less than X% of the screen, respectively.
Max occludee area (Xbox) (maxoccludeearea_x360) <float>
Min occluder area (Xbox) (minoccludeearea_x360) <float>
Same as above, but for Xbox 360 Xbox 360.
Start Fade Pixels (maxpropscreenwidth) <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 (minpropscreenwidth) <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 (detailvbsp) <file path>
Detail.vbsp file to use for emitting detail props (relative to the mod's root directory)
Detail material file (detailmaterial) <material>
Material for detail sprites to use for drawing detail props
World is cold (coldworld) <boolean>
If set, Day of Defeat: Source Day of Defeat: Source player models will emit clientside breath particles from their head attachments. No effect elsewhere.
Tip.pngIdea:Set this properly even if unused in the given game. If VScript is available then vscript mods may potentially use the information and implement similar functionality to Day of Defeat: Source.
Minimum light level (_minlight) <float> !FGD
The minimum level of ambient light that hits the world. It does not affect any entities, including props!
World MinS (world_mins) <vector3> !FGD
Autofilled by VBSP.
World MaxS (world_maxs) <vector3> !FGD
Autofilled by VBSP.
Map revision (mapversion) <integer> !FGD
Updated by Hammer each time the VMF is saved.
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.

Specific games

Valve games Left 4 Dead 2Portal 2

Left 4 Dead 2 Left 4 Dead 2
Time of day (timeofday) <integer choices>
Common infected will aggro from a further distance if set to "Dawn" through "Dusk" and will sit or lie down if set to "Midnight" or "Evening". Witches will wander if set to "Afternoon".
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 (startmusictype) <boolean>
Music type of the safe room.
  • 0 : Mission Start
  • 1 : Check Point
Music Post-Fix String (musicpostfix) <string>
The musical theme of the map.
Portal 2 Portal 2
Paint in map (paintinmap) <boolean>
Allow paint to cover surfaces? Set to No for better optimization of levels without it.
Max number of blobs (maxblobcount) <integer>
Maximum number of paint blobs. Should NOT exceed 250.
Note.pngNote:These two parameters might not appear if you have propper.fgd in Hammer.

Non-Valve games Black MesaStrata SourceSiN Episodes

Black Mesa Black Mesa
Under Water Particles (underwaterparticle) <string choices>
  • underwater_default : Rubbish
  • underwater_ion : Blue ions
  • underwater_tentacle_water : Tentacle feces water
Strata Source Strata Source
Maximum Projected Textures (maxprojectedtextures) <integer>
Maximum number of env_projectedtexture entities that can be enabled at once. Default 8; set lower to improve performance if necessary.
Warning.pngWarning:While this can be set higher than 8, doing so can be detrimental to performance.
SiN Episodes SiN Episodes
Arena Mode Time Limit (arenaTimeLimit) <integer>
The number of seconds an arena mode map should last. (default: 900s (15 min))

Inputs

SetChapterTitle <stringRedirectInput/string> (only in Mapbase)
Change the Chapter Title
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.


See also