<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.thedarkmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Demagogue</id>
	<title>The DarkMod Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thedarkmod.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Demagogue"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Special:Contributions/Demagogue"/>
	<updated>2026-04-29T09:17:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Fan_Mission_Series&amp;diff=29484</id>
		<title>Fan Mission Series</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Fan_Mission_Series&amp;diff=29484"/>
		<updated>2022-04-13T06:29:51Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* William Steele series */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article serves as an overview of the known existing FM series. &lt;br /&gt;
&lt;br /&gt;
Over the years, &#039;&#039;The Dark Mod&#039;&#039; has accumulated a number of Fan Missions that form a larger interconnected series or an overarching/continuing narrative. Many series are connected by their main characters, some by other FM inter-related elements.&lt;br /&gt;
&lt;br /&gt;
The FMs of each series are sorted in chronological order. &lt;br /&gt;
&lt;br /&gt;
The number of each FM includes a link to its page on the official website. &lt;br /&gt;
&lt;br /&gt;
The name of each FM includes a link to its page on the official TDM wiki.&lt;br /&gt;
&lt;br /&gt;
Beware of potential (minor) spoilers behind the character links.&lt;br /&gt;
&lt;br /&gt;
== Official campaigns ==&lt;br /&gt;
&lt;br /&gt;
While all TDM missions are technically Fan Missions, the ones belonging to these official campaigns are as close as TDM will ever get to its own official in-game missions, or in-game story campaigns. These core missions for the base game are in slow and patient continuous development (due to TDM being a hobbyist project of a fan community), and have been gradually added to the base game over the course of several years. &lt;br /&gt;
&lt;br /&gt;
For additional series by TDM authors, please see the next section.&lt;br /&gt;
&lt;br /&gt;
=== Introduction campaign ===&lt;br /&gt;
&lt;br /&gt;
The missions of this campaign serve as a gradual introduction into the setting and gameplay of &#039;&#039;The Dark Mod&#039;&#039;. The missions are shorter and fairly easy, and gradually put the player&#039;s newly acquired skills to the test. &lt;br /&gt;
&lt;br /&gt;
Currently, this is the only series that is bundled directly as part of the base game. By installing TDM, the first three missions available to you will be part of this official mini-campaign. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief Characters#Corbin|Corbin]] (protagonist), Paschal Murnerus, Moorish adventurers (background)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; In development, but currently on hiatus. 3 missions currently available, including the (generally plotless) training mission.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|0&lt;br /&gt;
!align=left|[[Training Mission (OM)|Training mission]]&lt;br /&gt;
|TDM dev team&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/9932-fan-mission-training-mission-20091017/}} &lt;br /&gt;
|2009-10-17 (original version)&lt;br /&gt;
|Training &amp;lt;br&amp;gt; Jumping/Platforming&lt;br /&gt;
|Unique. The official tutorial mission of TDM, with open-ended gameplay.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
!align=left|[[A New Job (OM)|A New Job]]&lt;br /&gt;
|Springheel&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/18647-tdm-205-official-introductory-missions/}}  &lt;br /&gt;
|2017-03-14&lt;br /&gt;
|City Missions &amp;lt;br&amp;gt; Inn/Tavern&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|2 &lt;br /&gt;
!align=left|[[The Tears of Saint Lucia (OM)|The Tears of Saint Lucia]] &lt;br /&gt;
|TDM dev team&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/10579-fan-mission-the-tears-of-st-lucia-20081021/}} (original version), {{Forumlink|http://forums.thedarkmod.com/topic/18647-tdm-205-official-introductory-missions/}} (current version)&lt;br /&gt;
|2008-10-21 (original version), 2017-02-14 (current version, 3.0)&lt;br /&gt;
|Church/Cathedral&lt;br /&gt;
|[https://www.youtube.com/watch?v=yrGxoi3LSGg Briefing] &amp;lt;br&amp;gt; &#039;&#039;{{TDM-FM|15|standalone release link}}&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Individual authors&#039; series ==&lt;br /&gt;
&lt;br /&gt;
The majority of missions created for &#039;&#039;The Dark Mod&#039;&#039;. For the sake of easier searching, these FM series are arranged in alphabetical order, based on their titles. In terms of release, a Single-mission (S) series consists of several single-mission FM releases over time (the commonest sort), while a Campaign (C) series is an FM containing a storyline consisting of several missions.&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;The Accountant&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#Corbin|Corbin]] (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Currently on hold.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ac1|1}} &lt;br /&gt;
!align=left|[[The Accountant 1: Thieves and Heirs (FM)|The Accountant 1: Thieves and Heirs]]&lt;br /&gt;
|[[:Category:Missions by Goldwell|Goldwell]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/19164-fan-mission-the-accountant-1-thieves-and-heirs-by-goldwell-20171108/}}&lt;br /&gt;
|2017-11-08&lt;br /&gt;
|Mansion/Estate&lt;br /&gt;
|[https://www.youtube.com/watch?v=Tk9DtOT4kjc Briefing]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ac2|2}} &lt;br /&gt;
!align=left|[[The Accountant 2: New in Town (FM)|The Accountant 2: New in Town]]&lt;br /&gt;
|[[:Category:Missions by Goldwell|Goldwell]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/18054-fan-mission-the-accountant-2-new-in-town-by-goldwell-20160509/}} &lt;br /&gt;
|2016-05-08&lt;br /&gt;
|Mansion/Estate&lt;br /&gt;
|[https://www.youtube.com/watch?v=xeuIO_GcYjQ Briefing] &amp;lt;br&amp;gt; [https://www.youtube.com/watch?v=w6e_SJ0_JOM Gameplay trailer]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Away&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; &lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Currently on hold. Planned to continue.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|away0|0}} &lt;br /&gt;
!align=left|[[Away 0: Stolen Heart (FM)|Away 0: Stolen Heart]]&lt;br /&gt;
|[[:Category:Missions by Geep|Geep]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/20964-away-0-stolen-heart-by-geep-_atti_-20211112/}}&lt;br /&gt;
|2021-11-12&lt;br /&gt;
|Inn/Tavern, Jail/Prison, Museum Heist, Bank Job&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|airpocket|1}} &lt;br /&gt;
!align=left|[[Away 1: Air Pocket (FM)|Away 1: Air Pocket]]&lt;br /&gt;
|[[:Category:Missions by Geep|Geep]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/20252-fan-mission-away-1-air-pocket-by-geep-20200207/}}&lt;br /&gt;
|2020-02-06&lt;br /&gt;
|Pirate/Ship&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Chronicles of Skulduggery&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#Elyas_Thorne|Elyas Thorne]] (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|cos0_thief|0}}&lt;br /&gt;
!align=left|[[Chronicles of Skulduggery 0: To Catch a Thief (FM)|To Catch a Thief]] &lt;br /&gt;
|[[:Category:Missions by Bienie|Bienie]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/21156-fan-mission-chronicles-of-skulduggery-0-to-catch-a-thief-20211120/}}&lt;br /&gt;
|2021-11-20&lt;br /&gt;
|City Missions Mansion/Estate&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|127|1}}&lt;br /&gt;
!align=left|[[Chronicles of Skulduggery 1: Pearls and Swine (FM)|Pearls and Swine]] &lt;br /&gt;
|[[:Category:Missions by Bienie|Bienie]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/topic/19439-chronicles-of-skulduggery-pearls-and-swine/}}&lt;br /&gt;
|2018-05-25&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|137|2}}&lt;br /&gt;
!align=left|[[Chronicles of Skulduggery 2: A Precarious Position (FM)|A Precarious Position]] &lt;br /&gt;
|[[:Category:Missions by Bienie|Bienie]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/topic/19975-fan-mission-chronicles-of-skulduggery-2-a-precarious-position-20190504/}} &lt;br /&gt;
|2019-05-03&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|149|3}}&lt;br /&gt;
!align=left|[[Chronicles of Skulduggery 3: Sacricide (FM)|Sacricide]]&lt;br /&gt;
|[[:Category:Missions by Bienie|Bienie]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/20483-fan-mission-chronicles-of-skulduggery-3-sacricide-20200718/}}&lt;br /&gt;
|2020-07-18&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Corbin&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#Corbin|Corbin]] (protagonist), cardinal Laurenti (background), Keshka brotherhood members (antagonists)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|builders_influence|1}}&lt;br /&gt;
!align=left|[[The Builder&#039;s Influence (FM)|The Builder&#039;s Influence]] &lt;br /&gt;
|[[:Category:Missions by RailGun|RailGun]], [[:Category:Missions by Springheel|Springheel]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/10811-fan-mission-the-builders-influence-20100320/}}&lt;br /&gt;
|2010-03-20 (original version), 2010-03-23 (version 2.0) &lt;br /&gt;
|Castle/Fortress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|score_to_settle|2}}&lt;br /&gt;
!align=left|[[A Score to Settle (FM)|A Score to Settle]] &lt;br /&gt;
|[[:Category:Missions by Springheel|Springheel]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/12894-fan-mission-48-a-score-to-settle-by-springheel-20110701/}} &lt;br /&gt;
|2011-07-01&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|follow|3}} &lt;br /&gt;
!align=left|[[A Reputation to Uphold (FM)|A Reputation to Uphold]]&lt;br /&gt;
|[[:Category:Missions by Springheel|Springheel]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16204-fan-mission-a-reputation-to-uphold-by-springheel/}} &lt;br /&gt;
|2014-04-18&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|matterofhours|4}}&lt;br /&gt;
!align=left|[[A Matter of Hours (FM)|A Matter of Hours]]&lt;br /&gt;
|[[:Category:Missions by Springheel|Springheel]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/18809-fan-mission-a-matter-of-hours-by-springheel-2842017/}}&lt;br /&gt;
|2017-04-28&lt;br /&gt;
|Warehouse&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Crucible of Omens&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Description:&#039;&#039;&#039; Though originally planned as a major campaign for future releases of TDM, development progress has been halted.&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Released as Single-mission (S), possibly would have been a Campaign (C) if finished.&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Development halted, campaign apparently cancelled. Only 1 mission has been completed and made available.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|bcd|1}} &lt;br /&gt;
!align=left|[[Crucible of Omens: Behind closed doors (FM)|Crucible of Omens: Behind closed doors]]&lt;br /&gt;
|[[:Category:Missions by Bikerdude|Bikerdude]], Crucible of Omens Team&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/17627-crucible-of-omens-behind-closed-doors-by-bikerdude-the-crucible-team-updated-18122015/}}&lt;br /&gt;
|2015-12-19&lt;br /&gt;
|City Missions&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;The Hare in the Snare&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; &lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Planned to continue.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|hareinthesnare|1}} &lt;br /&gt;
!align=left|[[The Hare in the Snare: Part 1 (FM)|The Hare in the Snare: Part 1]]&lt;br /&gt;
|[[:Category:Missions by Frost_Salamander|Frost_Salamander]] &amp;amp; [[:Category:Missions by Kerry000|Kerry000]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/20883-fan-mission-the-hare-in-the-snare-part-1}}&lt;br /&gt;
|2021-04-09&lt;br /&gt;
|City Missions &amp;lt;br&amp;gt; Inn/Tavern &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Hidden Hands&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; TBA&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|hhi|1}}&lt;br /&gt;
!align=left|[[Hidden Hands 1: Initiation (FM)|Initiation]] &lt;br /&gt;
|[[:Category:Missions by JackFarmer|JackFarmer]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/index.php?/topic/19796-hidden-hands-initiation-27122018/}}&lt;br /&gt;
|2018-12-27&lt;br /&gt;
|Mansion/Estate &amp;lt;br&amp;gt; Ship&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|hhvf|2}}&lt;br /&gt;
!align=left|[[Hidden Hands 2: Vitalic Fever (FM)|Vitalic Fever]] &lt;br /&gt;
|[[:Category:Missions by JackFarmer|JackFarmer]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/index.php?/topic/20051-hidden-hands-vitalic-fever-20072019/}} &lt;br /&gt;
|2019-07-20&lt;br /&gt;
|Mansion/Estate&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|hhtlc|3}}&lt;br /&gt;
!align=left|[[Hidden Hands 3: The Lost Citadel (FM)|The Lost Citadel]] &lt;br /&gt;
|[[:Category:Missions by JackFarmer|JackFarmer]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/20490-hidden-hands-the-lost-citadel-23072020}} &lt;br /&gt;
|2020-07-23&lt;br /&gt;
|Castle/Fortress &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|hhta|4}}&lt;br /&gt;
!align=left|[[Hidden Hands 4: The Anomaly (FM)|The Anomaly]] &lt;br /&gt;
|[[:Category:Missions by JackFarmer|JackFarmer]]&lt;br /&gt;
|{{Forumlink|https://forums.thedarkmod.com/index.php?/topic/20909-hidden-hands-the-anomaly}}&lt;br /&gt;
|2021-05-01&lt;br /&gt;
|Castle/Fortress  &amp;lt;br&amp;gt; Forest&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;In A Time of Need&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#Terry|Terry]] (supporting)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|timeofneed|1}}&lt;br /&gt;
!align=left|[[In A Time of Need 1 (FM)|In A Time Of Need]] &lt;br /&gt;
|[[:Category:Missions by Kyyrma|Kyyrma]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/15354-fan-mission-in-a-time-of-need-by-kyyrma-20131112/}}&lt;br /&gt;
|2013-11-12 &lt;br /&gt;
|Mansion/Estate&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|breakingout|2}}&lt;br /&gt;
!align=left|[[In A Time of Need 2: Breaking Out the Fence (FM)|Breaking Out the Fence]]&lt;br /&gt;
|[[:Category:Missions by Kyyrma|Kyyrma]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16091-fan-mission-breaking-out-the-fence-17032014-by-kyyrma/}} &lt;br /&gt;
|2014-03-17&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Master thief Corso&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief Characters#Corso|Corso]] (protagonist), [[Thief Characters#Mingus|Mingus]] (background, supporting)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; On hiatus.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|lockner|1}}&lt;br /&gt;
!align=left|[[Lockner Manor (FM)|Lockner Manor]] &lt;br /&gt;
|[[:Category:Missions by Buck28|buck28]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16452-new-mission-lockner-manor/}}&lt;br /&gt;
|2014-08-02&lt;br /&gt;
|Mansion/Estate &amp;lt;br&amp;gt; Inn/Tavern&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|briarwood|2}}&lt;br /&gt;
!align=left|[[Briarwood Cathedral (FM)|Briarwood Cathedral]] &lt;br /&gt;
|[[:Category:Missions by Buck28|buck28]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16644-briarwood-cathedral/}} &lt;br /&gt;
|2014-10-29&lt;br /&gt;
|Church/Cathedral &amp;lt;br&amp;gt; Horror&lt;br /&gt;
|Winner of the [[Fan Mission Contests#2014 Halloween Speed-build Contest|2014 Halloween Speed-build Contest]].&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;No Honor Among Thieves&#039;&#039; campaign ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Campaign (C)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; TBA&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|nhat3|1}}&lt;br /&gt;
!align=left|[[No Honor Among Thieves (FM)|Politics]] &lt;br /&gt;
|[[:Category:Missions by Goldchocobo|Goldchocobo]], [[:Category:Missions by RailGun|RailGun]], [[:Category:Missions by Mortem Desino|Mortem Desino]], [[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/10993-fan-mission-no-honor-among-thieves-20100429/}}&lt;br /&gt;
|2010-04-29 (original version), 2015-05-30 (current version, 3.0)&lt;br /&gt;
|Church/Cathedral&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|nhat3|2}} &lt;br /&gt;
!align=left|[[No Honor Among Thieves (FM)|A Night Out on the Town]]&lt;br /&gt;
|[[:Category:Missions by Goldchocobo|Goldchocobo]], [[:Category:Missions by RailGun|RailGun]], [[:Category:Missions by Mortem Desino|Mortem Desino]], [[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/10993-fan-mission-no-honor-among-thieves-20100429/}}&lt;br /&gt;
|2010-04-29 (original version), 2015-05-30 (current version, 3.0)&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|nhat3|3}}&lt;br /&gt;
!align=left|[[No Honor Among Thieves (FM)|No Honor Among Anyone &amp;lt;br&amp;gt; (a.k.a. Forest)]] &lt;br /&gt;
|[[:Category:Missions by Goldchocobo|Goldchocobo]], [[:Category:Missions by RailGun|RailGun]], [[:Category:Missions by Mortem Desino|Mortem Desino]], [[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/10993-fan-mission-no-honor-among-thieves-20100429/}}&lt;br /&gt;
|2010-04-29 (original version), 2015-05-30 (current version, 3.0)&lt;br /&gt;
|Outdoor/Pagan, Mansion/Estate&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Of Brambles and Thorns&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; TBA&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|onesteptoofar|1}} &lt;br /&gt;
!align=left|[[One Step Too Far (FM)|One Step Too Far]]&lt;br /&gt;
|[[:Category:Missions by Dragofer|Dragofer]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16457-fan-mission-one-step-too-far-by-dragofer-20140804/}}&lt;br /&gt;
|2014-08-04&lt;br /&gt;
|Pirate &amp;lt;br&amp;gt; Horror&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|river|2}} &lt;br /&gt;
!align=left|[[Down by the Riverside (FM)|Down by the Riverside]]&lt;br /&gt;
|[[:Category:Missions by Dragofer|Dragofer]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/18402-fan-mission-down-by-the-riverside-by-dragofer-20160925/}} &lt;br /&gt;
|2016-09-25&lt;br /&gt;
|Mansion/Estate &amp;lt;br&amp;gt; Ship&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Penny Dreadful&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; Gerald Foxley (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|penny1_1|1}}&lt;br /&gt;
!align=left|[[Penny Dreadful 1: The Grail of Regrets (FM)|Penny Dreadful 1: The Grail of Regrets]] &lt;br /&gt;
|[[:Category:Missions by Melan|Melan]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/14952-fan-mission-penny-dreadful-by-melan-20130728/}} &lt;br /&gt;
|2013-07-27&lt;br /&gt;
|Horror &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|penny2_1|2}}&lt;br /&gt;
!align=left|[[Penny Dreadful 2: All the Way Up (FM)|Penny Dreadful 2: All the Way Up]] &lt;br /&gt;
|[[:Category:Missions by Melan|Melan]], [[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16387-fan-mission-penny-dreadful-2-by-melan-and-bikerdude-2014078/}} &lt;br /&gt;
|2014-07-08&lt;br /&gt;
|Thieves&#039; Highway (Rooftop) &lt;br /&gt;
|[https://www.youtube.com/watch?v=WmPfCfbeWvg Trailer]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|penny3|3}}&lt;br /&gt;
!align=left|[[Penny Dreadful 3: Erasing the Trail (FM)|Penny Dreadful 3: Erasing the Trail]] &lt;br /&gt;
|[[:Category:Missions by Melan|Melan]], [[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/18200-fan-mission-penny-dreadful-3-by-melan-and-bikerdude-20160710/}} &lt;br /&gt;
|2016-07-09&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Quinn Co.&#039;&#039; campaign ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Campaign (C) (originally single mission (S))&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; TBA&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Completed and released.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|quinn|1}} &lt;br /&gt;
!align=left|[[Quinn Co. (FM)|La Banque Bienveillante]]&lt;br /&gt;
|[[:Category:Missions by Airship Ballet|Airship Ballet]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16702-fan-mission-la-banque-bienveillante-by-airship-ballet-20141122/}}&lt;br /&gt;
|2014-11-22 (original version), 2015-02-04 (current version, bundled with Chase Mercantile) &lt;br /&gt;
|Bank Jobs &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|quinn|2}}&lt;br /&gt;
!align=left|[[Quinn Co. (FM)|Chase Mercantile]]&lt;br /&gt;
|[[:Category:Missions by Airship Ballet|Airship Ballet]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16912-fan-mission-chase-mercantile-by-airship-ballet-20150204/}}&lt;br /&gt;
|2015-02-04 (now bundled with La Banque Bienveillante) &lt;br /&gt;
|Bank Jobs &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Selis Woderose&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#Selis_Woderose|Selis Woderose]] (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Currently on hiatus.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|flakebridge|1}}&lt;br /&gt;
!align=left|[[Selis Woderose 1: Flakebridge Monastery (FM)|Flakebridge Monastery]] &lt;br /&gt;
|[[:Category:Missions by Jesps|Jesps]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/11991-fm-flakebridge-monastery-by-jesps/}}&lt;br /&gt;
|2010-12-05&lt;br /&gt;
|Church/Cathedral &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|rake_off|2}}&lt;br /&gt;
!align=left|[[Selis Woderose 2: Rake-off (FM)|Rake-off]]&lt;br /&gt;
|[[:Category:Missions by Jesps|Jesps]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/12846-fm-rake-off-19-06-2011/}} &lt;br /&gt;
|2011-06-19&lt;br /&gt;
|Castle/Fortress &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Shadowcursed&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S) for the first mission and Campaign (C) for the second mission.&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#Bolen|Bolen]] (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Ongoing, currently on hiatus.&lt;br /&gt;
* &#039;&#039;&#039;Ancilliary materials:&#039;&#039;&#039; &#039;&#039;[http://www.amazon.com/Shadowcursed-ebook/dp/B00BYEW02M Shadowcursed]&#039;&#039; novella (e-book)&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|requiem|1}}&lt;br /&gt;
!align=left|[[Requiem (FM)|Requiem]]&lt;br /&gt;
|[[:Category:Missions by Moonbo|Moonbo]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/15101-fan-mission-requiem-by-gelo-moonbo-fleisher-2013106/}}&lt;br /&gt;
|2013-10-08&lt;br /&gt;
|Church/Cathedral &amp;lt;br&amp;gt; Lost Civilizations&lt;br /&gt;
|[https://web.archive.org/web/20160409012413/https://community.eidosmontreal.com/blogs/thief-mod-winners Winner] of the 2014 official &#039;&#039;[http://forums.thedarkmod.com/topic/15956-square-enix-and-amazoncom-announce-thief-mod-contest/ Thief Mod Competition]&#039;&#039; by Square Enix &amp;amp; Amazon.com.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ahouseoflockedsecrets|2}}&lt;br /&gt;
!align=left|[[A House of Locked Secrets (FM)|A House of Locked Secrets]] &lt;br /&gt;
|[[:Category:Missions by Moonbo|Moonbo]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/17163-fan-mission-a-house-of-locked-secrets-by-gelo-moonbo-fleisher-20150528/}} &lt;br /&gt;
|2015-05-29 	&lt;br /&gt;
|Church/Cathedral &amp;lt;br&amp;gt; Mansion/Estate&lt;br /&gt;
|[https://www.youtube.com/watch?v=f5NuTJEZ8VE Trailer] &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Shadows of Northdale&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief Characters#Corbin|Corbin]] (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Ongoing, currently in gradual development.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|northdale1|1}}&lt;br /&gt;
!align=left|[[Shadows of Northdale Act I (FM)|Shadows of Northdale ACT I: &amp;lt;br&amp;gt; A Curious Mind]] &lt;br /&gt;
|[[:Category:Missions by Goldwell|Goldwell]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/19368-fan-mission-shadows-of-northdale-act-i-by-goldwell-20180323/}} &lt;br /&gt;
|2018-03-23&lt;br /&gt;
|City Missions&lt;br /&gt;
|[https://www.youtube.com/watch?v=p4nP3lYd6wg Briefing]&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|northdale2|2}}&lt;br /&gt;
!align=left|[[Shadows of Northdale Act II (FM)|Shadows of Northdale ACT II: &amp;lt;br&amp;gt; Down the Rabbit Hole]] &lt;br /&gt;
|[[:Category:Missions by Goldwell|Goldwell]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/19936-fan-mission-shadows-of-northdale-act-ii-by-goldwell-20190320/}} &lt;br /&gt;
|2019-03-20&lt;br /&gt;
|City Missions&lt;br /&gt;
|[https://www.youtube.com/watch?v=KO-eIOX9nqI Briefing]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;St Alban&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; TBA&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|caduceus|1}}&lt;br /&gt;
!align=left|[[St Alban 1: The Caduceus of St Alban (FM)|The Caduceus of St. Alban]] &lt;br /&gt;
|[[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/11644-the-caduceus-of-st-alban-vertical-fm-contest-entry-aug-8th-2010/}} &lt;br /&gt;
|2010-08-23 (original version), 2010-08-26 (version 1.5.5)&lt;br /&gt;
|Church/Cathedral&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|cathedral|2}}&lt;br /&gt;
!align=left|[[St Alban 2: St Albans Cathedral (FM)|St. Albans Cathedral]]&lt;br /&gt;
|[[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16343-fan-mission-st-albans-cathedral-v20-11062014/}} (current, 2.0 version)&lt;br /&gt;
|2010-11-01 (original version), 2014-06-11 (version 2.0)&lt;br /&gt;
|Church/Cathedral&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Talbot&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; Talbot&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Ongoing, currently on hiatus.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|returntothecity|1}} &lt;br /&gt;
!align=left|[[Talbot 2: Return to the City (FM)|Return to the City]]&lt;br /&gt;
|[[:Category:Missions by Melan|Melan]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/10509-fan-mission-return-to-the-city-by-melan-20100110/}} (original version), {{Forumlink|http://forums.thedarkmod.com/topic/12390-fan-mission-return-to-the-city-v2-01032011/}} (version 2.0)&lt;br /&gt;
|2010-01-10 (original version), 2015-01-03 (2.0), 2015-01-03 (current version, 3.0)&lt;br /&gt;
|City Missions&lt;br /&gt;
|Winner of the [[Fan Mission Contests#2009 Grand Christmas Contest|2009 Grand Christmas Contest]].&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|fauchard1_1|2}}&lt;br /&gt;
!align=left|[[Talbot 3: Fiasco at Fauchard Street (FM)|Fiasco at Fauchard Street]]&lt;br /&gt;
|[[:Category:Missions by Melan|Melan]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/12655-fan-mission-fiasco-at-fauchard-street-by-melan-20110501/}} &lt;br /&gt;
|2011-05-01&lt;br /&gt;
|Thieves&#039; Highway (Rooftop)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; [[Sir Talbot&#039;s Collateral (FM)|Sir Talbot&#039;s Collateral]] by Bikerdude and Baal is actually an unrelated mission, just with a similarly named character.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Thief&#039;s Den&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Description:&#039;&#039;&#039; The &#039;&#039;de facto&#039;&#039; oldest FM series in &#039;&#039;The Dark Mod&#039;&#039;. Follow the skillful thief Farrell as he navigates the criminal underworld of [[The City|Bridgeport]] and the surrounding world.&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief Characters#Farrell|Farrell]] (protagonist), [[Thief Characters#Sebastian_Creep|Sebastian Creep]] (supporting)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Currently on hiatus.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|thiefsden|1}}&lt;br /&gt;
!align=left|[[Thief&#039;s Den 1: Thief&#039;s Den (FM)|Thief&#039;s Den]] &lt;br /&gt;
|[[:Category:Missions by Fidcal|Fidcal]], [[:Category:Missions by Greebo|Greebo]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/11347-fan-mission-thiefs-den-re-release-by-fidcal20100704/}} &lt;br /&gt;
|2008-01-18 (original version), 2010-07-04 (version 2.0)&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|chalice1_1|2}}&lt;br /&gt;
!align=left|[[Thief&#039;s Den 2: The Chalice of Kings (FM)|The Chalice of Kings]] &lt;br /&gt;
|[[:Category:Missions by Fidcal|Fidcal]] (original version), [[:Category:Missions by Bikerdude|Bikerdude]], [[:Category:Missions by Xarg|Xarg]] (edits, version 2.0)&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/9935-fan-mission-chalice-of-kings-by-fidcal-20091017/}} &lt;br /&gt;
|2009-10-15 (original version), 2015-09-24 (version 2.0)&lt;br /&gt;
|Castle/Fortress&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|heartv2|3}}&lt;br /&gt;
!align=left|[[Thief&#039;s Den 3: The Heart of Lone Salvation (FM)|The Heart of Lone Salvation]] &lt;br /&gt;
|[[:Category:Missions by Fidcal|Fidcal]], Baddcog, [[:Category:Missions by Bikerdude|Bikerdude]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/10878-fan-mission-the-heart-of-lone-salvation-by-fidcal-baddcog-bikerdude-20100402/}}&lt;br /&gt;
|2010-04-02 (original version), 2014-04-12 (version 2.0)&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|alchemist|4}}&lt;br /&gt;
!align=left|[[Thief&#039;s Den 4: The Alchemist (FM)|The Alchemist]]&lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]], [[:Category:Missions by Fidcal|Fidcal]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/11170-fan-mission-the-alchemist-by-sotha-fidcal20100601/}}&lt;br /&gt;
|2010-06-01 (original version) 2010-06-04 (update)&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Thomas Porter&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#Thomas Porter|Thomas Porter]] (protagonist), [[Thief_Characters#Lark Butternose|Lark Butternose]] (supporting), [[Noble/Wealthy_Characters#Godfrey_Knighton|Godfrey Knighton]] (background)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Concluded. &lt;br /&gt;
* &#039;&#039;&#039;Overview:&#039;&#039;&#039; [http://forums.thedarkmod.com/topic/15179-the-thomas-porter-series/ Courtesy of] Sotha.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|mandrasola|1}}&lt;br /&gt;
!align=left|[[Thomas Porter 1: Mandrasola (FM)|Mandrasola]] &lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/12575-fan-mission-mandrasola-by-sotha-20110410/}} &lt;br /&gt;
|2011-04-10&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|knighton_manor|2}}&lt;br /&gt;
!align=left|[[Thomas Porter 2: Knighton Manor (FM)|Knighton Manor]]&lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/11898-fan-mission-the-knighton-manor-by-sotha-20101109/}} &lt;br /&gt;
|2010-11-09&lt;br /&gt;
|Mansion/Estate&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|beleaguered_fence|3}}&lt;br /&gt;
!align=left|[[Thomas Porter 3: The Beleaguered Fence (FM)|The Beleaguered Fence]]&lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/11298-fan-mission-the-beleaguered-fence-by-sotha-20100623/}}&lt;br /&gt;
|2010-06-23&lt;br /&gt;
|Jail/Prison&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|glenham_tower|4}}&lt;br /&gt;
!align=left|[[Thomas Porter 4: Glenham Tower (FM)|Glenham Tower]]&lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/11423-fan-mission-the-glenham-tower-by-sotha-20100717/}}&lt;br /&gt;
|2010-07-17&lt;br /&gt;
|Castle/Fortress &amp;lt;br&amp;gt; Horror&lt;br /&gt;
|Winner of the [[Fan_Mission_Contests#2010_Summer_Vertical_Contest|2010 Summer Vertical Contest]].&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|transaction|5}}&lt;br /&gt;
!align=left|[[Thomas Porter 5: The Transaction (FM)|The Transaction]] &lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/12408-fan-mission-the-transaction-by-sotha-20110304/}}&lt;br /&gt;
|2011-03-04&lt;br /&gt;
|City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|phrase_book|6}}&lt;br /&gt;
!align=left|[[Thomas Porter 6: The Phrase Book (FM)|The Phrase Book]] &lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/13799-fan-mission-the-phrase-book-by-sotha-20120512/}}&lt;br /&gt;
|2012-05-11 &lt;br /&gt;
|City Missions &amp;lt;br&amp;gt; Thieves&#039; Highway (Rooftop)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|lich_queens_demise|7}} &lt;br /&gt;
!align=left|[[Thomas Porter 7: The Lich Queen&#039;s Demise (FM)|The Lich Queen&#039;s Demise]]&lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/14826-fan-mission-the-lich-queens-demise-by-sotha-20130520/}}&lt;br /&gt;
|2013-05-20&lt;br /&gt;
|Horror&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Ulysses&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; Ulysses (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ulysses_genesis|1}}&lt;br /&gt;
!align=left|[[Ulysses 1: Genesis (FM)|Ulysses: Genesis]] &lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16428-fan-mission-ulysses-genesis-by-sotha-20140724/}}&lt;br /&gt;
|2014-07-24&lt;br /&gt;
|Mansion/Estate&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|u2_flock|2}}&lt;br /&gt;
!align=left|[[Ulysses 2: Protecting the Flock (FM)|Ulysses: Protecting the Flock]]&lt;br /&gt;
|[[:Category:Missions by Sotha|Sotha]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/17162-fan-mission-ulysses-2-protecting-the-flock-by-sotha-20150528/}}&lt;br /&gt;
|2015-05-28&lt;br /&gt;
|Church/Cathedral&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Vengeance for a Thief&#039;&#039; campaign ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S) for the first two published missions, Campaign (C) for the final release that also includes a new first mission.&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; TBA&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|vfat3|1}}&lt;br /&gt;
!align=left|[[Vengeance for a Thief (FM)|The Angel&#039;s Tear]] &lt;br /&gt;
|[[:Category:Missions by Sir Taffsalot|Sir Taffsalot]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16953-the-complete-vengeance-for-a-thief-campaign/}} &lt;br /&gt;
|2015-02-16&lt;br /&gt;
|Church/Cathedral&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|vfat1|2}}&lt;br /&gt;
!align=left|[[Vengeance for a Thief (FM)|A Pawn in the Game]] &lt;br /&gt;
|[[:Category:Missions by Sir Taffsalot|Sir Taffsalot]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/14068-fan-mission-vengeance-for-a-thief-part-1-by-sir-taffsalot-06092012/}} &lt;br /&gt;
|2012-09-06&lt;br /&gt;
|Jail/Prison&lt;br /&gt;
|&#039;&#039;{{TDM-FM|62|standalone release link}}&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|vfat2|3}}&lt;br /&gt;
!align=left|[[Vengeance for a Thief (FM)|The Art of Revenge]]&lt;br /&gt;
|[[:Category:Missions by Sir Taffsalot|Sir Taffsalot]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/15051-fan-mission-vengeance-for-a-thief-part-2-by-sir-taffsalot-06092013/}} &lt;br /&gt;
|2013-09-06&lt;br /&gt;
|Museum Heists&lt;br /&gt;
|&#039;&#039;{{TDM-FM|75|standalone release link}}&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;Volta&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; TBA&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; TBA &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|volta1_3|1}} &lt;br /&gt;
!align=left|[[Volta I: The Stone (FM)|Volta and the Stone]]&lt;br /&gt;
|[[:Category:Missions by Kingsal|Kingsal]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/18087-fan-mission-volta-and-the-stone-by-kingsal-05262016/}}&lt;br /&gt;
|2016-05-27&lt;br /&gt;
|Mansion/Estate &amp;lt;br&amp;gt; City Missions&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|cauldron_v2_2|2}} &lt;br /&gt;
!align=left|[[Volta II: Cauldron of the Gods (FM)|Volta 2: Cauldron of the Gods]]&lt;br /&gt;
|[[:Category:Missions by Kingsal|Kingsal]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/19207-fan-mission-volta-ii-cauldron-of-the-gods-by-kingsal-113017-update-v20/}}&lt;br /&gt;
|2017-11-30 &lt;br /&gt;
|Lost Civilizations&lt;br /&gt;
|[https://www.youtube.com/watch?v=SRRCRVFHruc Briefing]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== &#039;&#039;William Steele&#039;&#039; series ===&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Release:&#039;&#039;&#039; Single-mission (S)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; characters:&#039;&#039;&#039; [[Thief_Characters#William_Steele|William Steele]] (protagonist)&lt;br /&gt;
* &#039;&#039;&#039;Series&#039; status:&#039;&#039;&#039; Ended with the passing of grayman, rest in peace. &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;1%&amp;quot;|No.&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;21%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;11%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;4%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Forum link&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Releases&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Mission Type&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot;|Notes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ws1_north|1}}&lt;br /&gt;
!align=left|[[William Steele 1: In the North (FM)|In the North]] &lt;br /&gt;
|[[:Category:Missions by Grayman|grayman]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/14214-fan-mission-in-the-north-by-grayman-20121020/}}&lt;br /&gt;
|2012-10-20&lt;br /&gt;
|Mansion/Estate&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ws2_homeagain|2}}&lt;br /&gt;
!align=left|[[William Steele 2: Home Again (FM)|Home Again]] &lt;br /&gt;
|[[:Category:Missions by Grayman|grayman]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/15919-fan-mission-home-again-by-grayman-2014212/}}&lt;br /&gt;
|2014-02-12&lt;br /&gt;
|Thieves&#039; Highway (Rooftop)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ws3_cleighmoor|3}}&lt;br /&gt;
!align=left|[[William Steele 3: Cleighmoor (FM)|Cleighmoor]] &lt;br /&gt;
|[[:Category:Missions by Grayman|grayman]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/16011-fan-mission-cleighmoor-by-grayman-201431/}}&lt;br /&gt;
|2014-03-01&lt;br /&gt;
|Sewers &amp;lt;br&amp;gt; Jail/Prison&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ws4_warrens|4}}&lt;br /&gt;
!align=left|[[William Steele 4: The Warrens (FM)|The Warrens]] &lt;br /&gt;
|[[:Category:Missions by Grayman|grayman]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/19618-fan-mission-the-warrens-by-grayman-201891/}}&lt;br /&gt;
|2018-09-01&lt;br /&gt;
|City Missions &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|{{TDM-FM|ws5_commerce|5}}&lt;br /&gt;
!align=left|[[William Steele 5: Commerce Bank (FM)|Commerce Bank]] &lt;br /&gt;
|[[:Category:Missions by Grayman|grayman]]&lt;br /&gt;
|{{Forumlink|http://forums.thedarkmod.com/topic/19957-fan-mission-commerce-bank-by-grayman-2019410/}}&lt;br /&gt;
|2019-04-10&lt;br /&gt;
|Bank Jobs &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
&lt;br /&gt;
For a key to the descriptions of each Mission Type, please see [[Fan_Missions_for_The_Dark_Mod#Table_notes|this overview]].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
*[[Fan Missions for The Dark Mod]] - Main article on TDM fan missions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Fan Missions|S]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=A_Full-Screen_Slide_in_Mid-Game&amp;diff=28839</id>
		<title>A Full-Screen Slide in Mid-Game</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=A_Full-Screen_Slide_in_Mid-Game&amp;diff=28839"/>
		<updated>2021-11-27T00:52:21Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* For More */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;by Geep, 2021&#039;&#039;&lt;br /&gt;
==Overview==&lt;br /&gt;
Suppose you want to briefly show some text on-screen, but the existing TDM message gui’s don’t quite do what you want. Here’s how you can easily modify them.&lt;br /&gt;
&lt;br /&gt;
Start by creating an atdm:gui_message entity in your map. Then, in the Entity Inspector, rename it to atdm_gui_message_slide, and alter these 2 lines to:&lt;br /&gt;
 gui	guis/my_slide.gui&lt;br /&gt;
 show	&amp;lt;number of seconds you want slide to appear&amp;gt;&lt;br /&gt;
Unlike the unaltered case, for what we&#039;re doing here, the values of this entity&#039;s spawnargs &amp;quot;lines&amp;quot; and &amp;quot;text&amp;quot; will be ignored. Also, the slide will disappear abruptly at &amp;quot;show&amp;quot; time, not fade out.&lt;br /&gt;
&lt;br /&gt;
Arrange for your player to trigger this entity. Finally, we will create and customize my_slide.gui. In particular, we will make it possible for the user to terminate the slide early, by clicking the LMB on it. The text we will display will be hardcoded into the .gui, not passed as a spawnarg or (as would be the case with readables) retrieved from an .xd file.&lt;br /&gt;
&lt;br /&gt;
The Doom GUI language is not a thing of beauty. Some places require semi-colons at line ends; some places forbid them. Sometimes you need quotes; sometimes not. Persevere.&lt;br /&gt;
&lt;br /&gt;
==Case 1 – Transparent Background, White Letters==&lt;br /&gt;
In your FM’s “guis” folder, create my_slide.gui with content:&lt;br /&gt;
 windowDef MySlide&lt;br /&gt;
 {&lt;br /&gt;
 	visible 1&lt;br /&gt;
 	rect 0,0,640,480 // x, y, w, h. Origin upper-left screen corner.&lt;br /&gt;
 	onAction {&lt;br /&gt;
 	     set &amp;quot;MySlide::visible&amp;quot; &amp;quot;0&amp;quot;; &lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Text1 {&lt;br /&gt;
 	     rect        10, 10, 620, 460 // x, y (relative to parent origin), w, h. Adjust to control margins.&lt;br /&gt;
 	     text        &amp;quot;Let&#039;s try word wrapping. This box is within screen bounds. Sometimes, with word wrapping, you can use a box that slightly exceeds screen width.&amp;quot;&lt;br /&gt;
 	     textscale 1&lt;br /&gt;
 	     font &amp;quot;fonts/popsies&amp;quot;&lt;br /&gt;
  	}&lt;br /&gt;
 }&lt;br /&gt;
Almost always, you use “rect 0,0,640,480” in the parent windowDef to establish a logical coordinate system stretched over the screen dimensions. By default, a TDM menu cursor will appear, to remind the user that they can exit early by clicking... really anywhere. You can suppress this cursor with &amp;quot;nocursor 1&amp;quot;. Choose the font from the standard TDM ones (e.g., carleton is used for briefings). Adjust the font size with float &amp;quot;textscale&amp;quot;, but 1 or less is best.&lt;br /&gt;
&lt;br /&gt;
The text will be word-wrapped and left-justified. You can add &amp;quot;textalign 1&amp;quot; to center it (Sometimes with &amp;quot;textalign 1&amp;quot;, the first line stays left-justified; ugh. If so, stick in some leading spaces).&lt;br /&gt;
&lt;br /&gt;
This is not very different than the standard atdm:gui_message treatment with the &amp;quot;...no_art&amp;quot; gui. However, if you want to have titles and paragraphs with different fonts, sizes, locations, or margins, you can just add additional windowDefs. More about that below. Another usage would be to tweak the margins to provide a subtitle, instead of full-screen text.&lt;br /&gt;
&lt;br /&gt;
==Case 2 – Opaque Black Background, White Letters==&lt;br /&gt;
Here, we have a slide in the style of old-time silent movie captions.&lt;br /&gt;
 windowDef MySlide&lt;br /&gt;
 {&lt;br /&gt;
 	visible 1&lt;br /&gt;
 	rect 0,0,640,480&lt;br /&gt;
 	backcolor   0, 0, 0, 1 // Black background&lt;br /&gt;
 	onAction {&lt;br /&gt;
 	     set &amp;quot;MySlide::visible&amp;quot; &amp;quot;0&amp;quot;; &lt;br /&gt;
 	     set &amp;quot;gui::MySlideDone&amp;quot; &amp;quot;1&amp;quot;;&lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Text1 { ... same as previous example ... }&lt;br /&gt;
 }&lt;br /&gt;
With an opaque full-screen background, it&#039;s often necessary for the rest of the game to know when the slide is done, particularly if it’s up more than a few seconds. So onAction sets a variable, that can then be polled for in a script, shown next.&lt;br /&gt;
==Sample Script Code to Put Up a Slide then Wait==&lt;br /&gt;
 void full_screen_slide()&lt;br /&gt;
 {&lt;br /&gt;
   sys.trigger($atdm_gui_message_slide); // show the slide&lt;br /&gt;
   // Optionally add code here to move player to blue room.&lt;br /&gt;
   // We’ll need to get the gui’s overlay handle, from the attached default scriptobject, which is “tdm_gui_message”.&lt;br /&gt;
   // By casting, we get access to it here.&lt;br /&gt;
   tdm_gui_message e = $atdm_gui_message_slide;&lt;br /&gt;
   // Can take a while for the overlay handle to be created and for e.gui to be non-zero.&lt;br /&gt;
   // If spawnarg &amp;quot;delay&amp;quot; is zero, the default, a 0.1 second delay is imposed. &lt;br /&gt;
   float handlenum = 0;&lt;br /&gt;
   while(handlenum == 0)&lt;br /&gt;
   {&lt;br /&gt;
   	  handlenum = e.gui;&lt;br /&gt;
 	  sys.wait(0.1);&lt;br /&gt;
   }&lt;br /&gt;
   float maxtime = $atdm_gui_message_slide.getFloatKey(&amp;quot;show&amp;quot;);&lt;br /&gt;
   float slide_done == 0;&lt;br /&gt;
   while(maxtime &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
 	  slide_done = $player1.getGuiFloat(handlenum, &amp;quot;MySlideDone&amp;quot;);&lt;br /&gt;
 	  if(slide_done == 1) // user did gui&#039;s onAction, with LMB&lt;br /&gt;
 		break;&lt;br /&gt;
 	  maxtime -= 0.1;&lt;br /&gt;
 	  sys.wait(0.1);&lt;br /&gt;
   }&lt;br /&gt;
   // Optionally add code here to move player from blue room.&lt;br /&gt;
   $player1.setGuiFloat(handlenum, &amp;quot;MySlideDone&amp;quot;, 0); // reset just in case&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Case 3 – Opaque Image Background, Black Letters==&lt;br /&gt;
 windowDef MySlide&lt;br /&gt;
 {&lt;br /&gt;
 	visible 1&lt;br /&gt;
 	rect 0,0,640,480&lt;br /&gt;
 	background	&amp;quot;models/darkmod/props/textures/parchment_freshpaper&amp;quot;&lt;br /&gt;
 	onAction {&lt;br /&gt;
 	     set &amp;quot;MySlide::visible&amp;quot; &amp;quot;0&amp;quot;;&lt;br /&gt;
 	     set &amp;quot;gui::MySlideDone&amp;quot; &amp;quot;1&amp;quot;; &lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Text1 {&lt;br /&gt;
 	     rect        10, 10, 620, 460 // x, y (relative to parent origin), w, h&lt;br /&gt;
 	     text        &amp;quot;   ...same text as Case 1...   &amp;quot;&lt;br /&gt;
 	     forecolor   1, 1, 1, 1 // Black opaque font&lt;br /&gt;
 	     textscale 1&lt;br /&gt;
 	     font &amp;quot;fonts/popsies&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
===Variants===&lt;br /&gt;
We’re using a stock TDM background here, but you can have your FM include a custom .jpg, .tga, or .dds image as background. As is usual with TDM, &amp;quot;background&amp;quot; assumes the filepath from the FM’s root, and does not want the file extension to be stated here.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you could just burn the text into the background image. But translators will be unhappy unless you also provide them with the corresponding text-free image.&lt;br /&gt;
&lt;br /&gt;
==Case 4 – Two-Level Image Background, Black Letters==&lt;br /&gt;
There are a number of pre-existing TDM &amp;quot;parchment&amp;quot; and &amp;quot;scroll&amp;quot; backgrounds that have wide transparent perimeters. You could substitute one of these directly, in the style of Case 3, so you see the game world around the edges. Instead, we use &amp;quot;backcolor&amp;quot; to set an opaque black background (as in Case 2), and define the scroll atop it within a child windowDef:&lt;br /&gt;
&lt;br /&gt;
 windowDef MySlide&lt;br /&gt;
 {&lt;br /&gt;
 	visible 1&lt;br /&gt;
 	rect 0,0,640,480&lt;br /&gt;
 	backcolor   0, 0, 0, 1 // Black background&lt;br /&gt;
 	onAction {&lt;br /&gt;
 	     set &amp;quot;MySlide::visible&amp;quot; &amp;quot;0&amp;quot;;&lt;br /&gt;
 	     set &amp;quot;gui::MySlideDone&amp;quot; &amp;quot;1&amp;quot;;&lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Scroll1{&lt;br /&gt;
 	     visible 1&lt;br /&gt;
 	     rect 0,0,640,480 // x, y, w, h. This can be bigger than the parent if you want to reduce transparent perimeter&lt;br /&gt;
 	     background	&amp;quot;guis/assets/readables/scroll&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Text1 { ... same as previous example ... }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==An Actual Example==&lt;br /&gt;
An outgrown of Case 4 can be found in FM &amp;quot;Away 0: Stolen Heart&amp;quot;. There comes a point where the player can ask to skip an upcoming video cutscene, typically because they&#039;ve already seen it. In that case, when the player gets to where the video cutscene would play, a plausible full-screen slide is shown instead. Information on the slide summarizes, in re-imagined form, what the cutscene would show.&lt;br /&gt;
&lt;br /&gt;
[[File:Away0 if skip first cutscene.jpg|thumb|center|A more-complex example of an actual slide. Click to expand.]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Continue&amp;quot; text provides a mental target for the cursor, but the gamer can really click anywhere. The custom .gui in this case uses multiple windowDefs with differnt margins, font colors, and font sizes to position text blocks atop the scroll.&lt;br /&gt;
&lt;br /&gt;
 windowDef CutSceneReplacementSlide&lt;br /&gt;
 {&lt;br /&gt;
 	visible   1&lt;br /&gt;
 	rect      0,0,640,480 // x, y, w, h. Origin upper-left&lt;br /&gt;
 	backcolor 0, 0, 0, 1&lt;br /&gt;
 	onAction {&lt;br /&gt;
 	   set &amp;quot;CutSceneReplacementSlide::visible&amp;quot; &amp;quot;0&amp;quot;;&lt;br /&gt;
 	   set &amp;quot;gui::FirstCutsceneReplacementSlideDone&amp;quot; &amp;quot;1&amp;quot;;&lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Scroll1 {&lt;br /&gt;
 	   visible 1&lt;br /&gt;
 	   rect          0,0,640,480 // x, y, w, h. This can be bigger than the parent if you want to reduce transparent perimeter&lt;br /&gt;
 	   background	&amp;quot;guis/assets/readables/scroll&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Text1 {&lt;br /&gt;
 	    rect        10, 30, 620, 460 // x, y, w, h. Margins enlarged to keep text on opaque upper portion of Scroll1&lt;br /&gt;
 	    text        &amp;quot;What Emily Will Say in Her Diary&amp;quot;&lt;br /&gt;
 	    forecolor   1, 1, 1, 1 // White opaque font&lt;br /&gt;
 	    textscale   0.5&lt;br /&gt;
 	    textalign   1 // Centered&lt;br /&gt;
 	    font        &amp;quot;fonts/carleton&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Text2 {&lt;br /&gt;
 	    rect        100, 70, 440, 250 // x, y, w, h. Margins enlarged to keep text on opaque middle portion of Scroll1&lt;br /&gt;
 	    text        &amp;quot;I startled from my prayers. There he was in my room, &amp;amp; he brought what we need! I snatched the key from him &amp;amp; flung open the long-locked door, the night air so sweet. My passion arose, and he responded .&amp;quot;&lt;br /&gt;
 	    forecolor   0, 0, 0, 1 // Black opaque font&lt;br /&gt;
 	    textscale   0.4&lt;br /&gt;
 	    font        &amp;quot;fonts/popsies&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 	windowDef Text3 {&lt;br /&gt;
 	    rect        100, 280, 440, 250 // x, y, w, h. Margins enlarged to keep text on opaque middle portion of Scroll1&lt;br /&gt;
 	    text        &amp;quot;But horrors! I heard Bleda&#039;s gait, his footsteps approach. He would kill us! I bolted out the door, shouting &#039; Follow Me&#039;!&amp;quot;&lt;br /&gt;
 	    forecolor   0, 0, 0, 1 // Black opaque font&lt;br /&gt;
 	    textscale   0.4&lt;br /&gt;
 	    font        &amp;quot;fonts/popsies&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
    windowDef Text4 {&lt;br /&gt;
 	    rect        10, 420, 590, 40 // x, y, w, h. Margins enlarged to keep text on opaque lower portion of Scroll1&lt;br /&gt;
 	    text        &amp;quot;Continue&amp;quot;&lt;br /&gt;
 	    forecolor   1, 1, 1, 1 // White opaque font&lt;br /&gt;
 	    textscale   0.5&lt;br /&gt;
 	    textalign   1 // Centered&lt;br /&gt;
 	    font        &amp;quot;fonts/carleton&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The corresponding script function (in emily_related.script) is far more complicated than what was discussed earlier, because it handles the video, sound, and additional FM-specific chores for story continuity.&lt;br /&gt;
&lt;br /&gt;
==For More==&lt;br /&gt;
The information here draws on 2004-vintage GUI tutorials by Doom creator John Carmack, but adapted to TDM and the context here.&lt;br /&gt;
&lt;br /&gt;
[[Mission Title Screen while Loading]] has more about the Doom3 GUI layout language with further examples.&lt;br /&gt;
&lt;br /&gt;
You should use a text editor for GUI files. The vintage built-in GUI editor (console command &amp;quot;editGUIs&amp;quot;) has become unusable.&lt;br /&gt;
&lt;br /&gt;
[[Full-Screen Video Cutscenes]] has more about deploying &amp;quot;skippable&amp;quot; video cutscenes.&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;br /&gt;
[[Category:Video and cutscenes]]&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
[[Category:Fonts]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=19653</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=19653"/>
		<updated>2017-09-19T11:18:05Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Ambient sound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix mentioned above, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. Using the function sys.waitFor( $[speaker_name]); after running the speaker is supposed to automatically wait the duration, but this needs to be tested.  &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $tdm_location_settings_1.setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_1].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. Also be sure to use the right name for the location settings entity. It may not have a &amp;quot;_1&amp;quot; suffix. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;tdm_location_settings_1&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however. You&#039;d just use the speaker property &amp;quot;s_volume&amp;quot; directly, but you&#039;d need to restore it after the override is over if you don&#039;t want the change applying to all sounds.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches or pierces the portal you want as a boundary, and it will mark that portal as a location boundary. (Note, you only make one separator per portal. In the photo example below, the one separator is piercing the portal.) &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.&lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with one info_locationseparator touching the portal (actually piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
:*There&#039;s a bug with setting ambient_light to 0 0 0 (to be fixed in 2.05), so use 0.004 0.004 0.004 if you want to remove ambient light from a location.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=19652</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=19652"/>
		<updated>2017-09-19T11:17:05Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* info_locationseparator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix mentioned above, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. Using the function sys.waitFor( $[speaker_name]); after running the speaker is supposed to automatically wait the duration, but this needs to be tested.  &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $tdm_location_settings_1.setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_1].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. Also be sure to use the right name for the location settings entity. It may not have a &amp;quot;_1&amp;quot; suffix. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;tdm_location_settings_1&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however. You&#039;d just use the speaker property &amp;quot;s_volume&amp;quot; directly, but you&#039;d need to restore it after the override is over if you don&#039;t want the change applying to all sounds.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches or pierces the portal you want as a boundary, and it will mark that portal as a location boundary. (Note, you only make one separator per portal. In the photo example below, the one separator is piercing the portal.) &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.&lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
:*There&#039;s a bug with setting ambient_light to 0 0 0 (to be fixed in 2.05), so use 0.004 0.004 0.004 if you want to remove ambient light from a location.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18399</id>
		<title>How to add Textures to The Dark Mod</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18399"/>
		<updated>2016-05-21T08:58:34Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Move the Texture to the right Location */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Create your texture ==&lt;br /&gt;
This is mostly artwork. Be sure to start off with useful raw material with a reasonably high resolution.  Where possible, work from photo-references. A basic guide can be found here: [[Texture Creation - Basic Tutorial]].&lt;br /&gt;
&lt;br /&gt;
A few things to remember:  Make sure your texture dimensions are a power of 2 (eg, 128, 256, 512, 1024, etc).  Other common mistakes can be found here:  [[Common Texture Mistakes]]&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Use good source material&lt;br /&gt;
* All image dimensions must be powers of two: 64, 128, 256, 512, 1024 (don&#039;t go beyond 1024).&lt;br /&gt;
* Avoid lighting baked into the diffusemap&lt;br /&gt;
* Keep your PSD/Gimp working version safe!}}&lt;br /&gt;
== Save your Texture in the correct Format == &lt;br /&gt;
Save the diffusemap, the normalmap and an optional specularmap to a TGA file. The &#039;&#039;&#039;[[Texture Guidelines]]&#039;&#039;&#039; will help you choosing the correct resolution. A TGA version of your diffusemap is supposed to be uploaded to our hi-res repository for future reference (see below).&lt;br /&gt;
&lt;br /&gt;
Once your TGA file is saved, you will have to create DDS files for the diffuse and specular (not the normalmap) as well. These are smaller in size and can be loaded faster by the engine. Follow the &#039;&#039;&#039;[[DDS creation]]&#039;&#039;&#039; guide to learn how to create the DDS files in the correct formats.&lt;br /&gt;
&lt;br /&gt;
Also, create an editor image out of your diffusemap. The editor image dimension should be 256x256 pixels and the file should be saved in the JPG format. Add the &#039;&#039;&#039;_ed&#039;&#039;&#039; postfix to the filename name (like &amp;lt;code&amp;gt;mytexture_ed.jpg&amp;lt;/code&amp;gt;).&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Most textures don&#039;t need speculars&lt;br /&gt;
* Create DDS for your diffusemap and specularmap.&lt;br /&gt;
* Keep TGA version of your diffusemap and specularmap.&lt;br /&gt;
* Create a TGA version of your normalmap (uncompressed, no RLE).&lt;br /&gt;
* Create a JPG editor image (max. 256px)}}&lt;br /&gt;
== Name your Texture ==&lt;br /&gt;
The following convention should be used for naming all new texture additions to TDM (many existing textures do not follow this convention, and over time effort will be made to update them).  The goal is consistency among material names based on ordered characteristics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Some or all&#039;&#039;&#039; of the following may apply to any given material:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor first (mostly for very specific-use textures) - it&#039;s a window, a door, a chest...&lt;br /&gt;
# &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor next - made from marble, wood, mud...&lt;br /&gt;
# &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor next - it is large, small...&lt;br /&gt;
# &#039;&#039;&#039;Quality&#039;&#039;&#039; descriptors next - texture-wise, it is rough, new, cracked...&lt;br /&gt;
# &#039;&#039;&#039;Color&#039;&#039;&#039; descriptors next - what color is it? red, green...&lt;br /&gt;
# &#039;&#039;&#039;Number Increment&#039;&#039;&#039; next - which of the list is it? 001, 002...&lt;br /&gt;
# &#039;&#039;&#039;Tiling&#039;&#039;&#039; and &#039;&#039;&#039;Image Type&#039;&#039;&#039; descriptors, if needed (file only, not material definition - see below)&lt;br /&gt;
&lt;br /&gt;
If establishing precedent (creating a new &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor, e.g., &amp;quot;huge&amp;quot;), try to avoid ambiguity and unnecessary overlapping with other descriptors (e.g., &amp;quot;enormous&amp;quot;), and set a good example others will follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1.  &#039;&#039;slate_large_cracked_grey_001&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits an &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor, instead starting with the &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor - it is a general, non-specialized texture.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? Some existing materials are named by quality descriptor first (e.g., &#039;cracked_slate...&#039;). This is an inconvenience for the user, because they were looking for a &#039;slate&#039;, not a &#039;cracked&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.  &#039;&#039;door_wood_battered_005&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits a &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor and a &#039;&#039;&#039;Color&#039;&#039;&#039; descriptor.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? In the case of a model name (which this convention also covers), or a specific object type texture like the above, some existing assets are named by quality descriptor first (e.g., &#039;battered_wood...&#039;). This is an inconvenience for the user, because they were looking for a &#039;door&#039;, not a &#039;battered&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be sure to rename all your DDS file extensions to a &#039;&#039;&#039;lowercase&#039;&#039;&#039; &#039;&#039;&#039;.dds&#039;&#039;&#039; (the Compressonator always creates files with uppercase extension, TDM requires them to be lowercase).&lt;br /&gt;
&lt;br /&gt;
If your texture tiles only in one direction, include the phrase &#039;&#039;&#039;tiling_1d&#039;&#039;&#039; at the end of the name.  If your texture does not tile (repeat) at all, add the phrase &#039;&#039;&#039;nontiling&#039;&#039;&#039;. So, a normalmap could be names as &#039;&#039;&#039;concrete_dirt01_tiling1d_local.tga&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Diffusemaps should have no extension to their name.  Normalmaps should have a &#039;&#039;&#039;_local&#039;&#039;&#039; extension at the end of their name.  Specular maps should have a  &#039;&#039;&#039;_s&#039;&#039;&#039; extension, the editor images go with an &#039;&#039;&#039;_ed&#039;&#039;&#039; extension.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Choose descriptive names for your texture, while following TDM convention&lt;br /&gt;
* Add the suffix &#039;&#039;&#039;tiling_1d&#039;&#039;&#039;/&#039;&#039;&#039;nontiling&#039;&#039;&#039; to the filename where appropriate&lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;mytexture.dds&#039;&#039;&#039; (note the &#039;&#039;&#039;lowercase&#039;&#039;&#039;)&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;mytexture_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Editor image: &#039;&#039;&#039;mytexture_ed.jpg&#039;&#039;&#039; (max. 256 pixels in size)&lt;br /&gt;
* (Optional) Specularmap: &#039;&#039;&#039;mytexture_s.dds&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Move the Texture to the right Location ==&lt;br /&gt;
When you upload textures, be sure to upload the files to the right spot. The &#039;&#039;&#039;[[Texture Folder Structure]]&#039;&#039;&#039; can help you finding the right folder for your texture.&lt;br /&gt;
&lt;br /&gt;
The .dds diffuse and specular go in the &#039;&#039;&#039;dds/textures/&#039;&#039;&#039; folder structure.  The .tga normalmap goes in the &#039;&#039;&#039;textures/&#039;&#039;&#039; folder structure. Also, the texture may not render properly unless it&#039;s nested inside &amp;quot;../textures/darkmod/..&amp;quot; and for a custom texture (only for FM use) you should use &amp;quot;../textures/darkmod/your_texture_folder&amp;quot; in both the parent Darkmod folder (for mapping) and the same folder structure inside your pk4 (for release). Note that there is a peculiarity of the Doom 3 engine not being able to load DDS textures that are more than five folders deep. The deepest level allowed would be something along the lines of dds/textures/darkmod/door/metal/. This is something to be watched out for. &lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Move the DDS textures into the &#039;&#039;&#039;dds/textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Move the TGA and JPG files into the &#039;&#039;&#039;textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Don&#039;t save DDS files into folders more than 5 levels deep.}}&lt;br /&gt;
&lt;br /&gt;
== Create your Shader Definition (Material) ==&lt;br /&gt;
Your material entry should be added to the .mtr file that has the same name as the folder your texture is saved in.  For example, the material entry for a texture saved in &#039;&#039;&#039;textures/darkmod/wood/panels&#039;&#039;&#039; should be saved in the .mtr file, &#039;&#039;&#039;tdm_wood_panels.mtr&#039;&#039;&#039;. See also the [[Material File Naming Convention]].&lt;br /&gt;
&lt;br /&gt;
You should name your material entry the same name as your diffuse texture, including the folder path structure (eg, &amp;quot;textures/darkmod/wood/panels/rectangle_oak_face&amp;quot;).  (Do not add .tga or .dds to the end, and also skip the dds/ folder prefix.)&lt;br /&gt;
&lt;br /&gt;
The only exception is when multiple shaders are using the same diffusemap, or when your texture doesn&#039;t tile (or tiles in only one direction).  In the latter case, you would add &#039;&#039;&#039;/nontiling/&#039;&#039;&#039; or &amp;quot;/tiling_1d/&#039;&#039;&#039; to the end of the shader folder (a &#039;virtual&#039; folder, essentially).  &#039;&#039;(The textures used to be separated like that in the actual folder structure, but due to D3&#039;s inability to read .dds files five folders deep, they had to be moved.)&#039;&#039;&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Create your shader in the correct file (tdm_xxx_yyy.mtr) following the [[Material File Naming Convention]]&lt;br /&gt;
* The shader name for tiling textures is the same as the diffusemap&lt;br /&gt;
* Nontiling/tiling_1d textures go into a &amp;quot;virtual&amp;quot; subfolder nontiling/ or tiling_1d/&lt;br /&gt;
* You don&#039;t need to specify file extensions (.dds/.tga/.jpg) to the material defs, this is automatically guessed by the engine.&lt;br /&gt;
* You don&#039;t need the &#039;&#039;&#039;dds/&#039;&#039;&#039; folder prefix to reference the DDS textures.&lt;br /&gt;
* Be sure to include the frob highlight code (see [[Basic Material File#Add_the_Frob_Highlight_Stage|Basic Material File]])&lt;br /&gt;
* You &#039;&#039;&#039;must&#039;&#039;&#039; include Dark Mod&#039;s ambient light stage (see [[Virtual Ambient Light Textures]])}}&lt;br /&gt;
&lt;br /&gt;
== Upload the Textures == &lt;br /&gt;
Once, you have checked your texture in-game (and are pleased with the results), you&#039;ll need to upload the files to our SVN repository. This requires that you have a valid username/password for SVN, which you can request from sparhawk.&lt;br /&gt;
&lt;br /&gt;
The .tga of the diffuse and specular is needed as well in case we ever want to make modifications to the texture or new textures based on the old.  Opening and resaving .dds files results in loss of detail, so all new versions of textures should be made from the .tga files. So, additional to the textures needed for the engine and editor (diffuse/normal/specular/editorimage) you&#039;re encouraged to upload the uncompressed textures to the hires repository.&lt;br /&gt;
&lt;br /&gt;
The hires repository is located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/darkmod_hires/trunk/tga_backup/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;. As only diffuse/speculars are compressed in DDS format, these are the only two that need to be uploaded in TGA format. The TGA files should be named just like the DDS versions and should be located in the analogous folder than they are in the main repository, but below the tga_backup/ folder. For instance tga_backup/textures/darkmod/stone/etc. &lt;br /&gt;
&lt;br /&gt;
The hires TGA can be RLE-compressed to save some space, but this is not too important. Uncompressed TGAs are only important for the textures used by the engine itself.&lt;br /&gt;
&lt;br /&gt;
As last part, it would be nice to have the actual working versions (Photoshop/Gimp source files) stored on the server too. This is of course a large upload, but having the source files is very valuable. For this purpose, there is another repository &#039;&#039;&#039;texture_src&#039;&#039;&#039; installed at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/texture_src/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Upload the diffuse, normal, (specular,) and editor image to the regular darkmod SVN.&lt;br /&gt;
* Upload the (RLE-compressed) TGA diffusemap and specularmap to the darkmod_hires SVN repository (into the &#039;&#039;&#039;tga_backup&#039;&#039;&#039; subfolder).&lt;br /&gt;
* Upload the working source file (PSD/Gimp) to the &#039;&#039;&#039;texture_src&#039;&#039;&#039; repository.}}&lt;br /&gt;
{{tutorial-textures}}&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18398</id>
		<title>How to add Textures to The Dark Mod</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18398"/>
		<updated>2016-05-21T08:57:20Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Move the Texture to the right Location */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Create your texture ==&lt;br /&gt;
This is mostly artwork. Be sure to start off with useful raw material with a reasonably high resolution.  Where possible, work from photo-references. A basic guide can be found here: [[Texture Creation - Basic Tutorial]].&lt;br /&gt;
&lt;br /&gt;
A few things to remember:  Make sure your texture dimensions are a power of 2 (eg, 128, 256, 512, 1024, etc).  Other common mistakes can be found here:  [[Common Texture Mistakes]]&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Use good source material&lt;br /&gt;
* All image dimensions must be powers of two: 64, 128, 256, 512, 1024 (don&#039;t go beyond 1024).&lt;br /&gt;
* Avoid lighting baked into the diffusemap&lt;br /&gt;
* Keep your PSD/Gimp working version safe!}}&lt;br /&gt;
== Save your Texture in the correct Format == &lt;br /&gt;
Save the diffusemap, the normalmap and an optional specularmap to a TGA file. The &#039;&#039;&#039;[[Texture Guidelines]]&#039;&#039;&#039; will help you choosing the correct resolution. A TGA version of your diffusemap is supposed to be uploaded to our hi-res repository for future reference (see below).&lt;br /&gt;
&lt;br /&gt;
Once your TGA file is saved, you will have to create DDS files for the diffuse and specular (not the normalmap) as well. These are smaller in size and can be loaded faster by the engine. Follow the &#039;&#039;&#039;[[DDS creation]]&#039;&#039;&#039; guide to learn how to create the DDS files in the correct formats.&lt;br /&gt;
&lt;br /&gt;
Also, create an editor image out of your diffusemap. The editor image dimension should be 256x256 pixels and the file should be saved in the JPG format. Add the &#039;&#039;&#039;_ed&#039;&#039;&#039; postfix to the filename name (like &amp;lt;code&amp;gt;mytexture_ed.jpg&amp;lt;/code&amp;gt;).&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Most textures don&#039;t need speculars&lt;br /&gt;
* Create DDS for your diffusemap and specularmap.&lt;br /&gt;
* Keep TGA version of your diffusemap and specularmap.&lt;br /&gt;
* Create a TGA version of your normalmap (uncompressed, no RLE).&lt;br /&gt;
* Create a JPG editor image (max. 256px)}}&lt;br /&gt;
== Name your Texture ==&lt;br /&gt;
The following convention should be used for naming all new texture additions to TDM (many existing textures do not follow this convention, and over time effort will be made to update them).  The goal is consistency among material names based on ordered characteristics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Some or all&#039;&#039;&#039; of the following may apply to any given material:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor first (mostly for very specific-use textures) - it&#039;s a window, a door, a chest...&lt;br /&gt;
# &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor next - made from marble, wood, mud...&lt;br /&gt;
# &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor next - it is large, small...&lt;br /&gt;
# &#039;&#039;&#039;Quality&#039;&#039;&#039; descriptors next - texture-wise, it is rough, new, cracked...&lt;br /&gt;
# &#039;&#039;&#039;Color&#039;&#039;&#039; descriptors next - what color is it? red, green...&lt;br /&gt;
# &#039;&#039;&#039;Number Increment&#039;&#039;&#039; next - which of the list is it? 001, 002...&lt;br /&gt;
# &#039;&#039;&#039;Tiling&#039;&#039;&#039; and &#039;&#039;&#039;Image Type&#039;&#039;&#039; descriptors, if needed (file only, not material definition - see below)&lt;br /&gt;
&lt;br /&gt;
If establishing precedent (creating a new &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor, e.g., &amp;quot;huge&amp;quot;), try to avoid ambiguity and unnecessary overlapping with other descriptors (e.g., &amp;quot;enormous&amp;quot;), and set a good example others will follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1.  &#039;&#039;slate_large_cracked_grey_001&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits an &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor, instead starting with the &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor - it is a general, non-specialized texture.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? Some existing materials are named by quality descriptor first (e.g., &#039;cracked_slate...&#039;). This is an inconvenience for the user, because they were looking for a &#039;slate&#039;, not a &#039;cracked&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.  &#039;&#039;door_wood_battered_005&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits a &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor and a &#039;&#039;&#039;Color&#039;&#039;&#039; descriptor.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? In the case of a model name (which this convention also covers), or a specific object type texture like the above, some existing assets are named by quality descriptor first (e.g., &#039;battered_wood...&#039;). This is an inconvenience for the user, because they were looking for a &#039;door&#039;, not a &#039;battered&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be sure to rename all your DDS file extensions to a &#039;&#039;&#039;lowercase&#039;&#039;&#039; &#039;&#039;&#039;.dds&#039;&#039;&#039; (the Compressonator always creates files with uppercase extension, TDM requires them to be lowercase).&lt;br /&gt;
&lt;br /&gt;
If your texture tiles only in one direction, include the phrase &#039;&#039;&#039;tiling_1d&#039;&#039;&#039; at the end of the name.  If your texture does not tile (repeat) at all, add the phrase &#039;&#039;&#039;nontiling&#039;&#039;&#039;. So, a normalmap could be names as &#039;&#039;&#039;concrete_dirt01_tiling1d_local.tga&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Diffusemaps should have no extension to their name.  Normalmaps should have a &#039;&#039;&#039;_local&#039;&#039;&#039; extension at the end of their name.  Specular maps should have a  &#039;&#039;&#039;_s&#039;&#039;&#039; extension, the editor images go with an &#039;&#039;&#039;_ed&#039;&#039;&#039; extension.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Choose descriptive names for your texture, while following TDM convention&lt;br /&gt;
* Add the suffix &#039;&#039;&#039;tiling_1d&#039;&#039;&#039;/&#039;&#039;&#039;nontiling&#039;&#039;&#039; to the filename where appropriate&lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;mytexture.dds&#039;&#039;&#039; (note the &#039;&#039;&#039;lowercase&#039;&#039;&#039;)&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;mytexture_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Editor image: &#039;&#039;&#039;mytexture_ed.jpg&#039;&#039;&#039; (max. 256 pixels in size)&lt;br /&gt;
* (Optional) Specularmap: &#039;&#039;&#039;mytexture_s.dds&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Move the Texture to the right Location ==&lt;br /&gt;
When you upload textures, be sure to upload the files to the right spot. The &#039;&#039;&#039;[[Texture Folder Structure]]&#039;&#039;&#039; can help you finding the right folder for your texture.&lt;br /&gt;
&lt;br /&gt;
The .dds diffuse and specular go in the &#039;&#039;&#039;dds/textures/&#039;&#039;&#039; folder structure.  The .tga normalmap goes in the &#039;&#039;&#039;textures/&#039;&#039;&#039; folder structure. Also, the texture may not render properly unless it&#039;s nested inside &amp;quot;../textures/darkmod/..&amp;quot; and for a custom texture (only for FM use) you should have &amp;quot;../textures/darkmod/your_texture_folder&amp;quot; in both the parent Darkmod folder (for mapping) and the same folder structure inside your pk4 (for release). Note that there is a peculiarity of the Doom 3 engine not being able to load DDS textures that are more than five folders deep. The deepest level allowed would be something along the lines of dds/textures/darkmod/door/metal/. This is something to be watched out for. &lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Move the DDS textures into the &#039;&#039;&#039;dds/textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Move the TGA and JPG files into the &#039;&#039;&#039;textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Don&#039;t save DDS files into folders more than 5 levels deep.}}&lt;br /&gt;
&lt;br /&gt;
== Create your Shader Definition (Material) ==&lt;br /&gt;
Your material entry should be added to the .mtr file that has the same name as the folder your texture is saved in.  For example, the material entry for a texture saved in &#039;&#039;&#039;textures/darkmod/wood/panels&#039;&#039;&#039; should be saved in the .mtr file, &#039;&#039;&#039;tdm_wood_panels.mtr&#039;&#039;&#039;. See also the [[Material File Naming Convention]].&lt;br /&gt;
&lt;br /&gt;
You should name your material entry the same name as your diffuse texture, including the folder path structure (eg, &amp;quot;textures/darkmod/wood/panels/rectangle_oak_face&amp;quot;).  (Do not add .tga or .dds to the end, and also skip the dds/ folder prefix.)&lt;br /&gt;
&lt;br /&gt;
The only exception is when multiple shaders are using the same diffusemap, or when your texture doesn&#039;t tile (or tiles in only one direction).  In the latter case, you would add &#039;&#039;&#039;/nontiling/&#039;&#039;&#039; or &amp;quot;/tiling_1d/&#039;&#039;&#039; to the end of the shader folder (a &#039;virtual&#039; folder, essentially).  &#039;&#039;(The textures used to be separated like that in the actual folder structure, but due to D3&#039;s inability to read .dds files five folders deep, they had to be moved.)&#039;&#039;&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Create your shader in the correct file (tdm_xxx_yyy.mtr) following the [[Material File Naming Convention]]&lt;br /&gt;
* The shader name for tiling textures is the same as the diffusemap&lt;br /&gt;
* Nontiling/tiling_1d textures go into a &amp;quot;virtual&amp;quot; subfolder nontiling/ or tiling_1d/&lt;br /&gt;
* You don&#039;t need to specify file extensions (.dds/.tga/.jpg) to the material defs, this is automatically guessed by the engine.&lt;br /&gt;
* You don&#039;t need the &#039;&#039;&#039;dds/&#039;&#039;&#039; folder prefix to reference the DDS textures.&lt;br /&gt;
* Be sure to include the frob highlight code (see [[Basic Material File#Add_the_Frob_Highlight_Stage|Basic Material File]])&lt;br /&gt;
* You &#039;&#039;&#039;must&#039;&#039;&#039; include Dark Mod&#039;s ambient light stage (see [[Virtual Ambient Light Textures]])}}&lt;br /&gt;
&lt;br /&gt;
== Upload the Textures == &lt;br /&gt;
Once, you have checked your texture in-game (and are pleased with the results), you&#039;ll need to upload the files to our SVN repository. This requires that you have a valid username/password for SVN, which you can request from sparhawk.&lt;br /&gt;
&lt;br /&gt;
The .tga of the diffuse and specular is needed as well in case we ever want to make modifications to the texture or new textures based on the old.  Opening and resaving .dds files results in loss of detail, so all new versions of textures should be made from the .tga files. So, additional to the textures needed for the engine and editor (diffuse/normal/specular/editorimage) you&#039;re encouraged to upload the uncompressed textures to the hires repository.&lt;br /&gt;
&lt;br /&gt;
The hires repository is located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/darkmod_hires/trunk/tga_backup/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;. As only diffuse/speculars are compressed in DDS format, these are the only two that need to be uploaded in TGA format. The TGA files should be named just like the DDS versions and should be located in the analogous folder than they are in the main repository, but below the tga_backup/ folder. For instance tga_backup/textures/darkmod/stone/etc. &lt;br /&gt;
&lt;br /&gt;
The hires TGA can be RLE-compressed to save some space, but this is not too important. Uncompressed TGAs are only important for the textures used by the engine itself.&lt;br /&gt;
&lt;br /&gt;
As last part, it would be nice to have the actual working versions (Photoshop/Gimp source files) stored on the server too. This is of course a large upload, but having the source files is very valuable. For this purpose, there is another repository &#039;&#039;&#039;texture_src&#039;&#039;&#039; installed at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/texture_src/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Upload the diffuse, normal, (specular,) and editor image to the regular darkmod SVN.&lt;br /&gt;
* Upload the (RLE-compressed) TGA diffusemap and specularmap to the darkmod_hires SVN repository (into the &#039;&#039;&#039;tga_backup&#039;&#039;&#039; subfolder).&lt;br /&gt;
* Upload the working source file (PSD/Gimp) to the &#039;&#039;&#039;texture_src&#039;&#039;&#039; repository.}}&lt;br /&gt;
{{tutorial-textures}}&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Texture_Creation_-_Basic_Tutorial&amp;diff=18397</id>
		<title>Texture Creation - Basic Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Texture_Creation_-_Basic_Tutorial&amp;diff=18397"/>
		<updated>2016-05-21T08:50:55Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Create your material file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{tutorial-textures}} {{Original_Reference|SneaksieDave|3814}}&lt;br /&gt;
A game like this needs a TON of textures. So I wanted to try to learn how to do this mysterious, wonderous, magick...&lt;br /&gt;
&lt;br /&gt;
Erm, well, it&#039;s not magick. Far from it, in fact. This tutorial isn&#039;t for those of you who already know how to do this*, and already know it&#039;s not magick. This tutorial is for the rest of us, those who have been too scared or lazy to even bother asking &amp;quot;how do I?&amp;quot;, like me. (It&#039;s the former, honest!)&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
You can use Gimp or Photoshop on Windows, for Linux you should use Gimp. So you&#039;ll need either of the two programs Gimp/Photoshop and the corresponding set of plugins:&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
* [http://developer.nvidia.com/object/photoshop_dds_plugins.html Nvidia normal map plugin]&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
* [http://code.google.com/p/gimp-normalmap/#Download GIMP normalmap plugin]&lt;br /&gt;
* [http://gimp-texturize.sourceforge.net/download.html GIMP texturize plugin]&lt;br /&gt;
* [http://code.google.com/p/gimp-dds/ Gimp DDS plugin]&lt;br /&gt;
&lt;br /&gt;
If you are using Kubuntu/Ubuntu, you can also install the &amp;lt;code&amp;gt;gimp-texturize&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;gimp-resynthesizer&amp;lt;/code&amp;gt; packages.&lt;br /&gt;
&lt;br /&gt;
To compile Gimp plugins from source, install the following packages and their dependecies:&lt;br /&gt;
&lt;br /&gt;
* libgimp2.0-dev&lt;br /&gt;
* libgtk1.2-dev&lt;br /&gt;
* libglut3-dev (for the DDS plugin)&lt;br /&gt;
&lt;br /&gt;
== Get your source picture ==&lt;br /&gt;
&lt;br /&gt;
This could be anything from a photograph you took, to a free texture download from the internet (see [[Texture Sources]]), to a hand drawn picture, if you&#039;re one of those fortunate enough to possess that skill - though we generally prefer to work from photo-reference when possible.&lt;br /&gt;
&lt;br /&gt;
If you do want to take photos, some tips:&lt;br /&gt;
* try to shoot on an overcast day; the diffuse light will remove most unwanted shadows&lt;br /&gt;
* try to take the photo as perfectly face-on to the surface as you can manage. &lt;br /&gt;
If your end result isn&#039;t perfect, don&#039;t worry, there are ways to fix it (transform-&amp;gt;skew, to name one)&lt;br /&gt;
* Make sure that all parts of your photo you want to use as texture are in focus (e.g. sharp). Unsharp parts cannot be fixed later, at least not without a big quality loss!&lt;br /&gt;
* try to select an area that will be tile-able (if that&#039;s what you want)&lt;br /&gt;
* try to capture a large area such that you&#039;ll have enough to work with, but not so big that your resolution on the final product will suffer&lt;br /&gt;
&lt;br /&gt;
== Create the diffuse map ==&lt;br /&gt;
&lt;br /&gt;
The diffuse map is a tilable (usally) image which gives the color infomation, but does not contain lighting or height information for the texture. It is stored as dds with dxt1 or dxt3 compression for use in Doom 3 and as 24 bit TGA (with or without RLE) for the hires repository.&lt;br /&gt;
&lt;br /&gt;
If your image has lighting baked in (shadows/highlights), you should remove it: [[Remove Shadows in Source Images]].&lt;br /&gt;
&lt;br /&gt;
This is just a basic tutorial for creating textures. For further information about creating Diffusemaps, read [[Advanced Tips for Creating Diffusemaps]].&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
Inspect the source image. If you&#039;re going to tile it, try to find a regular repeating area. This is only to make your job easier. You can tile anything, really, but it depends on how much work you want to give yourself. If you don&#039;t know what I mean here, at the next step you will.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve chosen a rough tile-able area (from here forward I&#039;m going to assume you are doing a tiled texture), crop that area out, and size your image to the desired size ratio. I wouldn&#039;t go lower than 1024 resolution at this stage of the work, or you&#039;ll start losing picture quality quickly. So set it to 2048X1024, or 1024X1024, etc. The reason we need to fix the size ratio (not the final size) at this stage is for the next step.&lt;br /&gt;
&lt;br /&gt;
==== Set the offset ====&lt;br /&gt;
&lt;br /&gt;
Go to Filter-&amp;gt;Other-&amp;gt;Offset. You want to set the horizontal and vertical to be exactly half of your cropped picture&#039;s width and height. That will make the opposite edges of the texture meet each other in the middle of the view, so you can make it really tile-able.&lt;br /&gt;
&lt;br /&gt;
==== Make the seams disappear ====&lt;br /&gt;
See those seams running right down the middle of the pic, vertically and horizontally? You have to make them disappear. Get to know the clone tool. (Google...) There are many other ways to shuffle pixels too, but I&#039;ll leave the specifics up to you. This is usually the hardest, most time consuming step.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve blended the lines away, run the Offset filter again to restore the correct layout of your pic, and save it out in a nice high quality (but not too big to manage) format. This is the &amp;quot;diffuse&amp;quot; image. We&#039;re using 24bit TGA for TDM.&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
Use the &amp;lt;code&amp;gt;texturizer&amp;lt;/code&amp;gt; or the &amp;lt;code&amp;gt;resynthezier&amp;lt;/code&amp;gt; plugin - these are very easy to work with and make manual work almost needless.&lt;br /&gt;
&lt;br /&gt;
== Create a normal map ==&lt;br /&gt;
&lt;br /&gt;
The Normalmap tells the renderer in which direction a corresponding place on the diffusemap is facing, so that it can be shaded according to the present lightsources in the scene. It is stored as uncompressed 24 bit TGA (no RLE!) for use in Doom 3. You will learn the basics about creating Normalmaps here. For further information: [[Normalmaps, How to Make Good Ones]].&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
Now that the diffuse is done, using that same pic, open Filter-&amp;gt;Nvidia Tools-&amp;gt;NormalMapFilter. You&#039;ll probably have to play with the values for a while to get a feel for it, and to get a normal map you are happy with. This is a rough approximation method, by no means as accurate as actually modelling a texture (see [[Wall Texture Tutorial]] or [[Creating Textures with Normals out of Models]]), but it works pretty good in most cases. Basically, it will make light areas &amp;quot;high&amp;quot; and dark areas &amp;quot;low&amp;quot;. Learn how to manipulate color levels in Photoshop, and you&#039;ll be making good normal maps with the Nvidia filter in no time.  Generally, use values of 3 or 4 for simple things like woodgrain or nails.  Values of 12 or higher can be used for more 3d effects.&lt;br /&gt;
&lt;br /&gt;
If you think about it, there are countless ways to adjust the image (in fact, you&#039;re not even restricted to using the diffuse image as the base of the normal map...) to get desired results - inverting colors, brightness and contrast controls, painting over areas, gradients, etc. It&#039;s a &amp;quot;feel&amp;quot; thing, so you&#039;ll have to develop that for yourself. After creating your desired normal map (try not to make it too blurry, or too sharp, or too bumpy - yuck), save it out as you did with the diffuse image, with &amp;quot;_local&amp;quot; appended.&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
This is a rough guide by a non-expert as I (fidcal) do it so at least there is something here. It assumes you have made a temporary greyscale image file saved as say nameGrey.tga with the brighter areas representing the high ground and darker means low as described elsewhere ready to make your make normal map. It assumes you&#039;ve just downloaded Gimp and its Normalmap plugin (ESSENTIAL!), maybe configured it a bit so don&#039;t know much about it but just want a dumb list to follow.&lt;br /&gt;
&lt;br /&gt;
* Open Gimp&lt;br /&gt;
* Gimp consists of separate floating windows with no main window so select the toolbar window &amp;gt;  file menu &amp;gt; and open your greyscale image file.&lt;br /&gt;
* You can enlarge/maximize the window and zoom with the mouse wheel if you want.&lt;br /&gt;
* Menu &amp;gt; filters &amp;gt; map &amp;gt; normalmap&lt;br /&gt;
* On the normal map dialog, Click 3D map preview; it will make more sense then.&lt;br /&gt;
* On the normal map dialog, in the &#039;scale&#039; box there is zero by default which is useless as a default as this seems to be the scale of depth. Enter 50 for a start.&lt;br /&gt;
* On the 3D preview dialog there is a window with a panel in it. Grab the panel with your left mouse button and drag it around. Now you should see a rough 3D impression of your image.&lt;br /&gt;
* If you have no idea what you&#039;re doing (like me) leave the scale at 50 as a reasonable value, otherwise adjust it according to your knowledge. Maybe come back here later if you feel your final result is not deep enough or too deep. Similarly leave the other controls or adjust if you know what you are doing.&lt;br /&gt;
* On the normal map dialog click OK.&lt;br /&gt;
* On Gimp&#039;s image window you should now see your greyscale image has been converted probably blue looking with depressions, eg inverted the heights; that&#039;s OK.&lt;br /&gt;
* Save as name_local.tga in the correct dark mod texture folder where your main texture is.&lt;br /&gt;
* A mini dialog pops up : RLE compression - set this UNchecked, and &#039;origin at bottom left&#039; - leave this checked. Click OK.&lt;br /&gt;
* I had a lot of programs open including Doom so it seemed to hang a long time but eventually saved.&lt;br /&gt;
* You close Gimp by closing that toolbar window so I guess that&#039;s its nearest thing to a main window.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it.&lt;br /&gt;
&lt;br /&gt;
== Create an editor image ==&lt;br /&gt;
As the diffusemap is very large it takes some time loading it into the editor, this is why DarkRadiant/DoomEd support the display of lowres editor images replacements. Just resize the diffusemap down to max. 256 pixels and save it in JPG format, but be sure to attach the &#039;&#039;&#039;_ed&#039;&#039;&#039; suffix.&lt;br /&gt;
&lt;br /&gt;
== Add a specular map ==&lt;br /&gt;
The specularmap tells the renderer how shiny a corresponding place on the diffusemap is. It is stored as dds and its dimensions are typically scaled down to be half as big as those of the diffusemap.&lt;br /&gt;
&lt;br /&gt;
If you want a specular map, the process is even more subjective. There are countless ways in Photoshop to adjust color and light level and even invert everything or parts or mask out areas. Specular maps work as such: Darker is rendered as dull, lighter is rendered as shiny. Get it? Think of the possibilities, and have fun with it. You can get some pretty amazing results with just minutes of work. Save that image out as you did the diffuse, &#039;&#039;&#039;with &amp;quot;_s&amp;quot; appended&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Note that most surface types don&#039;t need a specular map.  Only shiny surfaces, like metal or wet stone, really need one, while wood, cobbles, canvas, leaves, dirt etc. should not have a specular map.&lt;br /&gt;
&lt;br /&gt;
== Create your material file ==&lt;br /&gt;
&lt;br /&gt;
Create a material for the texture (see [[Basic Material File]]). In the materials folder, locate the material file where you texture fits in best. Then add the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
textures/darkmod/your_desired_editor_texture_folder/your_texture_name&lt;br /&gt;
 {&lt;br /&gt;
    // Use one of the predefined surface types like stone, glass, wood&lt;br /&gt;
    stone&lt;br /&gt;
    // or use this:&lt;br /&gt;
    // surfaceType 15&lt;br /&gt;
    // and make the first word in the description below your texture type,&lt;br /&gt;
    // like so:&lt;br /&gt;
    // description   &amp;quot;foliage&amp;quot; (This is a grass texture)&lt;br /&gt;
 &lt;br /&gt;
    description      &amp;quot;Add here a little description of your texture&amp;quot;&lt;br /&gt;
    qer_editorimage  textures/darkmod/your_file_folder/your_texture_name_ed&lt;br /&gt;
 &lt;br /&gt;
    bumpmap          textures/darkmod/your_file_folder/your_texture_name_local&lt;br /&gt;
    diffusemap       textures/darkmod/your_file_folder/your_texture_name&lt;br /&gt;
    specularmap      textures/darkmod/your_file_folder/your_texture_name_s&lt;br /&gt;
 &lt;br /&gt;
    // This is the code required for frob highlighting this texture&lt;br /&gt;
    {&lt;br /&gt;
        if ( parm11 &amp;gt; 0 )&lt;br /&gt;
        blend       gl_dst_color, gl_one&lt;br /&gt;
        map         _white.tga&lt;br /&gt;
        rgb         0.40 * parm11&lt;br /&gt;
    }&lt;br /&gt;
    {&lt;br /&gt;
        if ( parm11 &amp;gt; 0 )&lt;br /&gt;
        blend       add&lt;br /&gt;
        map         textures/darkmod/your_file_folder/your_texture_name&lt;br /&gt;
        rgb         0.15 * parm11&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
        // The following two blocks are required for the ambient shading:&lt;br /&gt;
        // TDM Ambient Method Related&lt;br /&gt;
        {&lt;br /&gt;
                if (global5 == 1)&lt;br /&gt;
                blend add&lt;br /&gt;
                map                             textures/darkmod/your_file_folder/your_texture_name&lt;br /&gt;
                scale                   1, 1&lt;br /&gt;
                red                             global2&lt;br /&gt;
                green                   global3&lt;br /&gt;
                blue                    global4&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Oh, and on Windows, use Wordpad, not Notepad. That&#039;s it. Your new texture should appear in both the editor and in-game.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
So you see, it&#039;s really quite simple:&lt;br /&gt;
* Crop the desired area&lt;br /&gt;
* Make it tileable if necessary&lt;br /&gt;
* Generate a normal map&lt;br /&gt;
* Generate an editor image&lt;br /&gt;
* Create a specular map if you want one&lt;br /&gt;
* Include it in a material file&lt;br /&gt;
* DONE&lt;br /&gt;
&lt;br /&gt;
The most important thing though, is to obey the [[Texture Guidelines]].&lt;br /&gt;
&lt;br /&gt;
== Further Information ==&lt;br /&gt;
&lt;br /&gt;
* [[Common Texture Mistakes]]&lt;br /&gt;
* [[How to add Textures to The Dark Mod]]&lt;br /&gt;
* [[Texture Folder Structure]]&lt;br /&gt;
* [[Basic Material File]]&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
* [http://developer.nvidia.com/object/photoshop_dds_plugins.html nVidia Normal Map PlugIn]&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
* [http://nifelheim.dyndns.org/~cocidius/normalmap/ GIMP normalmap plugin]&lt;br /&gt;
* [http://www.manucornet.net/Informatique/Texturize.php#download GIMP texturize plugin *THIS IS AMAZING*]&lt;br /&gt;
* [http://registry.gimp.org/plugin?id=4816 Gimp DDS plugin]&lt;br /&gt;
&lt;br /&gt;
=== Assorted tutorials ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.doom3world.org/phpbb2/viewtopic.php?t=11893 Doom3World texture tutorials]&lt;br /&gt;
* [http://www.quake3bits.com/htm/tutorials/creating_bumpmaps_from_images.htm Kat&#039;s normal-map making tutorial]&lt;br /&gt;
* [http://www.gimp.org/tutorials/Tileable_Textures/ Quick GIMP tutorial for tileable textures]&lt;br /&gt;
* [http://www.stormvision.net/index.cfm/act/tutorials/tutorial_ID/1 Another tileable texture tutorial]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18396</id>
		<title>How to add Textures to The Dark Mod</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18396"/>
		<updated>2016-05-21T08:28:49Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Move the Texture to the right Location */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Create your texture ==&lt;br /&gt;
This is mostly artwork. Be sure to start off with useful raw material with a reasonably high resolution.  Where possible, work from photo-references. A basic guide can be found here: [[Texture Creation - Basic Tutorial]].&lt;br /&gt;
&lt;br /&gt;
A few things to remember:  Make sure your texture dimensions are a power of 2 (eg, 128, 256, 512, 1024, etc).  Other common mistakes can be found here:  [[Common Texture Mistakes]]&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Use good source material&lt;br /&gt;
* All image dimensions must be powers of two: 64, 128, 256, 512, 1024 (don&#039;t go beyond 1024).&lt;br /&gt;
* Avoid lighting baked into the diffusemap&lt;br /&gt;
* Keep your PSD/Gimp working version safe!}}&lt;br /&gt;
== Save your Texture in the correct Format == &lt;br /&gt;
Save the diffusemap, the normalmap and an optional specularmap to a TGA file. The &#039;&#039;&#039;[[Texture Guidelines]]&#039;&#039;&#039; will help you choosing the correct resolution. A TGA version of your diffusemap is supposed to be uploaded to our hi-res repository for future reference (see below).&lt;br /&gt;
&lt;br /&gt;
Once your TGA file is saved, you will have to create DDS files for the diffuse and specular (not the normalmap) as well. These are smaller in size and can be loaded faster by the engine. Follow the &#039;&#039;&#039;[[DDS creation]]&#039;&#039;&#039; guide to learn how to create the DDS files in the correct formats.&lt;br /&gt;
&lt;br /&gt;
Also, create an editor image out of your diffusemap. The editor image dimension should be 256x256 pixels and the file should be saved in the JPG format. Add the &#039;&#039;&#039;_ed&#039;&#039;&#039; postfix to the filename name (like &amp;lt;code&amp;gt;mytexture_ed.jpg&amp;lt;/code&amp;gt;).&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Most textures don&#039;t need speculars&lt;br /&gt;
* Create DDS for your diffusemap and specularmap.&lt;br /&gt;
* Keep TGA version of your diffusemap and specularmap.&lt;br /&gt;
* Create a TGA version of your normalmap (uncompressed, no RLE).&lt;br /&gt;
* Create a JPG editor image (max. 256px)}}&lt;br /&gt;
== Name your Texture ==&lt;br /&gt;
The following convention should be used for naming all new texture additions to TDM (many existing textures do not follow this convention, and over time effort will be made to update them).  The goal is consistency among material names based on ordered characteristics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Some or all&#039;&#039;&#039; of the following may apply to any given material:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor first (mostly for very specific-use textures) - it&#039;s a window, a door, a chest...&lt;br /&gt;
# &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor next - made from marble, wood, mud...&lt;br /&gt;
# &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor next - it is large, small...&lt;br /&gt;
# &#039;&#039;&#039;Quality&#039;&#039;&#039; descriptors next - texture-wise, it is rough, new, cracked...&lt;br /&gt;
# &#039;&#039;&#039;Color&#039;&#039;&#039; descriptors next - what color is it? red, green...&lt;br /&gt;
# &#039;&#039;&#039;Number Increment&#039;&#039;&#039; next - which of the list is it? 001, 002...&lt;br /&gt;
# &#039;&#039;&#039;Tiling&#039;&#039;&#039; and &#039;&#039;&#039;Image Type&#039;&#039;&#039; descriptors, if needed (file only, not material definition - see below)&lt;br /&gt;
&lt;br /&gt;
If establishing precedent (creating a new &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor, e.g., &amp;quot;huge&amp;quot;), try to avoid ambiguity and unnecessary overlapping with other descriptors (e.g., &amp;quot;enormous&amp;quot;), and set a good example others will follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1.  &#039;&#039;slate_large_cracked_grey_001&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits an &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor, instead starting with the &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor - it is a general, non-specialized texture.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? Some existing materials are named by quality descriptor first (e.g., &#039;cracked_slate...&#039;). This is an inconvenience for the user, because they were looking for a &#039;slate&#039;, not a &#039;cracked&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.  &#039;&#039;door_wood_battered_005&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits a &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor and a &#039;&#039;&#039;Color&#039;&#039;&#039; descriptor.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? In the case of a model name (which this convention also covers), or a specific object type texture like the above, some existing assets are named by quality descriptor first (e.g., &#039;battered_wood...&#039;). This is an inconvenience for the user, because they were looking for a &#039;door&#039;, not a &#039;battered&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be sure to rename all your DDS file extensions to a &#039;&#039;&#039;lowercase&#039;&#039;&#039; &#039;&#039;&#039;.dds&#039;&#039;&#039; (the Compressonator always creates files with uppercase extension, TDM requires them to be lowercase).&lt;br /&gt;
&lt;br /&gt;
If your texture tiles only in one direction, include the phrase &#039;&#039;&#039;tiling_1d&#039;&#039;&#039; at the end of the name.  If your texture does not tile (repeat) at all, add the phrase &#039;&#039;&#039;nontiling&#039;&#039;&#039;. So, a normalmap could be names as &#039;&#039;&#039;concrete_dirt01_tiling1d_local.tga&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Diffusemaps should have no extension to their name.  Normalmaps should have a &#039;&#039;&#039;_local&#039;&#039;&#039; extension at the end of their name.  Specular maps should have a  &#039;&#039;&#039;_s&#039;&#039;&#039; extension, the editor images go with an &#039;&#039;&#039;_ed&#039;&#039;&#039; extension.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Choose descriptive names for your texture, while following TDM convention&lt;br /&gt;
* Add the suffix &#039;&#039;&#039;tiling_1d&#039;&#039;&#039;/&#039;&#039;&#039;nontiling&#039;&#039;&#039; to the filename where appropriate&lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;mytexture.dds&#039;&#039;&#039; (note the &#039;&#039;&#039;lowercase&#039;&#039;&#039;)&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;mytexture_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Editor image: &#039;&#039;&#039;mytexture_ed.jpg&#039;&#039;&#039; (max. 256 pixels in size)&lt;br /&gt;
* (Optional) Specularmap: &#039;&#039;&#039;mytexture_s.dds&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Move the Texture to the right Location ==&lt;br /&gt;
When you upload textures, be sure to upload the files to the right spot. The &#039;&#039;&#039;[[Texture Folder Structure]]&#039;&#039;&#039; can help you finding the right folder for your texture.&lt;br /&gt;
&lt;br /&gt;
The .dds diffuse and specular go in the &#039;&#039;&#039;dds/textures/&#039;&#039;&#039; folder structure.  The .tga normalmap goes in the &#039;&#039;&#039;textures/&#039;&#039;&#039; folder structure. Also, the texture may not render properly unless it&#039;s nested inside &amp;quot;../textures/darkmod/&amp;quot; and for a custom texture (only for FM use) you can have &amp;quot;../textures/darkmod/your_texture_folder&amp;quot; in both the parent Darkmod folder and inside your pk4. Note that there is a peculiarity of the Doom 3 engine not being able to load DDS textures that are more than five folders deep. The deepest level allowed would be something along the lines of dds/textures/darkmod/door/metal/. This is something to be watched out for. &lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Move the DDS textures into the &#039;&#039;&#039;dds/textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Move the TGA and JPG files into the &#039;&#039;&#039;textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Don&#039;t save DDS files into folders more than 5 levels deep.}}&lt;br /&gt;
&lt;br /&gt;
== Create your Shader Definition (Material) ==&lt;br /&gt;
Your material entry should be added to the .mtr file that has the same name as the folder your texture is saved in.  For example, the material entry for a texture saved in &#039;&#039;&#039;textures/darkmod/wood/panels&#039;&#039;&#039; should be saved in the .mtr file, &#039;&#039;&#039;tdm_wood_panels.mtr&#039;&#039;&#039;. See also the [[Material File Naming Convention]].&lt;br /&gt;
&lt;br /&gt;
You should name your material entry the same name as your diffuse texture, including the folder path structure (eg, &amp;quot;textures/darkmod/wood/panels/rectangle_oak_face&amp;quot;).  (Do not add .tga or .dds to the end, and also skip the dds/ folder prefix.)&lt;br /&gt;
&lt;br /&gt;
The only exception is when multiple shaders are using the same diffusemap, or when your texture doesn&#039;t tile (or tiles in only one direction).  In the latter case, you would add &#039;&#039;&#039;/nontiling/&#039;&#039;&#039; or &amp;quot;/tiling_1d/&#039;&#039;&#039; to the end of the shader folder (a &#039;virtual&#039; folder, essentially).  &#039;&#039;(The textures used to be separated like that in the actual folder structure, but due to D3&#039;s inability to read .dds files five folders deep, they had to be moved.)&#039;&#039;&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Create your shader in the correct file (tdm_xxx_yyy.mtr) following the [[Material File Naming Convention]]&lt;br /&gt;
* The shader name for tiling textures is the same as the diffusemap&lt;br /&gt;
* Nontiling/tiling_1d textures go into a &amp;quot;virtual&amp;quot; subfolder nontiling/ or tiling_1d/&lt;br /&gt;
* You don&#039;t need to specify file extensions (.dds/.tga/.jpg) to the material defs, this is automatically guessed by the engine.&lt;br /&gt;
* You don&#039;t need the &#039;&#039;&#039;dds/&#039;&#039;&#039; folder prefix to reference the DDS textures.&lt;br /&gt;
* Be sure to include the frob highlight code (see [[Basic Material File#Add_the_Frob_Highlight_Stage|Basic Material File]])&lt;br /&gt;
* You &#039;&#039;&#039;must&#039;&#039;&#039; include Dark Mod&#039;s ambient light stage (see [[Virtual Ambient Light Textures]])}}&lt;br /&gt;
&lt;br /&gt;
== Upload the Textures == &lt;br /&gt;
Once, you have checked your texture in-game (and are pleased with the results), you&#039;ll need to upload the files to our SVN repository. This requires that you have a valid username/password for SVN, which you can request from sparhawk.&lt;br /&gt;
&lt;br /&gt;
The .tga of the diffuse and specular is needed as well in case we ever want to make modifications to the texture or new textures based on the old.  Opening and resaving .dds files results in loss of detail, so all new versions of textures should be made from the .tga files. So, additional to the textures needed for the engine and editor (diffuse/normal/specular/editorimage) you&#039;re encouraged to upload the uncompressed textures to the hires repository.&lt;br /&gt;
&lt;br /&gt;
The hires repository is located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/darkmod_hires/trunk/tga_backup/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;. As only diffuse/speculars are compressed in DDS format, these are the only two that need to be uploaded in TGA format. The TGA files should be named just like the DDS versions and should be located in the analogous folder than they are in the main repository, but below the tga_backup/ folder. For instance tga_backup/textures/darkmod/stone/etc. &lt;br /&gt;
&lt;br /&gt;
The hires TGA can be RLE-compressed to save some space, but this is not too important. Uncompressed TGAs are only important for the textures used by the engine itself.&lt;br /&gt;
&lt;br /&gt;
As last part, it would be nice to have the actual working versions (Photoshop/Gimp source files) stored on the server too. This is of course a large upload, but having the source files is very valuable. For this purpose, there is another repository &#039;&#039;&#039;texture_src&#039;&#039;&#039; installed at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/texture_src/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Upload the diffuse, normal, (specular,) and editor image to the regular darkmod SVN.&lt;br /&gt;
* Upload the (RLE-compressed) TGA diffusemap and specularmap to the darkmod_hires SVN repository (into the &#039;&#039;&#039;tga_backup&#039;&#039;&#039; subfolder).&lt;br /&gt;
* Upload the working source file (PSD/Gimp) to the &#039;&#039;&#039;texture_src&#039;&#039;&#039; repository.}}&lt;br /&gt;
{{tutorial-textures}}&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18395</id>
		<title>How to add Textures to The Dark Mod</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18395"/>
		<updated>2016-05-21T08:28:11Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Move the Texture to the right Location */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Create your texture ==&lt;br /&gt;
This is mostly artwork. Be sure to start off with useful raw material with a reasonably high resolution.  Where possible, work from photo-references. A basic guide can be found here: [[Texture Creation - Basic Tutorial]].&lt;br /&gt;
&lt;br /&gt;
A few things to remember:  Make sure your texture dimensions are a power of 2 (eg, 128, 256, 512, 1024, etc).  Other common mistakes can be found here:  [[Common Texture Mistakes]]&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Use good source material&lt;br /&gt;
* All image dimensions must be powers of two: 64, 128, 256, 512, 1024 (don&#039;t go beyond 1024).&lt;br /&gt;
* Avoid lighting baked into the diffusemap&lt;br /&gt;
* Keep your PSD/Gimp working version safe!}}&lt;br /&gt;
== Save your Texture in the correct Format == &lt;br /&gt;
Save the diffusemap, the normalmap and an optional specularmap to a TGA file. The &#039;&#039;&#039;[[Texture Guidelines]]&#039;&#039;&#039; will help you choosing the correct resolution. A TGA version of your diffusemap is supposed to be uploaded to our hi-res repository for future reference (see below).&lt;br /&gt;
&lt;br /&gt;
Once your TGA file is saved, you will have to create DDS files for the diffuse and specular (not the normalmap) as well. These are smaller in size and can be loaded faster by the engine. Follow the &#039;&#039;&#039;[[DDS creation]]&#039;&#039;&#039; guide to learn how to create the DDS files in the correct formats.&lt;br /&gt;
&lt;br /&gt;
Also, create an editor image out of your diffusemap. The editor image dimension should be 256x256 pixels and the file should be saved in the JPG format. Add the &#039;&#039;&#039;_ed&#039;&#039;&#039; postfix to the filename name (like &amp;lt;code&amp;gt;mytexture_ed.jpg&amp;lt;/code&amp;gt;).&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Most textures don&#039;t need speculars&lt;br /&gt;
* Create DDS for your diffusemap and specularmap.&lt;br /&gt;
* Keep TGA version of your diffusemap and specularmap.&lt;br /&gt;
* Create a TGA version of your normalmap (uncompressed, no RLE).&lt;br /&gt;
* Create a JPG editor image (max. 256px)}}&lt;br /&gt;
== Name your Texture ==&lt;br /&gt;
The following convention should be used for naming all new texture additions to TDM (many existing textures do not follow this convention, and over time effort will be made to update them).  The goal is consistency among material names based on ordered characteristics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Some or all&#039;&#039;&#039; of the following may apply to any given material:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor first (mostly for very specific-use textures) - it&#039;s a window, a door, a chest...&lt;br /&gt;
# &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor next - made from marble, wood, mud...&lt;br /&gt;
# &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor next - it is large, small...&lt;br /&gt;
# &#039;&#039;&#039;Quality&#039;&#039;&#039; descriptors next - texture-wise, it is rough, new, cracked...&lt;br /&gt;
# &#039;&#039;&#039;Color&#039;&#039;&#039; descriptors next - what color is it? red, green...&lt;br /&gt;
# &#039;&#039;&#039;Number Increment&#039;&#039;&#039; next - which of the list is it? 001, 002...&lt;br /&gt;
# &#039;&#039;&#039;Tiling&#039;&#039;&#039; and &#039;&#039;&#039;Image Type&#039;&#039;&#039; descriptors, if needed (file only, not material definition - see below)&lt;br /&gt;
&lt;br /&gt;
If establishing precedent (creating a new &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor, e.g., &amp;quot;huge&amp;quot;), try to avoid ambiguity and unnecessary overlapping with other descriptors (e.g., &amp;quot;enormous&amp;quot;), and set a good example others will follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1.  &#039;&#039;slate_large_cracked_grey_001&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits an &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor, instead starting with the &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor - it is a general, non-specialized texture.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? Some existing materials are named by quality descriptor first (e.g., &#039;cracked_slate...&#039;). This is an inconvenience for the user, because they were looking for a &#039;slate&#039;, not a &#039;cracked&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.  &#039;&#039;door_wood_battered_005&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits a &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor and a &#039;&#039;&#039;Color&#039;&#039;&#039; descriptor.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? In the case of a model name (which this convention also covers), or a specific object type texture like the above, some existing assets are named by quality descriptor first (e.g., &#039;battered_wood...&#039;). This is an inconvenience for the user, because they were looking for a &#039;door&#039;, not a &#039;battered&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be sure to rename all your DDS file extensions to a &#039;&#039;&#039;lowercase&#039;&#039;&#039; &#039;&#039;&#039;.dds&#039;&#039;&#039; (the Compressonator always creates files with uppercase extension, TDM requires them to be lowercase).&lt;br /&gt;
&lt;br /&gt;
If your texture tiles only in one direction, include the phrase &#039;&#039;&#039;tiling_1d&#039;&#039;&#039; at the end of the name.  If your texture does not tile (repeat) at all, add the phrase &#039;&#039;&#039;nontiling&#039;&#039;&#039;. So, a normalmap could be names as &#039;&#039;&#039;concrete_dirt01_tiling1d_local.tga&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Diffusemaps should have no extension to their name.  Normalmaps should have a &#039;&#039;&#039;_local&#039;&#039;&#039; extension at the end of their name.  Specular maps should have a  &#039;&#039;&#039;_s&#039;&#039;&#039; extension, the editor images go with an &#039;&#039;&#039;_ed&#039;&#039;&#039; extension.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Choose descriptive names for your texture, while following TDM convention&lt;br /&gt;
* Add the suffix &#039;&#039;&#039;tiling_1d&#039;&#039;&#039;/&#039;&#039;&#039;nontiling&#039;&#039;&#039; to the filename where appropriate&lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;mytexture.dds&#039;&#039;&#039; (note the &#039;&#039;&#039;lowercase&#039;&#039;&#039;)&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;mytexture_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Editor image: &#039;&#039;&#039;mytexture_ed.jpg&#039;&#039;&#039; (max. 256 pixels in size)&lt;br /&gt;
* (Optional) Specularmap: &#039;&#039;&#039;mytexture_s.dds&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Move the Texture to the right Location ==&lt;br /&gt;
When you upload textures, be sure to upload the files to the right spot. The &#039;&#039;&#039;[[Texture Folder Structure]]&#039;&#039;&#039; can help you finding the right folder for your texture.&lt;br /&gt;
&lt;br /&gt;
The .dds diffuse and specular go in the &#039;&#039;&#039;dds/textures/&#039;&#039;&#039; folder structure.  The .tga normalmap goes in the &#039;&#039;&#039;textures/&#039;&#039;&#039; folder structure. Also, the texture may not render properly unless it&#039;s nested inside &amp;quot;../textures/darkmod/&amp;quot; and for a custom texture (only for FM use) you can have &amp;quot; &amp;quot;../textures/darkmod/your_texture_folder&amp;quot; in both the parent Darkmod folder and inside your pk4. Note that there is a peculiarity of the Doom 3 engine not being able to load DDS textures that are more than five folders deep. The deepest level allowed would be something along the lines of dds/textures/darkmod/door/metal/. This is something to be watched out for. &lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Move the DDS textures into the &#039;&#039;&#039;dds/textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Move the TGA and JPG files into the &#039;&#039;&#039;textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Don&#039;t save DDS files into folders more than 5 levels deep.}}&lt;br /&gt;
&lt;br /&gt;
== Create your Shader Definition (Material) ==&lt;br /&gt;
Your material entry should be added to the .mtr file that has the same name as the folder your texture is saved in.  For example, the material entry for a texture saved in &#039;&#039;&#039;textures/darkmod/wood/panels&#039;&#039;&#039; should be saved in the .mtr file, &#039;&#039;&#039;tdm_wood_panels.mtr&#039;&#039;&#039;. See also the [[Material File Naming Convention]].&lt;br /&gt;
&lt;br /&gt;
You should name your material entry the same name as your diffuse texture, including the folder path structure (eg, &amp;quot;textures/darkmod/wood/panels/rectangle_oak_face&amp;quot;).  (Do not add .tga or .dds to the end, and also skip the dds/ folder prefix.)&lt;br /&gt;
&lt;br /&gt;
The only exception is when multiple shaders are using the same diffusemap, or when your texture doesn&#039;t tile (or tiles in only one direction).  In the latter case, you would add &#039;&#039;&#039;/nontiling/&#039;&#039;&#039; or &amp;quot;/tiling_1d/&#039;&#039;&#039; to the end of the shader folder (a &#039;virtual&#039; folder, essentially).  &#039;&#039;(The textures used to be separated like that in the actual folder structure, but due to D3&#039;s inability to read .dds files five folders deep, they had to be moved.)&#039;&#039;&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Create your shader in the correct file (tdm_xxx_yyy.mtr) following the [[Material File Naming Convention]]&lt;br /&gt;
* The shader name for tiling textures is the same as the diffusemap&lt;br /&gt;
* Nontiling/tiling_1d textures go into a &amp;quot;virtual&amp;quot; subfolder nontiling/ or tiling_1d/&lt;br /&gt;
* You don&#039;t need to specify file extensions (.dds/.tga/.jpg) to the material defs, this is automatically guessed by the engine.&lt;br /&gt;
* You don&#039;t need the &#039;&#039;&#039;dds/&#039;&#039;&#039; folder prefix to reference the DDS textures.&lt;br /&gt;
* Be sure to include the frob highlight code (see [[Basic Material File#Add_the_Frob_Highlight_Stage|Basic Material File]])&lt;br /&gt;
* You &#039;&#039;&#039;must&#039;&#039;&#039; include Dark Mod&#039;s ambient light stage (see [[Virtual Ambient Light Textures]])}}&lt;br /&gt;
&lt;br /&gt;
== Upload the Textures == &lt;br /&gt;
Once, you have checked your texture in-game (and are pleased with the results), you&#039;ll need to upload the files to our SVN repository. This requires that you have a valid username/password for SVN, which you can request from sparhawk.&lt;br /&gt;
&lt;br /&gt;
The .tga of the diffuse and specular is needed as well in case we ever want to make modifications to the texture or new textures based on the old.  Opening and resaving .dds files results in loss of detail, so all new versions of textures should be made from the .tga files. So, additional to the textures needed for the engine and editor (diffuse/normal/specular/editorimage) you&#039;re encouraged to upload the uncompressed textures to the hires repository.&lt;br /&gt;
&lt;br /&gt;
The hires repository is located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/darkmod_hires/trunk/tga_backup/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;. As only diffuse/speculars are compressed in DDS format, these are the only two that need to be uploaded in TGA format. The TGA files should be named just like the DDS versions and should be located in the analogous folder than they are in the main repository, but below the tga_backup/ folder. For instance tga_backup/textures/darkmod/stone/etc. &lt;br /&gt;
&lt;br /&gt;
The hires TGA can be RLE-compressed to save some space, but this is not too important. Uncompressed TGAs are only important for the textures used by the engine itself.&lt;br /&gt;
&lt;br /&gt;
As last part, it would be nice to have the actual working versions (Photoshop/Gimp source files) stored on the server too. This is of course a large upload, but having the source files is very valuable. For this purpose, there is another repository &#039;&#039;&#039;texture_src&#039;&#039;&#039; installed at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/texture_src/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Upload the diffuse, normal, (specular,) and editor image to the regular darkmod SVN.&lt;br /&gt;
* Upload the (RLE-compressed) TGA diffusemap and specularmap to the darkmod_hires SVN repository (into the &#039;&#039;&#039;tga_backup&#039;&#039;&#039; subfolder).&lt;br /&gt;
* Upload the working source file (PSD/Gimp) to the &#039;&#039;&#039;texture_src&#039;&#039;&#039; repository.}}&lt;br /&gt;
{{tutorial-textures}}&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18394</id>
		<title>How to add Textures to The Dark Mod</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=How_to_add_Textures_to_The_Dark_Mod&amp;diff=18394"/>
		<updated>2016-05-21T08:26:29Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Move the Texture to the right Location */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Create your texture ==&lt;br /&gt;
This is mostly artwork. Be sure to start off with useful raw material with a reasonably high resolution.  Where possible, work from photo-references. A basic guide can be found here: [[Texture Creation - Basic Tutorial]].&lt;br /&gt;
&lt;br /&gt;
A few things to remember:  Make sure your texture dimensions are a power of 2 (eg, 128, 256, 512, 1024, etc).  Other common mistakes can be found here:  [[Common Texture Mistakes]]&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Use good source material&lt;br /&gt;
* All image dimensions must be powers of two: 64, 128, 256, 512, 1024 (don&#039;t go beyond 1024).&lt;br /&gt;
* Avoid lighting baked into the diffusemap&lt;br /&gt;
* Keep your PSD/Gimp working version safe!}}&lt;br /&gt;
== Save your Texture in the correct Format == &lt;br /&gt;
Save the diffusemap, the normalmap and an optional specularmap to a TGA file. The &#039;&#039;&#039;[[Texture Guidelines]]&#039;&#039;&#039; will help you choosing the correct resolution. A TGA version of your diffusemap is supposed to be uploaded to our hi-res repository for future reference (see below).&lt;br /&gt;
&lt;br /&gt;
Once your TGA file is saved, you will have to create DDS files for the diffuse and specular (not the normalmap) as well. These are smaller in size and can be loaded faster by the engine. Follow the &#039;&#039;&#039;[[DDS creation]]&#039;&#039;&#039; guide to learn how to create the DDS files in the correct formats.&lt;br /&gt;
&lt;br /&gt;
Also, create an editor image out of your diffusemap. The editor image dimension should be 256x256 pixels and the file should be saved in the JPG format. Add the &#039;&#039;&#039;_ed&#039;&#039;&#039; postfix to the filename name (like &amp;lt;code&amp;gt;mytexture_ed.jpg&amp;lt;/code&amp;gt;).&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Most textures don&#039;t need speculars&lt;br /&gt;
* Create DDS for your diffusemap and specularmap.&lt;br /&gt;
* Keep TGA version of your diffusemap and specularmap.&lt;br /&gt;
* Create a TGA version of your normalmap (uncompressed, no RLE).&lt;br /&gt;
* Create a JPG editor image (max. 256px)}}&lt;br /&gt;
== Name your Texture ==&lt;br /&gt;
The following convention should be used for naming all new texture additions to TDM (many existing textures do not follow this convention, and over time effort will be made to update them).  The goal is consistency among material names based on ordered characteristics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Some or all&#039;&#039;&#039; of the following may apply to any given material:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor first (mostly for very specific-use textures) - it&#039;s a window, a door, a chest...&lt;br /&gt;
# &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor next - made from marble, wood, mud...&lt;br /&gt;
# &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor next - it is large, small...&lt;br /&gt;
# &#039;&#039;&#039;Quality&#039;&#039;&#039; descriptors next - texture-wise, it is rough, new, cracked...&lt;br /&gt;
# &#039;&#039;&#039;Color&#039;&#039;&#039; descriptors next - what color is it? red, green...&lt;br /&gt;
# &#039;&#039;&#039;Number Increment&#039;&#039;&#039; next - which of the list is it? 001, 002...&lt;br /&gt;
# &#039;&#039;&#039;Tiling&#039;&#039;&#039; and &#039;&#039;&#039;Image Type&#039;&#039;&#039; descriptors, if needed (file only, not material definition - see below)&lt;br /&gt;
&lt;br /&gt;
If establishing precedent (creating a new &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor, e.g., &amp;quot;huge&amp;quot;), try to avoid ambiguity and unnecessary overlapping with other descriptors (e.g., &amp;quot;enormous&amp;quot;), and set a good example others will follow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Examples:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
1.  &#039;&#039;slate_large_cracked_grey_001&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits an &#039;&#039;&#039;Object Type&#039;&#039;&#039; descriptor, instead starting with the &#039;&#039;&#039;Material&#039;&#039;&#039; descriptor - it is a general, non-specialized texture.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? Some existing materials are named by quality descriptor first (e.g., &#039;cracked_slate...&#039;). This is an inconvenience for the user, because they were looking for a &#039;slate&#039;, not a &#039;cracked&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2.  &#039;&#039;door_wood_battered_005&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This name omits a &#039;&#039;&#039;Size&#039;&#039;&#039; descriptor and a &#039;&#039;&#039;Color&#039;&#039;&#039; descriptor.&lt;br /&gt;
&lt;br /&gt;
Why is this preferred? In the case of a model name (which this convention also covers), or a specific object type texture like the above, some existing assets are named by quality descriptor first (e.g., &#039;battered_wood...&#039;). This is an inconvenience for the user, because they were looking for a &#039;door&#039;, not a &#039;battered&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Be sure to rename all your DDS file extensions to a &#039;&#039;&#039;lowercase&#039;&#039;&#039; &#039;&#039;&#039;.dds&#039;&#039;&#039; (the Compressonator always creates files with uppercase extension, TDM requires them to be lowercase).&lt;br /&gt;
&lt;br /&gt;
If your texture tiles only in one direction, include the phrase &#039;&#039;&#039;tiling_1d&#039;&#039;&#039; at the end of the name.  If your texture does not tile (repeat) at all, add the phrase &#039;&#039;&#039;nontiling&#039;&#039;&#039;. So, a normalmap could be names as &#039;&#039;&#039;concrete_dirt01_tiling1d_local.tga&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Diffusemaps should have no extension to their name.  Normalmaps should have a &#039;&#039;&#039;_local&#039;&#039;&#039; extension at the end of their name.  Specular maps should have a  &#039;&#039;&#039;_s&#039;&#039;&#039; extension, the editor images go with an &#039;&#039;&#039;_ed&#039;&#039;&#039; extension.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Choose descriptive names for your texture, while following TDM convention&lt;br /&gt;
* Add the suffix &#039;&#039;&#039;tiling_1d&#039;&#039;&#039;/&#039;&#039;&#039;nontiling&#039;&#039;&#039; to the filename where appropriate&lt;br /&gt;
* Diffusemap: &#039;&#039;&#039;mytexture.dds&#039;&#039;&#039; (note the &#039;&#039;&#039;lowercase&#039;&#039;&#039;)&lt;br /&gt;
* Normalmap: &#039;&#039;&#039;mytexture_local.tga&#039;&#039;&#039;&lt;br /&gt;
* Editor image: &#039;&#039;&#039;mytexture_ed.jpg&#039;&#039;&#039; (max. 256 pixels in size)&lt;br /&gt;
* (Optional) Specularmap: &#039;&#039;&#039;mytexture_s.dds&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== Move the Texture to the right Location ==&lt;br /&gt;
When you upload textures, be sure to upload the files to the right spot. The &#039;&#039;&#039;[[Texture Folder Structure]]&#039;&#039;&#039; can help you finding the right folder for your texture.&lt;br /&gt;
&lt;br /&gt;
The .dds diffuse and specular go in the &#039;&#039;&#039;dds/textures/&#039;&#039;&#039; folder structure.  The .tga normalmap goes in the &#039;&#039;&#039;textures/&#039;&#039;&#039; folder structure. Also, the texture may not render properly unless it&#039;s nested inside &amp;quot;../textures/darkmod/&amp;quot; and for a custom texture you can have &amp;quot; &amp;quot;../textures/darkmod/your_texture_folder&amp;quot;. Note that there is a peculiarity of the Doom 3 engine not being able to load DDS textures that are more than five folders deep. The deepest level allowed would be something along the lines of dds/textures/darkmod/door/metal/. This is something to be watched out for. &lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Move the DDS textures into the &#039;&#039;&#039;dds/textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Move the TGA and JPG files into the &#039;&#039;&#039;textures/...&#039;&#039;&#039; tree.&lt;br /&gt;
* Don&#039;t save DDS files into folders more than 5 levels deep.}}&lt;br /&gt;
&lt;br /&gt;
== Create your Shader Definition (Material) ==&lt;br /&gt;
Your material entry should be added to the .mtr file that has the same name as the folder your texture is saved in.  For example, the material entry for a texture saved in &#039;&#039;&#039;textures/darkmod/wood/panels&#039;&#039;&#039; should be saved in the .mtr file, &#039;&#039;&#039;tdm_wood_panels.mtr&#039;&#039;&#039;. See also the [[Material File Naming Convention]].&lt;br /&gt;
&lt;br /&gt;
You should name your material entry the same name as your diffuse texture, including the folder path structure (eg, &amp;quot;textures/darkmod/wood/panels/rectangle_oak_face&amp;quot;).  (Do not add .tga or .dds to the end, and also skip the dds/ folder prefix.)&lt;br /&gt;
&lt;br /&gt;
The only exception is when multiple shaders are using the same diffusemap, or when your texture doesn&#039;t tile (or tiles in only one direction).  In the latter case, you would add &#039;&#039;&#039;/nontiling/&#039;&#039;&#039; or &amp;quot;/tiling_1d/&#039;&#039;&#039; to the end of the shader folder (a &#039;virtual&#039; folder, essentially).  &#039;&#039;(The textures used to be separated like that in the actual folder structure, but due to D3&#039;s inability to read .dds files five folders deep, they had to be moved.)&#039;&#039;&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Create your shader in the correct file (tdm_xxx_yyy.mtr) following the [[Material File Naming Convention]]&lt;br /&gt;
* The shader name for tiling textures is the same as the diffusemap&lt;br /&gt;
* Nontiling/tiling_1d textures go into a &amp;quot;virtual&amp;quot; subfolder nontiling/ or tiling_1d/&lt;br /&gt;
* You don&#039;t need to specify file extensions (.dds/.tga/.jpg) to the material defs, this is automatically guessed by the engine.&lt;br /&gt;
* You don&#039;t need the &#039;&#039;&#039;dds/&#039;&#039;&#039; folder prefix to reference the DDS textures.&lt;br /&gt;
* Be sure to include the frob highlight code (see [[Basic Material File#Add_the_Frob_Highlight_Stage|Basic Material File]])&lt;br /&gt;
* You &#039;&#039;&#039;must&#039;&#039;&#039; include Dark Mod&#039;s ambient light stage (see [[Virtual Ambient Light Textures]])}}&lt;br /&gt;
&lt;br /&gt;
== Upload the Textures == &lt;br /&gt;
Once, you have checked your texture in-game (and are pleased with the results), you&#039;ll need to upload the files to our SVN repository. This requires that you have a valid username/password for SVN, which you can request from sparhawk.&lt;br /&gt;
&lt;br /&gt;
The .tga of the diffuse and specular is needed as well in case we ever want to make modifications to the texture or new textures based on the old.  Opening and resaving .dds files results in loss of detail, so all new versions of textures should be made from the .tga files. So, additional to the textures needed for the engine and editor (diffuse/normal/specular/editorimage) you&#039;re encouraged to upload the uncompressed textures to the hires repository.&lt;br /&gt;
&lt;br /&gt;
The hires repository is located at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/darkmod_hires/trunk/tga_backup/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;. As only diffuse/speculars are compressed in DDS format, these are the only two that need to be uploaded in TGA format. The TGA files should be named just like the DDS versions and should be located in the analogous folder than they are in the main repository, but below the tga_backup/ folder. For instance tga_backup/textures/darkmod/stone/etc. &lt;br /&gt;
&lt;br /&gt;
The hires TGA can be RLE-compressed to save some space, but this is not too important. Uncompressed TGAs are only important for the textures used by the engine itself.&lt;br /&gt;
&lt;br /&gt;
As last part, it would be nice to have the actual working versions (Photoshop/Gimp source files) stored on the server too. This is of course a large upload, but having the source files is very valuable. For this purpose, there is another repository &#039;&#039;&#039;texture_src&#039;&#039;&#039; installed at &#039;&#039;&#039;&amp;lt;nowiki&amp;gt;https://&amp;lt;InsertDarkmodServerHere&amp;gt;/svn/texture_src/&amp;lt;/nowiki&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
{{Things-To-Remember|&lt;br /&gt;
* Upload the diffuse, normal, (specular,) and editor image to the regular darkmod SVN.&lt;br /&gt;
* Upload the (RLE-compressed) TGA diffusemap and specularmap to the darkmod_hires SVN repository (into the &#039;&#039;&#039;tga_backup&#039;&#039;&#039; subfolder).&lt;br /&gt;
* Upload the working source file (PSD/Gimp) to the &#039;&#039;&#039;texture_src&#039;&#039;&#039; repository.}}&lt;br /&gt;
{{tutorial-textures}}&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Texture_Creation_-_Basic_Tutorial&amp;diff=18393</id>
		<title>Texture Creation - Basic Tutorial</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Texture_Creation_-_Basic_Tutorial&amp;diff=18393"/>
		<updated>2016-05-21T08:21:31Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Create your material file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{tutorial-textures}} {{Original_Reference|SneaksieDave|3814}}&lt;br /&gt;
A game like this needs a TON of textures. So I wanted to try to learn how to do this mysterious, wonderous, magick...&lt;br /&gt;
&lt;br /&gt;
Erm, well, it&#039;s not magick. Far from it, in fact. This tutorial isn&#039;t for those of you who already know how to do this*, and already know it&#039;s not magick. This tutorial is for the rest of us, those who have been too scared or lazy to even bother asking &amp;quot;how do I?&amp;quot;, like me. (It&#039;s the former, honest!)&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
You can use Gimp or Photoshop on Windows, for Linux you should use Gimp. So you&#039;ll need either of the two programs Gimp/Photoshop and the corresponding set of plugins:&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
* [http://developer.nvidia.com/object/photoshop_dds_plugins.html Nvidia normal map plugin]&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
* [http://code.google.com/p/gimp-normalmap/#Download GIMP normalmap plugin]&lt;br /&gt;
* [http://gimp-texturize.sourceforge.net/download.html GIMP texturize plugin]&lt;br /&gt;
* [http://code.google.com/p/gimp-dds/ Gimp DDS plugin]&lt;br /&gt;
&lt;br /&gt;
If you are using Kubuntu/Ubuntu, you can also install the &amp;lt;code&amp;gt;gimp-texturize&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;gimp-resynthesizer&amp;lt;/code&amp;gt; packages.&lt;br /&gt;
&lt;br /&gt;
To compile Gimp plugins from source, install the following packages and their dependecies:&lt;br /&gt;
&lt;br /&gt;
* libgimp2.0-dev&lt;br /&gt;
* libgtk1.2-dev&lt;br /&gt;
* libglut3-dev (for the DDS plugin)&lt;br /&gt;
&lt;br /&gt;
== Get your source picture ==&lt;br /&gt;
&lt;br /&gt;
This could be anything from a photograph you took, to a free texture download from the internet (see [[Texture Sources]]), to a hand drawn picture, if you&#039;re one of those fortunate enough to possess that skill - though we generally prefer to work from photo-reference when possible.&lt;br /&gt;
&lt;br /&gt;
If you do want to take photos, some tips:&lt;br /&gt;
* try to shoot on an overcast day; the diffuse light will remove most unwanted shadows&lt;br /&gt;
* try to take the photo as perfectly face-on to the surface as you can manage. &lt;br /&gt;
If your end result isn&#039;t perfect, don&#039;t worry, there are ways to fix it (transform-&amp;gt;skew, to name one)&lt;br /&gt;
* Make sure that all parts of your photo you want to use as texture are in focus (e.g. sharp). Unsharp parts cannot be fixed later, at least not without a big quality loss!&lt;br /&gt;
* try to select an area that will be tile-able (if that&#039;s what you want)&lt;br /&gt;
* try to capture a large area such that you&#039;ll have enough to work with, but not so big that your resolution on the final product will suffer&lt;br /&gt;
&lt;br /&gt;
== Create the diffuse map ==&lt;br /&gt;
&lt;br /&gt;
The diffuse map is a tilable (usally) image which gives the color infomation, but does not contain lighting or height information for the texture. It is stored as dds with dxt1 or dxt3 compression for use in Doom 3 and as 24 bit TGA (with or without RLE) for the hires repository.&lt;br /&gt;
&lt;br /&gt;
If your image has lighting baked in (shadows/highlights), you should remove it: [[Remove Shadows in Source Images]].&lt;br /&gt;
&lt;br /&gt;
This is just a basic tutorial for creating textures. For further information about creating Diffusemaps, read [[Advanced Tips for Creating Diffusemaps]].&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
Inspect the source image. If you&#039;re going to tile it, try to find a regular repeating area. This is only to make your job easier. You can tile anything, really, but it depends on how much work you want to give yourself. If you don&#039;t know what I mean here, at the next step you will.&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve chosen a rough tile-able area (from here forward I&#039;m going to assume you are doing a tiled texture), crop that area out, and size your image to the desired size ratio. I wouldn&#039;t go lower than 1024 resolution at this stage of the work, or you&#039;ll start losing picture quality quickly. So set it to 2048X1024, or 1024X1024, etc. The reason we need to fix the size ratio (not the final size) at this stage is for the next step.&lt;br /&gt;
&lt;br /&gt;
==== Set the offset ====&lt;br /&gt;
&lt;br /&gt;
Go to Filter-&amp;gt;Other-&amp;gt;Offset. You want to set the horizontal and vertical to be exactly half of your cropped picture&#039;s width and height. That will make the opposite edges of the texture meet each other in the middle of the view, so you can make it really tile-able.&lt;br /&gt;
&lt;br /&gt;
==== Make the seams disappear ====&lt;br /&gt;
See those seams running right down the middle of the pic, vertically and horizontally? You have to make them disappear. Get to know the clone tool. (Google...) There are many other ways to shuffle pixels too, but I&#039;ll leave the specifics up to you. This is usually the hardest, most time consuming step.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve blended the lines away, run the Offset filter again to restore the correct layout of your pic, and save it out in a nice high quality (but not too big to manage) format. This is the &amp;quot;diffuse&amp;quot; image. We&#039;re using 24bit TGA for TDM.&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
Use the &amp;lt;code&amp;gt;texturizer&amp;lt;/code&amp;gt; or the &amp;lt;code&amp;gt;resynthezier&amp;lt;/code&amp;gt; plugin - these are very easy to work with and make manual work almost needless.&lt;br /&gt;
&lt;br /&gt;
== Create a normal map ==&lt;br /&gt;
&lt;br /&gt;
The Normalmap tells the renderer in which direction a corresponding place on the diffusemap is facing, so that it can be shaded according to the present lightsources in the scene. It is stored as uncompressed 24 bit TGA (no RLE!) for use in Doom 3. You will learn the basics about creating Normalmaps here. For further information: [[Normalmaps, How to Make Good Ones]].&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
Now that the diffuse is done, using that same pic, open Filter-&amp;gt;Nvidia Tools-&amp;gt;NormalMapFilter. You&#039;ll probably have to play with the values for a while to get a feel for it, and to get a normal map you are happy with. This is a rough approximation method, by no means as accurate as actually modelling a texture (see [[Wall Texture Tutorial]] or [[Creating Textures with Normals out of Models]]), but it works pretty good in most cases. Basically, it will make light areas &amp;quot;high&amp;quot; and dark areas &amp;quot;low&amp;quot;. Learn how to manipulate color levels in Photoshop, and you&#039;ll be making good normal maps with the Nvidia filter in no time.  Generally, use values of 3 or 4 for simple things like woodgrain or nails.  Values of 12 or higher can be used for more 3d effects.&lt;br /&gt;
&lt;br /&gt;
If you think about it, there are countless ways to adjust the image (in fact, you&#039;re not even restricted to using the diffuse image as the base of the normal map...) to get desired results - inverting colors, brightness and contrast controls, painting over areas, gradients, etc. It&#039;s a &amp;quot;feel&amp;quot; thing, so you&#039;ll have to develop that for yourself. After creating your desired normal map (try not to make it too blurry, or too sharp, or too bumpy - yuck), save it out as you did with the diffuse image, with &amp;quot;_local&amp;quot; appended.&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
This is a rough guide by a non-expert as I (fidcal) do it so at least there is something here. It assumes you have made a temporary greyscale image file saved as say nameGrey.tga with the brighter areas representing the high ground and darker means low as described elsewhere ready to make your make normal map. It assumes you&#039;ve just downloaded Gimp and its Normalmap plugin (ESSENTIAL!), maybe configured it a bit so don&#039;t know much about it but just want a dumb list to follow.&lt;br /&gt;
&lt;br /&gt;
* Open Gimp&lt;br /&gt;
* Gimp consists of separate floating windows with no main window so select the toolbar window &amp;gt;  file menu &amp;gt; and open your greyscale image file.&lt;br /&gt;
* You can enlarge/maximize the window and zoom with the mouse wheel if you want.&lt;br /&gt;
* Menu &amp;gt; filters &amp;gt; map &amp;gt; normalmap&lt;br /&gt;
* On the normal map dialog, Click 3D map preview; it will make more sense then.&lt;br /&gt;
* On the normal map dialog, in the &#039;scale&#039; box there is zero by default which is useless as a default as this seems to be the scale of depth. Enter 50 for a start.&lt;br /&gt;
* On the 3D preview dialog there is a window with a panel in it. Grab the panel with your left mouse button and drag it around. Now you should see a rough 3D impression of your image.&lt;br /&gt;
* If you have no idea what you&#039;re doing (like me) leave the scale at 50 as a reasonable value, otherwise adjust it according to your knowledge. Maybe come back here later if you feel your final result is not deep enough or too deep. Similarly leave the other controls or adjust if you know what you are doing.&lt;br /&gt;
* On the normal map dialog click OK.&lt;br /&gt;
* On Gimp&#039;s image window you should now see your greyscale image has been converted probably blue looking with depressions, eg inverted the heights; that&#039;s OK.&lt;br /&gt;
* Save as name_local.tga in the correct dark mod texture folder where your main texture is.&lt;br /&gt;
* A mini dialog pops up : RLE compression - set this UNchecked, and &#039;origin at bottom left&#039; - leave this checked. Click OK.&lt;br /&gt;
* I had a lot of programs open including Doom so it seemed to hang a long time but eventually saved.&lt;br /&gt;
* You close Gimp by closing that toolbar window so I guess that&#039;s its nearest thing to a main window.&lt;br /&gt;
&lt;br /&gt;
That&#039;s it.&lt;br /&gt;
&lt;br /&gt;
== Create an editor image ==&lt;br /&gt;
As the diffusemap is very large it takes some time loading it into the editor, this is why DarkRadiant/DoomEd support the display of lowres editor images replacements. Just resize the diffusemap down to max. 256 pixels and save it in JPG format, but be sure to attach the &#039;&#039;&#039;_ed&#039;&#039;&#039; suffix.&lt;br /&gt;
&lt;br /&gt;
== Add a specular map ==&lt;br /&gt;
The specularmap tells the renderer how shiny a corresponding place on the diffusemap is. It is stored as dds and its dimensions are typically scaled down to be half as big as those of the diffusemap.&lt;br /&gt;
&lt;br /&gt;
If you want a specular map, the process is even more subjective. There are countless ways in Photoshop to adjust color and light level and even invert everything or parts or mask out areas. Specular maps work as such: Darker is rendered as dull, lighter is rendered as shiny. Get it? Think of the possibilities, and have fun with it. You can get some pretty amazing results with just minutes of work. Save that image out as you did the diffuse, &#039;&#039;&#039;with &amp;quot;_s&amp;quot; appended&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Note that most surface types don&#039;t need a specular map.  Only shiny surfaces, like metal or wet stone, really need one, while wood, cobbles, canvas, leaves, dirt etc. should not have a specular map.&lt;br /&gt;
&lt;br /&gt;
== Create your material file ==&lt;br /&gt;
&lt;br /&gt;
Create a material for the texture (see [[Basic Material File]]). In the materials folder, locate the material file where you texture fits in best. Then add the following:&lt;br /&gt;
&lt;br /&gt;
(Note: My texture didn&#039;t render properly unless I nested it inside &amp;quot;textures/darkmod/your_texture_folder&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
textures/your_desired_editor_texture_folder/your_texture_name&lt;br /&gt;
 {&lt;br /&gt;
    // Use one of the predefined surface types like stone, glass, wood&lt;br /&gt;
    stone&lt;br /&gt;
    // or use this:&lt;br /&gt;
    // surfaceType 15&lt;br /&gt;
    // and make the first word in the description below your texture type,&lt;br /&gt;
    // like so:&lt;br /&gt;
    // description   &amp;quot;foliage&amp;quot; (This is a grass texture)&lt;br /&gt;
 &lt;br /&gt;
    description      &amp;quot;Add here a little description of your texture&amp;quot;&lt;br /&gt;
    qer_editorimage  textures/your_file_folder/your_texture_name_ed&lt;br /&gt;
 &lt;br /&gt;
    bumpmap          textures/your_file_folder/your_texture_name_local&lt;br /&gt;
    diffusemap       textures/your_file_folder/your_texture_name&lt;br /&gt;
    specularmap      textures/your_file_folder/your_texture_name_s&lt;br /&gt;
 &lt;br /&gt;
    // This is the code required for frob highlighting this texture&lt;br /&gt;
    {&lt;br /&gt;
        if ( parm11 &amp;gt; 0 )&lt;br /&gt;
        blend       gl_dst_color, gl_one&lt;br /&gt;
        map         _white.tga&lt;br /&gt;
        rgb         0.40 * parm11&lt;br /&gt;
    }&lt;br /&gt;
    {&lt;br /&gt;
        if ( parm11 &amp;gt; 0 )&lt;br /&gt;
        blend       add&lt;br /&gt;
        map         textures/your_file_folder/your_texture_name&lt;br /&gt;
        rgb         0.15 * parm11&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
        // The following two blocks are required for the ambient shading:&lt;br /&gt;
        // TDM Ambient Method Related&lt;br /&gt;
        {&lt;br /&gt;
                if (global5 == 1)&lt;br /&gt;
                blend add&lt;br /&gt;
                map                             textures/your_file_folder/your_texture_name&lt;br /&gt;
                scale                   1, 1&lt;br /&gt;
                red                             global2&lt;br /&gt;
                green                   global3&lt;br /&gt;
                blue                    global4&lt;br /&gt;
        }&lt;br /&gt;
        {&lt;br /&gt;
                if (global5 == 2)&lt;br /&gt;
                blend add&lt;br /&gt;
                program ambientEnvironment.vfp&lt;br /&gt;
                vertexParm              0               1, 1, 1, 1              // UV Scales for Diffuse and Bump&lt;br /&gt;
                vertexParm              1               1, 1, 1, 1      // (X,Y) UV Scale for specular&lt;br /&gt;
                vertexParm              2               global2, global3, global4, 1&lt;br /&gt;
&lt;br /&gt;
                fragmentMap             0               cubeMap env/gen1&lt;br /&gt;
                fragmentMap             1               textures/your_file_folder/your_texture_name_local                  // Bump&lt;br /&gt;
                fragmentMap             2               textures/your_file_folder/your_texture_name                        // Diffuse&lt;br /&gt;
                fragmentMap             3               _black                  // Specular&lt;br /&gt;
        }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Oh, and on Windows, use Wordpad, not Notepad. That&#039;s it. Your new texture should appear in both the editor and in-game.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
So you see, it&#039;s really quite simple:&lt;br /&gt;
* Crop the desired area&lt;br /&gt;
* Make it tileable if necessary&lt;br /&gt;
* Generate a normal map&lt;br /&gt;
* Generate an editor image&lt;br /&gt;
* Create a specular map if you want one&lt;br /&gt;
* Include it in a material file&lt;br /&gt;
* DONE&lt;br /&gt;
&lt;br /&gt;
The most important thing though, is to obey the [[Texture Guidelines]].&lt;br /&gt;
&lt;br /&gt;
== Further Information ==&lt;br /&gt;
&lt;br /&gt;
* [[Common Texture Mistakes]]&lt;br /&gt;
* [[How to add Textures to The Dark Mod]]&lt;br /&gt;
* [[Texture Folder Structure]]&lt;br /&gt;
* [[Basic Material File]]&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
=== Photoshop ===&lt;br /&gt;
&lt;br /&gt;
* [http://developer.nvidia.com/object/photoshop_dds_plugins.html nVidia Normal Map PlugIn]&lt;br /&gt;
&lt;br /&gt;
=== Gimp ===&lt;br /&gt;
&lt;br /&gt;
* [http://nifelheim.dyndns.org/~cocidius/normalmap/ GIMP normalmap plugin]&lt;br /&gt;
* [http://www.manucornet.net/Informatique/Texturize.php#download GIMP texturize plugin *THIS IS AMAZING*]&lt;br /&gt;
* [http://registry.gimp.org/plugin?id=4816 Gimp DDS plugin]&lt;br /&gt;
&lt;br /&gt;
=== Assorted tutorials ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.doom3world.org/phpbb2/viewtopic.php?t=11893 Doom3World texture tutorials]&lt;br /&gt;
* [http://www.quake3bits.com/htm/tutorials/creating_bumpmaps_from_images.htm Kat&#039;s normal-map making tutorial]&lt;br /&gt;
* [http://www.gimp.org/tutorials/Tileable_Textures/ Quick GIMP tutorial for tileable textures]&lt;br /&gt;
* [http://www.stormvision.net/index.cfm/act/tutorials/tutorial_ID/1 Another tileable texture tutorial]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18362</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18362"/>
		<updated>2016-03-08T10:50:34Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix mentioned above, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. Using the function sys.waitFor( $[speaker_name]); after running the speaker is supposed to automatically wait the duration, but this needs to be tested.  &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $tdm_location_settings_1.setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_1].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. Also be sure to use the right name for the location settings entity. It may not have a &amp;quot;_1&amp;quot; suffix. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;tdm_location_settings_1&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however. You&#039;d just use the speaker property &amp;quot;s_volume&amp;quot; directly, but you&#039;d need to restore it after the override is over if you don&#039;t want the change applying to all sounds.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18357</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18357"/>
		<updated>2016-01-14T04:56:20Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix mentioned above, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $tdm_location_settings_1.setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_1].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. Also be sure to use the right name for the location settings entity. It may not have a &amp;quot;_1&amp;quot; suffix. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;tdm_location_settings_1&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however. You&#039;d just use the speaker property &amp;quot;s_volume&amp;quot; directly, but you&#039;d need to restore it after the override is over if you don&#039;t want the change applying to all sounds.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18356</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18356"/>
		<updated>2016-01-14T04:49:21Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix mentioned above, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $tdm_location_settings_1.setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_1].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. Also be sure to use the right name for the location settings entity. It may not have a &amp;quot;_1&amp;quot; suffix. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;tdm_location_settings_1&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18355</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18355"/>
		<updated>2016-01-14T04:47:51Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix mentioned above, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $tdm_location_settings_1.setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_1].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. Also be sure to use the right name for the location settings entity. It may not have a &amp;quot;_1&amp;quot; suffix. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18354</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18354"/>
		<updated>2016-01-10T08:00:20Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix mentioned above, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18353</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18353"/>
		<updated>2016-01-10T06:33:37Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. If you open the console, it will report that the override ambient is playing. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18352</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18352"/>
		<updated>2016-01-10T06:26:21Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some without, and want to revert to the default fading without looking it up, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default value. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18351</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18351"/>
		<updated>2016-01-10T06:23:30Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, or for reading a book, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. (Volume is not included however.) You can change them dynamically in the same way as override. If you have multiple overrides, some with fading and some withour, and want to just use the default fading, you can enter &amp;quot;-1&amp;quot; as the value of a property and it uses the default 4 second fade transition. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18350</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18350"/>
		<updated>2016-01-10T06:09:34Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name]&amp;quot;); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. You can change them dynamically in the same way as override. &lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18349</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18349"/>
		<updated>2016-01-10T06:07:30Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the ambient sound you registered under that name as an override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name&amp;quot;]); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. You can change them dynamically in the same way as override. &lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18348</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18348"/>
		<updated>2016-01-10T06:02:11Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Shaders */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers or if you use the override system.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name&amp;quot;]); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. You can change them dynamically in the same way as override. &lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18347</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18347"/>
		<updated>2016-01-10T06:00:54Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; property for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override property to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; property dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a property on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name&amp;quot;]); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;[tdm_location_settings1]&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new properties for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These properties are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the location settings entity and only apply to override ambients. You can change them dynamically in the same way as override. &lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18346</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18346"/>
		<updated>2016-01-10T05:56:37Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Override */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; spawnarg for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override spawnarg to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; spawnarg dynamically, calling a script and triggering a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a spawnarg on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name&amp;quot;]); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;tdm_location_settings1&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new spawnargs for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These spawnargs are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the lication settings entity and only apply to override ambients. You can change them dynamically in the same way as override. &lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18345</id>
		<title>Location Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Location_Settings&amp;diff=18345"/>
		<updated>2016-01-10T05:52:48Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Sound Properties */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This article describes how to setup &#039;&#039;&#039;locations&#039;&#039;&#039; (also called &amp;quot;location zones&amp;quot; or &amp;quot;zones&amp;quot;) in your level, and then use these to:&lt;br /&gt;
&lt;br /&gt;
* fade to different ambient &#039;&#039;&#039;light levels&#039;&#039;&#039; for each zone&lt;br /&gt;
* fade between different ambient &#039;&#039;&#039;sounds&#039;&#039;&#039; in each zone&lt;br /&gt;
* run &#039;&#039;&#039;scripts&#039;&#039;&#039; automatically when the player enters or exits a zone&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to use four types of entities in your map: &lt;br /&gt;
&lt;br /&gt;
* a special global entity (e.g. add only one, the position does not matter): &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
* a special global light entity named &#039;&#039;&#039;ambient_world&#039;&#039;&#039; &lt;br /&gt;
* multiple &#039;&#039;&#039;info_location&#039;&#039;&#039; and &#039;&#039;&#039;info_locationseparation&#039;&#039;&#039; entities&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
:Note:  Two alternative ways to get ambient sounds in your map are using speakers ([[Adding ambient Sounds to your Map]]), and using triggers ([[Ambient Sounds - Zone (using triggers)]]).  Speakers are good if you only want your ambient to cover a definite radius and have a very simple setup.  Triggers are basically obsoleted by the method in this tutorial.  The only time you might still want to use a trigger-system is if you want a ambient sound to begin at a place where for some reason you can&#039;t create a portal to mark the zone boundary, but you can still have a trigger brush.  There are some issues with a trigger system, too (f.i. their CPU and memory usage and more importantly they are not failsafe like locations are), that make the method in this tutorial superior.  &lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The atdm:location_settings entity ==&lt;br /&gt;
&lt;br /&gt;
Create a &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity in your blueroom (i.e., a room off to the side the player will never enter) or somewhere else in your map:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; atdm:location_settings&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
&lt;br /&gt;
The location_settings entity takes a few &#039;&#039;default&#039;&#039; spawnargs related to the ambient light settings:&lt;br /&gt;
&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_time&amp;quot;|&amp;quot;ambient_light_fade_time&amp;quot;]]&lt;br /&gt;
* [[Location Settings#&amp;quot;ambient_light_fade_delay&amp;quot;|&amp;quot;ambient_light_fade_delay&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
For their meaning and values, please refer to their sections.&lt;br /&gt;
&lt;br /&gt;
=== update_period ===&lt;br /&gt;
&lt;br /&gt;
The spawnarg &#039;&#039;&#039;update_period&#039;&#039;&#039; specifies the time in seconds between updates. A good value is 0.2, e.g. 5 times per second. That avoids to run the script too often, and still allows seamless transitions.&lt;br /&gt;
&lt;br /&gt;
=== Sound Shaders ===&lt;br /&gt;
&lt;br /&gt;
In the entity&#039;s spawnargs, put the names of all the ambient sounds you want to play in your map.  (This pre-loads the sounds into the speaker so there isn&#039;t a pause when they start playing.)  Put it in one of these property/value forms (without the quote marks):&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_streets&amp;quot; &amp;quot;city_night01_loop_z&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_mansion&amp;quot; &amp;quot;sound/ambient/ambience/mansion_tense01a.ogg&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand spawnarg should have a &amp;quot;snd_&amp;quot; prefix, and any name, but most useful is probably the name of the area it is for.  You&#039;ll use this name again when you place the location markers.  &lt;br /&gt;
&lt;br /&gt;
The right hand value points to the actual sound file that will play.  You can enter either the soundshader name, or the address where the sound file is (but see footnote).  You can see the soundshader names of ambient-ready sounds in the sub-folder &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot;.   You can find the address of the sound files in &amp;quot;Darkmod/sound/ambient/ambience&amp;quot; (remember to start the address with &amp;quot;sound&amp;quot; in the spawnarg).  You can also listen to the sounds at that location.  They are are in .ogg format. But it&#039;s easier to just create a speaker (left-click&amp;gt;speaker) and it will give you a sound directory where can play sound files and find the names. No searching through sound folders outside of DR (thanks to Badcog for that tip).&lt;br /&gt;
&lt;br /&gt;
:Note that it is very easy to add custom ambients with this system.  Just create a folder in your .pk4 (a .zip file renamed to .pk4) and name the folder &amp;quot;sound&amp;quot;, with another folder inside it named after your FM or an abbreviation.  Put your custom sound inside that second folder.  (E.g., I have a custom ambient named Frozen.ogg, and my FM&#039;s name is Patently Dangerous.  So in my .pk4 was &amp;quot;sound/patent/frozen.ogg&amp;quot;.  Note that ambients must be in either .ogg or .wav format. Now in your speaker_zone_ambient, just put the sound&#039;s address in the spawnarg (but see footnote).  In my case, I have &amp;quot;snd_warehouse&amp;quot; &amp;quot;sound/patent/frozen.ogg&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
It is worth noting that one special &amp;quot;sound&amp;quot; is already loaded by default.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;snd_silence&amp;quot; &amp;quot;silence&amp;quot;&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
You can see it if you check &amp;quot;Show Inherited Properties&amp;quot;.  This is the sound you use to turn &amp;quot;off&amp;quot; the ambient sounds playing, so there is silence in the zone.&lt;br /&gt;
&lt;br /&gt;
=== On Shader Names ===&lt;br /&gt;
&lt;br /&gt;
One footnote on the sound shader names. The &#039;&#039;shader tdm_ambient_ambience_zoned.sndshd&#039;&#039; has a special command (&amp;quot;leadin&amp;quot;) for its sounds that begins the ambient with a short pause.  This is to pre-empt a possible *pop* of sound for loud ambients which can occur when the player&#039;s system slows down (and only occasionally, at that), so the player never hears the pop.  (It&#039;s a quirk of how Doom3 does fade-ins; when you start a new sound, you have to rapidly fade it out first, like .001 seconds, then slowly fade back in.  But if the system slows and the ambient starts loud, it might stretch that .001 to something audible.)&lt;br /&gt;
 Edit:Baddcog- These seem to now have been appended with a _z if you look at sound names in speaker dialog.&lt;br /&gt;
&lt;br /&gt;
If you alternatively use the address or the shader name from &amp;quot;Darkmod/sound/tdm_ambient_ambience.sndshd&amp;quot; (which lack the &amp;quot;leadin&amp;quot; property) it will otherwise work fine, but you won&#039;t be protected from that occasional little pop (at least until we find another fix).  For ambients that start quietly or areas that won&#039;t slow the system down, it will probably never even be a problem and the player will never hear it, so using the address is fine, or using the tdm_ambient_ambience shader name if you don&#039;t want the tiny pause for whatever reason.  But if you want to control it, use the tdm_ambient_ambience_zoned name, and for a custom sound, to pre-empt the pop you&#039;ll need to use a custom shader with the &amp;quot;leadin&amp;quot; line.  Use the &amp;quot;Darkmod/sound/tdm_ambient_ambience_zoned.sndshd&amp;quot; as a template to do that, and name the custom shader file something like YourFMsName.sndshd, and put it in the &amp;quot;sound&amp;quot; folder in your .pk4.&lt;br /&gt;
&lt;br /&gt;
=== Sound Properties ===&lt;br /&gt;
&lt;br /&gt;
Regarding properties, the speaker (the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity is a speaker in disguise :) has by default the properties &amp;quot;omni&amp;quot;, &amp;quot;global&amp;quot;, and &amp;quot;looping&amp;quot; already turned on, so that all sounds played are heard everywhere, from no direction, and will loop.  If you change these properties (e.g., for one ambient) the change will apply to all ambients on the speaker.  So you probably don&#039;t want to turn these properties off.  &lt;br /&gt;
&lt;br /&gt;
Another spawnarg worth noting is &amp;quot;s_volume&amp;quot;.  Since the location_settings also acts as a speaker, this will work to change volume (0=full volume, -10=half volume, -60=silence), again globally on all the ambients playing on it.  Unless you have a very good reason for doing so however (e.g., you want all your ambients much louder or quieter) you probably don&#039;t want to use the s_volume spawnarg.  If you want to change the volume of a specific ambient, you can do so on the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity with the &amp;quot;volume&amp;quot; spawnarg as described below (note some of the issues involved with volume changes there as well), not the location_settings entity (or directly in the sound&#039;s soundshader).  &lt;br /&gt;
&lt;br /&gt;
Your entity will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Speaker4.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Sound Override ===&lt;br /&gt;
&lt;br /&gt;
From version 2.04, an &amp;quot;override&amp;quot; spawnarg for sounds has been added to the location settings entity. The purpose is to allow a mapper to easily override the location ambient to play their own sound, such as an ambient when a discovery is made, to build tension, action music when the player is seen, etc., and then return to the location sounds when it&#039;s done. &lt;br /&gt;
&lt;br /&gt;
The default value for &amp;quot;override&amp;quot; is &amp;quot;0&amp;quot;, meaning override is turned off, so the location ambients play as normal. Although it looks boolean, the data type is a string, so it takes any characters. If at any time in-game you dynamically change &amp;quot;override&amp;quot; to any non-zero value (I&#039;ll explain how below), it will override the location ambients to allow you to play your own sound as long as it is non-zero. To turn location ambient sounds back on, you change &amp;quot;override&amp;quot; back to &amp;quot;0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you change &amp;quot;override&amp;quot; to one of the pre-cached sound names (that is, a name with the &amp;quot;snd_&amp;quot; prefix, such as &amp;quot;snd_alert&amp;quot;), then the location system will fade out the location ambient and play the override ambient. The override ambient will continue to play until override is changed back to zero or to another override ambient. This means if you just want to play a one-shot ambient, you need to use a script with a wait function that waits the duration of the ambient then turns override off to restore the location ambient, otherwise it will loop. &lt;br /&gt;
&lt;br /&gt;
If you change the override spawnarg to another value (not a sound name) such as &amp;quot;1&amp;quot;, it will simply turn the system off, allowing the mapper to play a speaker in the silence if they prefer. &lt;br /&gt;
&lt;br /&gt;
There are two basic ways to change the &amp;quot;override&amp;quot; spawnarg dynamically, calling a script and trigerring a target_setKeyVal entity in-game. &lt;br /&gt;
&lt;br /&gt;
1. Script. The script function to change a spawnarg on an entity is $[tdm_location_settings name].setKey( &amp;quot;override&amp;quot;, &amp;quot;[snd_name&amp;quot;]); to turn on an override sound and $[tls_name].setKey( &amp;quot;override&amp;quot;, &amp;quot;0&amp;quot;);  to turn the location ambients back on. Note because it&#039;s a string data type, you need to put zero in quote marks/inverted commas. &lt;br /&gt;
&lt;br /&gt;
2. Target_setKeyVal. At the bottom of the entity list is target_setKeyVal (note it&#039;s not with other target entities). Create one of these entities and have it target the location settings entity (e.g., enter a property/key &amp;quot;target&amp;quot; &amp;quot;tdm_location_settings1&amp;quot;). Now add the property/key &amp;quot;keyval&amp;quot; &amp;quot;override;snd_name&amp;quot; to turn on the override sound. Note you separate the propery and key with a semicolon and no space. Now when you trigger that entity with a trigger brush, button, or anything else, it will change the propery and your override ambient will fade in.  You can have another target_setkeyval entity with &amp;quot;keyval&amp;quot; &amp;quot;override;0&amp;quot; to turn override off and turn the location based ambients back on. &lt;br /&gt;
&lt;br /&gt;
The tdm_location_settings entity has also got new spawnargs for fading behavior. Thus, the mapper can make the override ambient fade in as normal, or have it blast in with no fade-in if they want. These spawnargs are the same &#039;fading&#039; type spawnargs as are on the info_location settings described below, and work in the same way, except they are on the lication settings entity and only apply to override ambients. You can change them dynamically in the same way as override. &lt;br /&gt;
&lt;br /&gt;
You are finished with the ambient sound part now.&lt;br /&gt;
&lt;br /&gt;
== The Ambient Light ==&lt;br /&gt;
&lt;br /&gt;
You need to create an ambient light in your level. This will cover the entire level, and provide a minimum default light for when there is no other light covering a surface:&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;{{RMB}} -&amp;gt; Create light&#039;&#039;&#039;&lt;br /&gt;
# Move the light&#039;s origin to the center of your map, and drag it&#039;s size so that it covers your entire map, and then some more. Remember to increase the size of that light when you build more area into your map!&lt;br /&gt;
# Open the light inspector (default shortcut {{key|L}}) and set the light texture to &#039;&#039;&#039;lights/ambientlightnfo&#039;&#039;&#039;&lt;br /&gt;
# Set the color of the light to a reasonable default, f.i. &amp;quot;8 8 8&amp;quot; This value will be used when a zone has no other ambient light settings&lt;br /&gt;
# Open the entity inspector (default shortcut {{key|N}}) and set the name of the light to &#039;&#039;&#039;ambient_world&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The last step is important!&lt;br /&gt;
&lt;br /&gt;
You are done now with the global ambient light.&lt;br /&gt;
&lt;br /&gt;
== The Location Entities ==&lt;br /&gt;
&lt;br /&gt;
Now you need to set up the location system so the game knows where the zones are, and their boundaries where changes will happen.  A location is basically any area that&#039;s closed in by brushes and marked portals and contains an info_location entity. Unlike a vis-portaled area (which is one area between [[vis_portals]], a.k.a. a &amp;quot;leaf&amp;quot;), a zone can cover more than one portaled area (&amp;quot;leaves&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
As an aside, locations are also used for setting the EAX properties in the area (e.g., the echo-y-ness of a big hall or cave, or the dullness of a small carpeted room).  So you have a good reason to have them even in addition to handling ambient sounds and lights.  &lt;br /&gt;
&lt;br /&gt;
=== info_locationseparator ===&lt;br /&gt;
&lt;br /&gt;
As I suggested above, you have to mark all the portals leading in and out of a zone by hand.  You do this with an entity called a &#039;&#039;&#039;info_locationseparator&#039;&#039;&#039;.  Create one so it touches the portal you want as a boundary.  &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_locationseparator&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t touch a portal with this entity, than it will not register in the game as the boundary to a new zone, and the zone will continue into the area on the other side of the portal.  This happens even if you have a second info_location (described below) on the other side (the game will just pick one and use that for the whole zone).  This can be a good thing because, say you have a mansion with 30 portals inside.  You can cover the whole area inside it by just marking the 2 or 3 portals leading into the mansion area through the doors and open windows, and everything inside that marked area will be counted as one location (just don&#039;t miss marking an exit, or have an un-portaled gap to the outside between brushes, or the location will leak outside.  It has to be hermetically sealed).  &lt;br /&gt;
&lt;br /&gt;
I have read discussion that a door touching a portal marks it as a location boundary, but in my experiments the door did not create a new location and I still had to use a info_locationseparator over the portal to register it as a boundary.  &lt;br /&gt;
&lt;br /&gt;
=== info_location ===&lt;br /&gt;
&lt;br /&gt;
Now, inside the zone you want to have, create an &#039;&#039;&#039;info_location&#039;&#039;&#039; entity:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;{{RMB}} -&amp;gt; Create entity -&amp;gt; Darkmod -&amp;gt; Info -&amp;gt; info_location&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anywhere in the space of the zone is fine.  Name it the name of the zone you want (to make it easy to find when you push {{key|J}}).&lt;br /&gt;
&lt;br /&gt;
== Settings per location/zone ==&lt;br /&gt;
&lt;br /&gt;
On each info_location, you can set multiple spawnargs that adjust the light or sound for that location, as well&lt;br /&gt;
as run scripts. We cover them next:&lt;br /&gt;
&lt;br /&gt;
=== Ambient sound ===&lt;br /&gt;
&lt;br /&gt;
Now create a spawnarg property of &amp;quot;ambient&amp;quot; with the value being the speaker-name of the sound you used in the location_settings entity above (NOT the soundshader name or file name).  For example, &lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;ambient&amp;quot;    &amp;quot;snd_streets&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will send a command to the location_settings (in its speaker capacity) to play the ambient it has registered under &amp;quot;snd_streets&amp;quot; that you entered.  When you enter a new zone, in turn, the new info_location sends a command to the speaker to turn off that ambient and start a new one.  &lt;br /&gt;
&lt;br /&gt;
If you wanted to have no ambient playing in the zone (and turn off any ambient started from another zone), you would use &amp;quot;snd_silence&amp;quot; as the value to command the speaker to turn off.  Also, if you have an info_location with no &amp;quot;ambient&amp;quot; value at all, it will also turn off the ambient (in the present version of this system).  That means if you make a new location but want the same ambient playing in it as the location next to it, you still need to add the ambient name for the already-playing ambient for it to continue playing into the new zone; otherwise it will turn off.  &lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Here are two info_locations on two sides of a portal, with an info_locationseparator touching the portal (more like piercing it), and with each info_location containing the name of the ambient that will play in its respective zone.&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_streets.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Snd_silence.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
That&#039;s basically it.  The ambients will now turn on when you enter a zone and turn off when you enter a new zone, turning on the new ambient in that new zone (unless it&#039;s the same ambient, then it just keeps playing, useful e.g., if you want 2 different EAX but 1 ambient playing).  If you open up the console, you should see a message saying that a new ambient is now playing in your current location, naming the ambient and location.&lt;br /&gt;
&lt;br /&gt;
=== Sound Fading ===&lt;br /&gt;
&lt;br /&gt;
Finally, there are a few other spawnargs on the info_locations that you usually don&#039;t have to worry about (with the possible exception of &amp;quot;volume&amp;quot;), but you can use them if you like, so I will mention them.  They concern the properties of the ambient fading.  Check the &amp;quot;Show Inhereted Properties&amp;quot; to see their default values.  Entering a new value will over-write the default value, but only for that one object.  &lt;br /&gt;
&lt;br /&gt;
[[Image:Info_loc.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
==== fiduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in duration&amp;quot;.  This is the length of time in seconds it takes for the in-coming ambient (the one for this zone) to completely fade-in.  The default value is 4 seconds.  You can, e.g., make the fade last much longer with a larger value.  &lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want your ambient to fade in at all, but start immediately at full volume, change this value to &amp;quot;.001&amp;quot; (NOT zero). &lt;br /&gt;
&lt;br /&gt;
==== foduration ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out duration&amp;quot;.  This is the length of time in seconds it takes for the out-going ambient (the one from the zone you&#039;re leaving) to completely fade-out.  Again, if you want it to cut right off without fading, use a value of &amp;quot;.001&amp;quot;.   &lt;br /&gt;
&lt;br /&gt;
==== fidelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade in Delay&amp;quot;.  You can delay the beginning of the in-coming ambient&#039;s fade-in after you enter the new area.  You might want to do this, for example, if you want the out-going ambient to completely fade out before you begin fading in the new ambient.  So you would set fidelay to the same time as the foduration.  By default it is set to .001 so that there is no delay and the fade in starts immediately.  If the out-going fade-out also starts immediately (which happens by default), then they blend together in a nice transition fade.  &lt;br /&gt;
&lt;br /&gt;
==== fodelay ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out Delay&amp;quot;.  Similarly you can delay the beginning of the out-going ambient&#039;s fade out.  You might want to do this if you wanted the in-coming ambient to completely fade in before you started the fade out of the old ambient.  Then you would set it to fiduration.  Like fidelay, it is set to .001 so there is no delay and the fade out starts immediately.  &lt;br /&gt;
&lt;br /&gt;
==== fovolume ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade out volume&amp;quot;.  This sets the volume to which the out-going ambient fades to.  -60 turns it off, which is the default (0 means no decrease in volume at all).  If you go any higher than -60, than it will leave the old ambient still playing at a lower volume under the new ambient (at least until you enter a 3rd new zone).  Not sure why you&#039;d ever want to do that, so you probably don&#039;t want to change it.  &lt;br /&gt;
&lt;br /&gt;
==== volume ====&lt;br /&gt;
&lt;br /&gt;
This allows the mapper to override the volume of the ambient sound once it has fully faded in, and uses the same decibel scale as the &#039;&#039;&#039;s_volume&#039;&#039;&#039; speaker parameter.  Note, though, that it uses the spanwarg &amp;quot;volume&amp;quot; instead.  I found a decibel-loudness calculator here: http://www.sengpielaudio.com/calculator-levelchange.htm that lets you compute the decibel number for relative loudness.  According to it, &amp;quot;0&amp;quot; is the native volume of the sound (the default), &amp;quot;-60&amp;quot; is silence, &amp;quot;-4&amp;quot; is 3/4 (.75) of the volume, &amp;quot;-10&amp;quot; is half (.5) the volume, &amp;quot;-17&amp;quot; is 0.3 of the volume, and it goes quickly down from there.  &amp;quot;10&amp;quot; is double, but be warned there may be problems with positive numbers (e.g., volume clipping) and you should keep it not far above 0 if at all.  See [[Setting Up Speakers#volume/ s_volume|&amp;quot;Volume / S_Volume&amp;quot;]] &amp;amp; [[Volume Issues]] for more detailed discussion of the volume parameter.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do not override ambient volumes unless strictly necessary&#039;&#039;&#039;. Maps with wildly different ambient volume settings result in a poor experience for players, and limit the ability of the Dark Mod team to respond to volume-related issues by changing default volumes in sound shader declarations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These last two (&#039;&#039;&#039;foduration_2foip&#039;&#039;&#039; and &#039;&#039;&#039;fiduration_2foip&#039;&#039;&#039;) are pretty obscure situations, so you probably don&#039;t need to ever mess with them unless you want to completely get rid of ambient fades (then you can set them to .001 like the other &#039;fade duration&#039; properties).&lt;br /&gt;
&lt;br /&gt;
==== foduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-out duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  This provides a shorter fade-out duration (in seconds) for when the player quickly runs into a 3rd location, such that the 1st and 2nd ambients from areas the player just left are still fading out (hence the 2 fade-outs). But the quickend-fade-out only applies to the 1st ambient fading out. (i.e., not of the ambient you just left, but the one you left just before that -- unless you&#039;re backtracking, then it just fades the prev-prev ambient back in).  Fading out that prev-prev ambient more quickly in turn quickens the time the new fade-in can start (because you can&#039;t have 3 sounds on at the same time on the zone speaker, only 2).  So it in effect reduces the gap of quiet that happens before the newest ambient fully fades-in by enabling it to start its fade-in faster.  The default is 1 second.  &lt;br /&gt;
&lt;br /&gt;
==== fiduration_2foip ====&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Fade-in duration during a &#039;2 Fade-outs in progress&#039; situation&amp;quot;.  Like its counterpart, this sets a shorter duration of a fade-in of a new ambient (in seconds) when you run into a 3rd location, while the ambients from the 1st and 2nd locations are fading out.  Again, because so many ambients are fading out, it can leave a gap of silence for a bit until the new 3rd ambient fades in.  So setting a shorter duration than usual for the newest ambient to fully fade in helps shorten the quiet space.  The default is 2 seconds (as opposed to a normal default fade-in duration of 4 seconds).  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Example of Location with No Fading Transition ====&lt;br /&gt;
&lt;br /&gt;
As mentioned above, if you wanted a set-up that turned off all fades so that the out-going ambient shut directly off and the in-coming ambient turns directly on, you&#039;d change all the duration properties to .001, like the following image.  (Note that this modifies the transition only for entering this one location.  All the other info_locations maintain their default values unless you also change them by hand.)  &lt;br /&gt;
&lt;br /&gt;
[[image: Fade_duration.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
=== Ambient light settings ===&lt;br /&gt;
&lt;br /&gt;
These spawnargs can be set on &#039;&#039;&#039;atdm:info_location&#039;&#039;&#039; entities and apply to the current zone then:&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This spawnarg specifies the ambient light color for this zone. Setting it f.i. to &amp;quot;0.10 0.02 0.02&amp;quot; would fade the ambient light to a slightly reddish color. This can be useful for covering a lava cave. Other examples are slightly blue light for moonlit outsides, greenish cast for caves or underwater areas etc.&lt;br /&gt;
&lt;br /&gt;
If you do not set this on an info_location entity, the default value of the global &amp;quot;ambient_world&amp;quot; entity will be used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notes:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:*You need to set the color values as fractions between 0 and 1, e.g. &#039;&#039;&#039;&amp;quot;0.08 0.08 0.02&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;NOT&#039;&#039;&#039; as integers like so &amp;lt;s&amp;gt;&amp;quot;8 8 2&amp;quot;&amp;lt;/s&amp;gt;, or it will not work.&lt;br /&gt;
&lt;br /&gt;
:*If the color change between two zones is too big, the fading and change can become obvious to the player and spoil the subtlety. This can happen for instance if you zoom from a bluish-lit outside directly to a reddish-glowing cave inside. To help the transition, consider adding an intermidiate zone with a light color that is either in between the two, or a more neutral grey. Making it not possible to look from one zone to the other also helps, this way they player can&#039;t see that f.i. the outside ground suddenly also glows reddish when looking back from the cave entrance to the outside.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_time&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds it will take to fade from the current ambient light color to the one specified for this location. A slower fade means more gradual light changes, so they don&#039;t become too obvious to the player. Use at least 3, better 5 or 7 seconds.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_fade_delay&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
This specifies the time in seconds the fading will be delayed when the player changes location.&lt;br /&gt;
&lt;br /&gt;
Useful to prevent fades toggling back and forth when the player stands in a doorway and goes a nudge forward/backwards. A good value is at least 1 second.&lt;br /&gt;
&lt;br /&gt;
If set to -1, the default time specified at the &#039;&#039;&#039;atdm:location_settings&#039;&#039;&#039; entity will be used.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a factor&#039;&#039;&#039;, all lights in the current area will be summed together and scaled by this value.&lt;br /&gt;
&lt;br /&gt;
If set to a value other than &amp;quot;0 0 0&amp;quot;, the lights in the current zone will be all summed together and then&lt;br /&gt;
added to the current base ambient light. This happens with the frequency of &#039;&#039;&#039;update_period&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The basic effect is that a roaring fire also slightly makes the walls flicker, and extinguishing all lights in a room would decrease the ambient light slightly.&lt;br /&gt;
&lt;br /&gt;
The factor should be set up so that for large and dark rooms (e.g. caves) the dynamic part is small, while for small, bright rooms (white walls) the dynamic part is bigger. Examples are: &amp;quot;0.05 0.05 0.05&amp;quot; and &amp;quot;0.1 0.1 0.1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that setting the dynamic factor to high can result in the player being busted by lights that are turned on in the room even when the player is in the shadow.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dynamic_cap&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Used to cap the dynamic ambient light part. If set to 0, will be ignored, so to have a very very small&lt;br /&gt;
cap, set to &amp;quot;0.01&amp;quot;, e.g. if you want only the red part to be dynamic, set it f.i. &amp;quot;0.15 0.01 0.01&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_falloff&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Possible values are:&lt;br /&gt;
&lt;br /&gt;
* -1 on info_location: use the value from the atdm:location_settings entity&lt;br /&gt;
* 0 - no dynamic falloff&lt;br /&gt;
* 0.5 - small, based on square root of distance&lt;br /&gt;
* 1 - medium, linear dynamic falloff (should be used as it looks best)&lt;br /&gt;
* 2 - high, square of distance based falloff&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ambient_light_dist_scale&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
A factor to scale the distance before applying a dynamic light falloff. Only used then &#039;&#039;&#039;ambient_light_dynamic_falloff&#039;&#039;&#039; is not 0. Good valuesa are around 1.0.&lt;br /&gt;
&lt;br /&gt;
See also the article about [[Dynamic ambient light]].&lt;br /&gt;
&lt;br /&gt;
=== Script calls ===&lt;br /&gt;
&lt;br /&gt;
The next four spawnargs all specify scripts to call when the player enters or exits a zone. Note that the very first zone is also &amp;quot;entered&amp;quot; by the player when the map starts. That means &amp;quot;call_once_on_entry&amp;quot; for the start zone should be called at start-time.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is left by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_once_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Called only once when the zone is entered by the player.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_exit&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player leaves that zone.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;call_on_entry&amp;quot; ====&lt;br /&gt;
&lt;br /&gt;
Always called when the player enters that zone.&lt;br /&gt;
&lt;br /&gt;
==== Example scripts ====&lt;br /&gt;
&lt;br /&gt;
Here is an example script that spawns an object where the &#039;&#039;&#039;info_location&#039;&#039;&#039; entity is for the zone the player just left. You can call this script by setting:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;&amp;quot;call_once_on_exit&amp;quot; &amp;quot;spawn_pear&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
on your info_location entity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void spawn_pear( entity old_zone )&lt;br /&gt;
  {&lt;br /&gt;
  // Get the name of the location that the player just left:&lt;br /&gt;
  string location_name = old_zone.getName();&lt;br /&gt;
  // and display it on the console for debugging&lt;br /&gt;
  sys.print (&amp;quot;Spawning pear after leaving &amp;quot; + location_name + &amp;quot;\n&amp;quot;);&lt;br /&gt;
  // spawn the pear entity&lt;br /&gt;
  entity pear = sys.spawn(&amp;quot;atdm:moveable_food_pear&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // and now get the position of the old location entity:&lt;br /&gt;
  vector origin = old_zone.getOrigin();&lt;br /&gt;
  // finally move the pear to the point of the info_location&lt;br /&gt;
  pear.setOrigin( origin );&lt;br /&gt;
  // so once the player exits this location, ONE pear will spawn and fall down&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example script to turn entities on/off when player enters a location ====&lt;br /&gt;
The basic problem with normal TDM entity work is the difficulty of turning something deliberately and reliably on or off. You never turn something on or off, but instead you send toggles to the entities. Let&#039;s say you have a omni sound (a sound which is heard everywhere) which you need to shut off when the player goes to a certain location. Trigger_multiples trigger targets when the player stands on their volume, which may result in a completely wrong situation depending how long the player stands on the trigger.&lt;br /&gt;
&lt;br /&gt;
Location entity scripting can be of great help in here. This kind of scripting can generally solve any kind of problems where the mapper want something to be switched specifically on and off when the player moves to a specific location. Here is an example, which was used to switch off a global thunder sound when the player moves to a location where the rumbling cannot be heard.&lt;br /&gt;
&lt;br /&gt;
Set up location setting as described above. Put a location separator on the visportal you want to be the point which switches your target on/off. Give the info_location-entity spawnargs &lt;br /&gt;
*call_on_entry yourscript&lt;br /&gt;
*call_on_exit yourscript&lt;br /&gt;
&lt;br /&gt;
Then go and create in your /maps folder a file yourmapname.script. Put in the following data there:&lt;br /&gt;
&lt;br /&gt;
 void yourscript(entity old_zone)&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;script yourscript running..&amp;quot;);&lt;br /&gt;
 sys.trigger( $entity_name );&lt;br /&gt;
 }&lt;br /&gt;
 void main()&lt;br /&gt;
 {&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
*yourscript is the name of your script you call.&lt;br /&gt;
*sys.println is a debug feature which gives the text in console when the script is triggered. You can leave it for testing and remove it before releasing your map.&lt;br /&gt;
*sys.trigger ($entity_name) replace the entity_name with the entity which you want to be triggered.&lt;br /&gt;
&lt;br /&gt;
Now your system works like this: &lt;br /&gt;
*When the player is outside the location everything is normal. Ie sound off, light off, etc.&lt;br /&gt;
*When the player enters the location, entity_name gets triggered once. Ie sound on, light on, etc.&lt;br /&gt;
*When the player leaves the location, entity_name gets triggered again. Ie sound off, light off, etc.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Adding ambient Sounds to your Map]]&lt;br /&gt;
* [[Dynamic ambient light]].&lt;br /&gt;
* [[Ambient Sounds - Zone (using triggers)]]&lt;br /&gt;
* [[Sound File Formats]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-sound}}&lt;br /&gt;
{{editing}}&lt;br /&gt;
{{tutorial-scripting}}&lt;br /&gt;
[[Category:Ambient Light]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Custom_Settings_for_Players&amp;diff=18311</id>
		<title>Custom Settings for Players</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Custom_Settings_for_Players&amp;diff=18311"/>
		<updated>2015-12-02T16:09:37Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Making Hotkeys */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists various settings that users can modify to make their game experience more to their liking.&lt;br /&gt;
&lt;br /&gt;
There are two ways to adjust these settings.  You can find and modify them inside your doomconfig.cfg file, or you can pull down the console ({{key|CTRL}} + {{key|ALT}} + {{key|~}}, always the key under the {{key|ESC}} key) while the game is running and type the value directly into the console.&lt;br /&gt;
&lt;br /&gt;
== Toggles ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;seta in_toggleCrouch&#039;&#039;&#039; If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039;, causes the crouch button to act as a toggle.  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;seta in_toggleRun&#039;&#039;&#039; If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039;, causes the run button to act as a toggle.  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;seta in_alwaysRun&#039;&#039;&#039; If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039;, causes the player to always run. (probably not useful in a stealth game).  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;seta pm_lean_toggle&#039;&#039;&#039;   If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039; causes leaning to work as a toggle.  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Making Hotkeys ==&lt;br /&gt;
&lt;br /&gt;
To set hotkeys for inventory items, add the following line(s) to your doomconfig.cfg file, or type them into the console.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;bind &amp;quot;[button]&amp;quot; &amp;quot;inventory_hotkey [item]&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example, &#039;&#039;&#039;bind &amp;quot;F1&amp;quot; &amp;quot;inventory_hotkey Flashbomb&amp;quot;&#039;&#039;&#039; will automatically select your flashbomb in inventory when you press {{key|F1}}.&lt;br /&gt;
&lt;br /&gt;
Note that you can use the &#039;&#039;&#039;Controls Menu&#039;&#039;&#039; to set a hotkey for the compass, lantern, (under &#039;&#039;&#039;Weapons&#039;&#039;&#039;) and maps (under &#039;&#039;&#039;Other&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
The other inventory objects you may wish to create a hotkey for are:&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Spyglass&amp;quot;&lt;br /&gt;
*&amp;quot;Breath Potion&amp;quot;&lt;br /&gt;
*&amp;quot;Health Potion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can bind the bow zoom to a hot key with:&lt;br /&gt;
bind [button] &amp;quot;toggle g_fov 90 45&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;tdm_frob_weapon_selects_weapon&#039;&#039;&#039;  If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039; weapons are automatically selected when the respective arrows are frobbed.&lt;br /&gt;
* &#039;&#039;&#039;tdm_weapon_next_on_empty&#039;&#039;&#039;  If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039; weapons will automatically cycle to the next weapon when you run out (in other words, after you fire your last water arrow you will immediately equip your fire arrows--generally not a good idea.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;seta tdm_door_auto_open_on_unlock &#039;&#039;&#039;  Default setting makes doors swing open automatically when they are unlocked.  Set to &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039; to make doors stay closed until you frob them.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Disable Bow Zoom&#039;&#039;&#039;  In script/tdm_weapon_arrow.script there is a line &amp;quot;#define ARROW_ZOOMAMOUNT    60&amp;quot;. Changing it to &amp;quot;#define ARROW_ZOOMAMOUNT    90&amp;quot; will disable the bow zoom. If you are using a different fov as 90°, you&#039;ll have to set it to the specific number. To apply this change, extract the file from the pk4 (can be opened like a zip file, as they are zips) and put it in a script folder in your darkmod installation (you have to create said folder). Alter the file there. This file will than override the one in the pk4 (literally).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[Console Useful Controls]]&lt;br /&gt;
&lt;br /&gt;
{{general}}&lt;br /&gt;
[[Category:Gameplay]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Custom_Settings_for_Players&amp;diff=18310</id>
		<title>Custom Settings for Players</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Custom_Settings_for_Players&amp;diff=18310"/>
		<updated>2015-11-27T01:36:25Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Other */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists various settings that users can modify to make their game experience more to their liking.&lt;br /&gt;
&lt;br /&gt;
There are two ways to adjust these settings.  You can find and modify them inside your doomconfig.cfg file, or you can pull down the console ({{key|CTRL}} + {{key|ALT}} + {{key|~}}, always the key under the {{key|ESC}} key) while the game is running and type the value directly into the console.&lt;br /&gt;
&lt;br /&gt;
== Toggles ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;seta in_toggleCrouch&#039;&#039;&#039; If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039;, causes the crouch button to act as a toggle.  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;seta in_toggleRun&#039;&#039;&#039; If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039;, causes the run button to act as a toggle.  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;seta in_alwaysRun&#039;&#039;&#039; If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039;, causes the player to always run. (probably not useful in a stealth game).  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
* &#039;&#039;&#039;seta pm_lean_toggle&#039;&#039;&#039;   If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039; causes leaning to work as a toggle.  Defaults to &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Making Hotkeys ==&lt;br /&gt;
&lt;br /&gt;
To set hotkeys for inventory items, add the following line(s) to your doomconfig.cfg file, or type them into the console.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;bind &amp;quot;[button]&amp;quot; &amp;quot;inventory_hotkey [item]&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example, &#039;&#039;&#039;bind &amp;quot;F1&amp;quot; &amp;quot;inventory_hotkey Flashbomb&amp;quot;&#039;&#039;&#039; will automatically select your flashbomb in inventory when you press {{key|F1}}.&lt;br /&gt;
&lt;br /&gt;
Note that you can use the &#039;&#039;&#039;Controls Menu&#039;&#039;&#039; to set a hotkey for the compass, lantern, (under &#039;&#039;&#039;Weapons&#039;&#039;&#039;) and maps (under &#039;&#039;&#039;Other&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
The other inventory objects you may wish to create a hotkey for are:&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;Spyglass&amp;quot;&lt;br /&gt;
*&amp;quot;Breath Potion&amp;quot;&lt;br /&gt;
*&amp;quot;Health Potion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Other ==&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;tdm_frob_weapon_selects_weapon&#039;&#039;&#039;  If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039; weapons are automatically selected when the respective arrows are frobbed.&lt;br /&gt;
* &#039;&#039;&#039;tdm_weapon_next_on_empty&#039;&#039;&#039;  If set to &#039;&#039;&#039;&amp;quot;1&amp;quot;&#039;&#039;&#039; weapons will automatically cycle to the next weapon when you run out (in other words, after you fire your last water arrow you will immediately equip your fire arrows--generally not a good idea.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;seta tdm_door_auto_open_on_unlock &#039;&#039;&#039;  Default setting makes doors swing open automatically when they are unlocked.  Set to &#039;&#039;&#039;&amp;quot;0&amp;quot;&#039;&#039;&#039; to make doors stay closed until you frob them.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Disable Bow Zoom&#039;&#039;&#039;  In script/tdm_weapon_arrow.script there is a line &amp;quot;#define ARROW_ZOOMAMOUNT    60&amp;quot;. Changing it to &amp;quot;#define ARROW_ZOOMAMOUNT    90&amp;quot; will disable the bow zoom. If you are using a different fov as 90°, you&#039;ll have to set it to the specific number. To apply this change, extract the file from the pk4 (can be opened like a zip file, as they are zips) and put it in a script folder in your darkmod installation (you have to create said folder). Alter the file there. This file will than override the one in the pk4 (literally).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also [[Console Useful Controls]]&lt;br /&gt;
&lt;br /&gt;
{{general}}&lt;br /&gt;
[[Category:Gameplay]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18103</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18103"/>
		<updated>2015-02-10T08:10:18Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Updater (tdm_update.exe) crashes at some point during the update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{important|headline=Important|text=This FAQ relates to the full TDM release version only. For players of the pre-release demos such as &#039;&#039;&#039;[[Thief&#039;s Den]]&#039;&#039;&#039; and &#039;&#039;&#039;[[Saint_Lucia|Tears of Saint Lucia]]&#039;&#039;&#039; please refer to the &#039;&#039;&#039;[[FAQ (Demo Releases)|Demo FAQ]]&#039;&#039;&#039;.&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== What do I need to play The Dark Mod? ==&lt;br /&gt;
&lt;br /&gt;
With the release of TDM 2.0, you no longer need Doom 3 installed.  The Dark Mod is completely standalone (and free!).  You need only follow the installation instructions on the website to start playing the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
=== Which Windows versions can I use? ===&lt;br /&gt;
&lt;br /&gt;
The following versions of windows have been tested and are known to work : Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2008, Windows Server 2003 in both 32bit and 64bit flavours.&lt;br /&gt;
&lt;br /&gt;
==== Windows 8.1 Preview ====&lt;br /&gt;
&lt;br /&gt;
Thus far, on Intel HD graphics, TDM will not start unless it is started in Windows 7 compatibility mode:&lt;br /&gt;
&lt;br /&gt;
Right click &amp;quot;TheDarkMod.exe&amp;quot; choose &amp;quot;Properties&amp;quot;, click the &amp;quot;Compatibility&amp;quot; tab and select Windows 7 from the dropdown&lt;br /&gt;
list.&lt;br /&gt;
&lt;br /&gt;
This may not be representative of other graphic hardware and may be due to early Windows 8.1 driver support.&lt;br /&gt;
&lt;br /&gt;
==== PAE Enabled ====&lt;br /&gt;
&lt;br /&gt;
One user with Windows XP Pro SP3 and an AMD Phenom processor reported problems starting Doom 3 due to having PAE enabled.&lt;br /&gt;
&lt;br /&gt;
[http://modetwo.net/darkmod/index.php?/topic/12471-error-doom-3/ Thread]&lt;br /&gt;
&lt;br /&gt;
=== Does it run in Linux? ===&lt;br /&gt;
Yes, Linux is supported.&lt;br /&gt;
&lt;br /&gt;
=== Does it run in 64 Bit Linux? ===&lt;br /&gt;
Yes, Linux 64 bit is supported. In addition to the steps above, you need 32 bit compatibility libraries, since Doom3 is 32 bit only:&lt;br /&gt;
* On &#039;&#039;&#039;SuSE&#039;&#039;&#039;, they should be included.&lt;br /&gt;
* On Ubuntu/Kubuntu, install the package &#039;&#039;&#039;ia32&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For TDM after 1.0, this step should be &#039;&#039;&#039;no&#039;&#039;&#039; longer neccessary:&lt;br /&gt;
&lt;br /&gt;
* Since you cannot install 32 bit libraries on a 64 bit system with the normal package manager, you should use [http://ubuntuforums.org/showthread.php?t=474790 getlibs] to install &#039;&#039;&#039;libmng&#039;&#039;&#039; and the boost filesystem lib:&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs libmng.so.1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs -l libboost-filesystem1.34.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about Gentoo? ===&lt;br /&gt;
Yes. It&#039;s not &amp;quot;officially&amp;quot; supported (the team doesn&#039;t test it specifically), however several users have reported success running TDM under Gentoo.&lt;br /&gt;
&lt;br /&gt;
=== What about Ubuntu 8.10? ===&lt;br /&gt;
Yes. As of this writing you will need to install the &#039;&#039;&#039;libboost-filesystem&#039;&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== GLIBCXX_3.4.9 errors ===&lt;br /&gt;
&lt;br /&gt;
If you receive an error about &amp;lt;tt&amp;gt;GLIBCXX_3.4.9&amp;lt;/tt&amp;gt;, delete or rename the files &amp;lt;code&amp;gt;/usr/local/games/doom3/libstdc++.so.6&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/usr/local/games/doom3/libgcc_s.so.1.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this doesn&#039;t resolve the error and you have an old version of GCC, then you may have to upgrade. It has been [http://modetwo.net/darkmod/index.php?/topic/9982-the-dark-mod-doom3-in-linux/ confirmed] that, at least under Gentoo, GCC 4.1 does not work with TDM but GCC 4.3 and GCC 4.4 are compatible.&lt;br /&gt;
&lt;br /&gt;
=== Does it run on Mac OS X?===&lt;br /&gt;
TDM 1.08 is supported, but 2.0 is not. See [[Installation]].&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
=== Does TDM support widescreen resolutions? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Choose &amp;quot;16:9&amp;quot; or &amp;quot;16:10&amp;quot; in the in-game &#039;&#039;Settings&#039;&#039; menu, and select the appropriate resolution. Note that you need to restart the game to have the new setting in effect.&lt;br /&gt;
&lt;br /&gt;
If the native resolution of your wide screen monitor is not listed, you can enter it into &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; by changing the following entries like so:&lt;br /&gt;
&lt;br /&gt;
 set r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 set r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
 set r_customheight &amp;quot;800&amp;quot;&lt;br /&gt;
 seta r_aspectratio &amp;quot;2&amp;quot;            // means 16:10, &amp;quot;1&amp;quot; is 16:9, other ratios are not yet supporred&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
==== What about TV resolutions like 1360x768? ====&lt;br /&gt;
&lt;br /&gt;
If you have a wide-screen TV which uses any non-standard resolution, like 1360x768 (instead of 1366x768), then please use the following:&lt;br /&gt;
&lt;br /&gt;
 seta r_customWidth &amp;quot;1360&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;768&amp;quot;&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_aspectratio 2&lt;br /&gt;
 seta g_fov &amp;quot;100&amp;quot;                  // or any other suitable value&lt;br /&gt;
&lt;br /&gt;
Alternatively, see the manual of your TV on the possibility to switch it to a &amp;quot;1:1&amp;quot; pixel mapping, or &amp;quot;monitor mode&amp;quot; or &amp;quot;computer mode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is some background information: http://hd.engadget.com/2006/04/21/whats-the-deal-with-1366-x-768/&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
It is hard to answer questions on why something fails, because wildly different systems cause wildly different symptoms. If the following section does not help you, please ask at our [http://www.modetwo.net/darkmod forums].&lt;br /&gt;
&lt;br /&gt;
For any solutions below that refer to &amp;quot;disabling Catalyst AI&amp;quot;, if you discover you can not use ATI&#039;s tools to do so, alternate methods are discussed in [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t load saved games -- TDM gives error about &amp;quot;can&#039;t load .script&amp;quot; file ===&lt;br /&gt;
&lt;br /&gt;
Make sure your folder is called &amp;quot;darkmod&amp;quot;.  If it isn&#039;t, rename it.  That should make the problem go away.  I&#039;ve heard reports that having spaces in the names of any folders in the path can cause problems, but haven&#039;t confirmed it.  Something to try if it still happens and your folder is already called &amp;quot;darkmod&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) closes almost as soon as it&#039;s started ===&lt;br /&gt;
&lt;br /&gt;
See the [[Tdm_update#Updater_closes_almost_as_soon_as_it.27s_started|main article on tdm_update]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) crashes at some point during the update ===&lt;br /&gt;
&lt;br /&gt;
The Windows update will crash at the &amp;quot;Applying Update&amp;quot; stage if the Darkmod folder is set to &amp;quot;read only&amp;quot;. You fix it by right clicking on the folder, going to folder properties, and unchecking the box that says &amp;quot;read only&amp;quot; under folder attributes.&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000: freeaddrinfo cannot be found in WS2_32.DLL ===&lt;br /&gt;
Please refer to the main article [[TDM in Windows 2000]] to work around this problem.&lt;br /&gt;
&lt;br /&gt;
===FM won&#039;t install manually===&lt;br /&gt;
&lt;br /&gt;
If you are running Dark Mod under Linux and have edited the file darkmod/currentfm.txt this might prevent the FM from installing. This may be fixed in an update but apparently editing using notepad under Wine works OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FMs downloaded but don&#039;t show in menu list===&lt;br /&gt;
&lt;br /&gt;
You have downloaded some FMs but they don&#039;t show on Dark Mod&#039;s New Missions list. Possible causes:&lt;br /&gt;
&lt;br /&gt;
* You must not extract the pk4s or zip files but put them into the darkmod/fms folder (or alternatively you can create the FM folder in there eg, darkmod/fms/chalice for chalice.pk4 or chalice.zip.&lt;br /&gt;
* Early versions of Dark Mod cannot handle zip suffixes. Solution: rename to .pk4 or run tdm_update to get the latest version of Dark Mod.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FM downloaded but won&#039;t play ===&lt;br /&gt;
&lt;br /&gt;
If you have downloaded an FM you might see it in the New Missions List but can&#039;t get it to play. These are almost always an install problem. These are some of the causes and cures:&lt;br /&gt;
&lt;br /&gt;
FMs (fan missions) are archives and in early versions of Dark Mod MUST be suffixed .pk4 not zip. Apparently Internet Explorer 8 may change it from pk4 to zip during download without telling you. You need to rename it back if running an early version of Dark Mod else run tdm_update to update and then zip files are OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You do NOT need to extract the pk4 archives to install or play. Just download into or move the pk4 into the darkmod\fms folder. Optionally you can create a folder of the same name as the map and put it in there, eg, darkmod\fms\chalice but there is no need because Dark Mod will create that automatically. Just make sure your pk4 goes, unopened, into the fms folder, then run TheDarkMod.exe&lt;br /&gt;
&lt;br /&gt;
If you have done the above but see for example, a blank objectives screen and no briefing then it is still almost certainly an install error. I recommend you do a clean sweep if in doubt:&lt;br /&gt;
* Exit Dark Mod&lt;br /&gt;
* Delete darkmod\currentfm.txt (this just uninstalls any FM)&lt;br /&gt;
* Move the pk4 into the darkmod\fms folder if it is not already there.&lt;br /&gt;
* Delete the darkmod\fms\FMname folder if any, eg, darkmod\fms\chalice. Don&#039;t worry if there isn&#039;t one; it will be created automatically later.&lt;br /&gt;
&lt;br /&gt;
So all that is left is the pk4 in the fms folder. Now run TheDarkMod.exe. The FM should be in the list in the New Missions menu. Re-install it and you should now be able to play it.&lt;br /&gt;
&lt;br /&gt;
=== The game hangs at Dark Mod screen/ locks up while turning on vsynch ===&lt;br /&gt;
Catalyst Control Center above 10.8 for ATI cards has a performance slider for V-Synch. Setting that slider to Quality (Always On)&lt;br /&gt;
fixes this issue. If set lower than quality and it is set to on in game it will freeze.&lt;br /&gt;
(tested specifically in CC 10-11)&lt;br /&gt;
&lt;br /&gt;
=== The game crashes on load ===&lt;br /&gt;
Make sure that:&lt;br /&gt;
* Your system meets at least the minimum system specs.&lt;br /&gt;
* You have enough free main memory. Try closing a few running programs like Outlook, Anti-Virus or torrent clients.&lt;br /&gt;
* Nvidia &amp;quot;Threaded Optimizations&amp;quot; are causing Doom 3 Mod stability issues (see: [[#Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;|Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it, you probably receive an error message referencing an &amp;quot;Unknown event&amp;quot; at startup, like the screenshot below illustrates.&lt;br /&gt;
&lt;br /&gt;
[[Image:ErrorSetEntityRelation.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here are a couple of known problems and their solutions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sometimes, the procedure fails due to &#039;&#039;&#039;spaces in the installation path&#039;&#039;&#039;. Try extracting the gamex86.dll manually using Winzip or similar or install Doom 3 in a different directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You have a &#039;&#039;&#039;firewall&#039;&#039;&#039; installed that prevents the copy procedure, because since version 1.03, TDM has a built-in mission downloader. This misbehavior has been reported for the &#039;&#039;&#039;COMODO Firewall&#039;&#039;&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;It is also possible that an &#039;&#039;&#039;old version of gamex86.dll&#039;&#039;&#039; (or gamex86.so) is lying around in your Doom 3 folder. Delete it and try again.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, screen mostly black ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Tdm missing textures.jpg|right|240px|Black textures]]&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;darkmod.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, shadows are pitch black ===&lt;br /&gt;
&lt;br /&gt;
Try disabling the AGP surface accelerator in DXDIAG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Graphic Corruption ===&lt;br /&gt;
&lt;br /&gt;
One report we had was for a Radeon ATI HD 4650, catalyst 10.9. This screen corruption as I understand it was heavy pixelation even on the menus. Closing down Xfire fixed it. &amp;quot;I fiddled with the xfire Doom 3 configuration through the xfire_games.ini, and determined it has to do with InGameFlags portion. For some reason the settings in that were interfering with doom 3, and after I removed some things from there, I was still able to run xfire, and doom 3 was still able to look proper.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== The briefing is very fuzzy ===&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt;  folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
 seta image_roundDown &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_forceDownSize &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_downSize &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== The sky is corrupted ===&lt;br /&gt;
&lt;br /&gt;
You either see black sky, or fragments of other textures. This seems only to happen on Geforce 6800 cards.&lt;br /&gt;
&lt;br /&gt;
There are two fixes for this:&lt;br /&gt;
&lt;br /&gt;
As a quick fix you can rename the following folder:&lt;br /&gt;
&lt;br /&gt;
 env/skyboxes/skybox_darkland_ne&lt;br /&gt;
&lt;br /&gt;
to a different name. That will result in black sky.&lt;br /&gt;
&lt;br /&gt;
Alternatively, edit the file &amp;lt;tt&amp;gt;materials/tdm_sky.mtr&amp;lt;/tt&amp;gt; with &#039;&#039;&#039;Wordpad&#039;&#039;&#039; or a different editor and&lt;br /&gt;
find the sky material named &#039;&#039;&#039;textures/darkmod/nature/skybox/skybox_darkland_NE&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 //Author: Dram&lt;br /&gt;
 //skybox_ocean with ocean replaced with dark land&lt;br /&gt;
 //Moon moved to north east by Fidcal&lt;br /&gt;
 textures/darkmod/nature/skybox/skybox_darkland_NE&lt;br /&gt;
    {&lt;br /&gt;
    qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
    noFragment&lt;br /&gt;
    noshadows&lt;br /&gt;
    noimpact&lt;br /&gt;
    nooverlays&lt;br /&gt;
    forceOpaque&lt;br /&gt;
    {&lt;br /&gt;
        forceHighQuality&lt;br /&gt;
        blend add&lt;br /&gt;
        cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
        texgen skybox&lt;br /&gt;
        texgen wobblesky .0 .0 .0&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this declaration, comment out the line that reads &#039;&#039;&#039;forceHighQuality&#039;&#039;&#039; by adding &amp;lt;tt&amp;gt;//&amp;lt;/tt&amp;gt; in front of it:&lt;br /&gt;
&lt;br /&gt;
  // forceHighQuality&lt;br /&gt;
&lt;br /&gt;
That should fix the sky and make it render correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Sky rotates ===&lt;br /&gt;
&lt;br /&gt;
This problem only affects FMs with a dynamic sky (eg, moving clouds etc.).&lt;br /&gt;
&lt;br /&gt;
If you see the sky spinning it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also gives better loading times and cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it then try this. Note that it replaces dynamic sky with a static clear one so it might look odd in a stormy FM for example, but better than a spinning sky:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a new folder in your darkmod folder called materials.&lt;br /&gt;
* Within it create a plain text file named no_skybox.mtr.&lt;br /&gt;
* Paste in the following:&lt;br /&gt;
&lt;br /&gt;
 textures/smf/portal_sky&lt;br /&gt;
 {&lt;br /&gt;
 	qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
 	noFragment&lt;br /&gt;
 	&lt;br /&gt;
 	noimpact&lt;br /&gt;
 	nooverlays&lt;br /&gt;
 	forceOpaque&lt;br /&gt;
 	noShadows&lt;br /&gt;
 	{&lt;br /&gt;
 		forceHighQuality&lt;br /&gt;
 		blend add&lt;br /&gt;
 		cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
 		texgen skybox&lt;br /&gt;
 		texgen wobblesky .0 .0 .0&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== HDR-Lite Post-Processing problems ===&lt;br /&gt;
&lt;br /&gt;
Some owners of ATI graphics cards reported various artifacts when HDR-Lite Post-Processing was enabled. Among these artifacts are a distorted or upside-down screen and spinning sky. These can usually be fixed by disabling Catalyst AI, which also gives better loading times.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has also been suspected that HDR-Lite Post-Processing may lead to [[#Underwater performance poor|poor performance underwater]], see next point:&lt;br /&gt;
&lt;br /&gt;
===Underwater performance poor===&lt;br /&gt;
&lt;br /&gt;
Some people suffer from very low framerates underwater with HDR-Lite Post-Processing enabled. Currently, the only known fix to this problem is to set &#039;&#039;&#039;g_doubleVision&#039;&#039;&#039; to 0 in the console. This however disables the doubleVision effect completely, so that there is no underwater-blur any more. The murkiness still remains though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upside-down screen===&lt;br /&gt;
&lt;br /&gt;
If you get an upside-down screen, you can either turn off Catalyst AI if you have an ATI card or try turning off HDR-Lite Post-Processing in the advanced video options.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox. &lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ===&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the&lt;br /&gt;
following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t help, your system might run out of memory. Either upgrade to more than 1 Gbyte memory,&lt;br /&gt;
or try to close other applications before playing.&lt;br /&gt;
&lt;br /&gt;
Please see also the article about [[Performance Tweaks]] to improve the performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slow loading times ===&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game freezes for several seconds when opening doors===&lt;br /&gt;
The following problems :&lt;br /&gt;
&lt;br /&gt;
A) &amp;quot;game freezes and loads some data from hard drive while opening doors&amp;quot;&lt;br /&gt;
B) &amp;quot;while loading mission you are returned to the menu and need to restart loading&amp;quot;&lt;br /&gt;
&lt;br /&gt;
are often resolved by disabling EAX 4.0 HD in the Audio Settings menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game exits to menu after mission load, with renderpipe error in console===&lt;br /&gt;
&lt;br /&gt;
* {{Red|Version 1.06 does not use named pipes. This is a depreciated issue.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Symptoms:&#039;&#039;&#039; Missions are installed properly and will load, but after they reach 100% you are returned to the main menu or objectives screen. If you open the console (Ctrl-Alt-~ on US keyboards), you see one/both of these errors:&lt;br /&gt;
&lt;br /&gt;
 ERROR: Failed to open \\.\pipe\dm_renderpipe&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 ERROR: idRenderSystemLocal::uncrop currentcrop &amp;lt;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039; Some firewalls, notably &#039;&#039;Sunbelt Firewall&#039;&#039; (aka &#039;&#039;Kerio Firewall&#039;&#039;) are known to interfere with TDM&#039;s lightgem, &#039;&#039;even when &amp;quot;disabled&amp;quot;&#039;&#039;. To fix this problem, completely uninstall the firewall and get a different one instead.&lt;br /&gt;
&lt;br /&gt;
Related [http://bugs.angua.at/view.php?id=543 #543]: Consider using glReadPixels for lightgem instead of named pipes.&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;COULD NOT FIND TDMLAUNCHER&amp;quot; when installing an FM===&lt;br /&gt;
&lt;br /&gt;
If you receive this error message you should check the start-arguments of DOOM3.exe / tdmlauncher.exe. Arguments are stored in darkmod/dmargs.txt and a faulty syntax e.g. a missing &amp;quot;+&amp;quot; before a &amp;quot;set&amp;quot;-command, will lead to this error message. Steam users are advised to remove any launch-options from Doom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The sound lags behind the picture===&lt;br /&gt;
&lt;br /&gt;
This seems to happen on some Linux Distributions with PulseAudio. Doom&#039;s sound engine defaults to ALSA, you can try to use OSS instead:&lt;br /&gt;
&lt;br /&gt;
Add the following to your &#039;&#039;dmargs.txt&#039;&#039; (it is in &#039;&#039;~/.doom/darkmod/&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 +set s_driver oss&lt;br /&gt;
&lt;br /&gt;
If your system does not provide OSS or a working OSS-emulation (try &#039;&#039;padsp ./tmdlauncher-linux&#039;&#039;), reset this to &#039;&#039;best&#039;&#039; which means ALSA.&lt;br /&gt;
&lt;br /&gt;
While OSS or ALSA deal directly with the sound hardware, PulseAudio is a soundserver that puts itself between the application (doom3) and ALSA. Your goal is to bypass the PA-part while playing TDM.&lt;br /&gt;
&lt;br /&gt;
You can either disable the PulseAudio daemon temporarily or connect Doom directly to ALSA.&lt;br /&gt;
&lt;br /&gt;
To disable PA, create a file named &#039;&#039;client.conf&#039;&#039; in &#039;&#039;~/.pulse&#039;&#039; which contains:&lt;br /&gt;
&lt;br /&gt;
 autospawn=no&lt;br /&gt;
&lt;br /&gt;
Then open a terminal and type:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -k&lt;br /&gt;
&lt;br /&gt;
When sound playback fails, make sure you have &#039;&#039;s_driver&#039;&#039; set to &#039;&#039;best&#039;&#039;, and &#039;&#039;s_alsa_pcm&#039;&#039; to &#039;&#039;default&#039;&#039;. When it works, you propably want to adjust volume settings outside TDM. Try &#039;&#039;alsamixer&#039;&#039; (in a terminal).&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished playing, turn PA back on:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -D&lt;br /&gt;
&lt;br /&gt;
starts the daemon. Changing &#039;&#039;autospawn&#039;&#039; to &#039;&#039;yes&#039;&#039; should prevent you from doing this manually after every reboot.    :)&lt;br /&gt;
&lt;br /&gt;
The other way, just bypassing PA, requires some knowledge about your sound hardware. Type&lt;br /&gt;
&lt;br /&gt;
 aplay -L&lt;br /&gt;
&lt;br /&gt;
This gives you a long list of your ALSA playback devices, three lines for each, first line is &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;. Choose the one with PCM Playback that your speakers are connected to and add&lt;br /&gt;
&lt;br /&gt;
 +set s_alsa_pcm &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to &#039;&#039;dmargs.txt&#039;&#039;. If &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039; is not convenient for you just try something like hw:1,0 if you know what you are doing, but be aware abstract designations like &#039;&#039;default&#039;&#039; will get &amp;quot;hijacked&amp;quot; by PA.&lt;br /&gt;
&lt;br /&gt;
=== Changing the screen resolution/aspect ratio does nothing!? ===&lt;br /&gt;
&lt;br /&gt;
These changes require a restart of Doom to work. Alternatively the command vid_restart can be issued at the console. It can take quite some time to execute this command, depending on whether or not you&#039;re already ingame. It will still be a lot faster than restarting and reloading the game though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Catalyst AI in recent AMD ATI drivers ===&lt;br /&gt;
&lt;br /&gt;
From (at least) Catalyst versions 10.12 and beyond, the ability to disable Catalyst AI properly&lt;br /&gt;
has been changed or removed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Rage3d and Guru3d have advised using &amp;quot;Radeon Pro&amp;quot; to address this.&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
* 1) Remove Catalyst Control Center (removing all ATI drivers recommended then re-install just the Display driver)&lt;br /&gt;
* 2) Download and install &amp;quot;Radeon Pro&amp;quot; [http://forums.guru3d.com/showthread.php?t=322031 Radeon Pro Thread at Guru3D]&lt;br /&gt;
* 3) Create a profile as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If you&#039;re using RadeonPro, create a profile for the game you want to disable Catalyst AI. &lt;br /&gt;
Right-click the newly created profile, keep left shift key pressed and choose &lt;br /&gt;
Open Location on context-menu, this will open the profile&#039;s XML definition. &lt;br /&gt;
Append a new line and add entry like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Property name=&amp;quot;CatalystAI&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and start the game. CatalystAI should be disabled.&lt;br /&gt;
&lt;br /&gt;
I also recommend to open ___GlobalProfile.xml &lt;br /&gt;
(found on same directory where your profile is saved) &lt;br /&gt;
and look for &amp;quot;CatalystAI&amp;quot; entry, it must be equal to &amp;quot;1&amp;quot; &lt;br /&gt;
otherwise CatalystAI will be kept disabled after you exit your game.&lt;br /&gt;
&lt;br /&gt;
CFX disabled by setting CatalystAI to 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another alternate method for Windows users:&lt;br /&gt;
&lt;br /&gt;
* 1) Obtain a copy of the free &amp;quot;ATI Tray Tools&amp;quot; by Ray Adams from [http://downloads.guru3d.com/download.php?det=733 Guru3d].&lt;br /&gt;
&lt;br /&gt;
* 2) Install it into your Windows tray.&lt;br /&gt;
&lt;br /&gt;
* 3) Right-click it.&lt;br /&gt;
&lt;br /&gt;
* 4) Select Direct 3d -&amp;gt; Catalyst AI -&amp;gt; Off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Many random crash behaviors seen by Nvidia users can be resolve by the following steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting &amp;quot;Malloc Failure for #######&amp;quot; crash-to-desktop ===&lt;br /&gt;
&lt;br /&gt;
Because Doom 3 is a 32-bit game, it can only utilize a certain amount of RAM. When Doom 3 needs more memory, but cannot allocate anymore, it crashes with an error saying something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shutdown event system&lt;br /&gt;
--------------------------------------&lt;br /&gt;
malloc failure for 3145781&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you run into malloc failures, it is suggested to try the following:&lt;br /&gt;
&lt;br /&gt;
1) Edit your darkmod.cfg and use the following:&lt;br /&gt;
 seta image_downSizeBump &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_downSizeBumpLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
These will reduce the bumpmap size. Memory impact will be few hundred megabytes lower, at the expensee of very minor blurring of texture quality.&lt;br /&gt;
&lt;br /&gt;
2) If the above does not help you it is recommended you try&lt;br /&gt;
 seta image_downSize &amp;quot;1&amp;quot; &lt;br /&gt;
 seta com_videoRam &amp;quot;512&amp;quot; (or however much video RAM you have).&lt;br /&gt;
&lt;br /&gt;
These will reduce all texture sizes. Memory impact will be much lower, but the graphics are visually pixelated, depending on the com_videoRam number. But at least the mission will be more likely run with systems with low RAM.&lt;br /&gt;
&lt;br /&gt;
A possible solution is to patch Doom3.exe with a [http://www.ntcore.com/4gb_patch.php 4GB Patcher] to allow the game to allocate more memory, but the TheDarkMod.exe should already be using large memory space.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Oversized in Fullscreen Mode (Image is too large to fit the screen area available) ===&lt;br /&gt;
Windows 7 Aero desktop is known to make the screen too large in fullscreen mode. This can be remedied by setting Windows 7 Aero to Basic.&lt;br /&gt;
&lt;br /&gt;
This issue is discussed in more detail [http://forums.thedarkmod.com/topic/14622-oversized-title-screen-solved-caused-by-aero/ HERE].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Known Bugs]]&lt;br /&gt;
* [[Gameplay]]&lt;br /&gt;
&lt;br /&gt;
{{installation}} {{general}}&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18102</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18102"/>
		<updated>2015-02-10T07:00:13Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Windows 2000: freeaddrinfo cannot be found in WS2_32.DLL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{important|headline=Important|text=This FAQ relates to the full TDM release version only. For players of the pre-release demos such as &#039;&#039;&#039;[[Thief&#039;s Den]]&#039;&#039;&#039; and &#039;&#039;&#039;[[Saint_Lucia|Tears of Saint Lucia]]&#039;&#039;&#039; please refer to the &#039;&#039;&#039;[[FAQ (Demo Releases)|Demo FAQ]]&#039;&#039;&#039;.&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== What do I need to play The Dark Mod? ==&lt;br /&gt;
&lt;br /&gt;
With the release of TDM 2.0, you no longer need Doom 3 installed.  The Dark Mod is completely standalone (and free!).  You need only follow the installation instructions on the website to start playing the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
=== Which Windows versions can I use? ===&lt;br /&gt;
&lt;br /&gt;
The following versions of windows have been tested and are known to work : Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2008, Windows Server 2003 in both 32bit and 64bit flavours.&lt;br /&gt;
&lt;br /&gt;
==== Windows 8.1 Preview ====&lt;br /&gt;
&lt;br /&gt;
Thus far, on Intel HD graphics, TDM will not start unless it is started in Windows 7 compatibility mode:&lt;br /&gt;
&lt;br /&gt;
Right click &amp;quot;TheDarkMod.exe&amp;quot; choose &amp;quot;Properties&amp;quot;, click the &amp;quot;Compatibility&amp;quot; tab and select Windows 7 from the dropdown&lt;br /&gt;
list.&lt;br /&gt;
&lt;br /&gt;
This may not be representative of other graphic hardware and may be due to early Windows 8.1 driver support.&lt;br /&gt;
&lt;br /&gt;
==== PAE Enabled ====&lt;br /&gt;
&lt;br /&gt;
One user with Windows XP Pro SP3 and an AMD Phenom processor reported problems starting Doom 3 due to having PAE enabled.&lt;br /&gt;
&lt;br /&gt;
[http://modetwo.net/darkmod/index.php?/topic/12471-error-doom-3/ Thread]&lt;br /&gt;
&lt;br /&gt;
=== Does it run in Linux? ===&lt;br /&gt;
Yes, Linux is supported.&lt;br /&gt;
&lt;br /&gt;
=== Does it run in 64 Bit Linux? ===&lt;br /&gt;
Yes, Linux 64 bit is supported. In addition to the steps above, you need 32 bit compatibility libraries, since Doom3 is 32 bit only:&lt;br /&gt;
* On &#039;&#039;&#039;SuSE&#039;&#039;&#039;, they should be included.&lt;br /&gt;
* On Ubuntu/Kubuntu, install the package &#039;&#039;&#039;ia32&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For TDM after 1.0, this step should be &#039;&#039;&#039;no&#039;&#039;&#039; longer neccessary:&lt;br /&gt;
&lt;br /&gt;
* Since you cannot install 32 bit libraries on a 64 bit system with the normal package manager, you should use [http://ubuntuforums.org/showthread.php?t=474790 getlibs] to install &#039;&#039;&#039;libmng&#039;&#039;&#039; and the boost filesystem lib:&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs libmng.so.1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs -l libboost-filesystem1.34.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about Gentoo? ===&lt;br /&gt;
Yes. It&#039;s not &amp;quot;officially&amp;quot; supported (the team doesn&#039;t test it specifically), however several users have reported success running TDM under Gentoo.&lt;br /&gt;
&lt;br /&gt;
=== What about Ubuntu 8.10? ===&lt;br /&gt;
Yes. As of this writing you will need to install the &#039;&#039;&#039;libboost-filesystem&#039;&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== GLIBCXX_3.4.9 errors ===&lt;br /&gt;
&lt;br /&gt;
If you receive an error about &amp;lt;tt&amp;gt;GLIBCXX_3.4.9&amp;lt;/tt&amp;gt;, delete or rename the files &amp;lt;code&amp;gt;/usr/local/games/doom3/libstdc++.so.6&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/usr/local/games/doom3/libgcc_s.so.1.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this doesn&#039;t resolve the error and you have an old version of GCC, then you may have to upgrade. It has been [http://modetwo.net/darkmod/index.php?/topic/9982-the-dark-mod-doom3-in-linux/ confirmed] that, at least under Gentoo, GCC 4.1 does not work with TDM but GCC 4.3 and GCC 4.4 are compatible.&lt;br /&gt;
&lt;br /&gt;
=== Does it run on Mac OS X?===&lt;br /&gt;
TDM 1.08 is supported, but 2.0 is not. See [[Installation]].&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
=== Does TDM support widescreen resolutions? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Choose &amp;quot;16:9&amp;quot; or &amp;quot;16:10&amp;quot; in the in-game &#039;&#039;Settings&#039;&#039; menu, and select the appropriate resolution. Note that you need to restart the game to have the new setting in effect.&lt;br /&gt;
&lt;br /&gt;
If the native resolution of your wide screen monitor is not listed, you can enter it into &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; by changing the following entries like so:&lt;br /&gt;
&lt;br /&gt;
 set r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 set r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
 set r_customheight &amp;quot;800&amp;quot;&lt;br /&gt;
 seta r_aspectratio &amp;quot;2&amp;quot;            // means 16:10, &amp;quot;1&amp;quot; is 16:9, other ratios are not yet supporred&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
==== What about TV resolutions like 1360x768? ====&lt;br /&gt;
&lt;br /&gt;
If you have a wide-screen TV which uses any non-standard resolution, like 1360x768 (instead of 1366x768), then please use the following:&lt;br /&gt;
&lt;br /&gt;
 seta r_customWidth &amp;quot;1360&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;768&amp;quot;&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_aspectratio 2&lt;br /&gt;
 seta g_fov &amp;quot;100&amp;quot;                  // or any other suitable value&lt;br /&gt;
&lt;br /&gt;
Alternatively, see the manual of your TV on the possibility to switch it to a &amp;quot;1:1&amp;quot; pixel mapping, or &amp;quot;monitor mode&amp;quot; or &amp;quot;computer mode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is some background information: http://hd.engadget.com/2006/04/21/whats-the-deal-with-1366-x-768/&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
It is hard to answer questions on why something fails, because wildly different systems cause wildly different symptoms. If the following section does not help you, please ask at our [http://www.modetwo.net/darkmod forums].&lt;br /&gt;
&lt;br /&gt;
For any solutions below that refer to &amp;quot;disabling Catalyst AI&amp;quot;, if you discover you can not use ATI&#039;s tools to do so, alternate methods are discussed in [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t load saved games -- TDM gives error about &amp;quot;can&#039;t load .script&amp;quot; file ===&lt;br /&gt;
&lt;br /&gt;
Make sure your folder is called &amp;quot;darkmod&amp;quot;.  If it isn&#039;t, rename it.  That should make the problem go away.  I&#039;ve heard reports that having spaces in the names of any folders in the path can cause problems, but haven&#039;t confirmed it.  Something to try if it still happens and your folder is already called &amp;quot;darkmod&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) closes almost as soon as it&#039;s started ===&lt;br /&gt;
&lt;br /&gt;
See the [[Tdm_update#Updater_closes_almost_as_soon_as_it.27s_started|main article on tdm_update]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) crashes at some point during the update ===&lt;br /&gt;
&lt;br /&gt;
This can happen if the Darkmod folder is set to &amp;quot;read only&amp;quot;. You fix it by right clicking on the folder, clicking properties, and unchecking the box that says &amp;quot;read only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000: freeaddrinfo cannot be found in WS2_32.DLL ===&lt;br /&gt;
Please refer to the main article [[TDM in Windows 2000]] to work around this problem.&lt;br /&gt;
&lt;br /&gt;
===FM won&#039;t install manually===&lt;br /&gt;
&lt;br /&gt;
If you are running Dark Mod under Linux and have edited the file darkmod/currentfm.txt this might prevent the FM from installing. This may be fixed in an update but apparently editing using notepad under Wine works OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FMs downloaded but don&#039;t show in menu list===&lt;br /&gt;
&lt;br /&gt;
You have downloaded some FMs but they don&#039;t show on Dark Mod&#039;s New Missions list. Possible causes:&lt;br /&gt;
&lt;br /&gt;
* You must not extract the pk4s or zip files but put them into the darkmod/fms folder (or alternatively you can create the FM folder in there eg, darkmod/fms/chalice for chalice.pk4 or chalice.zip.&lt;br /&gt;
* Early versions of Dark Mod cannot handle zip suffixes. Solution: rename to .pk4 or run tdm_update to get the latest version of Dark Mod.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FM downloaded but won&#039;t play ===&lt;br /&gt;
&lt;br /&gt;
If you have downloaded an FM you might see it in the New Missions List but can&#039;t get it to play. These are almost always an install problem. These are some of the causes and cures:&lt;br /&gt;
&lt;br /&gt;
FMs (fan missions) are archives and in early versions of Dark Mod MUST be suffixed .pk4 not zip. Apparently Internet Explorer 8 may change it from pk4 to zip during download without telling you. You need to rename it back if running an early version of Dark Mod else run tdm_update to update and then zip files are OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You do NOT need to extract the pk4 archives to install or play. Just download into or move the pk4 into the darkmod\fms folder. Optionally you can create a folder of the same name as the map and put it in there, eg, darkmod\fms\chalice but there is no need because Dark Mod will create that automatically. Just make sure your pk4 goes, unopened, into the fms folder, then run TheDarkMod.exe&lt;br /&gt;
&lt;br /&gt;
If you have done the above but see for example, a blank objectives screen and no briefing then it is still almost certainly an install error. I recommend you do a clean sweep if in doubt:&lt;br /&gt;
* Exit Dark Mod&lt;br /&gt;
* Delete darkmod\currentfm.txt (this just uninstalls any FM)&lt;br /&gt;
* Move the pk4 into the darkmod\fms folder if it is not already there.&lt;br /&gt;
* Delete the darkmod\fms\FMname folder if any, eg, darkmod\fms\chalice. Don&#039;t worry if there isn&#039;t one; it will be created automatically later.&lt;br /&gt;
&lt;br /&gt;
So all that is left is the pk4 in the fms folder. Now run TheDarkMod.exe. The FM should be in the list in the New Missions menu. Re-install it and you should now be able to play it.&lt;br /&gt;
&lt;br /&gt;
=== The game hangs at Dark Mod screen/ locks up while turning on vsynch ===&lt;br /&gt;
Catalyst Control Center above 10.8 for ATI cards has a performance slider for V-Synch. Setting that slider to Quality (Always On)&lt;br /&gt;
fixes this issue. If set lower than quality and it is set to on in game it will freeze.&lt;br /&gt;
(tested specifically in CC 10-11)&lt;br /&gt;
&lt;br /&gt;
=== The game crashes on load ===&lt;br /&gt;
Make sure that:&lt;br /&gt;
* Your system meets at least the minimum system specs.&lt;br /&gt;
* You have enough free main memory. Try closing a few running programs like Outlook, Anti-Virus or torrent clients.&lt;br /&gt;
* Nvidia &amp;quot;Threaded Optimizations&amp;quot; are causing Doom 3 Mod stability issues (see: [[#Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;|Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it, you probably receive an error message referencing an &amp;quot;Unknown event&amp;quot; at startup, like the screenshot below illustrates.&lt;br /&gt;
&lt;br /&gt;
[[Image:ErrorSetEntityRelation.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here are a couple of known problems and their solutions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sometimes, the procedure fails due to &#039;&#039;&#039;spaces in the installation path&#039;&#039;&#039;. Try extracting the gamex86.dll manually using Winzip or similar or install Doom 3 in a different directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You have a &#039;&#039;&#039;firewall&#039;&#039;&#039; installed that prevents the copy procedure, because since version 1.03, TDM has a built-in mission downloader. This misbehavior has been reported for the &#039;&#039;&#039;COMODO Firewall&#039;&#039;&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;It is also possible that an &#039;&#039;&#039;old version of gamex86.dll&#039;&#039;&#039; (or gamex86.so) is lying around in your Doom 3 folder. Delete it and try again.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, screen mostly black ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Tdm missing textures.jpg|right|240px|Black textures]]&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;darkmod.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, shadows are pitch black ===&lt;br /&gt;
&lt;br /&gt;
Try disabling the AGP surface accelerator in DXDIAG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Graphic Corruption ===&lt;br /&gt;
&lt;br /&gt;
One report we had was for a Radeon ATI HD 4650, catalyst 10.9. This screen corruption as I understand it was heavy pixelation even on the menus. Closing down Xfire fixed it. &amp;quot;I fiddled with the xfire Doom 3 configuration through the xfire_games.ini, and determined it has to do with InGameFlags portion. For some reason the settings in that were interfering with doom 3, and after I removed some things from there, I was still able to run xfire, and doom 3 was still able to look proper.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== The briefing is very fuzzy ===&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt;  folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
 seta image_roundDown &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_forceDownSize &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_downSize &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== The sky is corrupted ===&lt;br /&gt;
&lt;br /&gt;
You either see black sky, or fragments of other textures. This seems only to happen on Geforce 6800 cards.&lt;br /&gt;
&lt;br /&gt;
There are two fixes for this:&lt;br /&gt;
&lt;br /&gt;
As a quick fix you can rename the following folder:&lt;br /&gt;
&lt;br /&gt;
 env/skyboxes/skybox_darkland_ne&lt;br /&gt;
&lt;br /&gt;
to a different name. That will result in black sky.&lt;br /&gt;
&lt;br /&gt;
Alternatively, edit the file &amp;lt;tt&amp;gt;materials/tdm_sky.mtr&amp;lt;/tt&amp;gt; with &#039;&#039;&#039;Wordpad&#039;&#039;&#039; or a different editor and&lt;br /&gt;
find the sky material named &#039;&#039;&#039;textures/darkmod/nature/skybox/skybox_darkland_NE&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 //Author: Dram&lt;br /&gt;
 //skybox_ocean with ocean replaced with dark land&lt;br /&gt;
 //Moon moved to north east by Fidcal&lt;br /&gt;
 textures/darkmod/nature/skybox/skybox_darkland_NE&lt;br /&gt;
    {&lt;br /&gt;
    qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
    noFragment&lt;br /&gt;
    noshadows&lt;br /&gt;
    noimpact&lt;br /&gt;
    nooverlays&lt;br /&gt;
    forceOpaque&lt;br /&gt;
    {&lt;br /&gt;
        forceHighQuality&lt;br /&gt;
        blend add&lt;br /&gt;
        cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
        texgen skybox&lt;br /&gt;
        texgen wobblesky .0 .0 .0&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this declaration, comment out the line that reads &#039;&#039;&#039;forceHighQuality&#039;&#039;&#039; by adding &amp;lt;tt&amp;gt;//&amp;lt;/tt&amp;gt; in front of it:&lt;br /&gt;
&lt;br /&gt;
  // forceHighQuality&lt;br /&gt;
&lt;br /&gt;
That should fix the sky and make it render correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Sky rotates ===&lt;br /&gt;
&lt;br /&gt;
This problem only affects FMs with a dynamic sky (eg, moving clouds etc.).&lt;br /&gt;
&lt;br /&gt;
If you see the sky spinning it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also gives better loading times and cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it then try this. Note that it replaces dynamic sky with a static clear one so it might look odd in a stormy FM for example, but better than a spinning sky:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a new folder in your darkmod folder called materials.&lt;br /&gt;
* Within it create a plain text file named no_skybox.mtr.&lt;br /&gt;
* Paste in the following:&lt;br /&gt;
&lt;br /&gt;
 textures/smf/portal_sky&lt;br /&gt;
 {&lt;br /&gt;
 	qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
 	noFragment&lt;br /&gt;
 	&lt;br /&gt;
 	noimpact&lt;br /&gt;
 	nooverlays&lt;br /&gt;
 	forceOpaque&lt;br /&gt;
 	noShadows&lt;br /&gt;
 	{&lt;br /&gt;
 		forceHighQuality&lt;br /&gt;
 		blend add&lt;br /&gt;
 		cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
 		texgen skybox&lt;br /&gt;
 		texgen wobblesky .0 .0 .0&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== HDR-Lite Post-Processing problems ===&lt;br /&gt;
&lt;br /&gt;
Some owners of ATI graphics cards reported various artifacts when HDR-Lite Post-Processing was enabled. Among these artifacts are a distorted or upside-down screen and spinning sky. These can usually be fixed by disabling Catalyst AI, which also gives better loading times.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has also been suspected that HDR-Lite Post-Processing may lead to [[#Underwater performance poor|poor performance underwater]], see next point:&lt;br /&gt;
&lt;br /&gt;
===Underwater performance poor===&lt;br /&gt;
&lt;br /&gt;
Some people suffer from very low framerates underwater with HDR-Lite Post-Processing enabled. Currently, the only known fix to this problem is to set &#039;&#039;&#039;g_doubleVision&#039;&#039;&#039; to 0 in the console. This however disables the doubleVision effect completely, so that there is no underwater-blur any more. The murkiness still remains though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upside-down screen===&lt;br /&gt;
&lt;br /&gt;
If you get an upside-down screen, you can either turn off Catalyst AI if you have an ATI card or try turning off HDR-Lite Post-Processing in the advanced video options.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox. &lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ===&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the&lt;br /&gt;
following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t help, your system might run out of memory. Either upgrade to more than 1 Gbyte memory,&lt;br /&gt;
or try to close other applications before playing.&lt;br /&gt;
&lt;br /&gt;
Please see also the article about [[Performance Tweaks]] to improve the performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slow loading times ===&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game freezes for several seconds when opening doors===&lt;br /&gt;
The following problems :&lt;br /&gt;
&lt;br /&gt;
A) &amp;quot;game freezes and loads some data from hard drive while opening doors&amp;quot;&lt;br /&gt;
B) &amp;quot;while loading mission you are returned to the menu and need to restart loading&amp;quot;&lt;br /&gt;
&lt;br /&gt;
are often resolved by disabling EAX 4.0 HD in the Audio Settings menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game exits to menu after mission load, with renderpipe error in console===&lt;br /&gt;
&lt;br /&gt;
* {{Red|Version 1.06 does not use named pipes. This is a depreciated issue.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Symptoms:&#039;&#039;&#039; Missions are installed properly and will load, but after they reach 100% you are returned to the main menu or objectives screen. If you open the console (Ctrl-Alt-~ on US keyboards), you see one/both of these errors:&lt;br /&gt;
&lt;br /&gt;
 ERROR: Failed to open \\.\pipe\dm_renderpipe&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 ERROR: idRenderSystemLocal::uncrop currentcrop &amp;lt;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039; Some firewalls, notably &#039;&#039;Sunbelt Firewall&#039;&#039; (aka &#039;&#039;Kerio Firewall&#039;&#039;) are known to interfere with TDM&#039;s lightgem, &#039;&#039;even when &amp;quot;disabled&amp;quot;&#039;&#039;. To fix this problem, completely uninstall the firewall and get a different one instead.&lt;br /&gt;
&lt;br /&gt;
Related [http://bugs.angua.at/view.php?id=543 #543]: Consider using glReadPixels for lightgem instead of named pipes.&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;COULD NOT FIND TDMLAUNCHER&amp;quot; when installing an FM===&lt;br /&gt;
&lt;br /&gt;
If you receive this error message you should check the start-arguments of DOOM3.exe / tdmlauncher.exe. Arguments are stored in darkmod/dmargs.txt and a faulty syntax e.g. a missing &amp;quot;+&amp;quot; before a &amp;quot;set&amp;quot;-command, will lead to this error message. Steam users are advised to remove any launch-options from Doom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The sound lags behind the picture===&lt;br /&gt;
&lt;br /&gt;
This seems to happen on some Linux Distributions with PulseAudio. Doom&#039;s sound engine defaults to ALSA, you can try to use OSS instead:&lt;br /&gt;
&lt;br /&gt;
Add the following to your &#039;&#039;dmargs.txt&#039;&#039; (it is in &#039;&#039;~/.doom/darkmod/&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 +set s_driver oss&lt;br /&gt;
&lt;br /&gt;
If your system does not provide OSS or a working OSS-emulation (try &#039;&#039;padsp ./tmdlauncher-linux&#039;&#039;), reset this to &#039;&#039;best&#039;&#039; which means ALSA.&lt;br /&gt;
&lt;br /&gt;
While OSS or ALSA deal directly with the sound hardware, PulseAudio is a soundserver that puts itself between the application (doom3) and ALSA. Your goal is to bypass the PA-part while playing TDM.&lt;br /&gt;
&lt;br /&gt;
You can either disable the PulseAudio daemon temporarily or connect Doom directly to ALSA.&lt;br /&gt;
&lt;br /&gt;
To disable PA, create a file named &#039;&#039;client.conf&#039;&#039; in &#039;&#039;~/.pulse&#039;&#039; which contains:&lt;br /&gt;
&lt;br /&gt;
 autospawn=no&lt;br /&gt;
&lt;br /&gt;
Then open a terminal and type:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -k&lt;br /&gt;
&lt;br /&gt;
When sound playback fails, make sure you have &#039;&#039;s_driver&#039;&#039; set to &#039;&#039;best&#039;&#039;, and &#039;&#039;s_alsa_pcm&#039;&#039; to &#039;&#039;default&#039;&#039;. When it works, you propably want to adjust volume settings outside TDM. Try &#039;&#039;alsamixer&#039;&#039; (in a terminal).&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished playing, turn PA back on:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -D&lt;br /&gt;
&lt;br /&gt;
starts the daemon. Changing &#039;&#039;autospawn&#039;&#039; to &#039;&#039;yes&#039;&#039; should prevent you from doing this manually after every reboot.    :)&lt;br /&gt;
&lt;br /&gt;
The other way, just bypassing PA, requires some knowledge about your sound hardware. Type&lt;br /&gt;
&lt;br /&gt;
 aplay -L&lt;br /&gt;
&lt;br /&gt;
This gives you a long list of your ALSA playback devices, three lines for each, first line is &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;. Choose the one with PCM Playback that your speakers are connected to and add&lt;br /&gt;
&lt;br /&gt;
 +set s_alsa_pcm &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to &#039;&#039;dmargs.txt&#039;&#039;. If &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039; is not convenient for you just try something like hw:1,0 if you know what you are doing, but be aware abstract designations like &#039;&#039;default&#039;&#039; will get &amp;quot;hijacked&amp;quot; by PA.&lt;br /&gt;
&lt;br /&gt;
=== Changing the screen resolution/aspect ratio does nothing!? ===&lt;br /&gt;
&lt;br /&gt;
These changes require a restart of Doom to work. Alternatively the command vid_restart can be issued at the console. It can take quite some time to execute this command, depending on whether or not you&#039;re already ingame. It will still be a lot faster than restarting and reloading the game though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Catalyst AI in recent AMD ATI drivers ===&lt;br /&gt;
&lt;br /&gt;
From (at least) Catalyst versions 10.12 and beyond, the ability to disable Catalyst AI properly&lt;br /&gt;
has been changed or removed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Rage3d and Guru3d have advised using &amp;quot;Radeon Pro&amp;quot; to address this.&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
* 1) Remove Catalyst Control Center (removing all ATI drivers recommended then re-install just the Display driver)&lt;br /&gt;
* 2) Download and install &amp;quot;Radeon Pro&amp;quot; [http://forums.guru3d.com/showthread.php?t=322031 Radeon Pro Thread at Guru3D]&lt;br /&gt;
* 3) Create a profile as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If you&#039;re using RadeonPro, create a profile for the game you want to disable Catalyst AI. &lt;br /&gt;
Right-click the newly created profile, keep left shift key pressed and choose &lt;br /&gt;
Open Location on context-menu, this will open the profile&#039;s XML definition. &lt;br /&gt;
Append a new line and add entry like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Property name=&amp;quot;CatalystAI&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and start the game. CatalystAI should be disabled.&lt;br /&gt;
&lt;br /&gt;
I also recommend to open ___GlobalProfile.xml &lt;br /&gt;
(found on same directory where your profile is saved) &lt;br /&gt;
and look for &amp;quot;CatalystAI&amp;quot; entry, it must be equal to &amp;quot;1&amp;quot; &lt;br /&gt;
otherwise CatalystAI will be kept disabled after you exit your game.&lt;br /&gt;
&lt;br /&gt;
CFX disabled by setting CatalystAI to 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another alternate method for Windows users:&lt;br /&gt;
&lt;br /&gt;
* 1) Obtain a copy of the free &amp;quot;ATI Tray Tools&amp;quot; by Ray Adams from [http://downloads.guru3d.com/download.php?det=733 Guru3d].&lt;br /&gt;
&lt;br /&gt;
* 2) Install it into your Windows tray.&lt;br /&gt;
&lt;br /&gt;
* 3) Right-click it.&lt;br /&gt;
&lt;br /&gt;
* 4) Select Direct 3d -&amp;gt; Catalyst AI -&amp;gt; Off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Many random crash behaviors seen by Nvidia users can be resolve by the following steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting &amp;quot;Malloc Failure for #######&amp;quot; crash-to-desktop ===&lt;br /&gt;
&lt;br /&gt;
Because Doom 3 is a 32-bit game, it can only utilize a certain amount of RAM. When Doom 3 needs more memory, but cannot allocate anymore, it crashes with an error saying something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shutdown event system&lt;br /&gt;
--------------------------------------&lt;br /&gt;
malloc failure for 3145781&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you run into malloc failures, it is suggested to try the following:&lt;br /&gt;
&lt;br /&gt;
1) Edit your darkmod.cfg and use the following:&lt;br /&gt;
 seta image_downSizeBump &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_downSizeBumpLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
These will reduce the bumpmap size. Memory impact will be few hundred megabytes lower, at the expensee of very minor blurring of texture quality.&lt;br /&gt;
&lt;br /&gt;
2) If the above does not help you it is recommended you try&lt;br /&gt;
 seta image_downSize &amp;quot;1&amp;quot; &lt;br /&gt;
 seta com_videoRam &amp;quot;512&amp;quot; (or however much video RAM you have).&lt;br /&gt;
&lt;br /&gt;
These will reduce all texture sizes. Memory impact will be much lower, but the graphics are visually pixelated, depending on the com_videoRam number. But at least the mission will be more likely run with systems with low RAM.&lt;br /&gt;
&lt;br /&gt;
A possible solution is to patch Doom3.exe with a [http://www.ntcore.com/4gb_patch.php 4GB Patcher] to allow the game to allocate more memory, but the TheDarkMod.exe should already be using large memory space.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Oversized in Fullscreen Mode (Image is too large to fit the screen area available) ===&lt;br /&gt;
Windows 7 Aero desktop is known to make the screen too large in fullscreen mode. This can be remedied by setting Windows 7 Aero to Basic.&lt;br /&gt;
&lt;br /&gt;
This issue is discussed in more detail [http://forums.thedarkmod.com/topic/14622-oversized-title-screen-solved-caused-by-aero/ HERE].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Known Bugs]]&lt;br /&gt;
* [[Gameplay]]&lt;br /&gt;
&lt;br /&gt;
{{installation}} {{general}}&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18101</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18101"/>
		<updated>2015-02-10T06:59:53Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Updater (tdm_update.exe) crashes at some point during the update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{important|headline=Important|text=This FAQ relates to the full TDM release version only. For players of the pre-release demos such as &#039;&#039;&#039;[[Thief&#039;s Den]]&#039;&#039;&#039; and &#039;&#039;&#039;[[Saint_Lucia|Tears of Saint Lucia]]&#039;&#039;&#039; please refer to the &#039;&#039;&#039;[[FAQ (Demo Releases)|Demo FAQ]]&#039;&#039;&#039;.&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== What do I need to play The Dark Mod? ==&lt;br /&gt;
&lt;br /&gt;
With the release of TDM 2.0, you no longer need Doom 3 installed.  The Dark Mod is completely standalone (and free!).  You need only follow the installation instructions on the website to start playing the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
=== Which Windows versions can I use? ===&lt;br /&gt;
&lt;br /&gt;
The following versions of windows have been tested and are known to work : Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2008, Windows Server 2003 in both 32bit and 64bit flavours.&lt;br /&gt;
&lt;br /&gt;
==== Windows 8.1 Preview ====&lt;br /&gt;
&lt;br /&gt;
Thus far, on Intel HD graphics, TDM will not start unless it is started in Windows 7 compatibility mode:&lt;br /&gt;
&lt;br /&gt;
Right click &amp;quot;TheDarkMod.exe&amp;quot; choose &amp;quot;Properties&amp;quot;, click the &amp;quot;Compatibility&amp;quot; tab and select Windows 7 from the dropdown&lt;br /&gt;
list.&lt;br /&gt;
&lt;br /&gt;
This may not be representative of other graphic hardware and may be due to early Windows 8.1 driver support.&lt;br /&gt;
&lt;br /&gt;
==== PAE Enabled ====&lt;br /&gt;
&lt;br /&gt;
One user with Windows XP Pro SP3 and an AMD Phenom processor reported problems starting Doom 3 due to having PAE enabled.&lt;br /&gt;
&lt;br /&gt;
[http://modetwo.net/darkmod/index.php?/topic/12471-error-doom-3/ Thread]&lt;br /&gt;
&lt;br /&gt;
=== Does it run in Linux? ===&lt;br /&gt;
Yes, Linux is supported.&lt;br /&gt;
&lt;br /&gt;
=== Does it run in 64 Bit Linux? ===&lt;br /&gt;
Yes, Linux 64 bit is supported. In addition to the steps above, you need 32 bit compatibility libraries, since Doom3 is 32 bit only:&lt;br /&gt;
* On &#039;&#039;&#039;SuSE&#039;&#039;&#039;, they should be included.&lt;br /&gt;
* On Ubuntu/Kubuntu, install the package &#039;&#039;&#039;ia32&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For TDM after 1.0, this step should be &#039;&#039;&#039;no&#039;&#039;&#039; longer neccessary:&lt;br /&gt;
&lt;br /&gt;
* Since you cannot install 32 bit libraries on a 64 bit system with the normal package manager, you should use [http://ubuntuforums.org/showthread.php?t=474790 getlibs] to install &#039;&#039;&#039;libmng&#039;&#039;&#039; and the boost filesystem lib:&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs libmng.so.1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs -l libboost-filesystem1.34.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about Gentoo? ===&lt;br /&gt;
Yes. It&#039;s not &amp;quot;officially&amp;quot; supported (the team doesn&#039;t test it specifically), however several users have reported success running TDM under Gentoo.&lt;br /&gt;
&lt;br /&gt;
=== What about Ubuntu 8.10? ===&lt;br /&gt;
Yes. As of this writing you will need to install the &#039;&#039;&#039;libboost-filesystem&#039;&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== GLIBCXX_3.4.9 errors ===&lt;br /&gt;
&lt;br /&gt;
If you receive an error about &amp;lt;tt&amp;gt;GLIBCXX_3.4.9&amp;lt;/tt&amp;gt;, delete or rename the files &amp;lt;code&amp;gt;/usr/local/games/doom3/libstdc++.so.6&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/usr/local/games/doom3/libgcc_s.so.1.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this doesn&#039;t resolve the error and you have an old version of GCC, then you may have to upgrade. It has been [http://modetwo.net/darkmod/index.php?/topic/9982-the-dark-mod-doom3-in-linux/ confirmed] that, at least under Gentoo, GCC 4.1 does not work with TDM but GCC 4.3 and GCC 4.4 are compatible.&lt;br /&gt;
&lt;br /&gt;
=== Does it run on Mac OS X?===&lt;br /&gt;
TDM 1.08 is supported, but 2.0 is not. See [[Installation]].&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
=== Does TDM support widescreen resolutions? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Choose &amp;quot;16:9&amp;quot; or &amp;quot;16:10&amp;quot; in the in-game &#039;&#039;Settings&#039;&#039; menu, and select the appropriate resolution. Note that you need to restart the game to have the new setting in effect.&lt;br /&gt;
&lt;br /&gt;
If the native resolution of your wide screen monitor is not listed, you can enter it into &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; by changing the following entries like so:&lt;br /&gt;
&lt;br /&gt;
 set r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 set r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
 set r_customheight &amp;quot;800&amp;quot;&lt;br /&gt;
 seta r_aspectratio &amp;quot;2&amp;quot;            // means 16:10, &amp;quot;1&amp;quot; is 16:9, other ratios are not yet supporred&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
==== What about TV resolutions like 1360x768? ====&lt;br /&gt;
&lt;br /&gt;
If you have a wide-screen TV which uses any non-standard resolution, like 1360x768 (instead of 1366x768), then please use the following:&lt;br /&gt;
&lt;br /&gt;
 seta r_customWidth &amp;quot;1360&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;768&amp;quot;&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_aspectratio 2&lt;br /&gt;
 seta g_fov &amp;quot;100&amp;quot;                  // or any other suitable value&lt;br /&gt;
&lt;br /&gt;
Alternatively, see the manual of your TV on the possibility to switch it to a &amp;quot;1:1&amp;quot; pixel mapping, or &amp;quot;monitor mode&amp;quot; or &amp;quot;computer mode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is some background information: http://hd.engadget.com/2006/04/21/whats-the-deal-with-1366-x-768/&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
It is hard to answer questions on why something fails, because wildly different systems cause wildly different symptoms. If the following section does not help you, please ask at our [http://www.modetwo.net/darkmod forums].&lt;br /&gt;
&lt;br /&gt;
For any solutions below that refer to &amp;quot;disabling Catalyst AI&amp;quot;, if you discover you can not use ATI&#039;s tools to do so, alternate methods are discussed in [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t load saved games -- TDM gives error about &amp;quot;can&#039;t load .script&amp;quot; file ===&lt;br /&gt;
&lt;br /&gt;
Make sure your folder is called &amp;quot;darkmod&amp;quot;.  If it isn&#039;t, rename it.  That should make the problem go away.  I&#039;ve heard reports that having spaces in the names of any folders in the path can cause problems, but haven&#039;t confirmed it.  Something to try if it still happens and your folder is already called &amp;quot;darkmod&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) closes almost as soon as it&#039;s started ===&lt;br /&gt;
&lt;br /&gt;
See the [[Tdm_update#Updater_closes_almost_as_soon_as_it.27s_started|main article on tdm_update]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) crashes at some point during the update ===&lt;br /&gt;
&lt;br /&gt;
This can happen if the Darkmod folder is set to &amp;quot;read only&amp;quot;. You fix it by right clicking on the folder, clicking properties, and unchecking the box that says &amp;quot;read only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000: freeaddrinfo cannot be found in WS2_32.DLL ===&lt;br /&gt;
Please refer to the main article [[TDM in Windows 2000]] to work around this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FM won&#039;t install manually===&lt;br /&gt;
&lt;br /&gt;
If you are running Dark Mod under Linux and have edited the file darkmod/currentfm.txt this might prevent the FM from installing. This may be fixed in an update but apparently editing using notepad under Wine works OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FMs downloaded but don&#039;t show in menu list===&lt;br /&gt;
&lt;br /&gt;
You have downloaded some FMs but they don&#039;t show on Dark Mod&#039;s New Missions list. Possible causes:&lt;br /&gt;
&lt;br /&gt;
* You must not extract the pk4s or zip files but put them into the darkmod/fms folder (or alternatively you can create the FM folder in there eg, darkmod/fms/chalice for chalice.pk4 or chalice.zip.&lt;br /&gt;
* Early versions of Dark Mod cannot handle zip suffixes. Solution: rename to .pk4 or run tdm_update to get the latest version of Dark Mod.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FM downloaded but won&#039;t play ===&lt;br /&gt;
&lt;br /&gt;
If you have downloaded an FM you might see it in the New Missions List but can&#039;t get it to play. These are almost always an install problem. These are some of the causes and cures:&lt;br /&gt;
&lt;br /&gt;
FMs (fan missions) are archives and in early versions of Dark Mod MUST be suffixed .pk4 not zip. Apparently Internet Explorer 8 may change it from pk4 to zip during download without telling you. You need to rename it back if running an early version of Dark Mod else run tdm_update to update and then zip files are OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You do NOT need to extract the pk4 archives to install or play. Just download into or move the pk4 into the darkmod\fms folder. Optionally you can create a folder of the same name as the map and put it in there, eg, darkmod\fms\chalice but there is no need because Dark Mod will create that automatically. Just make sure your pk4 goes, unopened, into the fms folder, then run TheDarkMod.exe&lt;br /&gt;
&lt;br /&gt;
If you have done the above but see for example, a blank objectives screen and no briefing then it is still almost certainly an install error. I recommend you do a clean sweep if in doubt:&lt;br /&gt;
* Exit Dark Mod&lt;br /&gt;
* Delete darkmod\currentfm.txt (this just uninstalls any FM)&lt;br /&gt;
* Move the pk4 into the darkmod\fms folder if it is not already there.&lt;br /&gt;
* Delete the darkmod\fms\FMname folder if any, eg, darkmod\fms\chalice. Don&#039;t worry if there isn&#039;t one; it will be created automatically later.&lt;br /&gt;
&lt;br /&gt;
So all that is left is the pk4 in the fms folder. Now run TheDarkMod.exe. The FM should be in the list in the New Missions menu. Re-install it and you should now be able to play it.&lt;br /&gt;
&lt;br /&gt;
=== The game hangs at Dark Mod screen/ locks up while turning on vsynch ===&lt;br /&gt;
Catalyst Control Center above 10.8 for ATI cards has a performance slider for V-Synch. Setting that slider to Quality (Always On)&lt;br /&gt;
fixes this issue. If set lower than quality and it is set to on in game it will freeze.&lt;br /&gt;
(tested specifically in CC 10-11)&lt;br /&gt;
&lt;br /&gt;
=== The game crashes on load ===&lt;br /&gt;
Make sure that:&lt;br /&gt;
* Your system meets at least the minimum system specs.&lt;br /&gt;
* You have enough free main memory. Try closing a few running programs like Outlook, Anti-Virus or torrent clients.&lt;br /&gt;
* Nvidia &amp;quot;Threaded Optimizations&amp;quot; are causing Doom 3 Mod stability issues (see: [[#Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;|Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it, you probably receive an error message referencing an &amp;quot;Unknown event&amp;quot; at startup, like the screenshot below illustrates.&lt;br /&gt;
&lt;br /&gt;
[[Image:ErrorSetEntityRelation.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here are a couple of known problems and their solutions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sometimes, the procedure fails due to &#039;&#039;&#039;spaces in the installation path&#039;&#039;&#039;. Try extracting the gamex86.dll manually using Winzip or similar or install Doom 3 in a different directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You have a &#039;&#039;&#039;firewall&#039;&#039;&#039; installed that prevents the copy procedure, because since version 1.03, TDM has a built-in mission downloader. This misbehavior has been reported for the &#039;&#039;&#039;COMODO Firewall&#039;&#039;&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;It is also possible that an &#039;&#039;&#039;old version of gamex86.dll&#039;&#039;&#039; (or gamex86.so) is lying around in your Doom 3 folder. Delete it and try again.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, screen mostly black ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Tdm missing textures.jpg|right|240px|Black textures]]&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;darkmod.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, shadows are pitch black ===&lt;br /&gt;
&lt;br /&gt;
Try disabling the AGP surface accelerator in DXDIAG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Graphic Corruption ===&lt;br /&gt;
&lt;br /&gt;
One report we had was for a Radeon ATI HD 4650, catalyst 10.9. This screen corruption as I understand it was heavy pixelation even on the menus. Closing down Xfire fixed it. &amp;quot;I fiddled with the xfire Doom 3 configuration through the xfire_games.ini, and determined it has to do with InGameFlags portion. For some reason the settings in that were interfering with doom 3, and after I removed some things from there, I was still able to run xfire, and doom 3 was still able to look proper.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== The briefing is very fuzzy ===&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt;  folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
 seta image_roundDown &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_forceDownSize &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_downSize &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== The sky is corrupted ===&lt;br /&gt;
&lt;br /&gt;
You either see black sky, or fragments of other textures. This seems only to happen on Geforce 6800 cards.&lt;br /&gt;
&lt;br /&gt;
There are two fixes for this:&lt;br /&gt;
&lt;br /&gt;
As a quick fix you can rename the following folder:&lt;br /&gt;
&lt;br /&gt;
 env/skyboxes/skybox_darkland_ne&lt;br /&gt;
&lt;br /&gt;
to a different name. That will result in black sky.&lt;br /&gt;
&lt;br /&gt;
Alternatively, edit the file &amp;lt;tt&amp;gt;materials/tdm_sky.mtr&amp;lt;/tt&amp;gt; with &#039;&#039;&#039;Wordpad&#039;&#039;&#039; or a different editor and&lt;br /&gt;
find the sky material named &#039;&#039;&#039;textures/darkmod/nature/skybox/skybox_darkland_NE&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 //Author: Dram&lt;br /&gt;
 //skybox_ocean with ocean replaced with dark land&lt;br /&gt;
 //Moon moved to north east by Fidcal&lt;br /&gt;
 textures/darkmod/nature/skybox/skybox_darkland_NE&lt;br /&gt;
    {&lt;br /&gt;
    qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
    noFragment&lt;br /&gt;
    noshadows&lt;br /&gt;
    noimpact&lt;br /&gt;
    nooverlays&lt;br /&gt;
    forceOpaque&lt;br /&gt;
    {&lt;br /&gt;
        forceHighQuality&lt;br /&gt;
        blend add&lt;br /&gt;
        cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
        texgen skybox&lt;br /&gt;
        texgen wobblesky .0 .0 .0&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this declaration, comment out the line that reads &#039;&#039;&#039;forceHighQuality&#039;&#039;&#039; by adding &amp;lt;tt&amp;gt;//&amp;lt;/tt&amp;gt; in front of it:&lt;br /&gt;
&lt;br /&gt;
  // forceHighQuality&lt;br /&gt;
&lt;br /&gt;
That should fix the sky and make it render correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Sky rotates ===&lt;br /&gt;
&lt;br /&gt;
This problem only affects FMs with a dynamic sky (eg, moving clouds etc.).&lt;br /&gt;
&lt;br /&gt;
If you see the sky spinning it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also gives better loading times and cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it then try this. Note that it replaces dynamic sky with a static clear one so it might look odd in a stormy FM for example, but better than a spinning sky:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a new folder in your darkmod folder called materials.&lt;br /&gt;
* Within it create a plain text file named no_skybox.mtr.&lt;br /&gt;
* Paste in the following:&lt;br /&gt;
&lt;br /&gt;
 textures/smf/portal_sky&lt;br /&gt;
 {&lt;br /&gt;
 	qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
 	noFragment&lt;br /&gt;
 	&lt;br /&gt;
 	noimpact&lt;br /&gt;
 	nooverlays&lt;br /&gt;
 	forceOpaque&lt;br /&gt;
 	noShadows&lt;br /&gt;
 	{&lt;br /&gt;
 		forceHighQuality&lt;br /&gt;
 		blend add&lt;br /&gt;
 		cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
 		texgen skybox&lt;br /&gt;
 		texgen wobblesky .0 .0 .0&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== HDR-Lite Post-Processing problems ===&lt;br /&gt;
&lt;br /&gt;
Some owners of ATI graphics cards reported various artifacts when HDR-Lite Post-Processing was enabled. Among these artifacts are a distorted or upside-down screen and spinning sky. These can usually be fixed by disabling Catalyst AI, which also gives better loading times.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has also been suspected that HDR-Lite Post-Processing may lead to [[#Underwater performance poor|poor performance underwater]], see next point:&lt;br /&gt;
&lt;br /&gt;
===Underwater performance poor===&lt;br /&gt;
&lt;br /&gt;
Some people suffer from very low framerates underwater with HDR-Lite Post-Processing enabled. Currently, the only known fix to this problem is to set &#039;&#039;&#039;g_doubleVision&#039;&#039;&#039; to 0 in the console. This however disables the doubleVision effect completely, so that there is no underwater-blur any more. The murkiness still remains though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upside-down screen===&lt;br /&gt;
&lt;br /&gt;
If you get an upside-down screen, you can either turn off Catalyst AI if you have an ATI card or try turning off HDR-Lite Post-Processing in the advanced video options.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox. &lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ===&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the&lt;br /&gt;
following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t help, your system might run out of memory. Either upgrade to more than 1 Gbyte memory,&lt;br /&gt;
or try to close other applications before playing.&lt;br /&gt;
&lt;br /&gt;
Please see also the article about [[Performance Tweaks]] to improve the performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slow loading times ===&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game freezes for several seconds when opening doors===&lt;br /&gt;
The following problems :&lt;br /&gt;
&lt;br /&gt;
A) &amp;quot;game freezes and loads some data from hard drive while opening doors&amp;quot;&lt;br /&gt;
B) &amp;quot;while loading mission you are returned to the menu and need to restart loading&amp;quot;&lt;br /&gt;
&lt;br /&gt;
are often resolved by disabling EAX 4.0 HD in the Audio Settings menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game exits to menu after mission load, with renderpipe error in console===&lt;br /&gt;
&lt;br /&gt;
* {{Red|Version 1.06 does not use named pipes. This is a depreciated issue.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Symptoms:&#039;&#039;&#039; Missions are installed properly and will load, but after they reach 100% you are returned to the main menu or objectives screen. If you open the console (Ctrl-Alt-~ on US keyboards), you see one/both of these errors:&lt;br /&gt;
&lt;br /&gt;
 ERROR: Failed to open \\.\pipe\dm_renderpipe&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 ERROR: idRenderSystemLocal::uncrop currentcrop &amp;lt;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039; Some firewalls, notably &#039;&#039;Sunbelt Firewall&#039;&#039; (aka &#039;&#039;Kerio Firewall&#039;&#039;) are known to interfere with TDM&#039;s lightgem, &#039;&#039;even when &amp;quot;disabled&amp;quot;&#039;&#039;. To fix this problem, completely uninstall the firewall and get a different one instead.&lt;br /&gt;
&lt;br /&gt;
Related [http://bugs.angua.at/view.php?id=543 #543]: Consider using glReadPixels for lightgem instead of named pipes.&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;COULD NOT FIND TDMLAUNCHER&amp;quot; when installing an FM===&lt;br /&gt;
&lt;br /&gt;
If you receive this error message you should check the start-arguments of DOOM3.exe / tdmlauncher.exe. Arguments are stored in darkmod/dmargs.txt and a faulty syntax e.g. a missing &amp;quot;+&amp;quot; before a &amp;quot;set&amp;quot;-command, will lead to this error message. Steam users are advised to remove any launch-options from Doom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The sound lags behind the picture===&lt;br /&gt;
&lt;br /&gt;
This seems to happen on some Linux Distributions with PulseAudio. Doom&#039;s sound engine defaults to ALSA, you can try to use OSS instead:&lt;br /&gt;
&lt;br /&gt;
Add the following to your &#039;&#039;dmargs.txt&#039;&#039; (it is in &#039;&#039;~/.doom/darkmod/&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 +set s_driver oss&lt;br /&gt;
&lt;br /&gt;
If your system does not provide OSS or a working OSS-emulation (try &#039;&#039;padsp ./tmdlauncher-linux&#039;&#039;), reset this to &#039;&#039;best&#039;&#039; which means ALSA.&lt;br /&gt;
&lt;br /&gt;
While OSS or ALSA deal directly with the sound hardware, PulseAudio is a soundserver that puts itself between the application (doom3) and ALSA. Your goal is to bypass the PA-part while playing TDM.&lt;br /&gt;
&lt;br /&gt;
You can either disable the PulseAudio daemon temporarily or connect Doom directly to ALSA.&lt;br /&gt;
&lt;br /&gt;
To disable PA, create a file named &#039;&#039;client.conf&#039;&#039; in &#039;&#039;~/.pulse&#039;&#039; which contains:&lt;br /&gt;
&lt;br /&gt;
 autospawn=no&lt;br /&gt;
&lt;br /&gt;
Then open a terminal and type:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -k&lt;br /&gt;
&lt;br /&gt;
When sound playback fails, make sure you have &#039;&#039;s_driver&#039;&#039; set to &#039;&#039;best&#039;&#039;, and &#039;&#039;s_alsa_pcm&#039;&#039; to &#039;&#039;default&#039;&#039;. When it works, you propably want to adjust volume settings outside TDM. Try &#039;&#039;alsamixer&#039;&#039; (in a terminal).&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished playing, turn PA back on:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -D&lt;br /&gt;
&lt;br /&gt;
starts the daemon. Changing &#039;&#039;autospawn&#039;&#039; to &#039;&#039;yes&#039;&#039; should prevent you from doing this manually after every reboot.    :)&lt;br /&gt;
&lt;br /&gt;
The other way, just bypassing PA, requires some knowledge about your sound hardware. Type&lt;br /&gt;
&lt;br /&gt;
 aplay -L&lt;br /&gt;
&lt;br /&gt;
This gives you a long list of your ALSA playback devices, three lines for each, first line is &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;. Choose the one with PCM Playback that your speakers are connected to and add&lt;br /&gt;
&lt;br /&gt;
 +set s_alsa_pcm &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to &#039;&#039;dmargs.txt&#039;&#039;. If &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039; is not convenient for you just try something like hw:1,0 if you know what you are doing, but be aware abstract designations like &#039;&#039;default&#039;&#039; will get &amp;quot;hijacked&amp;quot; by PA.&lt;br /&gt;
&lt;br /&gt;
=== Changing the screen resolution/aspect ratio does nothing!? ===&lt;br /&gt;
&lt;br /&gt;
These changes require a restart of Doom to work. Alternatively the command vid_restart can be issued at the console. It can take quite some time to execute this command, depending on whether or not you&#039;re already ingame. It will still be a lot faster than restarting and reloading the game though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Catalyst AI in recent AMD ATI drivers ===&lt;br /&gt;
&lt;br /&gt;
From (at least) Catalyst versions 10.12 and beyond, the ability to disable Catalyst AI properly&lt;br /&gt;
has been changed or removed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Rage3d and Guru3d have advised using &amp;quot;Radeon Pro&amp;quot; to address this.&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
* 1) Remove Catalyst Control Center (removing all ATI drivers recommended then re-install just the Display driver)&lt;br /&gt;
* 2) Download and install &amp;quot;Radeon Pro&amp;quot; [http://forums.guru3d.com/showthread.php?t=322031 Radeon Pro Thread at Guru3D]&lt;br /&gt;
* 3) Create a profile as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If you&#039;re using RadeonPro, create a profile for the game you want to disable Catalyst AI. &lt;br /&gt;
Right-click the newly created profile, keep left shift key pressed and choose &lt;br /&gt;
Open Location on context-menu, this will open the profile&#039;s XML definition. &lt;br /&gt;
Append a new line and add entry like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Property name=&amp;quot;CatalystAI&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and start the game. CatalystAI should be disabled.&lt;br /&gt;
&lt;br /&gt;
I also recommend to open ___GlobalProfile.xml &lt;br /&gt;
(found on same directory where your profile is saved) &lt;br /&gt;
and look for &amp;quot;CatalystAI&amp;quot; entry, it must be equal to &amp;quot;1&amp;quot; &lt;br /&gt;
otherwise CatalystAI will be kept disabled after you exit your game.&lt;br /&gt;
&lt;br /&gt;
CFX disabled by setting CatalystAI to 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another alternate method for Windows users:&lt;br /&gt;
&lt;br /&gt;
* 1) Obtain a copy of the free &amp;quot;ATI Tray Tools&amp;quot; by Ray Adams from [http://downloads.guru3d.com/download.php?det=733 Guru3d].&lt;br /&gt;
&lt;br /&gt;
* 2) Install it into your Windows tray.&lt;br /&gt;
&lt;br /&gt;
* 3) Right-click it.&lt;br /&gt;
&lt;br /&gt;
* 4) Select Direct 3d -&amp;gt; Catalyst AI -&amp;gt; Off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Many random crash behaviors seen by Nvidia users can be resolve by the following steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting &amp;quot;Malloc Failure for #######&amp;quot; crash-to-desktop ===&lt;br /&gt;
&lt;br /&gt;
Because Doom 3 is a 32-bit game, it can only utilize a certain amount of RAM. When Doom 3 needs more memory, but cannot allocate anymore, it crashes with an error saying something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shutdown event system&lt;br /&gt;
--------------------------------------&lt;br /&gt;
malloc failure for 3145781&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you run into malloc failures, it is suggested to try the following:&lt;br /&gt;
&lt;br /&gt;
1) Edit your darkmod.cfg and use the following:&lt;br /&gt;
 seta image_downSizeBump &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_downSizeBumpLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
These will reduce the bumpmap size. Memory impact will be few hundred megabytes lower, at the expensee of very minor blurring of texture quality.&lt;br /&gt;
&lt;br /&gt;
2) If the above does not help you it is recommended you try&lt;br /&gt;
 seta image_downSize &amp;quot;1&amp;quot; &lt;br /&gt;
 seta com_videoRam &amp;quot;512&amp;quot; (or however much video RAM you have).&lt;br /&gt;
&lt;br /&gt;
These will reduce all texture sizes. Memory impact will be much lower, but the graphics are visually pixelated, depending on the com_videoRam number. But at least the mission will be more likely run with systems with low RAM.&lt;br /&gt;
&lt;br /&gt;
A possible solution is to patch Doom3.exe with a [http://www.ntcore.com/4gb_patch.php 4GB Patcher] to allow the game to allocate more memory, but the TheDarkMod.exe should already be using large memory space.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Oversized in Fullscreen Mode (Image is too large to fit the screen area available) ===&lt;br /&gt;
Windows 7 Aero desktop is known to make the screen too large in fullscreen mode. This can be remedied by setting Windows 7 Aero to Basic.&lt;br /&gt;
&lt;br /&gt;
This issue is discussed in more detail [http://forums.thedarkmod.com/topic/14622-oversized-title-screen-solved-caused-by-aero/ HERE].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Known Bugs]]&lt;br /&gt;
* [[Gameplay]]&lt;br /&gt;
&lt;br /&gt;
{{installation}} {{general}}&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18100</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=18100"/>
		<updated>2015-02-10T06:59:24Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Updater (tdm_update.exe) closes almost as soon as it&amp;#039;s started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{important|headline=Important|text=This FAQ relates to the full TDM release version only. For players of the pre-release demos such as &#039;&#039;&#039;[[Thief&#039;s Den]]&#039;&#039;&#039; and &#039;&#039;&#039;[[Saint_Lucia|Tears of Saint Lucia]]&#039;&#039;&#039; please refer to the &#039;&#039;&#039;[[FAQ (Demo Releases)|Demo FAQ]]&#039;&#039;&#039;.&#039;&#039;&#039;}}&lt;br /&gt;
&lt;br /&gt;
== What do I need to play The Dark Mod? ==&lt;br /&gt;
&lt;br /&gt;
With the release of TDM 2.0, you no longer need Doom 3 installed.  The Dark Mod is completely standalone (and free!).  You need only follow the installation instructions on the website to start playing the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported Operating Systems ==&lt;br /&gt;
&lt;br /&gt;
=== Which Windows versions can I use? ===&lt;br /&gt;
&lt;br /&gt;
The following versions of windows have been tested and are known to work : Windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows Server 2008, Windows Server 2003 in both 32bit and 64bit flavours.&lt;br /&gt;
&lt;br /&gt;
==== Windows 8.1 Preview ====&lt;br /&gt;
&lt;br /&gt;
Thus far, on Intel HD graphics, TDM will not start unless it is started in Windows 7 compatibility mode:&lt;br /&gt;
&lt;br /&gt;
Right click &amp;quot;TheDarkMod.exe&amp;quot; choose &amp;quot;Properties&amp;quot;, click the &amp;quot;Compatibility&amp;quot; tab and select Windows 7 from the dropdown&lt;br /&gt;
list.&lt;br /&gt;
&lt;br /&gt;
This may not be representative of other graphic hardware and may be due to early Windows 8.1 driver support.&lt;br /&gt;
&lt;br /&gt;
==== PAE Enabled ====&lt;br /&gt;
&lt;br /&gt;
One user with Windows XP Pro SP3 and an AMD Phenom processor reported problems starting Doom 3 due to having PAE enabled.&lt;br /&gt;
&lt;br /&gt;
[http://modetwo.net/darkmod/index.php?/topic/12471-error-doom-3/ Thread]&lt;br /&gt;
&lt;br /&gt;
=== Does it run in Linux? ===&lt;br /&gt;
Yes, Linux is supported.&lt;br /&gt;
&lt;br /&gt;
=== Does it run in 64 Bit Linux? ===&lt;br /&gt;
Yes, Linux 64 bit is supported. In addition to the steps above, you need 32 bit compatibility libraries, since Doom3 is 32 bit only:&lt;br /&gt;
* On &#039;&#039;&#039;SuSE&#039;&#039;&#039;, they should be included.&lt;br /&gt;
* On Ubuntu/Kubuntu, install the package &#039;&#039;&#039;ia32&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For TDM after 1.0, this step should be &#039;&#039;&#039;no&#039;&#039;&#039; longer neccessary:&lt;br /&gt;
&lt;br /&gt;
* Since you cannot install 32 bit libraries on a 64 bit system with the normal package manager, you should use [http://ubuntuforums.org/showthread.php?t=474790 getlibs] to install &#039;&#039;&#039;libmng&#039;&#039;&#039; and the boost filesystem lib:&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs libmng.so.1&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;getlibs -l libboost-filesystem1.34.1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about Gentoo? ===&lt;br /&gt;
Yes. It&#039;s not &amp;quot;officially&amp;quot; supported (the team doesn&#039;t test it specifically), however several users have reported success running TDM under Gentoo.&lt;br /&gt;
&lt;br /&gt;
=== What about Ubuntu 8.10? ===&lt;br /&gt;
Yes. As of this writing you will need to install the &#039;&#039;&#039;libboost-filesystem&#039;&#039;&#039; package.&lt;br /&gt;
&lt;br /&gt;
=== GLIBCXX_3.4.9 errors ===&lt;br /&gt;
&lt;br /&gt;
If you receive an error about &amp;lt;tt&amp;gt;GLIBCXX_3.4.9&amp;lt;/tt&amp;gt;, delete or rename the files &amp;lt;code&amp;gt;/usr/local/games/doom3/libstdc++.so.6&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/usr/local/games/doom3/libgcc_s.so.1.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this doesn&#039;t resolve the error and you have an old version of GCC, then you may have to upgrade. It has been [http://modetwo.net/darkmod/index.php?/topic/9982-the-dark-mod-doom3-in-linux/ confirmed] that, at least under Gentoo, GCC 4.1 does not work with TDM but GCC 4.3 and GCC 4.4 are compatible.&lt;br /&gt;
&lt;br /&gt;
=== Does it run on Mac OS X?===&lt;br /&gt;
TDM 1.08 is supported, but 2.0 is not. See [[Installation]].&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
=== Does TDM support widescreen resolutions? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Choose &amp;quot;16:9&amp;quot; or &amp;quot;16:10&amp;quot; in the in-game &#039;&#039;Settings&#039;&#039; menu, and select the appropriate resolution. Note that you need to restart the game to have the new setting in effect.&lt;br /&gt;
&lt;br /&gt;
If the native resolution of your wide screen monitor is not listed, you can enter it into &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; by changing the following entries like so:&lt;br /&gt;
&lt;br /&gt;
 set r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 set r_customwidth &amp;quot;1280&amp;quot;&lt;br /&gt;
 set r_customheight &amp;quot;800&amp;quot;&lt;br /&gt;
 seta r_aspectratio &amp;quot;2&amp;quot;            // means 16:10, &amp;quot;1&amp;quot; is 16:9, other ratios are not yet supporred&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
==== What about TV resolutions like 1360x768? ====&lt;br /&gt;
&lt;br /&gt;
If you have a wide-screen TV which uses any non-standard resolution, like 1360x768 (instead of 1366x768), then please use the following:&lt;br /&gt;
&lt;br /&gt;
 seta r_customWidth &amp;quot;1360&amp;quot;&lt;br /&gt;
 seta r_customHeight &amp;quot;768&amp;quot;&lt;br /&gt;
 seta r_mode &amp;quot;-1&amp;quot;&lt;br /&gt;
 seta r_aspectratio 2&lt;br /&gt;
 seta g_fov &amp;quot;100&amp;quot;                  // or any other suitable value&lt;br /&gt;
&lt;br /&gt;
Alternatively, see the manual of your TV on the possibility to switch it to a &amp;quot;1:1&amp;quot; pixel mapping, or &amp;quot;monitor mode&amp;quot; or &amp;quot;computer mode&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here is some background information: http://hd.engadget.com/2006/04/21/whats-the-deal-with-1366-x-768/&lt;br /&gt;
&lt;br /&gt;
{{infobox|If you get performance problems, please consider using a lower resolution and taking a look at [[Performance Tweaks]].}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
It is hard to answer questions on why something fails, because wildly different systems cause wildly different symptoms. If the following section does not help you, please ask at our [http://www.modetwo.net/darkmod forums].&lt;br /&gt;
&lt;br /&gt;
For any solutions below that refer to &amp;quot;disabling Catalyst AI&amp;quot;, if you discover you can not use ATI&#039;s tools to do so, alternate methods are discussed in [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t load saved games -- TDM gives error about &amp;quot;can&#039;t load .script&amp;quot; file ===&lt;br /&gt;
&lt;br /&gt;
Make sure your folder is called &amp;quot;darkmod&amp;quot;.  If it isn&#039;t, rename it.  That should make the problem go away.  I&#039;ve heard reports that having spaces in the names of any folders in the path can cause problems, but haven&#039;t confirmed it.  Something to try if it still happens and your folder is already called &amp;quot;darkmod&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) closes almost as soon as it&#039;s started ===&lt;br /&gt;
&lt;br /&gt;
See the [[Tdm_update#Updater_closes_almost_as_soon_as_it.27s_started|main article on tdm_update]].&lt;br /&gt;
&lt;br /&gt;
=== Updater (tdm_update.exe) crashes at some point during the update ===&lt;br /&gt;
&lt;br /&gt;
This can happen if the Darkmod folder is set to &amp;quot;read only&amp;quot;. You fix it by right clicking on the folder, clicking properties, and unchecking the box that says &amp;quot;read only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000: freeaddrinfo cannot be found in WS2_32.DLL ===&lt;br /&gt;
Please refer to the main article [[TDM in Windows 2000]] to work around this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===FM won&#039;t install manually===&lt;br /&gt;
&lt;br /&gt;
If you are running Dark Mod under Linux and have edited the file darkmod/currentfm.txt this might prevent the FM from installing. This may be fixed in an update but apparently editing using notepad under Wine works OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FMs downloaded but don&#039;t show in menu list===&lt;br /&gt;
&lt;br /&gt;
You have downloaded some FMs but they don&#039;t show on Dark Mod&#039;s New Missions list. Possible causes:&lt;br /&gt;
&lt;br /&gt;
* You must not extract the pk4s or zip files but put them into the darkmod/fms folder (or alternatively you can create the FM folder in there eg, darkmod/fms/chalice for chalice.pk4 or chalice.zip.&lt;br /&gt;
* Early versions of Dark Mod cannot handle zip suffixes. Solution: rename to .pk4 or run tdm_update to get the latest version of Dark Mod.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== FM downloaded but won&#039;t play ===&lt;br /&gt;
&lt;br /&gt;
If you have downloaded an FM you might see it in the New Missions List but can&#039;t get it to play. These are almost always an install problem. These are some of the causes and cures:&lt;br /&gt;
&lt;br /&gt;
FMs (fan missions) are archives and in early versions of Dark Mod MUST be suffixed .pk4 not zip. Apparently Internet Explorer 8 may change it from pk4 to zip during download without telling you. You need to rename it back if running an early version of Dark Mod else run tdm_update to update and then zip files are OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You do NOT need to extract the pk4 archives to install or play. Just download into or move the pk4 into the darkmod\fms folder. Optionally you can create a folder of the same name as the map and put it in there, eg, darkmod\fms\chalice but there is no need because Dark Mod will create that automatically. Just make sure your pk4 goes, unopened, into the fms folder, then run TheDarkMod.exe&lt;br /&gt;
&lt;br /&gt;
If you have done the above but see for example, a blank objectives screen and no briefing then it is still almost certainly an install error. I recommend you do a clean sweep if in doubt:&lt;br /&gt;
* Exit Dark Mod&lt;br /&gt;
* Delete darkmod\currentfm.txt (this just uninstalls any FM)&lt;br /&gt;
* Move the pk4 into the darkmod\fms folder if it is not already there.&lt;br /&gt;
* Delete the darkmod\fms\FMname folder if any, eg, darkmod\fms\chalice. Don&#039;t worry if there isn&#039;t one; it will be created automatically later.&lt;br /&gt;
&lt;br /&gt;
So all that is left is the pk4 in the fms folder. Now run TheDarkMod.exe. The FM should be in the list in the New Missions menu. Re-install it and you should now be able to play it.&lt;br /&gt;
&lt;br /&gt;
=== The game hangs at Dark Mod screen/ locks up while turning on vsynch ===&lt;br /&gt;
Catalyst Control Center above 10.8 for ATI cards has a performance slider for V-Synch. Setting that slider to Quality (Always On)&lt;br /&gt;
fixes this issue. If set lower than quality and it is set to on in game it will freeze.&lt;br /&gt;
(tested specifically in CC 10-11)&lt;br /&gt;
&lt;br /&gt;
=== The game crashes on load ===&lt;br /&gt;
Make sure that:&lt;br /&gt;
* Your system meets at least the minimum system specs.&lt;br /&gt;
* You have enough free main memory. Try closing a few running programs like Outlook, Anti-Virus or torrent clients.&lt;br /&gt;
* Nvidia &amp;quot;Threaded Optimizations&amp;quot; are causing Doom 3 Mod stability issues (see: [[#Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;|Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot;]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it, you probably receive an error message referencing an &amp;quot;Unknown event&amp;quot; at startup, like the screenshot below illustrates.&lt;br /&gt;
&lt;br /&gt;
[[Image:ErrorSetEntityRelation.jpg]]&lt;br /&gt;
&lt;br /&gt;
Here are a couple of known problems and their solutions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sometimes, the procedure fails due to &#039;&#039;&#039;spaces in the installation path&#039;&#039;&#039;. Try extracting the gamex86.dll manually using Winzip or similar or install Doom 3 in a different directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You have a &#039;&#039;&#039;firewall&#039;&#039;&#039; installed that prevents the copy procedure, because since version 1.03, TDM has a built-in mission downloader. This misbehavior has been reported for the &#039;&#039;&#039;COMODO Firewall&#039;&#039;&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;It is also possible that an &#039;&#039;&#039;old version of gamex86.dll&#039;&#039;&#039; (or gamex86.so) is lying around in your Doom 3 folder. Delete it and try again.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, screen mostly black ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Tdm missing textures.jpg|right|240px|Black textures]]&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;darkmod.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Textures are missing, shadows are pitch black ===&lt;br /&gt;
&lt;br /&gt;
Try disabling the AGP surface accelerator in DXDIAG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Graphic Corruption ===&lt;br /&gt;
&lt;br /&gt;
One report we had was for a Radeon ATI HD 4650, catalyst 10.9. This screen corruption as I understand it was heavy pixelation even on the menus. Closing down Xfire fixed it. &amp;quot;I fiddled with the xfire Doom 3 configuration through the xfire_games.ini, and determined it has to do with InGameFlags portion. For some reason the settings in that were interfering with doom 3, and after I removed some things from there, I was still able to run xfire, and doom 3 was still able to look proper.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== The briefing is very fuzzy ===&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt;  folder and check that the following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
 seta image_roundDown &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_forceDownSize &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_downSize &amp;quot;0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== The sky is corrupted ===&lt;br /&gt;
&lt;br /&gt;
You either see black sky, or fragments of other textures. This seems only to happen on Geforce 6800 cards.&lt;br /&gt;
&lt;br /&gt;
There are two fixes for this:&lt;br /&gt;
&lt;br /&gt;
As a quick fix you can rename the following folder:&lt;br /&gt;
&lt;br /&gt;
 env/skyboxes/skybox_darkland_ne&lt;br /&gt;
&lt;br /&gt;
to a different name. That will result in black sky.&lt;br /&gt;
&lt;br /&gt;
Alternatively, edit the file &amp;lt;tt&amp;gt;materials/tdm_sky.mtr&amp;lt;/tt&amp;gt; with &#039;&#039;&#039;Wordpad&#039;&#039;&#039; or a different editor and&lt;br /&gt;
find the sky material named &#039;&#039;&#039;textures/darkmod/nature/skybox/skybox_darkland_NE&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 //Author: Dram&lt;br /&gt;
 //skybox_ocean with ocean replaced with dark land&lt;br /&gt;
 //Moon moved to north east by Fidcal&lt;br /&gt;
 textures/darkmod/nature/skybox/skybox_darkland_NE&lt;br /&gt;
    {&lt;br /&gt;
    qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
    noFragment&lt;br /&gt;
    noshadows&lt;br /&gt;
    noimpact&lt;br /&gt;
    nooverlays&lt;br /&gt;
    forceOpaque&lt;br /&gt;
    {&lt;br /&gt;
        forceHighQuality&lt;br /&gt;
        blend add&lt;br /&gt;
        cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
        texgen skybox&lt;br /&gt;
        texgen wobblesky .0 .0 .0&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this declaration, comment out the line that reads &#039;&#039;&#039;forceHighQuality&#039;&#039;&#039; by adding &amp;lt;tt&amp;gt;//&amp;lt;/tt&amp;gt; in front of it:&lt;br /&gt;
&lt;br /&gt;
  // forceHighQuality&lt;br /&gt;
&lt;br /&gt;
That should fix the sky and make it render correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The Sky rotates ===&lt;br /&gt;
&lt;br /&gt;
This problem only affects FMs with a dynamic sky (eg, moving clouds etc.).&lt;br /&gt;
&lt;br /&gt;
If you see the sky spinning it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also gives better loading times and cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t fix it then try this. Note that it replaces dynamic sky with a static clear one so it might look odd in a stormy FM for example, but better than a spinning sky:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create a new folder in your darkmod folder called materials.&lt;br /&gt;
* Within it create a plain text file named no_skybox.mtr.&lt;br /&gt;
* Paste in the following:&lt;br /&gt;
&lt;br /&gt;
 textures/smf/portal_sky&lt;br /&gt;
 {&lt;br /&gt;
 	qer_editorimage env/skyboxes/skybox_ocean/ocean_ed&lt;br /&gt;
 	noFragment&lt;br /&gt;
 	&lt;br /&gt;
 	noimpact&lt;br /&gt;
 	nooverlays&lt;br /&gt;
 	forceOpaque&lt;br /&gt;
 	noShadows&lt;br /&gt;
 	{&lt;br /&gt;
 		forceHighQuality&lt;br /&gt;
 		blend add&lt;br /&gt;
 		cameraCubeMap env/skyboxes/skybox_darkland_ne/darkland_NE&lt;br /&gt;
 		texgen skybox&lt;br /&gt;
 		texgen wobblesky .0 .0 .0&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
=== HDR-Lite Post-Processing problems ===&lt;br /&gt;
&lt;br /&gt;
Some owners of ATI graphics cards reported various artifacts when HDR-Lite Post-Processing was enabled. Among these artifacts are a distorted or upside-down screen and spinning sky. These can usually be fixed by disabling Catalyst AI, which also gives better loading times.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox.&lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has also been suspected that HDR-Lite Post-Processing may lead to [[#Underwater performance poor|poor performance underwater]], see next point:&lt;br /&gt;
&lt;br /&gt;
===Underwater performance poor===&lt;br /&gt;
&lt;br /&gt;
Some people suffer from very low framerates underwater with HDR-Lite Post-Processing enabled. Currently, the only known fix to this problem is to set &#039;&#039;&#039;g_doubleVision&#039;&#039;&#039; to 0 in the console. This however disables the doubleVision effect completely, so that there is no underwater-blur any more. The murkiness still remains though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upside-down screen===&lt;br /&gt;
&lt;br /&gt;
If you get an upside-down screen, you can either turn off Catalyst AI if you have an ATI card or try turning off HDR-Lite Post-Processing in the advanced video options.&lt;br /&gt;
&lt;br /&gt;
To turn off Catalyst AI, open your Catalyst control panel, go to &#039;graphics&#039; at the top left, select &#039;3d&#039; from the dropdown list and on the new menu below, select &#039;AI&#039;. Now select the &#039;Disable Catalyst A.I.&#039; checkbox. &lt;br /&gt;
&lt;br /&gt;
(For more recent Catalyst versions see: [[#Disable Catalyst AI in recent AMD ATI drivers|Disable Catalyst AI in recent AMD ATI drivers]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The game is &#039;&#039;&#039;very&#039;&#039;&#039; slow! ===&lt;br /&gt;
&lt;br /&gt;
If you get less than 10 FPS, or the game even stutters, please try this:&lt;br /&gt;
&lt;br /&gt;
Look into your &#039;&#039;&#039;DoomConfig.cfg&#039;&#039;&#039; inside your &amp;lt;tt&amp;gt;darkmod&amp;lt;/tt&amp;gt; folder and check that the&lt;br /&gt;
following settings are like shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_usePrecompressedTextures &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;2&amp;quot;&lt;br /&gt;
 seta image_useAllFormats &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_preload &amp;quot;1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t help, your system might run out of memory. Either upgrade to more than 1 Gbyte memory,&lt;br /&gt;
or try to close other applications before playing.&lt;br /&gt;
&lt;br /&gt;
Please see also the article about [[Performance Tweaks]] to improve the performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slow loading times ===&lt;br /&gt;
&lt;br /&gt;
If you find an FM is very slow to load it may be an ATI graphics card problem. One report says this was cured by turning off Catalyst AI. Also cures [[#HDR-Lite Post-Processing problems|HDR-Lite Post-Processing Problems]].&lt;br /&gt;
&lt;br /&gt;
Changing the following settings to 0 will also reduce loading time, but be warned: if you have a lower-end system, poor graphics card, or low ram, you will likely notice a performance hit ingame since you will now be using uncompressed textures.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;max-width:35em&amp;quot;&amp;gt;&lt;br /&gt;
 seta image_useNormalCompression &amp;quot;0&amp;quot;&lt;br /&gt;
 seta image_useCompression &amp;quot;0&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game freezes for several seconds when opening doors===&lt;br /&gt;
The following problems :&lt;br /&gt;
&lt;br /&gt;
A) &amp;quot;game freezes and loads some data from hard drive while opening doors&amp;quot;&lt;br /&gt;
B) &amp;quot;while loading mission you are returned to the menu and need to restart loading&amp;quot;&lt;br /&gt;
&lt;br /&gt;
are often resolved by disabling EAX 4.0 HD in the Audio Settings menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Game exits to menu after mission load, with renderpipe error in console===&lt;br /&gt;
&lt;br /&gt;
* {{Red|Version 1.06 does not use named pipes. This is a depreciated issue.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Symptoms:&#039;&#039;&#039; Missions are installed properly and will load, but after they reach 100% you are returned to the main menu or objectives screen. If you open the console (Ctrl-Alt-~ on US keyboards), you see one/both of these errors:&lt;br /&gt;
&lt;br /&gt;
 ERROR: Failed to open \\.\pipe\dm_renderpipe&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 ERROR: idRenderSystemLocal::uncrop currentcrop &amp;lt;1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039; Some firewalls, notably &#039;&#039;Sunbelt Firewall&#039;&#039; (aka &#039;&#039;Kerio Firewall&#039;&#039;) are known to interfere with TDM&#039;s lightgem, &#039;&#039;even when &amp;quot;disabled&amp;quot;&#039;&#039;. To fix this problem, completely uninstall the firewall and get a different one instead.&lt;br /&gt;
&lt;br /&gt;
Related [http://bugs.angua.at/view.php?id=543 #543]: Consider using glReadPixels for lightgem instead of named pipes.&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;COULD NOT FIND TDMLAUNCHER&amp;quot; when installing an FM===&lt;br /&gt;
&lt;br /&gt;
If you receive this error message you should check the start-arguments of DOOM3.exe / tdmlauncher.exe. Arguments are stored in darkmod/dmargs.txt and a faulty syntax e.g. a missing &amp;quot;+&amp;quot; before a &amp;quot;set&amp;quot;-command, will lead to this error message. Steam users are advised to remove any launch-options from Doom.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The sound lags behind the picture===&lt;br /&gt;
&lt;br /&gt;
This seems to happen on some Linux Distributions with PulseAudio. Doom&#039;s sound engine defaults to ALSA, you can try to use OSS instead:&lt;br /&gt;
&lt;br /&gt;
Add the following to your &#039;&#039;dmargs.txt&#039;&#039; (it is in &#039;&#039;~/.doom/darkmod/&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
 +set s_driver oss&lt;br /&gt;
&lt;br /&gt;
If your system does not provide OSS or a working OSS-emulation (try &#039;&#039;padsp ./tmdlauncher-linux&#039;&#039;), reset this to &#039;&#039;best&#039;&#039; which means ALSA.&lt;br /&gt;
&lt;br /&gt;
While OSS or ALSA deal directly with the sound hardware, PulseAudio is a soundserver that puts itself between the application (doom3) and ALSA. Your goal is to bypass the PA-part while playing TDM.&lt;br /&gt;
&lt;br /&gt;
You can either disable the PulseAudio daemon temporarily or connect Doom directly to ALSA.&lt;br /&gt;
&lt;br /&gt;
To disable PA, create a file named &#039;&#039;client.conf&#039;&#039; in &#039;&#039;~/.pulse&#039;&#039; which contains:&lt;br /&gt;
&lt;br /&gt;
 autospawn=no&lt;br /&gt;
&lt;br /&gt;
Then open a terminal and type:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -k&lt;br /&gt;
&lt;br /&gt;
When sound playback fails, make sure you have &#039;&#039;s_driver&#039;&#039; set to &#039;&#039;best&#039;&#039;, and &#039;&#039;s_alsa_pcm&#039;&#039; to &#039;&#039;default&#039;&#039;. When it works, you propably want to adjust volume settings outside TDM. Try &#039;&#039;alsamixer&#039;&#039; (in a terminal).&lt;br /&gt;
&lt;br /&gt;
When you&#039;re finished playing, turn PA back on:&lt;br /&gt;
&lt;br /&gt;
 pulseaudio -D&lt;br /&gt;
&lt;br /&gt;
starts the daemon. Changing &#039;&#039;autospawn&#039;&#039; to &#039;&#039;yes&#039;&#039; should prevent you from doing this manually after every reboot.    :)&lt;br /&gt;
&lt;br /&gt;
The other way, just bypassing PA, requires some knowledge about your sound hardware. Type&lt;br /&gt;
&lt;br /&gt;
 aplay -L&lt;br /&gt;
&lt;br /&gt;
This gives you a long list of your ALSA playback devices, three lines for each, first line is &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039;. Choose the one with PCM Playback that your speakers are connected to and add&lt;br /&gt;
&lt;br /&gt;
 +set s_alsa_pcm &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to &#039;&#039;dmargs.txt&#039;&#039;. If &#039;&#039;&amp;lt;name&amp;gt;&#039;&#039; is not convenient for you just try something like hw:1,0 if you know what you are doing, but be aware abstract designations like &#039;&#039;default&#039;&#039; will get &amp;quot;hijacked&amp;quot; by PA.&lt;br /&gt;
&lt;br /&gt;
=== Changing the screen resolution/aspect ratio does nothing!? ===&lt;br /&gt;
&lt;br /&gt;
These changes require a restart of Doom to work. Alternatively the command vid_restart can be issued at the console. It can take quite some time to execute this command, depending on whether or not you&#039;re already ingame. It will still be a lot faster than restarting and reloading the game though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Catalyst AI in recent AMD ATI drivers ===&lt;br /&gt;
&lt;br /&gt;
From (at least) Catalyst versions 10.12 and beyond, the ability to disable Catalyst AI properly&lt;br /&gt;
has been changed or removed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Rage3d and Guru3d have advised using &amp;quot;Radeon Pro&amp;quot; to address this.&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
* 1) Remove Catalyst Control Center (removing all ATI drivers recommended then re-install just the Display driver)&lt;br /&gt;
* 2) Download and install &amp;quot;Radeon Pro&amp;quot; [http://forums.guru3d.com/showthread.php?t=322031 Radeon Pro Thread at Guru3D]&lt;br /&gt;
* 3) Create a profile as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If you&#039;re using RadeonPro, create a profile for the game you want to disable Catalyst AI. &lt;br /&gt;
Right-click the newly created profile, keep left shift key pressed and choose &lt;br /&gt;
Open Location on context-menu, this will open the profile&#039;s XML definition. &lt;br /&gt;
Append a new line and add entry like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Property name=&amp;quot;CatalystAI&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save the file and start the game. CatalystAI should be disabled.&lt;br /&gt;
&lt;br /&gt;
I also recommend to open ___GlobalProfile.xml &lt;br /&gt;
(found on same directory where your profile is saved) &lt;br /&gt;
and look for &amp;quot;CatalystAI&amp;quot; entry, it must be equal to &amp;quot;1&amp;quot; &lt;br /&gt;
otherwise CatalystAI will be kept disabled after you exit your game.&lt;br /&gt;
&lt;br /&gt;
CFX disabled by setting CatalystAI to 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another alternate method for Windows users:&lt;br /&gt;
&lt;br /&gt;
* 1) Obtain a copy of the free &amp;quot;ATI Tray Tools&amp;quot; by Ray Adams from [http://downloads.guru3d.com/download.php?det=733 Guru3d].&lt;br /&gt;
&lt;br /&gt;
* 2) Install it into your Windows tray.&lt;br /&gt;
&lt;br /&gt;
* 3) Right-click it.&lt;br /&gt;
&lt;br /&gt;
* 4) Select Direct 3d -&amp;gt; Catalyst AI -&amp;gt; Off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Disable Nvidia &amp;quot;Threaded Optimizations&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
Many random crash behaviors seen by Nvidia users can be resolve by the following steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Nvidia Control Panel -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Manage 3D Settings -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bottom half of list locate &amp;quot;Threaded Optimization&amp;quot; &amp;lt;-- Set to NO / Off&lt;br /&gt;
&lt;br /&gt;
Also set &amp;quot;Multi-display/Mixed GPU acceleration&amp;quot; to &amp;quot;Single display performance mode&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting &amp;quot;Malloc Failure for #######&amp;quot; crash-to-desktop ===&lt;br /&gt;
&lt;br /&gt;
Because Doom 3 is a 32-bit game, it can only utilize a certain amount of RAM. When Doom 3 needs more memory, but cannot allocate anymore, it crashes with an error saying something like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Shutdown event system&lt;br /&gt;
--------------------------------------&lt;br /&gt;
malloc failure for 3145781&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you run into malloc failures, it is suggested to try the following:&lt;br /&gt;
&lt;br /&gt;
1) Edit your darkmod.cfg and use the following:&lt;br /&gt;
 seta image_downSizeBump &amp;quot;1&amp;quot;&lt;br /&gt;
 seta image_downSizeBumpLimit &amp;quot;256&amp;quot;&lt;br /&gt;
&lt;br /&gt;
These will reduce the bumpmap size. Memory impact will be few hundred megabytes lower, at the expensee of very minor blurring of texture quality.&lt;br /&gt;
&lt;br /&gt;
2) If the above does not help you it is recommended you try&lt;br /&gt;
 seta image_downSize &amp;quot;1&amp;quot; &lt;br /&gt;
 seta com_videoRam &amp;quot;512&amp;quot; (or however much video RAM you have).&lt;br /&gt;
&lt;br /&gt;
These will reduce all texture sizes. Memory impact will be much lower, but the graphics are visually pixelated, depending on the com_videoRam number. But at least the mission will be more likely run with systems with low RAM.&lt;br /&gt;
&lt;br /&gt;
A possible solution is to patch Doom3.exe with a [http://www.ntcore.com/4gb_patch.php 4GB Patcher] to allow the game to allocate more memory, but the TheDarkMod.exe should already be using large memory space.&lt;br /&gt;
&lt;br /&gt;
=== Screen is Oversized in Fullscreen Mode (Image is too large to fit the screen area available) ===&lt;br /&gt;
Windows 7 Aero desktop is known to make the screen too large in fullscreen mode. This can be remedied by setting Windows 7 Aero to Basic.&lt;br /&gt;
&lt;br /&gt;
This issue is discussed in more detail [http://forums.thedarkmod.com/topic/14622-oversized-title-screen-solved-caused-by-aero/ HERE].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Known Bugs]]&lt;br /&gt;
* [[Gameplay]]&lt;br /&gt;
&lt;br /&gt;
{{installation}} {{general}}&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18099</id>
		<title>Tdm update</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18099"/>
		<updated>2015-02-10T06:55:56Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Use it to install TDM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;tdm_update&#039;&#039;&#039; is the primary method to install and update The Dark Mod.&lt;br /&gt;
&lt;br /&gt;
== Where to get it ==&lt;br /&gt;
&lt;br /&gt;
Each of our mirrors contains a copy of the updater. Get it from here:&lt;br /&gt;
&lt;br /&gt;
* Download from www.fical.com: [http://www.fidcal.com/darkuser/tdm_update_win.zip Windows] or [http://www.fidcal.com/darkuser/tdm_update_linux.zip Linux] or [http://www.fidcal.com/darkuser/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from www.southquarter.com: [http://www.southquarter.com/tdm/tdm_update_win.zip Windows] or [http://www.southquarter.com/tdm/tdm_update_linux.zip Linux] or [http://www.southquarter.com/tdm/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from darkmod.taaaki.za.net: [http://darkmod.taaaki.za.net/release/tdm_update_win.zip Windows] or [http://darkmod.taaaki.za.net/release/tdm_update_linux.zip Linux] or [http://darkmod.taaaki.za.net/release/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;install&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded archive and place the tdm_update file into any folder named &amp;quot;Darkmod&amp;quot; or &amp;quot;darkmod&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
For versions before 2.0 standalone place:&lt;br /&gt;
&lt;br /&gt;
* Windows: tdm_update.exe into &#039;&#039;&#039;C:\Games\Doom3\darkmod&#039;&#039;&#039; (or wherever Doom 3 is installed) and run it&lt;br /&gt;
* Linux: tdm_update.linux into &#039;&#039;&#039;~/.doom3/darkmod&#039;&#039;&#039; and run it&lt;br /&gt;
* Mac: tdm_update.macosx into &#039;&#039;&#039;~/Library/Application Support/Doom 3/darkmod&#039;&#039;&#039; and run it from the console. (Note: there is a custom darkmod.zip file available containing a helper script allowing you do run the updater directly from Finder - see the Mac OSX section in the [[Installation#Install_on_Mac_OSX Installation]] article.)&lt;br /&gt;
&lt;br /&gt;
Note: You must either create the &amp;quot;darkmod&amp;quot; folder by yourself, or place the program directly into the Doom 3 folder so it can create the folder for you.&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;update&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Simple navigate to your darkmod folder and run tdm_update. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000 ===&lt;br /&gt;
Please install the GDI+ redistributable package, as described in this article: [[TDM in Windows 2000]]&lt;br /&gt;
&lt;br /&gt;
=== Updater closes almost as soon as it&#039;s started (1.00 to 1.02 only) ===&lt;br /&gt;
&lt;br /&gt;
Clear out your temp folder, as follows:&lt;br /&gt;
&lt;br /&gt;
# Click Start&lt;br /&gt;
# Click Run&lt;br /&gt;
# Type &amp;lt;tt&amp;gt;%temp%&amp;lt;/tt&amp;gt; and press enter (make sure you include the % signs) (if this step doesn&#039;t work, try navigating to it - see below for the path)&lt;br /&gt;
# Select all ({{key|CTRL}}-{{key|A}}) and ({{key|DEL}}) them.&lt;br /&gt;
&lt;br /&gt;
On Windows Vista, the temporary folder in question is usually at &amp;lt;tt&amp;gt;C:\Users\[your Windows user name]\AppData\Local\Temp&amp;lt;/tt&amp;gt;. On Windows XP, look in &amp;lt;tt&amp;gt;C:\Documents and Settings\[your Windows user name]\Application Data\Local Settings\Temp&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Updater crashes as soon as it attempts to delete or modify files as part of the update ===&lt;br /&gt;
&lt;br /&gt;
This can happen (in Windows) if the folder is set to &amp;quot;read only&amp;quot; in the folder properties. It is fixed by right clicking on the top folder, clicking properties, and unchecking the box for &amp;quot;read only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== I am behind a proxy ===&lt;br /&gt;
&lt;br /&gt;
Open a console window, navigate (chdir) to your Darkmod folder and use the --proxy argument.&lt;br /&gt;
&lt;br /&gt;
In Windows, open the &amp;quot;Advanced Options&amp;quot; dialog right after starting the updater, and enter the proxy information in the entry field.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[FAQ]] - Frequently Answered Questions&lt;br /&gt;
* [[:Category:What%27s_New]] - What&#039;s new in each release&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18098</id>
		<title>Tdm update</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18098"/>
		<updated>2015-02-10T06:55:32Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Use it to install TDM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;tdm_update&#039;&#039;&#039; is the primary method to install and update The Dark Mod.&lt;br /&gt;
&lt;br /&gt;
== Where to get it ==&lt;br /&gt;
&lt;br /&gt;
Each of our mirrors contains a copy of the updater. Get it from here:&lt;br /&gt;
&lt;br /&gt;
* Download from www.fical.com: [http://www.fidcal.com/darkuser/tdm_update_win.zip Windows] or [http://www.fidcal.com/darkuser/tdm_update_linux.zip Linux] or [http://www.fidcal.com/darkuser/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from www.southquarter.com: [http://www.southquarter.com/tdm/tdm_update_win.zip Windows] or [http://www.southquarter.com/tdm/tdm_update_linux.zip Linux] or [http://www.southquarter.com/tdm/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from darkmod.taaaki.za.net: [http://darkmod.taaaki.za.net/release/tdm_update_win.zip Windows] or [http://darkmod.taaaki.za.net/release/tdm_update_linux.zip Linux] or [http://darkmod.taaaki.za.net/release/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;install&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded archive and place tdm_update.exe into any folder named &amp;quot;Darkmod&amp;quot; or &amp;quot;darkmod&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
For versions before 2.0 standalone place:&lt;br /&gt;
&lt;br /&gt;
* Windows: tdm_update.exe into &#039;&#039;&#039;C:\Games\Doom3\darkmod&#039;&#039;&#039; (or wherever Doom 3 is installed) and run it&lt;br /&gt;
* Linux: tdm_update.linux into &#039;&#039;&#039;~/.doom3/darkmod&#039;&#039;&#039; and run it&lt;br /&gt;
* Mac: tdm_update.macosx into &#039;&#039;&#039;~/Library/Application Support/Doom 3/darkmod&#039;&#039;&#039; and run it from the console. (Note: there is a custom darkmod.zip file available containing a helper script allowing you do run the updater directly from Finder - see the Mac OSX section in the [[Installation#Install_on_Mac_OSX Installation]] article.)&lt;br /&gt;
&lt;br /&gt;
Note: You must either create the &amp;quot;darkmod&amp;quot; folder by yourself, or place the program directly into the Doom 3 folder so it can create the folder for you.&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;update&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Simple navigate to your darkmod folder and run tdm_update. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000 ===&lt;br /&gt;
Please install the GDI+ redistributable package, as described in this article: [[TDM in Windows 2000]]&lt;br /&gt;
&lt;br /&gt;
=== Updater closes almost as soon as it&#039;s started (1.00 to 1.02 only) ===&lt;br /&gt;
&lt;br /&gt;
Clear out your temp folder, as follows:&lt;br /&gt;
&lt;br /&gt;
# Click Start&lt;br /&gt;
# Click Run&lt;br /&gt;
# Type &amp;lt;tt&amp;gt;%temp%&amp;lt;/tt&amp;gt; and press enter (make sure you include the % signs) (if this step doesn&#039;t work, try navigating to it - see below for the path)&lt;br /&gt;
# Select all ({{key|CTRL}}-{{key|A}}) and ({{key|DEL}}) them.&lt;br /&gt;
&lt;br /&gt;
On Windows Vista, the temporary folder in question is usually at &amp;lt;tt&amp;gt;C:\Users\[your Windows user name]\AppData\Local\Temp&amp;lt;/tt&amp;gt;. On Windows XP, look in &amp;lt;tt&amp;gt;C:\Documents and Settings\[your Windows user name]\Application Data\Local Settings\Temp&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Updater crashes as soon as it attempts to delete or modify files as part of the update ===&lt;br /&gt;
&lt;br /&gt;
This can happen (in Windows) if the folder is set to &amp;quot;read only&amp;quot; in the folder properties. It is fixed by right clicking on the top folder, clicking properties, and unchecking the box for &amp;quot;read only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== I am behind a proxy ===&lt;br /&gt;
&lt;br /&gt;
Open a console window, navigate (chdir) to your Darkmod folder and use the --proxy argument.&lt;br /&gt;
&lt;br /&gt;
In Windows, open the &amp;quot;Advanced Options&amp;quot; dialog right after starting the updater, and enter the proxy information in the entry field.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[FAQ]] - Frequently Answered Questions&lt;br /&gt;
* [[:Category:What%27s_New]] - What&#039;s new in each release&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18097</id>
		<title>Tdm update</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18097"/>
		<updated>2015-02-10T06:54:37Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Use it to install TDM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;tdm_update&#039;&#039;&#039; is the primary method to install and update The Dark Mod.&lt;br /&gt;
&lt;br /&gt;
== Where to get it ==&lt;br /&gt;
&lt;br /&gt;
Each of our mirrors contains a copy of the updater. Get it from here:&lt;br /&gt;
&lt;br /&gt;
* Download from www.fical.com: [http://www.fidcal.com/darkuser/tdm_update_win.zip Windows] or [http://www.fidcal.com/darkuser/tdm_update_linux.zip Linux] or [http://www.fidcal.com/darkuser/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from www.southquarter.com: [http://www.southquarter.com/tdm/tdm_update_win.zip Windows] or [http://www.southquarter.com/tdm/tdm_update_linux.zip Linux] or [http://www.southquarter.com/tdm/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from darkmod.taaaki.za.net: [http://darkmod.taaaki.za.net/release/tdm_update_win.zip Windows] or [http://darkmod.taaaki.za.net/release/tdm_update_linux.zip Linux] or [http://darkmod.taaaki.za.net/release/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;install&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded archive and place it in any folder named &amp;quot;Darkmod&amp;quot; or &amp;quot;darkmod&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
For versions before 2.0 standalone, place it:&lt;br /&gt;
&lt;br /&gt;
* Windows: tdm_update.exe into &#039;&#039;&#039;C:\Games\Doom3\darkmod&#039;&#039;&#039; (or wherever Doom 3 is installed) and run it&lt;br /&gt;
* Linux: tdm_update.linux into &#039;&#039;&#039;~/.doom3/darkmod&#039;&#039;&#039; and run it&lt;br /&gt;
* Mac: tdm_update.macosx into &#039;&#039;&#039;~/Library/Application Support/Doom 3/darkmod&#039;&#039;&#039; and run it from the console. (Note: there is a custom darkmod.zip file available containing a helper script allowing you do run the updater directly from Finder - see the Mac OSX section in the [[Installation#Install_on_Mac_OSX Installation]] article.)&lt;br /&gt;
&lt;br /&gt;
Note: You must either create the &amp;quot;darkmod&amp;quot; folder by yourself, or place the program directly into the Doom 3 folder so it can create the folder for you.&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;update&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Simple navigate to your darkmod folder and run tdm_update. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000 ===&lt;br /&gt;
Please install the GDI+ redistributable package, as described in this article: [[TDM in Windows 2000]]&lt;br /&gt;
&lt;br /&gt;
=== Updater closes almost as soon as it&#039;s started (1.00 to 1.02 only) ===&lt;br /&gt;
&lt;br /&gt;
Clear out your temp folder, as follows:&lt;br /&gt;
&lt;br /&gt;
# Click Start&lt;br /&gt;
# Click Run&lt;br /&gt;
# Type &amp;lt;tt&amp;gt;%temp%&amp;lt;/tt&amp;gt; and press enter (make sure you include the % signs) (if this step doesn&#039;t work, try navigating to it - see below for the path)&lt;br /&gt;
# Select all ({{key|CTRL}}-{{key|A}}) and ({{key|DEL}}) them.&lt;br /&gt;
&lt;br /&gt;
On Windows Vista, the temporary folder in question is usually at &amp;lt;tt&amp;gt;C:\Users\[your Windows user name]\AppData\Local\Temp&amp;lt;/tt&amp;gt;. On Windows XP, look in &amp;lt;tt&amp;gt;C:\Documents and Settings\[your Windows user name]\Application Data\Local Settings\Temp&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Updater crashes as soon as it attempts to delete or modify files as part of the update ===&lt;br /&gt;
&lt;br /&gt;
This can happen (in Windows) if the folder is set to &amp;quot;read only&amp;quot; in the folder properties. It is fixed by right clicking on the top folder, clicking properties, and unchecking the box for &amp;quot;read only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== I am behind a proxy ===&lt;br /&gt;
&lt;br /&gt;
Open a console window, navigate (chdir) to your Darkmod folder and use the --proxy argument.&lt;br /&gt;
&lt;br /&gt;
In Windows, open the &amp;quot;Advanced Options&amp;quot; dialog right after starting the updater, and enter the proxy information in the entry field.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[FAQ]] - Frequently Answered Questions&lt;br /&gt;
* [[:Category:What%27s_New]] - What&#039;s new in each release&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18096</id>
		<title>Tdm update</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18096"/>
		<updated>2015-02-10T06:50:49Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Updater crashes as soon as it attempts to add downloaded files in the folder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;tdm_update&#039;&#039;&#039; is the primary method to install and update The Dark Mod.&lt;br /&gt;
&lt;br /&gt;
== Where to get it ==&lt;br /&gt;
&lt;br /&gt;
Each of our mirrors contains a copy of the updater. Get it from here:&lt;br /&gt;
&lt;br /&gt;
* Download from www.fical.com: [http://www.fidcal.com/darkuser/tdm_update_win.zip Windows] or [http://www.fidcal.com/darkuser/tdm_update_linux.zip Linux] or [http://www.fidcal.com/darkuser/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from www.southquarter.com: [http://www.southquarter.com/tdm/tdm_update_win.zip Windows] or [http://www.southquarter.com/tdm/tdm_update_linux.zip Linux] or [http://www.southquarter.com/tdm/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from darkmod.taaaki.za.net: [http://darkmod.taaaki.za.net/release/tdm_update_win.zip Windows] or [http://darkmod.taaaki.za.net/release/tdm_update_linux.zip Linux] or [http://darkmod.taaaki.za.net/release/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;install&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded archive and place:&lt;br /&gt;
&lt;br /&gt;
* Windows: tdm_update.exe into &#039;&#039;&#039;C:\Games\Doom3\darkmod&#039;&#039;&#039; (or wherever Doom 3 is installed) and run it&lt;br /&gt;
* Linux: tdm_update.linux into &#039;&#039;&#039;~/.doom3/darkmod&#039;&#039;&#039; and run it&lt;br /&gt;
* Mac: tdm_update.macosx into &#039;&#039;&#039;~/Library/Application Support/Doom 3/darkmod&#039;&#039;&#039; and run it from the console. (Note: there is a custom darkmod.zip file available containing a helper script allowing you do run the updater directly from Finder - see the Mac OSX section in the [[Installation#Install_on_Mac_OSX Installation]] article.)&lt;br /&gt;
&lt;br /&gt;
Note: You must either create the &amp;quot;darkmod&amp;quot; folder by yourself, or place the program directly into the Doom 3 folder so it can create the folder for you.&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;update&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Simple navigate to your darkmod folder and run tdm_update. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000 ===&lt;br /&gt;
Please install the GDI+ redistributable package, as described in this article: [[TDM in Windows 2000]]&lt;br /&gt;
&lt;br /&gt;
=== Updater closes almost as soon as it&#039;s started (1.00 to 1.02 only) ===&lt;br /&gt;
&lt;br /&gt;
Clear out your temp folder, as follows:&lt;br /&gt;
&lt;br /&gt;
# Click Start&lt;br /&gt;
# Click Run&lt;br /&gt;
# Type &amp;lt;tt&amp;gt;%temp%&amp;lt;/tt&amp;gt; and press enter (make sure you include the % signs) (if this step doesn&#039;t work, try navigating to it - see below for the path)&lt;br /&gt;
# Select all ({{key|CTRL}}-{{key|A}}) and ({{key|DEL}}) them.&lt;br /&gt;
&lt;br /&gt;
On Windows Vista, the temporary folder in question is usually at &amp;lt;tt&amp;gt;C:\Users\[your Windows user name]\AppData\Local\Temp&amp;lt;/tt&amp;gt;. On Windows XP, look in &amp;lt;tt&amp;gt;C:\Documents and Settings\[your Windows user name]\Application Data\Local Settings\Temp&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Updater crashes as soon as it attempts to delete or modify files as part of the update ===&lt;br /&gt;
&lt;br /&gt;
This can happen (in Windows) if the folder is set to &amp;quot;read only&amp;quot; in the folder properties. It is fixed by right clicking on the top folder, clicking properties, and unchecking the box for &amp;quot;read only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== I am behind a proxy ===&lt;br /&gt;
&lt;br /&gt;
Open a console window, navigate (chdir) to your Darkmod folder and use the --proxy argument.&lt;br /&gt;
&lt;br /&gt;
In Windows, open the &amp;quot;Advanced Options&amp;quot; dialog right after starting the updater, and enter the proxy information in the entry field.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[FAQ]] - Frequently Answered Questions&lt;br /&gt;
* [[:Category:What%27s_New]] - What&#039;s new in each release&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18095</id>
		<title>Tdm update</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Tdm_update&amp;diff=18095"/>
		<updated>2015-02-10T06:50:11Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;tdm_update&#039;&#039;&#039; is the primary method to install and update The Dark Mod.&lt;br /&gt;
&lt;br /&gt;
== Where to get it ==&lt;br /&gt;
&lt;br /&gt;
Each of our mirrors contains a copy of the updater. Get it from here:&lt;br /&gt;
&lt;br /&gt;
* Download from www.fical.com: [http://www.fidcal.com/darkuser/tdm_update_win.zip Windows] or [http://www.fidcal.com/darkuser/tdm_update_linux.zip Linux] or [http://www.fidcal.com/darkuser/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from www.southquarter.com: [http://www.southquarter.com/tdm/tdm_update_win.zip Windows] or [http://www.southquarter.com/tdm/tdm_update_linux.zip Linux] or [http://www.southquarter.com/tdm/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
* Download from darkmod.taaaki.za.net: [http://darkmod.taaaki.za.net/release/tdm_update_win.zip Windows] or [http://darkmod.taaaki.za.net/release/tdm_update_linux.zip Linux] or [http://darkmod.taaaki.za.net/release/tdm_update_macosx.zip Mac OSX]&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;install&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded archive and place:&lt;br /&gt;
&lt;br /&gt;
* Windows: tdm_update.exe into &#039;&#039;&#039;C:\Games\Doom3\darkmod&#039;&#039;&#039; (or wherever Doom 3 is installed) and run it&lt;br /&gt;
* Linux: tdm_update.linux into &#039;&#039;&#039;~/.doom3/darkmod&#039;&#039;&#039; and run it&lt;br /&gt;
* Mac: tdm_update.macosx into &#039;&#039;&#039;~/Library/Application Support/Doom 3/darkmod&#039;&#039;&#039; and run it from the console. (Note: there is a custom darkmod.zip file available containing a helper script allowing you do run the updater directly from Finder - see the Mac OSX section in the [[Installation#Install_on_Mac_OSX Installation]] article.)&lt;br /&gt;
&lt;br /&gt;
Note: You must either create the &amp;quot;darkmod&amp;quot; folder by yourself, or place the program directly into the Doom 3 folder so it can create the folder for you.&lt;br /&gt;
&lt;br /&gt;
== Use it to &#039;&#039;&#039;update&#039;&#039;&#039; TDM ==&lt;br /&gt;
&lt;br /&gt;
Simple navigate to your darkmod folder and run tdm_update. &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Windows 2000 ===&lt;br /&gt;
Please install the GDI+ redistributable package, as described in this article: [[TDM in Windows 2000]]&lt;br /&gt;
&lt;br /&gt;
=== Updater closes almost as soon as it&#039;s started (1.00 to 1.02 only) ===&lt;br /&gt;
&lt;br /&gt;
Clear out your temp folder, as follows:&lt;br /&gt;
&lt;br /&gt;
# Click Start&lt;br /&gt;
# Click Run&lt;br /&gt;
# Type &amp;lt;tt&amp;gt;%temp%&amp;lt;/tt&amp;gt; and press enter (make sure you include the % signs) (if this step doesn&#039;t work, try navigating to it - see below for the path)&lt;br /&gt;
# Select all ({{key|CTRL}}-{{key|A}}) and ({{key|DEL}}) them.&lt;br /&gt;
&lt;br /&gt;
On Windows Vista, the temporary folder in question is usually at &amp;lt;tt&amp;gt;C:\Users\[your Windows user name]\AppData\Local\Temp&amp;lt;/tt&amp;gt;. On Windows XP, look in &amp;lt;tt&amp;gt;C:\Documents and Settings\[your Windows user name]\Application Data\Local Settings\Temp&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Updater crashes as soon as it attempts to add downloaded files in the folder ===&lt;br /&gt;
&lt;br /&gt;
This can happen (in Windows) if the folder is set to &amp;quot;read only&amp;quot; in the folder properties. It is fixed by right clicking on the top folder, clicking properties, and unchecking the box for &amp;quot;read only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
=== I am behind a proxy ===&lt;br /&gt;
&lt;br /&gt;
Open a console window, navigate (chdir) to your Darkmod folder and use the --proxy argument.&lt;br /&gt;
&lt;br /&gt;
In Windows, open the &amp;quot;Advanced Options&amp;quot; dialog right after starting the updater, and enter the proxy information in the entry field.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[FAQ]] - Frequently Answered Questions&lt;br /&gt;
* [[:Category:What%27s_New]] - What&#039;s new in each release&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Add-ons&amp;diff=18070</id>
		<title>Add-ons</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Add-ons&amp;diff=18070"/>
		<updated>2015-01-14T01:41:40Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Dark Mod itself is a mod for the game Doom 3, but it is also possible to mod the mod by installing &#039;&#039;&#039;add-ons&#039;&#039;&#039;. A few of thes exist already, and they enhance the gameplay or the visuals:&lt;br /&gt;
&lt;br /&gt;
== List of Add-ons ==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse; font-size:90%&amp;quot; cellspacing=0 cellpadding=3 width=100%&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;12%&amp;quot;|Name&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;7%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Links&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;7%&amp;quot;|Release&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;7%&amp;quot;|Last update&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;5%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Size (MB)&lt;br /&gt;
!bgcolor=#d0d0e0|Changes&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--INSERT NEW ADD-ONS BELOW THIS LINE--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|Upright Bow Aimer&lt;br /&gt;
|Dram&lt;br /&gt;
|{{Bloodgate-Addon|MOD_UprightBowAimer.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12271-mod-upright-bow-with-aimer/}}&lt;br /&gt;
|2011-02-06&lt;br /&gt;
|2011-02-06&lt;br /&gt;
|0.3&lt;br /&gt;
|&#039;&#039;&#039;Visuals:&#039;&#039;&#039; The bow aimer&amp;lt;br&amp;gt;&#039;&#039;&#039;Gameplay: None&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|Black Light&lt;br /&gt;
|Tels&lt;br /&gt;
|{{Bloodgate-Addon|tels_tdm_black_light.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12336-add-on-black-light-aka-pimp-my-visuals/}}&lt;br /&gt;
|2011-02-04&lt;br /&gt;
|2011-07-24&lt;br /&gt;
|0.01&lt;br /&gt;
|&#039;&#039;&#039;Visuals:&#039;&#039;&#039; Enhanced fire and torch particles, adds arrow glow and trails, prettier explosions etc.&amp;lt;br&amp;gt;&#039;&#039;&#039;Gameplay: None&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.bloodgate.com/mirrors/tdm/pub/add-ons/ Mirror at Bloodgate.com]&lt;br /&gt;
* [[Fan_Created_Modifications]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Fan_Missions]]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18069</id>
		<title>Fan Created Modifications</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18069"/>
		<updated>2015-01-14T01:40:29Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Links to Fan Made Contributions ==&lt;br /&gt;
&lt;br /&gt;
This page is to collect any unofficial modifications or tweaks or instructions created by fans that modify the game in some respect. These modifications are not supported by the team nor even necessarily recommended. If you have a question about any of them, then ask in the forums. Please notify a team member if a link becomes broken.&lt;br /&gt;
&lt;br /&gt;
* Instructions for deleting a type of AI from all FMs, like a spider or zombie: See this post [http://forums.thedarkmod.com/topic/16855-arachnophobia-vs-tdm-missions-with-giant-spiders/?p=363347] and the four posts following it.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Add-ons]]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-editing}}&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18068</id>
		<title>Fan Created Modifications</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18068"/>
		<updated>2015-01-14T01:40:16Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Links to Fan Made Contributions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Links to Fan Made Contributions ==&lt;br /&gt;
&lt;br /&gt;
This page is to collect any unofficial modifications or tweaks or instructions created by fans that modify the game in some respect. These modifications are not supported by the team nor even necessarily recommended. If you have a question about any of them, then ask in the forums. Please notify a team member if a link becomes broken.&lt;br /&gt;
&lt;br /&gt;
* Instructions for deleting a type of AI from all FMs, like a spider or zombie: See this post [http://forums.thedarkmod.com/topic/16855-arachnophobia-vs-tdm-missions-with-giant-spiders/?p=363347] and the four posts following it.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[Add-ons]&lt;br /&gt;
&lt;br /&gt;
{{tutorial-editing}}&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18066</id>
		<title>Fan Created Modifications</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18066"/>
		<updated>2015-01-13T11:07:59Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Links to Fan Made Contributions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Links to Fan Made Contributions ==&lt;br /&gt;
&lt;br /&gt;
This page is to collect any unofficial modifications or tweaks or instructions created by fans that modify the game in some respect. These modifications are not supported by the team nor even necessarily recommended. If you have a question about any of them, then ask in the forums. Please notify a team member if a link becomes broken.&lt;br /&gt;
&lt;br /&gt;
* Instructions for deleting a type of AI from all FMs, like a spider or zombie: See this post [http://forums.thedarkmod.com/topic/16855-arachnophobia-vs-tdm-missions-with-giant-spiders/?p=363347] and the four posts following it.&lt;br /&gt;
&lt;br /&gt;
{{tutorial-editing}}&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18065</id>
		<title>Fan Created Modifications</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18065"/>
		<updated>2015-01-13T11:04:21Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Links to Fan Made Contributions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Links to Fan Made Contributions ==&lt;br /&gt;
&lt;br /&gt;
This page is to collect any unofficial modifications or tweaks or instructions created by fans that modify the game in some respect. These modifications are not supported by the team nor even necessarily recommended. If you have a question about any of them, then ask in the forums. Please notify a team member if a link becomes broken.&lt;br /&gt;
&lt;br /&gt;
* Instructions for deleting a type of AI from all FMs, like a spider or zombie: See this post [http://forums.thedarkmod.com/topic/16855-arachnophobia-vs-tdm-missions-with-giant-spiders/?p=363347] and the four posts following it.&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18064</id>
		<title>Fan Created Modifications</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Fan_Created_Modifications&amp;diff=18064"/>
		<updated>2015-01-13T11:00:12Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: Created page with &amp;quot;== Links to Fan Made Contributions ==  (Please notify a team member if a link becomes broken.)   * Instructions for deleting a type of AI from all FMs, like a spider or zombie...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Links to Fan Made Contributions ==&lt;br /&gt;
&lt;br /&gt;
(Please notify a team member if a link becomes broken.) &lt;br /&gt;
&lt;br /&gt;
* Instructions for deleting a type of AI from all FMs, like a spider or zombie: See this post [http://forums.thedarkmod.com/topic/16855-arachnophobia-vs-tdm-missions-with-giant-spiders/?p=363347] and the four posts following it.&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17880</id>
		<title>Editing FAQ - Troubleshooting &amp; How-To</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17880"/>
		<updated>2014-08-08T03:26:04Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Scripting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below are some common issues and questions mappers have had in the Editor&#039;s Guild forum with common solutions. Some of this assumes you&#039;ve already gone through the [[A_-_Z_Beginner_Full_Guide_Start_Here!]], [[Startpack_Mappers&#039;_Guide]], and [[Dark_Radiant_Must_Know_Basic_Intro]]. (If you know a FAQ not here and worth going in this list, and you know the right answer(!), or you can improve an existing answer, please add it if you have edit control or PM it to a team-member if you don&#039;t.) &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting FAQ =&lt;br /&gt;
&lt;br /&gt;
== Rendering &amp;amp; VisPortal Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of my brushes have disappeared or turned black and won&#039;t render.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This can happen when two touching brushes around the seam are not perfectly flush with one another and the rendering hiccups for those brushes &amp;amp; brushes behind it, either there&#039;s a tiny wedge or overlap or gap or weird angle between them. The usual solution is to make sure the brushes are snapped to the grid and perfectly flush against one another, or more generally to simplify the brushwork around the seam of the disappearing brushes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My visportal is not showing up or not closing like it should (you can check this with by typing &amp;quot;r_showportals 1&amp;quot; in the console. The portal edge will show green when open and red when closed.).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A common reason for that is that the two areas separated by the portal are not hermetically sealed and there&#039;s an internal leak, either (1) there may be an unportaled gap between the two, possibly covered up by func_static (which do not seal) or possibly caused by an inadvertent hole created by the first FAQ question above, or (2) an internal leak can happen when all sides of the visportal are not buried in or flush against sealing brushes, and there&#039;s a gap between the visportal and brush, or possibly even a tiny gap just touching the visportal side is enough to break it. A way to check if there&#039;s an internal leak, and locating it if there is, is described here: [[Visportals#Trouble-shooting]]. Other reasons it might fail are also described there (such as accidentally changing a nodraw texture to something else).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I can see other rooms behind a mirror (or any reflective surface) through it, instead of just a reflection.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The area behind a mirror should be in a separate leaf (visportaled area) behind a closed visportal so it doesn&#039;t render. This problem usually means the two areas aren&#039;t in separate leafs, the portal isn&#039;t closed, or there&#039;s an internal leak between the areas in front of and behind the mirror.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Help! I&#039;m having rendering &amp;amp; visPortal issues all over the place ... broken portals, sparkly lines, disappearing brushes, z-fighting, uneven walls, etc.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; As a general piece of advice, messy brushwork leads to trouble one way or another. To keep your brushwork clean: &lt;br /&gt;
* keep snapped to the grid (Ctrl+G toggles) &amp;amp; stay away from small grid levels (Typing a number or Plus/Minus changes the grid scale; 8 is a good starting grid; staying at or above 2 or 4 is fine for most stuff; going below 1 is usually just for special situations). &lt;br /&gt;
* Make brush intersections perfectly flush. &lt;br /&gt;
* Stay away from unnecessary tiny brushes &amp;amp; wedges (leave detail work to func_statics; brushes are for closing off leafs and the void. Of course you can do fine detail work with brushes &amp;amp; convert them to a func_static). &lt;br /&gt;
* Don&#039;t use the &amp;quot;CGS Subtract&amp;quot; tool if it will shatter the brush into tiny slivers; use the cut tool instead (open by pushing &amp;quot;X&amp;quot;). &lt;br /&gt;
* You can use patches for uneven geometry with square brushes underneath textured with caulk. &lt;br /&gt;
* When rotating geometry, avoid weird angles when you can (where vertexes end up off the grid), and for multi-brush structures, build the whole thing first *then* rotate it all together instead of rotating &amp;amp; placing each brush individually. &lt;br /&gt;
These aren&#039;t rules set in concrete if you want to do something special once in a while, but general rules of thumb that will make life a lot easier if you generally stick to them.&lt;br /&gt;
&lt;br /&gt;
== Crashes and Warnings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map has a leak in it, but a pointfile either isn&#039;t generated or doesn&#039;t make sense. (A pointfile is generated when dmap occurs and there&#039;s a leak, then you open DarkRadient and click File&amp;gt;Pointfile to see it. It normally runs a red line that ends in the void, pointing out the leak).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039;  Make sure a gap isn&#039;t covered up with func_statics. If the origin of a model is in the void it will also cause a leak with a non-sense pointfile. Read more on the [[Leaking maps]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll up through the console output to see what a problem was during dmap or map or in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/Down to scroll through the console.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I&#039;m getting an error message &amp;quot;warning: aas is out of date&amp;quot; once my map has loaded. What does it mean and what do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The AAS is for AI pathfinding. It usually means you changed brushwork and started a map without dmapping first. The solution is to dmap. If you dmap and still get the warning, delete your .aasxx, .proc, and .cm files in the maps folder and dmap again. If you&#039;re still getting a warning, then it could be a sign that something in your map is breaking the AAS pathfinding. Try monsterclipping tricky areas for the AI to path (like around objects and uneven ground) or clean up messy brushwork that might break the dmapping like sliver brushes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have encountered a malloc failure error while dmapping my level. Instead of finishing with the dmap operation, it crashes midway with an error message.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; One solution to this is given in the Dmap wiki entry here: [[Dmap#Malloc_Errors]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; This is what I&#039;ve done to fix this exact issue. Open the map in DarkRadiant, select everything, copy to clipboard. Open another instance of DarkRadiant and paste from clipboard. Save as new filename and dmap new file and that has worked 3 times now with random unresolvable crashes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A3.&#039;&#039;&#039; GC and I have found correlations between visportalling and mAlloc errors. Time to re-arrange your visportals. In NHAT, we had many malloc problems until we retooled how each area was portaled. Originally, every other visleaf had tons of entities, while half had hardly any. That&#039;s not neccessarily bad, but it strains the dmapper when one or two visleafs are cluttered with entities that really bloat your mapname.proc file. We added a few more portals to even out entity distribution, and dmap was happy again.&lt;br /&gt;
&lt;br /&gt;
== Performance Issues ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map is so slow. How do I improve performance?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See these wiki entry: [[Performance:_Essential_Must-Knows]]. Tips include: &lt;br /&gt;
* Reduce AI [[Pathfinding]] with Monsterclipping helps performance, simplifying complex bumpy surfaces into 1 smooth monsterclipped surface (or raise the monsterclip height to be inside the ceiling and there is no pathfinding computation at all), or excluding entire surfaces AI should never walk on, like detail brushwork or some roofs. &lt;br /&gt;
* Use [[Interleaved_Thinking_optimization]]. Reducing AI think-time helps performance quite a bit. &lt;br /&gt;
* break-up long lines of sight, &lt;br /&gt;
* improve visportal &amp;amp; leaf placement (so less architecture is rendered at a time), &lt;br /&gt;
* use fewer AI, &lt;br /&gt;
* convert ornamental brushwork into func_static, &lt;br /&gt;
* reduce the overlap of light sources on surfaces by adjusting their placement &amp;amp; reducing their light-radius. (Every time a new light hits a surface, it&#039;s another render pass. So 4 lights hitting a surface processes it 4 times. If only 1 light hit it, its lighting is processed in 1/4 the time), and &lt;br /&gt;
* set objects and lights to &amp;quot;noshadow&amp;quot; if it won&#039;t be noticable to the player or affect gameplay (possibly in combination with low-poly shadow meshes or shadowy decals. Note that &amp;quot;noshadow&amp;quot; has two jobs. Put on lights, it means that light will cast no shadows on any object. Put on objects, it means that object will not cast a shadow from any light.) &lt;br /&gt;
&lt;br /&gt;
There are also lots of other tricks out there if you check around the forums, including more advanced &amp;amp; optional tricks such as using the [[LOD]] system or [[SEED]] system, or even crazier tricks (cross-leaf func_statics, skybox architecture, Strombine lighting, Camera Cubemapped Visportal Patches, lots of crazy tricks out there), that you don&#039;t have to worry about if you&#039;re a new mapper but you can ask us about or search for in the forum if you&#039;re curious. Generally speaking there are pros and cons trade-offs between performance &amp;amp; dazzle for many things (like lights or visportal placement); so it&#039;s good to think about the best performance-dazzle balance for your scene. E.g, lots of highpoly brushwork, lights, &amp;amp; AI can look good in a small or medium room, but may not be worth the performance hit in a big courtyard, and try to find ways to get better performance &amp;quot;for free&amp;quot; without the player noticing anything missing, like smart use of noshadows, monsterclips, and interleaved thinking distances.&lt;br /&gt;
&lt;br /&gt;
== Gameplay Issues that Mappers sometimes Overlook ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Below is a list of common gameplay issues that players sometimes complain about and that mappers &amp;amp; testers sometimes overlook or should at least be aware of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Players find it very difficult to frob objects (loot, keys, readables) when the frob distance is set too short or the space is awkward (like in a drawer or up on a wall, etc). In testing, please double-check that every frobable object is easy to frob from a comfortable place, and increase the frob distance if it&#039;s not, erring on the side of more space. (See the question on making frobbing easier under &amp;quot;Handling Objects&amp;quot; below for more information.) &lt;br /&gt;
&lt;br /&gt;
- Objects can get stuck into brushwork while moving them around. &lt;br /&gt;
&lt;br /&gt;
- Players can get stuck in narrow spaces and can&#039;t mantle out, so try to avoid this kind of geometry if possible. &lt;br /&gt;
&lt;br /&gt;
- A very low ceiling can prevent hitting AI with a BJ, so try to avoid it when AI are around. &lt;br /&gt;
&lt;br /&gt;
- Make sure AI have a flee path.  &lt;br /&gt;
&lt;br /&gt;
- Some players would like the ability to drop used keys and other inventory items, done by turning the can_be_dropped property to true, unless for gameplay reasons you don&#039;t want to. &lt;br /&gt;
&lt;br /&gt;
- Some players don&#039;t like long readables that don&#039;t get to the point. At least be conscious of how your readables read to a player.&lt;br /&gt;
&lt;br /&gt;
- Think about how you want to handle non-functioning doors (or other &amp;quot;unnatural&amp;quot; situations like windows that can open) in a way that visually or fairly communicates to the player that something is special about this door or window, but isn&#039;t too immersion breaking either.&lt;br /&gt;
&lt;br /&gt;
== Issues with Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My streetlight, candle, lamp, light-creating object, causes a weird shadow I want to get rid of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Put the spawnarg &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; on the offending object.&lt;br /&gt;
&lt;br /&gt;
== AI Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My AI will not pass through a visportal no matter how I set up the path nodes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Check that the sides of the visportal use the nodraw texture (except for the portal-face itself of course).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you get AI to walk on complex terrain patches or func_statics?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can always lay down invisible monsterclip brushes and the AI can walk on it. Overlay with a brush with a &amp;quot;material&amp;quot; clip texture so it causes the right sound for footsteps.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Problems with Patches ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have 2 curved patches and they&#039;re not aligning. What do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My patch is rendering strangely, like fractured into slivers.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
== Issues with Lighting &amp;amp; Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of the parallel lights I use for moonlight aren&#039;t giving off any light.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a known problem with parallel lights. For some reason in some arrangements you get no light at all. Just fiddle with it a bit - move it slightly, change the radii, move the vertex a bit - and it should suddenly work. Once you&#039;ve got it working then it&#039;s stable. Likely the code chokes on certain values in its calculations. ... Also, to help optimize your moonlight, you should adjust the radius so it&#039;s only as big as it needs to be. You may also want to move the actual position of the little moon cube in the skybox to match the parallel light (and make sure to fix the texture on it if you mess it up - hint: lock textures before moving cube to make it easy)&lt;br /&gt;
&lt;br /&gt;
= General How-To Editing FAQ =&lt;br /&gt;
&lt;br /&gt;
== Dark Radiant Questions == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I see all the default properties already on an object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; In the entity inspector there&#039;s a checkbox near the top that says &amp;quot;Show Inherited Properties&amp;quot;. Click that box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some basic units, scales, limits, maxs, and mins of various things when editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all these things is here: [[Limits,_Max,_Min,_Stats,_etc]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I manipulate brushes to resize and reshape them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. In DarkRadiant you can select a brush and push &amp;quot;V&amp;quot; to select verticies to drag and resize, &amp;quot;E&amp;quot; to select edge(s) to drag and resize, and &amp;quot;F&amp;quot; to select face(s) to drag and resize. &amp;quot;Ctrl+#&amp;quot; makes a selected brush be #-sided. You can also use the Brush&amp;gt;Prism and Brush&amp;gt;Cone to convert a brush to those shapes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common DR shortcut commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &lt;br /&gt;
* &amp;quot;H&amp;quot; hides selected items. &lt;br /&gt;
* &amp;quot;I&amp;quot; inverts selected. &lt;br /&gt;
* &amp;quot;Ctrl+I&amp;quot; inverts a patch&#039;s normal. &lt;br /&gt;
* &amp;quot;J&amp;quot; brings up entity list. &lt;br /&gt;
* &amp;quot;Ctrl+K&amp;quot; makes 1st-selected-entity &amp;quot;target&amp;quot; 2nd-selected-entity. &lt;br /&gt;
* &amp;quot;L&amp;quot; brings up light inspector. &lt;br /&gt;
* &amp;quot;Ctrl+L&amp;quot; brings up the Layers menu. &lt;br /&gt;
* &amp;quot;N&amp;quot; brings up entity inspector. &lt;br /&gt;
* &amp;quot;T&amp;quot; brings up texture browser. &lt;br /&gt;
* &amp;quot;X&amp;quot; go into clipper mode. &lt;br /&gt;
* Brush manipulation modes: are &amp;quot;R&amp;quot; rotate brush, &amp;quot;Q&amp;quot; free-move &amp;amp; resize, &amp;quot;W&amp;quot; translate-move.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make my own shortcut key commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Under the Edit menu, at the bottom is &amp;quot;Keyboard Shortcuts&amp;quot; which allows you to set your own shortcuts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I screwed something up! What do I do?!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Ctrl+Z undos. Ctrl+Y redos.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is there a way to organize &amp;amp; simplify building, so I can build one section at a time without other sections getting in the way?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; DR has a [[Layers]] function that lets you build one &amp;quot;layer&amp;quot; at a time (open with ctrl+L or View&amp;gt;Layers). It also improves DR performance, which is handy as the map gets bigger.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up things like the pre-game shop, the player inventory, and an in-game map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; All these things are described in the Startpack Mappers&#039; Guide: [[Startpack_Mappers&#039;_Guide#Ammo.2C_Weapons.2C_Player_Tools.2C_Start_Inventory]], [[Startpack_Mappers&#039;_Guide#Purchase_Shop]], [[Startpack_Mappers&#039;_Guide#Adding_an_In-game_Map_to_your_FM]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put spawnargs on def_attached entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can put spawnargs on def_attached entities by using the spawnarg &amp;quot;set SPAWNARGNAME on ATTACHMENTNAME&amp;quot; &amp;quot;value&amp;quot; on the base entity. Here&#039;s an example of setting a color property on a flame attachment to a torch &amp;quot;set _color on flame&amp;quot; &amp;quot;0.2 0.2 0.9&amp;quot;. Read more here [[Combined_light_entities#Setting_spawnargs]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s an easy way to find materials in DR?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Tip to help find materials in Dark Radiant&#039;s materials browser: &lt;br /&gt;
# Point to Textures (or any tree). &lt;br /&gt;
# Shift + Right key to fully open the tree. &lt;br /&gt;
# Type the key letters of what you want to find. &lt;br /&gt;
# Up/down arrows to go to next/previous occurrence. &lt;br /&gt;
# Esc to get out of input field. &lt;br /&gt;
Oh yeah, avoid F3 because that is likely to switch to render mode which in my case crashes DR (but may not if the map is small).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an N-sided brush?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A quick way to make an N-sided brush is to highlight the brush and push cntl+N (N being the number of sides for the top face). So if you want a 5-sided brush, highlight it and push cntl+5. But the best way to get the walls of a multi-sided brush to line up seamlessly is still to use the clipper-tool and precisely cut off a slice. (And don&#039;t use CSG Subtract unless you know what you&#039;re doing and aren&#039;t creating a million splinters!)&lt;br /&gt;
&lt;br /&gt;
== Console Questions ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I open the console?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Open the console with ctrl+alt+~ in a normal game, and just ~ when playing through &amp;quot;map&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll through the console output?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/PageDown.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q.What&#039;s a list of all the Doom3 Console Commands and CVars?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all commands &amp;amp; Cvars is here [http://www.doomwadstation.com/doom3/console/]. Darkmod Cvars are listed here [[Cvars_in_The_Dark_Mod]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some *useful* console commands and cvars for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here&#039;s one list: [[Console_Useful_Controls]]. Here&#039;s a list more tailored to mapping: &lt;br /&gt;
&lt;br /&gt;
Commands: &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;dmap &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; compiles a map, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;give &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; gives the player an item, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;god&#039;&#039;&#039;&amp;quot; player cannot be harmed,&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;killmonsters&#039;&#039;&#039;&amp;quot; takes out all AI&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;map &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; loads a map to play, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;noclip&#039;&#039;&#039;&amp;quot; lets the player go through objects and walls, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;notarget&#039;&#039;&#039;&amp;quot; let&#039;s the player be invisible to AI, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadDecls&#039;&#039;&#039;&amp;quot; will reload material defs without having to re-start TDM, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadimages&#039;&#039;&#039;&amp;quot; does the same for lights and &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadSurface&#039;&#039;&#039;&amp;quot; for surfaces, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;saveRagdolls&#039;&#039;&#039;&amp;quot; saves the positions of all ragdolls to the .map file (see the FAQ under Handling AI), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;teleport &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; teleports the player to an entity. &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;tdm_show_loot&#039;&#039;&#039;&amp;quot; Shows loot.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;spawn &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; spawns an entity: &lt;br /&gt;
 spawn atdm:weapon_blackjack&lt;br /&gt;
 spawn atdm:weapon_shortsword&lt;br /&gt;
 spawn atdm:ammo_broadhead&lt;br /&gt;
 spawn atdm:ammo_firearrow&lt;br /&gt;
 spawn atdm:ammo_gasarrow&lt;br /&gt;
 spawn atdm:ammo_mossarrow&lt;br /&gt;
 spawn atdm:ammo_noisemaker&lt;br /&gt;
 spawn atdm:ammo_ropearrow&lt;br /&gt;
 spawn atdm:ammo_waterarrow&lt;br /&gt;
 Append &amp;quot;inv_ammo_amount 50&amp;quot; to any of the above to spawn 50 arrows at once: spawn atdm:ammo_broadhead inv_ammo_amount 50&lt;br /&gt;
Cvars (1 turns on, 0 turns off, unless otherwise noted): &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;com_showFPS 1&#039;&#039;&#039;&amp;quot;, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showLightCount 1&#039;&#039;&#039;&amp;quot; (colors shows the number of lights hitting a surface, black = 0, red = 1, blue = 2... etc), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showPortals 1&#039;&#039;&#039;&amp;quot; (red=closed,green=open) If your portals dont show up they are most likely not sealing.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showTris n&#039;&#039;&#039;&amp;quot; (n=1) Shows tris rendered directly, (n=2) shows overdrawn tri&#039;s, (n=3) shows all tri&#039;s, direct and indirect.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a put-object-here objective?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182924]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a &amp;quot;ghosting&amp;quot; objective (e.g., you are busted if you are seen.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204695]&lt;br /&gt;
&lt;br /&gt;
== Handling Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a door handle to a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Just position the handle and input &amp;quot;bind&amp;quot; and the door entity ID/name as a spawnarg. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object into loot?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182921]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an entity frobable?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the entry for [[Making an Entity frobable]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Ok it&#039;s frobable, but doesn&#039;t fall or move. How do I make an entity act like a world object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You need to make the object a moveable, see [[Moveables]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I get a lever or button to open a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__212036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put some text on a sign or wall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can use this method [http://forums.thedarkmod.com/topic/11159-add-text-to-your-signs-signposts-walls-etc/]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bind something to a rope (like a body) so it doesn&#039;t fall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Dynamic ropes are unreliable, so it&#039;s good to use a func_static like a chain or make a func_static rope from a cylinder brush. For a ragdoll, place the ragdoll so he clips into the func_static. You need to bind the ragdoll to the chain (so the spawnarg is on the ragdoll), with &amp;quot;bind&amp;quot; &amp;quot;func_static_...&amp;quot;, where func_static_... is the chain. Or, through DR, you can just select the entity you want to attach (the ragdoll), then also select the thing you want to attach it to (the chain), and in the menus select &amp;quot;Entity&amp;quot; - &amp;quot;Bind selected entities&amp;quot;. But it&#039;s been reported the clipping does the job, not binding. See this link [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__221262]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make something switch from frobable to unfrobable like a used lever, or unfrobable to frobable like contents in a chest or drawer you don&#039;t want frobable until it&#039;s open?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property &amp;quot;start_frobable&amp;quot; 1 or 0 (which mean true or false) depending on your case (it affects everything inside), and a triggering entity, such as the lever or the chest itself, that targets the set_frobable entity that triggers the switch when it&#039;s frobbed. For the record, you can also switch the frobability of an object in a script with the command: &#039;&#039;&#039;$&amp;lt;entityname&amp;gt;.setFrobable(n);&#039;&#039;&#039;, where n is &amp;quot;1&amp;quot; to make it frobable and &amp;quot;0&amp;quot; for unfrobable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make breakable glass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__222734]. You basically convert your glass brush to a func_fracture entity and set the &amp;quot;health&amp;quot; spawnarg to the value you want the glass to break at. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about an object that gets increasingly damaged-looking as you hit it?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a func_damagable entity, which replaces its model and/or shader with increasingly &amp;quot;damaged&amp;quot; versions (as many stages as you like) when its health goes below the threshold you set with the &amp;quot;health&amp;quot; spawnarg, and you can use &amp;quot;target&amp;quot; to trigger something when damage occurs (such as a sound effect or event). See here for details on the spawnargs involved in setting it up: [http://www.modwiki.net/wiki/Func_damagable_(entity)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object that you can frob and it does something or something happens?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; If it&#039;s an object you made from patches or brushes, make it into a frobable func_static, or if it&#039;s already a func_static, make sure it&#039;s frobable ([[Making an Entity frobable]]). Then give it a Frob response whose effect is a trigger, and give it a &amp;quot;target&amp;quot; spawnarg to the entity that causes your effect when triggered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can a lever or button target multiple entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes! Use the spawnargs &amp;quot;target1&amp;quot;, &amp;quot;target2&amp;quot;, &amp;quot;target3&amp;quot;, etc, with each entity-target as a value. A quicker way is to use the keyboard shortcut Ctrl+K. Select the button or lever, then select the target-entity and hit Ctrl+K. De-select the target-entity then select the next one, hit Ctrl+K again. Each time adds a new target to the switch. (Many other spawnargs allow you to have multiple entries by numbering them, such as bind and def_attach.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a rotating entity, like a fan?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__242385]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make objects non-solid so they still render but the player can walk through them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Add the spawnarg: noclipmodel 1 to turn them into non-solids.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a firefly or will-o-wisp, basically a glowing ball that floats around?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a rough explanation to help you get started. A firefly is a func_emitter. Click the model property then use the button bottom right to select a suitable particle effect, possibly tdm_glare_lamp_01.prt. Bind to something invisible that will move it along a path, typically a func_mover with nurb curves used as the path. A tutorial for setting up nurb curves is here [http://www.doom3world.org/phpbb2/viewtopic.php?t=5123].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an event from something in the player&#039;s inventory?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; give the object a &amp;quot;target&amp;quot; to trigger and also the property/value: scriptobject InvTriggerScript. If your object does not already go in the inventory then use the entity: items &amp;gt; custom &amp;gt; atdm:moveable_custom_item. If you get a collision model error then ask on the forums for help (or read the wiki entry for [[Moveables]]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport an entity?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use targets/atdm:teleport. See this wiki page [[Teleporting_entities]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom inventory item with its own inventory icon graphic?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this entry [[A_-_Z_Beginner_Full_Guide_Page_6#Special_Items]] for setting the inventory category, loot type, inventory name and inventory icon. To repeat the instructions for a custom icon: on the object put the property &amp;quot;inv_icon&amp;quot; with a value &amp;quot;guis/assets/hud/inventory_icons/&amp;lt;name&amp;gt;.tga&amp;quot; (substitute whatever name you gave it for &amp;lt;name&amp;gt;), and package your .pk4 to put your image file in that relative location. You can also see other inventory_icons there and can use an existing one, or package your .pk4 to replace an existing one with your custom one. A method for making an inventory icon is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__259172] (be sure to use an alpha channel to make the background transparent, tutorial: [http://www.axialis.com/tutorials/tutorial-misc001.html]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do make an object that&#039;s hard to frob easier to frob?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One easy way is to add this property: frobbox_size 5. If it&#039;s still hard, see this post for other things you can do. [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__228245]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a candle you can pinch to go out?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I made a bunch of pinchable non-moveable candles into my WIP like this: &lt;br /&gt;
# Make a func_static candlestick. place light source entity candleflame on it. &lt;br /&gt;
# Give the candlestick &amp;quot;frobable 1.&amp;quot; &lt;br /&gt;
# Give the candlestick S&amp;amp;R response frob, extinguish light and candleflame name. &lt;br /&gt;
# You can optionally add another response frob to trigger a speaker with a &amp;quot;snuff&amp;quot; sound effect. &lt;br /&gt;
# Done.&lt;br /&gt;
You can copy the entity bunch around and all the params should update correctly for the new replica. Frobbing will not relight it: the player needs to relit them with a flame source.&lt;br /&gt;
&lt;br /&gt;
== Handling AI == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make sure a guard can unlock a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are a few different ways, explained here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__217915]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a key or purse to an AI&#039;s belt, or similar kinds of attachments?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The easiest way is with &amp;quot;bind&amp;quot;. Place the key or purse around the belt area where you want it, sticking a little farther out than usual, and rotate it as desired. On the key add the property &amp;quot;bind&amp;quot; with the value of the AI&#039;s entity-ID or name, then the property &amp;quot;bindToJoint&amp;quot; with the value &amp;quot;leftHips_dummy&amp;quot; or &amp;quot;rightHips_dummy&amp;quot; as needed. For attaching things in other places (like a ring or hat or necklace), it&#039;s the same general principle but you should look up the joint to attach to. A list of all the joint names is here: [[BindToJoint]]. See this wiki entry for more info [[Attaching_Items]]. For another method using def_attach see [[Attaching_Props_to_AI]], and this post for an example of the spawnargs involved [http://forums.thedarkmod.com/topic/13084-ai-attach-keys/page__view__findpost__p__276064]. The issue with def_attach is that the attached thing spawns at its own rotation angle, which might not look great and is tricky to change (if you insist, see [[AI_Attachment_Ingame_Editing]] and [[Cvars_in_The_Dark_Mod#Attachment_related]]). With bind you just place and &amp;quot;bind&amp;quot;, and it stays where you put it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about other kinds of attachments where special animations are involved, like torches and weapons?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For these you want to use Def_Attach. See this wiki entry [[Attaching_Props_to_AI]]. For heads &amp;amp; weapons specifically see this wiki entry [[Adding_Heads_and_Weapons_to_AI]]. (You can set spawnargs on the def_attached entities with the method described here [[Combined_light_entities#Setting_spawnargs]].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I mute an AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Give the AI the spawnarg: def_vocal_set atdm:ai_vocal_set_mute. If you only want to mute some barks, you&#039;ll have to modify the AI&#039;s .def file by hand, taking or commenting out the barks you don&#039;t want, and packaging the new def file in your mission&#039;s pk4. For coughing and animation based barks, see this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__224558]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I hide an AI until I trigger him?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; No, the spawnarg &amp;quot;hide&amp;quot; doesn&#039;t work well with AI (they&#039;re made invisible, but still audibly there). Put the AI in a blueroom and use a teleport instead, or a teleporting script command. See the wiki entry for [[Teleporting_entities]]. Note, after teleporting an AI, pathing becomes a problem for it. See this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__280818] and the previous posts on this issue to make sure the AI can path properly after a teleport. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I manage AI teams, who is a friend, enemy and neutral?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To set the teams, see [[Relations]]. If you want to trigger a change in team with a script, see [[AI_Relations_(Scripting)]]. Another method to switch AI teams using S&amp;amp;R (stim &amp;amp; response) is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256126] and see the entry [[Stim/Response]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI play an animation when I want?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__253169]. There may be other ways possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set or change the health of AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; AI use the spawnarg &amp;quot;health&amp;quot; to set their hit points. To change it in-game, use a script and the function &amp;quot;setHealth&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I pose ragdolls so they look naturally placed?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Save a backup, pose all the ragdolls in-game, then use the console command saveRagdolls which saves their positions to the .map file. cf. [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__265650].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a scene of AI playing cards?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Probably the easiest thing to do is load the prefab (under AI), place it, and adjust it how you want.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI frob something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To get an AI to frob something, eg, a lever (doesn&#039;t work to pick up and carry) create a path_interact entity. You can include it in a normal pathing patrol. Give it these 2 spawnargs: ent &amp;lt;name of entity you want the AI to frob&amp;gt;; target &amp;lt;next path entity (if any)&amp;gt;. Note that the AI won&#039;t walk to this entity; you have to use a path_corner to get him where you want then target to the path_interact to get him to frob.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI catch fire?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can bind some unlit fires to an NPC (like a zombie) and shoot it when a fire arrow, he&#039;ll erupt in flames, but the flames won&#039;t damage him. You could also light him with a candle. I&#039;d bet theres some way to make that actually kill the creature, or at least cause it damage. ... One improvement suggestion: When the the light gets the fire stim, target a trigger multiple, which delays for a 120-240 seconds and then turns the fire off. You could make the fire damaging by starting a trigger timer which applies the stim damage to the target every few seconds. Remember to switch off the timer when the flames are doused.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I keep an AI ragdoll from sinking into the bed model, e.g., if he&#039;s KO&#039;d?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I found one way to keep [an unconscious/dead ragdoll body] from sinking into the model below it is to use a platform of nodraw_solid underneath the body. You should be able to place such a brush within the bed model and test it with a ragdoll on the bed. Adjust it&#039;s top surface height until the body lays just on top of the bed (then delete the ragdoll)... then a blackjacked AI should be able to stay on top of the bed like the ragdoll did.&lt;br /&gt;
&lt;br /&gt;
== The Player == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I do things with the player&#039;s inventory, like trigger an inventory item to be deleted, or an item to be added to the inventory, or one item being replaced with another item?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can do all these things with a script (read [[A_Beginner&#039;s_Guide_to_Scripting]] and the scripting FAQ below to learn about scripting). Have your triggering mechanism trigger a target_callscriptfunction entity which calls a custom script, then use the appropriate script command in the script on $player1. A list of the commands is here [[Inventory#Scriptsupport]]. &lt;br /&gt;
Useful commands are (replacing the &amp;quot;Item&amp;quot; variables with the item ID): &lt;br /&gt;
* &#039;&#039;&#039;$player1.addInvItem(inv_item);&#039;&#039;&#039; and &lt;br /&gt;
* &#039;&#039;&#039;$player1.replaceInvItem(oldItem, newItem);&#039;&#039;&#039; (note: If &amp;lt;newItem&amp;gt; is the $null_entity, &amp;lt;oldItem&amp;gt; is just removed and no replacement happens.) &lt;br /&gt;
For example, to remove a key from the player&#039;s inventory, use a command like: &#039;&#039;&#039;$player1.replaceInvItem ($key, $null_entity);&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport the player?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use base &amp;gt; info_player_teleport. Give it the spawnarg and value: target info_player_start_1. Give it the spawnarg: angle with a value if you want to force the player to turn to face a particular direction.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I simulate a crawl for the player to pass under things like tables that he couldn&#039;t normally do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__229174]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom script?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; First read [[A_Beginner&#039;s_Guide_to_Scripting]], [[Scripting_basics]], and [[My_first_map_script]] to learn the basics of scripting. You write a custom script as a text file named &amp;lt;mapname&amp;gt;.script and packaged in your .pk4 in the same place as your .map file. Inside it you make your own script object or function (I&#039;ll just call them &amp;quot;scripts&amp;quot; from now on, since a &amp;quot;scriptobject&amp;quot; refers to a specific spawnarg in TDM, not the general case as I mean it here) in the format the Beginner&#039;s Guide gives you, usually looking like &#039;&#039;&#039;void MyScript() { code goes here }&#039;&#039;&#039;. Then the game can &amp;quot;call&amp;quot; &amp;quot;threads&amp;quot; of that script that will run until they end or are killed, so you can have more than one thread running the same script concurrently. If you want multiple scripts, put them all in your &amp;lt;mapname&amp;gt;.script file and the game-engine will find them. You run scripts by the script name, not the file name. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I run a script in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A few common ways of calling a script thread in-game are &lt;br /&gt;
# creating a target_callscriptfunction entity with the spawnarg: &amp;quot;call&amp;quot; &amp;quot;&amp;lt;name of your script&amp;gt;&amp;quot;, then creating some other entity (such as a button or trigger brush) that &amp;quot;targets&amp;quot; that entity; &lt;br /&gt;
# creating a button with the property &amp;quot;state_change_callback&amp;quot; &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, which runs the script when pushed or triggered, &lt;br /&gt;
# Using [[Location_Settings#Script_calls]] to call a script when you enter or leave a location; &lt;br /&gt;
# triggering a script with the [[Objectives_Editor]] when you fulfill or fail an objective (possibly a hidden objective only for triggering the script); &lt;br /&gt;
# A script can call another thread in itself with the &amp;quot;thread&amp;quot; function; see the command in the link below. &lt;br /&gt;
# An entity can call a script when it spawns. Add a property/value either in the .def file or as a spawnarg on the entity: &amp;quot;ScriptEvent void &amp;lt;script&amp;gt;(&amp;lt;parameters&amp;gt;);&amp;quot;. &lt;br /&gt;
# The script &amp;quot;void main();&amp;quot; is always called at game start. So if you add code under that heading in your script file, it will run at game start. &lt;br /&gt;
There are other methods too. (Note, if you call a persistent script, i.e., it runs all game, be especially sure to avoid performance hits, or make it non-persistent if possible, that is, you &amp;quot;kill&amp;quot; it at some point in the game so it doesn&#039;t hog resources..) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are script events (aka commands or functions)?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A script event is a pre-made object or function that does something for you, usually to some game item you specify, just when you write it in your code (like &#039;&#039;&#039;$item.eventX();&#039;&#039;&#039; does X to item). Sometimes it wants parameters or arguments to run (the stuff in parentheses) and will give an error if you don&#039;t put the arguments in the parentheses in exactly the way it wants, with the right number of them &amp;amp; right data types, etc. And some of them return values too, especially the &amp;quot;get&amp;quot; functions, which are handed over to a variable (e.g., &#039;&#039;&#039;X = getValue();&#039;&#039;&#039;, now X has the value. If X is an entity, you can even act on X as if it&#039;s the entity itself. Just be sure the data type of X and Value are the same, e.g. float, or string, or entity, etc, or you&#039;ll get an error). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common or useful script events for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all Doom3 and TDM script events are listed on this wiki page [[TDM_Script_Reference]], including the proper syntax (or this page, but it&#039;s down now: [http://www.modwiki.net/wiki/Script_events_%28Doom_3%29]), or also these two files in your Dark Mod folder (open with a text editor): scripts/doom_events.script, scripts/tdm_events.script. Note that TDM has some of its own script events, like setFrobable (in the tdm_events.script list). &lt;br /&gt;
&lt;br /&gt;
A quick short list of common or useful script events good for editing is here: [[Script_Events_User-Friendly_List]], with syntax and description, and including TDM events. It doesn&#039;t list all script events and all details, just common &amp;amp; useful ones for actual mapping IMO. If you want the full list, use the TDM_Script_Reference link I gave above.&lt;br /&gt;
&lt;br /&gt;
== World Building == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way to make caves?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Some tips are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204909] &amp;amp; [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__289484] Instructions for quick-cavern pattern building is here [http://forums.thedarkmod.com/topic/14469-quick-caverns-recipe/page__view__findpost__p__304250]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking roof using clean brushwork, including with an attic inside?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here are descriptions of method that all use a similar trick [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325945], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325944], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__244109]. The trick is to &amp;quot;cut out&amp;quot; a roof from a square brush using the clipper tool. Avoid rotating brushes to make it by hand. Alternatively, use patches over a rectangular under-structure of BSP brushes, although this is not good if you want a portaled attic. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a city area that performs well?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha gave a good method in this post. [http://forums.thedarkmod.com/topic/10003-so-what-are-you-working-on-right-now/page__view__findpost__p__312133]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a forest or a big outdoorsy area?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One good method is making large &amp;quot;rooms&amp;quot; in the shape of a big oval cylinder with very high natural-looking &amp;quot;rocky&amp;quot; &amp;amp; skybox walls and uneven ground using patches, filling it with trees and hiding some of the walls behind trees and greenery (you could also fill it with thick cylinder brushes of different sizes with bark texture to look like more trees, and place branches coming off them or to make a canopy), and possibly filling it with tons of grass (using [[SEED]]) and rocks and streams, with visportaled openings at &amp;quot;kiss points&amp;quot; in the walls to other large oval rooms at different orientations (maybe 2-5 connections per oval) so there&#039;s a dense web of interconnected forested rooms that (sort of) appear to be one big dense forest to the player. Some useful things to use are the [[Object_detail]], [[SEED]], and [[LOD]] systems. See the blueprint for the Thief 2 level Trail of Blood for a rough idea: [http://thief.wikia.com/wiki/T2_M10_Trail_of_Blood?file=T2_m10a_editor_colored.gif]. For good examples in Dark Radiant, look at the construction of mission 3 of No Honor Among Thieves (&amp;quot;No Honor Among Anyone&amp;quot;) and Shadowhide&#039;s slenderman forest map. (Somebody post links to screenshots of those maps in DR, or remind me to.) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make uneven ground?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One method is by burying patches into the ground that stick out and make the ground lumpy as described here [http://forums.thedarkmod.com/topic/13338-newbie-mapper-tip-making-uneven-ground/page__view__findpost__p__274917]. For more encompassing unevenness, you can use much larger patches laid over square caulk brushes underneath that seal the leaf to make the entire ground uneven. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a natural looking road where there isn&#039;t a sharp seam between the road material and grass but a nice fading transition?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the Wiki page for [[Roads]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make curved ceilings and archways?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use patches. Here&#039;s a list of some good tutorials for this sort of thing [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__254764]. Also look at this wiki page [[Patches#Archways]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a way to get good-looking fog in my mission?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are numerous values to make good fog. The setup for the fog from Fidcal&#039;s Heart mission is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__248277].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some tips to making a better looking map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[10_Simple_Tricks_for_Better_Looking_Maps]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good method or plan-of-action for building?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a matter of personal preference, but a method that professionals use is called the &amp;quot;stepwise refinement&amp;quot; method. It means you build the *entire* space of your mission first in rough blocks (so you have it all planned out first), then refine the whole thing in increasingly more detailed steps section by section, leaving the most fine detailing towards the end. It can help to use DR&#039;s Layer system to organize your building by sections too, without other sections interfering. Also, when you&#039;re drawing your map, think about arranging space into winding &amp;quot;rooms&amp;quot; (so there&#039;s no long lines of sight), even outside with tunnels, walls and skybox; and think about visPortal placement right at the start. Also think about the gameplay-performance balance of shadowing-lights &amp;amp; AI when thinking about placing them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I cleanly connect two brush edges meeting together, especially at a diagonal?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__257111]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a method for building very fast &amp;amp; efficiently?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha came up with &amp;quot;modular&amp;quot; approach where you build a few stock modules of architecture that you can combine to make a lot of geometry very quickly and efficiently. Here&#039;s his description: [http://forums.thedarkmod.com/topic/12833-sir-taffsalots-mapping-thread/page__view__findpost__p__290747]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking waterfall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There&#039;s a discussion about this in this thread [http://forums.thedarkmod.com/topic/11901-waterfalls/page__pid__303963#entry303963]. For a small waterfall, a white foamy particle effect raining down by itself looks good. You can copy Bikerdude&#039;s example from St. Alban&#039;s Cathedral. [http://www.youtube.com/watch?v=gIrZDpc1m68]. For a bigger waterfall, people talked about a combination of a flowing vertical water block with the foamy particle effect towards the bottom.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a nice little pond.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[How_to_create_a_pond]]. This thread [http://forums.thedarkmod.com/topic/14647-how-can-i-make-a-realistic-looking-pond/page__view__findpost__p__308916] has discussion on it.&lt;br /&gt;
&lt;br /&gt;
== Patches! ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is it possible to split patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this tutorial on it [[Patch_Splitting_-_Basic_Tutorial]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bend patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the instructions at [[Patches#Bending_Patches.2C_Curves.2C_L-shapes.2C_etc]] (Here&#039;s another small tutorial in a post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__277350].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I want to use a patch to round off a corner.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this part of the Patch wiki page [[Patches#Round_and_Soft]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I make a perfect circle with patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select verts of 4 corners, select the &amp;quot;rotate and scale&amp;quot; tool, and use the value &amp;quot;0.9428&amp;quot; to scale &amp;quot;up&amp;quot; (actually down) in the 2 corresponding axis of the scale tool. See this post [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__279356].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a dome or sphere?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a cone patch and drag down the top vertex to form a dome. Invert the matrix if you want an internal dome or thicken if you want it to be visible inside and out. A sphere is just two of these stuck together. Also tweak the tesselation in patch inspector if it is too chunky. You can have fun with the textures though; try fit. If you totally flatten the dome you have a disc which can produce some nice texture effects, eg, the marble floor centrepiece or a round rug. Drag a side to make it oval. See this post for a picture [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__233107].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you align a texture on a curved patch?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to align properly texture to curved patch like this one in the image [NB: image is missing], divide a brush according to the angle of the patch then use it&#039;s shader for your purpose. ... I made it with one edge is at one end of the curved patch and the other edge is at the other end. It gets distortions without this way.&lt;br /&gt;
&lt;br /&gt;
== Events and SFX ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an earthquake event?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Earthquakes can be done with a speaker. Just use the spawnarg &amp;quot;s_shakes&amp;quot; &amp;quot;1&amp;quot; on the speaker, and the screen will shake violently however loud the sound gets.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I emulate something like a blizzard or dust storm?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Doom3 made a dust storm area, and the same method can be used to make a blizzard, so it&#039;s possible. I&#039;m leaving this here to look up instructions for future reference.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make the screen fade to black (or some other color), or from black back to the game.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create entity:  [[Triggers#trigger_fade|Trigger_Fade]].  Adjust &amp;quot;fadeTime&amp;quot; and &amp;quot;fadeColor&amp;quot; spawnargs as desired.&lt;br /&gt;
&lt;br /&gt;
== Textures == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a quick way to align textures between two surfaces?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For two brushes, select the first surface, then &#039;&#039;&#039;edit --&amp;gt; copy shader&#039;&#039;&#039;, then click on the second surface and &#039;&#039;&#039;edit --&amp;gt; paste shader&#039;&#039;&#039;. This will seamlessly match the 2nd surface to the texture of the 1st. DR also comes with a useful tool for texture alignment, [[Texture_Tool]], which you bring up with Ctrl+Alt+T. If it&#039;s textures on two patches, you can follow these directions: [http://forums.thedarkmod.com/topic/14034-tutorial-for-road-creation/page__view__findpost__p__294114]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I randomize the position of textures on multiple brushes, e.g., for a row of stairs or pillars all with the same texture that I want to look different?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select multiple faces and in the surface inspector, press the natural button once you set the scale properly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I blend textures?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. This is particularly good for dirtying some textures up by blending in a grime texture. You can blend textures with a custom material file. Link to instructions coming. Also see the entry for [[Basic_Material_File]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How about blending texture transitions so there isn&#039;t a sharp seam, e.g., for a dirt path in grass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; DR comes with grass edge transition decal patches to overlay the hard edges. Read how to set it up here [[Grass_Edges]], or a more detailed tutorial on making roads here [[Roads]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; In NHAT blended terrain was made from patches broken into segments then exported as ASE models. Then the models were vertex painted in Blender and imported back into Dark Radiant. See this tutorial [[DrVertexBlend_(tutorial)]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set the color for some textures (like glowing mushrooms) and make lightbulbs go dark when turned off?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &amp;quot;Colorme&amp;quot; textures allow you to set the color with a spawnarg. So e.g. for colored mushrooms, choose a colorme skin with the spawnarg like &amp;quot;skin&amp;quot; &amp;quot;mushroom_selflit_green_colorme&amp;quot; and choose the color with a spawnarg like &amp;quot;_color&amp;quot; &amp;quot;0.24 0.50 0.40&amp;quot; (where the value is the RGB values you want). For lightbulbs you can trigger a colorme texture switch with the lightswitch (so it switches between &amp;quot;lit up&amp;quot; and &amp;quot;black&amp;quot;). Instructions on that coming.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a fast way to put different textures on a lot of objects?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; 1. Click the mouse wheel on the texture to copy it. 2. To paste it naturally (i.e., in a random position): shift+mousewheel click. 3. To just paste it: ctrl+mousewheel click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can you tile a texture a specific number of times to fit a surface?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to tile a texture a certain number of times, enter the values 1/X and 1/Y (you need to compute them in your head) in the little boxes in the surface inspector, then press &amp;quot;Fit&amp;quot;. It will tile your texture horizontally X times and vertically Y times. You can also enter things like &amp;quot;2&amp;quot; and &amp;quot;1&amp;quot; and get a texture that only occupies half of the width. You can then use the &amp;quot;Right&amp;quot; or &amp;quot;Left&amp;quot; buttons to align it quickly at the ends. Pro-tip: Press CTRL+ALT+T to open the texture tool, it allows super quick aligning of textures on patches. Esp. useful for decals where the decal texture consists of multiple decals.&lt;br /&gt;
&lt;br /&gt;
== Readables &amp;amp; GUIs ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put custom art in a book or scroll, like a picture?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a custom .gui. Here&#039;s a rough idea to get you started [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__263836]. I&#039;ll try to put better instructions in later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger a text message to pop up and say something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create an entity: darkmod &amp;gt; targets &amp;gt; atdm:gui_message and give it the properties/values that you want. Popups will explain each one. You can target it with a triggering entity or trigger it from a script or any other triggering mechanism. An example is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256592]&lt;br /&gt;
&lt;br /&gt;
== Lighting and Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I add music or ambient sounds?&#039;&#039;&#039; &#039;&#039;&#039;Q. Can I dynamically adjust the ambient lighting?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For both of these things, check out the article for [[Location Settings]]&lt;br /&gt;
&lt;br /&gt;
{{editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{tutorial-editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{darkradiant|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up Reverb (EAX) settings for my rooms? (E.g., the echo of a large hall, etc.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create a text file and name it &amp;lt;mapname&amp;gt;.eax; place it in your .pk4 with your .map file; and in it create entries by location name with the values you want for that location. See this wiki entry to see the format &amp;amp; values [[Setting_Reverb_Data_of_Rooms_(EAX)]].&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17879</id>
		<title>Editing FAQ - Troubleshooting &amp; How-To</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17879"/>
		<updated>2014-08-08T03:24:36Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Scripting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below are some common issues and questions mappers have had in the Editor&#039;s Guild forum with common solutions. Some of this assumes you&#039;ve already gone through the [[A_-_Z_Beginner_Full_Guide_Start_Here!]], [[Startpack_Mappers&#039;_Guide]], and [[Dark_Radiant_Must_Know_Basic_Intro]]. (If you know a FAQ not here and worth going in this list, and you know the right answer(!), or you can improve an existing answer, please add it if you have edit control or PM it to a team-member if you don&#039;t.) &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting FAQ =&lt;br /&gt;
&lt;br /&gt;
== Rendering &amp;amp; VisPortal Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of my brushes have disappeared or turned black and won&#039;t render.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This can happen when two touching brushes around the seam are not perfectly flush with one another and the rendering hiccups for those brushes &amp;amp; brushes behind it, either there&#039;s a tiny wedge or overlap or gap or weird angle between them. The usual solution is to make sure the brushes are snapped to the grid and perfectly flush against one another, or more generally to simplify the brushwork around the seam of the disappearing brushes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My visportal is not showing up or not closing like it should (you can check this with by typing &amp;quot;r_showportals 1&amp;quot; in the console. The portal edge will show green when open and red when closed.).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A common reason for that is that the two areas separated by the portal are not hermetically sealed and there&#039;s an internal leak, either (1) there may be an unportaled gap between the two, possibly covered up by func_static (which do not seal) or possibly caused by an inadvertent hole created by the first FAQ question above, or (2) an internal leak can happen when all sides of the visportal are not buried in or flush against sealing brushes, and there&#039;s a gap between the visportal and brush, or possibly even a tiny gap just touching the visportal side is enough to break it. A way to check if there&#039;s an internal leak, and locating it if there is, is described here: [[Visportals#Trouble-shooting]]. Other reasons it might fail are also described there (such as accidentally changing a nodraw texture to something else).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I can see other rooms behind a mirror (or any reflective surface) through it, instead of just a reflection.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The area behind a mirror should be in a separate leaf (visportaled area) behind a closed visportal so it doesn&#039;t render. This problem usually means the two areas aren&#039;t in separate leafs, the portal isn&#039;t closed, or there&#039;s an internal leak between the areas in front of and behind the mirror.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Help! I&#039;m having rendering &amp;amp; visPortal issues all over the place ... broken portals, sparkly lines, disappearing brushes, z-fighting, uneven walls, etc.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; As a general piece of advice, messy brushwork leads to trouble one way or another. To keep your brushwork clean: &lt;br /&gt;
* keep snapped to the grid (Ctrl+G toggles) &amp;amp; stay away from small grid levels (Typing a number or Plus/Minus changes the grid scale; 8 is a good starting grid; staying at or above 2 or 4 is fine for most stuff; going below 1 is usually just for special situations). &lt;br /&gt;
* Make brush intersections perfectly flush. &lt;br /&gt;
* Stay away from unnecessary tiny brushes &amp;amp; wedges (leave detail work to func_statics; brushes are for closing off leafs and the void. Of course you can do fine detail work with brushes &amp;amp; convert them to a func_static). &lt;br /&gt;
* Don&#039;t use the &amp;quot;CGS Subtract&amp;quot; tool if it will shatter the brush into tiny slivers; use the cut tool instead (open by pushing &amp;quot;X&amp;quot;). &lt;br /&gt;
* You can use patches for uneven geometry with square brushes underneath textured with caulk. &lt;br /&gt;
* When rotating geometry, avoid weird angles when you can (where vertexes end up off the grid), and for multi-brush structures, build the whole thing first *then* rotate it all together instead of rotating &amp;amp; placing each brush individually. &lt;br /&gt;
These aren&#039;t rules set in concrete if you want to do something special once in a while, but general rules of thumb that will make life a lot easier if you generally stick to them.&lt;br /&gt;
&lt;br /&gt;
== Crashes and Warnings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map has a leak in it, but a pointfile either isn&#039;t generated or doesn&#039;t make sense. (A pointfile is generated when dmap occurs and there&#039;s a leak, then you open DarkRadient and click File&amp;gt;Pointfile to see it. It normally runs a red line that ends in the void, pointing out the leak).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039;  Make sure a gap isn&#039;t covered up with func_statics. If the origin of a model is in the void it will also cause a leak with a non-sense pointfile. Read more on the [[Leaking maps]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll up through the console output to see what a problem was during dmap or map or in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/Down to scroll through the console.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I&#039;m getting an error message &amp;quot;warning: aas is out of date&amp;quot; once my map has loaded. What does it mean and what do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The AAS is for AI pathfinding. It usually means you changed brushwork and started a map without dmapping first. The solution is to dmap. If you dmap and still get the warning, delete your .aasxx, .proc, and .cm files in the maps folder and dmap again. If you&#039;re still getting a warning, then it could be a sign that something in your map is breaking the AAS pathfinding. Try monsterclipping tricky areas for the AI to path (like around objects and uneven ground) or clean up messy brushwork that might break the dmapping like sliver brushes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have encountered a malloc failure error while dmapping my level. Instead of finishing with the dmap operation, it crashes midway with an error message.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; One solution to this is given in the Dmap wiki entry here: [[Dmap#Malloc_Errors]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; This is what I&#039;ve done to fix this exact issue. Open the map in DarkRadiant, select everything, copy to clipboard. Open another instance of DarkRadiant and paste from clipboard. Save as new filename and dmap new file and that has worked 3 times now with random unresolvable crashes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A3.&#039;&#039;&#039; GC and I have found correlations between visportalling and mAlloc errors. Time to re-arrange your visportals. In NHAT, we had many malloc problems until we retooled how each area was portaled. Originally, every other visleaf had tons of entities, while half had hardly any. That&#039;s not neccessarily bad, but it strains the dmapper when one or two visleafs are cluttered with entities that really bloat your mapname.proc file. We added a few more portals to even out entity distribution, and dmap was happy again.&lt;br /&gt;
&lt;br /&gt;
== Performance Issues ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map is so slow. How do I improve performance?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See these wiki entry: [[Performance:_Essential_Must-Knows]]. Tips include: &lt;br /&gt;
* Reduce AI [[Pathfinding]] with Monsterclipping helps performance, simplifying complex bumpy surfaces into 1 smooth monsterclipped surface (or raise the monsterclip height to be inside the ceiling and there is no pathfinding computation at all), or excluding entire surfaces AI should never walk on, like detail brushwork or some roofs. &lt;br /&gt;
* Use [[Interleaved_Thinking_optimization]]. Reducing AI think-time helps performance quite a bit. &lt;br /&gt;
* break-up long lines of sight, &lt;br /&gt;
* improve visportal &amp;amp; leaf placement (so less architecture is rendered at a time), &lt;br /&gt;
* use fewer AI, &lt;br /&gt;
* convert ornamental brushwork into func_static, &lt;br /&gt;
* reduce the overlap of light sources on surfaces by adjusting their placement &amp;amp; reducing their light-radius. (Every time a new light hits a surface, it&#039;s another render pass. So 4 lights hitting a surface processes it 4 times. If only 1 light hit it, its lighting is processed in 1/4 the time), and &lt;br /&gt;
* set objects and lights to &amp;quot;noshadow&amp;quot; if it won&#039;t be noticable to the player or affect gameplay (possibly in combination with low-poly shadow meshes or shadowy decals. Note that &amp;quot;noshadow&amp;quot; has two jobs. Put on lights, it means that light will cast no shadows on any object. Put on objects, it means that object will not cast a shadow from any light.) &lt;br /&gt;
&lt;br /&gt;
There are also lots of other tricks out there if you check around the forums, including more advanced &amp;amp; optional tricks such as using the [[LOD]] system or [[SEED]] system, or even crazier tricks (cross-leaf func_statics, skybox architecture, Strombine lighting, Camera Cubemapped Visportal Patches, lots of crazy tricks out there), that you don&#039;t have to worry about if you&#039;re a new mapper but you can ask us about or search for in the forum if you&#039;re curious. Generally speaking there are pros and cons trade-offs between performance &amp;amp; dazzle for many things (like lights or visportal placement); so it&#039;s good to think about the best performance-dazzle balance for your scene. E.g, lots of highpoly brushwork, lights, &amp;amp; AI can look good in a small or medium room, but may not be worth the performance hit in a big courtyard, and try to find ways to get better performance &amp;quot;for free&amp;quot; without the player noticing anything missing, like smart use of noshadows, monsterclips, and interleaved thinking distances.&lt;br /&gt;
&lt;br /&gt;
== Gameplay Issues that Mappers sometimes Overlook ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Below is a list of common gameplay issues that players sometimes complain about and that mappers &amp;amp; testers sometimes overlook or should at least be aware of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Players find it very difficult to frob objects (loot, keys, readables) when the frob distance is set too short or the space is awkward (like in a drawer or up on a wall, etc). In testing, please double-check that every frobable object is easy to frob from a comfortable place, and increase the frob distance if it&#039;s not, erring on the side of more space. (See the question on making frobbing easier under &amp;quot;Handling Objects&amp;quot; below for more information.) &lt;br /&gt;
&lt;br /&gt;
- Objects can get stuck into brushwork while moving them around. &lt;br /&gt;
&lt;br /&gt;
- Players can get stuck in narrow spaces and can&#039;t mantle out, so try to avoid this kind of geometry if possible. &lt;br /&gt;
&lt;br /&gt;
- A very low ceiling can prevent hitting AI with a BJ, so try to avoid it when AI are around. &lt;br /&gt;
&lt;br /&gt;
- Make sure AI have a flee path.  &lt;br /&gt;
&lt;br /&gt;
- Some players would like the ability to drop used keys and other inventory items, done by turning the can_be_dropped property to true, unless for gameplay reasons you don&#039;t want to. &lt;br /&gt;
&lt;br /&gt;
- Some players don&#039;t like long readables that don&#039;t get to the point. At least be conscious of how your readables read to a player.&lt;br /&gt;
&lt;br /&gt;
- Think about how you want to handle non-functioning doors (or other &amp;quot;unnatural&amp;quot; situations like windows that can open) in a way that visually or fairly communicates to the player that something is special about this door or window, but isn&#039;t too immersion breaking either.&lt;br /&gt;
&lt;br /&gt;
== Issues with Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My streetlight, candle, lamp, light-creating object, causes a weird shadow I want to get rid of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Put the spawnarg &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; on the offending object.&lt;br /&gt;
&lt;br /&gt;
== AI Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My AI will not pass through a visportal no matter how I set up the path nodes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Check that the sides of the visportal use the nodraw texture (except for the portal-face itself of course).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you get AI to walk on complex terrain patches or func_statics?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can always lay down invisible monsterclip brushes and the AI can walk on it. Overlay with a brush with a &amp;quot;material&amp;quot; clip texture so it causes the right sound for footsteps.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Problems with Patches ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have 2 curved patches and they&#039;re not aligning. What do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My patch is rendering strangely, like fractured into slivers.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
== Issues with Lighting &amp;amp; Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of the parallel lights I use for moonlight aren&#039;t giving off any light.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a known problem with parallel lights. For some reason in some arrangements you get no light at all. Just fiddle with it a bit - move it slightly, change the radii, move the vertex a bit - and it should suddenly work. Once you&#039;ve got it working then it&#039;s stable. Likely the code chokes on certain values in its calculations. ... Also, to help optimize your moonlight, you should adjust the radius so it&#039;s only as big as it needs to be. You may also want to move the actual position of the little moon cube in the skybox to match the parallel light (and make sure to fix the texture on it if you mess it up - hint: lock textures before moving cube to make it easy)&lt;br /&gt;
&lt;br /&gt;
= General How-To Editing FAQ =&lt;br /&gt;
&lt;br /&gt;
== Dark Radiant Questions == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I see all the default properties already on an object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; In the entity inspector there&#039;s a checkbox near the top that says &amp;quot;Show Inherited Properties&amp;quot;. Click that box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some basic units, scales, limits, maxs, and mins of various things when editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all these things is here: [[Limits,_Max,_Min,_Stats,_etc]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I manipulate brushes to resize and reshape them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. In DarkRadiant you can select a brush and push &amp;quot;V&amp;quot; to select verticies to drag and resize, &amp;quot;E&amp;quot; to select edge(s) to drag and resize, and &amp;quot;F&amp;quot; to select face(s) to drag and resize. &amp;quot;Ctrl+#&amp;quot; makes a selected brush be #-sided. You can also use the Brush&amp;gt;Prism and Brush&amp;gt;Cone to convert a brush to those shapes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common DR shortcut commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &lt;br /&gt;
* &amp;quot;H&amp;quot; hides selected items. &lt;br /&gt;
* &amp;quot;I&amp;quot; inverts selected. &lt;br /&gt;
* &amp;quot;Ctrl+I&amp;quot; inverts a patch&#039;s normal. &lt;br /&gt;
* &amp;quot;J&amp;quot; brings up entity list. &lt;br /&gt;
* &amp;quot;Ctrl+K&amp;quot; makes 1st-selected-entity &amp;quot;target&amp;quot; 2nd-selected-entity. &lt;br /&gt;
* &amp;quot;L&amp;quot; brings up light inspector. &lt;br /&gt;
* &amp;quot;Ctrl+L&amp;quot; brings up the Layers menu. &lt;br /&gt;
* &amp;quot;N&amp;quot; brings up entity inspector. &lt;br /&gt;
* &amp;quot;T&amp;quot; brings up texture browser. &lt;br /&gt;
* &amp;quot;X&amp;quot; go into clipper mode. &lt;br /&gt;
* Brush manipulation modes: are &amp;quot;R&amp;quot; rotate brush, &amp;quot;Q&amp;quot; free-move &amp;amp; resize, &amp;quot;W&amp;quot; translate-move.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make my own shortcut key commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Under the Edit menu, at the bottom is &amp;quot;Keyboard Shortcuts&amp;quot; which allows you to set your own shortcuts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I screwed something up! What do I do?!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Ctrl+Z undos. Ctrl+Y redos.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is there a way to organize &amp;amp; simplify building, so I can build one section at a time without other sections getting in the way?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; DR has a [[Layers]] function that lets you build one &amp;quot;layer&amp;quot; at a time (open with ctrl+L or View&amp;gt;Layers). It also improves DR performance, which is handy as the map gets bigger.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up things like the pre-game shop, the player inventory, and an in-game map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; All these things are described in the Startpack Mappers&#039; Guide: [[Startpack_Mappers&#039;_Guide#Ammo.2C_Weapons.2C_Player_Tools.2C_Start_Inventory]], [[Startpack_Mappers&#039;_Guide#Purchase_Shop]], [[Startpack_Mappers&#039;_Guide#Adding_an_In-game_Map_to_your_FM]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put spawnargs on def_attached entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can put spawnargs on def_attached entities by using the spawnarg &amp;quot;set SPAWNARGNAME on ATTACHMENTNAME&amp;quot; &amp;quot;value&amp;quot; on the base entity. Here&#039;s an example of setting a color property on a flame attachment to a torch &amp;quot;set _color on flame&amp;quot; &amp;quot;0.2 0.2 0.9&amp;quot;. Read more here [[Combined_light_entities#Setting_spawnargs]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s an easy way to find materials in DR?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Tip to help find materials in Dark Radiant&#039;s materials browser: &lt;br /&gt;
# Point to Textures (or any tree). &lt;br /&gt;
# Shift + Right key to fully open the tree. &lt;br /&gt;
# Type the key letters of what you want to find. &lt;br /&gt;
# Up/down arrows to go to next/previous occurrence. &lt;br /&gt;
# Esc to get out of input field. &lt;br /&gt;
Oh yeah, avoid F3 because that is likely to switch to render mode which in my case crashes DR (but may not if the map is small).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an N-sided brush?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A quick way to make an N-sided brush is to highlight the brush and push cntl+N (N being the number of sides for the top face). So if you want a 5-sided brush, highlight it and push cntl+5. But the best way to get the walls of a multi-sided brush to line up seamlessly is still to use the clipper-tool and precisely cut off a slice. (And don&#039;t use CSG Subtract unless you know what you&#039;re doing and aren&#039;t creating a million splinters!)&lt;br /&gt;
&lt;br /&gt;
== Console Questions ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I open the console?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Open the console with ctrl+alt+~ in a normal game, and just ~ when playing through &amp;quot;map&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll through the console output?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/PageDown.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q.What&#039;s a list of all the Doom3 Console Commands and CVars?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all commands &amp;amp; Cvars is here [http://www.doomwadstation.com/doom3/console/]. Darkmod Cvars are listed here [[Cvars_in_The_Dark_Mod]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some *useful* console commands and cvars for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here&#039;s one list: [[Console_Useful_Controls]]. Here&#039;s a list more tailored to mapping: &lt;br /&gt;
&lt;br /&gt;
Commands: &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;dmap &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; compiles a map, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;give &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; gives the player an item, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;god&#039;&#039;&#039;&amp;quot; player cannot be harmed,&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;killmonsters&#039;&#039;&#039;&amp;quot; takes out all AI&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;map &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; loads a map to play, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;noclip&#039;&#039;&#039;&amp;quot; lets the player go through objects and walls, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;notarget&#039;&#039;&#039;&amp;quot; let&#039;s the player be invisible to AI, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadDecls&#039;&#039;&#039;&amp;quot; will reload material defs without having to re-start TDM, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadimages&#039;&#039;&#039;&amp;quot; does the same for lights and &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadSurface&#039;&#039;&#039;&amp;quot; for surfaces, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;saveRagdolls&#039;&#039;&#039;&amp;quot; saves the positions of all ragdolls to the .map file (see the FAQ under Handling AI), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;teleport &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; teleports the player to an entity. &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;tdm_show_loot&#039;&#039;&#039;&amp;quot; Shows loot.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;spawn &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; spawns an entity: &lt;br /&gt;
 spawn atdm:weapon_blackjack&lt;br /&gt;
 spawn atdm:weapon_shortsword&lt;br /&gt;
 spawn atdm:ammo_broadhead&lt;br /&gt;
 spawn atdm:ammo_firearrow&lt;br /&gt;
 spawn atdm:ammo_gasarrow&lt;br /&gt;
 spawn atdm:ammo_mossarrow&lt;br /&gt;
 spawn atdm:ammo_noisemaker&lt;br /&gt;
 spawn atdm:ammo_ropearrow&lt;br /&gt;
 spawn atdm:ammo_waterarrow&lt;br /&gt;
 Append &amp;quot;inv_ammo_amount 50&amp;quot; to any of the above to spawn 50 arrows at once: spawn atdm:ammo_broadhead inv_ammo_amount 50&lt;br /&gt;
Cvars (1 turns on, 0 turns off, unless otherwise noted): &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;com_showFPS 1&#039;&#039;&#039;&amp;quot;, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showLightCount 1&#039;&#039;&#039;&amp;quot; (colors shows the number of lights hitting a surface, black = 0, red = 1, blue = 2... etc), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showPortals 1&#039;&#039;&#039;&amp;quot; (red=closed,green=open) If your portals dont show up they are most likely not sealing.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showTris n&#039;&#039;&#039;&amp;quot; (n=1) Shows tris rendered directly, (n=2) shows overdrawn tri&#039;s, (n=3) shows all tri&#039;s, direct and indirect.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a put-object-here objective?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182924]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a &amp;quot;ghosting&amp;quot; objective (e.g., you are busted if you are seen.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204695]&lt;br /&gt;
&lt;br /&gt;
== Handling Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a door handle to a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Just position the handle and input &amp;quot;bind&amp;quot; and the door entity ID/name as a spawnarg. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object into loot?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182921]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an entity frobable?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the entry for [[Making an Entity frobable]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Ok it&#039;s frobable, but doesn&#039;t fall or move. How do I make an entity act like a world object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You need to make the object a moveable, see [[Moveables]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I get a lever or button to open a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__212036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put some text on a sign or wall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can use this method [http://forums.thedarkmod.com/topic/11159-add-text-to-your-signs-signposts-walls-etc/]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bind something to a rope (like a body) so it doesn&#039;t fall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Dynamic ropes are unreliable, so it&#039;s good to use a func_static like a chain or make a func_static rope from a cylinder brush. For a ragdoll, place the ragdoll so he clips into the func_static. You need to bind the ragdoll to the chain (so the spawnarg is on the ragdoll), with &amp;quot;bind&amp;quot; &amp;quot;func_static_...&amp;quot;, where func_static_... is the chain. Or, through DR, you can just select the entity you want to attach (the ragdoll), then also select the thing you want to attach it to (the chain), and in the menus select &amp;quot;Entity&amp;quot; - &amp;quot;Bind selected entities&amp;quot;. But it&#039;s been reported the clipping does the job, not binding. See this link [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__221262]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make something switch from frobable to unfrobable like a used lever, or unfrobable to frobable like contents in a chest or drawer you don&#039;t want frobable until it&#039;s open?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property &amp;quot;start_frobable&amp;quot; 1 or 0 (which mean true or false) depending on your case (it affects everything inside), and a triggering entity, such as the lever or the chest itself, that targets the set_frobable entity that triggers the switch when it&#039;s frobbed. For the record, you can also switch the frobability of an object in a script with the command: &#039;&#039;&#039;$&amp;lt;entityname&amp;gt;.setFrobable(n);&#039;&#039;&#039;, where n is &amp;quot;1&amp;quot; to make it frobable and &amp;quot;0&amp;quot; for unfrobable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make breakable glass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__222734]. You basically convert your glass brush to a func_fracture entity and set the &amp;quot;health&amp;quot; spawnarg to the value you want the glass to break at. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about an object that gets increasingly damaged-looking as you hit it?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a func_damagable entity, which replaces its model and/or shader with increasingly &amp;quot;damaged&amp;quot; versions (as many stages as you like) when its health goes below the threshold you set with the &amp;quot;health&amp;quot; spawnarg, and you can use &amp;quot;target&amp;quot; to trigger something when damage occurs (such as a sound effect or event). See here for details on the spawnargs involved in setting it up: [http://www.modwiki.net/wiki/Func_damagable_(entity)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object that you can frob and it does something or something happens?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; If it&#039;s an object you made from patches or brushes, make it into a frobable func_static, or if it&#039;s already a func_static, make sure it&#039;s frobable ([[Making an Entity frobable]]). Then give it a Frob response whose effect is a trigger, and give it a &amp;quot;target&amp;quot; spawnarg to the entity that causes your effect when triggered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can a lever or button target multiple entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes! Use the spawnargs &amp;quot;target1&amp;quot;, &amp;quot;target2&amp;quot;, &amp;quot;target3&amp;quot;, etc, with each entity-target as a value. A quicker way is to use the keyboard shortcut Ctrl+K. Select the button or lever, then select the target-entity and hit Ctrl+K. De-select the target-entity then select the next one, hit Ctrl+K again. Each time adds a new target to the switch. (Many other spawnargs allow you to have multiple entries by numbering them, such as bind and def_attach.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a rotating entity, like a fan?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__242385]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make objects non-solid so they still render but the player can walk through them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Add the spawnarg: noclipmodel 1 to turn them into non-solids.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a firefly or will-o-wisp, basically a glowing ball that floats around?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a rough explanation to help you get started. A firefly is a func_emitter. Click the model property then use the button bottom right to select a suitable particle effect, possibly tdm_glare_lamp_01.prt. Bind to something invisible that will move it along a path, typically a func_mover with nurb curves used as the path. A tutorial for setting up nurb curves is here [http://www.doom3world.org/phpbb2/viewtopic.php?t=5123].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an event from something in the player&#039;s inventory?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; give the object a &amp;quot;target&amp;quot; to trigger and also the property/value: scriptobject InvTriggerScript. If your object does not already go in the inventory then use the entity: items &amp;gt; custom &amp;gt; atdm:moveable_custom_item. If you get a collision model error then ask on the forums for help (or read the wiki entry for [[Moveables]]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport an entity?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use targets/atdm:teleport. See this wiki page [[Teleporting_entities]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom inventory item with its own inventory icon graphic?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this entry [[A_-_Z_Beginner_Full_Guide_Page_6#Special_Items]] for setting the inventory category, loot type, inventory name and inventory icon. To repeat the instructions for a custom icon: on the object put the property &amp;quot;inv_icon&amp;quot; with a value &amp;quot;guis/assets/hud/inventory_icons/&amp;lt;name&amp;gt;.tga&amp;quot; (substitute whatever name you gave it for &amp;lt;name&amp;gt;), and package your .pk4 to put your image file in that relative location. You can also see other inventory_icons there and can use an existing one, or package your .pk4 to replace an existing one with your custom one. A method for making an inventory icon is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__259172] (be sure to use an alpha channel to make the background transparent, tutorial: [http://www.axialis.com/tutorials/tutorial-misc001.html]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do make an object that&#039;s hard to frob easier to frob?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One easy way is to add this property: frobbox_size 5. If it&#039;s still hard, see this post for other things you can do. [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__228245]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a candle you can pinch to go out?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I made a bunch of pinchable non-moveable candles into my WIP like this: &lt;br /&gt;
# Make a func_static candlestick. place light source entity candleflame on it. &lt;br /&gt;
# Give the candlestick &amp;quot;frobable 1.&amp;quot; &lt;br /&gt;
# Give the candlestick S&amp;amp;R response frob, extinguish light and candleflame name. &lt;br /&gt;
# You can optionally add another response frob to trigger a speaker with a &amp;quot;snuff&amp;quot; sound effect. &lt;br /&gt;
# Done.&lt;br /&gt;
You can copy the entity bunch around and all the params should update correctly for the new replica. Frobbing will not relight it: the player needs to relit them with a flame source.&lt;br /&gt;
&lt;br /&gt;
== Handling AI == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make sure a guard can unlock a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are a few different ways, explained here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__217915]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a key or purse to an AI&#039;s belt, or similar kinds of attachments?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The easiest way is with &amp;quot;bind&amp;quot;. Place the key or purse around the belt area where you want it, sticking a little farther out than usual, and rotate it as desired. On the key add the property &amp;quot;bind&amp;quot; with the value of the AI&#039;s entity-ID or name, then the property &amp;quot;bindToJoint&amp;quot; with the value &amp;quot;leftHips_dummy&amp;quot; or &amp;quot;rightHips_dummy&amp;quot; as needed. For attaching things in other places (like a ring or hat or necklace), it&#039;s the same general principle but you should look up the joint to attach to. A list of all the joint names is here: [[BindToJoint]]. See this wiki entry for more info [[Attaching_Items]]. For another method using def_attach see [[Attaching_Props_to_AI]], and this post for an example of the spawnargs involved [http://forums.thedarkmod.com/topic/13084-ai-attach-keys/page__view__findpost__p__276064]. The issue with def_attach is that the attached thing spawns at its own rotation angle, which might not look great and is tricky to change (if you insist, see [[AI_Attachment_Ingame_Editing]] and [[Cvars_in_The_Dark_Mod#Attachment_related]]). With bind you just place and &amp;quot;bind&amp;quot;, and it stays where you put it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about other kinds of attachments where special animations are involved, like torches and weapons?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For these you want to use Def_Attach. See this wiki entry [[Attaching_Props_to_AI]]. For heads &amp;amp; weapons specifically see this wiki entry [[Adding_Heads_and_Weapons_to_AI]]. (You can set spawnargs on the def_attached entities with the method described here [[Combined_light_entities#Setting_spawnargs]].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I mute an AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Give the AI the spawnarg: def_vocal_set atdm:ai_vocal_set_mute. If you only want to mute some barks, you&#039;ll have to modify the AI&#039;s .def file by hand, taking or commenting out the barks you don&#039;t want, and packaging the new def file in your mission&#039;s pk4. For coughing and animation based barks, see this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__224558]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I hide an AI until I trigger him?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; No, the spawnarg &amp;quot;hide&amp;quot; doesn&#039;t work well with AI (they&#039;re made invisible, but still audibly there). Put the AI in a blueroom and use a teleport instead, or a teleporting script command. See the wiki entry for [[Teleporting_entities]]. Note, after teleporting an AI, pathing becomes a problem for it. See this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__280818] and the previous posts on this issue to make sure the AI can path properly after a teleport. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I manage AI teams, who is a friend, enemy and neutral?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To set the teams, see [[Relations]]. If you want to trigger a change in team with a script, see [[AI_Relations_(Scripting)]]. Another method to switch AI teams using S&amp;amp;R (stim &amp;amp; response) is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256126] and see the entry [[Stim/Response]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI play an animation when I want?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__253169]. There may be other ways possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set or change the health of AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; AI use the spawnarg &amp;quot;health&amp;quot; to set their hit points. To change it in-game, use a script and the function &amp;quot;setHealth&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I pose ragdolls so they look naturally placed?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Save a backup, pose all the ragdolls in-game, then use the console command saveRagdolls which saves their positions to the .map file. cf. [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__265650].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a scene of AI playing cards?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Probably the easiest thing to do is load the prefab (under AI), place it, and adjust it how you want.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI frob something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To get an AI to frob something, eg, a lever (doesn&#039;t work to pick up and carry) create a path_interact entity. You can include it in a normal pathing patrol. Give it these 2 spawnargs: ent &amp;lt;name of entity you want the AI to frob&amp;gt;; target &amp;lt;next path entity (if any)&amp;gt;. Note that the AI won&#039;t walk to this entity; you have to use a path_corner to get him where you want then target to the path_interact to get him to frob.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI catch fire?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can bind some unlit fires to an NPC (like a zombie) and shoot it when a fire arrow, he&#039;ll erupt in flames, but the flames won&#039;t damage him. You could also light him with a candle. I&#039;d bet theres some way to make that actually kill the creature, or at least cause it damage. ... One improvement suggestion: When the the light gets the fire stim, target a trigger multiple, which delays for a 120-240 seconds and then turns the fire off. You could make the fire damaging by starting a trigger timer which applies the stim damage to the target every few seconds. Remember to switch off the timer when the flames are doused.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I keep an AI ragdoll from sinking into the bed model, e.g., if he&#039;s KO&#039;d?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I found one way to keep [an unconscious/dead ragdoll body] from sinking into the model below it is to use a platform of nodraw_solid underneath the body. You should be able to place such a brush within the bed model and test it with a ragdoll on the bed. Adjust it&#039;s top surface height until the body lays just on top of the bed (then delete the ragdoll)... then a blackjacked AI should be able to stay on top of the bed like the ragdoll did.&lt;br /&gt;
&lt;br /&gt;
== The Player == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I do things with the player&#039;s inventory, like trigger an inventory item to be deleted, or an item to be added to the inventory, or one item being replaced with another item?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can do all these things with a script (read [[A_Beginner&#039;s_Guide_to_Scripting]] and the scripting FAQ below to learn about scripting). Have your triggering mechanism trigger a target_callscriptfunction entity which calls a custom script, then use the appropriate script command in the script on $player1. A list of the commands is here [[Inventory#Scriptsupport]]. &lt;br /&gt;
Useful commands are (replacing the &amp;quot;Item&amp;quot; variables with the item ID): &lt;br /&gt;
* &#039;&#039;&#039;$player1.addInvItem(inv_item);&#039;&#039;&#039; and &lt;br /&gt;
* &#039;&#039;&#039;$player1.replaceInvItem(oldItem, newItem);&#039;&#039;&#039; (note: If &amp;lt;newItem&amp;gt; is the $null_entity, &amp;lt;oldItem&amp;gt; is just removed and no replacement happens.) &lt;br /&gt;
For example, to remove a key from the player&#039;s inventory, use a command like: &#039;&#039;&#039;$player1.replaceInvItem ($key, $null_entity);&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport the player?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use base &amp;gt; info_player_teleport. Give it the spawnarg and value: target info_player_start_1. Give it the spawnarg: angle with a value if you want to force the player to turn to face a particular direction.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I simulate a crawl for the player to pass under things like tables that he couldn&#039;t normally do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__229174]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom script?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; First read [[A_Beginner&#039;s_Guide_to_Scripting]], [[Scripting_basics]], and [[My_first_map_script]] to learn the basics of scripting. You write a custom script as a text file named &amp;lt;mapname&amp;gt;.script and packaged in your .pk4 in the same place as your .map file. Inside it you make your own script object or function (I&#039;ll just call them &amp;quot;scripts&amp;quot; from now on, since a &amp;quot;scriptobject&amp;quot; refers to a specific spawnarg in TDM, not the general case as I mean it here) in the format the Beginner&#039;s Guide gives you, usually looking like &#039;&#039;&#039;void MyScript() { code goes here }&#039;&#039;&#039;. Then the game can &amp;quot;call&amp;quot; &amp;quot;threads&amp;quot; of that script that will run until they end or are killed, so you can have more than one thread running of the same script concurrently. If you want multiple scripts, put them all in your &amp;lt;mapname&amp;gt;.script file and the game-engine will find them. You run scripts by the script name, not the file name. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I run a script in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A few common ways of calling a script thread in-game are &lt;br /&gt;
# creating a target_callscriptfunction entity with the spawnarg: &amp;quot;call&amp;quot; &amp;quot;&amp;lt;name of your script&amp;gt;&amp;quot;, then creating some other entity (such as a button or trigger brush) that &amp;quot;targets&amp;quot; that entity; &lt;br /&gt;
# creating a button with the property &amp;quot;state_change_callback&amp;quot; &amp;quot;&amp;lt;script&amp;gt;&amp;quot;, which runs the script when pushed or triggered, &lt;br /&gt;
# Using [[Location_Settings#Script_calls]] to call a script when you enter or leave a location; &lt;br /&gt;
# triggering a script with the [[Objectives_Editor]] when you fulfill or fail an objective (possibly a hidden objective only for triggering the script); &lt;br /&gt;
# A script can call another thread in itself with the &amp;quot;thread&amp;quot; function; see the command in the link below. &lt;br /&gt;
# An entity can call a script when it spawns. Add a property/value either in the .def file or as a spawnarg on the entity: &amp;quot;ScriptEvent void &amp;lt;script&amp;gt;(&amp;lt;parameters&amp;gt;);&amp;quot;. &lt;br /&gt;
# The script &amp;quot;void main();&amp;quot; is always called at game start. So if you add code under that heading in your script file, it will run at game start. &lt;br /&gt;
There are other methods too. (Note, if you call a persistent script, i.e., it runs all game, be especially sure to avoid performance hits, or make it non-persistent if possible, that is, you &amp;quot;kill&amp;quot; it at some point in the game so it doesn&#039;t hog resources..) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are script events (aka commands or functions)?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A script event is a pre-made object or function that does something for you, usually to some game item you specify, just when you write it in your code (like &#039;&#039;&#039;$item.eventX();&#039;&#039;&#039; does X to item). Sometimes it wants parameters or arguments to run (the stuff in parentheses) and will give an error if you don&#039;t put the arguments in the parentheses in exactly the way it wants, with the right number of them &amp;amp; right data types, etc. And some of them return values too, especially the &amp;quot;get&amp;quot; functions, which are handed over to a variable (e.g., &#039;&#039;&#039;X = getValue();&#039;&#039;&#039;, now X has the value. If X is an entity, you can even act on X as if it&#039;s the entity itself. Just be sure the data type of X and Value are the same, e.g. float, or string, or entity, etc, or you&#039;ll get an error). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common or useful script events for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all Doom3 and TDM script events are listed on this wiki page [[TDM_Script_Reference]], including the proper syntax (or this page, but it&#039;s down now: [http://www.modwiki.net/wiki/Script_events_%28Doom_3%29]), or also these two files in your Dark Mod folder (open with a text editor): scripts/doom_events.script, scripts/tdm_events.script. Note that TDM has some of its own script events, like setFrobable (in the tdm_events.script list). &lt;br /&gt;
&lt;br /&gt;
A quick short list of common or useful script events good for editing is here: [[Script_Events_User-Friendly_List]], with syntax and description, and including TDM events. It doesn&#039;t list all script events and all details, just common &amp;amp; useful ones for actual mapping IMO. If you want the full list, use the TDM_Script_Reference link I gave above.&lt;br /&gt;
&lt;br /&gt;
== World Building == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way to make caves?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Some tips are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204909] &amp;amp; [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__289484] Instructions for quick-cavern pattern building is here [http://forums.thedarkmod.com/topic/14469-quick-caverns-recipe/page__view__findpost__p__304250]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking roof using clean brushwork, including with an attic inside?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here are descriptions of method that all use a similar trick [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325945], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325944], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__244109]. The trick is to &amp;quot;cut out&amp;quot; a roof from a square brush using the clipper tool. Avoid rotating brushes to make it by hand. Alternatively, use patches over a rectangular under-structure of BSP brushes, although this is not good if you want a portaled attic. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a city area that performs well?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha gave a good method in this post. [http://forums.thedarkmod.com/topic/10003-so-what-are-you-working-on-right-now/page__view__findpost__p__312133]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a forest or a big outdoorsy area?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One good method is making large &amp;quot;rooms&amp;quot; in the shape of a big oval cylinder with very high natural-looking &amp;quot;rocky&amp;quot; &amp;amp; skybox walls and uneven ground using patches, filling it with trees and hiding some of the walls behind trees and greenery (you could also fill it with thick cylinder brushes of different sizes with bark texture to look like more trees, and place branches coming off them or to make a canopy), and possibly filling it with tons of grass (using [[SEED]]) and rocks and streams, with visportaled openings at &amp;quot;kiss points&amp;quot; in the walls to other large oval rooms at different orientations (maybe 2-5 connections per oval) so there&#039;s a dense web of interconnected forested rooms that (sort of) appear to be one big dense forest to the player. Some useful things to use are the [[Object_detail]], [[SEED]], and [[LOD]] systems. See the blueprint for the Thief 2 level Trail of Blood for a rough idea: [http://thief.wikia.com/wiki/T2_M10_Trail_of_Blood?file=T2_m10a_editor_colored.gif]. For good examples in Dark Radiant, look at the construction of mission 3 of No Honor Among Thieves (&amp;quot;No Honor Among Anyone&amp;quot;) and Shadowhide&#039;s slenderman forest map. (Somebody post links to screenshots of those maps in DR, or remind me to.) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make uneven ground?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One method is by burying patches into the ground that stick out and make the ground lumpy as described here [http://forums.thedarkmod.com/topic/13338-newbie-mapper-tip-making-uneven-ground/page__view__findpost__p__274917]. For more encompassing unevenness, you can use much larger patches laid over square caulk brushes underneath that seal the leaf to make the entire ground uneven. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a natural looking road where there isn&#039;t a sharp seam between the road material and grass but a nice fading transition?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the Wiki page for [[Roads]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make curved ceilings and archways?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use patches. Here&#039;s a list of some good tutorials for this sort of thing [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__254764]. Also look at this wiki page [[Patches#Archways]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a way to get good-looking fog in my mission?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are numerous values to make good fog. The setup for the fog from Fidcal&#039;s Heart mission is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__248277].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some tips to making a better looking map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[10_Simple_Tricks_for_Better_Looking_Maps]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good method or plan-of-action for building?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a matter of personal preference, but a method that professionals use is called the &amp;quot;stepwise refinement&amp;quot; method. It means you build the *entire* space of your mission first in rough blocks (so you have it all planned out first), then refine the whole thing in increasingly more detailed steps section by section, leaving the most fine detailing towards the end. It can help to use DR&#039;s Layer system to organize your building by sections too, without other sections interfering. Also, when you&#039;re drawing your map, think about arranging space into winding &amp;quot;rooms&amp;quot; (so there&#039;s no long lines of sight), even outside with tunnels, walls and skybox; and think about visPortal placement right at the start. Also think about the gameplay-performance balance of shadowing-lights &amp;amp; AI when thinking about placing them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I cleanly connect two brush edges meeting together, especially at a diagonal?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__257111]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a method for building very fast &amp;amp; efficiently?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha came up with &amp;quot;modular&amp;quot; approach where you build a few stock modules of architecture that you can combine to make a lot of geometry very quickly and efficiently. Here&#039;s his description: [http://forums.thedarkmod.com/topic/12833-sir-taffsalots-mapping-thread/page__view__findpost__p__290747]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking waterfall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There&#039;s a discussion about this in this thread [http://forums.thedarkmod.com/topic/11901-waterfalls/page__pid__303963#entry303963]. For a small waterfall, a white foamy particle effect raining down by itself looks good. You can copy Bikerdude&#039;s example from St. Alban&#039;s Cathedral. [http://www.youtube.com/watch?v=gIrZDpc1m68]. For a bigger waterfall, people talked about a combination of a flowing vertical water block with the foamy particle effect towards the bottom.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a nice little pond.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[How_to_create_a_pond]]. This thread [http://forums.thedarkmod.com/topic/14647-how-can-i-make-a-realistic-looking-pond/page__view__findpost__p__308916] has discussion on it.&lt;br /&gt;
&lt;br /&gt;
== Patches! ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is it possible to split patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this tutorial on it [[Patch_Splitting_-_Basic_Tutorial]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bend patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the instructions at [[Patches#Bending_Patches.2C_Curves.2C_L-shapes.2C_etc]] (Here&#039;s another small tutorial in a post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__277350].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I want to use a patch to round off a corner.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this part of the Patch wiki page [[Patches#Round_and_Soft]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I make a perfect circle with patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select verts of 4 corners, select the &amp;quot;rotate and scale&amp;quot; tool, and use the value &amp;quot;0.9428&amp;quot; to scale &amp;quot;up&amp;quot; (actually down) in the 2 corresponding axis of the scale tool. See this post [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__279356].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a dome or sphere?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a cone patch and drag down the top vertex to form a dome. Invert the matrix if you want an internal dome or thicken if you want it to be visible inside and out. A sphere is just two of these stuck together. Also tweak the tesselation in patch inspector if it is too chunky. You can have fun with the textures though; try fit. If you totally flatten the dome you have a disc which can produce some nice texture effects, eg, the marble floor centrepiece or a round rug. Drag a side to make it oval. See this post for a picture [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__233107].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you align a texture on a curved patch?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to align properly texture to curved patch like this one in the image [NB: image is missing], divide a brush according to the angle of the patch then use it&#039;s shader for your purpose. ... I made it with one edge is at one end of the curved patch and the other edge is at the other end. It gets distortions without this way.&lt;br /&gt;
&lt;br /&gt;
== Events and SFX ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an earthquake event?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Earthquakes can be done with a speaker. Just use the spawnarg &amp;quot;s_shakes&amp;quot; &amp;quot;1&amp;quot; on the speaker, and the screen will shake violently however loud the sound gets.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I emulate something like a blizzard or dust storm?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Doom3 made a dust storm area, and the same method can be used to make a blizzard, so it&#039;s possible. I&#039;m leaving this here to look up instructions for future reference.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make the screen fade to black (or some other color), or from black back to the game.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create entity:  [[Triggers#trigger_fade|Trigger_Fade]].  Adjust &amp;quot;fadeTime&amp;quot; and &amp;quot;fadeColor&amp;quot; spawnargs as desired.&lt;br /&gt;
&lt;br /&gt;
== Textures == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a quick way to align textures between two surfaces?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For two brushes, select the first surface, then &#039;&#039;&#039;edit --&amp;gt; copy shader&#039;&#039;&#039;, then click on the second surface and &#039;&#039;&#039;edit --&amp;gt; paste shader&#039;&#039;&#039;. This will seamlessly match the 2nd surface to the texture of the 1st. DR also comes with a useful tool for texture alignment, [[Texture_Tool]], which you bring up with Ctrl+Alt+T. If it&#039;s textures on two patches, you can follow these directions: [http://forums.thedarkmod.com/topic/14034-tutorial-for-road-creation/page__view__findpost__p__294114]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I randomize the position of textures on multiple brushes, e.g., for a row of stairs or pillars all with the same texture that I want to look different?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select multiple faces and in the surface inspector, press the natural button once you set the scale properly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I blend textures?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. This is particularly good for dirtying some textures up by blending in a grime texture. You can blend textures with a custom material file. Link to instructions coming. Also see the entry for [[Basic_Material_File]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How about blending texture transitions so there isn&#039;t a sharp seam, e.g., for a dirt path in grass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; DR comes with grass edge transition decal patches to overlay the hard edges. Read how to set it up here [[Grass_Edges]], or a more detailed tutorial on making roads here [[Roads]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; In NHAT blended terrain was made from patches broken into segments then exported as ASE models. Then the models were vertex painted in Blender and imported back into Dark Radiant. See this tutorial [[DrVertexBlend_(tutorial)]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set the color for some textures (like glowing mushrooms) and make lightbulbs go dark when turned off?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &amp;quot;Colorme&amp;quot; textures allow you to set the color with a spawnarg. So e.g. for colored mushrooms, choose a colorme skin with the spawnarg like &amp;quot;skin&amp;quot; &amp;quot;mushroom_selflit_green_colorme&amp;quot; and choose the color with a spawnarg like &amp;quot;_color&amp;quot; &amp;quot;0.24 0.50 0.40&amp;quot; (where the value is the RGB values you want). For lightbulbs you can trigger a colorme texture switch with the lightswitch (so it switches between &amp;quot;lit up&amp;quot; and &amp;quot;black&amp;quot;). Instructions on that coming.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a fast way to put different textures on a lot of objects?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; 1. Click the mouse wheel on the texture to copy it. 2. To paste it naturally (i.e., in a random position): shift+mousewheel click. 3. To just paste it: ctrl+mousewheel click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can you tile a texture a specific number of times to fit a surface?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to tile a texture a certain number of times, enter the values 1/X and 1/Y (you need to compute them in your head) in the little boxes in the surface inspector, then press &amp;quot;Fit&amp;quot;. It will tile your texture horizontally X times and vertically Y times. You can also enter things like &amp;quot;2&amp;quot; and &amp;quot;1&amp;quot; and get a texture that only occupies half of the width. You can then use the &amp;quot;Right&amp;quot; or &amp;quot;Left&amp;quot; buttons to align it quickly at the ends. Pro-tip: Press CTRL+ALT+T to open the texture tool, it allows super quick aligning of textures on patches. Esp. useful for decals where the decal texture consists of multiple decals.&lt;br /&gt;
&lt;br /&gt;
== Readables &amp;amp; GUIs ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put custom art in a book or scroll, like a picture?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a custom .gui. Here&#039;s a rough idea to get you started [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__263836]. I&#039;ll try to put better instructions in later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger a text message to pop up and say something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create an entity: darkmod &amp;gt; targets &amp;gt; atdm:gui_message and give it the properties/values that you want. Popups will explain each one. You can target it with a triggering entity or trigger it from a script or any other triggering mechanism. An example is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256592]&lt;br /&gt;
&lt;br /&gt;
== Lighting and Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I add music or ambient sounds?&#039;&#039;&#039; &#039;&#039;&#039;Q. Can I dynamically adjust the ambient lighting?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For both of these things, check out the article for [[Location Settings]]&lt;br /&gt;
&lt;br /&gt;
{{editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{tutorial-editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{darkradiant|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up Reverb (EAX) settings for my rooms? (E.g., the echo of a large hall, etc.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create a text file and name it &amp;lt;mapname&amp;gt;.eax; place it in your .pk4 with your .map file; and in it create entries by location name with the values you want for that location. See this wiki entry to see the format &amp;amp; values [[Setting_Reverb_Data_of_Rooms_(EAX)]].&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Unofficial_Tweaks&amp;diff=17423</id>
		<title>Unofficial Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Unofficial_Tweaks&amp;diff=17423"/>
		<updated>2013-12-01T02:23:00Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fans sometimes make unofficial tweaks to the game that change some aspect to their personal preference or to try interesting things. These tweaks aren&#039;t supported by the team or even necessarily recommended; they may have issues or go out of date with new versions; and there aren&#039;t plans to implement them in the official game. But in case other fans may be interested, or for educational purposes, some of them or instructions for them are collected here. If there are issues or questions, the person to talk to would be the original creator. &lt;br /&gt;
&lt;br /&gt;
* Smaller light gem size: [http://forums.thedarkmod.com/topic/15346-smaller-hud/page__view__findpost__p__325993]&lt;br /&gt;
&lt;br /&gt;
* Pain wheel (A HUD gui that tells you the direction of damage): [http://forums.thedarkmod.com/topic/15633-implementing-a-pain-wheel/page__view__findpost__p__327673]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Unofficial_Tweaks&amp;diff=17350</id>
		<title>Unofficial Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Unofficial_Tweaks&amp;diff=17350"/>
		<updated>2013-11-10T02:23:08Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fans sometimes make unofficial tweaks to the game that change some aspect to their personal preference. These tweaks aren&#039;t supported by the team or even necessarily recommended; they may by buggy or out of date with new versions; and there aren&#039;t plans to implement them in the official game. But in case other fans may be interested, or for educational purposes, some of them or instructions for them are collected here. &lt;br /&gt;
&lt;br /&gt;
* Smaller light gem size: [http://forums.thedarkmod.com/topic/15346-smaller-hud/page__view__findpost__p__325993]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Unofficial_Tweaks&amp;diff=17349</id>
		<title>Unofficial Tweaks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Unofficial_Tweaks&amp;diff=17349"/>
		<updated>2013-11-10T01:40:19Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: Created page with &amp;quot;Fans sometimes make unofficial tweaks to the game that change some aspect to their personal preference. These tweaks aren&amp;#039;t supported by the team or even necessarily recommend...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Fans sometimes make unofficial tweaks to the game that change some aspect to their personal preference. These tweaks aren&#039;t supported by the team or even necessarily recommended; they may by buggy or out of date with new versions; and there aren&#039;t plans to implement them in the official game. But in case other fans may be interested, some of them or instructions for them are collected here. &lt;br /&gt;
&lt;br /&gt;
* Smaller light gem size: [http://forums.thedarkmod.com/topic/15346-smaller-hud/page__view__findpost__p__325993]&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17348</id>
		<title>Editing FAQ - Troubleshooting &amp; How-To</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17348"/>
		<updated>2013-11-09T01:13:54Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Performance Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below are some common issues and questions mappers have had in the Editor&#039;s Guild forum with common solutions. Some of this assumes you&#039;ve already gone through the [[A_-_Z_Beginner_Full_Guide_Start_Here!]], [[Startpack_Mappers&#039;_Guide]], and [[Dark_Radiant_Must_Know_Basic_Intro]]. (If you know a FAQ not here and worth going in this list, and you know the right answer(!), or you can improve an existing answer, please add it if you have edit control or PM it to a team-member if you don&#039;t.) &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting FAQ =&lt;br /&gt;
&lt;br /&gt;
== Rendering &amp;amp; VisPortal Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of my brushes have disappeared or turned black and won&#039;t render.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This can happen when two touching brushes around the seam are not perfectly flush with one another and the rendering hiccups for those brushes &amp;amp; brushes behind it, either there&#039;s a tiny wedge or overlap or gap or weird angle between them. The usual solution is to make sure the brushes are snapped to the grid and perfectly flush against one another, or more generally to simplify the brushwork around the seam of the disappearing brushes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My visportal is not showing up or not closing like it should (you can check this with by typing &amp;quot;r_showportals 1&amp;quot; in the console. The portal edge will show green when open and red when closed.).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A common reason for that is that the two areas separated by the portal are not hermetically sealed and there&#039;s an internal leak, either (1) there may be an unportaled gap between the two, possibly covered up by func_static (which do not seal) or possibly caused by an inadvertent hole created by the first FAQ question above, or (2) an internal leak can happen when all sides of the visportal are not buried in or flush against sealing brushes, and there&#039;s a gap between the visportal and brush, or possibly even a tiny gap just touching the visportal side is enough to break it. A way to check if there&#039;s an internal leak, and locating it if there is, is described here: [[Visportals#Trouble-shooting]]. Other reasons it might fail are also described there (such as accidentally changing a nodraw texture to something else).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I can see other rooms behind a mirror (or any reflective surface) through it, instead of just a reflection.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The area behind a mirror should be in a separate leaf (visportaled area) behind a closed visportal so it doesn&#039;t render. This problem usually means the two areas aren&#039;t in separate leafs, the portal isn&#039;t closed, or there&#039;s an internal leak between the areas in front of and behind the mirror.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Help! I&#039;m having rendering &amp;amp; visPortal issues all over the place ... broken portals, sparkly lines, disappearing brushes, z-fighting, uneven walls, etc.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; As a general piece of advice, messy brushwork leads to trouble one way or another. To keep your brushwork clean: &lt;br /&gt;
* keep snapped to the grid (Ctrl+G toggles) &amp;amp; stay away from small grid levels (Typing a number or Plus/Minus changes the grid scale; 8 is a good starting grid; staying at or above 2 or 4 is fine for most stuff; going below 1 is usually just for special situations). &lt;br /&gt;
* Make brush intersections perfectly flush. &lt;br /&gt;
* Stay away from unnecessary tiny brushes &amp;amp; wedges (leave detail work to func_statics; brushes are for closing off leafs and the void. Of course you can do fine detail work with brushes &amp;amp; convert them to a func_static). &lt;br /&gt;
* Don&#039;t use the &amp;quot;CGS Subtract&amp;quot; tool if it will shatter the brush into tiny slivers; use the cut tool instead (open by pushing &amp;quot;X&amp;quot;). &lt;br /&gt;
* You can use patches for uneven geometry with square brushes underneath textured with caulk. &lt;br /&gt;
* When rotating geometry, avoid weird angles when you can (where vertexes end up off the grid), and for multi-brush structures, build the whole thing first *then* rotate it all together instead of rotating &amp;amp; placing each brush individually. &lt;br /&gt;
These aren&#039;t rules set in concrete if you want to do something special once in a while, but general rules of thumb that will make life a lot easier if you generally stick to them.&lt;br /&gt;
&lt;br /&gt;
== Crashes and Warnings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map has a leak in it, but a pointfile either isn&#039;t generated or doesn&#039;t make sense. (A pointfile is generated when dmap occurs and there&#039;s a leak, then you open DarkRadient and click File&amp;gt;Pointfile to see it. It normally runs a red line that ends in the void, pointing out the leak).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039;  Make sure a gap isn&#039;t covered up with func_statics. If the origin of a model is in the void it will also cause a leak with a non-sense pointfile. Read more on the [[Leaking maps]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll up through the console output to see what a problem was during dmap or map or in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/Down to scroll through the console.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I&#039;m getting an error message &amp;quot;warning: aas is out of date&amp;quot; once my map has loaded. What does it mean and what do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The AAS is for AI pathfinding. It usually means you changed brushwork and started a map without dmapping first. The solution is to dmap. If you dmap and still get the warning, delete your .aasxx, .proc, and .cm files in the maps folder and dmap again. If you&#039;re still getting a warning, then it could be a sign that something in your map is breaking the AAS pathfinding. Try monsterclipping tricky areas for the AI to path (like around objects and uneven ground) or clean up messy brushwork that might break the dmapping like sliver brushes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have encountered a malloc failure error while dmapping my level. Instead of finishing with the dmap operation, it crashes midway with an error message.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; One solution to this is given in the Dmap wiki entry here: [[Dmap#Malloc_Errors]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; This is what I&#039;ve done to fix this exact issue. Open the map in DarkRadiant, select everything, copy to clipboard. Open another instance of DarkRadiant and paste from clipboard. Save as new filename and dmap new file and that has worked 3 times now with random unresolvable crashes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A3.&#039;&#039;&#039; GC and I have found correlations between visportalling and mAlloc errors. Time to re-arrange your visportals. In NHAT, we had many malloc problems until we retooled how each area was portaled. Originally, every other visleaf had tons of entities, while half had hardly any. That&#039;s not neccessarily bad, but it strains the dmapper when one or two visleafs are cluttered with entities that really bloat your mapname.proc file. We added a few more portals to even out entity distribution, and dmap was happy again.&lt;br /&gt;
&lt;br /&gt;
== Performance Issues ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map is so slow. How do I improve performance?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See these wiki entry: [[Performance:_Essential_Must-Knows]]. Tips include: &lt;br /&gt;
* Reduce AI [[Pathfinding]] with Monsterclipping helps performance, simplifying complex bumpy surfaces into 1 smooth monsterclipped surface (or raise the monsterclip height to be inside the ceiling and there is no pathfinding computation at all), or excluding entire surfaces AI should never walk on, like detail brushwork or some roofs. &lt;br /&gt;
* Use [[Interleaved_Thinking_optimization]]. Reducing AI think-time helps performance quite a bit. &lt;br /&gt;
* break-up long lines of sight, &lt;br /&gt;
* improve visportal &amp;amp; leaf placement (so less architecture is rendered at a time), &lt;br /&gt;
* use fewer AI, &lt;br /&gt;
* convert ornamental brushwork into func_static, &lt;br /&gt;
* reduce the overlap of light sources on surfaces by adjusting their placement &amp;amp; reducing their light-radius. (Every time a new light hits a surface, it&#039;s another render pass. So 4 lights hitting a surface processes it 4 times. If only 1 light hit it, its lighting is processed in 1/4 the time), and &lt;br /&gt;
* set objects and lights to &amp;quot;noshadow&amp;quot; if it won&#039;t be noticable to the player or affect gameplay (possibly in combination with low-poly shadow meshes or shadowy decals. Note that &amp;quot;noshadow&amp;quot; has two jobs. Put on lights, it means that light will cast no shadows on any object. Put on objects, it means that object will not cast a shadow from any light.) &lt;br /&gt;
&lt;br /&gt;
There are also lots of other tricks out there if you check around the forums, including more advanced &amp;amp; optional tricks such as using the [[LOD]] system or [[SEED]] system, or even crazier tricks (cross-leaf func_statics, skybox architecture, Strombine lighting, Camera Cubemapped Visportal Patches, lots of crazy tricks out there), that you don&#039;t have to worry about if you&#039;re a new mapper but you can ask us about or search for in the forum if you&#039;re curious. Generally speaking there are pros and cons trade-offs between performance &amp;amp; dazzle for many things (like lights or visportal placement); so it&#039;s good to think about the best performance-dazzle balance for your scene. E.g, lots of highpoly brushwork, lights, &amp;amp; AI can look good in a small or medium room, but may not be worth the performance hit in a big courtyard, and try to find ways to get better performance &amp;quot;for free&amp;quot; without the player noticing anything missing, like smart use of noshadows, monsterclips, and interleaved thinking distances.&lt;br /&gt;
&lt;br /&gt;
== Gameplay Issues that Mappers sometimes Overlook ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Below is a list of common gameplay issues that players sometimes complain about and that mappers &amp;amp; testers sometimes overlook or should at least be aware of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Players find it very difficult to frob objects (loot, keys, readables) when the frob distance is set too short or the space is awkward (like in a drawer or up on a wall, etc). In testing, please double-check that every frobable object is easy to frob from a comfortable place, and increase the frob distance if it&#039;s not, erring on the side of more space. (See the question on making frobbing easier under &amp;quot;Handling Objects&amp;quot; below for more information.) &lt;br /&gt;
&lt;br /&gt;
- Objects can get stuck into brushwork while moving them around. &lt;br /&gt;
&lt;br /&gt;
- Players can get stuck in narrow spaces and can&#039;t mantle out, so try to avoid this kind of geometry if possible. &lt;br /&gt;
&lt;br /&gt;
- A very low ceiling can prevent hitting AI with a BJ, so try to avoid it when AI are around. &lt;br /&gt;
&lt;br /&gt;
- Make sure AI have a flee path.  &lt;br /&gt;
&lt;br /&gt;
- Some players would like the ability to drop used keys and other inventory items, done by turning the can_be_dropped property to true, unless for gameplay reasons you don&#039;t want to. &lt;br /&gt;
&lt;br /&gt;
- Some players don&#039;t like long readables that don&#039;t get to the point. At least be conscious of how your readables read to a player.&lt;br /&gt;
&lt;br /&gt;
- Think about how you want to handle non-functioning doors (or other &amp;quot;unnatural&amp;quot; situations like windows that can open) in a way that visually or fairly communicates to the player that something is special about this door or window, but isn&#039;t too immersion breaking either.&lt;br /&gt;
&lt;br /&gt;
== Issues with Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My streetlight, candle, lamp, light-creating object, causes a weird shadow I want to get rid of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Put the spawnarg &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; on the offending object.&lt;br /&gt;
&lt;br /&gt;
== AI Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My AI will not pass through a visportal no matter how I set up the path nodes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Check that the sides of the visportal use the nodraw texture (except for the portal-face itself of course).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you get AI to walk on complex terrain patches or func_statics?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can always lay down invisible monsterclip brushes and the AI can walk on it. Overlay with a brush with a &amp;quot;material&amp;quot; clip texture so it causes the right sound for footsteps.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Problems with Patches ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have 2 curved patches and they&#039;re not aligning. What do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My patch is rendering strangely, like fractured into slivers.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
== Issues with Lighting &amp;amp; Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of the parallel lights I use for moonlight aren&#039;t giving off any light.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a known problem with parallel lights. For some reason in some arrangements you get no light at all. Just fiddle with it a bit - move it slightly, change the radii, move the vertex a bit - and it should suddenly work. Once you&#039;ve got it working then it&#039;s stable. Likely the code chokes on certain values in its calculations. ... Also, to help optimize your moonlight, you should adjust the radius so it&#039;s only as big as it needs to be. You may also want to move the actual position of the little moon cube in the skybox to match the parallel light (and make sure to fix the texture on it if you mess it up - hint: lock textures before moving cube to make it easy)&lt;br /&gt;
&lt;br /&gt;
= General How-To Editing FAQ =&lt;br /&gt;
&lt;br /&gt;
== Dark Radient Questions == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I see all the default properties already on an object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; In the entity inspector there&#039;s a checkbox near the top that says &amp;quot;Show Inherited Properties&amp;quot;. Click that box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some basic units, scales, limits, maxs, and mins of various things when editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all these things is here: [[Limits,_Max,_Min,_Stats,_etc]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I manipulate brushes to resize and reshape them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. In DarkRadient you can select a brush and push &amp;quot;V&amp;quot; to select verticies to drag and resize, &amp;quot;E&amp;quot; to select edge(s) to drag and resize, and &amp;quot;F&amp;quot; to select face(s) to drag and resize. &amp;quot;Ctrl+#&amp;quot; makes a selected brush be #-sided. You can also use the Brush&amp;gt;Prism and Brush&amp;gt;Cone to convert a brush to those shapes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common DR shortcut commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &lt;br /&gt;
* &amp;quot;H&amp;quot; hides selected items. &lt;br /&gt;
* &amp;quot;I&amp;quot; inverts selected. &lt;br /&gt;
* &amp;quot;Ctrl+I&amp;quot; inverts a patch&#039;s normal. &lt;br /&gt;
* &amp;quot;J&amp;quot; brings up entity list. &lt;br /&gt;
* &amp;quot;Ctrl+K&amp;quot; makes 1st-selected-entity &amp;quot;target&amp;quot; 2nd-selected-entity. &lt;br /&gt;
* &amp;quot;L&amp;quot; brings up light inspector. &lt;br /&gt;
* &amp;quot;Ctrl+L&amp;quot; brings up the Layers menu. &lt;br /&gt;
* &amp;quot;N&amp;quot; brings up entity inspector. &lt;br /&gt;
* &amp;quot;T&amp;quot; brings up texture browser. &lt;br /&gt;
* &amp;quot;X&amp;quot; go into clipper mode. &lt;br /&gt;
* Brush manipulation modes: are &amp;quot;R&amp;quot; rotate brush, &amp;quot;Q&amp;quot; free-move &amp;amp; resize, &amp;quot;W&amp;quot; translate-move.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make my own shortcut key commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Under the Edit menu, at the bottom is &amp;quot;Keyboard Shortcuts&amp;quot; which allows you to set your own shortcuts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I screwed something up! What do I do?!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Ctrl+Z undos. Ctrl+Y redos.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is there a way to organize &amp;amp; simplify building, so I can build one section at a time without other sections getting in the way?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; DR has a [[Layers]] function that lets you build one &amp;quot;layer&amp;quot; at a time (open with ctrl+L or View&amp;gt;Layers). It also improves DR performance, which is handy as the map gets bigger.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up things like the pre-game shop, the player inventory, and an in-game map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; All these things are described in the Startpack Mappers&#039; Guide: [[Startpack_Mappers&#039;_Guide#Ammo.2C_Weapons.2C_Player_Tools.2C_Start_Inventory]], [[Startpack_Mappers&#039;_Guide#Purchase_Shop]], [[Startpack_Mappers&#039;_Guide#Adding_an_In-game_Map_to_your_FM]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put spawnargs on def_attached entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can put spawnargs on def_attached entities by using the spawnarg &amp;quot;set SPAWNARGNAME on ATTACHMENTNAME&amp;quot; &amp;quot;value&amp;quot; on the base entity. Here&#039;s an example of setting a color property on a flame attachment to a torch &amp;quot;set _color on flame&amp;quot; &amp;quot;0.2 0.2 0.9&amp;quot;. Read more here [[Combined_light_entities#Setting_spawnargs]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s an easy way to find materials in DR?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Tip to help find materials in Dark Radiant&#039;s materials browser: &lt;br /&gt;
# Point to Textures (or any tree). &lt;br /&gt;
# Shift + Right key to fully open the tree. &lt;br /&gt;
# Type the key letters of what you want to find. &lt;br /&gt;
# Up/down arrows to go to next/previous occurrence. &lt;br /&gt;
# Esc to get out of input field. &lt;br /&gt;
Oh yeah, avoid F3 because that is likely to switch to render mode which in my case crashes DR (but may not if the map is small).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an N-sided brush?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A quick way to make an N-sided brush is to highlight the brush and push cntl+N (N being the number of sides for the top face). So if you want a 5-sided brush, highlight it and push cntl+5. But the best way to get the walls of a multi-sided brush to line up seamlessly is still to use the clipper-tool and precisely cut off a slice. (And don&#039;t use CSG Subtract unless you know what you&#039;re doing and aren&#039;t creating a million splinters!)&lt;br /&gt;
&lt;br /&gt;
== Console Questions ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I open the console?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Open the console with ctrl+alt+~ in a normal game, and just ~ when playing through &amp;quot;map&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll through the console output?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/PageDown.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q.What&#039;s a list of all the Doom3 Console Commands and CVars?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all commands &amp;amp; Cvars is here [http://www.doomwadstation.com/doom3/console/]. Darkmod Cvars are listed here [[Cvars_in_The_Dark_Mod]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some *useful* console commands and cvars for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here&#039;s one list: [[Console_Useful_Controls]]. Here&#039;s a list more tailored to mapping: &lt;br /&gt;
&lt;br /&gt;
Commands: &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;dmap &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; compiles a map, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;give &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; gives the player an item, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;god&#039;&#039;&#039;&amp;quot; player cannot be harmed,&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;killmonsters&#039;&#039;&#039;&amp;quot; takes out all AI&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;map &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; loads a map to play, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;noclip&#039;&#039;&#039;&amp;quot; lets the player go through objects and walls, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;notarget&#039;&#039;&#039;&amp;quot; let&#039;s the player be invisible to AI, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadDecls&#039;&#039;&#039;&amp;quot; will reload material defs without having to re-start TDM, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadimages&#039;&#039;&#039;&amp;quot; does the same for lights and &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadSurface&#039;&#039;&#039;&amp;quot; for surfaces, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;saveRagdolls&#039;&#039;&#039;&amp;quot; saves the positions of all ragdolls to the .map file (see the FAQ under Handling AI), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;teleport &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; teleports the player to an entity. &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;tdm_show_loot&#039;&#039;&#039;&amp;quot; Shows loot.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;spawn &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; spawns an entity: &lt;br /&gt;
 spawn atdm:weapon_blackjack&lt;br /&gt;
 spawn atdm:weapon_shortsword&lt;br /&gt;
 spawn atdm:ammo_broadhead&lt;br /&gt;
 spawn atdm:ammo_firearrow&lt;br /&gt;
 spawn atdm:ammo_gasarrow&lt;br /&gt;
 spawn atdm:ammo_mossarrow&lt;br /&gt;
 spawn atdm:ammo_noisemaker&lt;br /&gt;
 spawn atdm:ammo_ropearrow&lt;br /&gt;
 spawn atdm:ammo_waterarrow&lt;br /&gt;
 Append &amp;quot;inv_ammo_amount 50&amp;quot; to any of the above to spawn 50 arrows at once: spawn atdm:ammo_broadhead inv_ammo_amount 50&lt;br /&gt;
Cvars (1 turns on, 0 turns off, unless otherwise noted): &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;com_showFPS 1&#039;&#039;&#039;&amp;quot;, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showLightCount 1&#039;&#039;&#039;&amp;quot; (colors shows the number of lights hitting a surface, black = 0, red = 1, blue = 2... etc), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showPortals 1&#039;&#039;&#039;&amp;quot; (red=closed,green=open) If your portals dont show up they are most likely not sealing.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showTris n&#039;&#039;&#039;&amp;quot; (n=1) Shows tris rendered directly, (n=2) shows overdrawn tri&#039;s, (n=3) shows all tri&#039;s, direct and indirect.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a put-object-here objective?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182924]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a &amp;quot;ghosting&amp;quot; objective (e.g., you are busted if you are seen.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204695]&lt;br /&gt;
&lt;br /&gt;
== Handling Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a door handle to a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Just position the handle and input &amp;quot;bind&amp;quot; and the door entity ID/name as a spawnarg. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object into loot?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182921]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an entity frobable?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the entry for [[Making an Entity frobable]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Ok it&#039;s frobable, but doesn&#039;t fall or move. How do I make an entity act like a world object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You need to make the object a moveable, see [[Moveables]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I get a lever or button to open a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__212036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put some text on a sign or wall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can use this method [http://forums.thedarkmod.com/topic/11159-add-text-to-your-signs-signposts-walls-etc/]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bind something to a rope (like a body) so it doesn&#039;t fall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Dynamic ropes are unreliable, so it&#039;s good to use a func_static like a chain or make a func_static rope from a cylinder brush. For a ragdoll, place the ragdoll so he clips into the func_static. You need to bind the ragdoll to the chain (so the spawnarg is on the ragdoll), with &amp;quot;bind&amp;quot; &amp;quot;func_static_...&amp;quot;, where func_static_... is the chain. Or, through DR, you can just select the entity you want to attach (the ragdoll), then also select the thing you want to attach it to (the chain), and in the menus select &amp;quot;Entity&amp;quot; - &amp;quot;Bind selected entities&amp;quot;. But it&#039;s been reported the clipping does the job, not binding. See this link [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__221262]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make something switch from frobable to unfrobable like a used lever, or unfrobable to frobable like contents in a chest or drawer you don&#039;t want frobable until it&#039;s open?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property &amp;quot;start_frobable&amp;quot; 1 or 0 (which mean true or false) depending on your case (it affects everything inside), and a triggering entity, such as the lever or the chest itself, that targets the set_frobable entity that triggers the switch when it&#039;s frobbed. For the record, you can also switch the frobability of an object in a script with the command: &#039;&#039;&#039;$&amp;lt;entityname&amp;gt;.setFrobable(n);&#039;&#039;&#039;, where n is &amp;quot;1&amp;quot; to make it frobable and &amp;quot;0&amp;quot; for unfrobable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make breakable glass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__222734]. You basically convert your glass brush to a func_fracture entity and set the &amp;quot;health&amp;quot; spawnarg to the value you want the glass to break at. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about an object that gets increasingly damaged-looking as you hit it?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a func_damagable entity, which replaces its model and/or shader with increasingly &amp;quot;damaged&amp;quot; versions (as many stages as you like) when its health goes below the threshold you set with the &amp;quot;health&amp;quot; spawnarg, and you can use &amp;quot;target&amp;quot; to trigger something when damage occurs (such as a sound effect or event). See here for details on the spawnargs involved in setting it up: [http://www.modwiki.net/wiki/Func_damagable_(entity)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object that you can frob and it does something or something happens?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; If it&#039;s an object you made from patches or brushes, make it into a frobable func_static, or if it&#039;s already a func_static, make sure it&#039;s frobable ([[Making an Entity frobable]]). Then give it a Frob response whose effect is a trigger, and give it a &amp;quot;target&amp;quot; spawnarg to the entity that causes your effect when triggered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can a lever or button target multiple entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes! Use the spawnargs &amp;quot;target1&amp;quot;, &amp;quot;target2&amp;quot;, &amp;quot;target3&amp;quot;, etc, with each entity-target as a value. A quicker way is to use the keyboard shortcut Ctrl+K. Select the button or lever, then select the target-entity and hit Ctrl+K. De-select the target-entity then select the next one, hit Ctrl+K again. Each time adds a new target to the switch. (Many other spawnargs allow you to have multiple entries by numbering them, such as bind and def_attach.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a rotating entity, like a fan?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__242385]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make objects non-solid so they still render but the player can walk through them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Add the spawnarg: noclipmodel 1 to turn them into non-solids.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a firefly or will-o-wisp, basically a glowing ball that floats around?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a rough explanation to help you get started. A firefly is a func_emitter. Click the model property then use the button bottom right to select a suitable particle effect, possibly tdm_glare_lamp_01.prt. Bind to something invisible that will move it along a path, typically a func_mover with nurb curves used as the path. A tutorial for setting up nurb curves is here [http://www.doom3world.org/phpbb2/viewtopic.php?t=5123].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an event from something in the player&#039;s inventory?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; give the object a &amp;quot;target&amp;quot; to trigger and also the property/value: scriptobject InvTriggerScript. If your object does not already go in the inventory then use the entity: items &amp;gt; custom &amp;gt; atdm:moveable_custom_item. If you get a collision model error then ask on the forums for help (or read the wiki entry for [[Moveables]]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport an entity?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use targets/atdm:teleport. See this wiki page [[Teleporting_entities]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom inventory item with its own inventory icon graphic?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this entry [[A_-_Z_Beginner_Full_Guide_Page_6#Special_Items]] for setting the inventory category, loot type, inventory name and inventory icon. To repeat the instructions for a custom icon: on the object put the property &amp;quot;inv_icon&amp;quot; with a value &amp;quot;guis/assets/hud/inventory_icons/&amp;lt;name&amp;gt;.tga&amp;quot; (substitute whatever name you gave it for &amp;lt;name&amp;gt;), and package your .pk4 to put your image file in that relative location. You can also see other inventory_icons there and can use an existing one, or package your .pk4 to replace an existing one with your custom one. A method for making an inventory icon is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__259172] (be sure to use an alpha channel to make the background transparent, tutorial: [http://www.axialis.com/tutorials/tutorial-misc001.html]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do make an object that&#039;s hard to frob easier to frob?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One easy way is to add this property: frobbox_size 5. If it&#039;s still hard, see this post for other things you can do. [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__228245]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a candle you can pinch to go out?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I made a bunch of pinchable non-moveable candles into my WIP like this: &lt;br /&gt;
# Make a func_static candlestick. place light source entity candleflame on it. &lt;br /&gt;
# Give the candlestick &amp;quot;frobable 1.&amp;quot; &lt;br /&gt;
# Give the candlestick S&amp;amp;R response frob, extinguish light and candleflame name. &lt;br /&gt;
# You can optionally add another response frob to trigger a speaker with a &amp;quot;snuff&amp;quot; sound effect. &lt;br /&gt;
# Done.&lt;br /&gt;
You can copy the entity bunch around and all the params should update correctly for the new replica. Frobbing will not relight it: the player needs to relit them with a flame source.&lt;br /&gt;
&lt;br /&gt;
== Handling AI == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make sure a guard can unlock a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are a few different ways, explained here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__217915]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a key or purse to an AI&#039;s belt, or similar kinds of attachments?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The easiest way is with &amp;quot;bind&amp;quot;. Place the key or purse around the belt area where you want it, sticking a little farther out than usual, and rotate it as desired. On the key add the property &amp;quot;bind&amp;quot; with the value of the AI&#039;s entity-ID or name, then the property &amp;quot;bindToJoint&amp;quot; with the value &amp;quot;leftHips_dummy&amp;quot; or &amp;quot;rightHips_dummy&amp;quot; as needed. For attaching things in other places (like a ring or hat or necklace), it&#039;s the same general principle but you should look up the joint to attach to. A list of all the joint names is here: [[BindToJoint]]. See this wiki entry for more info [[Attaching_Items]]. For another method using def_attach see [[Attaching_Props_to_AI]], and this post for an example of the spawnargs involved [http://forums.thedarkmod.com/topic/13084-ai-attach-keys/page__view__findpost__p__276064]. The issue with def_attach is that the attached thing spawns at its own rotation angle, which might not look great and is tricky to change (if you insist, see [[AI_Attachment_Ingame_Editing]] and [[Cvars_in_The_Dark_Mod#Attachment_related]]). With bind you just place and &amp;quot;bind&amp;quot;, and it stays where you put it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about other kinds of attachments where special animations are involved, like torches and weapons?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For these you want to use Def_Attach. See this wiki entry [[Attaching_Props_to_AI]]. For heads &amp;amp; weapons specifically see this wiki entry [[Adding_Heads_and_Weapons_to_AI]]. (You can set spawnargs on the def_attached entities with the method described here [[Combined_light_entities#Setting_spawnargs]].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I mute an AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Give the AI the spawnarg: def_vocal_set atdm:ai_vocal_set_mute. If you only want to mute some barks, you&#039;ll have to modify the AI&#039;s .def file by hand, taking or commenting out the barks you don&#039;t want, and packaging the new def file in your mission&#039;s pk4. For coughing and animation based barks, see this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__224558]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I hide an AI until I trigger him?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; No, the spawnarg &amp;quot;hide&amp;quot; doesn&#039;t work well with AI (they&#039;re made invisible, but still audibly there). Put the AI in a blueroom and use a teleport instead, or a teleporting script command. See the wiki entry for [[Teleporting_entities]]. Note, after teleporting an AI, pathing becomes a problem for it. See this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__280818] and the previous posts on this issue to make sure the AI can path properly after a teleport. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I manage AI teams, who is a friend, enemy and neutral?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To set the teams, see [[Relations]]. If you want to trigger a change in team with a script, see [[AI_Relations_(Scripting)]]. Another method to switch AI teams using S&amp;amp;R (stim &amp;amp; response) is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256126] and see the entry [[Stim/Response]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI play an animation when I want?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__253169]. There may be other ways possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set or change the health of AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; AI use the spawnarg &amp;quot;health&amp;quot; to set their hit points. To change it in-game, use a script and the function &amp;quot;setHealth&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I pose ragdolls so they look naturally placed?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Save a backup, pose all the ragdolls in-game, then use the console command saveRagdolls which saves their positions to the .map file. cf. [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__265650].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a scene of AI playing cards?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Probably the easiest thing to do is load the prefab (under AI), place it, and adjust it how you want.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI frob something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To get an AI to frob something, eg, a lever (doesn&#039;t work to pick up and carry) create a path_interact entity. You can include it in a normal pathing patrol. Give it these 2 spawnargs: ent &amp;lt;name of entity you want the AI to frob&amp;gt;; target &amp;lt;next path entity (if any)&amp;gt;. Note that the AI won&#039;t walk to this entity; you have to use a path_corner to get him where you want then target to the path_interact to get him to frob.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI catch fire?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can bind some unlit fires to an NPC (like a zombie) and shoot it when a fire arrow, he&#039;ll erupt in flames, but the flames won&#039;t damage him. You could also light him with a candle. I&#039;d bet theres some way to make that actually kill the creature, or at least cause it damage. ... One improvement suggestion: When the the light gets the fire stim, target a trigger multiple, which delays for a 120-240 seconds and then turns the fire off. You could make the fire damaging by starting a trigger timer which applies the stim damage to the target every few seconds. Remember to switch off the timer when the flames are doused.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I keep an AI ragdoll from sinking into the bed model, e.g., if he&#039;s KO&#039;d?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I found one way to keep [an unconscious/dead ragdoll body] from sinking into the model below it is to use a platform of nodraw_solid underneath the body. You should be able to place such a brush within the bed model and test it with a ragdoll on the bed. Adjust it&#039;s top surface height until the body lays just on top of the bed (then delete the ragdoll)... then a blackjacked AI should be able to stay on top of the bed like the ragdoll did.&lt;br /&gt;
&lt;br /&gt;
== The Player == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I do things with the player&#039;s inventory, like trigger an inventory item to be deleted, or an item to be added to the inventory, or one item being replaced with another item?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can do all these things with a script (read [[A_Beginner&#039;s_Guide_to_Scripting]] and the scripting FAQ below to learn about scripting). Have your triggering mechanism trigger a target_callscriptfunction entity which calls a custom script, then use the appropriate script command in the script on $player1. A list of the commands is here [[Inventory#Scriptsupport]]. &lt;br /&gt;
Useful commands are (replacing the &amp;quot;Item&amp;quot; variables with the item ID): &lt;br /&gt;
* &#039;&#039;&#039;$player1.addInvItem(inv_item);&#039;&#039;&#039; and &lt;br /&gt;
* &#039;&#039;&#039;$player1.replaceInvItem(oldItem, newItem);&#039;&#039;&#039; (note: If &amp;lt;newItem&amp;gt; is the $null_entity, &amp;lt;oldItem&amp;gt; is just removed and no replacement happens.) &lt;br /&gt;
For example, to remove a key from the player&#039;s inventory, use a command like: &#039;&#039;&#039;$player1.replaceInvItem ($key, $null_entity);&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport the player?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use base &amp;gt; info_player_teleport. Give it the spawnarg and value: target info_player_start_1. Give it the spawnarg: angle with a value if you want to force the player to turn to face a particular direction.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I simulate a crawl for the player to pass under things like tables that he couldn&#039;t normally do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__229174]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom script?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; First read [[A_Beginner&#039;s_Guide_to_Scripting]], [[Scripting_basics]], and [[My_first_map_script]] to learn the basics of scripting. You write a custom script as a text file named &amp;lt;mapname&amp;gt;.script and packaged in your .pk4 in the same place as your .map file. Inside it you make your own script object in the format the Beginner&#039;s Guide gives you, usually looking like &#039;&#039;&#039;void MyScript() { code goes here }&#039;&#039;&#039;. Then the game can &amp;quot;call&amp;quot; &amp;quot;threads&amp;quot; of that &amp;quot;script object&amp;quot; that will run until they end or are killed, so you can have more than one thread running of the same object concurrently. If you want multiple script objects, put them all in your &amp;lt;mapname&amp;gt;.script file and the game-engine will find them. You run scripts by the object name, not the file name. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I run a script in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A few common ways of calling a script object thread in-game are &lt;br /&gt;
# creating a target_callscriptfunction entity with the spawnarg: &amp;quot;call&amp;quot; &amp;quot;&amp;lt;name of your script object&amp;gt;&amp;quot;, then creating some other entity (such as a button or trigger brush) that &amp;quot;targets&amp;quot; that entity; &lt;br /&gt;
# creating a button with the property &amp;quot;state_change_callback&amp;quot; &amp;quot;&amp;lt;script object&amp;gt;&amp;quot;, which runs the script when pushed or triggered, &lt;br /&gt;
# Using [[Location_Settings#Script_calls]] to call a script when you enter or leave a location; &lt;br /&gt;
# triggering a script with the [[Objectives_Editor]] when you fulfill or fail an objective (possibly a hidden objective only for triggering the script); &lt;br /&gt;
# A script can call another thread in itself with the &amp;quot;thread&amp;quot; function; see the command in the link below. &lt;br /&gt;
# An entity can call a script when it spawns. Add a property/value either in the .def file or as a spawnarg on the entity: &amp;quot;ScriptEvent void &amp;lt;script object&amp;gt;(&amp;lt;parameters&amp;gt;);&amp;quot;. &lt;br /&gt;
# The script &amp;quot;void main();&amp;quot; is always called at game start. So if you add code under that heading in your script file, it will run at game start. &lt;br /&gt;
There are other methods too. (Note, if you call a persistent script, i.e., it runs all game, be especially sure to avoid performance hits, or make it non-persistent if possible, that is, you &amp;quot;kill&amp;quot; it at some point in the game so it doesn&#039;t hog resources..) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are script events (aka commands or functions)?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A script event is a pre-made object that does something for you, usually to some game item you specify, just when you write it in your code (like &#039;&#039;&#039;$item.eventX();&#039;&#039;&#039; does X to item). Sometimes it wants parameters or arguments to run (the stuff in parentheses) and will give an error if you don&#039;t put the arguments in the parentheses in exactly the way it wants, with the right number of them &amp;amp; right data types, etc. And some of them return values too, especially the &amp;quot;get&amp;quot; functions, which are handed over to a variable (e.g., &#039;&#039;&#039;X = getValue();&#039;&#039;&#039;, now X has the value. If X is an entity, you can even act on X as if it&#039;s the entity itself. Just be sure the data type of X and Value are the same, e.g. float, or string, or entity, etc, or you&#039;ll get an error). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common or useful script events for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all Doom3 and TDM script events are listed on this wiki page [[TDM_Script_Reference]], including the proper syntax (or this page, but it&#039;s down now: [http://www.modwiki.net/wiki/Script_events_%28Doom_3%29]), or also these two files in your Dark Mod folder (open with a text editor): scripts/doom_events.script, scripts/tdm_events.script. Note that TDM has some of its own script events, like setFrobable (in the tdm_events.script list). &lt;br /&gt;
&lt;br /&gt;
A quick short list of common or useful script events good for editing is here: [[Script_Events_User-Friendly_List]], with syntax and description, and including TDM events. It doesn&#039;t list all script events and all details, just common &amp;amp; useful ones for actual mapping IMO. If you want the full list, use the TDM_Script_Reference link I gave above.&lt;br /&gt;
&lt;br /&gt;
== World Building == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way to make caves?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Some tips are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204909] &amp;amp; [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__289484] Instructions for quick-cavern pattern building is here [http://forums.thedarkmod.com/topic/14469-quick-caverns-recipe/page__view__findpost__p__304250]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking roof using clean brushwork, including with an attic inside?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here are descriptions of method that all use a similar trick [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325945], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325944], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__244109]. The trick is to &amp;quot;cut out&amp;quot; a roof from a square brush using the clipper tool. Avoid rotating brushes to make it by hand. Alternatively, use patches over a rectangular under-structure of BSP brushes, although this is not good if you want a portaled attic. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a city area that performs well?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha gave a good method in this post. [http://forums.thedarkmod.com/topic/10003-so-what-are-you-working-on-right-now/page__view__findpost__p__312133]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a forest or a big outdoorsy area?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One good method is making large &amp;quot;rooms&amp;quot; in the shape of a big oval cylinder with very high natural-looking &amp;quot;rocky&amp;quot; &amp;amp; skybox walls and uneven ground using patches, filling it with trees and hiding some of the walls behind trees and greenery (you could also fill it with thick cylinder brushes of different sizes with bark texture to look like more trees, and place branches coming off them or to make a canopy), and possibly filling it with tons of grass (using [[SEED]]) and rocks and streams, with visportaled openings at &amp;quot;kiss points&amp;quot; in the walls to other large oval rooms at different orientations (maybe 2-5 connections per oval) so there&#039;s a dense web of interconnected forested rooms that (sort of) appear to be one big dense forest to the player. Some useful things to use are the [[Object_detail]], [[SEED]], and [[LOD]] systems. See the blueprint for the Thief 2 level Trail of Blood for a rough idea: [http://thief.wikia.com/wiki/T2_M10_Trail_of_Blood?file=T2_m10a_editor_colored.gif]. For good examples in Dark Radiant, look at the construction of mission 3 of No Honor Among Thieves (&amp;quot;No Honor Among Anyone&amp;quot;) and Shadowhide&#039;s slenderman forest map. (Somebody post links to screenshots of those maps in DR, or remind me to.) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make uneven ground?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One method is by burying patches into the ground that stick out and make the ground lumpy as described here [http://forums.thedarkmod.com/topic/13338-newbie-mapper-tip-making-uneven-ground/page__view__findpost__p__274917]. For more encompassing unevenness, you can use much larger patches laid over square caulk brushes underneath that seal the leaf to make the entire ground uneven. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a natural looking road where there isn&#039;t a sharp seam between the road material and grass but a nice fading transition?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the Wiki page for [[Roads]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make curved ceilings and archways?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use patches. Here&#039;s a list of some good tutorials for this sort of thing [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__254764]. Also look at this wiki page [[Patches#Archways]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a way to get good-looking fog in my mission?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are numerous values to make good fog. The setup for the fog from Fidcal&#039;s Heart mission is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__248277].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some tips to making a better looking map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[10_Simple_Tricks_for_Better_Looking_Maps]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good method or plan-of-action for building?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a matter of personal preference, but a method that professionals use is called the &amp;quot;stepwise refinement&amp;quot; method. It means you build the *entire* space of your mission first in rough blocks (so you have it all planned out first), then refine the whole thing in increasingly more detailed steps section by section, leaving the most fine detailing towards the end. It can help to use DR&#039;s Layer system to organize your building by sections too, without other sections interfering. Also, when you&#039;re drawing your map, think about arranging space into winding &amp;quot;rooms&amp;quot; (so there&#039;s no long lines of sight), even outside with tunnels, walls and skybox; and think about visPortal placement right at the start. Also think about the gameplay-performance balance of shadowing-lights &amp;amp; AI when thinking about placing them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I cleanly connect two brush edges meeting together, especially at a diagonal?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__257111]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a method for building very fast &amp;amp; efficiently?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha came up with &amp;quot;modular&amp;quot; approach where you build a few stock modules of architecture that you can combine to make a lot of geometry very quickly and efficiently. Here&#039;s his description: [http://forums.thedarkmod.com/topic/12833-sir-taffsalots-mapping-thread/page__view__findpost__p__290747]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking waterfall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There&#039;s a discussion about this in this thread [http://forums.thedarkmod.com/topic/11901-waterfalls/page__pid__303963#entry303963]. For a small waterfall, a white foamy particle effect raining down by itself looks good. You can copy Bikerdude&#039;s example from St. Alban&#039;s Cathedral. [http://www.youtube.com/watch?v=gIrZDpc1m68]. For a bigger waterfall, people talked about a combination of a flowing vertical water block with the foamy particle effect towards the bottom.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a nice little pond.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[How_to_create_a_pond]]. This thread [http://forums.thedarkmod.com/topic/14647-how-can-i-make-a-realistic-looking-pond/page__view__findpost__p__308916] has discussion on it.&lt;br /&gt;
&lt;br /&gt;
== Patches! ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is it possible to split patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this tutorial on it [[Patch_Splitting_-_Basic_Tutorial]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bend patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the instructions at [[Patches#Bending_Patches.2C_Curves.2C_L-shapes.2C_etc]] (Here&#039;s another small tutorial in a post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__277350].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I want to use a patch to round off a corner.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this part of the Patch wiki page [[Patches#Round_and_Soft]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I make a perfect circle with patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select verts of 4 corners, select the &amp;quot;rotate and scale&amp;quot; tool, and use the value &amp;quot;0.9428&amp;quot; to scale &amp;quot;up&amp;quot; (actually down) in the 2 corresponding axis of the scale tool. See this post [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__279356].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a dome or sphere?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a cone patch and drag down the top vertex to form a dome. Invert the matrix if you want an internal dome or thicken if you want it to be visible inside and out. A sphere is just two of these stuck together. Also tweak the tesselation in patch inspector if it is too chunky. You can have fun with the textures though; try fit. If you totally flatten the dome you have a disc which can produce some nice texture effects, eg, the marble floor centrepiece or a round rug. Drag a side to make it oval. See this post for a picture [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__233107].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you align a texture on a curved patch?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to align properly texture to curved patch like this one in the image [NB: image is missing], divide a brush according to the angle of the patch then use it&#039;s shader for your purpose. ... I made it with one edge is at one end of the curved patch and the other edge is at the other end. It gets distortions without this way.&lt;br /&gt;
&lt;br /&gt;
== Events and SFX ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an earthquake event?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Earthquakes can be done with a speaker. Just use the spawnarg &amp;quot;s_shakes&amp;quot; &amp;quot;1&amp;quot; on the speaker, and the screen will shake violently however loud the sound gets.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I emulate something like a blizzard or dust storm?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Doom3 made a dust storm area, and the same method can be used to make a blizzard, so it&#039;s possible. I&#039;m leaving this here to look up instructions for future reference.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make the screen fade to black (or some other color), or from black back to the game.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Trigger a script with the functions fadeIn [http://www.modwiki.net/wiki/FadeIn_%28script_event%29], fadeOut [http://www.modwiki.net/wiki/FadeOut_%28script_event%29], or FadeTo [http://www.modwiki.net/wiki/FadeTo_%28script_event%29].&lt;br /&gt;
&lt;br /&gt;
== Textures == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a quick way to align textures between two surfaces?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For two brushes, select the first surface, then &#039;&#039;&#039;edit --&amp;gt; copy shader&#039;&#039;&#039;, then click on the second surface and &#039;&#039;&#039;edit --&amp;gt; paste shader&#039;&#039;&#039;. This will seamlessly match the 2nd surface to the texture of the 1st. DR also comes with a useful tool for texture alignment, [[Texture_Tool]], which you bring up with Ctrl+Alt+T. If it&#039;s textures on two patches, you can follow these directions: [http://forums.thedarkmod.com/topic/14034-tutorial-for-road-creation/page__view__findpost__p__294114]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I randomize the position of textures on multiple brushes, e.g., for a row of stairs or pillars all with the same texture that I want to look different?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select multiple faces and in the surface inspector, press the natural button once you set the scale properly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I blend textures?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. This is particularly good for dirtying some textures up by blending in a grime texture. You can blend textures with a custom material file. Link to instructions coming. Also see the entry for [[Basic_Material_File]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How about blending texture transitions so there isn&#039;t a sharp seam, e.g., for a dirt path in grass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; DR comes with grass edge transition decal patches to overlay the hard edges. Read how to set it up here [[Grass_Edges]], or a more detailed tutorial on making roads here [[Roads]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; In NHAT blended terrain was made from patches broken into segments then exported as ASE models. Then the models were vertex painted in Blender and imported back into Dark Radiant. See this tutorial [[DrVertexBlend_(tutorial)]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set the color for some textures (like glowing mushrooms) and make lightbulbs go dark when turned off?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &amp;quot;Colorme&amp;quot; textures allow you to set the color with a spawnarg. So e.g. for colored mushrooms, choose a colorme skin with the spawnarg like &amp;quot;skin&amp;quot; &amp;quot;mushroom_selflit_green_colorme&amp;quot; and choose the color with a spawnarg like &amp;quot;_color&amp;quot; &amp;quot;0.24 0.50 0.40&amp;quot; (where the value is the RGB values you want). For lightbulbs you can trigger a colorme texture switch with the lightswitch (so it switches between &amp;quot;lit up&amp;quot; and &amp;quot;black&amp;quot;). Instructions on that coming.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a fast way to put different textures on a lot of objects?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; 1. Click the mouse wheel on the texture to copy it. 2. To paste it naturally (i.e., in a random position): shift+mousewheel click. 3. To just paste it: ctrl+mousewheel click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can you tile a texture a specific number of times to fit a surface?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to tile a texture a certain number of times, enter the values 1/X and 1/Y (you need to compute them in your head) in the little boxes in the surface inspector, then press &amp;quot;Fit&amp;quot;. It will tile your texture horizontally X times and vertically Y times. You can also enter things like &amp;quot;2&amp;quot; and &amp;quot;1&amp;quot; and get a texture that only occupies half of the width. You can then use the &amp;quot;Right&amp;quot; or &amp;quot;Left&amp;quot; buttons to align it quickly at the ends. Pro-tip: Press CTRL+ALT+T to open the texture tool, it allows super quick aligning of textures on patches. Esp. useful for decals where the decal texture consists of multiple decals.&lt;br /&gt;
&lt;br /&gt;
== Readables &amp;amp; GUIs ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put custom art in a book or scroll, like a picture?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a custom .gui. Here&#039;s a rough idea to get you started [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__263836]. I&#039;ll try to put better instructions in later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger a text message to pop up and say something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create an entity: darkmod &amp;gt; targets &amp;gt; atdm:gui_message and give it the properties/values that you want. Popups will explain each one. You can target it with a triggering entity or trigger it from a script or any other triggering mechanism. An example is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256592]&lt;br /&gt;
&lt;br /&gt;
== Lighting and Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I add music or ambient sounds?&#039;&#039;&#039; &#039;&#039;&#039;Q. Can I dynamically adjust the ambient lighting?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For both of these things, check out the article for [[Location Settings]]&lt;br /&gt;
&lt;br /&gt;
{{editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{tutorial-editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{darkradiant|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up Reverb (EAX) settings for my rooms? (E.g., the echo of a large hall, etc.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create a text file and name it &amp;lt;mapname&amp;gt;.eax; place it in your .pk4 with your .map file; and in it create entries by location name with the values you want for that location. See this wiki entry to see the format &amp;amp; values [[Setting_Reverb_Data_of_Rooms_(EAX)]].&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17347</id>
		<title>Editing FAQ - Troubleshooting &amp; How-To</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17347"/>
		<updated>2013-11-09T01:13:32Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* Performance Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below are some common issues and questions mappers have had in the Editor&#039;s Guild forum with common solutions. Some of this assumes you&#039;ve already gone through the [[A_-_Z_Beginner_Full_Guide_Start_Here!]], [[Startpack_Mappers&#039;_Guide]], and [[Dark_Radiant_Must_Know_Basic_Intro]]. (If you know a FAQ not here and worth going in this list, and you know the right answer(!), or you can improve an existing answer, please add it if you have edit control or PM it to a team-member if you don&#039;t.) &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting FAQ =&lt;br /&gt;
&lt;br /&gt;
== Rendering &amp;amp; VisPortal Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of my brushes have disappeared or turned black and won&#039;t render.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This can happen when two touching brushes around the seam are not perfectly flush with one another and the rendering hiccups for those brushes &amp;amp; brushes behind it, either there&#039;s a tiny wedge or overlap or gap or weird angle between them. The usual solution is to make sure the brushes are snapped to the grid and perfectly flush against one another, or more generally to simplify the brushwork around the seam of the disappearing brushes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My visportal is not showing up or not closing like it should (you can check this with by typing &amp;quot;r_showportals 1&amp;quot; in the console. The portal edge will show green when open and red when closed.).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A common reason for that is that the two areas separated by the portal are not hermetically sealed and there&#039;s an internal leak, either (1) there may be an unportaled gap between the two, possibly covered up by func_static (which do not seal) or possibly caused by an inadvertent hole created by the first FAQ question above, or (2) an internal leak can happen when all sides of the visportal are not buried in or flush against sealing brushes, and there&#039;s a gap between the visportal and brush, or possibly even a tiny gap just touching the visportal side is enough to break it. A way to check if there&#039;s an internal leak, and locating it if there is, is described here: [[Visportals#Trouble-shooting]]. Other reasons it might fail are also described there (such as accidentally changing a nodraw texture to something else).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I can see other rooms behind a mirror (or any reflective surface) through it, instead of just a reflection.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The area behind a mirror should be in a separate leaf (visportaled area) behind a closed visportal so it doesn&#039;t render. This problem usually means the two areas aren&#039;t in separate leafs, the portal isn&#039;t closed, or there&#039;s an internal leak between the areas in front of and behind the mirror.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Help! I&#039;m having rendering &amp;amp; visPortal issues all over the place ... broken portals, sparkly lines, disappearing brushes, z-fighting, uneven walls, etc.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; As a general piece of advice, messy brushwork leads to trouble one way or another. To keep your brushwork clean: &lt;br /&gt;
* keep snapped to the grid (Ctrl+G toggles) &amp;amp; stay away from small grid levels (Typing a number or Plus/Minus changes the grid scale; 8 is a good starting grid; staying at or above 2 or 4 is fine for most stuff; going below 1 is usually just for special situations). &lt;br /&gt;
* Make brush intersections perfectly flush. &lt;br /&gt;
* Stay away from unnecessary tiny brushes &amp;amp; wedges (leave detail work to func_statics; brushes are for closing off leafs and the void. Of course you can do fine detail work with brushes &amp;amp; convert them to a func_static). &lt;br /&gt;
* Don&#039;t use the &amp;quot;CGS Subtract&amp;quot; tool if it will shatter the brush into tiny slivers; use the cut tool instead (open by pushing &amp;quot;X&amp;quot;). &lt;br /&gt;
* You can use patches for uneven geometry with square brushes underneath textured with caulk. &lt;br /&gt;
* When rotating geometry, avoid weird angles when you can (where vertexes end up off the grid), and for multi-brush structures, build the whole thing first *then* rotate it all together instead of rotating &amp;amp; placing each brush individually. &lt;br /&gt;
These aren&#039;t rules set in concrete if you want to do something special once in a while, but general rules of thumb that will make life a lot easier if you generally stick to them.&lt;br /&gt;
&lt;br /&gt;
== Crashes and Warnings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map has a leak in it, but a pointfile either isn&#039;t generated or doesn&#039;t make sense. (A pointfile is generated when dmap occurs and there&#039;s a leak, then you open DarkRadient and click File&amp;gt;Pointfile to see it. It normally runs a red line that ends in the void, pointing out the leak).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039;  Make sure a gap isn&#039;t covered up with func_statics. If the origin of a model is in the void it will also cause a leak with a non-sense pointfile. Read more on the [[Leaking maps]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll up through the console output to see what a problem was during dmap or map or in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/Down to scroll through the console.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I&#039;m getting an error message &amp;quot;warning: aas is out of date&amp;quot; once my map has loaded. What does it mean and what do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The AAS is for AI pathfinding. It usually means you changed brushwork and started a map without dmapping first. The solution is to dmap. If you dmap and still get the warning, delete your .aasxx, .proc, and .cm files in the maps folder and dmap again. If you&#039;re still getting a warning, then it could be a sign that something in your map is breaking the AAS pathfinding. Try monsterclipping tricky areas for the AI to path (like around objects and uneven ground) or clean up messy brushwork that might break the dmapping like sliver brushes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have encountered a malloc failure error while dmapping my level. Instead of finishing with the dmap operation, it crashes midway with an error message.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; One solution to this is given in the Dmap wiki entry here: [[Dmap#Malloc_Errors]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; This is what I&#039;ve done to fix this exact issue. Open the map in DarkRadiant, select everything, copy to clipboard. Open another instance of DarkRadiant and paste from clipboard. Save as new filename and dmap new file and that has worked 3 times now with random unresolvable crashes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A3.&#039;&#039;&#039; GC and I have found correlations between visportalling and mAlloc errors. Time to re-arrange your visportals. In NHAT, we had many malloc problems until we retooled how each area was portaled. Originally, every other visleaf had tons of entities, while half had hardly any. That&#039;s not neccessarily bad, but it strains the dmapper when one or two visleafs are cluttered with entities that really bloat your mapname.proc file. We added a few more portals to even out entity distribution, and dmap was happy again.&lt;br /&gt;
&lt;br /&gt;
== Performance Issues ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map is so slow. How do I improve performance?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See these wiki entry: [[Performance:_Essential_Must-Knows]]. Tips include: &lt;br /&gt;
* Reduce AI [[Pathfinding]] with Monsterclipping helps performance, simplifying complex bumpy surfaces into 1 smooth monsterclipped surface (or raise the monsterclip to inside the ceiling and there is no pathfinding computation at all), or excluding entire surfaces AI should never walk on, like detail brushwork or some roofs. &lt;br /&gt;
* Use [[Interleaved_Thinking_optimization]]. Reducing AI think-time helps performance quite a bit. &lt;br /&gt;
* break-up long lines of sight, &lt;br /&gt;
* improve visportal &amp;amp; leaf placement (so less architecture is rendered at a time), &lt;br /&gt;
* use fewer AI, &lt;br /&gt;
* convert ornamental brushwork into func_static, &lt;br /&gt;
* reduce the overlap of light sources on surfaces by adjusting their placement &amp;amp; reducing their light-radius. (Every time a new light hits a surface, it&#039;s another render pass. So 4 lights hitting a surface processes it 4 times. If only 1 light hit it, its lighting is processed in 1/4 the time), and &lt;br /&gt;
* set objects and lights to &amp;quot;noshadow&amp;quot; if it won&#039;t be noticable to the player or affect gameplay (possibly in combination with low-poly shadow meshes or shadowy decals. Note that &amp;quot;noshadow&amp;quot; has two jobs. Put on lights, it means that light will cast no shadows on any object. Put on objects, it means that object will not cast a shadow from any light.) &lt;br /&gt;
&lt;br /&gt;
There are also lots of other tricks out there if you check around the forums, including more advanced &amp;amp; optional tricks such as using the [[LOD]] system or [[SEED]] system, or even crazier tricks (cross-leaf func_statics, skybox architecture, Strombine lighting, Camera Cubemapped Visportal Patches, lots of crazy tricks out there), that you don&#039;t have to worry about if you&#039;re a new mapper but you can ask us about or search for in the forum if you&#039;re curious. Generally speaking there are pros and cons trade-offs between performance &amp;amp; dazzle for many things (like lights or visportal placement); so it&#039;s good to think about the best performance-dazzle balance for your scene. E.g, lots of highpoly brushwork, lights, &amp;amp; AI can look good in a small or medium room, but may not be worth the performance hit in a big courtyard, and try to find ways to get better performance &amp;quot;for free&amp;quot; without the player noticing anything missing, like smart use of noshadows, monsterclips, and interleaved thinking distances.&lt;br /&gt;
&lt;br /&gt;
== Gameplay Issues that Mappers sometimes Overlook ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Below is a list of common gameplay issues that players sometimes complain about and that mappers &amp;amp; testers sometimes overlook or should at least be aware of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Players find it very difficult to frob objects (loot, keys, readables) when the frob distance is set too short or the space is awkward (like in a drawer or up on a wall, etc). In testing, please double-check that every frobable object is easy to frob from a comfortable place, and increase the frob distance if it&#039;s not, erring on the side of more space. (See the question on making frobbing easier under &amp;quot;Handling Objects&amp;quot; below for more information.) &lt;br /&gt;
&lt;br /&gt;
- Objects can get stuck into brushwork while moving them around. &lt;br /&gt;
&lt;br /&gt;
- Players can get stuck in narrow spaces and can&#039;t mantle out, so try to avoid this kind of geometry if possible. &lt;br /&gt;
&lt;br /&gt;
- A very low ceiling can prevent hitting AI with a BJ, so try to avoid it when AI are around. &lt;br /&gt;
&lt;br /&gt;
- Make sure AI have a flee path.  &lt;br /&gt;
&lt;br /&gt;
- Some players would like the ability to drop used keys and other inventory items, done by turning the can_be_dropped property to true, unless for gameplay reasons you don&#039;t want to. &lt;br /&gt;
&lt;br /&gt;
- Some players don&#039;t like long readables that don&#039;t get to the point. At least be conscious of how your readables read to a player.&lt;br /&gt;
&lt;br /&gt;
- Think about how you want to handle non-functioning doors (or other &amp;quot;unnatural&amp;quot; situations like windows that can open) in a way that visually or fairly communicates to the player that something is special about this door or window, but isn&#039;t too immersion breaking either.&lt;br /&gt;
&lt;br /&gt;
== Issues with Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My streetlight, candle, lamp, light-creating object, causes a weird shadow I want to get rid of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Put the spawnarg &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; on the offending object.&lt;br /&gt;
&lt;br /&gt;
== AI Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My AI will not pass through a visportal no matter how I set up the path nodes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Check that the sides of the visportal use the nodraw texture (except for the portal-face itself of course).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you get AI to walk on complex terrain patches or func_statics?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can always lay down invisible monsterclip brushes and the AI can walk on it. Overlay with a brush with a &amp;quot;material&amp;quot; clip texture so it causes the right sound for footsteps.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Problems with Patches ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have 2 curved patches and they&#039;re not aligning. What do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My patch is rendering strangely, like fractured into slivers.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
== Issues with Lighting &amp;amp; Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of the parallel lights I use for moonlight aren&#039;t giving off any light.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a known problem with parallel lights. For some reason in some arrangements you get no light at all. Just fiddle with it a bit - move it slightly, change the radii, move the vertex a bit - and it should suddenly work. Once you&#039;ve got it working then it&#039;s stable. Likely the code chokes on certain values in its calculations. ... Also, to help optimize your moonlight, you should adjust the radius so it&#039;s only as big as it needs to be. You may also want to move the actual position of the little moon cube in the skybox to match the parallel light (and make sure to fix the texture on it if you mess it up - hint: lock textures before moving cube to make it easy)&lt;br /&gt;
&lt;br /&gt;
= General How-To Editing FAQ =&lt;br /&gt;
&lt;br /&gt;
== Dark Radient Questions == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I see all the default properties already on an object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; In the entity inspector there&#039;s a checkbox near the top that says &amp;quot;Show Inherited Properties&amp;quot;. Click that box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some basic units, scales, limits, maxs, and mins of various things when editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all these things is here: [[Limits,_Max,_Min,_Stats,_etc]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I manipulate brushes to resize and reshape them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. In DarkRadient you can select a brush and push &amp;quot;V&amp;quot; to select verticies to drag and resize, &amp;quot;E&amp;quot; to select edge(s) to drag and resize, and &amp;quot;F&amp;quot; to select face(s) to drag and resize. &amp;quot;Ctrl+#&amp;quot; makes a selected brush be #-sided. You can also use the Brush&amp;gt;Prism and Brush&amp;gt;Cone to convert a brush to those shapes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common DR shortcut commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &lt;br /&gt;
* &amp;quot;H&amp;quot; hides selected items. &lt;br /&gt;
* &amp;quot;I&amp;quot; inverts selected. &lt;br /&gt;
* &amp;quot;Ctrl+I&amp;quot; inverts a patch&#039;s normal. &lt;br /&gt;
* &amp;quot;J&amp;quot; brings up entity list. &lt;br /&gt;
* &amp;quot;Ctrl+K&amp;quot; makes 1st-selected-entity &amp;quot;target&amp;quot; 2nd-selected-entity. &lt;br /&gt;
* &amp;quot;L&amp;quot; brings up light inspector. &lt;br /&gt;
* &amp;quot;Ctrl+L&amp;quot; brings up the Layers menu. &lt;br /&gt;
* &amp;quot;N&amp;quot; brings up entity inspector. &lt;br /&gt;
* &amp;quot;T&amp;quot; brings up texture browser. &lt;br /&gt;
* &amp;quot;X&amp;quot; go into clipper mode. &lt;br /&gt;
* Brush manipulation modes: are &amp;quot;R&amp;quot; rotate brush, &amp;quot;Q&amp;quot; free-move &amp;amp; resize, &amp;quot;W&amp;quot; translate-move.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make my own shortcut key commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Under the Edit menu, at the bottom is &amp;quot;Keyboard Shortcuts&amp;quot; which allows you to set your own shortcuts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I screwed something up! What do I do?!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Ctrl+Z undos. Ctrl+Y redos.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is there a way to organize &amp;amp; simplify building, so I can build one section at a time without other sections getting in the way?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; DR has a [[Layers]] function that lets you build one &amp;quot;layer&amp;quot; at a time (open with ctrl+L or View&amp;gt;Layers). It also improves DR performance, which is handy as the map gets bigger.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up things like the pre-game shop, the player inventory, and an in-game map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; All these things are described in the Startpack Mappers&#039; Guide: [[Startpack_Mappers&#039;_Guide#Ammo.2C_Weapons.2C_Player_Tools.2C_Start_Inventory]], [[Startpack_Mappers&#039;_Guide#Purchase_Shop]], [[Startpack_Mappers&#039;_Guide#Adding_an_In-game_Map_to_your_FM]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put spawnargs on def_attached entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can put spawnargs on def_attached entities by using the spawnarg &amp;quot;set SPAWNARGNAME on ATTACHMENTNAME&amp;quot; &amp;quot;value&amp;quot; on the base entity. Here&#039;s an example of setting a color property on a flame attachment to a torch &amp;quot;set _color on flame&amp;quot; &amp;quot;0.2 0.2 0.9&amp;quot;. Read more here [[Combined_light_entities#Setting_spawnargs]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s an easy way to find materials in DR?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Tip to help find materials in Dark Radiant&#039;s materials browser: &lt;br /&gt;
# Point to Textures (or any tree). &lt;br /&gt;
# Shift + Right key to fully open the tree. &lt;br /&gt;
# Type the key letters of what you want to find. &lt;br /&gt;
# Up/down arrows to go to next/previous occurrence. &lt;br /&gt;
# Esc to get out of input field. &lt;br /&gt;
Oh yeah, avoid F3 because that is likely to switch to render mode which in my case crashes DR (but may not if the map is small).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an N-sided brush?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A quick way to make an N-sided brush is to highlight the brush and push cntl+N (N being the number of sides for the top face). So if you want a 5-sided brush, highlight it and push cntl+5. But the best way to get the walls of a multi-sided brush to line up seamlessly is still to use the clipper-tool and precisely cut off a slice. (And don&#039;t use CSG Subtract unless you know what you&#039;re doing and aren&#039;t creating a million splinters!)&lt;br /&gt;
&lt;br /&gt;
== Console Questions ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I open the console?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Open the console with ctrl+alt+~ in a normal game, and just ~ when playing through &amp;quot;map&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll through the console output?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/PageDown.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q.What&#039;s a list of all the Doom3 Console Commands and CVars?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all commands &amp;amp; Cvars is here [http://www.doomwadstation.com/doom3/console/]. Darkmod Cvars are listed here [[Cvars_in_The_Dark_Mod]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some *useful* console commands and cvars for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here&#039;s one list: [[Console_Useful_Controls]]. Here&#039;s a list more tailored to mapping: &lt;br /&gt;
&lt;br /&gt;
Commands: &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;dmap &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; compiles a map, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;give &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; gives the player an item, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;god&#039;&#039;&#039;&amp;quot; player cannot be harmed,&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;killmonsters&#039;&#039;&#039;&amp;quot; takes out all AI&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;map &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; loads a map to play, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;noclip&#039;&#039;&#039;&amp;quot; lets the player go through objects and walls, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;notarget&#039;&#039;&#039;&amp;quot; let&#039;s the player be invisible to AI, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadDecls&#039;&#039;&#039;&amp;quot; will reload material defs without having to re-start TDM, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadimages&#039;&#039;&#039;&amp;quot; does the same for lights and &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadSurface&#039;&#039;&#039;&amp;quot; for surfaces, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;saveRagdolls&#039;&#039;&#039;&amp;quot; saves the positions of all ragdolls to the .map file (see the FAQ under Handling AI), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;teleport &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; teleports the player to an entity. &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;tdm_show_loot&#039;&#039;&#039;&amp;quot; Shows loot.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;spawn &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; spawns an entity: &lt;br /&gt;
 spawn atdm:weapon_blackjack&lt;br /&gt;
 spawn atdm:weapon_shortsword&lt;br /&gt;
 spawn atdm:ammo_broadhead&lt;br /&gt;
 spawn atdm:ammo_firearrow&lt;br /&gt;
 spawn atdm:ammo_gasarrow&lt;br /&gt;
 spawn atdm:ammo_mossarrow&lt;br /&gt;
 spawn atdm:ammo_noisemaker&lt;br /&gt;
 spawn atdm:ammo_ropearrow&lt;br /&gt;
 spawn atdm:ammo_waterarrow&lt;br /&gt;
 Append &amp;quot;inv_ammo_amount 50&amp;quot; to any of the above to spawn 50 arrows at once: spawn atdm:ammo_broadhead inv_ammo_amount 50&lt;br /&gt;
Cvars (1 turns on, 0 turns off, unless otherwise noted): &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;com_showFPS 1&#039;&#039;&#039;&amp;quot;, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showLightCount 1&#039;&#039;&#039;&amp;quot; (colors shows the number of lights hitting a surface, black = 0, red = 1, blue = 2... etc), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showPortals 1&#039;&#039;&#039;&amp;quot; (red=closed,green=open) If your portals dont show up they are most likely not sealing.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showTris n&#039;&#039;&#039;&amp;quot; (n=1) Shows tris rendered directly, (n=2) shows overdrawn tri&#039;s, (n=3) shows all tri&#039;s, direct and indirect.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a put-object-here objective?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182924]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a &amp;quot;ghosting&amp;quot; objective (e.g., you are busted if you are seen.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204695]&lt;br /&gt;
&lt;br /&gt;
== Handling Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a door handle to a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Just position the handle and input &amp;quot;bind&amp;quot; and the door entity ID/name as a spawnarg. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object into loot?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182921]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an entity frobable?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the entry for [[Making an Entity frobable]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Ok it&#039;s frobable, but doesn&#039;t fall or move. How do I make an entity act like a world object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You need to make the object a moveable, see [[Moveables]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I get a lever or button to open a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__212036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put some text on a sign or wall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can use this method [http://forums.thedarkmod.com/topic/11159-add-text-to-your-signs-signposts-walls-etc/]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bind something to a rope (like a body) so it doesn&#039;t fall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Dynamic ropes are unreliable, so it&#039;s good to use a func_static like a chain or make a func_static rope from a cylinder brush. For a ragdoll, place the ragdoll so he clips into the func_static. You need to bind the ragdoll to the chain (so the spawnarg is on the ragdoll), with &amp;quot;bind&amp;quot; &amp;quot;func_static_...&amp;quot;, where func_static_... is the chain. Or, through DR, you can just select the entity you want to attach (the ragdoll), then also select the thing you want to attach it to (the chain), and in the menus select &amp;quot;Entity&amp;quot; - &amp;quot;Bind selected entities&amp;quot;. But it&#039;s been reported the clipping does the job, not binding. See this link [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__221262]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make something switch from frobable to unfrobable like a used lever, or unfrobable to frobable like contents in a chest or drawer you don&#039;t want frobable until it&#039;s open?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property &amp;quot;start_frobable&amp;quot; 1 or 0 (which mean true or false) depending on your case (it affects everything inside), and a triggering entity, such as the lever or the chest itself, that targets the set_frobable entity that triggers the switch when it&#039;s frobbed. For the record, you can also switch the frobability of an object in a script with the command: &#039;&#039;&#039;$&amp;lt;entityname&amp;gt;.setFrobable(n);&#039;&#039;&#039;, where n is &amp;quot;1&amp;quot; to make it frobable and &amp;quot;0&amp;quot; for unfrobable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make breakable glass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__222734]. You basically convert your glass brush to a func_fracture entity and set the &amp;quot;health&amp;quot; spawnarg to the value you want the glass to break at. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about an object that gets increasingly damaged-looking as you hit it?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a func_damagable entity, which replaces its model and/or shader with increasingly &amp;quot;damaged&amp;quot; versions (as many stages as you like) when its health goes below the threshold you set with the &amp;quot;health&amp;quot; spawnarg, and you can use &amp;quot;target&amp;quot; to trigger something when damage occurs (such as a sound effect or event). See here for details on the spawnargs involved in setting it up: [http://www.modwiki.net/wiki/Func_damagable_(entity)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object that you can frob and it does something or something happens?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; If it&#039;s an object you made from patches or brushes, make it into a frobable func_static, or if it&#039;s already a func_static, make sure it&#039;s frobable ([[Making an Entity frobable]]). Then give it a Frob response whose effect is a trigger, and give it a &amp;quot;target&amp;quot; spawnarg to the entity that causes your effect when triggered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can a lever or button target multiple entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes! Use the spawnargs &amp;quot;target1&amp;quot;, &amp;quot;target2&amp;quot;, &amp;quot;target3&amp;quot;, etc, with each entity-target as a value. A quicker way is to use the keyboard shortcut Ctrl+K. Select the button or lever, then select the target-entity and hit Ctrl+K. De-select the target-entity then select the next one, hit Ctrl+K again. Each time adds a new target to the switch. (Many other spawnargs allow you to have multiple entries by numbering them, such as bind and def_attach.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a rotating entity, like a fan?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__242385]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make objects non-solid so they still render but the player can walk through them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Add the spawnarg: noclipmodel 1 to turn them into non-solids.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a firefly or will-o-wisp, basically a glowing ball that floats around?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a rough explanation to help you get started. A firefly is a func_emitter. Click the model property then use the button bottom right to select a suitable particle effect, possibly tdm_glare_lamp_01.prt. Bind to something invisible that will move it along a path, typically a func_mover with nurb curves used as the path. A tutorial for setting up nurb curves is here [http://www.doom3world.org/phpbb2/viewtopic.php?t=5123].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an event from something in the player&#039;s inventory?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; give the object a &amp;quot;target&amp;quot; to trigger and also the property/value: scriptobject InvTriggerScript. If your object does not already go in the inventory then use the entity: items &amp;gt; custom &amp;gt; atdm:moveable_custom_item. If you get a collision model error then ask on the forums for help (or read the wiki entry for [[Moveables]]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport an entity?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use targets/atdm:teleport. See this wiki page [[Teleporting_entities]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom inventory item with its own inventory icon graphic?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this entry [[A_-_Z_Beginner_Full_Guide_Page_6#Special_Items]] for setting the inventory category, loot type, inventory name and inventory icon. To repeat the instructions for a custom icon: on the object put the property &amp;quot;inv_icon&amp;quot; with a value &amp;quot;guis/assets/hud/inventory_icons/&amp;lt;name&amp;gt;.tga&amp;quot; (substitute whatever name you gave it for &amp;lt;name&amp;gt;), and package your .pk4 to put your image file in that relative location. You can also see other inventory_icons there and can use an existing one, or package your .pk4 to replace an existing one with your custom one. A method for making an inventory icon is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__259172] (be sure to use an alpha channel to make the background transparent, tutorial: [http://www.axialis.com/tutorials/tutorial-misc001.html]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do make an object that&#039;s hard to frob easier to frob?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One easy way is to add this property: frobbox_size 5. If it&#039;s still hard, see this post for other things you can do. [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__228245]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a candle you can pinch to go out?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I made a bunch of pinchable non-moveable candles into my WIP like this: &lt;br /&gt;
# Make a func_static candlestick. place light source entity candleflame on it. &lt;br /&gt;
# Give the candlestick &amp;quot;frobable 1.&amp;quot; &lt;br /&gt;
# Give the candlestick S&amp;amp;R response frob, extinguish light and candleflame name. &lt;br /&gt;
# You can optionally add another response frob to trigger a speaker with a &amp;quot;snuff&amp;quot; sound effect. &lt;br /&gt;
# Done.&lt;br /&gt;
You can copy the entity bunch around and all the params should update correctly for the new replica. Frobbing will not relight it: the player needs to relit them with a flame source.&lt;br /&gt;
&lt;br /&gt;
== Handling AI == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make sure a guard can unlock a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are a few different ways, explained here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__217915]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a key or purse to an AI&#039;s belt, or similar kinds of attachments?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The easiest way is with &amp;quot;bind&amp;quot;. Place the key or purse around the belt area where you want it, sticking a little farther out than usual, and rotate it as desired. On the key add the property &amp;quot;bind&amp;quot; with the value of the AI&#039;s entity-ID or name, then the property &amp;quot;bindToJoint&amp;quot; with the value &amp;quot;leftHips_dummy&amp;quot; or &amp;quot;rightHips_dummy&amp;quot; as needed. For attaching things in other places (like a ring or hat or necklace), it&#039;s the same general principle but you should look up the joint to attach to. A list of all the joint names is here: [[BindToJoint]]. See this wiki entry for more info [[Attaching_Items]]. For another method using def_attach see [[Attaching_Props_to_AI]], and this post for an example of the spawnargs involved [http://forums.thedarkmod.com/topic/13084-ai-attach-keys/page__view__findpost__p__276064]. The issue with def_attach is that the attached thing spawns at its own rotation angle, which might not look great and is tricky to change (if you insist, see [[AI_Attachment_Ingame_Editing]] and [[Cvars_in_The_Dark_Mod#Attachment_related]]). With bind you just place and &amp;quot;bind&amp;quot;, and it stays where you put it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about other kinds of attachments where special animations are involved, like torches and weapons?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For these you want to use Def_Attach. See this wiki entry [[Attaching_Props_to_AI]]. For heads &amp;amp; weapons specifically see this wiki entry [[Adding_Heads_and_Weapons_to_AI]]. (You can set spawnargs on the def_attached entities with the method described here [[Combined_light_entities#Setting_spawnargs]].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I mute an AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Give the AI the spawnarg: def_vocal_set atdm:ai_vocal_set_mute. If you only want to mute some barks, you&#039;ll have to modify the AI&#039;s .def file by hand, taking or commenting out the barks you don&#039;t want, and packaging the new def file in your mission&#039;s pk4. For coughing and animation based barks, see this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__224558]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I hide an AI until I trigger him?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; No, the spawnarg &amp;quot;hide&amp;quot; doesn&#039;t work well with AI (they&#039;re made invisible, but still audibly there). Put the AI in a blueroom and use a teleport instead, or a teleporting script command. See the wiki entry for [[Teleporting_entities]]. Note, after teleporting an AI, pathing becomes a problem for it. See this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__280818] and the previous posts on this issue to make sure the AI can path properly after a teleport. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I manage AI teams, who is a friend, enemy and neutral?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To set the teams, see [[Relations]]. If you want to trigger a change in team with a script, see [[AI_Relations_(Scripting)]]. Another method to switch AI teams using S&amp;amp;R (stim &amp;amp; response) is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256126] and see the entry [[Stim/Response]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI play an animation when I want?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__253169]. There may be other ways possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set or change the health of AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; AI use the spawnarg &amp;quot;health&amp;quot; to set their hit points. To change it in-game, use a script and the function &amp;quot;setHealth&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I pose ragdolls so they look naturally placed?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Save a backup, pose all the ragdolls in-game, then use the console command saveRagdolls which saves their positions to the .map file. cf. [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__265650].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a scene of AI playing cards?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Probably the easiest thing to do is load the prefab (under AI), place it, and adjust it how you want.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI frob something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To get an AI to frob something, eg, a lever (doesn&#039;t work to pick up and carry) create a path_interact entity. You can include it in a normal pathing patrol. Give it these 2 spawnargs: ent &amp;lt;name of entity you want the AI to frob&amp;gt;; target &amp;lt;next path entity (if any)&amp;gt;. Note that the AI won&#039;t walk to this entity; you have to use a path_corner to get him where you want then target to the path_interact to get him to frob.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI catch fire?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can bind some unlit fires to an NPC (like a zombie) and shoot it when a fire arrow, he&#039;ll erupt in flames, but the flames won&#039;t damage him. You could also light him with a candle. I&#039;d bet theres some way to make that actually kill the creature, or at least cause it damage. ... One improvement suggestion: When the the light gets the fire stim, target a trigger multiple, which delays for a 120-240 seconds and then turns the fire off. You could make the fire damaging by starting a trigger timer which applies the stim damage to the target every few seconds. Remember to switch off the timer when the flames are doused.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I keep an AI ragdoll from sinking into the bed model, e.g., if he&#039;s KO&#039;d?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I found one way to keep [an unconscious/dead ragdoll body] from sinking into the model below it is to use a platform of nodraw_solid underneath the body. You should be able to place such a brush within the bed model and test it with a ragdoll on the bed. Adjust it&#039;s top surface height until the body lays just on top of the bed (then delete the ragdoll)... then a blackjacked AI should be able to stay on top of the bed like the ragdoll did.&lt;br /&gt;
&lt;br /&gt;
== The Player == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I do things with the player&#039;s inventory, like trigger an inventory item to be deleted, or an item to be added to the inventory, or one item being replaced with another item?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can do all these things with a script (read [[A_Beginner&#039;s_Guide_to_Scripting]] and the scripting FAQ below to learn about scripting). Have your triggering mechanism trigger a target_callscriptfunction entity which calls a custom script, then use the appropriate script command in the script on $player1. A list of the commands is here [[Inventory#Scriptsupport]]. &lt;br /&gt;
Useful commands are (replacing the &amp;quot;Item&amp;quot; variables with the item ID): &lt;br /&gt;
* &#039;&#039;&#039;$player1.addInvItem(inv_item);&#039;&#039;&#039; and &lt;br /&gt;
* &#039;&#039;&#039;$player1.replaceInvItem(oldItem, newItem);&#039;&#039;&#039; (note: If &amp;lt;newItem&amp;gt; is the $null_entity, &amp;lt;oldItem&amp;gt; is just removed and no replacement happens.) &lt;br /&gt;
For example, to remove a key from the player&#039;s inventory, use a command like: &#039;&#039;&#039;$player1.replaceInvItem ($key, $null_entity);&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport the player?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use base &amp;gt; info_player_teleport. Give it the spawnarg and value: target info_player_start_1. Give it the spawnarg: angle with a value if you want to force the player to turn to face a particular direction.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I simulate a crawl for the player to pass under things like tables that he couldn&#039;t normally do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__229174]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom script?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; First read [[A_Beginner&#039;s_Guide_to_Scripting]], [[Scripting_basics]], and [[My_first_map_script]] to learn the basics of scripting. You write a custom script as a text file named &amp;lt;mapname&amp;gt;.script and packaged in your .pk4 in the same place as your .map file. Inside it you make your own script object in the format the Beginner&#039;s Guide gives you, usually looking like &#039;&#039;&#039;void MyScript() { code goes here }&#039;&#039;&#039;. Then the game can &amp;quot;call&amp;quot; &amp;quot;threads&amp;quot; of that &amp;quot;script object&amp;quot; that will run until they end or are killed, so you can have more than one thread running of the same object concurrently. If you want multiple script objects, put them all in your &amp;lt;mapname&amp;gt;.script file and the game-engine will find them. You run scripts by the object name, not the file name. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I run a script in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A few common ways of calling a script object thread in-game are &lt;br /&gt;
# creating a target_callscriptfunction entity with the spawnarg: &amp;quot;call&amp;quot; &amp;quot;&amp;lt;name of your script object&amp;gt;&amp;quot;, then creating some other entity (such as a button or trigger brush) that &amp;quot;targets&amp;quot; that entity; &lt;br /&gt;
# creating a button with the property &amp;quot;state_change_callback&amp;quot; &amp;quot;&amp;lt;script object&amp;gt;&amp;quot;, which runs the script when pushed or triggered, &lt;br /&gt;
# Using [[Location_Settings#Script_calls]] to call a script when you enter or leave a location; &lt;br /&gt;
# triggering a script with the [[Objectives_Editor]] when you fulfill or fail an objective (possibly a hidden objective only for triggering the script); &lt;br /&gt;
# A script can call another thread in itself with the &amp;quot;thread&amp;quot; function; see the command in the link below. &lt;br /&gt;
# An entity can call a script when it spawns. Add a property/value either in the .def file or as a spawnarg on the entity: &amp;quot;ScriptEvent void &amp;lt;script object&amp;gt;(&amp;lt;parameters&amp;gt;);&amp;quot;. &lt;br /&gt;
# The script &amp;quot;void main();&amp;quot; is always called at game start. So if you add code under that heading in your script file, it will run at game start. &lt;br /&gt;
There are other methods too. (Note, if you call a persistent script, i.e., it runs all game, be especially sure to avoid performance hits, or make it non-persistent if possible, that is, you &amp;quot;kill&amp;quot; it at some point in the game so it doesn&#039;t hog resources..) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are script events (aka commands or functions)?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A script event is a pre-made object that does something for you, usually to some game item you specify, just when you write it in your code (like &#039;&#039;&#039;$item.eventX();&#039;&#039;&#039; does X to item). Sometimes it wants parameters or arguments to run (the stuff in parentheses) and will give an error if you don&#039;t put the arguments in the parentheses in exactly the way it wants, with the right number of them &amp;amp; right data types, etc. And some of them return values too, especially the &amp;quot;get&amp;quot; functions, which are handed over to a variable (e.g., &#039;&#039;&#039;X = getValue();&#039;&#039;&#039;, now X has the value. If X is an entity, you can even act on X as if it&#039;s the entity itself. Just be sure the data type of X and Value are the same, e.g. float, or string, or entity, etc, or you&#039;ll get an error). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common or useful script events for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all Doom3 and TDM script events are listed on this wiki page [[TDM_Script_Reference]], including the proper syntax (or this page, but it&#039;s down now: [http://www.modwiki.net/wiki/Script_events_%28Doom_3%29]), or also these two files in your Dark Mod folder (open with a text editor): scripts/doom_events.script, scripts/tdm_events.script. Note that TDM has some of its own script events, like setFrobable (in the tdm_events.script list). &lt;br /&gt;
&lt;br /&gt;
A quick short list of common or useful script events good for editing is here: [[Script_Events_User-Friendly_List]], with syntax and description, and including TDM events. It doesn&#039;t list all script events and all details, just common &amp;amp; useful ones for actual mapping IMO. If you want the full list, use the TDM_Script_Reference link I gave above.&lt;br /&gt;
&lt;br /&gt;
== World Building == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way to make caves?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Some tips are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204909] &amp;amp; [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__289484] Instructions for quick-cavern pattern building is here [http://forums.thedarkmod.com/topic/14469-quick-caverns-recipe/page__view__findpost__p__304250]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking roof using clean brushwork, including with an attic inside?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here are descriptions of method that all use a similar trick [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325945], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325944], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__244109]. The trick is to &amp;quot;cut out&amp;quot; a roof from a square brush using the clipper tool. Avoid rotating brushes to make it by hand. Alternatively, use patches over a rectangular under-structure of BSP brushes, although this is not good if you want a portaled attic. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a city area that performs well?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha gave a good method in this post. [http://forums.thedarkmod.com/topic/10003-so-what-are-you-working-on-right-now/page__view__findpost__p__312133]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a forest or a big outdoorsy area?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One good method is making large &amp;quot;rooms&amp;quot; in the shape of a big oval cylinder with very high natural-looking &amp;quot;rocky&amp;quot; &amp;amp; skybox walls and uneven ground using patches, filling it with trees and hiding some of the walls behind trees and greenery (you could also fill it with thick cylinder brushes of different sizes with bark texture to look like more trees, and place branches coming off them or to make a canopy), and possibly filling it with tons of grass (using [[SEED]]) and rocks and streams, with visportaled openings at &amp;quot;kiss points&amp;quot; in the walls to other large oval rooms at different orientations (maybe 2-5 connections per oval) so there&#039;s a dense web of interconnected forested rooms that (sort of) appear to be one big dense forest to the player. Some useful things to use are the [[Object_detail]], [[SEED]], and [[LOD]] systems. See the blueprint for the Thief 2 level Trail of Blood for a rough idea: [http://thief.wikia.com/wiki/T2_M10_Trail_of_Blood?file=T2_m10a_editor_colored.gif]. For good examples in Dark Radiant, look at the construction of mission 3 of No Honor Among Thieves (&amp;quot;No Honor Among Anyone&amp;quot;) and Shadowhide&#039;s slenderman forest map. (Somebody post links to screenshots of those maps in DR, or remind me to.) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make uneven ground?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One method is by burying patches into the ground that stick out and make the ground lumpy as described here [http://forums.thedarkmod.com/topic/13338-newbie-mapper-tip-making-uneven-ground/page__view__findpost__p__274917]. For more encompassing unevenness, you can use much larger patches laid over square caulk brushes underneath that seal the leaf to make the entire ground uneven. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a natural looking road where there isn&#039;t a sharp seam between the road material and grass but a nice fading transition?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the Wiki page for [[Roads]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make curved ceilings and archways?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use patches. Here&#039;s a list of some good tutorials for this sort of thing [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__254764]. Also look at this wiki page [[Patches#Archways]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a way to get good-looking fog in my mission?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are numerous values to make good fog. The setup for the fog from Fidcal&#039;s Heart mission is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__248277].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some tips to making a better looking map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[10_Simple_Tricks_for_Better_Looking_Maps]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good method or plan-of-action for building?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a matter of personal preference, but a method that professionals use is called the &amp;quot;stepwise refinement&amp;quot; method. It means you build the *entire* space of your mission first in rough blocks (so you have it all planned out first), then refine the whole thing in increasingly more detailed steps section by section, leaving the most fine detailing towards the end. It can help to use DR&#039;s Layer system to organize your building by sections too, without other sections interfering. Also, when you&#039;re drawing your map, think about arranging space into winding &amp;quot;rooms&amp;quot; (so there&#039;s no long lines of sight), even outside with tunnels, walls and skybox; and think about visPortal placement right at the start. Also think about the gameplay-performance balance of shadowing-lights &amp;amp; AI when thinking about placing them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I cleanly connect two brush edges meeting together, especially at a diagonal?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__257111]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a method for building very fast &amp;amp; efficiently?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha came up with &amp;quot;modular&amp;quot; approach where you build a few stock modules of architecture that you can combine to make a lot of geometry very quickly and efficiently. Here&#039;s his description: [http://forums.thedarkmod.com/topic/12833-sir-taffsalots-mapping-thread/page__view__findpost__p__290747]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking waterfall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There&#039;s a discussion about this in this thread [http://forums.thedarkmod.com/topic/11901-waterfalls/page__pid__303963#entry303963]. For a small waterfall, a white foamy particle effect raining down by itself looks good. You can copy Bikerdude&#039;s example from St. Alban&#039;s Cathedral. [http://www.youtube.com/watch?v=gIrZDpc1m68]. For a bigger waterfall, people talked about a combination of a flowing vertical water block with the foamy particle effect towards the bottom.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a nice little pond.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[How_to_create_a_pond]]. This thread [http://forums.thedarkmod.com/topic/14647-how-can-i-make-a-realistic-looking-pond/page__view__findpost__p__308916] has discussion on it.&lt;br /&gt;
&lt;br /&gt;
== Patches! ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is it possible to split patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this tutorial on it [[Patch_Splitting_-_Basic_Tutorial]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bend patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the instructions at [[Patches#Bending_Patches.2C_Curves.2C_L-shapes.2C_etc]] (Here&#039;s another small tutorial in a post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__277350].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I want to use a patch to round off a corner.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this part of the Patch wiki page [[Patches#Round_and_Soft]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I make a perfect circle with patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select verts of 4 corners, select the &amp;quot;rotate and scale&amp;quot; tool, and use the value &amp;quot;0.9428&amp;quot; to scale &amp;quot;up&amp;quot; (actually down) in the 2 corresponding axis of the scale tool. See this post [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__279356].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a dome or sphere?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a cone patch and drag down the top vertex to form a dome. Invert the matrix if you want an internal dome or thicken if you want it to be visible inside and out. A sphere is just two of these stuck together. Also tweak the tesselation in patch inspector if it is too chunky. You can have fun with the textures though; try fit. If you totally flatten the dome you have a disc which can produce some nice texture effects, eg, the marble floor centrepiece or a round rug. Drag a side to make it oval. See this post for a picture [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__233107].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you align a texture on a curved patch?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to align properly texture to curved patch like this one in the image [NB: image is missing], divide a brush according to the angle of the patch then use it&#039;s shader for your purpose. ... I made it with one edge is at one end of the curved patch and the other edge is at the other end. It gets distortions without this way.&lt;br /&gt;
&lt;br /&gt;
== Events and SFX ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an earthquake event?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Earthquakes can be done with a speaker. Just use the spawnarg &amp;quot;s_shakes&amp;quot; &amp;quot;1&amp;quot; on the speaker, and the screen will shake violently however loud the sound gets.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I emulate something like a blizzard or dust storm?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Doom3 made a dust storm area, and the same method can be used to make a blizzard, so it&#039;s possible. I&#039;m leaving this here to look up instructions for future reference.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make the screen fade to black (or some other color), or from black back to the game.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Trigger a script with the functions fadeIn [http://www.modwiki.net/wiki/FadeIn_%28script_event%29], fadeOut [http://www.modwiki.net/wiki/FadeOut_%28script_event%29], or FadeTo [http://www.modwiki.net/wiki/FadeTo_%28script_event%29].&lt;br /&gt;
&lt;br /&gt;
== Textures == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a quick way to align textures between two surfaces?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For two brushes, select the first surface, then &#039;&#039;&#039;edit --&amp;gt; copy shader&#039;&#039;&#039;, then click on the second surface and &#039;&#039;&#039;edit --&amp;gt; paste shader&#039;&#039;&#039;. This will seamlessly match the 2nd surface to the texture of the 1st. DR also comes with a useful tool for texture alignment, [[Texture_Tool]], which you bring up with Ctrl+Alt+T. If it&#039;s textures on two patches, you can follow these directions: [http://forums.thedarkmod.com/topic/14034-tutorial-for-road-creation/page__view__findpost__p__294114]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I randomize the position of textures on multiple brushes, e.g., for a row of stairs or pillars all with the same texture that I want to look different?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select multiple faces and in the surface inspector, press the natural button once you set the scale properly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I blend textures?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. This is particularly good for dirtying some textures up by blending in a grime texture. You can blend textures with a custom material file. Link to instructions coming. Also see the entry for [[Basic_Material_File]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How about blending texture transitions so there isn&#039;t a sharp seam, e.g., for a dirt path in grass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; DR comes with grass edge transition decal patches to overlay the hard edges. Read how to set it up here [[Grass_Edges]], or a more detailed tutorial on making roads here [[Roads]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; In NHAT blended terrain was made from patches broken into segments then exported as ASE models. Then the models were vertex painted in Blender and imported back into Dark Radiant. See this tutorial [[DrVertexBlend_(tutorial)]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set the color for some textures (like glowing mushrooms) and make lightbulbs go dark when turned off?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &amp;quot;Colorme&amp;quot; textures allow you to set the color with a spawnarg. So e.g. for colored mushrooms, choose a colorme skin with the spawnarg like &amp;quot;skin&amp;quot; &amp;quot;mushroom_selflit_green_colorme&amp;quot; and choose the color with a spawnarg like &amp;quot;_color&amp;quot; &amp;quot;0.24 0.50 0.40&amp;quot; (where the value is the RGB values you want). For lightbulbs you can trigger a colorme texture switch with the lightswitch (so it switches between &amp;quot;lit up&amp;quot; and &amp;quot;black&amp;quot;). Instructions on that coming.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a fast way to put different textures on a lot of objects?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; 1. Click the mouse wheel on the texture to copy it. 2. To paste it naturally (i.e., in a random position): shift+mousewheel click. 3. To just paste it: ctrl+mousewheel click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can you tile a texture a specific number of times to fit a surface?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to tile a texture a certain number of times, enter the values 1/X and 1/Y (you need to compute them in your head) in the little boxes in the surface inspector, then press &amp;quot;Fit&amp;quot;. It will tile your texture horizontally X times and vertically Y times. You can also enter things like &amp;quot;2&amp;quot; and &amp;quot;1&amp;quot; and get a texture that only occupies half of the width. You can then use the &amp;quot;Right&amp;quot; or &amp;quot;Left&amp;quot; buttons to align it quickly at the ends. Pro-tip: Press CTRL+ALT+T to open the texture tool, it allows super quick aligning of textures on patches. Esp. useful for decals where the decal texture consists of multiple decals.&lt;br /&gt;
&lt;br /&gt;
== Readables &amp;amp; GUIs ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put custom art in a book or scroll, like a picture?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a custom .gui. Here&#039;s a rough idea to get you started [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__263836]. I&#039;ll try to put better instructions in later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger a text message to pop up and say something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create an entity: darkmod &amp;gt; targets &amp;gt; atdm:gui_message and give it the properties/values that you want. Popups will explain each one. You can target it with a triggering entity or trigger it from a script or any other triggering mechanism. An example is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256592]&lt;br /&gt;
&lt;br /&gt;
== Lighting and Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I add music or ambient sounds?&#039;&#039;&#039; &#039;&#039;&#039;Q. Can I dynamically adjust the ambient lighting?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For both of these things, check out the article for [[Location Settings]]&lt;br /&gt;
&lt;br /&gt;
{{editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{tutorial-editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{darkradiant|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up Reverb (EAX) settings for my rooms? (E.g., the echo of a large hall, etc.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create a text file and name it &amp;lt;mapname&amp;gt;.eax; place it in your .pk4 with your .map file; and in it create entries by location name with the values you want for that location. See this wiki entry to see the format &amp;amp; values [[Setting_Reverb_Data_of_Rooms_(EAX)]].&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17346</id>
		<title>Editing FAQ - Troubleshooting &amp; How-To</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Editing_FAQ_-_Troubleshooting_%26_How-To&amp;diff=17346"/>
		<updated>2013-11-09T01:08:04Z</updated>

		<summary type="html">&lt;p&gt;Demagogue: /* World Building */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below are some common issues and questions mappers have had in the Editor&#039;s Guild forum with common solutions. Some of this assumes you&#039;ve already gone through the [[A_-_Z_Beginner_Full_Guide_Start_Here!]], [[Startpack_Mappers&#039;_Guide]], and [[Dark_Radiant_Must_Know_Basic_Intro]]. (If you know a FAQ not here and worth going in this list, and you know the right answer(!), or you can improve an existing answer, please add it if you have edit control or PM it to a team-member if you don&#039;t.) &lt;br /&gt;
&lt;br /&gt;
= Troubleshooting FAQ =&lt;br /&gt;
&lt;br /&gt;
== Rendering &amp;amp; VisPortal Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of my brushes have disappeared or turned black and won&#039;t render.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This can happen when two touching brushes around the seam are not perfectly flush with one another and the rendering hiccups for those brushes &amp;amp; brushes behind it, either there&#039;s a tiny wedge or overlap or gap or weird angle between them. The usual solution is to make sure the brushes are snapped to the grid and perfectly flush against one another, or more generally to simplify the brushwork around the seam of the disappearing brushes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My visportal is not showing up or not closing like it should (you can check this with by typing &amp;quot;r_showportals 1&amp;quot; in the console. The portal edge will show green when open and red when closed.).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A common reason for that is that the two areas separated by the portal are not hermetically sealed and there&#039;s an internal leak, either (1) there may be an unportaled gap between the two, possibly covered up by func_static (which do not seal) or possibly caused by an inadvertent hole created by the first FAQ question above, or (2) an internal leak can happen when all sides of the visportal are not buried in or flush against sealing brushes, and there&#039;s a gap between the visportal and brush, or possibly even a tiny gap just touching the visportal side is enough to break it. A way to check if there&#039;s an internal leak, and locating it if there is, is described here: [[Visportals#Trouble-shooting]]. Other reasons it might fail are also described there (such as accidentally changing a nodraw texture to something else).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I can see other rooms behind a mirror (or any reflective surface) through it, instead of just a reflection.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The area behind a mirror should be in a separate leaf (visportaled area) behind a closed visportal so it doesn&#039;t render. This problem usually means the two areas aren&#039;t in separate leafs, the portal isn&#039;t closed, or there&#039;s an internal leak between the areas in front of and behind the mirror.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Help! I&#039;m having rendering &amp;amp; visPortal issues all over the place ... broken portals, sparkly lines, disappearing brushes, z-fighting, uneven walls, etc.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; As a general piece of advice, messy brushwork leads to trouble one way or another. To keep your brushwork clean: &lt;br /&gt;
* keep snapped to the grid (Ctrl+G toggles) &amp;amp; stay away from small grid levels (Typing a number or Plus/Minus changes the grid scale; 8 is a good starting grid; staying at or above 2 or 4 is fine for most stuff; going below 1 is usually just for special situations). &lt;br /&gt;
* Make brush intersections perfectly flush. &lt;br /&gt;
* Stay away from unnecessary tiny brushes &amp;amp; wedges (leave detail work to func_statics; brushes are for closing off leafs and the void. Of course you can do fine detail work with brushes &amp;amp; convert them to a func_static). &lt;br /&gt;
* Don&#039;t use the &amp;quot;CGS Subtract&amp;quot; tool if it will shatter the brush into tiny slivers; use the cut tool instead (open by pushing &amp;quot;X&amp;quot;). &lt;br /&gt;
* You can use patches for uneven geometry with square brushes underneath textured with caulk. &lt;br /&gt;
* When rotating geometry, avoid weird angles when you can (where vertexes end up off the grid), and for multi-brush structures, build the whole thing first *then* rotate it all together instead of rotating &amp;amp; placing each brush individually. &lt;br /&gt;
These aren&#039;t rules set in concrete if you want to do something special once in a while, but general rules of thumb that will make life a lot easier if you generally stick to them.&lt;br /&gt;
&lt;br /&gt;
== Crashes and Warnings ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map has a leak in it, but a pointfile either isn&#039;t generated or doesn&#039;t make sense. (A pointfile is generated when dmap occurs and there&#039;s a leak, then you open DarkRadient and click File&amp;gt;Pointfile to see it. It normally runs a red line that ends in the void, pointing out the leak).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039;  Make sure a gap isn&#039;t covered up with func_statics. If the origin of a model is in the void it will also cause a leak with a non-sense pointfile. Read more on the [[Leaking maps]] page.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll up through the console output to see what a problem was during dmap or map or in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/Down to scroll through the console.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I&#039;m getting an error message &amp;quot;warning: aas is out of date&amp;quot; once my map has loaded. What does it mean and what do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The AAS is for AI pathfinding. It usually means you changed brushwork and started a map without dmapping first. The solution is to dmap. If you dmap and still get the warning, delete your .aasxx, .proc, and .cm files in the maps folder and dmap again. If you&#039;re still getting a warning, then it could be a sign that something in your map is breaking the AAS pathfinding. Try monsterclipping tricky areas for the AI to path (like around objects and uneven ground) or clean up messy brushwork that might break the dmapping like sliver brushes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have encountered a malloc failure error while dmapping my level. Instead of finishing with the dmap operation, it crashes midway with an error message.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; One solution to this is given in the Dmap wiki entry here: [[Dmap#Malloc_Errors]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; This is what I&#039;ve done to fix this exact issue. Open the map in DarkRadiant, select everything, copy to clipboard. Open another instance of DarkRadiant and paste from clipboard. Save as new filename and dmap new file and that has worked 3 times now with random unresolvable crashes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A3.&#039;&#039;&#039; GC and I have found correlations between visportalling and mAlloc errors. Time to re-arrange your visportals. In NHAT, we had many malloc problems until we retooled how each area was portaled. Originally, every other visleaf had tons of entities, while half had hardly any. That&#039;s not neccessarily bad, but it strains the dmapper when one or two visleafs are cluttered with entities that really bloat your mapname.proc file. We added a few more portals to even out entity distribution, and dmap was happy again.&lt;br /&gt;
&lt;br /&gt;
== Performance Issues ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My map is so slow. How do I improve performance?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See these wiki entry: [[Performance:_Essential_Must-Knows]]. Tips include: &lt;br /&gt;
* Reduce AI [[Pathfinding]] with Monsterclipping helps performance, simplifying complex bumpy surfaces into 1 smooth monsterclipped surface, or excluding entire surfaces AI should never walk on, like detail brushwork or some roofs. &lt;br /&gt;
* Use [[Interleaved_Thinking_optimization]]. Reducing AI think-time helps performance quite a bit. &lt;br /&gt;
* break-up long lines of sight, &lt;br /&gt;
* improve visportal &amp;amp; leaf placement (so less architecture is rendered at a time), &lt;br /&gt;
* use fewer AI, &lt;br /&gt;
* convert ornamental brushwork into func_static, &lt;br /&gt;
* reduce the overlap of light sources on surfaces by adjusting their placement &amp;amp; reducing their light-radius. (Every time a new light hits a surface, it&#039;s another render pass. So 4 lights hitting a surface processes it 4 times. If only 1 light hit it, its lighting is processed in 1/4 the time), and &lt;br /&gt;
* set objects and lights to &amp;quot;noshadow&amp;quot; if it won&#039;t be noticable to the player or affect gameplay (possibly in combination with low-poly shadow meshes or shadowy decals. Note that &amp;quot;noshadow&amp;quot; has two jobs. Put on lights, it means that light will cast no shadows on any object. Put on objects, it means that object will not cast a shadow from any light.) &lt;br /&gt;
&lt;br /&gt;
There are also lots of other tricks out there if you check around the forums, including more advanced &amp;amp; optional tricks such as using the [[LOD]] system or [[SEED]] system, or even crazier tricks (cross-leaf func_statics, skybox architecture, Strombine lighting, Camera Cubemapped Visportal Patches, lots of crazy tricks out there), that you don&#039;t have to worry about if you&#039;re a new mapper but you can ask us about or search for in the forum if you&#039;re curious. Generally speaking there are pros and cons trade-offs between performance &amp;amp; dazzle for many things (like lights or visportal placement); so it&#039;s good to think about the best performance-dazzle balance for your scene. E.g, lots of highpoly brushwork, lights, &amp;amp; AI can look good in a small or medium room, but may not be worth the performance hit in a big courtyard, and try to find ways to get better performance &amp;quot;for free&amp;quot; without the player noticing anything missing, like smart use of noshadows, monsterclips, and interleaved thinking distances.&lt;br /&gt;
&lt;br /&gt;
== Gameplay Issues that Mappers sometimes Overlook ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Below is a list of common gameplay issues that players sometimes complain about and that mappers &amp;amp; testers sometimes overlook or should at least be aware of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Players find it very difficult to frob objects (loot, keys, readables) when the frob distance is set too short or the space is awkward (like in a drawer or up on a wall, etc). In testing, please double-check that every frobable object is easy to frob from a comfortable place, and increase the frob distance if it&#039;s not, erring on the side of more space. (See the question on making frobbing easier under &amp;quot;Handling Objects&amp;quot; below for more information.) &lt;br /&gt;
&lt;br /&gt;
- Objects can get stuck into brushwork while moving them around. &lt;br /&gt;
&lt;br /&gt;
- Players can get stuck in narrow spaces and can&#039;t mantle out, so try to avoid this kind of geometry if possible. &lt;br /&gt;
&lt;br /&gt;
- A very low ceiling can prevent hitting AI with a BJ, so try to avoid it when AI are around. &lt;br /&gt;
&lt;br /&gt;
- Make sure AI have a flee path.  &lt;br /&gt;
&lt;br /&gt;
- Some players would like the ability to drop used keys and other inventory items, done by turning the can_be_dropped property to true, unless for gameplay reasons you don&#039;t want to. &lt;br /&gt;
&lt;br /&gt;
- Some players don&#039;t like long readables that don&#039;t get to the point. At least be conscious of how your readables read to a player.&lt;br /&gt;
&lt;br /&gt;
- Think about how you want to handle non-functioning doors (or other &amp;quot;unnatural&amp;quot; situations like windows that can open) in a way that visually or fairly communicates to the player that something is special about this door or window, but isn&#039;t too immersion breaking either.&lt;br /&gt;
&lt;br /&gt;
== Issues with Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My streetlight, candle, lamp, light-creating object, causes a weird shadow I want to get rid of.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Put the spawnarg &amp;quot;noshadows&amp;quot; &amp;quot;1&amp;quot; on the offending object.&lt;br /&gt;
&lt;br /&gt;
== AI Issues == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My AI will not pass through a visportal no matter how I set up the path nodes.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Check that the sides of the visportal use the nodraw texture (except for the portal-face itself of course).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you get AI to walk on complex terrain patches or func_statics?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can always lay down invisible monsterclip brushes and the AI can walk on it. Overlay with a brush with a &amp;quot;material&amp;quot; clip texture so it causes the right sound for footsteps.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Problems with Patches ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I have 2 curved patches and they&#039;re not aligning. What do I do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. My patch is rendering strangely, like fractured into slivers.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki page [[Patch_Troubleshooter]].&lt;br /&gt;
&lt;br /&gt;
== Issues with Lighting &amp;amp; Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Some of the parallel lights I use for moonlight aren&#039;t giving off any light.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a known problem with parallel lights. For some reason in some arrangements you get no light at all. Just fiddle with it a bit - move it slightly, change the radii, move the vertex a bit - and it should suddenly work. Once you&#039;ve got it working then it&#039;s stable. Likely the code chokes on certain values in its calculations. ... Also, to help optimize your moonlight, you should adjust the radius so it&#039;s only as big as it needs to be. You may also want to move the actual position of the little moon cube in the skybox to match the parallel light (and make sure to fix the texture on it if you mess it up - hint: lock textures before moving cube to make it easy)&lt;br /&gt;
&lt;br /&gt;
= General How-To Editing FAQ =&lt;br /&gt;
&lt;br /&gt;
== Dark Radient Questions == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I see all the default properties already on an object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; In the entity inspector there&#039;s a checkbox near the top that says &amp;quot;Show Inherited Properties&amp;quot;. Click that box.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some basic units, scales, limits, maxs, and mins of various things when editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all these things is here: [[Limits,_Max,_Min,_Stats,_etc]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I manipulate brushes to resize and reshape them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. In DarkRadient you can select a brush and push &amp;quot;V&amp;quot; to select verticies to drag and resize, &amp;quot;E&amp;quot; to select edge(s) to drag and resize, and &amp;quot;F&amp;quot; to select face(s) to drag and resize. &amp;quot;Ctrl+#&amp;quot; makes a selected brush be #-sided. You can also use the Brush&amp;gt;Prism and Brush&amp;gt;Cone to convert a brush to those shapes. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common DR shortcut commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &lt;br /&gt;
* &amp;quot;H&amp;quot; hides selected items. &lt;br /&gt;
* &amp;quot;I&amp;quot; inverts selected. &lt;br /&gt;
* &amp;quot;Ctrl+I&amp;quot; inverts a patch&#039;s normal. &lt;br /&gt;
* &amp;quot;J&amp;quot; brings up entity list. &lt;br /&gt;
* &amp;quot;Ctrl+K&amp;quot; makes 1st-selected-entity &amp;quot;target&amp;quot; 2nd-selected-entity. &lt;br /&gt;
* &amp;quot;L&amp;quot; brings up light inspector. &lt;br /&gt;
* &amp;quot;Ctrl+L&amp;quot; brings up the Layers menu. &lt;br /&gt;
* &amp;quot;N&amp;quot; brings up entity inspector. &lt;br /&gt;
* &amp;quot;T&amp;quot; brings up texture browser. &lt;br /&gt;
* &amp;quot;X&amp;quot; go into clipper mode. &lt;br /&gt;
* Brush manipulation modes: are &amp;quot;R&amp;quot; rotate brush, &amp;quot;Q&amp;quot; free-move &amp;amp; resize, &amp;quot;W&amp;quot; translate-move.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make my own shortcut key commands?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Under the Edit menu, at the bottom is &amp;quot;Keyboard Shortcuts&amp;quot; which allows you to set your own shortcuts.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I screwed something up! What do I do?!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Ctrl+Z undos. Ctrl+Y redos.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is there a way to organize &amp;amp; simplify building, so I can build one section at a time without other sections getting in the way?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; DR has a [[Layers]] function that lets you build one &amp;quot;layer&amp;quot; at a time (open with ctrl+L or View&amp;gt;Layers). It also improves DR performance, which is handy as the map gets bigger.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up things like the pre-game shop, the player inventory, and an in-game map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; All these things are described in the Startpack Mappers&#039; Guide: [[Startpack_Mappers&#039;_Guide#Ammo.2C_Weapons.2C_Player_Tools.2C_Start_Inventory]], [[Startpack_Mappers&#039;_Guide#Purchase_Shop]], [[Startpack_Mappers&#039;_Guide#Adding_an_In-game_Map_to_your_FM]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put spawnargs on def_attached entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can put spawnargs on def_attached entities by using the spawnarg &amp;quot;set SPAWNARGNAME on ATTACHMENTNAME&amp;quot; &amp;quot;value&amp;quot; on the base entity. Here&#039;s an example of setting a color property on a flame attachment to a torch &amp;quot;set _color on flame&amp;quot; &amp;quot;0.2 0.2 0.9&amp;quot;. Read more here [[Combined_light_entities#Setting_spawnargs]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s an easy way to find materials in DR?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Tip to help find materials in Dark Radiant&#039;s materials browser: &lt;br /&gt;
# Point to Textures (or any tree). &lt;br /&gt;
# Shift + Right key to fully open the tree. &lt;br /&gt;
# Type the key letters of what you want to find. &lt;br /&gt;
# Up/down arrows to go to next/previous occurrence. &lt;br /&gt;
# Esc to get out of input field. &lt;br /&gt;
Oh yeah, avoid F3 because that is likely to switch to render mode which in my case crashes DR (but may not if the map is small).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an N-sided brush?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A quick way to make an N-sided brush is to highlight the brush and push cntl+N (N being the number of sides for the top face). So if you want a 5-sided brush, highlight it and push cntl+5. But the best way to get the walls of a multi-sided brush to line up seamlessly is still to use the clipper-tool and precisely cut off a slice. (And don&#039;t use CSG Subtract unless you know what you&#039;re doing and aren&#039;t creating a million splinters!)&lt;br /&gt;
&lt;br /&gt;
== Console Questions ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I open the console?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Open the console with ctrl+alt+~ in a normal game, and just ~ when playing through &amp;quot;map&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I scroll through the console output?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use the mouse wheel or PageUp/PageDown.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q.What&#039;s a list of all the Doom3 Console Commands and CVars?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all commands &amp;amp; Cvars is here [http://www.doomwadstation.com/doom3/console/]. Darkmod Cvars are listed here [[Cvars_in_The_Dark_Mod]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some *useful* console commands and cvars for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here&#039;s one list: [[Console_Useful_Controls]]. Here&#039;s a list more tailored to mapping: &lt;br /&gt;
&lt;br /&gt;
Commands: &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;dmap &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; compiles a map, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;give &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; gives the player an item, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;god&#039;&#039;&#039;&amp;quot; player cannot be harmed,&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;killmonsters&#039;&#039;&#039;&amp;quot; takes out all AI&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;map &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; loads a map to play, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;noclip&#039;&#039;&#039;&amp;quot; lets the player go through objects and walls, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;notarget&#039;&#039;&#039;&amp;quot; let&#039;s the player be invisible to AI, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadDecls&#039;&#039;&#039;&amp;quot; will reload material defs without having to re-start TDM, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadimages&#039;&#039;&#039;&amp;quot; does the same for lights and &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;reloadSurface&#039;&#039;&#039;&amp;quot; for surfaces, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;saveRagdolls&#039;&#039;&#039;&amp;quot; saves the positions of all ragdolls to the .map file (see the FAQ under Handling AI), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;teleport &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; teleports the player to an entity. &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;tdm_show_loot&#039;&#039;&#039;&amp;quot; Shows loot.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;spawn &amp;lt;name&amp;gt;&#039;&#039;&#039;&amp;quot; spawns an entity: &lt;br /&gt;
 spawn atdm:weapon_blackjack&lt;br /&gt;
 spawn atdm:weapon_shortsword&lt;br /&gt;
 spawn atdm:ammo_broadhead&lt;br /&gt;
 spawn atdm:ammo_firearrow&lt;br /&gt;
 spawn atdm:ammo_gasarrow&lt;br /&gt;
 spawn atdm:ammo_mossarrow&lt;br /&gt;
 spawn atdm:ammo_noisemaker&lt;br /&gt;
 spawn atdm:ammo_ropearrow&lt;br /&gt;
 spawn atdm:ammo_waterarrow&lt;br /&gt;
 Append &amp;quot;inv_ammo_amount 50&amp;quot; to any of the above to spawn 50 arrows at once: spawn atdm:ammo_broadhead inv_ammo_amount 50&lt;br /&gt;
Cvars (1 turns on, 0 turns off, unless otherwise noted): &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;com_showFPS 1&#039;&#039;&#039;&amp;quot;, &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showLightCount 1&#039;&#039;&#039;&amp;quot; (colors shows the number of lights hitting a surface, black = 0, red = 1, blue = 2... etc), &lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showPortals 1&#039;&#039;&#039;&amp;quot; (red=closed,green=open) If your portals dont show up they are most likely not sealing.&lt;br /&gt;
 &amp;quot;&#039;&#039;&#039;r_showTris n&#039;&#039;&#039;&amp;quot; (n=1) Shows tris rendered directly, (n=2) shows overdrawn tri&#039;s, (n=3) shows all tri&#039;s, direct and indirect.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a put-object-here objective?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182924]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up a &amp;quot;ghosting&amp;quot; objective (e.g., you are busted if you are seen.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204695]&lt;br /&gt;
&lt;br /&gt;
== Handling Objects == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a door handle to a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Just position the handle and input &amp;quot;bind&amp;quot; and the door entity ID/name as a spawnarg. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object into loot?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__182921]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an entity frobable?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the entry for [[Making an Entity frobable]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Ok it&#039;s frobable, but doesn&#039;t fall or move. How do I make an entity act like a world object?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You need to make the object a moveable, see [[Moveables]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I get a lever or button to open a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__212036]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put some text on a sign or wall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can use this method [http://forums.thedarkmod.com/topic/11159-add-text-to-your-signs-signposts-walls-etc/]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bind something to a rope (like a body) so it doesn&#039;t fall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Dynamic ropes are unreliable, so it&#039;s good to use a func_static like a chain or make a func_static rope from a cylinder brush. For a ragdoll, place the ragdoll so he clips into the func_static. You need to bind the ragdoll to the chain (so the spawnarg is on the ragdoll), with &amp;quot;bind&amp;quot; &amp;quot;func_static_...&amp;quot;, where func_static_... is the chain. Or, through DR, you can just select the entity you want to attach (the ragdoll), then also select the thing you want to attach it to (the chain), and in the menus select &amp;quot;Entity&amp;quot; - &amp;quot;Bind selected entities&amp;quot;. But it&#039;s been reported the clipping does the job, not binding. See this link [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__221262]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make something switch from frobable to unfrobable like a used lever, or unfrobable to frobable like contents in a chest or drawer you don&#039;t want frobable until it&#039;s open?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a brush around the object with a clip texture and convert it to an atdm:target_set_frobable entity, with the property &amp;quot;start_frobable&amp;quot; 1 or 0 (which mean true or false) depending on your case (it affects everything inside), and a triggering entity, such as the lever or the chest itself, that targets the set_frobable entity that triggers the switch when it&#039;s frobbed. For the record, you can also switch the frobability of an object in a script with the command: &#039;&#039;&#039;$&amp;lt;entityname&amp;gt;.setFrobable(n);&#039;&#039;&#039;, where n is &amp;quot;1&amp;quot; to make it frobable and &amp;quot;0&amp;quot; for unfrobable.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make breakable glass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__222734]. You basically convert your glass brush to a func_fracture entity and set the &amp;quot;health&amp;quot; spawnarg to the value you want the glass to break at. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about an object that gets increasingly damaged-looking as you hit it?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a func_damagable entity, which replaces its model and/or shader with increasingly &amp;quot;damaged&amp;quot; versions (as many stages as you like) when its health goes below the threshold you set with the &amp;quot;health&amp;quot; spawnarg, and you can use &amp;quot;target&amp;quot; to trigger something when damage occurs (such as a sound effect or event). See here for details on the spawnargs involved in setting it up: [http://www.modwiki.net/wiki/Func_damagable_(entity)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an object that you can frob and it does something or something happens?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; If it&#039;s an object you made from patches or brushes, make it into a frobable func_static, or if it&#039;s already a func_static, make sure it&#039;s frobable ([[Making an Entity frobable]]). Then give it a Frob response whose effect is a trigger, and give it a &amp;quot;target&amp;quot; spawnarg to the entity that causes your effect when triggered.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can a lever or button target multiple entities?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes! Use the spawnargs &amp;quot;target1&amp;quot;, &amp;quot;target2&amp;quot;, &amp;quot;target3&amp;quot;, etc, with each entity-target as a value. A quicker way is to use the keyboard shortcut Ctrl+K. Select the button or lever, then select the target-entity and hit Ctrl+K. De-select the target-entity then select the next one, hit Ctrl+K again. Each time adds a new target to the switch. (Many other spawnargs allow you to have multiple entries by numbering them, such as bind and def_attach.)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a rotating entity, like a fan?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__242385]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make objects non-solid so they still render but the player can walk through them?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Add the spawnarg: noclipmodel 1 to turn them into non-solids.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a firefly or will-o-wisp, basically a glowing ball that floats around?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a rough explanation to help you get started. A firefly is a func_emitter. Click the model property then use the button bottom right to select a suitable particle effect, possibly tdm_glare_lamp_01.prt. Bind to something invisible that will move it along a path, typically a func_mover with nurb curves used as the path. A tutorial for setting up nurb curves is here [http://www.doom3world.org/phpbb2/viewtopic.php?t=5123].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an event from something in the player&#039;s inventory?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; give the object a &amp;quot;target&amp;quot; to trigger and also the property/value: scriptobject InvTriggerScript. If your object does not already go in the inventory then use the entity: items &amp;gt; custom &amp;gt; atdm:moveable_custom_item. If you get a collision model error then ask on the forums for help (or read the wiki entry for [[Moveables]]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport an entity?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use targets/atdm:teleport. See this wiki page [[Teleporting_entities]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom inventory item with its own inventory icon graphic?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this entry [[A_-_Z_Beginner_Full_Guide_Page_6#Special_Items]] for setting the inventory category, loot type, inventory name and inventory icon. To repeat the instructions for a custom icon: on the object put the property &amp;quot;inv_icon&amp;quot; with a value &amp;quot;guis/assets/hud/inventory_icons/&amp;lt;name&amp;gt;.tga&amp;quot; (substitute whatever name you gave it for &amp;lt;name&amp;gt;), and package your .pk4 to put your image file in that relative location. You can also see other inventory_icons there and can use an existing one, or package your .pk4 to replace an existing one with your custom one. A method for making an inventory icon is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__259172] (be sure to use an alpha channel to make the background transparent, tutorial: [http://www.axialis.com/tutorials/tutorial-misc001.html]).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do make an object that&#039;s hard to frob easier to frob?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One easy way is to add this property: frobbox_size 5. If it&#039;s still hard, see this post for other things you can do. [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__228245]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a candle you can pinch to go out?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I made a bunch of pinchable non-moveable candles into my WIP like this: &lt;br /&gt;
# Make a func_static candlestick. place light source entity candleflame on it. &lt;br /&gt;
# Give the candlestick &amp;quot;frobable 1.&amp;quot; &lt;br /&gt;
# Give the candlestick S&amp;amp;R response frob, extinguish light and candleflame name. &lt;br /&gt;
# You can optionally add another response frob to trigger a speaker with a &amp;quot;snuff&amp;quot; sound effect. &lt;br /&gt;
# Done.&lt;br /&gt;
You can copy the entity bunch around and all the params should update correctly for the new replica. Frobbing will not relight it: the player needs to relit them with a flame source.&lt;br /&gt;
&lt;br /&gt;
== Handling AI == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make sure a guard can unlock a door?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are a few different ways, explained here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__217915]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I attach a key or purse to an AI&#039;s belt, or similar kinds of attachments?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; The easiest way is with &amp;quot;bind&amp;quot;. Place the key or purse around the belt area where you want it, sticking a little farther out than usual, and rotate it as desired. On the key add the property &amp;quot;bind&amp;quot; with the value of the AI&#039;s entity-ID or name, then the property &amp;quot;bindToJoint&amp;quot; with the value &amp;quot;leftHips_dummy&amp;quot; or &amp;quot;rightHips_dummy&amp;quot; as needed. For attaching things in other places (like a ring or hat or necklace), it&#039;s the same general principle but you should look up the joint to attach to. A list of all the joint names is here: [[BindToJoint]]. See this wiki entry for more info [[Attaching_Items]]. For another method using def_attach see [[Attaching_Props_to_AI]], and this post for an example of the spawnargs involved [http://forums.thedarkmod.com/topic/13084-ai-attach-keys/page__view__findpost__p__276064]. The issue with def_attach is that the attached thing spawns at its own rotation angle, which might not look great and is tricky to change (if you insist, see [[AI_Attachment_Ingame_Editing]] and [[Cvars_in_The_Dark_Mod#Attachment_related]]). With bind you just place and &amp;quot;bind&amp;quot;, and it stays where you put it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What about other kinds of attachments where special animations are involved, like torches and weapons?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For these you want to use Def_Attach. See this wiki entry [[Attaching_Props_to_AI]]. For heads &amp;amp; weapons specifically see this wiki entry [[Adding_Heads_and_Weapons_to_AI]]. (You can set spawnargs on the def_attached entities with the method described here [[Combined_light_entities#Setting_spawnargs]].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I mute an AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Give the AI the spawnarg: def_vocal_set atdm:ai_vocal_set_mute. If you only want to mute some barks, you&#039;ll have to modify the AI&#039;s .def file by hand, taking or commenting out the barks you don&#039;t want, and packaging the new def file in your mission&#039;s pk4. For coughing and animation based barks, see this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__224558]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I hide an AI until I trigger him?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; No, the spawnarg &amp;quot;hide&amp;quot; doesn&#039;t work well with AI (they&#039;re made invisible, but still audibly there). Put the AI in a blueroom and use a teleport instead, or a teleporting script command. See the wiki entry for [[Teleporting_entities]]. Note, after teleporting an AI, pathing becomes a problem for it. See this post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__280818] and the previous posts on this issue to make sure the AI can path properly after a teleport. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I manage AI teams, who is a friend, enemy and neutral?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To set the teams, see [[Relations]]. If you want to trigger a change in team with a script, see [[AI_Relations_(Scripting)]]. Another method to switch AI teams using S&amp;amp;R (stim &amp;amp; response) is described here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256126] and see the entry [[Stim/Response]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI play an animation when I want?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Instructions are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__253169]. There may be other ways possible.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set or change the health of AI?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; AI use the spawnarg &amp;quot;health&amp;quot; to set their hit points. To change it in-game, use a script and the function &amp;quot;setHealth&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I pose ragdolls so they look naturally placed?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Save a backup, pose all the ragdolls in-game, then use the console command saveRagdolls which saves their positions to the .map file. cf. [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__265650].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a scene of AI playing cards?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Probably the easiest thing to do is load the prefab (under AI), place it, and adjust it how you want.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI frob something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; To get an AI to frob something, eg, a lever (doesn&#039;t work to pick up and carry) create a path_interact entity. You can include it in a normal pathing patrol. Give it these 2 spawnargs: ent &amp;lt;name of entity you want the AI to frob&amp;gt;; target &amp;lt;next path entity (if any)&amp;gt;. Note that the AI won&#039;t walk to this entity; you have to use a path_corner to get him where you want then target to the path_interact to get him to frob.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make an AI catch fire?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can bind some unlit fires to an NPC (like a zombie) and shoot it when a fire arrow, he&#039;ll erupt in flames, but the flames won&#039;t damage him. You could also light him with a candle. I&#039;d bet theres some way to make that actually kill the creature, or at least cause it damage. ... One improvement suggestion: When the the light gets the fire stim, target a trigger multiple, which delays for a 120-240 seconds and then turns the fire off. You could make the fire damaging by starting a trigger timer which applies the stim damage to the target every few seconds. Remember to switch off the timer when the flames are doused.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I keep an AI ragdoll from sinking into the bed model, e.g., if he&#039;s KO&#039;d?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; I found one way to keep [an unconscious/dead ragdoll body] from sinking into the model below it is to use a platform of nodraw_solid underneath the body. You should be able to place such a brush within the bed model and test it with a ragdoll on the bed. Adjust it&#039;s top surface height until the body lays just on top of the bed (then delete the ragdoll)... then a blackjacked AI should be able to stay on top of the bed like the ragdoll did.&lt;br /&gt;
&lt;br /&gt;
== The Player == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I do things with the player&#039;s inventory, like trigger an inventory item to be deleted, or an item to be added to the inventory, or one item being replaced with another item?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; You can do all these things with a script (read [[A_Beginner&#039;s_Guide_to_Scripting]] and the scripting FAQ below to learn about scripting). Have your triggering mechanism trigger a target_callscriptfunction entity which calls a custom script, then use the appropriate script command in the script on $player1. A list of the commands is here [[Inventory#Scriptsupport]]. &lt;br /&gt;
Useful commands are (replacing the &amp;quot;Item&amp;quot; variables with the item ID): &lt;br /&gt;
* &#039;&#039;&#039;$player1.addInvItem(inv_item);&#039;&#039;&#039; and &lt;br /&gt;
* &#039;&#039;&#039;$player1.replaceInvItem(oldItem, newItem);&#039;&#039;&#039; (note: If &amp;lt;newItem&amp;gt; is the $null_entity, &amp;lt;oldItem&amp;gt; is just removed and no replacement happens.) &lt;br /&gt;
For example, to remove a key from the player&#039;s inventory, use a command like: &#039;&#039;&#039;$player1.replaceInvItem ($key, $null_entity);&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I teleport the player?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use base &amp;gt; info_player_teleport. Give it the spawnarg and value: target info_player_start_1. Give it the spawnarg: angle with a value if you want to force the player to turn to face a particular direction.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I simulate a crawl for the player to pass under things like tables that he couldn&#039;t normally do?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__229174]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a custom script?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; First read [[A_Beginner&#039;s_Guide_to_Scripting]], [[Scripting_basics]], and [[My_first_map_script]] to learn the basics of scripting. You write a custom script as a text file named &amp;lt;mapname&amp;gt;.script and packaged in your .pk4 in the same place as your .map file. Inside it you make your own script object in the format the Beginner&#039;s Guide gives you, usually looking like &#039;&#039;&#039;void MyScript() { code goes here }&#039;&#039;&#039;. Then the game can &amp;quot;call&amp;quot; &amp;quot;threads&amp;quot; of that &amp;quot;script object&amp;quot; that will run until they end or are killed, so you can have more than one thread running of the same object concurrently. If you want multiple script objects, put them all in your &amp;lt;mapname&amp;gt;.script file and the game-engine will find them. You run scripts by the object name, not the file name. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I run a script in-game?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A few common ways of calling a script object thread in-game are &lt;br /&gt;
# creating a target_callscriptfunction entity with the spawnarg: &amp;quot;call&amp;quot; &amp;quot;&amp;lt;name of your script object&amp;gt;&amp;quot;, then creating some other entity (such as a button or trigger brush) that &amp;quot;targets&amp;quot; that entity; &lt;br /&gt;
# creating a button with the property &amp;quot;state_change_callback&amp;quot; &amp;quot;&amp;lt;script object&amp;gt;&amp;quot;, which runs the script when pushed or triggered, &lt;br /&gt;
# Using [[Location_Settings#Script_calls]] to call a script when you enter or leave a location; &lt;br /&gt;
# triggering a script with the [[Objectives_Editor]] when you fulfill or fail an objective (possibly a hidden objective only for triggering the script); &lt;br /&gt;
# A script can call another thread in itself with the &amp;quot;thread&amp;quot; function; see the command in the link below. &lt;br /&gt;
# An entity can call a script when it spawns. Add a property/value either in the .def file or as a spawnarg on the entity: &amp;quot;ScriptEvent void &amp;lt;script object&amp;gt;(&amp;lt;parameters&amp;gt;);&amp;quot;. &lt;br /&gt;
# The script &amp;quot;void main();&amp;quot; is always called at game start. So if you add code under that heading in your script file, it will run at game start. &lt;br /&gt;
There are other methods too. (Note, if you call a persistent script, i.e., it runs all game, be especially sure to avoid performance hits, or make it non-persistent if possible, that is, you &amp;quot;kill&amp;quot; it at some point in the game so it doesn&#039;t hog resources..) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are script events (aka commands or functions)?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A script event is a pre-made object that does something for you, usually to some game item you specify, just when you write it in your code (like &#039;&#039;&#039;$item.eventX();&#039;&#039;&#039; does X to item). Sometimes it wants parameters or arguments to run (the stuff in parentheses) and will give an error if you don&#039;t put the arguments in the parentheses in exactly the way it wants, with the right number of them &amp;amp; right data types, etc. And some of them return values too, especially the &amp;quot;get&amp;quot; functions, which are handed over to a variable (e.g., &#039;&#039;&#039;X = getValue();&#039;&#039;&#039;, now X has the value. If X is an entity, you can even act on X as if it&#039;s the entity itself. Just be sure the data type of X and Value are the same, e.g. float, or string, or entity, etc, or you&#039;ll get an error). &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some common or useful script events for editing?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; A list of all Doom3 and TDM script events are listed on this wiki page [[TDM_Script_Reference]], including the proper syntax (or this page, but it&#039;s down now: [http://www.modwiki.net/wiki/Script_events_%28Doom_3%29]), or also these two files in your Dark Mod folder (open with a text editor): scripts/doom_events.script, scripts/tdm_events.script. Note that TDM has some of its own script events, like setFrobable (in the tdm_events.script list). &lt;br /&gt;
&lt;br /&gt;
A quick short list of common or useful script events good for editing is here: [[Script_Events_User-Friendly_List]], with syntax and description, and including TDM events. It doesn&#039;t list all script events and all details, just common &amp;amp; useful ones for actual mapping IMO. If you want the full list, use the TDM_Script_Reference link I gave above.&lt;br /&gt;
&lt;br /&gt;
== World Building == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way to make caves?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Some tips are here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__204909] &amp;amp; [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__289484] Instructions for quick-cavern pattern building is here [http://forums.thedarkmod.com/topic/14469-quick-caverns-recipe/page__view__findpost__p__304250]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking roof using clean brushwork, including with an attic inside?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Here are descriptions of method that all use a similar trick [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325945], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__325944], [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__244109]. The trick is to &amp;quot;cut out&amp;quot; a roof from a square brush using the clipper tool. Avoid rotating brushes to make it by hand. Alternatively, use patches over a rectangular under-structure of BSP brushes, although this is not good if you want a portaled attic. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a city area that performs well?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha gave a good method in this post. [http://forums.thedarkmod.com/topic/10003-so-what-are-you-working-on-right-now/page__view__findpost__p__312133]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good way for making a forest or a big outdoorsy area?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One good method is making large &amp;quot;rooms&amp;quot; in the shape of a big oval cylinder with very high natural-looking &amp;quot;rocky&amp;quot; &amp;amp; skybox walls and uneven ground using patches, filling it with trees and hiding some of the walls behind trees and greenery (you could also fill it with thick cylinder brushes of different sizes with bark texture to look like more trees, and place branches coming off them or to make a canopy), and possibly filling it with tons of grass (using [[SEED]]) and rocks and streams, with visportaled openings at &amp;quot;kiss points&amp;quot; in the walls to other large oval rooms at different orientations (maybe 2-5 connections per oval) so there&#039;s a dense web of interconnected forested rooms that (sort of) appear to be one big dense forest to the player. Some useful things to use are the [[Object_detail]], [[SEED]], and [[LOD]] systems. See the blueprint for the Thief 2 level Trail of Blood for a rough idea: [http://thief.wikia.com/wiki/T2_M10_Trail_of_Blood?file=T2_m10a_editor_colored.gif]. For good examples in Dark Radiant, look at the construction of mission 3 of No Honor Among Thieves (&amp;quot;No Honor Among Anyone&amp;quot;) and Shadowhide&#039;s slenderman forest map. (Somebody post links to screenshots of those maps in DR, or remind me to.) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make uneven ground?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; One method is by burying patches into the ground that stick out and make the ground lumpy as described here [http://forums.thedarkmod.com/topic/13338-newbie-mapper-tip-making-uneven-ground/page__view__findpost__p__274917]. For more encompassing unevenness, you can use much larger patches laid over square caulk brushes underneath that seal the leaf to make the entire ground uneven. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a natural looking road where there isn&#039;t a sharp seam between the road material and grass but a nice fading transition?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the Wiki page for [[Roads]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make curved ceilings and archways?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use patches. Here&#039;s a list of some good tutorials for this sort of thing [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__254764]. Also look at this wiki page [[Patches#Archways]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a way to get good-looking fog in my mission?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There are numerous values to make good fog. The setup for the fog from Fidcal&#039;s Heart mission is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__248277].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What are some tips to making a better looking map?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[10_Simple_Tricks_for_Better_Looking_Maps]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a good method or plan-of-action for building?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; This is a matter of personal preference, but a method that professionals use is called the &amp;quot;stepwise refinement&amp;quot; method. It means you build the *entire* space of your mission first in rough blocks (so you have it all planned out first), then refine the whole thing in increasingly more detailed steps section by section, leaving the most fine detailing towards the end. It can help to use DR&#039;s Layer system to organize your building by sections too, without other sections interfering. Also, when you&#039;re drawing your map, think about arranging space into winding &amp;quot;rooms&amp;quot; (so there&#039;s no long lines of sight), even outside with tunnels, walls and skybox; and think about visPortal placement right at the start. Also think about the gameplay-performance balance of shadowing-lights &amp;amp; AI when thinking about placing them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I cleanly connect two brush edges meeting together, especially at a diagonal?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this post [[http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__257111]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a method for building very fast &amp;amp; efficiently?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Sotha came up with &amp;quot;modular&amp;quot; approach where you build a few stock modules of architecture that you can combine to make a lot of geometry very quickly and efficiently. Here&#039;s his description: [http://forums.thedarkmod.com/topic/12833-sir-taffsalots-mapping-thread/page__view__findpost__p__290747]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a good looking waterfall?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; There&#039;s a discussion about this in this thread [http://forums.thedarkmod.com/topic/11901-waterfalls/page__pid__303963#entry303963]. For a small waterfall, a white foamy particle effect raining down by itself looks good. You can copy Bikerdude&#039;s example from St. Alban&#039;s Cathedral. [http://www.youtube.com/watch?v=gIrZDpc1m68]. For a bigger waterfall, people talked about a combination of a flowing vertical water block with the foamy particle effect towards the bottom.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a nice little pond.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this wiki entry [[How_to_create_a_pond]]. This thread [http://forums.thedarkmod.com/topic/14647-how-can-i-make-a-realistic-looking-pond/page__view__findpost__p__308916] has discussion on it.&lt;br /&gt;
&lt;br /&gt;
== Patches! ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Is it possible to split patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this tutorial on it [[Patch_Splitting_-_Basic_Tutorial]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I bend patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See the instructions at [[Patches#Bending_Patches.2C_Curves.2C_L-shapes.2C_etc]] (Here&#039;s another small tutorial in a post [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__277350].)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. I want to use a patch to round off a corner.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; See this part of the Patch wiki page [[Patches#Round_and_Soft]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How can I make a perfect circle with patches?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select verts of 4 corners, select the &amp;quot;rotate and scale&amp;quot; tool, and use the value &amp;quot;0.9428&amp;quot; to scale &amp;quot;up&amp;quot; (actually down) in the 2 corresponding axis of the scale tool. See this post [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__279356].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make a dome or sphere?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Make a cone patch and drag down the top vertex to form a dome. Invert the matrix if you want an internal dome or thicken if you want it to be visible inside and out. A sphere is just two of these stuck together. Also tweak the tesselation in patch inspector if it is too chunky. You can have fun with the textures though; try fit. If you totally flatten the dome you have a disc which can produce some nice texture effects, eg, the marble floor centrepiece or a round rug. Drag a side to make it oval. See this post for a picture [http://forums.thedarkmod.com/topic/11570-editing-tip-of-the-day/page__view__findpost__p__233107].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do you align a texture on a curved patch?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to align properly texture to curved patch like this one in the image [NB: image is missing], divide a brush according to the angle of the patch then use it&#039;s shader for your purpose. ... I made it with one edge is at one end of the curved patch and the other edge is at the other end. It gets distortions without this way.&lt;br /&gt;
&lt;br /&gt;
== Events and SFX ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger an earthquake event?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Earthquakes can be done with a speaker. Just use the spawnarg &amp;quot;s_shakes&amp;quot; &amp;quot;1&amp;quot; on the speaker, and the screen will shake violently however loud the sound gets.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I emulate something like a blizzard or dust storm?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Doom3 made a dust storm area, and the same method can be used to make a blizzard, so it&#039;s possible. I&#039;m leaving this here to look up instructions for future reference.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I make the screen fade to black (or some other color), or from black back to the game.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Trigger a script with the functions fadeIn [http://www.modwiki.net/wiki/FadeIn_%28script_event%29], fadeOut [http://www.modwiki.net/wiki/FadeOut_%28script_event%29], or FadeTo [http://www.modwiki.net/wiki/FadeTo_%28script_event%29].&lt;br /&gt;
&lt;br /&gt;
== Textures == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a quick way to align textures between two surfaces?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For two brushes, select the first surface, then &#039;&#039;&#039;edit --&amp;gt; copy shader&#039;&#039;&#039;, then click on the second surface and &#039;&#039;&#039;edit --&amp;gt; paste shader&#039;&#039;&#039;. This will seamlessly match the 2nd surface to the texture of the 1st. DR also comes with a useful tool for texture alignment, [[Texture_Tool]], which you bring up with Ctrl+Alt+T. If it&#039;s textures on two patches, you can follow these directions: [http://forums.thedarkmod.com/topic/14034-tutorial-for-road-creation/page__view__findpost__p__294114]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I randomize the position of textures on multiple brushes, e.g., for a row of stairs or pillars all with the same texture that I want to look different?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Select multiple faces and in the surface inspector, press the natural button once you set the scale properly.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can I blend textures?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Yes. This is particularly good for dirtying some textures up by blending in a grime texture. You can blend textures with a custom material file. Link to instructions coming. Also see the entry for [[Basic_Material_File]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How about blending texture transitions so there isn&#039;t a sharp seam, e.g., for a dirt path in grass?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A1.&#039;&#039;&#039; DR comes with grass edge transition decal patches to overlay the hard edges. Read how to set it up here [[Grass_Edges]], or a more detailed tutorial on making roads here [[Roads]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A2.&#039;&#039;&#039; In NHAT blended terrain was made from patches broken into segments then exported as ASE models. Then the models were vertex painted in Blender and imported back into Dark Radiant. See this tutorial [[DrVertexBlend_(tutorial)]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set the color for some textures (like glowing mushrooms) and make lightbulbs go dark when turned off?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; &amp;quot;Colorme&amp;quot; textures allow you to set the color with a spawnarg. So e.g. for colored mushrooms, choose a colorme skin with the spawnarg like &amp;quot;skin&amp;quot; &amp;quot;mushroom_selflit_green_colorme&amp;quot; and choose the color with a spawnarg like &amp;quot;_color&amp;quot; &amp;quot;0.24 0.50 0.40&amp;quot; (where the value is the RGB values you want). For lightbulbs you can trigger a colorme texture switch with the lightswitch (so it switches between &amp;quot;lit up&amp;quot; and &amp;quot;black&amp;quot;). Instructions on that coming.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. What&#039;s a fast way to put different textures on a lot of objects?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; 1. Click the mouse wheel on the texture to copy it. 2. To paste it naturally (i.e., in a random position): shift+mousewheel click. 3. To just paste it: ctrl+mousewheel click.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. Can you tile a texture a specific number of times to fit a surface?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; When you want to tile a texture a certain number of times, enter the values 1/X and 1/Y (you need to compute them in your head) in the little boxes in the surface inspector, then press &amp;quot;Fit&amp;quot;. It will tile your texture horizontally X times and vertically Y times. You can also enter things like &amp;quot;2&amp;quot; and &amp;quot;1&amp;quot; and get a texture that only occupies half of the width. You can then use the &amp;quot;Right&amp;quot; or &amp;quot;Left&amp;quot; buttons to align it quickly at the ends. Pro-tip: Press CTRL+ALT+T to open the texture tool, it allows super quick aligning of textures on patches. Esp. useful for decals where the decal texture consists of multiple decals.&lt;br /&gt;
&lt;br /&gt;
== Readables &amp;amp; GUIs ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I put custom art in a book or scroll, like a picture?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Use a custom .gui. Here&#039;s a rough idea to get you started [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__263836]. I&#039;ll try to put better instructions in later.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I trigger a text message to pop up and say something?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create an entity: darkmod &amp;gt; targets &amp;gt; atdm:gui_message and give it the properties/values that you want. Popups will explain each one. You can target it with a triggering entity or trigger it from a script or any other triggering mechanism. An example is here [http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__256592]&lt;br /&gt;
&lt;br /&gt;
== Lighting and Sound == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I add music or ambient sounds?&#039;&#039;&#039; &#039;&#039;&#039;Q. Can I dynamically adjust the ambient lighting?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; For both of these things, check out the article for [[Location Settings]]&lt;br /&gt;
&lt;br /&gt;
{{editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{tutorial-editing|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}} {{darkradiant|sort=Editing FAQ (Troubleshooting &amp;amp; How-To)}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q. How do I set up Reverb (EAX) settings for my rooms? (E.g., the echo of a large hall, etc.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A.&#039;&#039;&#039; Create a text file and name it &amp;lt;mapname&amp;gt;.eax; place it in your .pk4 with your .map file; and in it create entries by location name with the values you want for that location. See this wiki entry to see the format &amp;amp; values [[Setting_Reverb_Data_of_Rooms_(EAX)]].&lt;/div&gt;</summary>
		<author><name>Demagogue</name></author>
	</entry>
</feed>