<?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=Dragofer</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=Dragofer"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Special:Contributions/Dragofer"/>
	<updated>2026-04-29T09:17:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=34424</id>
		<title>The Dark Mod - Compilation Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=The_Dark_Mod_-_Compilation_Guide&amp;diff=34424"/>
		<updated>2026-02-01T18:35:18Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Updated download link for VS2022 Community since it has been taken off the public-facing website&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Intended article audience:&#039;&#039;&#039; engine coders&lt;br /&gt;
&lt;br /&gt;
This guide should provide you with enough information to compile The Dark Mod&#039;s game code from source.&lt;br /&gt;
It applies to version 2.09 or later version of TDM. If you want to compile older version, see the history of this wiki page.&lt;br /&gt;
Brief compilation instructions are also included in &amp;lt;tt&amp;gt;COMPILING.txt&amp;lt;/tt&amp;gt; file in the source code package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Get the sources ==&lt;br /&gt;
&lt;br /&gt;
The sources are available through &amp;quot;snapshots&amp;quot;, i.e. whenever the Dark Mod team is releasing a new update (e.g. TDM 2.09) the corresponding sources are released as well.&lt;br /&gt;
* You can download a source code archive from the Downloads page: http://www.thedarkmod.com/downloads/&lt;br /&gt;
The executables built from these sources are compatible with the latest official release of TDM.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also you can get the very latest source code directly from SVN:&lt;br /&gt;
* Public read-only access: https://svn.thedarkmod.com/publicsvn/darkmod_src/trunk/&lt;br /&gt;
* Team members only: https://svn.thedarkmod.com/svn/darkmod_src/trunk  &lt;br /&gt;
&lt;br /&gt;
Be warned though that these sources &#039;&#039;&#039;might be incompatible with your local darkmod installation&#039;&#039;&#039;.&lt;br /&gt;
To minimize the problem, developer builds of the game are available in tdm_installer.&lt;br /&gt;
Each developer build is named like &amp;lt;tt&amp;gt;devXXXXX-YYYY&amp;lt;/tt&amp;gt;, where YYYY is the SVN revision number which this version was built from.&lt;br /&gt;
If you checkout this exact revision from the source code SVN and build executable from it, it will surely be compatible with the corresponding dev. build of TDM.&lt;br /&gt;
&lt;br /&gt;
== Directory structure ==&lt;br /&gt;
&lt;br /&gt;
Put the source code directory next to your game directory, such that the directory structure looks like this:&lt;br /&gt;
&lt;br /&gt;
 C:\Games\darkmod       &amp;lt;-- your darkmod installation&lt;br /&gt;
 C:\Games\darkmod_src   &amp;lt;-- your source folder (containing the solution)&lt;br /&gt;
&lt;br /&gt;
This directory structure is recommended for both Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
For windows users (this may also apply to linux users) - Install tortoise SVN and then right click on the \darkmod_src folder and select checkout. Then in the url field put &#039;https://svn.thedarkmod.com/publicsvn/darkmod_src/trunk/&#039; then click ok (see screenshot below)&lt;br /&gt;
&lt;br /&gt;
[[File:Darkmod src.jpg|thumb]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Since TDM 2.11 you&#039;ll need Visual Studio 2022 to compile the project (VS2017 was used before that).&lt;br /&gt;
The free Community Edition works fine, it can be downloaded [https://aka.ms/vs/17/release/vs_community.exe approximately here]. Additionally, you have to:&lt;br /&gt;
* Make sure &amp;quot;Visual C++ MFC for x86 and x64&amp;quot; is being installed by MSVC installer, along with &amp;quot;Desktop development with C++&amp;quot; workflow (see screenshot below).&lt;br /&gt;
&lt;br /&gt;
[[File:Unknown.png|thumb]]{{clear}}&lt;br /&gt;
&lt;br /&gt;
You&#039;ll find a &amp;lt;tt&amp;gt;TheDarkMod.sln&amp;lt;/tt&amp;gt; solution file in the source code folder, which you can double-click to open in Visual Studio. The solution is designed to put the compiled binaries into the ../darkmod folder nearby, that&#039;s why we recommend using the directory layout shown above. (You can change the output paths in the property sheets, in case you know how to do that).&lt;br /&gt;
&lt;br /&gt;
Once the solution is opened, select the Configuration in the topmost toolbar (either &amp;quot;release&amp;quot; or &amp;quot;debug&amp;quot;, depending on what you want to do) and Platform (either Win32 or x64). Then hit &amp;quot;Build Solution&amp;quot; ({{Ctrl}}-{{Shift}}-{{key|B}} or {{F7}}). The compilation usually takes a minute or two, watch the output window at the bottom of Visual Studio. After completion you&#039;ll find the compiled binary in your darkmod/ folder. It would be either &amp;lt;tt&amp;gt;TheDarkMod.exe&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;TheDarkModx64.exe&amp;lt;/tt&amp;gt;, depending on the configuration used.&lt;br /&gt;
&lt;br /&gt;
=== Debugging the Engine/Game ===&lt;br /&gt;
To debug your custom built code, you need to attach Visual Studio&#039;s debugger to the TheDarkMod.exe process. There are two ways to accomplish that:&lt;br /&gt;
&lt;br /&gt;
The quick one:&lt;br /&gt;
# Go to Visual Studio and open the TheDarkMod solution&lt;br /&gt;
# Make sure the &amp;quot;DarkModTools&amp;quot; project is marked bold (as &amp;quot;Startup project&amp;quot;) &lt;br /&gt;
# Compile and hit run (F5), Studio will start your TheDarkMod.exe and attach automatically&lt;br /&gt;
&lt;br /&gt;
The manual way:&lt;br /&gt;
# Start your custom TheDarkMod.exe through Windows Explorer or shortcuts&lt;br /&gt;
# Once the game is up and running, Alt-Tab back to Visual Studio&lt;br /&gt;
# Go to menu &amp;quot;Debug&amp;quot; &amp;gt; &amp;quot;Attach to Process...&amp;quot; and select the TheDarkMod.exe process from the list in that dialog popping up.&lt;br /&gt;
# The debugger will now attach to TDM and you can now place breakpoints or intercept game crashes.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
;My breakpoints don&#039;t work (they are hollow circles instead of full ones)&lt;br /&gt;
:Make sure you&#039;re attached to the correct TheDarkMod.exe binary. If you&#039;re attaching to an older version (e.g. from an outdated compilation process) or one you haven&#039;t built in Studio yourself, VC++ won&#039;t be able to load the symbols from the .pdb files. Make sure that the configuration type (release or debug build) is matching as well.&lt;br /&gt;
&lt;br /&gt;
;I cannot inspect all the variables / The instruction pointer is skipping code&lt;br /&gt;
:You are probably running a release build, which comes with some optimisations. When debugging a release build, you&#039;ll notice that your instruction pointer (the yellow arrow) is sometimes skipping statements, which have most likely been optimised out of the binary during compilation/linking. You&#039;ll also have troubles when trying to inspect temporary variables or inlined functions. Use a debug build if this prevents you from figuring out things during debugging.&lt;br /&gt;
&lt;br /&gt;
;Debugging works well, but the game plays too slowly&lt;br /&gt;
:You are running debug build, which is much slower than release. There are several ways to make life easier. First, you can get to the place where problem happens in release build and save your game there, then run debug build and load the game to do debugging. Second, you can try the &amp;quot;Debug with inlines&amp;quot; configuration, which is faster than full debug build, but is still very convenient to debug. If this is not fast enough for you, you can also debug the release build directly, but be aware that breakpoints and watches do not always work due to optimizations. Note that even release build is slower with debugger than without it because of debug heap. You can disable it by setting environment variable [https://ofekshilon.com/2014/09/20/accelerating-debug-runs-part-1-_no_debug_heap-2/ _NO_DEBUG_HEAP=1]. If you do it properly, then your release build should run with full speed.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
You need GCC 5 or newer to build TDM on Linux.&lt;br /&gt;
Anything older than GCC 4.7 surely won&#039;t work.&lt;br /&gt;
CMake &amp;gt;= 3.14 is required starting from TDM 2.08.&lt;br /&gt;
&lt;br /&gt;
You first need to create a build directory. Easiest option is to create a subdirectory in the source code&lt;br /&gt;
root directory (&amp;quot;darkmod_src&amp;quot;):&lt;br /&gt;
  mkdir build &amp;amp;&amp;amp; cd build&lt;br /&gt;
From your build directory, call CMake:&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE=&amp;quot;Release&amp;quot; ..&lt;br /&gt;
The &#039;..&#039; indicate the path to the source directory. If you chose a different location for your build directory&lt;br /&gt;
instead of the suggested subdirectory, you have to adjust this parameter accordingly. &lt;br /&gt;
&lt;br /&gt;
If you need to force a specific GCC version because your Linux distro does not support GCC 5 but you&#039;ve installed a newer GCC you may add flags to the cmake invoke:&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE=&amp;quot;Release&amp;quot; .. -DGAME_DIR=/home/user/darkmod -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11&lt;br /&gt;
( Replace gcc-11 g++-11 with whichever GCC version you intend to use. )&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Finally, build TDM by calling&lt;br /&gt;
  make -j&lt;br /&gt;
where the &#039;-j&#039; parameter instructs make to build the project in parallel for faster compile times.&lt;br /&gt;
&lt;br /&gt;
For newer Ubuntu and Linux Mint versions, it may be better to use:&lt;br /&gt;
  make -j$(nproc)&lt;br /&gt;
to ensure that the number of processes is limited to available cores.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you wish to compile a debug executable, pass &#039;-DCMAKE_BUILD_TYPE=&amp;quot;Debug&amp;quot;&#039; to the CMake call.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04: native ===&lt;br /&gt;
&lt;br /&gt;
The simplest approach is to do a native build, i.e. produce 64-bit binaries on 64-bit OS, or 32-bit binaries on 32-bit OS.&lt;br /&gt;
Starting from a clean Ubuntu installation, here is the list of packages you need to install:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install subversion               //svnversion: not found&lt;br /&gt;
  sudo apt-get install mesa-common-dev          //no such file: &amp;quot;Gl/gl.h&amp;quot;, &amp;lt;=2.07&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev           //no such file: &amp;quot;X11/extensions/xf86vmode.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev            //no such file: &amp;quot;AL/al.h&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev              //no such file: &amp;quot;X11/extensions/Xext.h&amp;quot;&lt;br /&gt;
  sudo snap install cmake                       //we need a recent version of CMake, so install from snap instead of apt&lt;br /&gt;
&lt;br /&gt;
Now run CMake as instructed above.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04: 32-bit version on 64-bit OS ===&lt;br /&gt;
&lt;br /&gt;
If you have 64-bit Linux, you can also build and run 32-bit TDM.&lt;br /&gt;
Note that this approach is slightly more complicated.&lt;br /&gt;
&lt;br /&gt;
You have to install the following packages in addition to the ones listed above:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get install g++-multilib             //no such file: &#039;sys/cdefs.h&#039;&lt;br /&gt;
  sudo apt-get install libx11-dev:i386          //cannot find &amp;quot;-lX11&amp;quot;&lt;br /&gt;
  sudo apt-get install libxxf86vm-dev:i386      //cannot find &amp;quot;-lXxf86vm&amp;quot;&lt;br /&gt;
  sudo apt-get install libopenal-dev:i386       //cannot find &amp;quot;-lopenal&amp;quot;&lt;br /&gt;
  sudo apt-get install libxext-dev:i386         //cannot find &amp;quot;-lXext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then you need to call CMake with a toolchain file to target 32-bit:&lt;br /&gt;
&lt;br /&gt;
  cmake -DCMAKE_BUILD_TYPE=&amp;quot;Release&amp;quot; -DCMAKE_TOOLCHAIN_FILE=&amp;quot;../sys/cmake/gcc_32bit.cmake&amp;quot; ..&lt;br /&gt;
&lt;br /&gt;
The 64-bit and 32-bit versions can be built independently on a single 64-bit Linux, but you need to use different&lt;br /&gt;
build directories for each version.&lt;br /&gt;
&lt;br /&gt;
=== Other distros ===&lt;br /&gt;
&lt;br /&gt;
Even if you have a Linux distro different from Ubuntu, the instructions above will most likely help you.&lt;br /&gt;
If you still have problems with your build, please report to the forums.&lt;br /&gt;
&lt;br /&gt;
E.g. for Kali Linux&lt;br /&gt;
&lt;br /&gt;
  sudo apt-get update&lt;br /&gt;
  sudo apt-get install build-essential manpages-dev &lt;br /&gt;
  sudo apt-get install cmake&lt;br /&gt;
  sudo apt install libx11-dev      &lt;br /&gt;
  sudo apt-get install libxxf86vm-dev  &lt;br /&gt;
  sudo apt-get install libxext-dev&lt;br /&gt;
&lt;br /&gt;
== I have a bugfix for the team ==&lt;br /&gt;
&lt;br /&gt;
In case you figured out a problem in the TDM game code and you maybe even have a fix available, please drop by at our forums to tell the coding staff. Your fix might be incorporated in the main development branch.&lt;br /&gt;
&lt;br /&gt;
See also [[Reporting Problem]] article.&lt;br /&gt;
&lt;br /&gt;
== Working in SVN ==&lt;br /&gt;
&lt;br /&gt;
If you work directly with [https://svn.thedarkmod.com/svn/darkmod_src/trunk SVN], make sure that [http://svnbook.red-bean.com/en/1.7/svn.ref.svnversion.re.html svnversion] command works properly in OS console:&lt;br /&gt;
* &#039;&#039;Windows&#039;&#039;: install TortoiseSVN &#039;&#039;&#039;with &amp;quot;command line client tools&amp;quot; included&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;Linux&#039;&#039;: install &amp;quot;subversion&amp;quot; package.&lt;br /&gt;
To check that it works, build TDM yourself, run it, and then open TDM console. You should see the correct SVN revision number in the lower-right corner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Coding]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=DarkRadiant_-_Compiling_in_Linux&amp;diff=34421</id>
		<title>DarkRadiant - Compiling in Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=DarkRadiant_-_Compiling_in_Linux&amp;diff=34421"/>
		<updated>2026-01-25T19:49:19Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: /* Configure and Compile */  Added missing &amp;quot;build&amp;quot; to cmake comments with paralellism.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Install Required Packages ==&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 22.10 and later ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste the following into a terminal:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install git g++ gettext cmake pkg-config libxml2-dev libsigc++-2.0-dev libftgl-dev libglew-dev libjpeg-dev&lt;br /&gt;
 sudo apt-get install libalut-dev libvorbis-dev libwxgtk3.2-dev libglib2.0-dev libeigen3-dev python3-dev libgtest-dev libgit2-dev&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 to 22.04 ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste the following into a terminal:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install git g++ gettext cmake pkg-config zlib1g-dev libjpeg-dev libxml2-dev libsigc++-2.0-dev libgtest-dev libeigen3-dev&lt;br /&gt;
 sudo apt-get install libwxgtk3.0-gtk3-dev libpng-dev libftgl-dev libglew-dev libalut-dev libvorbis-dev python3-dev libgit2-dev&lt;br /&gt;
&lt;br /&gt;
=== openSUSE Tumbleweed ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste the following into a terminal:&lt;br /&gt;
&lt;br /&gt;
 sudo zypper install git cmake gcc-c++ gettext-tools zlib-devel libjpeg62-devel libxml2-devel libsigc++2-devel gtest&lt;br /&gt;
 sudo zypper install wxWidgets-3_0-devel ftgl-devel glew-devel libvorbis-devel freealut-devel python38-devel&lt;br /&gt;
&lt;br /&gt;
=== Mageia 8 ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste the following into a terminal, run as user who has the required permissions to install the packages:&lt;br /&gt;
&lt;br /&gt;
 sudo urpmi git cmake make gcc-c++ libzlib-devel libjpeg-devel libwxgtku3.0-devel libsigc++2.0-devel &lt;br /&gt;
 sudo urpmi libftgl-devel libglew-devel libpython3-devel libopenal-devel libfreealut-devel libvorbis-devel lib64gtest-devel&lt;br /&gt;
&lt;br /&gt;
=== Debian 10 ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste the following into a terminal:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install git cmake pkg-config gettext zlib1g-dev libjpeg-dev libwxgtk3.0-dev libgtest-dev libeigen3-dev libgit2-dev&lt;br /&gt;
 sudo apt-get install libxml2-dev libsigc++-2.0-dev libpng-dev libftgl-dev libglew-dev libalut-dev libvorbis-dev python3-dev&lt;br /&gt;
&lt;br /&gt;
=== Fedora 26 / 25 ===&lt;br /&gt;
Copy and paste the following into a terminal:&lt;br /&gt;
&lt;br /&gt;
 sudo dnf install git automake libtool gcc-c++ zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel libsigc++20-devel &lt;br /&gt;
 sudo dnf install libpng12-devel ftgl-devel glew-devel libvorbis-devel freealut-devel python-devel pybind11-devel&lt;br /&gt;
&lt;br /&gt;
Note that the wxGTK package does not yet support Wayland environments, which is the default since Fedora 25 (DarkRadiant will just segfault during startup). You&#039;ll need to [https://fedoraproject.org/wiki/Changes/WaylandByDefault deactivate it] for the moment being.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
The following packages are required after starting from an Anarchy installation using Gnome as Window Manager. &lt;br /&gt;
&lt;br /&gt;
 sudo pacman -S cmake wxgtk3 ftgl glew freealut libvorbis python libsigc++ eigen&lt;br /&gt;
&lt;br /&gt;
=== Manjaro ===&lt;br /&gt;
The following packages are required:&lt;br /&gt;
 sudo pacman -S cmake base-devel wxgtk3 ftgl glew freealut libvorbis python libsigc++ eigen&lt;br /&gt;
&lt;br /&gt;
=== CentOS 7 x64 ===&lt;br /&gt;
&lt;br /&gt;
Copy and paste the following into a terminal, run as user who has the required permissions to install the packages:&lt;br /&gt;
&lt;br /&gt;
 sudo yum -y install gcc gcc-c++ git automake libtool zlib-devel libjpeg-turbo-devel wxGTK3-devel libxml2-devel &lt;br /&gt;
 sudo yum -y install libsigc++20-devel ftgl-devel glew-devel boost-devel openal-soft-devel freealut-devel libvorbis-devel python-devel&lt;br /&gt;
&lt;br /&gt;
CentOS 7 ships with an older compiler, so you&#039;ll need to install a more recent GCC first (following the directions on [https://stackoverflow.com/questions/36327805/how-to-install-gcc-5-3-with-yum-on-centos-7-2 stackoverflow]):&lt;br /&gt;
&lt;br /&gt;
 sudo yum install centos-release-scl &lt;br /&gt;
 sudo yum install devtoolset-4-gcc*&lt;br /&gt;
 scl enable devtoolset-4 bash&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;wxGTK3-devel&amp;lt;/tt&amp;gt; package doesn&#039;t create a &amp;lt;tt&amp;gt;wx-config&amp;lt;/tt&amp;gt; symlink in the &amp;lt;tt&amp;gt;/usr/bin&amp;lt;/tt&amp;gt; directory, that&#039;s why you need to pass an additional &amp;lt;tt&amp;gt;--with-wx-config=/usr/bin/wx-config-3.0&amp;lt;/tt&amp;gt; argument to the ./configure script below, like this:&lt;br /&gt;
&lt;br /&gt;
 ./configure --enable-darkmod-plugins --with-wx-config=/usr/bin/wx-config-3.0&lt;br /&gt;
&lt;br /&gt;
=== Slackware 14.2 ===&lt;br /&gt;
&lt;br /&gt;
Slackware doesn&#039;t provide precompiled packages on the one hand (unlike Debian or Arch), but already ships with a lot of libraries on the other. Stuff like git, automake, libtools and development libraries like zlib and boost are already present, but wxWidgets, openAL, ALut and FTGL need to be installed by means of a SlackBuild script. The following has been done in Slackware 14.2, so your mileage may vary.&lt;br /&gt;
&lt;br /&gt;
Download the Source tarballs and the SlackBuild packages from these URLs:&lt;br /&gt;
&lt;br /&gt;
* https://slackbuilds.org/repository/14.2/libraries/wxGTK3/&lt;br /&gt;
* https://slackbuilds.org/repository/14.2/libraries/ftgl/&lt;br /&gt;
* https://slackbuilds.org/repository/14.2/libraries/OpenAL/&lt;br /&gt;
* https://slackbuilds.org/repository/14.2/libraries/freealut/&lt;br /&gt;
&lt;br /&gt;
Download and extract the SlackBuild &amp;lt;tt&amp;gt;.tar.gz&amp;lt;/tt&amp;gt; files in your &amp;lt;tt&amp;gt;~/Downloads&amp;lt;/tt&amp;gt; folder (or anywhere else where you want to have them). For instance, the wxGTK3 package can be untar&#039;d like this:&lt;br /&gt;
&lt;br /&gt;
 tar xzf wxGTK3.tar.gz&lt;br /&gt;
 cd wxGTK3&lt;br /&gt;
 chmod +x wxGTK3.SlackBuild&lt;br /&gt;
&lt;br /&gt;
Do this for all of the above libraries, that should give you the directories &amp;lt;tt&amp;gt;ftgl/&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;OpenAL/&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;wxGTK3/&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;freealut/&amp;lt;/tt&amp;gt;. Next, download the Source Tarballs (the &amp;lt;tt&amp;gt;.tar.bz2&amp;lt;/tt&amp;gt;) files from the links above and place them next to the corresponding SlackBuild script. Then run the scripts for each of them and install the build output in your system in a second step:&lt;br /&gt;
&lt;br /&gt;
 ./wxGTK3.SlackBuild&lt;br /&gt;
&lt;br /&gt;
This produced (on my end at least) the package &amp;lt;tt&amp;gt;/tmp/wxGTK3-3.0.2-i486-2_SBo.tgz&amp;lt;/tt&amp;gt; which can be installed by the &amp;lt;tt&amp;gt;installpkg&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 installpkg /tmp/wxGTK3-3.0.2-i486-2_SBo.tgz&lt;br /&gt;
&lt;br /&gt;
Do the same for the rest of the libraries (ftgl, OpenAL, freealut). Be aware that the freealut package depends on the OpenAL package, so you need to do the OpenAL one first. Once you have these installed, you can proceed to the build section (&amp;lt;tt&amp;gt;git clone&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
DarkRadiant can be built and installed from an unofficial ebuild repository (overlay). The easiest way to do this is with [https://packages.gentoo.org/packages/app-portage/layman app-portage/layman], which must be installed with the &amp;lt;tt&amp;gt;git&amp;lt;/tt&amp;gt; use flag.&lt;br /&gt;
&lt;br /&gt;
In the &#039;overlays&#039; section in &amp;lt;tt&amp;gt;/etc/layman/layman.cfg&amp;lt;/tt&amp;gt;, add:&lt;br /&gt;
&lt;br /&gt;
 https://raw.githubusercontent.com/varingst/varingst-overlay/master/overlay.xml&lt;br /&gt;
&lt;br /&gt;
Then fetch and add the overlay:&lt;br /&gt;
&lt;br /&gt;
 # layman -f -a varingst&lt;br /&gt;
&lt;br /&gt;
Now that the overlay is added, you can build and install DarkRadiant with Portage:&lt;br /&gt;
&lt;br /&gt;
 # emerge darkradiant&lt;br /&gt;
&lt;br /&gt;
To sync the overlay, either do it manually with layman:&lt;br /&gt;
&lt;br /&gt;
 # layman -s varingst&lt;br /&gt;
&lt;br /&gt;
Or look into the [https://wiki.gentoo.org/wiki/Project:Portage/Sync various ways to hook into the portage sync system].&lt;br /&gt;
&lt;br /&gt;
=== Building with a non-default g++ Compiler ===&lt;br /&gt;
DarkRadiant&#039;s codebase makes use of C++17 features, in particular std::filesystem. Not all distributions ship with a compatible g++ compiler by default, but it&#039;s possible to install a more recent compiler suite. Get the compiler package and ensure that the makefiles are called with the correct setup, e.g.&lt;br /&gt;
 CXX=&amp;quot;g++-5.1&amp;quot; cmake . &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
=== Older Distributions / Compiling DarkRadiant 1.8 and older ===&lt;br /&gt;
The instructions about how to compile DR 1.8 (based on GTK) in distributions published in 2012 and older have been removed. They should still be in the [http://wiki.thedarkmod.com/index.php?title=DarkRadiant_-_Compiling_in_Linux&amp;amp;oldid=18927 history] of this page, should they ever be needed.&lt;br /&gt;
&lt;br /&gt;
== Obtain the source ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have the git client installed, this is covered in the package installation commands above. &lt;br /&gt;
Next, change to the directory where you want the source code to be in and then clone the Git repository with:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/codereader/DarkRadiant.git&lt;br /&gt;
&lt;br /&gt;
Once the initial clone is done, the source can be updated to the latest version from inside the working directory with:&lt;br /&gt;
&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
== Configure and Compile ==&lt;br /&gt;
DarkRadiant employs the CMake build system under Linux as used in many open-source projects. Make sure you have the CMake toolchain downloaded, this is covered in the package installation commands above.&lt;br /&gt;
&lt;br /&gt;
To build DarkRadiant, use the CMake command(s):&lt;br /&gt;
&lt;br /&gt;
 cmake -S . -B build -DCMAKE_BUILD_TYPE=Release&lt;br /&gt;
 cmake --build build&lt;br /&gt;
&lt;br /&gt;
It is now possible to run the local build of DarkRadiant directly by executing &amp;lt;tt&amp;gt;./build/darkradiant/bin/darkradiant&amp;lt;/tt&amp;gt;. There is no need for a subsequent &amp;quot;install&amp;quot; step. However, if you wish to install the built software, pass the desired directory to the initial CMake command, e.g. &amp;lt;tt&amp;gt;-DCMAKE_INSTALL_PREFIX=/tmp/dr&amp;lt;/tt&amp;gt;, then run a final &amp;lt;tt&amp;gt;cmake --build build --target install&amp;lt;/tt&amp;gt; to perform the actual installation.&lt;br /&gt;
&lt;br /&gt;
By the above, a release build will be created; if a debug build is required pass the &amp;lt;tt&amp;gt;-DCMAKE_BUILD_TYPE=Debug&amp;lt;/tt&amp;gt; option to the cmake command.&lt;br /&gt;
&lt;br /&gt;
Other points to note about the configure process:&lt;br /&gt;
&lt;br /&gt;
* The DarkMod-specific plugins are built by default, the &amp;lt;tt&amp;gt;-DENABLE_DM_PLUGINS=OFF&amp;lt;/tt&amp;gt; argument will disable them.&lt;br /&gt;
* The CMake script autodetects required dependencies, and will conditionally enable optional components of DarkRadiant (such as the sound plugin) based on what it finds.&lt;br /&gt;
&lt;br /&gt;
=== Multiprocessor Systems ===&lt;br /&gt;
&lt;br /&gt;
You can pass the &amp;lt;tt&amp;gt;--jobs=N&amp;lt;/tt&amp;gt; parameter to CMake, e.g.:&lt;br /&gt;
&lt;br /&gt;
 cmake --build build --jobs=2&lt;br /&gt;
&lt;br /&gt;
or if you have the &amp;lt;tt&amp;gt;nproc&amp;lt;/tt&amp;gt; tool available (which is part of GNU CoreUtils):&lt;br /&gt;
&lt;br /&gt;
 cmake --build build --jobs=$(nproc)&lt;br /&gt;
&lt;br /&gt;
to use all available processors for the compilation. This will eat lots of RAM, so don&#039;t do this on machines with little available memory.&lt;br /&gt;
&lt;br /&gt;
=== Building a .deb package ===&lt;br /&gt;
&lt;br /&gt;
To build a Debian/Ubuntu package, simply run&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot&lt;br /&gt;
&lt;br /&gt;
in the main &amp;lt;tt&amp;gt;darkradiant&amp;lt;/tt&amp;gt; directory. The .deb will be created in the parent directory.&lt;br /&gt;
&lt;br /&gt;
{{coding}}&lt;br /&gt;
{{darkradiant|sort=Compilation}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Turret&amp;diff=33951</id>
		<title>Turret</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Turret&amp;diff=33951"/>
		<updated>2025-04-19T12:35:07Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Turret==&lt;br /&gt;
&lt;br /&gt;
The turret is an advanced stationary sentry. It&#039;s designed to be linked with one or more security cameras, automatically attacking the closest target that is visible to a security camera. Not to be confused with the Camgoyle, which is a security camera that can also attack enemies. The following features are offered by the turret:&lt;br /&gt;
&lt;br /&gt;
* Fires explosive, high-velocity projectiles at the closest enemy detected by linked security cameras. Enable &amp;quot;seeAIs&amp;quot; on the security camera and update the &amp;quot;team&amp;quot; spawnarg if you&#039;d like it to fire at AIs.&lt;br /&gt;
* Predicts its target&#039;s position based on its movement.&lt;br /&gt;
* Can be destroyed with fire arrows/mines by default, producing fx like sparks and breaking into pieces. Alternatively, it can be switched on/off via a simple trigger i.e. from a button.&lt;br /&gt;
* Comes with a separate rotating platform and recoiling barrel.&lt;br /&gt;
* Similarly to the security camera, both the turret and its projectiles are highly customizable.&lt;br /&gt;
* Offers script control to fire at specific entities or positions using the &amp;quot;attack&amp;quot; and &amp;quot;attackPosition&amp;quot; events.&lt;br /&gt;
* Its view can be sent to a camera screen.&lt;br /&gt;
* There is also a script-based flamethrower version as an unofficial download [https://drive.google.com/file/d/1f9BA_tMoYjAgxx-00X8u1T-VmF_fHKJ0/view?usp=sharing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Entities and Prefabs==&lt;br /&gt;
&lt;br /&gt;
The official thread can be found here: https://forums.thedarkmod.com/index.php?/topic/22307-212-turrets/&lt;br /&gt;
Turret entities can be found in &#039;&#039;AI/Machines/Turret&#039;&#039; and inherit from &#039;&#039;atdm:turret_base&#039;&#039;. Prefabs can be found in &#039;&#039;AI/Machines&#039;&#039;. The projectiles can be found in &#039;&#039;Internal/Weapons/Projectiles&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Spawnargs==&lt;br /&gt;
&lt;br /&gt;
===Movement Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;rotation_speed_vertical&amp;quot; - Vertical turning speed in degrees per second.&lt;br /&gt;
* &amp;quot;rotation_speed_horizontal&amp;quot; - Horizontal turning speed in degrees per second.&lt;br /&gt;
* &amp;quot;max_incline_up&amp;quot; - How many degrees the turret can rotate upwards from its starting orientation.&lt;br /&gt;
* &amp;quot;max_incline_down&amp;quot; - How many degrees the turret can rotate downwards from its starting orientation.&lt;br /&gt;
&lt;br /&gt;
Note: horizontal rotation can&#039;t be restricted at present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Attack Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;accuracy&amp;quot; - Add a random number of degrees up to this value whenever the turret fires a shot. 0 is perfect accuracy.&lt;br /&gt;
* &amp;quot;attack_delay&amp;quot; - Time in seconds before the turret can make its first attack after establishing a lock on the enemy.&lt;br /&gt;
* &amp;quot;attack_delay_rand&amp;quot; - Additional random delay up to this amount for attack_delay.&lt;br /&gt;
* &amp;quot;attack_interval&amp;quot; - Time in seconds between each attack of the turret while the turret still has a lock on the enemy.&lt;br /&gt;
* &amp;quot;attack_interval_rand&amp;quot; - Additional random delay up to this amount for attack_interval.&lt;br /&gt;
* &amp;quot;fire_range_max&amp;quot; - Max distance at which the turret can attack targets.&lt;br /&gt;
* &amp;quot;fire_range_min&amp;quot; - Min distance at which the turret can attack targets.&lt;br /&gt;
* &amp;quot;fire_tolerance&amp;quot; - Max difference in degrees between the enemy&#039;s position and the turret&#039;s current orientation. 0 means the turret has to point perfectly at the enemy to attack.&lt;br /&gt;
* &amp;quot;predict_motion&amp;quot; - Whether the turret will predict the enemy&#039;s motion when firing projectiles.&lt;br /&gt;
* &amp;quot;friendly_fire&amp;quot; - The turret will attack its target even if a friendly actor is in the line of fire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Projectile Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs affect the projectile launched by the turret:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;def_projectile&amp;quot; - Projectile to be fired. At time of writing, a guided and (experimental) bouncing version of the projectile are also available: atdm:turret01_projectile_guided and atdm:turret01_projectile_bounce.&lt;br /&gt;
* &amp;quot;projectile_offset&amp;quot; - Offset the projectile launch position from the model origin. This should be roughly where the barrel&#039;s muzzle is.&lt;br /&gt;
* &amp;quot;projectile_speed&amp;quot; - Speed at which projectiles are launched. The corresponding value in the projectile def is not used.&lt;br /&gt;
* &amp;quot;projectile_trace_radius&amp;quot; - Radius of the bounding box that&#039;s used to determine whether the projectile hits something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Barrel Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The basic model comes with a separate barrel which recoils whenever a shot is fired.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;model_barrel&amp;quot; - Model of a separate barrel entity. Set to &#039;-&#039; if you don&#039;t want to spawn a barrel.&lt;br /&gt;
* &amp;quot;broken_barrel&amp;quot; - Switch the barrel to this model when the turret is destroyed.&lt;br /&gt;
* &amp;quot;barrel_offset&amp;quot; - Offset the barrel origin from the turret&#039;s origin.&lt;br /&gt;
* &amp;quot;recoil&amp;quot; - Translation by the barrel when recoiling. Set to &#039;0 0 0&#039; to disable.&lt;br /&gt;
* &amp;quot;recoil_time1&amp;quot; - Time taken for the barrel to travel to the recoil position.&lt;br /&gt;
* &amp;quot;recoil_time2&amp;quot; - Time taken for the barrel to return from the recoil position.&lt;br /&gt;
* &amp;quot;broken_hide_barrel&amp;quot; - Hide the attached barrel entity if the turret is destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Color Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;color_idle&amp;quot; - Color when all connected security cameras are idle.&lt;br /&gt;
* &amp;quot;color_suspicious&amp;quot; - Color when at least one connected security camera is in a suspicious state.&lt;br /&gt;
* &amp;quot;color_alerted&amp;quot; - Color when at least one connected security camera is in an alerted state.&lt;br /&gt;
* &amp;quot;color_passive&amp;quot; - Color when not connected to any operational security cameras.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turret Damage Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern the player&#039;s ability to do damage to the turret:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;health&amp;quot; - Entity&#039;s health. Set to 0 for invulnerability.&lt;br /&gt;
* &amp;quot;damage_threshold&amp;quot; - Hits have to do at least this much damage for the turret be damaged. Avoids taking small amounts of splash damage from relatively distant projectile impacts. Set to 0 to disable.&lt;br /&gt;
* &amp;quot;damage_flinderize&amp;quot; - Attacks dealing at least this amount of damage can turn the turret into fragments upon or after destruction. Set to 0 to disable.&lt;br /&gt;
* &amp;quot;damage_blackjack&amp;quot; - Damage taken from blackjack attacks. Default damage: 0&lt;br /&gt;
* &amp;quot;damage_mult_sword&amp;quot; - Damage multiplier for sword attacks. Default damage: 42&lt;br /&gt;
* &amp;quot;damage_mult_arrow&amp;quot; - Damage multiplier for broadheads and rope arrows. Default damage: 35&lt;br /&gt;
* &amp;quot;damage_mult_firearrow_direct&amp;quot; - Damage multiplier for fire arrow and mine direct hits. Fire arrows and mines deal either direct damage or splash damage. Default damage: 400&lt;br /&gt;
* &amp;quot;damage_mult_firearrow_splash&amp;quot; - Damage multiplier for fire arrow and mine splash damage. Fire arrows and mines deal either direct damage or splash damage. Default maximal damage: 30&lt;br /&gt;
* &amp;quot;damage_mult_moveable&amp;quot; - Damage multiplier for all moveables. Significant mass and velocity are needed to do significant damage. Default maximal damage: mass divided by 5&lt;br /&gt;
* &amp;quot;damage_mult_other&amp;quot; - Damage multiplier for anything else. You can create individual damage_ spawnargs by naming the damage def, i.e. &#039;damage_mult_atdm:damage_rock&#039; &#039;1.0&#039;, or the inflicting entity, i.e. &#039;damage_atdm:attachment_melee_shortsword&#039; &#039;1.0&#039;&lt;br /&gt;
* &amp;quot;fx_damage&amp;quot; - fx played when the turret is damaged while power is on.&lt;br /&gt;
* &amp;quot;fx_damage_nopower&amp;quot; - fx played when the turret is damaged while power is off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turret Destruction Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern what happens when the turret is destroyed:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound made when the turret is destroyed while power is on.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound made when the turret is destroyed while power is off.&lt;br /&gt;
* &amp;quot;fx_destroyed&amp;quot; - fx played when the turret is destroyed while power is on.&lt;br /&gt;
* &amp;quot;fx_destroyed_nopower&amp;quot; - fx played when the turret is destroyed while power is off.&lt;br /&gt;
* &amp;quot;broken&amp;quot; - switch to this model when the turret is broken.&lt;br /&gt;
* &amp;quot;broken_flinderized&amp;quot; - switch to this model when the turret is broken and flinderized (fragmented). Set the flinderize threshold with &#039;damage_flinderize&#039;. If no model is set here, will use &#039;broken&#039; instead.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - switch to this skin when the turret is broken.&lt;br /&gt;
* &amp;quot;skin_broken_flinderized&amp;quot; - switch to this skin when the turret is broken and flinderized (fragmented). Set the flinderize threshold with &#039;damage_flinderize&#039;. If no skin is set here, will use &#039;skin_broken&#039; instead.&lt;br /&gt;
* &amp;quot;def_flinderN&amp;quot; - EntityDef of a flinder entity, replace N with 1, 2, 3 etc.&lt;br /&gt;
* &amp;quot;flinder_offsetN&amp;quot;	- Offset of the flinder spawn position relative to the turret&#039;s origin, taking the turret&#039;s rotation into account.&lt;br /&gt;
* &amp;quot;findler_countN&amp;quot; - Number of flinders of this type to spawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sparks Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs control the sparks effect that plays periodically after the turret has been destroyed and if it&#039;s still powered.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;sparks&amp;quot; - 1 = When the turret is destroyed, spawn a post-destruction particle func_emitter and play snd_sparks.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the turret emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;sparks_offset&amp;quot; - Offset the sparks particle emitter from the model origin.&lt;br /&gt;
* &amp;quot;sparks_particle&amp;quot; - Particle that is spawned upon destruction.&lt;br /&gt;
* &amp;quot;sparks_delay&amp;quot; - Delay the initial appearance of the particle emitter after the turret is destroyed.&lt;br /&gt;
* &amp;quot;sparks_power_dependent&amp;quot; - Only show the particle if power to the turret is switched on.&lt;br /&gt;
* &amp;quot;sparks_interval&amp;quot; - Minimum time between each trigger of the particle emitter + snd_sparks.&lt;br /&gt;
* &amp;quot;sparks_interval_rand&amp;quot; - Additional random factor added to the time between each trigger of the particle + snd_sparks.&lt;br /&gt;
&lt;br /&gt;
===Sound Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_stationary&amp;quot; - Sound made while idle.&lt;br /&gt;
* &amp;quot;snd_fire&amp;quot; - Sound made when a projectile is fired.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the turret emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound made when the turret is destroyed while power is on.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound made when the turret is destroyed while power is off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AI Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs affect how the turret and AIs interact with each other:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;notice_destroyed&amp;quot; - AIs will react if they see this turret has been destroyed.&lt;br /&gt;
* &amp;quot;AIUse&amp;quot; - Allows AIs to react to this turret when they see that it has been destroyed.&lt;br /&gt;
* &amp;quot;rout_enemies&amp;quot; - Enemies attacked by the turret will flee. 1 = always flee, 2 = flee if not fighting an enemy. Note: may not work perfectly.&lt;br /&gt;
* &amp;quot;rout_radius&amp;quot; - Enemies within this distance of the attacked enemy will also flee. See settings in rout_enemies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;start_off&amp;quot; - Whether the turret starts powered on or off.&lt;br /&gt;
* &amp;quot;cameraFovX&amp;quot; - Display screens showing the turret&#039;s view will have this field of view in X.&lt;br /&gt;
* &amp;quot;cameraFovY&amp;quot; - Display screens showing the turret&#039;s view will have this field of view in Y.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Damaging the Turret==&lt;br /&gt;
&lt;br /&gt;
Damage and destruction of the turret are highly customizable and work similarly to the [[Security Camera]]. See the corresponding section there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
===Script Events===&lt;br /&gt;
&lt;br /&gt;
The turret supports the following script events:&lt;br /&gt;
* getTurretState - Returns the turret&#039;s state. 0 = passive: no active security cameras connected. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = power off, 5 = destroyed.&lt;br /&gt;
* attack(entity enemy, float ignoreCollisions) - Direct the turret to manually attack the specified entity. Use disableManualAttack() to disable. enemy: enemy to attack. ignoreCollisions: whether to ignore obstacles in the way to the enemy when planning to attack&lt;br /&gt;
* attackPosition(vector targetPos, float ignoreCollisions) - Direct the turret to manually attack a position. targetPos: position to attack. ignoreCollisions: whether to ignore obstacles in the way to the target position when planning to attack. Recommended true for this event.&lt;br /&gt;
* disableManualAttack() - Stop attacking the manually specified enemy or position and return to automatic target acquisition mode.&lt;br /&gt;
* activate() and trigger() - Toggle the turret&#039;s power.&lt;br /&gt;
* getHealth() and setHealth(float newHealth) - As per the name. Setting health to 0 or lower will destroy the turret, which is irreversible. Using setHealth can turn an invincible turret vulnerable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scriptobjects===&lt;br /&gt;
&lt;br /&gt;
The turret&#039;s scriptobject is only needed for cosmetic elements specific to the default turret (recoiling barrel, attack FX and a rotating platform).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upon Destruction===&lt;br /&gt;
&lt;br /&gt;
You may call a script when the turret is destroyed via the spawnarg &amp;quot;break_up_script&amp;quot;. This script should be able to receive the name of the destroyed turret as input, i.e.:&lt;br /&gt;
 void turret_destroyed ( entity turret )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Turret&amp;diff=33950</id>
		<title>Turret</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Turret&amp;diff=33950"/>
		<updated>2025-04-19T12:29:37Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Created page with &amp;quot;==Turret==  The turret is an advanced stationary sentry. It&amp;#039;s designed to be linked with one or more security cameras, automatically attacking the closest target that is visible to a security camera. Not to be confused with the Camgoyle, which is a security camera that can also attack enemies. The following features are offered by the turret:  * Fires explosive, high-velocity projectiles at the closest enemy detected by linked security cameras. Enable &amp;quot;seeAIs&amp;quot; on the sec...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Turret==&lt;br /&gt;
&lt;br /&gt;
The turret is an advanced stationary sentry. It&#039;s designed to be linked with one or more security cameras, automatically attacking the closest target that is visible to a security camera. Not to be confused with the Camgoyle, which is a security camera that can also attack enemies. The following features are offered by the turret:&lt;br /&gt;
&lt;br /&gt;
* Fires explosive, high-velocity projectiles at the closest enemy detected by linked security cameras. Enable &amp;quot;seeAIs&amp;quot; on the security camera and update the &amp;quot;team&amp;quot; spawnarg if you&#039;d like it to fire at AIs.&lt;br /&gt;
* Predicts its target&#039;s position based on its movement.&lt;br /&gt;
* Can be destroyed with fire arrows/mines by default, producing fx like sparks and breaking into pieces. Alternatively, it can be switched on/off via a simple trigger i.e. from a button.&lt;br /&gt;
* Similarly to the security camera, both the turret and its projectiles are highly customizable.&lt;br /&gt;
* Offers script control to fire at specific entities or positions using the &amp;quot;attack&amp;quot; and &amp;quot;attackPosition&amp;quot; events.&lt;br /&gt;
* Its view can be sent to a camera screen.&lt;br /&gt;
* There is also a script-based flamethrower version as an unofficial download [https://drive.google.com/file/d/1f9BA_tMoYjAgxx-00X8u1T-VmF_fHKJ0/view?usp=sharing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Entities and Prefabs==&lt;br /&gt;
&lt;br /&gt;
The official thread can be found here: https://forums.thedarkmod.com/index.php?/topic/22307-212-turrets/&lt;br /&gt;
Turret entities can be found in &#039;&#039;AI/Machines/Turret&#039;&#039; and inherit from &#039;&#039;atdm:turret_base&#039;&#039;. Prefabs can be found in &#039;&#039;AI/Machines&#039;&#039;. The projectiles can be found in &#039;&#039;Internal/Weapons/Projectiles&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Spawnargs==&lt;br /&gt;
&lt;br /&gt;
===Movement Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;rotation_speed_vertical&amp;quot; - Vertical turning speed in degrees per second.&lt;br /&gt;
* &amp;quot;rotation_speed_horizontal&amp;quot; - Horizontal turning speed in degrees per second.&lt;br /&gt;
* &amp;quot;max_incline_up&amp;quot; - How many degrees the turret can rotate upwards from its starting orientation.&lt;br /&gt;
* &amp;quot;max_incline_down&amp;quot; - How many degrees the turret can rotate downwards from its starting orientation.&lt;br /&gt;
&lt;br /&gt;
Note: horizontal rotation can&#039;t be restricted at present.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Attack Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;accuracy&amp;quot; - Add a random number of degrees up to this value whenever the turret fires a shot. 0 is perfect accuracy.&lt;br /&gt;
* &amp;quot;attack_delay&amp;quot; - Time in seconds before the turret can make its first attack after establishing a lock on the enemy.&lt;br /&gt;
* &amp;quot;attack_delay_rand&amp;quot; - Additional random delay up to this amount for attack_delay.&lt;br /&gt;
* &amp;quot;attack_interval&amp;quot; - Time in seconds between each attack of the turret while the turret still has a lock on the enemy.&lt;br /&gt;
* &amp;quot;attack_interval_rand&amp;quot; - Additional random delay up to this amount for attack_interval.&lt;br /&gt;
* &amp;quot;fire_range_max&amp;quot; - Max distance at which the turret can attack targets.&lt;br /&gt;
* &amp;quot;fire_range_min&amp;quot; - Min distance at which the turret can attack targets.&lt;br /&gt;
* &amp;quot;fire_tolerance&amp;quot; - Max difference in degrees between the enemy&#039;s position and the turret&#039;s current orientation. 0 means the turret has to point perfectly at the enemy to attack.&lt;br /&gt;
* &amp;quot;predict_motion&amp;quot; - Whether the turret will predict the enemy&#039;s motion when firing projectiles.&lt;br /&gt;
* &amp;quot;friendly_fire&amp;quot; - The turret will attack its target even if a friendly actor is in the line of fire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Projectile Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs affect the projectile launched by the turret:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;def_projectile&amp;quot; - Projectile to be fired. At time of writing, a guided and (experimental) bouncing version of the projectile are also available: atdm:turret01_projectile_guided and atdm:turret01_projectile_bounce.&lt;br /&gt;
* &amp;quot;projectile_offset&amp;quot; - Offset the projectile launch position from the model origin. This should be roughly where the barrel&#039;s muzzle is.&lt;br /&gt;
* &amp;quot;projectile_speed&amp;quot; - Speed at which projectiles are launched. The corresponding value in the projectile def is not used.&lt;br /&gt;
* &amp;quot;projectile_trace_radius&amp;quot; - Radius of the bounding box that&#039;s used to determine whether the projectile hits something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Barrel Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The basic model comes with a separate barrel which recoils whenever a shot is fired.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;model_barrel&amp;quot; - Model of a separate barrel entity. Set to &#039;-&#039; if you don&#039;t want to spawn a barrel.&lt;br /&gt;
* &amp;quot;broken_barrel&amp;quot; - Switch the barrel to this model when the turret is destroyed.&lt;br /&gt;
* &amp;quot;barrel_offset&amp;quot; - Offset the barrel origin from the turret&#039;s origin.&lt;br /&gt;
* &amp;quot;recoil&amp;quot; - Translation by the barrel when recoiling. Set to &#039;0 0 0&#039; to disable.&lt;br /&gt;
* &amp;quot;recoil_time1&amp;quot; - Time taken for the barrel to travel to the recoil position.&lt;br /&gt;
* &amp;quot;recoil_time2&amp;quot; - Time taken for the barrel to return from the recoil position.&lt;br /&gt;
* &amp;quot;broken_hide_barrel&amp;quot; - Hide the attached barrel entity if the turret is destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Color Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;color_idle&amp;quot; - Color when all connected security cameras are idle.&lt;br /&gt;
* &amp;quot;color_suspicious&amp;quot; - Color when at least one connected security camera is in a suspicious state.&lt;br /&gt;
* &amp;quot;color_alerted&amp;quot; - Color when at least one connected security camera is in an alerted state.&lt;br /&gt;
* &amp;quot;color_passive&amp;quot; - Color when not connected to any operational security cameras.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turret Damage Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern the player&#039;s ability to do damage to the turret:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;health&amp;quot; - Entity&#039;s health. Set to 0 for invulnerability.&lt;br /&gt;
* &amp;quot;damage_threshold&amp;quot; - Hits have to do at least this much damage for the turret be damaged. Avoids taking small amounts of splash damage from relatively distant projectile impacts. Set to 0 to disable.&lt;br /&gt;
* &amp;quot;damage_flinderize&amp;quot; - Attacks dealing at least this amount of damage can turn the turret into fragments upon or after destruction. Set to 0 to disable.&lt;br /&gt;
* &amp;quot;damage_blackjack&amp;quot; - Damage taken from blackjack attacks. Default damage: 0&lt;br /&gt;
* &amp;quot;damage_mult_sword&amp;quot; - Damage multiplier for sword attacks. Default damage: 42&lt;br /&gt;
* &amp;quot;damage_mult_arrow&amp;quot; - Damage multiplier for broadheads and rope arrows. Default damage: 35&lt;br /&gt;
* &amp;quot;damage_mult_firearrow_direct&amp;quot; - Damage multiplier for fire arrow and mine direct hits. Fire arrows and mines deal either direct damage or splash damage. Default damage: 400&lt;br /&gt;
* &amp;quot;damage_mult_firearrow_splash&amp;quot; - Damage multiplier for fire arrow and mine splash damage. Fire arrows and mines deal either direct damage or splash damage. Default maximal damage: 30&lt;br /&gt;
* &amp;quot;damage_mult_moveable&amp;quot; - Damage multiplier for all moveables. Significant mass and velocity are needed to do significant damage. Default maximal damage: mass divided by 5&lt;br /&gt;
* &amp;quot;damage_mult_other&amp;quot; - Damage multiplier for anything else. You can create individual damage_ spawnargs by naming the damage def, i.e. &#039;damage_mult_atdm:damage_rock&#039; &#039;1.0&#039;, or the inflicting entity, i.e. &#039;damage_atdm:attachment_melee_shortsword&#039; &#039;1.0&#039;&lt;br /&gt;
* &amp;quot;fx_damage&amp;quot; - fx played when the turret is damaged while power is on.&lt;br /&gt;
* &amp;quot;fx_damage_nopower&amp;quot; - fx played when the turret is damaged while power is off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Turret Destruction Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern what happens when the turret is destroyed:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound made when the turret is destroyed while power is on.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound made when the turret is destroyed while power is off.&lt;br /&gt;
* &amp;quot;fx_destroyed&amp;quot; - fx played when the turret is destroyed while power is on.&lt;br /&gt;
* &amp;quot;fx_destroyed_nopower&amp;quot; - fx played when the turret is destroyed while power is off.&lt;br /&gt;
* &amp;quot;broken&amp;quot; - switch to this model when the turret is broken.&lt;br /&gt;
* &amp;quot;broken_flinderized&amp;quot; - switch to this model when the turret is broken and flinderized (fragmented). Set the flinderize threshold with &#039;damage_flinderize&#039;. If no model is set here, will use &#039;broken&#039; instead.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - switch to this skin when the turret is broken.&lt;br /&gt;
* &amp;quot;skin_broken_flinderized&amp;quot; - switch to this skin when the turret is broken and flinderized (fragmented). Set the flinderize threshold with &#039;damage_flinderize&#039;. If no skin is set here, will use &#039;skin_broken&#039; instead.&lt;br /&gt;
* &amp;quot;def_flinderN&amp;quot; - EntityDef of a flinder entity, replace N with 1, 2, 3 etc.&lt;br /&gt;
* &amp;quot;flinder_offsetN&amp;quot;	- Offset of the flinder spawn position relative to the turret&#039;s origin, taking the turret&#039;s rotation into account.&lt;br /&gt;
* &amp;quot;findler_countN&amp;quot; - Number of flinders of this type to spawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sparks Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs control the sparks effect that plays periodically after the turret has been destroyed and if it&#039;s still powered.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;sparks&amp;quot; - 1 = When the turret is destroyed, spawn a post-destruction particle func_emitter and play snd_sparks.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the turret emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;sparks_offset&amp;quot; - Offset the sparks particle emitter from the model origin.&lt;br /&gt;
* &amp;quot;sparks_particle&amp;quot; - Particle that is spawned upon destruction.&lt;br /&gt;
* &amp;quot;sparks_delay&amp;quot; - Delay the initial appearance of the particle emitter after the turret is destroyed.&lt;br /&gt;
* &amp;quot;sparks_power_dependent&amp;quot; - Only show the particle if power to the turret is switched on.&lt;br /&gt;
* &amp;quot;sparks_interval&amp;quot; - Minimum time between each trigger of the particle emitter + snd_sparks.&lt;br /&gt;
* &amp;quot;sparks_interval_rand&amp;quot; - Additional random factor added to the time between each trigger of the particle + snd_sparks.&lt;br /&gt;
&lt;br /&gt;
===Sound Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_stationary&amp;quot; - Sound made while idle.&lt;br /&gt;
* &amp;quot;snd_fire&amp;quot; - Sound made when a projectile is fired.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the turret emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound made when the turret is destroyed while power is on.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound made when the turret is destroyed while power is off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===AI Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs affect how the turret and AIs interact with each other:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;notice_destroyed&amp;quot; - AIs will react if they see this turret has been destroyed.&lt;br /&gt;
* &amp;quot;AIUse&amp;quot; - Allows AIs to react to this turret when they see that it has been destroyed.&lt;br /&gt;
* &amp;quot;rout_enemies&amp;quot; - Enemies attacked by the turret will flee. 1 = always flee, 2 = flee if not fighting an enemy. Note: may not work perfectly.&lt;br /&gt;
* &amp;quot;rout_radius&amp;quot; - Enemies within this distance of the attacked enemy will also flee. See settings in rout_enemies.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;start_off&amp;quot; - Whether the turret starts powered on or off.&lt;br /&gt;
* &amp;quot;cameraFovX&amp;quot; - Display screens showing the turret&#039;s view will have this field of view in X.&lt;br /&gt;
* &amp;quot;cameraFovY&amp;quot; - Display screens showing the turret&#039;s view will have this field of view in Y.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Damaging the Turret==&lt;br /&gt;
&lt;br /&gt;
Damage and destruction of the turret are highly customizable and work similarly to the [[Security Camera]]. See the corresponding section there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
===Script Events===&lt;br /&gt;
&lt;br /&gt;
The turret supports the following script events:&lt;br /&gt;
* getTurretState - Returns the turret&#039;s state. 0 = passive: no active security cameras connected. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = power off, 5 = destroyed.&lt;br /&gt;
* attack(entity enemy, float ignoreCollisions) - Direct the turret to manually attack the specified entity. Use disableManualAttack() to disable. enemy: enemy to attack. ignoreCollisions: whether to ignore obstacles in the way to the enemy when planning to attack&lt;br /&gt;
* attackPosition(vector targetPos, float ignoreCollisions) - Direct the turret to manually attack a position. targetPos: position to attack. ignoreCollisions: whether to ignore obstacles in the way to the target position when planning to attack. Recommended true for this event.&lt;br /&gt;
* disableManualAttack() - Stop attacking the manually specified enemy or position and return to automatic target acquisition mode.&lt;br /&gt;
* activate() and trigger() - Toggle the turret&#039;s power.&lt;br /&gt;
* getHealth() and setHealth(float newHealth) - As per the name. Setting health to 0 or lower will destroy the turret, which is irreversible. Using setHealth can turn an invincible turret vulnerable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scriptobjects===&lt;br /&gt;
&lt;br /&gt;
The turret&#039;s scriptobject is only needed for cosmetic elements specific to the default turret (recoiling barrel, attack FX and a rotating platform).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upon Destruction===&lt;br /&gt;
&lt;br /&gt;
You may call a script when the turret is destroyed via the spawnarg &amp;quot;break_up_script&amp;quot;. This script should be able to receive the name of the destroyed turret as input, i.e.:&lt;br /&gt;
 void turret_destroyed ( entity turret )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=33949</id>
		<title>Security Camera (2.10+)</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=33949"/>
		<updated>2025-04-19T11:09:48Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Replaced content with &amp;quot;See Security Camera.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;See [[Security Camera]].&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Security_Camera&amp;diff=33948</id>
		<title>Security Camera</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Security_Camera&amp;diff=33948"/>
		<updated>2025-04-19T11:08:38Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Security Camera==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the security camera after the major overhaul in version 2.10 onwards. See [[Security Camera (legacy)]] if you&#039;re working with TDM 2.09 or older.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The security camera provides the following features:&lt;br /&gt;
&lt;br /&gt;
* It can either sweep back and forth between two angles or remain stationary.&lt;br /&gt;
* If the camera sees the player, an AI on a hostile team or a body, it plays a short alert sound that is silent to nearby guards. If the enemy or body is still in view several seconds later, an alarm sounds. This alarm will repeat every few seconds for a while, even if the enemy moves out of sight.&lt;br /&gt;
* The camera is able to track its enemy, making it much harder to escape its view.&lt;br /&gt;
* An optional spotlight that points forward, lighting the area in the direction the camera faces.&lt;br /&gt;
* The ability to toggle the camera power on/off by triggering it. Each of the above described subsystems can be toggled individually.&lt;br /&gt;
* If the camera has targets, these will be activated when the camera is fully alerted. This gives the map author the ability to play a more powerful alarm than the one given off by the camera (or to do a variety of other things.)&lt;br /&gt;
* Sending what it sees to a separate, func_static display screen. Alternatively, it can send what another entity (typically a target_null) sees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Security Camera: Entities and Prefabs==&lt;br /&gt;
&lt;br /&gt;
Security camera entities can be found in &#039;&#039;AI/Machines/Security Camera&#039;&#039; and inherit from &#039;&#039;func_securitycamera&#039;&#039;. Prefabs can be found in &#039;&#039;AI/Machines&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Place the camera entity in your map, and orient it toward its starting direction. A rotating camera will sweep clockwise, halt a moment, then sweep back counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
Some cameras may be designed to use additional parts, i.e. a ceiling pivot entity with scripted gears. See the prefabs or the entity descriptions for more info.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Spawnargs==&lt;br /&gt;
&lt;br /&gt;
===Movement Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;rotate&amp;quot; - If &amp;quot;1&amp;quot; (default) the camera will rotate. If &amp;quot;0&amp;quot;, the camera is stationary.&lt;br /&gt;
* &amp;quot;sweepSpeed&amp;quot; - Horizontal rotation speed in degrees per second.&lt;br /&gt;
* &amp;quot;sweepAngle&amp;quot; - The number of degrees the camera covers during its sweep. You can cause a camera to initially sweep in the counter-clockwise direction by setting this to a negative number.&lt;br /&gt;
* &amp;quot;sweepWait&amp;quot; - How long the pause is after the end of a sweep. Default is 0.5 seconds.&lt;br /&gt;
* &amp;quot;sweepWaitSoundOffset&amp;quot; - Start playing snd_end before the camera reaches the end of its sweep, by this amount of seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Detection Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern how the security camera detects and reacts to enemies: max detection distance, at what light intensity, how long the alarm lasts, whether to trigger anything and so on.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;scanDist&amp;quot; - The distance limit for spotting the enemy.&lt;br /&gt;
* &amp;quot;scanFov&amp;quot; - The camera&#039;s field of view.&lt;br /&gt;
* &amp;quot;seePlayer&amp;quot; - Whether the camera will react to the player.&lt;br /&gt;
* &amp;quot;seeAI&amp;quot; - Whether the camera will react to AIs, and what their relationship to the camera&#039;s team has to be.&lt;br /&gt;
* &amp;quot;seeBodies&amp;quot; - Whether the camera will react to bodies.&lt;br /&gt;
* &amp;quot;seeAnimals&amp;quot; - Whether the camera will react to animals.&lt;br /&gt;
* &amp;quot;sight_threshold&amp;quot; - From 0.0 to 1.0, how lit up the lightgem has to be for the player to be detected.&lt;br /&gt;
* &amp;quot;sightTime&amp;quot; - After seeing the enemy (partial alert), the camera will wait this amount of time. If it still sees the enemy, it will sound the alarm. This gives the enemy some time to hide.&lt;br /&gt;
* &amp;quot;sightResume&amp;quot; - If the camera can&#039;t see the enemy anymore after a partial alert, pause for this amount of time. When this expires, the camera will resume sweeping.&lt;br /&gt;
* &amp;quot;alarm_duration&amp;quot; - Minimum duration of the fully alert state. Will be extended by half if the enemy is still in view at the end or was recently seen.&lt;br /&gt;
* &amp;quot;alarm_interval&amp;quot; - Amount of time inbetween each activation of the alarm sound, when fully alerted.&lt;br /&gt;
* &amp;quot;trigger_alarm_start&amp;quot; - Trigger targets when an alarm begins.&lt;br /&gt;
* &amp;quot;trigger_alarm_end&amp;quot; - Trigger targets when an alarm ends.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Follow Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera can track the enemy&#039;s movements. For as long as the security camera is partially or fully alerted, it will turn to the closest enemy it can see. The models for the camera and mount should be able to support this without clipping into each other. A ceiling-mounted camera will generally have much more freedom to turn than a wall-mounted camera.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;follow&amp;quot; - Enable to let the camera track the enemy horizontally.&lt;br /&gt;
* &amp;quot;follow_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, horizontally.&lt;br /&gt;
* &amp;quot;follow_speed_mult&amp;quot; - Speed up horizontal movements by this multiplier when the camera is following the enemy.&lt;br /&gt;
* &amp;quot;follow_incline&amp;quot; - The camera will also track the enemy vertically.&lt;br /&gt;
* &amp;quot;follow_incline_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, vertically.&lt;br /&gt;
* &amp;quot;follow_incline_speed&amp;quot; - Speed of vertical movements to track the enemy. Not affected by &#039;follow_speed_mult&#039;.&lt;br /&gt;
* &amp;quot;follow_constrain_up&amp;quot; - Limit how far the camera can turn upwards from its starting orientation.&lt;br /&gt;
* &amp;quot;follow_constrain_down&amp;quot; - Limit how far the camera can turn downwards from its starting orientation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Spotlight Spawnargs===&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;spotLight&amp;quot; is set to 1, the security camera&#039;s code will spawn a spotlight and align it with its view. This dates back to the Doom 3 days, so it follows different rules from the def_attach systems. If &amp;quot;useColors&amp;quot; is enabled, the spotlight&#039;s color will change depending on alert state. Otherwise it will look for a &amp;quot;_color&amp;quot; spawnarg on the camera.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can specify an existing light with the spawnarg &amp;quot;spotlight_custom&amp;quot;. Apart from &amp;quot;spotLight&amp;quot; and &amp;quot;useColors&amp;quot;, all other spotlight-relevant spawnargs are ignored. If no valid entity of spawnclass idLight is found, it&#039;ll spawn a spotlight instead.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;spotLight&amp;quot; - If &amp;quot;1&amp;quot; the camera will use a spotlight.&lt;br /&gt;
* &amp;quot;spotlight_range&amp;quot; - Reach of the spotlight.&lt;br /&gt;
* &amp;quot;spotlight_diameter&amp;quot; - Diameter of the spotlight&#039;s projection. If 0, will automatically be calculated to match spotlight_range and scanFov, for scanFov up to 90°.&lt;br /&gt;
* &amp;quot;spotlight_texture&amp;quot; - Texture used by the spotlight. You should use a texture that&#039;s designed for projected lights: one that uses a gradient as its falloff image. This ensures that light intensity gradually fades to black, rather than abruptly cutting to black.&lt;br /&gt;
* &amp;quot;spotlight_volumetric&amp;quot; - The spawned spotlight will be volumetric.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Color Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;useColors&amp;quot; - If &amp;quot;1&amp;quot; the camera will change the colour of its model and spotlight depending on its alert state.&lt;br /&gt;
* &amp;quot;color_sweeping&amp;quot; - Color when the camera is sweeping = unalerted. Default green.&lt;br /&gt;
* &amp;quot;color_sighted&amp;quot; - Color when the camera has noticed an enemy = partially alerted. Default yellow.&lt;br /&gt;
* &amp;quot;color_alerted&amp;quot; - Color when the camera has sounded the alarm = fully alerted. Default red.&lt;br /&gt;
* &amp;quot;_color&amp;quot; - If &amp;quot;useColors&amp;quot; is disabled, the model and spotlight will always have this color.&lt;br /&gt;
&lt;br /&gt;
As an alternative or complement to color spawnargs, you may make use of shaderParm7 in materials used by the security camera. shaderParm7 represents the alert state of the camera:&lt;br /&gt;
* 0 = unalerted&lt;br /&gt;
* 1 = was partially alerted for &amp;quot;sightTime&amp;quot; seconds but the enemy has disappeared, now waiting &amp;quot;sightResume&amp;quot; seconds before resuming sweeping.&lt;br /&gt;
* 2 = partially alerted&lt;br /&gt;
* 3 = fully alerted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Damage Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;health&amp;quot; - amount of damage the camera can take before being destroyed. Setting to 0 will make the camera invincible. Setting to 0 will make the camera invincible. Default base damage per hit: sword - 42; broadhead - 35; fire arrow direct hit - 400.&lt;br /&gt;
* &amp;quot;damage_blackjack&amp;quot; - how much damage the security camera takes from blackjack hits, default: 0.&lt;br /&gt;
* &amp;quot;damage_mult_&amp;quot; - a series of spawnargs to multiply how much damage the security camera takes from various damage sources. You can name specific weapon classnames or damageDefs in the spawnarg, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;.&lt;br /&gt;
* &amp;quot;damage_splash_falloff&amp;quot; - how quickly splash damage from fire arrows exponentially decreases with distance, default: 3.&lt;br /&gt;
* &amp;quot;damage_flinderize&amp;quot; - if a security camera is destroyed and the destroying hit (or post-destruction hit) is greater than this value, the security camera explodes into pieces. Default: 90.&lt;br /&gt;
* &amp;quot;def_flinder1&amp;quot; - the classname of the flinder pieces generated when a camera is flinderized by a heavy hit. Use &amp;quot;def_flinder2&amp;quot; etc. to generate more flinders.&lt;br /&gt;
* &amp;quot;flinder_offset1&amp;quot; - specifies the spawn point of the respective flinder piece relative to the camera&#039;s origin. Takes the camera&#039;s current rotation into account.&lt;br /&gt;
* &amp;quot;broken&amp;quot; - the security camera switches to this model when destroyed&lt;br /&gt;
* &amp;quot;broken_flinderized&amp;quot; - Optional. Specify the model of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - the security camera switches to this skin when destroyed&lt;br /&gt;
* &amp;quot;skin_flinderized&amp;quot; - Optional. Specify the skin of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;hideModelOnBreak&amp;quot; - the security camera will be hidden when destroyed, default: 0.&lt;br /&gt;
* &amp;quot;notice_destroyed&amp;quot; - Whether AIs will become alerted if they find this security camera destroyed.&lt;br /&gt;
* &amp;quot;fx_damage&amp;quot; - Fx to play whenever the camera is damaged while power is on.&lt;br /&gt;
* &amp;quot;fx_damage_nopower&amp;quot; - Fx to play whenever the camera is damaged while power is off.&lt;br /&gt;
* &amp;quot;fx_destroyed&amp;quot; - Fx to play whenever the camera is destroyed while power is on.&lt;br /&gt;
* &amp;quot;fx_destroyed_nopower&amp;quot; - Fx to play whenever the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;break_up_script&amp;quot; - This script is called when the camera is destroyed.&lt;br /&gt;
* &amp;quot;break_up_target&amp;quot; - This entity is triggered if the camera is destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sound Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_sight&amp;quot; - Sound emitted when the camera notices an enemy.&lt;br /&gt;
* &amp;quot;snd_moving&amp;quot; - Sound emitted when the camera is rotating.&lt;br /&gt;
* &amp;quot;snd_stationary&amp;quot; - Sound emitted by a stationary type of camera.&lt;br /&gt;
* &amp;quot;snd_alert&amp;quot; - Alarm sound emitted when fully alerted.&lt;br /&gt;
* &amp;quot;snd_end&amp;quot; - Sound emitted when the camera is about to reach the end point of a sweep.&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound emitted when the camera is destroyed.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound emitted when the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the camera emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;sprS_alert&amp;quot; - How far snd_alert propagates to AIs, at default this is a few rooms. Higher settings than mild can cause large framedrops due to mass AI alerts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sparks Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera spawns a particle emitter when it&#039;s destroyed. By default it uses a single-cycle spark particle which is periodically triggered at random intervals. When power to the camera is switched off, the sparks stop appearing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;sparks&amp;quot; - Whether to spawn a particle emitter at all.&lt;br /&gt;
* &amp;quot;sparks_particle&amp;quot; - Particle that is spawned.&lt;br /&gt;
* &amp;quot;sparks_delay&amp;quot; - Time taken for the particle emitter to spawn initially.&lt;br /&gt;
* &amp;quot;sparks_power_dependent&amp;quot; - Only show the particle if power to the destroyed camera is on.&lt;br /&gt;
* &amp;quot;sparks_interval&amp;quot; - For non-looping particles, minimum time between triggers.&lt;br /&gt;
* &amp;quot;sparks_interval_rand&amp;quot; - For non-looping particles, additional random factor added to the time between triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Model Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs are important if you change the camera model:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;broken&amp;quot; - Use this model when the camera is destroyed.&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot; - A vector that defines the offset of the camera&#039;s &#039;eye&#039; from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot; - A vector that defines the spotlight offset from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;flipAxis&amp;quot; - This and the next spawnarg can be used to turn a model such that it faces forwards. Not needed if the model was created forward-facing.&lt;br /&gt;
* &amp;quot;modelAxis&amp;quot;&lt;br /&gt;
* &amp;quot;skin&amp;quot; - This is the &amp;quot;on&amp;quot; skin. It may contain materials that make use of the colored keyword or shaderParm7, to change depending on alert state.&lt;br /&gt;
* &amp;quot;skin_on_spotlight_off&amp;quot; - This is the &amp;quot;on&amp;quot; skin, but with the spotlight toggled off. This is useful if your model contains inbuilt lightrays that should represent the spotlight.&lt;br /&gt;
* &amp;quot;skin_off&amp;quot; - This is the &amp;quot;off&amp;quot; skin. It should not contain materials with the colored keyword or shaderParm7.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - When the camera is destroyed it will switch to this skin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;start_off&amp;quot; - Whether the camera starts powered on or off.&lt;br /&gt;
* &amp;quot;cameraTarget&amp;quot; - Use the view from this entity instead of from self if sending a view to the display screen. See section &#039;&#039;The Display Screen&#039;&#039; for more.&lt;br /&gt;
* &amp;quot;gearSpeed&amp;quot; - This spawnarg is set on the ceiling pivot of the 2nd type of security camera. It controls how fast the gears turn when the security camera turns.&lt;br /&gt;
* &amp;quot;legacy&amp;quot; - This marks an old version of the security camera, for backwards compatibility with older missions.&lt;br /&gt;
&lt;br /&gt;
The security camera uses spawnargs to place its &#039;eye&#039; and spotlight in front of the model to ensure the view and spotlight aren&#039;t blocked by the model. If you use a different model, you might need to change these.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot;&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Damaging the Camera==&lt;br /&gt;
&lt;br /&gt;
===Damage sources===&lt;br /&gt;
&lt;br /&gt;
By default the security camera is vulnerable only to fire arrows (direct &amp;amp; splash damage). The &amp;quot;damage_&amp;quot; and &amp;quot;damage_mult_&amp;quot; spawnargs allow you to to specify how much damage security cameras take from each weapon, but be sure to communicate the camera&#039;s vulnerabilities to the player. You can create your own &amp;quot;damage_mult_&amp;quot; spawnargs by adding the name of a specific weapon classname or damageDef, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;. Unfortunately it does not appear to be possible to make water damage the camera, since TDM will crash upon load when a water response is applied to the camera. &lt;br /&gt;
&lt;br /&gt;
Setting &amp;quot;health&amp;quot; to 0 will make the camera totally invicible. Alternatively, you can make the camera immune to everything but fire arrow splash damage by binding a tight-fitting nodrawsolid_metal brush. A similar approach is to bind a brush that leaves parts of the camera exposed, i.e. the lens or face. Note that it will weaken fire arrows considerably if they hit from the wrong angle. A direct hit does up to 400 damage, while the splash does a distance-dependent amount of damage below 100. Note that collision detection is done using the camera&#039;s clipmodel, which has a different shape than the visual model.&lt;br /&gt;
&lt;br /&gt;
The player will receive feedback that the camera took damage in the form of spark effects, specified in spawnargs beginning with fx_. An .fx definiton is basically an instruction to emit a sequence of particles and sounds.&lt;br /&gt;
&lt;br /&gt;
===Destroying the Camera===&lt;br /&gt;
&lt;br /&gt;
Security cameras can not only be destroyed, but also be flinderized (burst apart into pieces) which occurs when the security camera takes a hit whose damage is higher than the value of the &amp;quot;damage_flinderize&amp;quot; spawnarg. The &amp;quot;broken&amp;quot; and &amp;quot;skin_broken&amp;quot; spawnargs let you set the model and skin when the camera is destroyed, while the optional &amp;quot;broken_flinderized&amp;quot; and &amp;quot;skin_flinderized&amp;quot; let you set the model and skin when the camera has been flinderized. The &amp;quot;def_flinder&amp;quot; and &amp;quot;flinder_offset&amp;quot; spawnargs allow you to specify the flinder pieces and their spawn point relative to the camera&#039;s origin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
===Script Events===&lt;br /&gt;
&lt;br /&gt;
The security camera supports the following script events:&lt;br /&gt;
* getSecurityCameraState() - Returns the security camera&#039;s state. 1 = unalerted, 2 = partially alerted, 3 = fully alerted, 4 = inactive (power off), 5 = destroyed, 0 = not a security camera.&lt;br /&gt;
* getShaderParm(7) - Returns the current value of shaderParm7 on the camera model. 0 = unalerted, 1 = about to resume sweep after a partial alert, 2 = partially alerted, 3 = fully alerted.&lt;br /&gt;
* On() and Off() - Switch the camera&#039;s power on or off (note the capitalisation).&lt;br /&gt;
* activate() and trigger() - Toggle the camera&#039;s power.&lt;br /&gt;
* getHealth() and setHealth(float newHealth) - As per the name. Setting health to 0 or lower will destroy the security camera, which is irreversible. setHealth() will make an invincible camera vulnerable.&lt;br /&gt;
* getEnemy() - Returns the entity that most recently caused or refreshed the security camera&#039;s suspicious or alert state.&lt;br /&gt;
* canSee() - Tests whether the security camera is able to see a specific entity. Currently only player1 is supported.&lt;br /&gt;
* setSightThreshold() - This changes how lit up the player&#039;s lightgem has to be for the security camera to see him, from 0.0 to 1.0.&lt;br /&gt;
* state_light(boolean set) - Switch the camera&#039;s spotlight on/off, if the camera has one.&lt;br /&gt;
* state_sweep(boolean set) - Switch the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* state_see_player(boolean set) - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
* toggle_light() - Toggle the spotlight on/off, if the camera has one.&lt;br /&gt;
* toggle_sweep() - Toggle the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* toggle_see_player() - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Functions===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject contains the following object functions:&lt;br /&gt;
* toggleSCSpotlight() - calls toggle_light() on the camera if it has a spotlight (spawnarg &amp;quot;spotLight&amp;quot; = &amp;quot;1&amp;quot;)&lt;br /&gt;
* toggleSCSweep() - calls toggle_sweep() on the camera&lt;br /&gt;
* toggleSCPlayer() - calls toggle_see_player() on the camera&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, these object functions simply call the toggle script events on the camera they belong to. This allows you to call the script events from i.e. buttons without scripting. To set this up:&lt;br /&gt;
# create an atdm:target_callobjectfunction entity&lt;br /&gt;
# give it the spawnarg &amp;quot;call&amp;quot; with the name of the desired object function, i.e. &amp;quot;toggleSCSpotlight&amp;quot;&lt;br /&gt;
# let it target the security camera&lt;br /&gt;
# when desired, trigger this entity (from a script, from a button etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scriptobjects===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject only consists of the 3 object functions mentioned above. Beyond some added utility, this scriptobject has no importance for the security camera and you can easily give it your own scriptobject instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upon Destruction===&lt;br /&gt;
&lt;br /&gt;
You may call a script when the camera is destroyed, as per the spawnarg &amp;quot;break_up_script&amp;quot;. This script should be able to receive the name of the destroyed security camera as input, i.e.:&lt;br /&gt;
 void camera_destroyed ( entity camera )&lt;br /&gt;
&lt;br /&gt;
An alternative is to use the spawnarg &amp;quot;break_up_target&amp;quot; to name an entity that calls the script when triggered, but this will not pass the name of the destroyed security camera unless you use an atdm:target_callscriptfunction entity with the spawnarg &amp;quot;forEach&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sending the camera&#039;s view to a Display Screen==&lt;br /&gt;
&lt;br /&gt;
You can create a display screen that shows that the camera sees: all that&#039;s needed is a func_static patch that uses a texture like &#039;&#039;textures/common/camera/camera1&#039;&#039;. It&#039;s recommended to put another patch behind it, since this func_static will get hidden if it&#039;s switched off. The screen then needs to be given a spawnarg &amp;quot;cameraTarget&amp;quot; that names either a security camera or a different entity, typically a target_null. The screen will display what that entity sees.&lt;br /&gt;
&lt;br /&gt;
To change the screen&#039;s field of view, apply the spawnargs &amp;quot;cameraFovX&amp;quot; and &amp;quot;cameraFovY&amp;quot; to the entity sending the view. Otherwise it will default to &amp;quot;scanFov&amp;quot; for security cameras or 120 for other entities.&lt;br /&gt;
&lt;br /&gt;
The screen is hidden or shown automatically if the screen is displaying a security camera&#039;s view. The screen can also be switched on/off manually by triggering it, but this requires the screen to start with the spawnarg &amp;quot;hide&amp;quot; &amp;quot;0&amp;quot; or &amp;quot;hide&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Multiple Display Screens / Reflective Water / Skybox===&lt;br /&gt;
&lt;br /&gt;
If you plan to have multiple security cameras sending to multiple display screens in your mission, or if the camera display will appear in the same player POV as the sky or reflective water surfaces, you&#039;ll need to use unique camera materials for each screen. You can find 9 additional camera materials in the textures/common/camera/ folder. If you should need even more, you can simply clone one of the materials and change the name after the &#039;&#039;map&#039;&#039; keyword.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examining a Test Map==&lt;br /&gt;
&lt;br /&gt;
You can obtain a test map with sample cameras in it here: [https://ftp.thedarkmod.com/tutorials/RemoteCamera/camerawiki2.pk4 camerawiki2.pk4]. Similar setups can be found as prefabs in AI/Machines.&lt;br /&gt;
&lt;br /&gt;
Open the map &#039;&#039;camerawiki.map&#039;&#039; in Dark Radiant. In this map, we have examples of the different cameras.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw1.jpg|256px|thumb|right|cam1]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A rotating camera that sweeps back and forth&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This camera (&#039;&#039;cam1&#039;&#039;) starts its rotation at 135 degrees (assuming +X is 0 degrees), and sweeps clockwise until it reaches 45 degrees. It pauses for a moment, then return-sweeps back to 135 degrees. It has a spotlight.&lt;br /&gt;
&lt;br /&gt;
The display for &#039;&#039;cam1&#039;&#039; is on the wall behind it. (Don&#039;t worry about the material being displayed backward in the screenshot.)&lt;br /&gt;
&lt;br /&gt;
The display patch uses the material &#039;&#039;camera1&#039;&#039; (provided in the camerawiki/materials/tdm_camera.mtr file).&lt;br /&gt;
&lt;br /&gt;
The four buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam1&#039;&#039; directly. When power is off, the display screen is hidden. You can simulate an &amp;quot;off&amp;quot; screen by making sure there&#039;s a black material behind the display. You could also place a glass material behind the display.&lt;br /&gt;
* Toggle Spotlight - calls the &#039;&#039;toggleSCSpotlight()&#039;&#039; object function in the camera&#039;s scriptobject, turning the spotlight on/off&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning Player detection on/off&lt;br /&gt;
* Toggle Sweep - calls the &#039;&#039;toggleSCSweep()&#039;&#039; object function in the camera&#039;s scriptobject, turning camera sweep on/off&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw2.jpg|256px|thumb|right|cam1&#039;s display]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&#039;&#039;&#039;A stationary camera that doesn&#039;t move&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw3.jpg|320px|thumb|right|cam2 and its display]]&lt;br /&gt;
This camera (&#039;&#039;cam2&#039;&#039;)  is stationary, w/o a spotlight.&lt;br /&gt;
&lt;br /&gt;
Its display, to its left, uses the material &#039;&#039;camera2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The two buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam2&#039;&#039; directly. When power is off, the display screen is hidden.&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning player detection on/off&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A screen showing the view from another entity (a target_null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw6.jpg|320px|thumb|right|a small screen showing what a target_null is seeing]]&lt;br /&gt;
&lt;br /&gt;
This is simply a screen referencing a &#039;&#039;target_null&#039;&#039; as its &#039;&#039;cameraTarget&#039;&#039;. The &#039;&#039;target_null&#039;&#039; is in a separate room pointed at a guard.&lt;br /&gt;
&lt;br /&gt;
If you look in the room where the guard is standing, you&#039;ll see that the &#039;&#039;target_null&#039;&#039; has the spawnargs &#039;&#039;cameraFovX&#039;&#039; and &#039;&#039;cameraFovY&#039;&#039;. These were set because the default field of view for a view from a non-camera entity is 120 by 120, which looks quite zoomed out. For a small screen like this one, 60 by 60 is much better.&lt;br /&gt;
&lt;br /&gt;
Also notice that the screen itself has the spawnarg &#039;&#039;hide&#039;&#039; &#039;&#039;0&#039;&#039;. This makes it respond to triggers by hiding or showing itself, allowing you to switch it on or off at the push of a button (see below).&lt;br /&gt;
&lt;br /&gt;
The button below the display does the following:&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets the screen directly to show or hide it. This only works because the screen has a &#039;&#039;hide&#039;&#039; spawnarg.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Security_Camera_(legacy)&amp;diff=33947</id>
		<title>Security Camera (legacy)</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Security_Camera_(legacy)&amp;diff=33947"/>
		<updated>2025-04-19T11:07:44Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Security Camera==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This is the article documenting the security camera of TDM 2.09 and older. See the article [[Security Camera]] for more recent versions.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The security camera (aka remote camera) has been a part of TDM for years, but has been rarely, if ever, used. Recent problems came to light when trying to use it, so I (grayman) decided to flesh it out for 2.06. That done, some issues supporting a more Thief-like camera model were discovered too late in the 2.06 release cycle to safely accommodate required changes in the camera, so work will continue into 2.07.&lt;br /&gt;
&lt;br /&gt;
The security camera is different than the cinematic camera discussed in [[Cutscenes]]. The cinematic camera takes over the entire screen and presents to the player what the camera sees. The security camera paints its view on a func_static display provided by the map author.&lt;br /&gt;
&lt;br /&gt;
There are different types of cameras:&lt;br /&gt;
&lt;br /&gt;
* A rotating camera that sweeps back and forth.&lt;br /&gt;
* A stationary camera that doesn&#039;t move.&lt;br /&gt;
* A camera that uses the view from another entity (typically a target_null) to show a scene on its display screen.&lt;br /&gt;
&lt;br /&gt;
The camera provides the following features:&lt;br /&gt;
&lt;br /&gt;
* An optional spotlight that points forward, lighting the area in the direction the camera faces. This spotlight can be toggled on/off.&lt;br /&gt;
* The ability to toggle the camera power on/off. This is useful if the mapper wants to give the player the ability to shut down power to an area.&lt;br /&gt;
* The ability to halt a rotating camera so it stops sweeping. It then becomes equivalent to a stationary camera. Sweeping can be started back up again.&lt;br /&gt;
* The camera will normally spot the player, but this can be toggled on/off. When the player is spotted, the camera initially plays a short alert sound. The player is given a short time to hide, but when that time expires and the player is still in view, another alarm sounds. This alarm will play intermittently for a while, even if the player moves out of sight. This second alarm will alert nearby guards.&lt;br /&gt;
* If the camera has targets, these will be activated when the second &amp;quot;player alarm&amp;quot; plays. This gives the map author the ability to play a more powerful alarm than the one given off by the camera. (Or to do a variety of other things.)&lt;br /&gt;
&lt;br /&gt;
==The Security Camera Entity and its Spawnargs==&lt;br /&gt;
&lt;br /&gt;
The camera is &#039;&#039;func_securitycamera&#039;&#039;, and it&#039;s found in the &#039;&#039;Func&#039;&#039; folder in DR. It comes with a default model, which the map author can change if he wishes.&lt;br /&gt;
&lt;br /&gt;
Place the camera entity in your map, and orient it toward its starting direction. A rotating camera will sweep clockwise, then halt a moment, then sweep back counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
Spawnargs:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;rotate&amp;quot; - If &amp;quot;1&amp;quot; (default) the camera will rotate. If &amp;quot;0&amp;quot;, the camera becomes stationary.&lt;br /&gt;
* &amp;quot;scanDist&amp;quot; - The distance limit for spotting the player, and how far forward the spotlight will travel. Default is 200 units. &lt;br /&gt;
* &amp;quot;sweepSpeed&amp;quot; - How many seconds it takes a rotating camera to complete a sweep in one direction. Default is 5 seconds.&lt;br /&gt;
* &amp;quot;health&amp;quot; - Cameras can be &#039;killed&#039;. Default is 100.&lt;br /&gt;
* &amp;quot;scanFov&amp;quot; - The camera&#039;s FOV. Default is 90 degrees.&lt;br /&gt;
* &amp;quot;sweepAngle&amp;quot; - The angle of sweep. Default is 90 degrees. You can cause a camera to initially sweep in the counter-clockwise direction by setting this to a negative number.&lt;br /&gt;
* &amp;quot;seePlayer&amp;quot; - If &amp;quot;1&amp;quot; (default) the camera will react if it sees the player. If &amp;quot;0&amp;quot;, it won&#039;t.&lt;br /&gt;
* &amp;quot;sightResume&amp;quot; - How long the camera pauses after losing sight of the player. When this expires, the camera will resume scanning. Default is 1.5 seconds.&lt;br /&gt;
* &amp;quot;sightTime&amp;quot; - After spotting the player, the camera will pause this amount of time before it sounds an alarm. Default is 5 seconds. This gives the player some time to hide.&lt;br /&gt;
* &amp;quot;sweepWait&amp;quot; - How long the pause is after a sweep completes and starting the return sweep. Default is 0.5 seconds.&lt;br /&gt;
* &amp;quot;wait&amp;quot; - How long the camera will play its alarm after spotting the player (and deciding it&#039;s really the player). Default is 20 seconds. If the player is still visible at the end of this time, the clock will start over again. Otherwise, the camera will pause &amp;quot;sightResume&amp;quot; seconds, then return to scanning.&lt;br /&gt;
* &amp;quot;spotLight&amp;quot; - If &amp;quot;1&amp;quot; the camera will start with a spotlight. If you choose not to start with a spotlight, change the camera&#039;s skin spawnarg to &amp;quot;security_camera_on_spotlight_off&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Important Spawnargs if you change the camera model:&lt;br /&gt;
&lt;br /&gt;
The default camera uses spawnargs to place its &#039;eye&#039; and spotlight. If you use a different model, you might need to change these.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot; - A vector that defines the offset of the camera&#039;s &#039;eye&#039; from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot; - A vector that defines the spotlight offset from the camera&#039;s origin.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;cameraTarget&amp;quot; Spawnarg:&lt;br /&gt;
&lt;br /&gt;
For a camera that&#039;s displaying its view on a screen, this spawnarg can be left undefined.&lt;br /&gt;
&lt;br /&gt;
For a camera that&#039;s replacing its own view with that of another entity (i.e. a target_null), set the following:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;cameraTarget&amp;quot; - The name of the entity supplying the view.&lt;br /&gt;
&lt;br /&gt;
==The Display Screen==&lt;br /&gt;
&lt;br /&gt;
The display screen where the camera&#039;s image is shown is a func_static patch that uses the shader &#039;&#039;textures/darkmod/camera&#039;&#039;. Size the patch appropriately.&lt;br /&gt;
&lt;br /&gt;
Spawnargs:&lt;br /&gt;
&lt;br /&gt;
* cameraTarget - The name of the camera whose view will be painted on this display.&lt;br /&gt;
&lt;br /&gt;
If you plan to use more than one camera in your mission, or if the camera display will appear in the same player POV as the sky or reflective water surfaces, you&#039;ll need to copy the material shader &#039;&#039;textures/darkmod/camera&#039;&#039; (in materials/tdm_security_camera.mtr) to a map-specific *.mtr file, rename it to something like &#039;&#039;camera1&#039;&#039;, and give it a unique &#039;&#039;map&#039;&#039; keyword. Place this file in your mission&#039;s &#039;&#039;materials&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
For example, if you have two cameras in your mission, you would assign one of these shaders to the display for the first camera, and the other shader to the display for the second:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
camera1&lt;br /&gt;
{&lt;br /&gt;
	qer_editorimage textures/editor/cameragui.tga&lt;br /&gt;
	noshadows&lt;br /&gt;
	{&lt;br /&gt;
		red Parm0&lt;br /&gt;
		green Parm1&lt;br /&gt;
		blue Parm2&lt;br /&gt;
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen&lt;br /&gt;
  		scale -1, -1&lt;br /&gt;
		translate -1, -1&lt;br /&gt;
		map &amp;quot;camera1&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
camera2&lt;br /&gt;
{&lt;br /&gt;
	qer_editorimage textures/editor/cameragui.tga&lt;br /&gt;
	noshadows&lt;br /&gt;
	{&lt;br /&gt;
		red Parm0&lt;br /&gt;
		green Parm1&lt;br /&gt;
		blue Parm2&lt;br /&gt;
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen&lt;br /&gt;
  		scale -1, -1&lt;br /&gt;
		translate -1, -1&lt;br /&gt;
		map &amp;quot;camera2&amp;quot;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the &#039;&#039;map &amp;quot;camera1&amp;quot;&#039;&#039; and &#039;&#039;map &amp;quot;camera2&amp;quot;&#039;&#039; lines. These unique names allow the renderer to correctly display both camera displays in the same mission.&lt;br /&gt;
&lt;br /&gt;
==Examining a Test Map==&lt;br /&gt;
&lt;br /&gt;
You can obtain a test map with sample cameras in it here: [https://ftp.thedarkmod.com/tutorials/RemoteCamera/camerawiki.pk4 camerawiki.pk4].&lt;br /&gt;
&lt;br /&gt;
Open the map &#039;&#039;camerawiki.map&#039;&#039; in Dark Radiant. In this map, we have examples of the different cameras.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw1.jpg|256px|thumb|right|cam1]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A rotating camera that sweeps back and forth&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This camera (&#039;&#039;cam1&#039;&#039;) starts its rotation at 135 degrees (assuming +X is 0 degrees), and sweeps clockwise until it reaches 45 degrees. It pauses for a moment, then return-sweeps back to 135 degrees. It has a spotlight.&lt;br /&gt;
&lt;br /&gt;
The display for &#039;&#039;cam1&#039;&#039; is on the wall behind it. (Don&#039;t worry about the material being displayed backward.)&lt;br /&gt;
&lt;br /&gt;
The display patch uses a custom material &#039;&#039;camera1&#039;&#039; (provided in the camerawiki/materials/camera.mtr file). It&#039;s custom because there are other displays in this test map.&lt;br /&gt;
&lt;br /&gt;
The four buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam1&#039;&#039; directly. When power is off, the display screen is hidden. You can simulate an &amp;quot;off&amp;quot; screen by making sure there&#039;s a black material behind the display. You could also place a glass material behind the display.&lt;br /&gt;
* Toggle Spotlight - calls the &#039;&#039;toggleSCSpotlight()&#039;&#039; routine in the camera&#039;s scriptobject, turning the spotlight on/off&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; routine in the camera&#039;s scriptobject, turning Player detection on/off&lt;br /&gt;
* Toggle Sweep - calls the &#039;&#039;toggleSCSweep()&#039;&#039; routine in the camera&#039;s scriptobject, turning camera sweep on/off&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw2.jpg|256px|thumb|right|cam1&#039;s display]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&#039;&#039;&#039;A stationary camera that doesn&#039;t move&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw3.jpg|320px|thumb|right|cam2 and its display]]&lt;br /&gt;
This camera (&#039;&#039;cam2&#039;&#039;)  is stationary, w/o a spotlight.&lt;br /&gt;
&lt;br /&gt;
Its display, to its left, uses a custom material &#039;&#039;camera2&#039;&#039; (provided in the camerawiki/materials/camera.mtr file). It&#039;s custom because there are other displays in this test map.&lt;br /&gt;
&lt;br /&gt;
The two buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam2&#039;&#039; directly. When power is off, the display screen is hidden.&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; routine in the camera&#039;s scriptobject, turning Player detection on/off&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A camera that uses the view from another entity (typically a target_null) to show a scene on its display screen&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw6.jpg|320px|thumb|right|cam3&#039;s display]]&lt;br /&gt;
&lt;br /&gt;
This camera (&#039;&#039;cam3&#039;&#039;) is stationary, w/o a spotlight, and it doesn&#039;t spot the player. In the test map, you&#039;ll find it in the blue room. Note that the camera uses the following spawnarg:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;cameraTarget&amp;quot; &amp;quot;Cam3View&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you look in the room where the guard is standing, you&#039;ll see a &#039;&#039;target_null&#039;&#039; named &#039;&#039;Cam3View&#039;&#039;, which provides the view to the display screen.&lt;br /&gt;
&lt;br /&gt;
Look at the other spawnargs on the camera. You&#039;ll see that it doesn&#039;t rotate, it doesn&#039;t have a spotlight, and it won&#039;t spot the player.&lt;br /&gt;
&lt;br /&gt;
This camera could be used for something like &#039;peeking through keyholes&#039;, though that functionality hasn&#039;t been tested in 2.06. It would most likely need an accompanying &#039;player ear&#039; in the observed room (not yet implemented). To simulate a keyhole, the display screen would be placed inside the opening. You&#039;d also need a companion camera looking the other way (room-&amp;gt;hall).&lt;br /&gt;
&lt;br /&gt;
The button below the display does the following&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam3&#039;&#039; directly. When power is off, the display screen is hidden.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Xrays&amp;diff=33632</id>
		<title>Xrays</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Xrays&amp;diff=33632"/>
		<updated>2024-12-09T10:31:59Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: /* Supported entity types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Xrays ==&lt;br /&gt;
&lt;br /&gt;
Xray screens are flexible mapping tools that allow mappers to achieve a variety of effects related to the appearance and visibility of entities ingame. The effects that are possible with xrays and can be used in any combination are:&lt;br /&gt;
&lt;br /&gt;
* Changing the model and/or skin of entities seen through the xray screen. The xray version of the entity may either replace or blend with the normal version.&lt;br /&gt;
* Hiding or revealing entities when looking through the xray screen.&lt;br /&gt;
* Rendering entities in front of opaque obstacles.&lt;br /&gt;
&lt;br /&gt;
Unlike in real life, xray screens in TDM don&#039;t use an xray light source. All that&#039;s needed for the xray feature is an xray screen and appropriate spawnargs on entities that should be affected by the xray feature.&lt;br /&gt;
&lt;br /&gt;
Xray screens may be put on brushes/patches or in GUI overlays. Note that they must be converted to an entity, which may be a func_static.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spawnargs == &lt;br /&gt;
&lt;br /&gt;
The following xray spawnargs exist:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;model_xray&#039;&#039;&#039;: switch to this model when seen through an xray screen.&lt;br /&gt;
* &#039;&#039;&#039;skin_xray&#039;&#039;&#039;: switch to this skin when seen through an xray screen. 2.10 contains new generic skins &amp;quot;visible&amp;quot; and &amp;quot;invisible&amp;quot; which can be used by the &amp;quot;skin_xray&amp;quot; and &amp;quot;skin&amp;quot; spawnargs to change visibility.&lt;br /&gt;
* &#039;&#039;&#039;xray&#039;&#039;&#039;: set to &amp;quot;1&amp;quot; to simply mark this entity as an xray enabled entity without changing its appearance. Useful if you only want certain xray effects, like rendering in front of other objects.&lt;br /&gt;
* &#039;&#039;&#039;suppressInSubview&#039;&#039;&#039;: specific to lights, setting this to &amp;quot;1&amp;quot; makes the light visible only in normal vision while &amp;quot;2&amp;quot; makes it visible only in xray vision. Note that this affects other subviews like mirrors and camera screens, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need a material for an xray screen. TDM already contains these materials by default, with a warped version of each also being available:&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray&#039;&#039;&#039;: Shows xray-enabled entities through opaque obstacles and optionally changes their model and/or skin. Skin changes may be less visible than expected due to blending of normal and xray models.&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray_exclusive&#039;&#039;&#039;: Shows xray-enabled entities through opaque obstacles and optionally changes their model and/or skin. Excludes everything else.&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray_replacing&#039;&#039;&#039;: Replaces the model and/or skin of xray-enabled entities seen through this material. Doesn&#039;t show entities through opaque obstacles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For GUIs (i.e. xray glasses), the following xray materials are available, with a warped version of each also being available:&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_replacing&#039;&#039;&#039;: Replaces the normal model with the xray model. No xray vision through opaque obstacles.&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_mixed&#039;&#039;&#039;: Shows both the normal and xray models transparently. No xray vision through opaque obstacles.&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_exclusive&#039;&#039;&#039;: Shows xray-enabled entities through solid obstacles, optionally changes their model and/or skin and excludes everything else.&lt;br /&gt;
(See [[Xrays in GUIs]] for more details)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When working with these materials, it can be helpful to know what the 2 factors are that result in their differing behaviour:&lt;br /&gt;
&lt;br /&gt;
1) &#039;&#039;&#039;xrayRenderMap&#039;&#039;&#039;: This keyword identifies an xray stage in the material. By default it will only show xray enabled entities and otherwise be black (&amp;quot;exclusive&amp;quot;), but you can add the word &amp;quot;inclusive&amp;quot; behind it so it also shows everything else.&lt;br /&gt;
&lt;br /&gt;
2) &#039;&#039;&#039;blend mode&#039;&#039;&#039;: This affects how the xray view is rendered:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;blend add&#039;&#039;&#039; results in literal xray vision, meaning that xray entities are rendered before everything else since they&#039;re just added on top of whatever else the player is seeing. This works best with a default xrayRenderMap (&amp;quot;exclusive&amp;quot;), since an &amp;quot;inclusive&amp;quot; xrayRenderMap would result in everything else being shown twice, at double brightness.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;blend blend&#039;&#039;&#039; means that the xray view replaces the normal view, swapping an entity&#039;s normal appearance for its xray appearance and (if exclusive) replacing everything else with blackness.&lt;br /&gt;
&lt;br /&gt;
* For GUIs, special blend modes are used in the default materials to allow the xray effect to only occur on parts of the screen. If you want your xray GUI to affect the whole screen you may use a regular blend mode as above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Xray demo map ==&lt;br /&gt;
&lt;br /&gt;
You may download a small test FM demonstrating the xray feature from [https://ftp.thedarkmod.com/tutorials/Xrays/xray_demo.pk4 here].&lt;br /&gt;
It consists of a small room with various xray-enabled entities, and you start looking through a wooden frame containing an xray screen. You&#039;ll also find a pair of equippable xray glasses on the table. See below for some screenshots from the test FM using various materials:&lt;br /&gt;
&lt;br /&gt;
[[File:Xray replace.jpg|800px|thumb|left|Uses material: textures/darkmod/sfx/xray_replacing]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray vision.jpg|800px|thumb|left|Uses material: textures/darkmod/sfx/xray]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray gui replace.jpg|800px|thumb|left|Uses material: xray_glasses_overlay_replacing_warped]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray gui mix.jpg|800px|thumb|left|Uses material: xray_glasses_overlay_mixed_warped]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported entity types ==&lt;br /&gt;
&lt;br /&gt;
This is how the following entities can be affected by the xray feature at present:&lt;br /&gt;
&lt;br /&gt;
* Entities with models, including AIs: &amp;quot;model_xray&amp;quot; and &amp;quot;skin_xray&amp;quot; both work.&lt;br /&gt;
* Brushes and patches (when first converted to an entity): &amp;quot;model_xray&amp;quot; and &amp;quot;skin_xray&amp;quot; both work.&lt;br /&gt;
* Lights: the suppressInSubview spawnarg can be used to toggle their visibility.&lt;br /&gt;
* Func_emitters: &amp;quot;skin_xray&amp;quot; works, but not &amp;quot;model_xray&amp;quot;.&lt;br /&gt;
* Func_smokes: suppressInSubview may work, but otherwise no way to manipulate these for the xray system.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
* The xray system doesn&#039;t affect solidity or frobability of xray-enabled entities, so separate scripting is required to handle this. Ideally this would be part of a scriptobject of an equippable item like &amp;quot;xray glasses&amp;quot; - see [[Xrays in GUIs]] for more.&lt;br /&gt;
* Xray vision to see entities through solid obstacles only works if the entity is already being rendered. You can&#039;t see entities in neighbouring rooms if all the visportal to that room are closed. This would be a good reason to keep such xray screens stationary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[Xrays in GUIs]]: Describes how the equippable &amp;quot;xray glasses&amp;quot; inventory item was made.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Creating Multiple Skins For A Model]]: Describes general info for how to make skins.&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Xrays&amp;diff=33631</id>
		<title>Xrays</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Xrays&amp;diff=33631"/>
		<updated>2024-12-09T10:31:45Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: /* Supported entity types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Xrays ==&lt;br /&gt;
&lt;br /&gt;
Xray screens are flexible mapping tools that allow mappers to achieve a variety of effects related to the appearance and visibility of entities ingame. The effects that are possible with xrays and can be used in any combination are:&lt;br /&gt;
&lt;br /&gt;
* Changing the model and/or skin of entities seen through the xray screen. The xray version of the entity may either replace or blend with the normal version.&lt;br /&gt;
* Hiding or revealing entities when looking through the xray screen.&lt;br /&gt;
* Rendering entities in front of opaque obstacles.&lt;br /&gt;
&lt;br /&gt;
Unlike in real life, xray screens in TDM don&#039;t use an xray light source. All that&#039;s needed for the xray feature is an xray screen and appropriate spawnargs on entities that should be affected by the xray feature.&lt;br /&gt;
&lt;br /&gt;
Xray screens may be put on brushes/patches or in GUI overlays. Note that they must be converted to an entity, which may be a func_static.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spawnargs == &lt;br /&gt;
&lt;br /&gt;
The following xray spawnargs exist:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;model_xray&#039;&#039;&#039;: switch to this model when seen through an xray screen.&lt;br /&gt;
* &#039;&#039;&#039;skin_xray&#039;&#039;&#039;: switch to this skin when seen through an xray screen. 2.10 contains new generic skins &amp;quot;visible&amp;quot; and &amp;quot;invisible&amp;quot; which can be used by the &amp;quot;skin_xray&amp;quot; and &amp;quot;skin&amp;quot; spawnargs to change visibility.&lt;br /&gt;
* &#039;&#039;&#039;xray&#039;&#039;&#039;: set to &amp;quot;1&amp;quot; to simply mark this entity as an xray enabled entity without changing its appearance. Useful if you only want certain xray effects, like rendering in front of other objects.&lt;br /&gt;
* &#039;&#039;&#039;suppressInSubview&#039;&#039;&#039;: specific to lights, setting this to &amp;quot;1&amp;quot; makes the light visible only in normal vision while &amp;quot;2&amp;quot; makes it visible only in xray vision. Note that this affects other subviews like mirrors and camera screens, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need a material for an xray screen. TDM already contains these materials by default, with a warped version of each also being available:&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray&#039;&#039;&#039;: Shows xray-enabled entities through opaque obstacles and optionally changes their model and/or skin. Skin changes may be less visible than expected due to blending of normal and xray models.&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray_exclusive&#039;&#039;&#039;: Shows xray-enabled entities through opaque obstacles and optionally changes their model and/or skin. Excludes everything else.&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray_replacing&#039;&#039;&#039;: Replaces the model and/or skin of xray-enabled entities seen through this material. Doesn&#039;t show entities through opaque obstacles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For GUIs (i.e. xray glasses), the following xray materials are available, with a warped version of each also being available:&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_replacing&#039;&#039;&#039;: Replaces the normal model with the xray model. No xray vision through opaque obstacles.&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_mixed&#039;&#039;&#039;: Shows both the normal and xray models transparently. No xray vision through opaque obstacles.&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_exclusive&#039;&#039;&#039;: Shows xray-enabled entities through solid obstacles, optionally changes their model and/or skin and excludes everything else.&lt;br /&gt;
(See [[Xrays in GUIs]] for more details)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When working with these materials, it can be helpful to know what the 2 factors are that result in their differing behaviour:&lt;br /&gt;
&lt;br /&gt;
1) &#039;&#039;&#039;xrayRenderMap&#039;&#039;&#039;: This keyword identifies an xray stage in the material. By default it will only show xray enabled entities and otherwise be black (&amp;quot;exclusive&amp;quot;), but you can add the word &amp;quot;inclusive&amp;quot; behind it so it also shows everything else.&lt;br /&gt;
&lt;br /&gt;
2) &#039;&#039;&#039;blend mode&#039;&#039;&#039;: This affects how the xray view is rendered:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;blend add&#039;&#039;&#039; results in literal xray vision, meaning that xray entities are rendered before everything else since they&#039;re just added on top of whatever else the player is seeing. This works best with a default xrayRenderMap (&amp;quot;exclusive&amp;quot;), since an &amp;quot;inclusive&amp;quot; xrayRenderMap would result in everything else being shown twice, at double brightness.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;blend blend&#039;&#039;&#039; means that the xray view replaces the normal view, swapping an entity&#039;s normal appearance for its xray appearance and (if exclusive) replacing everything else with blackness.&lt;br /&gt;
&lt;br /&gt;
* For GUIs, special blend modes are used in the default materials to allow the xray effect to only occur on parts of the screen. If you want your xray GUI to affect the whole screen you may use a regular blend mode as above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Xray demo map ==&lt;br /&gt;
&lt;br /&gt;
You may download a small test FM demonstrating the xray feature from [https://ftp.thedarkmod.com/tutorials/Xrays/xray_demo.pk4 here].&lt;br /&gt;
It consists of a small room with various xray-enabled entities, and you start looking through a wooden frame containing an xray screen. You&#039;ll also find a pair of equippable xray glasses on the table. See below for some screenshots from the test FM using various materials:&lt;br /&gt;
&lt;br /&gt;
[[File:Xray replace.jpg|800px|thumb|left|Uses material: textures/darkmod/sfx/xray_replacing]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray vision.jpg|800px|thumb|left|Uses material: textures/darkmod/sfx/xray]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray gui replace.jpg|800px|thumb|left|Uses material: xray_glasses_overlay_replacing_warped]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray gui mix.jpg|800px|thumb|left|Uses material: xray_glasses_overlay_mixed_warped]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported entity types ==&lt;br /&gt;
&lt;br /&gt;
This is how the following entities can be affected by the xray feature at present:&lt;br /&gt;
&lt;br /&gt;
* Entities with models, including AIs: &amp;quot;model_xray&amp;quot; and &amp;quot;skin_xray&amp;quot; both work.&lt;br /&gt;
* Brushes and patches (when first conferted to an entity): &amp;quot;model_xray&amp;quot; and &amp;quot;skin_xray&amp;quot; both work.&lt;br /&gt;
* Lights: the suppressInSubview spawnarg can be used to toggle their visibility.&lt;br /&gt;
* Func_emitters: &amp;quot;skin_xray&amp;quot; works, but not &amp;quot;model_xray&amp;quot;.&lt;br /&gt;
* Func_smokes: suppressInSubview may work, but otherwise no way to manipulate these for the xray system.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
* The xray system doesn&#039;t affect solidity or frobability of xray-enabled entities, so separate scripting is required to handle this. Ideally this would be part of a scriptobject of an equippable item like &amp;quot;xray glasses&amp;quot; - see [[Xrays in GUIs]] for more.&lt;br /&gt;
* Xray vision to see entities through solid obstacles only works if the entity is already being rendered. You can&#039;t see entities in neighbouring rooms if all the visportal to that room are closed. This would be a good reason to keep such xray screens stationary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[Xrays in GUIs]]: Describes how the equippable &amp;quot;xray glasses&amp;quot; inventory item was made.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Creating Multiple Skins For A Model]]: Describes general info for how to make skins.&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Lightgem&amp;diff=32865</id>
		<title>Lightgem</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Lightgem&amp;diff=32865"/>
		<updated>2024-05-06T15:35:02Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &lt;br /&gt;
&lt;br /&gt;
Page text made by forum user Fiver: https://forums.thedarkmod.com/index.php?/topic/22327-how-can-i-create-an-account-on-the-tdm-wiki/&amp;amp;do=findComment&amp;amp;comment=491145 &lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[[File:Hud.jpg|right|thumb|The lightgem is shown as part of the [[The_Dark_Mod_Gameplay#HUD_(Heads-Up_Display)|HUD]]:&amp;lt;br/&amp;gt;2. A breath indicator when underwater&amp;lt;br/&amp;gt;3. The lightgem itself&amp;lt;br/&amp;gt;4. A health indicator.&amp;lt;br/&amp;gt;Two wings flank the lightgem indicating if the player is crouching.]]&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;lightgem&#039;&#039;&#039; is a light indicator on the [[The_Dark_Mod_Gameplay#HUD_(Heads-Up_Display)|HUD]] and an important part of [[The Dark Mod Gameplay]].&lt;br /&gt;
&lt;br /&gt;
The lightgem itself indicates how visible the player is. The visibility is based on how much light is hitting the player, but also depends on whether you are crouched, moving, have a weapon drawn, or being under water. At maximum intensity, a thin red frame will appear around the lightgem.&lt;br /&gt;
Use of the lightgem can be practiced in the [[Training Mission (OM)|Training Mission]], primarily in the room Stealth &amp;amp; Shadows.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The wings on either side of the gem indicates when the player is crouching.&lt;br /&gt;
&lt;br /&gt;
Below the lightgem is a health indicator. When the player is injured, a small red bar appears below the lightgem. The bar shows how much health you have left and decreases from right to left. Health potions and various types of food will replenish health. The bar remains visible until the health is fully restored.&lt;br /&gt;
&lt;br /&gt;
Above the lightgem is a breath indicator. When the player is under water, a small blue bar appears above the lightgem. The bar shows how much air you have left and decreases from right to left. When the bar runs out, you&#039;ll begin to take damage. Surfacing or using a Breath Potion will restore your air bar.&lt;br /&gt;
&lt;br /&gt;
The lightgem is an object that the player always carries and is not visible in the inventory.&lt;br /&gt;
&lt;br /&gt;
A user can disable the lightgem and the wings in Settings - Gameplay - General - Hide Lightgem. The health indicator and breath indicator will remain visible.&lt;br /&gt;
&lt;br /&gt;
[[Category:Equipment]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Ways_of_calling_a_script&amp;diff=30986</id>
		<title>A to Z Scripting: Ways of calling a script</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Ways_of_calling_a_script&amp;diff=30986"/>
		<updated>2024-01-29T17:05:27Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: /* target_callscriptfunction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TDM has many methods for calling scripts, some overlap with others but there are always subtle differences. Often you can combine systems such as the objective system with scripting in order to get results that wouldn&#039;t easily be possible with either system alone. &lt;br /&gt;
&lt;br /&gt;
Some of the methods allow you to pass on to the script as input variables which entities were involved in calling the script. This allows you to write a single script which chooses to do different things depending on what activated it, i.e. you could have a portal chamber where each portal teleports the player to a different destination even though they all call the same script. You could set custom spawnargs on the entities and use them in the scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== From other scripts ==&lt;br /&gt;
To call a script from another script, simply write the name of the script followed by input brackets. The script will wait for the called script to finish.&lt;br /&gt;
 void script2()&lt;br /&gt;
 {&lt;br /&gt;
 	script1();		//call script1, wait for script1 to finish&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can write &amp;quot;thread&amp;quot; in front. Both scripts will run simultaneously, because each one runs in its own thread.&lt;br /&gt;
 void script2()&lt;br /&gt;
 {&lt;br /&gt;
 	thread script1();	//call script1, don&#039;t wait&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can only call scripts that the engine already knows about, so the called script (script1) needs to be higher up than the calling script (script2). If you&#039;re using general .script files ([[A to Z Scripting: Setting up the .script files]]), the same applies to the order in which you #include your .script files.&lt;br /&gt;
&lt;br /&gt;
The main advantage of calling one script from another is that you can give as much input as you like - if the called script is designed to use input (see [[A to Z Scripting: Utility scripts]] for more). Other methods can usually only provide 1 or 2 pieces of input: the entity that called the script (i.e. a trigger brush) and the entity that triggered the calling entity (i.e. a player or AI stepping into the trigger brush).&lt;br /&gt;
&lt;br /&gt;
== target_callscriptfunction ==&lt;br /&gt;
You can create an entity in DR called target_callscriptfunction and give it the spawnarg &amp;quot;call&amp;quot; with the name of the script without brackets, i.e. &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;. Whenever this entity is triggered by something, i.e. a button, the script will be called.&lt;br /&gt;
&lt;br /&gt;
These entities are among the most versatile ways to call a script because, with the spawnarg &amp;quot;foreach&amp;quot; &amp;quot;1&amp;quot; and at least one target, they can pass on 3 entities to the script:&lt;br /&gt;
* one target of the callscriptfunction entity. The script will get repeated on each target, one by one (that&#039;s where &amp;quot;foreach&amp;quot; comes from)&lt;br /&gt;
* the entity that triggered the callscriptfunction entity (aka the activator)(i.e. a button)&lt;br /&gt;
* the name of the callscriptfunction entity itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic example: simply calling a script with no input ===&lt;br /&gt;
 void script1()&lt;br /&gt;
 {&lt;br /&gt;
  	sys.println(&amp;quot;script1 has been called.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //spawnarg on the callscriptfunction entity:&lt;br /&gt;
 &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced example: teleportation script to teleport targeted entities in 2 directions ===&lt;br /&gt;
Here&#039;s a more complex example of a teleportation script that uses all 3 entities that a callscriptfunction can pass to a script:&lt;br /&gt;
 void teleport_targets_away(entity ent_target, entity ent_button, entity ent_callscriptfunction)&lt;br /&gt;
 {&lt;br /&gt;
 	sys.println(&amp;quot;the first entity (the target) is &amp;quot; + ent_target.getName());&lt;br /&gt;
 	sys.println(&amp;quot;the second entity (the button) is &amp;quot; + ent_button.getName());&lt;br /&gt;
 	sys.println(&amp;quot;the third entity (the callscriptfunction) is &amp;quot; + ent_callscriptfunction.getName());&lt;br /&gt;
  &lt;br /&gt;
 	float teleportation_direction 	= ent_button.getFloatKey(&amp;quot;direction&amp;quot;);			//find the teleportation direction, stored on the button&lt;br /&gt;
 	vector teleportation_vector	= ent_callscriptfunction.getVectorKey(&amp;quot;vector&amp;quot;);	//find the teleportation vector, stored on the callscriptfunction entity&lt;br /&gt;
 	if (teleportation_direction == -1) teleportation_vector = -teleportation_vector;	//invert the teleportation vector if the direction is backwards&lt;br /&gt;
 &lt;br /&gt;
 	ent_target.setOrigin(ent_target.getOrigin() + teleportation_vector);			//teleport the target&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The setup in the map would be 2 buttons (1 per direction) targeting a callscriptfunction entity which targets the entities you want to get teleported. The spawnargs are as follows:&lt;br /&gt;
* callscriptfunction entity&lt;br /&gt;
** spawnarg: &amp;quot;foreach&amp;quot; &amp;quot;1&amp;quot; (so it repeats for every target and passes on its name and the button that triggered it)&lt;br /&gt;
** spawnarg: &amp;quot;call&amp;quot; &amp;quot;teleport_targets_away&amp;quot;&lt;br /&gt;
** custom spawnarg: &amp;quot;vector&amp;quot;, with whatever teleportation vector you want i.e. &amp;quot;450 0 0&amp;quot;&lt;br /&gt;
* 2 buttons targeting the callscriptfunction entity&lt;br /&gt;
** one button with custom spawnarg: &amp;quot;direction&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
** the other with custom spawnarg: &amp;quot;direction&amp;quot; &amp;quot;-1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The setup can be cloned as often as you want, just change the &amp;quot;vector&amp;quot; spawnarg and optionally the targets of the callscriptfunction entity each time.&lt;br /&gt;
&lt;br /&gt;
== Trigger brushes ==&lt;br /&gt;
Trigger brushes are a simple way to call scripts, activated when the player or an AI enters the volume of the brush. For AIs to work you need to set &amp;quot;anyTouch&amp;quot; &amp;quot;1&amp;quot; on the brush. The brush needs a spawnarg &amp;quot;call&amp;quot; with the name of the script without brackets, i.e. &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;. They also trigger all their targets. See [[Triggers]] for details on the creation of trigger brushes and the various types.&lt;br /&gt;
&lt;br /&gt;
Most trigger brushes are quite basic, so they can&#039;t pass the name of the entity that stepped into them or their own name to the script. The best you can do is target a callscriptfunction entity (see above) instead of calling the script directly on the brush: this way, the callscriptfunction will tell the script which brush was activated. &lt;br /&gt;
&lt;br /&gt;
A more advanced type of trigger brush is trigger_touch, which detects all AIs/players/moveables in its volume and calls its script on each of them. More on their use in [[A to Z Scripting: Special methods]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Potential pitfalls with trigger brushes ===&lt;br /&gt;
&lt;br /&gt;
*AIs will stop activating trigger_multiple brushes if they become stationary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Path nodes ==&lt;br /&gt;
Many [[Path Nodes]] trigger all of their targets whenever an AI reaches them. They can target a target_callscriptfunction entity in order to call a script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Stim/Response ==&lt;br /&gt;
The [[Stim/Response]] system is very versatile, in particular when augmented with scripting.&lt;br /&gt;
&lt;br /&gt;
=== Responses, i.e. to frobbing ===&lt;br /&gt;
In most cases, you&#039;ll likely be interested in only the &amp;quot;Response&amp;quot; tab of the S/R editor interface. This allows you to make an entity respond to certain stimuli, such as a frob, a trigger or water by executing various effects, such as running a script (no input possible). Many other effects are available from the dropdown list.&lt;br /&gt;
&lt;br /&gt;
One common use is to make an entity frobable and give it a &amp;quot;Response&amp;quot; to frobbing with an effect to run a script. To do so, set the spawnarg &amp;quot;frobable&amp;quot; &amp;quot;1&amp;quot; on the entity to make it frobable. Then open the S/R editor, go to the Response tab, in the left half of the window add a &amp;quot;Frob&amp;quot; entry,  in the right half of the window right-click and add an effect to &amp;quot;Run script&amp;quot;, naming the script you want to run.&lt;br /&gt;
&lt;br /&gt;
To make this single-use you could add another effect to either:&lt;br /&gt;
* disable frobability of this entity, specifying _SELF as the entity&lt;br /&gt;
* or deactivate the response to frobbing on _SELF. The ID of the frob stim is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Stim and Response ===&lt;br /&gt;
Working with both the &amp;quot;stim&amp;quot; and &amp;quot;response&amp;quot; tabs of the editor lets you make scripts and other effects happen when two entities come near each other. A common example is a water arrow carrying a water stim being shot at a flame carrying a response to water (&amp;quot;extinguish&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
Enabling a &amp;quot;stim&amp;quot; on an entity causes that entity to emit the stim to its surroundings. The settings allow you to finetune this, i.e. how often the stim gets emitted, the radius etc.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, using the &amp;quot;response&amp;quot; tab on another entity allows you to define what effects happen when this entity is reached by a stim of that type.&lt;br /&gt;
&lt;br /&gt;
Creating a custom stim type is recommended, unless you explicitly want to do something with an existing stim like water or fire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up Stim/Response via script ===&lt;br /&gt;
Stim/Response can be setup either via DarkRadiant or via script. The latter has the advantage that you can setup S/R on the fly after the map has started, which could for example be useful if you&#039;re making a custom entity and don&#039;t want to clutter its spawnarg list. Its disadvantage is that it offers less flexibility than DarkRadiant&#039;s editor and some script functions may not work properly such as sys.wait.&lt;br /&gt;
&lt;br /&gt;
See below for an example of adding a trigger response to an entity via script:&lt;br /&gt;
 ResponseAdd(STIM_TRIGGER);&lt;br /&gt;
 ResponseSetAction(STIM_TRIGGER,&amp;quot;responseTrigger&amp;quot;);  //when this entity is triggered, call the script &amp;quot;responseTrigger&amp;quot;.&lt;br /&gt;
 ResponseEnable(STIM_TRIGGER,1); &lt;br /&gt;
&lt;br /&gt;
In this case, the script to be called will need the following input variables: entity me, float threadnum&lt;br /&gt;
 void responseTrigger( entity me, float threadnum )&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Action scripts ==&lt;br /&gt;
Entities can be given spawnargs that make them run scripts when certain actions are performed on them, such as frobbing or using. The value of the spawnarg is the name of the script. Example: &amp;quot;frob_action_script&amp;quot; &amp;quot;script1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Like with trigger brushes (see earlier), these entities pass their own name to the script function. This allows you to reuse the same spawnarg &amp;amp; script on many entities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| frob_action_script || Calls the specified script when the entity is frobbed by the player.&lt;br /&gt;
|-&lt;br /&gt;
| use_action_script || Calls the specified script when the player uses an inventory item on the entity (i.e. uses a key on a door). The inventory item must be named in a &amp;quot;used_by&amp;quot; spawnarg on the entity. More info here: [[Tool, Key, custom used by inventory actions]]&lt;br /&gt;
|-&lt;br /&gt;
| equip_action_script || Calls the specified script when the player is holding the entity and uses it (i.e. eating a held apple by pressing enter). &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Action scripts are able to tell which entity was frobbed/used/equipped.&lt;br /&gt;
&lt;br /&gt;
=== Example: remove the entity when the player frobs it ===&lt;br /&gt;
 void destroy_frobbed(entity ent_frobbed)&lt;br /&gt;
 {&lt;br /&gt;
 	ent_frobbed.remove();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 Spawnarg on each entity that should be destroyable:&lt;br /&gt;
 &amp;quot;frob_action_script&amp;quot; &amp;quot;destroy_frobbed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Signals ==&lt;br /&gt;
Signals are events which can be setup to call a script. Examples of events are the entity being triggered, touched, removed or damaged (but not: frobbing). Some signals only work for movers i.e. when a mover is blocked or a door is closed/opened. See the [[Signals]] wiki article for a full list of available signals.&lt;br /&gt;
&lt;br /&gt;
Entities using the signal system can pass on their own name to the script.&lt;br /&gt;
&lt;br /&gt;
To use the signal system, you need to use a script event to instruct the entity to respond to a certain signal by running a certain script. Example:&lt;br /&gt;
 sys.onSignal(SIG_TRIGGER, $func_static_1, &amp;quot;script1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
You may later want to disable this again. In that case:&lt;br /&gt;
 sys.clearSignalThread(SIG_TRIGGER, $func_static_1);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the signal system is old, so it doesn&#039;t support &amp;quot;frobbing&amp;quot;, which is a TDM invention. Its SIG_USE doesn&#039;t appear to be useable in TDM either. Furthermore, it doesn&#039;t seem to pass which entity &lt;br /&gt;
&lt;br /&gt;
SIG_TOUCH call its script whenever the player (or something else?) stands very close to the entity, and SIG_BLOCKED for as long as a func_mover is blocked. Note that the scripts get called several times per second, so you might want to clear the signal the first time the script runs and maybe reapply the signal after a certain delay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Objective system ==&lt;br /&gt;
The [[Objectives Editor]] can be seen as a visual scripting editor. Not unsurprisingly it synergises well with scripting.&lt;br /&gt;
&lt;br /&gt;
The main way to use the objective system for scripting is by specifying completion scripts and failure scripts for when an objective is completed or failed. Note that if the objective is reversible, it might call the scripts multiple times.&lt;br /&gt;
&lt;br /&gt;
The objectives system allows you to do some things much more easily than with regular scripting, such as calling a script when reaching a certain page in a book (i.e. playing an ominous sound). Many maps use a mix of hidden objectives and scripts in order to achieve interesting scripted effects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Location system ==&lt;br /&gt;
The location system (wiki page: [[Location Settings]] allows you to call scripts whenever the player enters or leaves specific locations.&lt;br /&gt;
&lt;br /&gt;
It works by setting spawnargs on the info_location entity, with the value being the script&#039;s name:&lt;br /&gt;
 &amp;quot;call_on_entry&amp;quot;&lt;br /&gt;
 &amp;quot;call_on_exit&amp;quot;&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot;&lt;br /&gt;
 &amp;quot;call_once_on_exit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On the scripting side of things, your script must always contain one entity variable in the input brackets, which will receive the name of the info_location entity involved.&lt;br /&gt;
 void enter_location_streets(entity ent_location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic example: start a conversation when the player enters a specific location ===&lt;br /&gt;
 void start_conversation(entity ent_location)			//ent_location must be defined even if it&#039;s not used in the script&lt;br /&gt;
 {&lt;br /&gt;
 	sys.trigger($start_conversation_1);			//trigger an entity that starts the conversation&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //conversation on the info_location entity&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot; &amp;quot;start_conversation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intermediate example: play a sound once when the player finds one of several ways into the mansion ===&lt;br /&gt;
Say you wanted a special sound to play when the player finds his way into the mansion. You&#039;d probably have several different entrances, each with their own location. You&#039;d use &amp;quot;call_once_on_entry&amp;quot; on each location to call a script triggering the sound. &lt;br /&gt;
&lt;br /&gt;
Since there are multiple locations and you only want the sound to play once, you also need to create a variable to store whether the sound has already played to stop further triggers of the sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 boolean sound_has_played = false;			//stores whether the sound has played; create here as a global variable so it doesn&#039;t get recreated every time the script runs&lt;br /&gt;
 &lt;br /&gt;
 void found_way_in(entity ent_location)&lt;br /&gt;
 {&lt;br /&gt;
 	if(!sound_has_played)&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($speaker_found_way_in);		//trigger a speaker carrying the sound and &amp;quot;s_waitfortrigger&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
 		sound_has_played = true;			//if other locations call this script, tell them the sound has already played&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //Spawnarg on all info_location entities that cover the entryways to the mansion&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot; &amp;quot;found_way_in&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced example: toggling fog particles depending on whether the player is inside or outside ===&lt;br /&gt;
Particles have a tendency of leaking through walls. If you have a map with lots of particle fog, you might want to manually switch them off whenever the player is inside. Preferrably the switch should happen somewhere where the player can&#039;t see the fog being toggled off.&lt;br /&gt;
&lt;br /&gt;
Unlike lights with On() and Off(), there&#039;s no script event that specifically switches the func_emitters on or off (to my knowledge), you can only toggle them with triggering. So the script should create a new variable to store what state the emitters are in.&lt;br /&gt;
&lt;br /&gt;
This script won&#039;t trigger all func_emitters individually, but rather a trigger_relay entity that in turn targets all the func_emitters. This saves a lot of lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example relies heavily on conditionals to check which location the player is in and whether the fog needs to be toggled, see [[A to Z Scripting: Conditionals]] for more information.&lt;br /&gt;
&lt;br /&gt;
 boolean fog_is_on = true;		//fog starts on; create here as a global variable so it doesn&#039;t get recreated every time toggle_fog() is called&lt;br /&gt;
 &lt;br /&gt;
 void toggle_fog(entity ent_location)&lt;br /&gt;
 {&lt;br /&gt;
 	//if fog is on and player goes inside, toggle off the fog and update fog_is_on to false&lt;br /&gt;
 	if ( (fog_is_on) &amp;amp;&amp;amp; (ent_location == ( $location_manor_entry1 || $location_manor_entry2 || $location_manor_entry3 ) ) )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($relay_fogs);	//trigger_relay targeting all fog func_emitters&lt;br /&gt;
 		fog_is_on = false;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	//if fog is off and player goes outside, toggle on the fog and update fog_is_on to true&lt;br /&gt;
 	else if ( (!fog_is_on) &amp;amp;&amp;amp; (ent_location == ( $location_manor_garden1 || $location_manor_garden2 || $location_manor_garden3 ) ) )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($relay_fogs);&lt;br /&gt;
 		fog_is_on = true;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //Spawnargs on the info_location entities (i.e. location_manor_entry1, location_manor_garden2)&lt;br /&gt;
 &amp;quot;call_on_entry&amp;quot; &amp;quot;toggle_fog&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve chosen not to use call_on_exit because that would call the script also if the player leaves the entrance locations to go deeper into the mansion. There&#039;s no need for that.&lt;br /&gt;
&lt;br /&gt;
== Conversation system ==&lt;br /&gt;
There&#039;s no direct way to call a script from a conversation, but you can tell one of the actors to activate a callscriptfunction entity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Killing or KOing an AI ==&lt;br /&gt;
You can add a spawnarg to AIs to call a script when they&#039;re killed or knocked out:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;death_script&amp;quot;&lt;br /&gt;
 &amp;quot;ko_script&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may pass one entity to the script, the victim, allowing you for example to play a flames effect on the body or remove it after some time:&lt;br /&gt;
 void auto_remove(entity ent_self)&lt;br /&gt;
 {&lt;br /&gt;
 	sys.println(ent1_self.getName() + &amp;quot; has been killed.&amp;quot;);&lt;br /&gt;
 	sys.wait(30);&lt;br /&gt;
 	ent_self.remove();			//remove the body after 30s&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //spawnarg on the AI:&lt;br /&gt;
 &amp;quot;death_script&amp;quot; &amp;quot;auto_remove&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that you can&#039;t tell the script who killed or knocked out the AI (i.e. whether it was the player&#039;s fault). If you need this info, you may use the objectives system and use the &amp;quot;Player responsible&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
== From an animation ==&lt;br /&gt;
You can call a script or a script from the entity&#039;s scriptobject by using one of the following, respectively, as a frame keyword with the name of the script. I believe the entity would pass its name to the script.&lt;br /&gt;
 call&lt;br /&gt;
 object_call&lt;br /&gt;
&lt;br /&gt;
== From the console ==&lt;br /&gt;
This is only for testing purposes because you will no longer be able to save the game after calling a script from the console. The console also lets you try to call script events, but this seems to have no effect ingame.&lt;br /&gt;
 script name_of_script()&lt;br /&gt;
The trailing &amp;quot;()&amp;quot; is required.&lt;br /&gt;
&lt;br /&gt;
== Next / previous article ==&lt;br /&gt;
&lt;br /&gt;
*Next article: [[A to Z Scripting: Getting map information]]&lt;br /&gt;
*Previous article: [[A to Z Scripting: Setting up the .script files]]&lt;br /&gt;
*Table of contents: [[A to Z Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Special_methods&amp;diff=30983</id>
		<title>A to Z Scripting: Special methods</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Special_methods&amp;diff=30983"/>
		<updated>2024-01-27T14:29:52Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: /* ...all entities of a certain type */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is devoted to useful applications of various scripting principles and to special cases.&lt;br /&gt;
&lt;br /&gt;
== Going through... ==&lt;br /&gt;
See below for methods to find all entities that meet various criteria and run script events on them.&lt;br /&gt;
&lt;br /&gt;
=== ...all entities of a certain type ===&lt;br /&gt;
&lt;br /&gt;
The getNextEntity() function allows you to find every entity in the map that has a certain spawnarg. It finds one entity at a time, so you&#039;ll need to run it many times. Each time it runs you&#039;ll have an opportunity to run script events on the entity that was found. &lt;br /&gt;
&lt;br /&gt;
As shown in &amp;quot;Looping scripts&amp;quot;, the combination of do + while() is well suited for this application:&lt;br /&gt;
&lt;br /&gt;
 //finds and triggers all electric lamps in the map. They&#039;re identified based on the value of the &amp;quot;lightType&amp;quot; spawnarg&lt;br /&gt;
 void lamps_toggle()&lt;br /&gt;
 {&lt;br /&gt;
 	entity lamp;&lt;br /&gt;
 &lt;br /&gt;
 	do&lt;br /&gt;
 	{&lt;br /&gt;
 		//find the next entity with this spawnarg; continue the search from the previously discovered lamp entity&lt;br /&gt;
 		lamp = sys.getNextEntity(&amp;quot;lightType&amp;quot;,&amp;quot;AIUSE_LIGHTTYPE_ELECTRIC&amp;quot;,lamp);&lt;br /&gt;
 		&lt;br /&gt;
 		if ( lamp != $null_entity ) &lt;br /&gt;
 		{&lt;br /&gt;
 			lamp.On();&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 	} while (lamp);			//repeat for as long as sys.getNextEntity finds electric lights&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== ...all targets of an entity ===&lt;br /&gt;
numTargets() returns the number of targets that an entity has. This can be combined with &amp;quot;for&amp;quot; to run script events once on every target:&lt;br /&gt;
&lt;br /&gt;
 void hide_targets()						//finds all targets of an entity and runs a script event on them (in this case: hide)&lt;br /&gt;
 {&lt;br /&gt;
 	float i;						//define a float (i for integer) to keep track of how many targets have been identified&lt;br /&gt;
 &lt;br /&gt;
 	for(i = 0; i &amp;lt; $func_static_1.numTargets(); i++)	//for every target of func_static_1...&lt;br /&gt;
 	{&lt;br /&gt;
 		entity m_target = $func_static_1.getTarget(i);	//store target #i as a variable so we can call an event on it. Will get overwritten by the next target&lt;br /&gt;
 		m_target.hide();				//call hide() on this target&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ...all entities bound to an entity ===&lt;br /&gt;
This is almost identical to going through all targets of an entity. Important is the distinction between bindChildren and bindMasters: bindChildren are lower in the bind hierarchy, bindMasters are higher in the bind hierarchy relative to the entity in question.&lt;br /&gt;
&lt;br /&gt;
 void identify_handle()					//goes through all entities bound to a door in order to identify a handle&lt;br /&gt;
 {&lt;br /&gt;
 	float i;&lt;br /&gt;
 &lt;br /&gt;
 	for(i = 0; i &amp;lt; $mover_door_1.numBindChildren(); i++)			&lt;br /&gt;
 	{&lt;br /&gt;
 		entity m_bind_child = $mover_door_1.getBindChild(i);		//find the nth bound entity&lt;br /&gt;
 		if(m_bind_child.getKey(&amp;quot;spawnclass&amp;quot;) == &amp;quot;CFrobDoorHandle&amp;quot;)	//check if this bound entity is a handle. If yes...&lt;br /&gt;
 		{&lt;br /&gt;
 			entity m_handle = m_bind_child;				//...store it for later&lt;br /&gt;
 		}&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ...all spawnargs with the same prefix ===&lt;br /&gt;
This works quite similar to going through all entities of a certain type. The difference is that there&#039;s a 2nd step: first find the name of the spawnarg, then find the value of that spawnarg.&lt;br /&gt;
&lt;br /&gt;
Example: finding all frob_peers of a door and making sure they&#039;re all frobable&lt;br /&gt;
 void find_peers()&lt;br /&gt;
 {&lt;br /&gt;
 	string key;			//name of the spawnarg&lt;br /&gt;
 	entity frob_peer;		//value of the spawnarg; in this case, it&#039;ll be a frob_peer entity&lt;br /&gt;
 &lt;br /&gt;
 	do&lt;br /&gt;
 	{&lt;br /&gt;
 		key 		= $mover_door_1.getNextKey(&amp;quot;frob_peer&amp;quot;, key);	//find the exact name of the next spawnarg that begins with &amp;quot;frob_peer&amp;quot;, starting from the previous result&lt;br /&gt;
 		frob_peer	= $mover_door_1.getEntityKey(key);		//find the value of this spawnarg, which should be an entity&lt;br /&gt;
 &lt;br /&gt;
 		if(frob_peer) frob_peer.setFrobable(1);				//if a valid entity has been found, set it to frobable &lt;br /&gt;
 	}	while(key);							//keep repeating until this script stops finding valid spawnarg names&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* Alternatively, you could pass getNextKey() an empty string, &amp;quot;&amp;quot;. That should make the script find all spawnargs of this entity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ...all entities in a volume ===&lt;br /&gt;
The easiest method is to combine a regular trigger brush with a trigger_touch brush, but this is limited only to the player, AIs and moveables and requires premade brushes. An alternative method is to go through all entities in the map by passing getNextEntity() 2 empty strings. This can find all types of entities in any volume, but is more work to script, in particular if it might exceed the limit of 10,000 events per frame if used for large volumes with many entities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== With trigger_touch ====&lt;br /&gt;
A trigger_touch brush can detect the player, any AIs and any moveable entities within its volume, running a script on each of them. Unlike other trigger brushes, it can pass self and its activator, if the corresponding spawnargs are set, in addition to the detected entity.&lt;br /&gt;
&lt;br /&gt;
To save performance, the trigger_touch should not be on permanently (&amp;quot;start_on&amp;quot; set to &amp;quot;0&amp;quot;). Instead, a regular trigger brush of the same size should call a script that activates the trigger_touch, waits one frame, then deactivates the trigger_touch.&lt;br /&gt;
&lt;br /&gt;
 void activate_trigger_touch()&lt;br /&gt;
 {&lt;br /&gt;
 	//called by a regular trigger brush; activates the trigger_touch for a single frame only&lt;br /&gt;
 	sys.trigger($trigger_touch_1);&lt;br /&gt;
 	sys.waitFrame();&lt;br /&gt;
 	sys.trigger($trigger_touch_1);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 void detect_entities(entity touching_ent)&lt;br /&gt;
 {&lt;br /&gt;
 	//called by the trigger_touch brush on every AI, moveable or player it finds within its volume.&lt;br /&gt;
 	sys.println(&amp;quot;Found entity: &amp;quot; + touching_ent.getName());&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Without trigger_touch ====&lt;br /&gt;
This method is more work-intensive than the trigger_touch method, but allows to find entities of all types in any volume. Note that it&#039;ll only look at the origins of the entities, not at their bounding boxes.&lt;br /&gt;
&lt;br /&gt;
You will first need to define the volume to search by specifying 2 corners lying opposite of each other. An easy method is to use getMins() and getMaxs() on an entity, such as a nodraw brush. The script would start like this:&lt;br /&gt;
 void find_entities_in_volume(entity volume_entity)&lt;br /&gt;
 {&lt;br /&gt;
     vector corner1 = volume_entity.getMins();    //use an entity, such as a big clip brush, to define the volume&lt;br /&gt;
     vector corner2 = volume_entity.getMaxs();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can input any 2 vectors. This is more flexible, but your script will need to make sure that you have a minimal and a maximal corner. This means the lower values on each axis are in the minimal corner &amp;amp; vice versa. This is necessary for an if( corner1 &amp;gt; origin &amp;gt; corner2 ) conditional to work.&lt;br /&gt;
&lt;br /&gt;
 void find_entities_in_volume(vector corner1, vector corner2)&lt;br /&gt;
 {&lt;br /&gt;
 //In this method, you will need to ensure that all components on corner1 are smaller than corner2, if necessary swapping them around&lt;br /&gt;
 //This step is not necessary if your vectors came from getMins() and getMaxs()&lt;br /&gt;
 &lt;br /&gt;
 float temp;        //used to temporarily store the value of a vector component if swapping components around&lt;br /&gt;
 &lt;br /&gt;
 if(corner1_x &amp;gt; corner2_x){temp = corner1_x; corner1_x = corner2_x; corner2_x = temp;}&lt;br /&gt;
 if(corner1_y &amp;gt; corner2_y){temp = corner1_y; corner1_y = corner2_y; corner2_y = temp;}&lt;br /&gt;
 if(corner1_z &amp;gt; corner2_z){temp = corner1_z; corner1_z = corner2_z; corner2_z = temp;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that you have the minimal and maximal corners of the volume, you can cycle through all entities in the map and check whether their origins lie within. Note that maps can have many thousands of entities, so you&#039;ll probably want to limit the number of entities that can be looked at per frame. Even at 1000 entities per frame, it&#039;ll be done in a fraction of a second.&lt;br /&gt;
 entity ent;&lt;br /&gt;
 vector ent_origin;&lt;br /&gt;
 float i;&lt;br /&gt;
 float max_entities_per_frame = 1000;&lt;br /&gt;
 &lt;br /&gt;
     do&lt;br /&gt;
     {&lt;br /&gt;
         ent = getNextEntity(ent);        //go to the next entity in the map&lt;br /&gt;
         ent_origin = ent.getOrigin();&lt;br /&gt;
 &lt;br /&gt;
         if( (corner1_x &amp;lt;= ent_origin_x &amp;lt;= corner2_x ) &amp;amp;&amp;amp; (corner1_y &amp;lt;= ent_origin_y &amp;lt;= corner2_y ) &amp;amp;&amp;amp; (corner1_z &amp;lt;= ent_origin_z &amp;lt;= corner2_z ) )&lt;br /&gt;
         {&lt;br /&gt;
             sys.println(ent.getName() + &amp;quot; is within this volume.&amp;quot;)        //an entity has been found within this volume, run any events here&lt;br /&gt;
         }&lt;br /&gt;
 &lt;br /&gt;
 	i++;					//add 1 to the number of entities checked in this frame&lt;br /&gt;
 	if ( i == max_entities_per_frame )	//if the limit for this frame has been hit...&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.waitFrame();		//wait a frame before continuing&lt;br /&gt;
 		i = 0;				//reset entity counter to 0&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
     } while(ent);                                    //repeat for as long as valid entities are found&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spawning entities ==&lt;br /&gt;
You can spawn an entity of a specified classname while the map is running. Optionally, you can set values for spawnargs in advance of the spawning.&lt;br /&gt;
&lt;br /&gt;
 void spawn_stagecoach()&lt;br /&gt;
 {&lt;br /&gt;
 	sys.setSpawnArg(&amp;quot;name&amp;quot;, &amp;quot;stagecoach&amp;quot;);&lt;br /&gt;
 	sys.setSpawnArg(&amp;quot;model&amp;quot;, &amp;quot;models/darkmod/misc/carriages/stagecoach.lwo&amp;quot;)&lt;br /&gt;
  	sys.setSpawnArg(&amp;quot;origin&amp;quot;, &amp;quot;483 723 41&amp;quot;);&lt;br /&gt;
 	entity spawned_entity 	= sys.spawn(&amp;quot;func_static&amp;quot;);		//spawn a &amp;quot;func_static&amp;quot; entity with the spawnargs above&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you plan to use this event often you may want to create a new entity def that contains most of the desired spawnargs so you no longer need to set them in the script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Doing more with vector variables ==&lt;br /&gt;
=== Accessing individual components as floats ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to access individual components of a vector by appending _x, _z or _y to the end of the vector variable&#039;s name. These will get treated as floats.&lt;br /&gt;
&lt;br /&gt;
Example: teleporting the player up by 16 units from wherever he is now&lt;br /&gt;
 void teleport_player_up()&lt;br /&gt;
 {&lt;br /&gt;
 	vector player_position	= $player1.getOrigin();		//where is the player now? Store as a variable named &amp;quot;player_position&amp;quot;&lt;br /&gt;
 	player_position_z	= player_position_z + 16;	//increase the z-component (height) of &amp;quot;player_position&amp;quot; by 16&lt;br /&gt;
 &lt;br /&gt;
 	$player1.setOrigin(player_position);			//set the new origin of the player to the modified &amp;quot;player_position&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting the magnitude of a vector ===&lt;br /&gt;
Another option is to get the magnitude, or length, of a vector with sys.vecLength(), which turns the vector into a float. This is useful for example in calculating distances or expressing the progress of a mover as a percentage.&lt;br /&gt;
&lt;br /&gt;
Example: checking the progress of a func_mover&lt;br /&gt;
 void check_progress()&lt;br /&gt;
 {&lt;br /&gt;
 	vector start_position 	= &#039;0 0 0&#039;;&lt;br /&gt;
 	vector target_position	= &#039;200 0 0&#039;;&lt;br /&gt;
 	vector current_position	= $func_mover_1.getOrigin();&lt;br /&gt;
 &lt;br /&gt;
 	float distance_moved 	= sys.vecLength(current_position - start_position);			//how far the mover has moved so far in units&lt;br /&gt;
 	float percent_progress	= distance_moved / sys.vecLength(target_position - start_position);	//how far the mover has moved so far in percent &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spline movers ==&lt;br /&gt;
A spline is a curved line which is stored on a spline mover entity (misleading name). A regular mover (func_mover) can be scripted to move along this spline. Usually the spline mover is invisible, while the func_mover is visible or has visible entities bound to it.&lt;br /&gt;
&lt;br /&gt;
To create a spline in DarkRadiant, click on the button &amp;quot;Create a NURBS curve&amp;quot; along the left edge of the window. Next to this button there are several other buttons which allow you to append, insert or remove control points from this curve, or convert it into a curve which uses the CatmullRom algorithm instead of NURBS. The control points can be moved around to change the shape of the curve, quite similar to how the control vertices of patches work.&lt;br /&gt;
&lt;br /&gt;
When your spline is finished, create a small ca. 8x8x8 brush textured with textures/common/nodraw around the origin of the curve (make sure you look at it in all 3 axis). Select the brush and right-click &amp;gt; create entity &amp;gt; func_splinemover. &lt;br /&gt;
&lt;br /&gt;
Copy the &amp;quot;curve_Nurbs&amp;quot; or &amp;quot;curve_CatmullRomSpline&amp;quot; spawnarg from the curve, paste it onto the nodraw brush and delete the original curve. You now have a spline. Next you need to create a func_mover with the same origin as the spline. This func_mover can be a visible model, or it can be another nodraw brush to which you can bind a func_smoke particle, which would leave a trail like the wisps in Thief.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You&#039;ll now need a script to make the func_mover move along the spline:&lt;br /&gt;
 void start_spline()&lt;br /&gt;
 {&lt;br /&gt;
 	entity spline		= $func_splinemover_2;		//the name of the nodraw splinemover brush carrying the curve data in your map&lt;br /&gt;
 	entity func_mover	= $func_mover_1;		//the name of the func_mover in your map&lt;br /&gt;
 &lt;br /&gt;
 	func_mover.time(10);					//let the mover take 10s per lap. Alternatively set speed(), in units per second&lt;br /&gt;
 	func_mover.disableSplineAngles();			//optional: use this to stop the mover from rotating wildly depending on how the curve is angled&lt;br /&gt;
  	sys.threadname(&amp;quot;spline_1&amp;quot;);				//optional: give this thread a name so the spline mover can be stopped by another script with sys.killthread(&amp;quot;spline_1&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
 	while(1)						//loop the following indefinitely&lt;br /&gt;
 	{&lt;br /&gt;
 		func_mover.startSpline(spline);			//start the mover along the spline&lt;br /&gt;
 	 	sys.waitFor(func_mover);			//wait for the mover to finish its movement&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting up Stim/Response via script ==&lt;br /&gt;
It&#039;s possible to apply Stim/Response settings to an entity at run time, rather than doing so manually in DR. This is especially useful for setting up a spawned entity to respond to triggers or frobs. The below example is for setting up an entity to respond to triggering by calling script1:&lt;br /&gt;
&lt;br /&gt;
 $func_static_1.ResponseAdd(STIM_TRIGGER);&lt;br /&gt;
 $func_static_1.ResponseSetAction(STIM_TRIGGER,&amp;quot;script1&amp;quot;);&lt;br /&gt;
 $func_static_1.ResponseEnable(STIM_TRIGGER,1);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next / previous article ==&lt;br /&gt;
&lt;br /&gt;
*Next article: [[A to Z Scripting: Utility scripts]]&lt;br /&gt;
*Previous article: [[A to Z Scripting: Scripting with...]]&lt;br /&gt;
*Table of contents: [[A to Z Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Looping_a_script&amp;diff=30980</id>
		<title>A to Z Scripting: Looping a script</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Looping_a_script&amp;diff=30980"/>
		<updated>2024-01-21T20:22:06Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basics ==&lt;br /&gt;
You may want a script to keep repeating until stopped, for as long as a condition stays true, or for a number of times.&lt;br /&gt;
&lt;br /&gt;
The scripting engine allows up to 10,000 events per frame, so if you&#039;re doing something a finite number of times (i.e. checking all entities of a certain type) you can usually do it all in a single frame.&lt;br /&gt;
&lt;br /&gt;
However, if the script should keep running continuously (i.e. for a &amp;quot;No harm&amp;quot; objective) you need to build some kind of wait() event into the script. This avoids that the script tries to run an infinite number of times in a single frame (crash with &amp;quot;runaway loop&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Looping with thread ==&lt;br /&gt;
The easiest way to loop is by making the script call itself at the end. Unlike other methods, this will always repeat the entire script. It&#039;s probably preferrable to call with &amp;quot;thread&amp;quot; to ensure that old script cycles don&#039;t hang around waiting for newer cycles to finish.&lt;br /&gt;
&lt;br /&gt;
=== Example: &amp;quot;No harm&amp;quot; objective ===&lt;br /&gt;
 void looping_script()&lt;br /&gt;
 {&lt;br /&gt;
 	if ( $lord_marlow.getHealth() != 100 ) $player1.setObjectiveState(5, OBJ_FAILED);&lt;br /&gt;
 &lt;br /&gt;
 	sys.wait(0.5);&lt;br /&gt;
 	thread looping_script();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Looping with while() ==&lt;br /&gt;
while() lets you loop a script for as long as the condition inside the brackets is true. If it should loop permanently, put a 1 into the brackets (true).&lt;br /&gt;
&lt;br /&gt;
=== Example: timer for a mover ===&lt;br /&gt;
 void mover_timer()&lt;br /&gt;
 {&lt;br /&gt;
 float time_moved;&lt;br /&gt;
&lt;br /&gt;
 	 while( $box.isMoving() )&lt;br /&gt;
 	 {&lt;br /&gt;
  		sys.wait(0.1);&lt;br /&gt;
 		time_moved = time_moved + 0.1;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Repeating with for() ==&lt;br /&gt;
&lt;br /&gt;
for() lets a script repeat for a number of times that can be either pre-determined or variable. It&#039;s well-suited for gradually making a change in many small steps (increments or decrements).&lt;br /&gt;
&lt;br /&gt;
This method would be preferred if you know in advance how often the script needs to repeat i.e. to fade a shader parameter from 0 to 100 in 100 steps. For an unknown number of repeats, i.e. a search for all entities of a certain type, you&#039;d usually use while() or do+while().&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: fading a shader parameter on an entity ===&lt;br /&gt;
&lt;br /&gt;
 void materialise()&lt;br /&gt;
 {&lt;br /&gt;
     float i;					//define a float (integer) to keep track of the number of steps&lt;br /&gt;
     for (i=0;i&amp;lt;100;i++)			//go from 0 to (one under) 100, one at a time (100 steps)&lt;br /&gt;
     {&lt;br /&gt;
         fade_entity.setShaderParm(5,i);	//set shaderParm5 to the current number of steps&lt;br /&gt;
         sys.waitFrame();			//wait one frame until the next step&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To go in the opposite direction (&amp;quot;dematerialise&amp;quot;), you would decrement as follows:&lt;br /&gt;
 for (i=100; i&amp;gt;0; i--)&lt;br /&gt;
&lt;br /&gt;
== Repeating with do + while() ==&lt;br /&gt;
&amp;quot;Do this script for as long as this condition is met&amp;quot;. This one is quite similar to just using while(), the difference is it can begin even if the condition is false at first (the conditional is at the end, not at the beginning).&lt;br /&gt;
&lt;br /&gt;
=== Example: running a script on every entity of a certain type ===&lt;br /&gt;
 //Script by Obsttorte&lt;br /&gt;
 void lamps_toggle()				//finds and triggers all electric lamps in the map&lt;br /&gt;
 {&lt;br /&gt;
 	light lamp;&lt;br /&gt;
 	do					//do repeat this...&lt;br /&gt;
 	{&lt;br /&gt;
 		lamp = sys.getNextEntity(&amp;quot;lightType&amp;quot;,&amp;quot;AIUSE_LIGHTTYPE_ELECTRIC&amp;quot;,lamp);	//find the next entity which has this spawnarg value&lt;br /&gt;
 		if (lamp) sys.trigger(lamp);	//if a valid entity has been found, trigger it&lt;br /&gt;
 &lt;br /&gt;
 	}	while (lamp);		//repeat for as long as sys.getNextEntity finds valid entities (returns $null_entity if no entity found)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Terminating a running script ==&lt;br /&gt;
A script can only be terminated if it is designed to be terminated, using one of the following methods.&lt;br /&gt;
&lt;br /&gt;
=== Terminating with killthread() ===&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible to manually terminate a script by giving it a thread name, letting another script terminate it.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 void check_health()&lt;br /&gt;
 {&lt;br /&gt;
 	sys.threadname(&amp;quot;looping_script&amp;quot;);		//assign a name to this script or thread&lt;br /&gt;
 &lt;br /&gt;
 	if ( $lord_marlow.getHealth() != 100 ) $player1.setObjectiveState(5, OBJ_FAILED);&lt;br /&gt;
 	sys.wait(0.5);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 void terminate_check_health()&lt;br /&gt;
 {&lt;br /&gt;
 	sys.killthread(&amp;quot;looping_script&amp;quot;);	//terminate the script that was named &amp;quot;looping_script&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Terminating with return ===&lt;br /&gt;
&lt;br /&gt;
Alternatively you can terminate a script with simply &amp;quot;return&amp;quot;. This causes the script to terminate. Its primary purpose is to make the script return a value as output, which comes into play in [[A to Z Scripting: Utility scripts]].&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 if ( attempts == 3 ) return;&lt;br /&gt;
&lt;br /&gt;
== Next / previous article ==&lt;br /&gt;
&lt;br /&gt;
*Next article: [[A to Z Scripting: Scripting with...]]&lt;br /&gt;
*Previous article: [[A to Z Scripting: Conditionals]]&lt;br /&gt;
*Table of contents: [[A to Z Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Ways_of_calling_a_script&amp;diff=30911</id>
		<title>A to Z Scripting: Ways of calling a script</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Ways_of_calling_a_script&amp;diff=30911"/>
		<updated>2023-11-28T14:10:40Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TDM has many methods for calling scripts, some overlap with others but there are always subtle differences. Often you can combine systems such as the objective system with scripting in order to get results that wouldn&#039;t easily be possible with either system alone. &lt;br /&gt;
&lt;br /&gt;
Some of the methods allow you to pass on to the script as input variables which entities were involved in calling the script. This allows you to write a single script which chooses to do different things depending on what activated it, i.e. you could have a portal chamber where each portal teleports the player to a different destination even though they all call the same script. You could set custom spawnargs on the entities and use them in the scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== From other scripts ==&lt;br /&gt;
To call a script from another script, simply write the name of the script followed by input brackets. The script will wait for the called script to finish.&lt;br /&gt;
 void script2()&lt;br /&gt;
 {&lt;br /&gt;
 	script1();		//call script1, wait for script1 to finish&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can write &amp;quot;thread&amp;quot; in front. Both scripts will run simultaneously, because each one runs in its own thread.&lt;br /&gt;
 void script2()&lt;br /&gt;
 {&lt;br /&gt;
 	thread script1();	//call script1, don&#039;t wait&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can only call scripts that the engine already knows about, so the called script (script1) needs to be higher up than the calling script (script2). If you&#039;re using general .script files ([[A to Z Scripting: Setting up the .script files]]), the same applies to the order in which you #include your .script files.&lt;br /&gt;
&lt;br /&gt;
The main advantage of calling one script from another is that you can give as much input as you like - if the called script is designed to use input (see [[A to Z Scripting: Utility scripts]] for more). Other methods can usually only provide 1 or 2 pieces of input: the entity that called the script (i.e. a trigger brush) and the entity that triggered the calling entity (i.e. a player or AI stepping into the trigger brush).&lt;br /&gt;
&lt;br /&gt;
== target_callscriptfunction ==&lt;br /&gt;
You can create an entity in DR called target_callscriptfunction and give it the spawnarg &amp;quot;call&amp;quot; with the name of the script without brackets, i.e. &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;. Whenever this entity is triggered by something, i.e. a button, the script will be called.&lt;br /&gt;
&lt;br /&gt;
These entities are among the most versatile ways to call a script because, with the spawnarg &amp;quot;foreach&amp;quot; &amp;quot;1&amp;quot;, they can pass on 3 entities to the script:&lt;br /&gt;
* one target of the callscriptfunction entity. The script will get repeated on each target, one by one (that&#039;s where &amp;quot;foreach&amp;quot; comes from)&lt;br /&gt;
* the entity that triggered the callscriptfunction entity (aka the activator)(i.e. a button)&lt;br /&gt;
* the name of the callscriptfunction entity itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic example: simply calling a script with no input ===&lt;br /&gt;
 void script1()&lt;br /&gt;
 {&lt;br /&gt;
  	sys.println(&amp;quot;script1 has been called.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //spawnarg on the callscriptfunction entity:&lt;br /&gt;
 &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced example: teleportation script to teleport targeted entities in 2 directions ===&lt;br /&gt;
Here&#039;s a more complex example of a teleportation script that uses all 3 entities that a callscriptfunction can pass to a script:&lt;br /&gt;
 void teleport_targets_away(entity ent_target, entity ent_button, entity ent_callscriptfunction)&lt;br /&gt;
 {&lt;br /&gt;
 	sys.println(&amp;quot;the first entity (the target) is &amp;quot; + ent_target.getName());&lt;br /&gt;
 	sys.println(&amp;quot;the second entity (the button) is &amp;quot; + ent_button.getName());&lt;br /&gt;
 	sys.println(&amp;quot;the third entity (the callscriptfunction) is &amp;quot; + ent_callscriptfunction.getName());&lt;br /&gt;
  &lt;br /&gt;
 	float teleportation_direction 	= ent_button.getFloatKey(&amp;quot;direction&amp;quot;);			//find the teleportation direction, stored on the button&lt;br /&gt;
 	vector teleportation_vector	= ent_callscriptfunction.getVectorKey(&amp;quot;vector&amp;quot;);	//find the teleportation vector, stored on the callscriptfunction entity&lt;br /&gt;
 	if (teleportation_direction == -1) teleportation_vector = -teleportation_vector;	//invert the teleportation vector if the direction is backwards&lt;br /&gt;
 &lt;br /&gt;
 	ent_target.setOrigin(ent_target.getOrigin() + teleportation_vector);			//teleport the target&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The setup in the map would be 2 buttons (1 per direction) targeting a callscriptfunction entity which targets the entities you want to get teleported. The spawnargs are as follows:&lt;br /&gt;
* callscriptfunction entity&lt;br /&gt;
** spawnarg: &amp;quot;foreach&amp;quot; &amp;quot;1&amp;quot; (so it repeats for every target and passes on its name and the button that triggered it)&lt;br /&gt;
** spawnarg: &amp;quot;call&amp;quot; &amp;quot;teleport_targets_away&amp;quot;&lt;br /&gt;
** custom spawnarg: &amp;quot;vector&amp;quot;, with whatever teleportation vector you want i.e. &amp;quot;450 0 0&amp;quot;&lt;br /&gt;
* 2 buttons targeting the callscriptfunction entity&lt;br /&gt;
** one button with custom spawnarg: &amp;quot;direction&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
** the other with custom spawnarg: &amp;quot;direction&amp;quot; &amp;quot;-1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The setup can be cloned as often as you want, just change the &amp;quot;vector&amp;quot; spawnarg and optionally the targets of the callscriptfunction entity each time.&lt;br /&gt;
&lt;br /&gt;
== Trigger brushes ==&lt;br /&gt;
Trigger brushes are a simple way to call scripts, activated when the player or an AI enters the volume of the brush. For AIs to work you need to set &amp;quot;anyTouch&amp;quot; &amp;quot;1&amp;quot; on the brush. The brush needs a spawnarg &amp;quot;call&amp;quot; with the name of the script without brackets, i.e. &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;. They also trigger all their targets. See [[Triggers]] for details on the creation of trigger brushes and the various types.&lt;br /&gt;
&lt;br /&gt;
Most trigger brushes are quite basic, so they can&#039;t pass the name of the entity that stepped into them or their own name to the script. The best you can do is target a callscriptfunction entity (see above) instead of calling the script directly on the brush: this way, the callscriptfunction will tell the script which brush was activated. &lt;br /&gt;
&lt;br /&gt;
A more advanced type of trigger brush is trigger_touch, which detects all AIs/players/moveables in its volume and calls its script on each of them. More on their use in [[A to Z Scripting: Special methods]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Potential pitfalls with trigger brushes ===&lt;br /&gt;
&lt;br /&gt;
*AIs will stop activating trigger_multiple brushes if they become stationary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Path nodes ==&lt;br /&gt;
Many [[Path Nodes]] trigger all of their targets whenever an AI reaches them. They can target a target_callscriptfunction entity in order to call a script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Stim/Response ==&lt;br /&gt;
The [[Stim/Response]] system is very versatile, in particular when augmented with scripting.&lt;br /&gt;
&lt;br /&gt;
=== Responses, i.e. to frobbing ===&lt;br /&gt;
In most cases, you&#039;ll likely be interested in only the &amp;quot;Response&amp;quot; tab of the S/R editor interface. This allows you to make an entity respond to certain stimuli, such as a frob, a trigger or water by executing various effects, such as running a script (no input possible). Many other effects are available from the dropdown list.&lt;br /&gt;
&lt;br /&gt;
One common use is to make an entity frobable and give it a &amp;quot;Response&amp;quot; to frobbing with an effect to run a script. To do so, set the spawnarg &amp;quot;frobable&amp;quot; &amp;quot;1&amp;quot; on the entity to make it frobable. Then open the S/R editor, go to the Response tab, in the left half of the window add a &amp;quot;Frob&amp;quot; entry,  in the right half of the window right-click and add an effect to &amp;quot;Run script&amp;quot;, naming the script you want to run.&lt;br /&gt;
&lt;br /&gt;
To make this single-use you could add another effect to either:&lt;br /&gt;
* disable frobability of this entity, specifying _SELF as the entity&lt;br /&gt;
* or deactivate the response to frobbing on _SELF. The ID of the frob stim is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Stim and Response ===&lt;br /&gt;
Working with both the &amp;quot;stim&amp;quot; and &amp;quot;response&amp;quot; tabs of the editor lets you make scripts and other effects happen when two entities come near each other. A common example is a water arrow carrying a water stim being shot at a flame carrying a response to water (&amp;quot;extinguish&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
Enabling a &amp;quot;stim&amp;quot; on an entity causes that entity to emit the stim to its surroundings. The settings allow you to finetune this, i.e. how often the stim gets emitted, the radius etc.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, using the &amp;quot;response&amp;quot; tab on another entity allows you to define what effects happen when this entity is reached by a stim of that type.&lt;br /&gt;
&lt;br /&gt;
Creating a custom stim type is recommended, unless you explicitly want to do something with an existing stim like water or fire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up Stim/Response via script ===&lt;br /&gt;
Stim/Response can be setup either via DarkRadiant or via script. The latter has the advantage that you can setup S/R on the fly after the map has started, which could for example be useful if you&#039;re making a custom entity and don&#039;t want to clutter its spawnarg list. Its disadvantage is that it offers less flexibility than DarkRadiant&#039;s editor and some script functions may not work properly such as sys.wait.&lt;br /&gt;
&lt;br /&gt;
See below for an example of adding a trigger response to an entity via script:&lt;br /&gt;
 ResponseAdd(STIM_TRIGGER);&lt;br /&gt;
 ResponseSetAction(STIM_TRIGGER,&amp;quot;responseTrigger&amp;quot;);  //when this entity is triggered, call the script &amp;quot;responseTrigger&amp;quot;.&lt;br /&gt;
 ResponseEnable(STIM_TRIGGER,1); &lt;br /&gt;
&lt;br /&gt;
In this case, the script to be called will need the following input variables: entity me, float threadnum&lt;br /&gt;
 void responseTrigger( entity me, float threadnum )&lt;br /&gt;
 {&lt;br /&gt;
 ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Action scripts ==&lt;br /&gt;
Entities can be given spawnargs that make them run scripts when certain actions are performed on them, such as frobbing or using. The value of the spawnarg is the name of the script. Example: &amp;quot;frob_action_script&amp;quot; &amp;quot;script1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Like with trigger brushes (see earlier), these entities pass their own name to the script function. This allows you to reuse the same spawnarg &amp;amp; script on many entities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| frob_action_script || Calls the specified script when the entity is frobbed by the player.&lt;br /&gt;
|-&lt;br /&gt;
| use_action_script || Calls the specified script when the player uses an inventory item on the entity (i.e. uses a key on a door). The inventory item must be named in a &amp;quot;used_by&amp;quot; spawnarg on the entity. More info here: [[Tool, Key, custom used by inventory actions]]&lt;br /&gt;
|-&lt;br /&gt;
| equip_action_script || Calls the specified script when the player is holding the entity and uses it (i.e. eating a held apple by pressing enter). &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Action scripts are able to tell which entity was frobbed/used/equipped.&lt;br /&gt;
&lt;br /&gt;
=== Example: remove the entity when the player frobs it ===&lt;br /&gt;
 void destroy_frobbed(entity ent_frobbed)&lt;br /&gt;
 {&lt;br /&gt;
 	ent_frobbed.remove();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 Spawnarg on each entity that should be destroyable:&lt;br /&gt;
 &amp;quot;frob_action_script&amp;quot; &amp;quot;destroy_frobbed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Signals ==&lt;br /&gt;
Signals are events which can be setup to call a script. Examples of events are the entity being triggered, touched, removed or damaged (but not: frobbing). Some signals only work for movers i.e. when a mover is blocked or a door is closed/opened. See the [[Signals]] wiki article for a full list of available signals.&lt;br /&gt;
&lt;br /&gt;
Entities using the signal system can pass on their own name to the script.&lt;br /&gt;
&lt;br /&gt;
To use the signal system, you need to use a script event to instruct the entity to respond to a certain signal by running a certain script. Example:&lt;br /&gt;
 sys.onSignal(SIG_TRIGGER, $func_static_1, &amp;quot;script1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
You may later want to disable this again. In that case:&lt;br /&gt;
 sys.clearSignalThread(SIG_TRIGGER, $func_static_1);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the signal system is old, so it doesn&#039;t support &amp;quot;frobbing&amp;quot;, which is a TDM invention. Its SIG_USE doesn&#039;t appear to be useable in TDM either. Furthermore, it doesn&#039;t seem to pass which entity &lt;br /&gt;
&lt;br /&gt;
SIG_TOUCH call its script whenever the player (or something else?) stands very close to the entity, and SIG_BLOCKED for as long as a func_mover is blocked. Note that the scripts get called several times per second, so you might want to clear the signal the first time the script runs and maybe reapply the signal after a certain delay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Objective system ==&lt;br /&gt;
The [[Objectives Editor]] can be seen as a visual scripting editor. Not unsurprisingly it synergises well with scripting.&lt;br /&gt;
&lt;br /&gt;
The main way to use the objective system for scripting is by specifying completion scripts and failure scripts for when an objective is completed or failed. Note that if the objective is reversible, it might call the scripts multiple times.&lt;br /&gt;
&lt;br /&gt;
The objectives system allows you to do some things much more easily than with regular scripting, such as calling a script when reaching a certain page in a book (i.e. playing an ominous sound). Many maps use a mix of hidden objectives and scripts in order to achieve interesting scripted effects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Location system ==&lt;br /&gt;
The location system (wiki page: [[Location Settings]] allows you to call scripts whenever the player enters or leaves specific locations.&lt;br /&gt;
&lt;br /&gt;
It works by setting spawnargs on the info_location entity, with the value being the script&#039;s name:&lt;br /&gt;
 &amp;quot;call_on_entry&amp;quot;&lt;br /&gt;
 &amp;quot;call_on_exit&amp;quot;&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot;&lt;br /&gt;
 &amp;quot;call_once_on_exit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On the scripting side of things, your script must always contain one entity variable in the input brackets, which will receive the name of the info_location entity involved.&lt;br /&gt;
 void enter_location_streets(entity ent_location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic example: start a conversation when the player enters a specific location ===&lt;br /&gt;
 void start_conversation(entity ent_location)			//ent_location must be defined even if it&#039;s not used in the script&lt;br /&gt;
 {&lt;br /&gt;
 	sys.trigger($start_conversation_1);			//trigger an entity that starts the conversation&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //conversation on the info_location entity&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot; &amp;quot;start_conversation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intermediate example: play a sound once when the player finds one of several ways into the mansion ===&lt;br /&gt;
Say you wanted a special sound to play when the player finds his way into the mansion. You&#039;d probably have several different entrances, each with their own location. You&#039;d use &amp;quot;call_once_on_entry&amp;quot; on each location to call a script triggering the sound. &lt;br /&gt;
&lt;br /&gt;
Since there are multiple locations and you only want the sound to play once, you also need to create a variable to store whether the sound has already played to stop further triggers of the sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 boolean sound_has_played = false;			//stores whether the sound has played; create here as a global variable so it doesn&#039;t get recreated every time the script runs&lt;br /&gt;
 &lt;br /&gt;
 void found_way_in(entity ent_location)&lt;br /&gt;
 {&lt;br /&gt;
 	if(!sound_has_played)&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($speaker_found_way_in);		//trigger a speaker carrying the sound and &amp;quot;s_waitfortrigger&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
 		sound_has_played = true;			//if other locations call this script, tell them the sound has already played&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //Spawnarg on all info_location entities that cover the entryways to the mansion&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot; &amp;quot;found_way_in&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced example: toggling fog particles depending on whether the player is inside or outside ===&lt;br /&gt;
Particles have a tendency of leaking through walls. If you have a map with lots of particle fog, you might want to manually switch them off whenever the player is inside. Preferrably the switch should happen somewhere where the player can&#039;t see the fog being toggled off.&lt;br /&gt;
&lt;br /&gt;
Unlike lights with On() and Off(), there&#039;s no script event that specifically switches the func_emitters on or off (to my knowledge), you can only toggle them with triggering. So the script should create a new variable to store what state the emitters are in.&lt;br /&gt;
&lt;br /&gt;
This script won&#039;t trigger all func_emitters individually, but rather a trigger_relay entity that in turn targets all the func_emitters. This saves a lot of lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example relies heavily on conditionals to check which location the player is in and whether the fog needs to be toggled, see [[A to Z Scripting: Conditionals]] for more information.&lt;br /&gt;
&lt;br /&gt;
 boolean fog_is_on = true;		//fog starts on; create here as a global variable so it doesn&#039;t get recreated every time toggle_fog() is called&lt;br /&gt;
 &lt;br /&gt;
 void toggle_fog(entity ent_location)&lt;br /&gt;
 {&lt;br /&gt;
 	//if fog is on and player goes inside, toggle off the fog and update fog_is_on to false&lt;br /&gt;
 	if ( (fog_is_on) &amp;amp;&amp;amp; (ent_location == ( $location_manor_entry1 || $location_manor_entry2 || $location_manor_entry3 ) ) )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($relay_fogs);	//trigger_relay targeting all fog func_emitters&lt;br /&gt;
 		fog_is_on = false;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	//if fog is off and player goes outside, toggle on the fog and update fog_is_on to true&lt;br /&gt;
 	else if ( (!fog_is_on) &amp;amp;&amp;amp; (ent_location == ( $location_manor_garden1 || $location_manor_garden2 || $location_manor_garden3 ) ) )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($relay_fogs);&lt;br /&gt;
 		fog_is_on = true;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //Spawnargs on the info_location entities (i.e. location_manor_entry1, location_manor_garden2)&lt;br /&gt;
 &amp;quot;call_on_entry&amp;quot; &amp;quot;toggle_fog&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve chosen not to use call_on_exit because that would call the script also if the player leaves the entrance locations to go deeper into the mansion. There&#039;s no need for that.&lt;br /&gt;
&lt;br /&gt;
== Conversation system ==&lt;br /&gt;
There&#039;s no direct way to call a script from a conversation, but you can tell one of the actors to activate a callscriptfunction entity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Killing or KOing an AI ==&lt;br /&gt;
You can add a spawnarg to AIs to call a script when they&#039;re killed or knocked out:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;death_script&amp;quot;&lt;br /&gt;
 &amp;quot;ko_script&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may pass one entity to the script, the victim, allowing you for example to play a flames effect on the body or remove it after some time:&lt;br /&gt;
 void auto_remove(entity ent_self)&lt;br /&gt;
 {&lt;br /&gt;
 	sys.println(ent1_self.getName() + &amp;quot; has been killed.&amp;quot;);&lt;br /&gt;
 	sys.wait(30);&lt;br /&gt;
 	ent_self.remove();			//remove the body after 30s&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //spawnarg on the AI:&lt;br /&gt;
 &amp;quot;death_script&amp;quot; &amp;quot;auto_remove&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that you can&#039;t tell the script who killed or knocked out the AI (i.e. whether it was the player&#039;s fault). If you need this info, you may use the objectives system and use the &amp;quot;Player responsible&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
== From an animation ==&lt;br /&gt;
You can call a script or a script from the entity&#039;s scriptobject by using one of the following, respectively, as a frame keyword with the name of the script. I believe the entity would pass its name to the script.&lt;br /&gt;
 call&lt;br /&gt;
 object_call&lt;br /&gt;
&lt;br /&gt;
== From the console ==&lt;br /&gt;
This is only for testing purposes because you will no longer be able to save the game after calling a script from the console. The console also lets you try to call script events, but this seems to have no effect ingame.&lt;br /&gt;
 script name_of_script()&lt;br /&gt;
The trailing &amp;quot;()&amp;quot; is required.&lt;br /&gt;
&lt;br /&gt;
== Next / previous article ==&lt;br /&gt;
&lt;br /&gt;
*Next article: [[A to Z Scripting: Getting map information]]&lt;br /&gt;
*Previous article: [[A to Z Scripting: Setting up the .script files]]&lt;br /&gt;
*Table of contents: [[A to Z Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Ways_of_calling_a_script&amp;diff=30910</id>
		<title>A to Z Scripting: Ways of calling a script</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Ways_of_calling_a_script&amp;diff=30910"/>
		<updated>2023-11-28T13:50:10Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;TDM has many methods for calling scripts, some overlap with others but there are always subtle differences. Often you can combine systems such as the objective system with scripting in order to get results that wouldn&#039;t easily be possible with either system alone. &lt;br /&gt;
&lt;br /&gt;
Some of the methods allow you to pass on to the script as input variables which entities were involved in calling the script. This allows you to write a single script which chooses to do different things depending on what activated it, i.e. you could have a portal chamber where each portal teleports the player to a different destination even though they all call the same script. You could set custom spawnargs on the entities and use them in the scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== From other scripts ==&lt;br /&gt;
To call a script from another script, simply write the name of the script followed by input brackets. The script will wait for the called script to finish.&lt;br /&gt;
 void script2()&lt;br /&gt;
 {&lt;br /&gt;
 	script1();		//call script1, wait for script1 to finish&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can write &amp;quot;thread&amp;quot; in front. Both scripts will run simultaneously, because each one runs in its own thread.&lt;br /&gt;
 void script2()&lt;br /&gt;
 {&lt;br /&gt;
 	thread script1();	//call script1, don&#039;t wait&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can only call scripts that the engine already knows about, so the called script (script1) needs to be higher up than the calling script (script2). If you&#039;re using general .script files ([[A to Z Scripting: Setting up the .script files]]), the same applies to the order in which you #include your .script files.&lt;br /&gt;
&lt;br /&gt;
The main advantage of calling one script from another is that you can give as much input as you like - if the called script is designed to use input (see [[A to Z Scripting: Utility scripts]] for more). Other methods can usually only provide 1 or 2 pieces of input: the entity that called the script (i.e. a trigger brush) and the entity that triggered the calling entity (i.e. a player or AI stepping into the trigger brush).&lt;br /&gt;
&lt;br /&gt;
== target_callscriptfunction ==&lt;br /&gt;
You can create an entity in DR called target_callscriptfunction and give it the spawnarg &amp;quot;call&amp;quot; with the name of the script without brackets, i.e. &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;. Whenever this entity is triggered by something, i.e. a button, the script will be called.&lt;br /&gt;
&lt;br /&gt;
These entities are among the most versatile ways to call a script because, with the spawnarg &amp;quot;foreach&amp;quot; &amp;quot;1&amp;quot;, they can pass on 3 entities to the script:&lt;br /&gt;
* one target of the callscriptfunction entity. The script will get repeated on each target, one by one (that&#039;s where &amp;quot;foreach&amp;quot; comes from)&lt;br /&gt;
* the entity that triggered the callscriptfunction entity (aka the activator)(i.e. a button)&lt;br /&gt;
* the name of the callscriptfunction entity itself&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic example: simply calling a script with no input ===&lt;br /&gt;
 void script1()&lt;br /&gt;
 {&lt;br /&gt;
  	sys.println(&amp;quot;script1 has been called.&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //spawnarg on the callscriptfunction entity:&lt;br /&gt;
 &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced example: teleportation script to teleport targeted entities in 2 directions ===&lt;br /&gt;
Here&#039;s a more complex example of a teleportation script that uses all 3 entities that a callscriptfunction can pass to a script:&lt;br /&gt;
 void teleport_targets_away(entity ent_target, entity ent_button, entity ent_callscriptfunction)&lt;br /&gt;
 {&lt;br /&gt;
 	sys.println(&amp;quot;the first entity (the target) is &amp;quot; + ent_target.getName());&lt;br /&gt;
 	sys.println(&amp;quot;the second entity (the button) is &amp;quot; + ent_button.getName());&lt;br /&gt;
 	sys.println(&amp;quot;the third entity (the callscriptfunction) is &amp;quot; + ent_callscriptfunction.getName());&lt;br /&gt;
  &lt;br /&gt;
 	float teleportation_direction 	= ent_button.getFloatKey(&amp;quot;direction&amp;quot;);			//find the teleportation direction, stored on the button&lt;br /&gt;
 	vector teleportation_vector	= ent_callscriptfunction.getVectorKey(&amp;quot;vector&amp;quot;);	//find the teleportation vector, stored on the callscriptfunction entity&lt;br /&gt;
 	if (teleportation_direction == -1) teleportation_vector = -teleportation_vector;	//invert the teleportation vector if the direction is backwards&lt;br /&gt;
 &lt;br /&gt;
 	ent_target.setOrigin(ent_target.getOrigin() + teleportation_vector);			//teleport the target&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The setup in the map would be 2 buttons (1 per direction) targeting a callscriptfunction entity which targets the entities you want to get teleported. The spawnargs are as follows:&lt;br /&gt;
* callscriptfunction entity&lt;br /&gt;
** spawnarg: &amp;quot;foreach&amp;quot; &amp;quot;1&amp;quot; (so it repeats for every target and passes on its name and the button that triggered it)&lt;br /&gt;
** spawnarg: &amp;quot;call&amp;quot; &amp;quot;teleport_targets_away&amp;quot;&lt;br /&gt;
** custom spawnarg: &amp;quot;vector&amp;quot;, with whatever teleportation vector you want i.e. &amp;quot;450 0 0&amp;quot;&lt;br /&gt;
* 2 buttons targeting the callscriptfunction entity&lt;br /&gt;
** one button with custom spawnarg: &amp;quot;direction&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
** the other with custom spawnarg: &amp;quot;direction&amp;quot; &amp;quot;-1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The setup can be cloned as often as you want, just change the &amp;quot;vector&amp;quot; spawnarg and optionally the targets of the callscriptfunction entity each time.&lt;br /&gt;
&lt;br /&gt;
== Trigger brushes ==&lt;br /&gt;
Trigger brushes are a simple way to call scripts, activated when the player or an AI enters the volume of the brush. For AIs to work you need to set &amp;quot;anyTouch&amp;quot; &amp;quot;1&amp;quot; on the brush. The brush needs a spawnarg &amp;quot;call&amp;quot; with the name of the script without brackets, i.e. &amp;quot;call&amp;quot; &amp;quot;script1&amp;quot;. They also trigger all their targets. See [[Triggers]] for details on the creation of trigger brushes and the various types.&lt;br /&gt;
&lt;br /&gt;
Most trigger brushes are quite basic, so they can&#039;t pass the name of the entity that stepped into them or their own name to the script. The best you can do is target a callscriptfunction entity (see above) instead of calling the script directly on the brush: this way, the callscriptfunction will tell the script which brush was activated. &lt;br /&gt;
&lt;br /&gt;
A more advanced type of trigger brush is trigger_touch, which detects all AIs/players/moveables in its volume and calls its script on each of them. More on their use in [[A to Z Scripting: Special methods]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Potential pitfalls with trigger brushes ===&lt;br /&gt;
&lt;br /&gt;
*AIs will stop activating trigger_multiple brushes if they become stationary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Path nodes ==&lt;br /&gt;
Many [[Path Nodes]] trigger all of their targets whenever an AI reaches them. They can target a target_callscriptfunction entity in order to call a script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Stim/Response ==&lt;br /&gt;
The [[Stim/Response]] system is very versatile, in particular when augmented with scripting.&lt;br /&gt;
&lt;br /&gt;
=== Responses, i.e. to frobbing ===&lt;br /&gt;
In most cases, you&#039;ll likely be interested in only the &amp;quot;Response&amp;quot; tab of the S/R editor interface. This allows you to make an entity respond to certain stimuli, such as a frob, a trigger or water by executing various effects, such as running a script (no input possible). Many other effects are available from the dropdown list.&lt;br /&gt;
&lt;br /&gt;
One common use is to make an entity frobable and give it a &amp;quot;Response&amp;quot; to frobbing with an effect to run a script. To do so, set the spawnarg &amp;quot;frobable&amp;quot; &amp;quot;1&amp;quot; on the entity to make it frobable. Then open the S/R editor, go to the Response tab, in the left half of the window add a &amp;quot;Frob&amp;quot; entry,  in the right half of the window right-click and add an effect to &amp;quot;Run script&amp;quot;, naming the script you want to run.&lt;br /&gt;
&lt;br /&gt;
To make this single-use you could add another effect to either:&lt;br /&gt;
* disable frobability of this entity, specifying _SELF as the entity&lt;br /&gt;
* or deactivate the response to frobbing on _SELF. The ID of the frob stim is 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Stim and Response ===&lt;br /&gt;
Working with both the &amp;quot;stim&amp;quot; and &amp;quot;response&amp;quot; tabs of the editor lets you make scripts and other effects happen when two entities come near each other. A common example is a water arrow carrying a water stim being shot at a flame carrying a response to water (&amp;quot;extinguish&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
Enabling a &amp;quot;stim&amp;quot; on an entity causes that entity to emit the stim to its surroundings. The settings allow you to finetune this, i.e. how often the stim gets emitted, the radius etc.&lt;br /&gt;
&lt;br /&gt;
Meanwhile, using the &amp;quot;response&amp;quot; tab on another entity allows you to define what effects happen when this entity is reached by a stim of that type.&lt;br /&gt;
&lt;br /&gt;
Creating a custom stim type is recommended, unless you explicitly want to do something with an existing stim like water or fire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up Stim/Response via script ===&lt;br /&gt;
Stim/Response can be setup either via DarkRadiant or via script. The latter has the advantage that you can setup S/R on the fly after the map has started, which could for example be useful if you&#039;re making a custom entity and don&#039;t want to clutter its spawnarg list. Its disadvantage is that it offers less flexibility than DarkRadiant&#039;s editor and some script functions may not work properly such as sys.wait.&lt;br /&gt;
&lt;br /&gt;
See below for an example of adding a trigger response to an entity via script:&lt;br /&gt;
 ResponseAdd(STIM_TRIGGER);&lt;br /&gt;
 ResponseSetAction(STIM_TRIGGER,&amp;quot;responseTrigger&amp;quot;);  //when this entity is triggered, call the script &amp;quot;responseTrigger&amp;quot;.&lt;br /&gt;
 ResponseEnable(STIM_TRIGGER,1); &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Action scripts ==&lt;br /&gt;
Entities can be given spawnargs that make them run scripts when certain actions are performed on them, such as frobbing or using. The value of the spawnarg is the name of the script. Example: &amp;quot;frob_action_script&amp;quot; &amp;quot;script1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Like with trigger brushes (see earlier), these entities pass their own name to the script function. This allows you to reuse the same spawnarg &amp;amp; script on many entities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| frob_action_script || Calls the specified script when the entity is frobbed by the player.&lt;br /&gt;
|-&lt;br /&gt;
| use_action_script || Calls the specified script when the player uses an inventory item on the entity (i.e. uses a key on a door). The inventory item must be named in a &amp;quot;used_by&amp;quot; spawnarg on the entity. More info here: [[Tool, Key, custom used by inventory actions]]&lt;br /&gt;
|-&lt;br /&gt;
| equip_action_script || Calls the specified script when the player is holding the entity and uses it (i.e. eating a held apple by pressing enter). &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Action scripts are able to tell which entity was frobbed/used/equipped.&lt;br /&gt;
&lt;br /&gt;
=== Example: remove the entity when the player frobs it ===&lt;br /&gt;
 void destroy_frobbed(entity ent_frobbed)&lt;br /&gt;
 {&lt;br /&gt;
 	ent_frobbed.remove();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 Spawnarg on each entity that should be destroyable:&lt;br /&gt;
 &amp;quot;frob_action_script&amp;quot; &amp;quot;destroy_frobbed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Signals ==&lt;br /&gt;
Signals are events which can be setup to call a script. Examples of events are the entity being triggered, touched, removed or damaged (but not: frobbing). Some signals only work for movers i.e. when a mover is blocked or a door is closed/opened. See the [[Signals]] wiki article for a full list of available signals.&lt;br /&gt;
&lt;br /&gt;
Entities using the signal system can pass on their own name to the script.&lt;br /&gt;
&lt;br /&gt;
To use the signal system, you need to use a script event to instruct the entity to respond to a certain signal by running a certain script. Example:&lt;br /&gt;
 sys.onSignal(SIG_TRIGGER, $func_static_1, &amp;quot;script1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
You may later want to disable this again. In that case:&lt;br /&gt;
 sys.clearSignalThread(SIG_TRIGGER, $func_static_1);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the signal system is old, so it doesn&#039;t support &amp;quot;frobbing&amp;quot;, which is a TDM invention. Its SIG_USE doesn&#039;t appear to be useable in TDM either. Furthermore, it doesn&#039;t seem to pass which entity &lt;br /&gt;
&lt;br /&gt;
SIG_TOUCH call its script whenever the player (or something else?) stands very close to the entity, and SIG_BLOCKED for as long as a func_mover is blocked. Note that the scripts get called several times per second, so you might want to clear the signal the first time the script runs and maybe reapply the signal after a certain delay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Objective system ==&lt;br /&gt;
The [[Objectives Editor]] can be seen as a visual scripting editor. Not unsurprisingly it synergises well with scripting.&lt;br /&gt;
&lt;br /&gt;
The main way to use the objective system for scripting is by specifying completion scripts and failure scripts for when an objective is completed or failed. Note that if the objective is reversible, it might call the scripts multiple times.&lt;br /&gt;
&lt;br /&gt;
The objectives system allows you to do some things much more easily than with regular scripting, such as calling a script when reaching a certain page in a book (i.e. playing an ominous sound). Many maps use a mix of hidden objectives and scripts in order to achieve interesting scripted effects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Location system ==&lt;br /&gt;
The location system (wiki page: [[Location Settings]] allows you to call scripts whenever the player enters or leaves specific locations.&lt;br /&gt;
&lt;br /&gt;
It works by setting spawnargs on the info_location entity, with the value being the script&#039;s name:&lt;br /&gt;
 &amp;quot;call_on_entry&amp;quot;&lt;br /&gt;
 &amp;quot;call_on_exit&amp;quot;&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot;&lt;br /&gt;
 &amp;quot;call_once_on_exit&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On the scripting side of things, your script must always contain one entity variable in the input brackets, which will receive the name of the info_location entity involved.&lt;br /&gt;
 void enter_location_streets(entity ent_location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Basic example: start a conversation when the player enters a specific location ===&lt;br /&gt;
 void start_conversation(entity ent_location)			//ent_location must be defined even if it&#039;s not used in the script&lt;br /&gt;
 {&lt;br /&gt;
 	sys.trigger($start_conversation_1);			//trigger an entity that starts the conversation&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //conversation on the info_location entity&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot; &amp;quot;start_conversation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intermediate example: play a sound once when the player finds one of several ways into the mansion ===&lt;br /&gt;
Say you wanted a special sound to play when the player finds his way into the mansion. You&#039;d probably have several different entrances, each with their own location. You&#039;d use &amp;quot;call_once_on_entry&amp;quot; on each location to call a script triggering the sound. &lt;br /&gt;
&lt;br /&gt;
Since there are multiple locations and you only want the sound to play once, you also need to create a variable to store whether the sound has already played to stop further triggers of the sound.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 boolean sound_has_played = false;			//stores whether the sound has played; create here as a global variable so it doesn&#039;t get recreated every time the script runs&lt;br /&gt;
 &lt;br /&gt;
 void found_way_in(entity ent_location)&lt;br /&gt;
 {&lt;br /&gt;
 	if(!sound_has_played)&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($speaker_found_way_in);		//trigger a speaker carrying the sound and &amp;quot;s_waitfortrigger&amp;quot; &amp;quot;1&amp;quot;&lt;br /&gt;
 		sound_has_played = true;			//if other locations call this script, tell them the sound has already played&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //Spawnarg on all info_location entities that cover the entryways to the mansion&lt;br /&gt;
 &amp;quot;call_once_on_entry&amp;quot; &amp;quot;found_way_in&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced example: toggling fog particles depending on whether the player is inside or outside ===&lt;br /&gt;
Particles have a tendency of leaking through walls. If you have a map with lots of particle fog, you might want to manually switch them off whenever the player is inside. Preferrably the switch should happen somewhere where the player can&#039;t see the fog being toggled off.&lt;br /&gt;
&lt;br /&gt;
Unlike lights with On() and Off(), there&#039;s no script event that specifically switches the func_emitters on or off (to my knowledge), you can only toggle them with triggering. So the script should create a new variable to store what state the emitters are in.&lt;br /&gt;
&lt;br /&gt;
This script won&#039;t trigger all func_emitters individually, but rather a trigger_relay entity that in turn targets all the func_emitters. This saves a lot of lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example relies heavily on conditionals to check which location the player is in and whether the fog needs to be toggled, see [[A to Z Scripting: Conditionals]] for more information.&lt;br /&gt;
&lt;br /&gt;
 boolean fog_is_on = true;		//fog starts on; create here as a global variable so it doesn&#039;t get recreated every time toggle_fog() is called&lt;br /&gt;
 &lt;br /&gt;
 void toggle_fog(entity ent_location)&lt;br /&gt;
 {&lt;br /&gt;
 	//if fog is on and player goes inside, toggle off the fog and update fog_is_on to false&lt;br /&gt;
 	if ( (fog_is_on) &amp;amp;&amp;amp; (ent_location == ( $location_manor_entry1 || $location_manor_entry2 || $location_manor_entry3 ) ) )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($relay_fogs);	//trigger_relay targeting all fog func_emitters&lt;br /&gt;
 		fog_is_on = false;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	//if fog is off and player goes outside, toggle on the fog and update fog_is_on to true&lt;br /&gt;
 	else if ( (!fog_is_on) &amp;amp;&amp;amp; (ent_location == ( $location_manor_garden1 || $location_manor_garden2 || $location_manor_garden3 ) ) )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger($relay_fogs);&lt;br /&gt;
 		fog_is_on = true;&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //Spawnargs on the info_location entities (i.e. location_manor_entry1, location_manor_garden2)&lt;br /&gt;
 &amp;quot;call_on_entry&amp;quot; &amp;quot;toggle_fog&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve chosen not to use call_on_exit because that would call the script also if the player leaves the entrance locations to go deeper into the mansion. There&#039;s no need for that.&lt;br /&gt;
&lt;br /&gt;
== Conversation system ==&lt;br /&gt;
There&#039;s no direct way to call a script from a conversation, but you can tell one of the actors to activate a callscriptfunction entity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Killing or KOing an AI ==&lt;br /&gt;
You can add a spawnarg to AIs to call a script when they&#039;re killed or knocked out:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;death_script&amp;quot;&lt;br /&gt;
 &amp;quot;ko_script&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may pass one entity to the script, the victim, allowing you for example to play a flames effect on the body or remove it after some time:&lt;br /&gt;
 void auto_remove(entity ent_self)&lt;br /&gt;
 {&lt;br /&gt;
 	sys.println(ent1_self.getName() + &amp;quot; has been killed.&amp;quot;);&lt;br /&gt;
 	sys.wait(30);&lt;br /&gt;
 	ent_self.remove();			//remove the body after 30s&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 //spawnarg on the AI:&lt;br /&gt;
 &amp;quot;death_script&amp;quot; &amp;quot;auto_remove&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note that you can&#039;t tell the script who killed or knocked out the AI (i.e. whether it was the player&#039;s fault). If you need this info, you may use the objectives system and use the &amp;quot;Player responsible&amp;quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
== From an animation ==&lt;br /&gt;
You can call a script or a script from the entity&#039;s scriptobject by using one of the following, respectively, as a frame keyword with the name of the script. I believe the entity would pass its name to the script.&lt;br /&gt;
 call&lt;br /&gt;
 object_call&lt;br /&gt;
&lt;br /&gt;
== From the console ==&lt;br /&gt;
This is only for testing purposes because you will no longer be able to save the game after calling a script from the console. The console also lets you try to call script events, but this seems to have no effect ingame.&lt;br /&gt;
 script name_of_script()&lt;br /&gt;
The trailing &amp;quot;()&amp;quot; is required.&lt;br /&gt;
&lt;br /&gt;
== Next / previous article ==&lt;br /&gt;
&lt;br /&gt;
*Next article: [[A to Z Scripting: Getting map information]]&lt;br /&gt;
*Previous article: [[A to Z Scripting: Setting up the .script files]]&lt;br /&gt;
*Table of contents: [[A to Z Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Script_addons_for_players&amp;diff=30905</id>
		<title>A to Z Scripting: Script addons for players</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=A_to_Z_Scripting:_Script_addons_for_players&amp;diff=30905"/>
		<updated>2023-11-17T23:09:03Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Script addons for players ==&lt;br /&gt;
Script addons are additional custom scripts that players can download in order to modify their gameplay in all missions. Examples might be a script for players with arachnophobia that kills and hides all spiders at map start, or a script that automatically adds a custom item to the player&#039;s inventory at the start of every mission, such as a scroll displaying statistics about the current mission.&lt;br /&gt;
&lt;br /&gt;
These are the steps in creating an addon:&lt;br /&gt;
*1) Create a .script file in the &amp;quot;script&amp;quot; folder and write your script(s) into it.&lt;br /&gt;
*2) Use a file in the format tdm_user_addons_*.script to #include your .script file (similarly to tdm_custom_scripts.script). You can also get your script called at map start here.&lt;br /&gt;
*3) Package your files into a .pk4.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example addon: kill &amp;amp; hide all spiders for players with arachnophobia ==&lt;br /&gt;
=== Writing the script ===&lt;br /&gt;
The first thing to do is find all entities that are spiders. You will need to find a spawnarg value which is used only by spiders: I&#039;ve decided to check if the entity has got an &amp;quot;ik_foot8&amp;quot; spawnarg, since having 8 legs is a unique feature of spiders.&lt;br /&gt;
&lt;br /&gt;
As shown in the Special Methods section, do + while() is well suited for going through all entities that match a certain spawnarg. Once the entity has been found, we can run kill() and hide() on it:&lt;br /&gt;
 void destroy_spiders()&lt;br /&gt;
 {&lt;br /&gt;
 	ai spider;&lt;br /&gt;
 &lt;br /&gt;
 	do&lt;br /&gt;
 	{&lt;br /&gt;
 		spider = sys.getNextEntity(&amp;quot;ik_foot8&amp;quot;, &amp;quot;right_leg_4_4&amp;quot;, spider);	//find the next entity with a valid &amp;quot;ik_foot8&amp;quot; spawnarg&lt;br /&gt;
 		&lt;br /&gt;
 		if(spider)						//if a valid entity has been found, kill and hide it&lt;br /&gt;
 		{&lt;br /&gt;
 			spider.kill();&lt;br /&gt;
 			spider.hide();&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
 	}	while (spider);						//keep going for as long as getNextEntity finds valid entities&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
(Note: you might want to add a second do + while() block for finding &amp;amp; hiding spiders that start as ragdolls.)&lt;br /&gt;
&lt;br /&gt;
=== #include your .script files and call scripts at map start ===&lt;br /&gt;
As of version 2.12, TDM automatically finds and #includes all .script files that begin with the prefix &amp;quot;tdm_user_addons_&amp;quot; and are in the &amp;quot;script&amp;quot; folder. In this case you could name your script file &amp;quot;tdm_user_addons_spiders.script&amp;quot; and put it in the &amp;quot;script&amp;quot; folder. &lt;br /&gt;
&lt;br /&gt;
You will probably also want some way to call your script at map start, even if it&#039;s just to give the player a custom-scripted tool or weapon. TDM v2.12 now automatically calls all script functions that begin with the prefix &amp;quot;user_addon_init_&amp;quot; about one or two frames after map start. For example:&lt;br /&gt;
&lt;br /&gt;
 void user_addon_init_spiders()&lt;br /&gt;
 {&lt;br /&gt;
 	thread destroy_spiders();	//call the script to find &amp;amp; destroy &amp;amp; hide all spiders in the map&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that only one script file and function must follow the above naming conventions. You can #include further script files in your tdm_user_addons_* file, and you can call further functions from your user_addon_init_* function.&lt;br /&gt;
&lt;br /&gt;
=== Package into a .pk4 ===&lt;br /&gt;
Package your /script folder into a .zip archive, then change the extension to .pk4. If your addon contains further files that you want to overwrite core asset files with, then your addon .pk4 name should sort alphabetically after tdm_base01.pk4, for example z_arachnophobia.pk4. Otherwise the .pk4 name no longer matters as of TDM 2.12.&lt;br /&gt;
&lt;br /&gt;
You can now upload this to a file sharing website and post a link to the forums. The .pk4 can simply be dropped into the user&#039;s main installation folder with no need to unpack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using multiple addons ==&lt;br /&gt;
As of TDM 2.12 users can use as many addons as they want. However, addons that have files, script functions or .pk4s with the same name will not be compatible. It&#039;s therefore advisable to use unique names for all of these, for example by having them include the creator&#039;s username. &lt;br /&gt;
&lt;br /&gt;
== Next / previous article ==&lt;br /&gt;
&lt;br /&gt;
*Next article: [[A to Z Scripting: Troubleshooting]]&lt;br /&gt;
*Previous article: [[A to Z Scripting: Scriptobjects]]&lt;br /&gt;
*Table of contents: [[A to Z Scripting]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting]]&lt;br /&gt;
{{Addons}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Xrays&amp;diff=30891</id>
		<title>Xrays</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Xrays&amp;diff=30891"/>
		<updated>2023-10-23T16:39:10Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Xrays ==&lt;br /&gt;
&lt;br /&gt;
Xray screens are flexible mapping tools that allow mappers to achieve a variety of effects related to the appearance and visibility of entities ingame. The effects that are possible with xrays and can be used in any combination are:&lt;br /&gt;
&lt;br /&gt;
* Changing the model and/or skin of entities seen through the xray screen. The xray version of the entity may either replace or blend with the normal version.&lt;br /&gt;
* Hiding or revealing entities when looking through the xray screen.&lt;br /&gt;
* Rendering entities in front of opaque obstacles.&lt;br /&gt;
&lt;br /&gt;
Unlike in real life, xray screens in TDM don&#039;t use an xray light source. All that&#039;s needed for the xray feature is an xray screen and appropriate spawnargs on entities that should be affected by the xray feature.&lt;br /&gt;
&lt;br /&gt;
Xray screens may be put on brushes/patches or in GUI overlays. Note that they must be converted to an entity, which may be a func_static.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Spawnargs == &lt;br /&gt;
&lt;br /&gt;
The following xray spawnargs exist:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;model_xray&#039;&#039;&#039;: switch to this model when seen through an xray screen.&lt;br /&gt;
* &#039;&#039;&#039;skin_xray&#039;&#039;&#039;: switch to this skin when seen through an xray screen. 2.10 contains new generic skins &amp;quot;visible&amp;quot; and &amp;quot;invisible&amp;quot; which can be used by the &amp;quot;skin_xray&amp;quot; and &amp;quot;skin&amp;quot; spawnargs to change visibility.&lt;br /&gt;
* &#039;&#039;&#039;xray&#039;&#039;&#039;: set to &amp;quot;1&amp;quot; to simply mark this entity as an xray enabled entity without changing its appearance. Useful if you only want certain xray effects, like rendering in front of other objects.&lt;br /&gt;
* &#039;&#039;&#039;suppressInSubview&#039;&#039;&#039;: specific to lights, setting this to &amp;quot;1&amp;quot; makes the light visible only in normal vision while &amp;quot;2&amp;quot; makes it visible only in xray vision. Note that this affects other subviews like mirrors and camera screens, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need a material for an xray screen. TDM already contains these materials by default, with a warped version of each also being available:&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray&#039;&#039;&#039;: Shows xray-enabled entities through opaque obstacles and optionally changes their model and/or skin. Skin changes may be less visible than expected due to blending of normal and xray models.&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray_exclusive&#039;&#039;&#039;: Shows xray-enabled entities through opaque obstacles and optionally changes their model and/or skin. Excludes everything else.&lt;br /&gt;
* &#039;&#039;&#039;textures/darkmod/sfx/xray_replacing&#039;&#039;&#039;: Replaces the model and/or skin of xray-enabled entities seen through this material. Doesn&#039;t show entities through opaque obstacles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For GUIs (i.e. xray glasses), the following xray materials are available, with a warped version of each also being available:&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_replacing&#039;&#039;&#039;: Replaces the normal model with the xray model. No xray vision through opaque obstacles.&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_mixed&#039;&#039;&#039;: Shows both the normal and xray models transparently. No xray vision through opaque obstacles.&lt;br /&gt;
* &#039;&#039;&#039;xray_glasses_overlay_exclusive&#039;&#039;&#039;: Shows xray-enabled entities through solid obstacles, optionally changes their model and/or skin and excludes everything else.&lt;br /&gt;
(See [[Xrays in GUIs]] for more details)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When working with these materials, it can be helpful to know what the 2 factors are that result in their differing behaviour:&lt;br /&gt;
&lt;br /&gt;
1) &#039;&#039;&#039;xrayRenderMap&#039;&#039;&#039;: This keyword identifies an xray stage in the material. By default it will only show xray enabled entities and otherwise be black (&amp;quot;exclusive&amp;quot;), but you can add the word &amp;quot;inclusive&amp;quot; behind it so it also shows everything else.&lt;br /&gt;
&lt;br /&gt;
2) &#039;&#039;&#039;blend mode&#039;&#039;&#039;: This affects how the xray view is rendered:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;blend add&#039;&#039;&#039; results in literal xray vision, meaning that xray entities are rendered before everything else since they&#039;re just added on top of whatever else the player is seeing. This works best with a default xrayRenderMap (&amp;quot;exclusive&amp;quot;), since an &amp;quot;inclusive&amp;quot; xrayRenderMap would result in everything else being shown twice, at double brightness.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;blend blend&#039;&#039;&#039; means that the xray view replaces the normal view, swapping an entity&#039;s normal appearance for its xray appearance and (if exclusive) replacing everything else with blackness.&lt;br /&gt;
&lt;br /&gt;
* For GUIs, special blend modes are used in the default materials to allow the xray effect to only occur on parts of the screen. If you want your xray GUI to affect the whole screen you may use a regular blend mode as above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Xray demo map ==&lt;br /&gt;
&lt;br /&gt;
You may download a small test FM demonstrating the xray feature from [https://ftp.thedarkmod.com/tutorials/Xrays/xray_demo.pk4 here].&lt;br /&gt;
It consists of a small room with various xray-enabled entities, and you start looking through a wooden frame containing an xray screen. You&#039;ll also find a pair of equippable xray glasses on the table. See below for some screenshots from the test FM using various materials:&lt;br /&gt;
&lt;br /&gt;
[[File:Xray replace.jpg|800px|thumb|left|Uses material: textures/darkmod/sfx/xray_replacing]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray vision.jpg|800px|thumb|left|Uses material: textures/darkmod/sfx/xray]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray gui replace.jpg|800px|thumb|left|Uses material: xray_glasses_overlay_replacing_warped]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[File:Xray gui mix.jpg|800px|thumb|left|Uses material: xray_glasses_overlay_mixed_warped]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supported entity types ==&lt;br /&gt;
&lt;br /&gt;
This is how the following entities can be affected by the xray feature at present:&lt;br /&gt;
&lt;br /&gt;
* Entities with models, including AIs: &amp;quot;model_xray&amp;quot; and &amp;quot;skin_xray&amp;quot; both work.&lt;br /&gt;
* Brushes and patches: &amp;quot;model_xray&amp;quot; and &amp;quot;skin_xray&amp;quot; both work.&lt;br /&gt;
* Lights: currently no way to manipulate these with the xray feature.&lt;br /&gt;
* Func_emitters: &amp;quot;skin_xray&amp;quot; works, but not &amp;quot;model_xray&amp;quot;.&lt;br /&gt;
* Func_smokes: no way to manipulate these with xrays, and it looks unlikely that it&#039;ll be implemented due to how func_smokes work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
* The xray system doesn&#039;t affect solidity or frobability of xray-enabled entities, so separate scripting is required to handle this. Ideally this would be part of a scriptobject of an equippable item like &amp;quot;xray glasses&amp;quot; - see [[Xrays in GUIs]] for more.&lt;br /&gt;
* Xray vision to see entities through solid obstacles only works if the entity is already being rendered. You can&#039;t see entities in neighbouring rooms if all the visportal to that room are closed. This would be a good reason to keep such xray screens stationary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
[[Xrays in GUIs]]: Describes how the equippable &amp;quot;xray glasses&amp;quot; inventory item was made.&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30443</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30443"/>
		<updated>2022-12-26T17:07:45Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Available ==&lt;br /&gt;
&lt;br /&gt;
=== Bank ===&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undefined|basic Geometry|-}}&lt;br /&gt;
Archive name: bank&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Canals ===&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undefined|much of the Geometry|-}}&lt;br /&gt;
Archive name: canals&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Castle 1 ===&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castle1&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== High Society ===&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Archive name: highsociety&lt;br /&gt;
&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Life in Luxury ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Archive name: lifeinluxury&lt;br /&gt;
&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lost City ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Archive name: lostcity&lt;br /&gt;
&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Neighbours ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Archive name: neighbours&lt;br /&gt;
&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elixir (earlier version) ===&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Archive name: elixir&lt;br /&gt;
&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1-2.jpg&lt;br /&gt;
Elixiralpha1-3.jpg&lt;br /&gt;
Elixiralpha1-4.jpg&lt;br /&gt;
Elixiralpha1-5.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hmart tests ===&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Archive name: hmart_tests&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Of Brambles and Thorns ===&lt;br /&gt;
{{abandoned-works|Dragofer|-|{{green|Free for adoption}}|Mansion|Horror, eccentric noble|Architecture mostly done|Sequel to One Step Too Far}}&lt;br /&gt;
Archive name: brambles&lt;br /&gt;
&lt;br /&gt;
Info: Large mansion mission located in the woods, designed for a spooky story. Noble wing in the south, servants&#039; wing in the north. Architecture is mostly in place with some initial interiors. Screenshots of more interiors can be found in the screenshots folder or #2 to #10 in this album https://imgur.com/a/Qs66N - unfortunately they were lost during a backup overwrite.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Brambles1.jpg&lt;br /&gt;
Brambles2.jpg&lt;br /&gt;
Brambles3.jpg&lt;br /&gt;
Brambles4.jpg&lt;br /&gt;
Brambles5.png|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wreckers Reach ===&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/wreckers&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manor Royale ===&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Manor Royale1.jpg&lt;br /&gt;
Manor Royale2.jpg&lt;br /&gt;
Manor Royale3.jpg&lt;br /&gt;
Manor Royale4.jpg&lt;br /&gt;
Manor RoyaleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/manor_royale&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Iceclaw ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Iceclaw1.jpg&lt;br /&gt;
Iceclaw2.jpg&lt;br /&gt;
Iceclaw3.jpg&lt;br /&gt;
Iceclaw4.jpg&lt;br /&gt;
Iceclaw5.jpg&lt;br /&gt;
IceclawDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/iceclaw&lt;br /&gt;
&lt;br /&gt;
=== Letterford Manor ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Letterfold1.jpg&lt;br /&gt;
Letterfold2.jpg&lt;br /&gt;
Letterfold3.jpg&lt;br /&gt;
Letterfold4.jpg&lt;br /&gt;
Letterfold5.jpg&lt;br /&gt;
LetterfoldDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/letterford&lt;br /&gt;
&lt;br /&gt;
=== The Tavern ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
Archive name: crucibleofomens/maps/tavern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Untitled1.jpg&lt;br /&gt;
Untitled2.jpg&lt;br /&gt;
Untitled3.jpg&lt;br /&gt;
Untitled4.jpg&lt;br /&gt;
Untitled.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adopted ==&lt;br /&gt;
&lt;br /&gt;
=== Castle &amp;amp; Caves ===&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castles_caves&lt;br /&gt;
&lt;br /&gt;
=== The White Rose Hotel ===&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Archive name: whiterose&lt;br /&gt;
&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Buried Cloister ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|JackFarmer|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
BuriedCloister1.jpg&lt;br /&gt;
BuriedCloister2.jpg&lt;br /&gt;
BuriedCloister3.jpg&lt;br /&gt;
BuriedCloister4.jpg&lt;br /&gt;
BuriedCloister5.jpg&lt;br /&gt;
BuriedCloisterDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/cloister&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Seeking Lady Leicester ===&lt;br /&gt;
{{abandoned-works|grayman|bikerdude|{{red|Adopted}}|Mansion|undefined|75% completed|-}}&lt;br /&gt;
&lt;br /&gt;
=== Nexus ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/nexus&lt;br /&gt;
&lt;br /&gt;
=== The Dead Gathers ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/gathers&lt;br /&gt;
&lt;br /&gt;
=== Restless Plunder ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/restless&lt;br /&gt;
&lt;br /&gt;
=== Blackheart Manor ===&lt;br /&gt;
{{abandoned-works|Dram, Bikerdude|Bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/blackheart_manor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Released ==&lt;br /&gt;
&lt;br /&gt;
=== The Black Mage ===&lt;br /&gt;
{{abandoned-works|grayman|Jackfarmer|{{red|Released}}|Castle/Fortress|Horror|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Setting the scene ===&lt;br /&gt;
{{abandoned-works|Atti, Bikerdude|Geep|{{red|Released}} (new name: &#039;&#039;&#039;Away 0&#039;&#039;&#039;)|undefined|undefined|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== 245 ===&lt;br /&gt;
{{abandoned-works|?|SirTaffsalot|{{red|Released}} (new name: Vengeance for a Thief 1)|-|-|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Behind closed doors (bcd) ===&lt;br /&gt;
{{abandoned-works|-|Bikerdude and the Crucible Team|{{red|Released}}|City Missions|undefined|-|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30442</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30442"/>
		<updated>2022-12-26T17:06:35Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Available ==&lt;br /&gt;
&lt;br /&gt;
=== Bank ===&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undefined|basic Geometry|-}}&lt;br /&gt;
Archive name: bank&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Canals ===&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undefined|much of the Geometry|-}}&lt;br /&gt;
Archive name: canals&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Castle 1 ===&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castle1&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== High Society ===&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Archive name: highsociety&lt;br /&gt;
&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Life in Luxury ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Archive name: lifeinluxury&lt;br /&gt;
&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lost City ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Archive name: lostcity&lt;br /&gt;
&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Neighbours ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Archive name: neighbours&lt;br /&gt;
&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elixir (earlier version) ===&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Archive name: elixir&lt;br /&gt;
&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1-2.jpg&lt;br /&gt;
Elixiralpha1-3.jpg&lt;br /&gt;
Elixiralpha1-4.jpg&lt;br /&gt;
Elixiralpha1-5.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hmart tests ===&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Archive name: hmart_tests&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Of Brambles and Thorns ===&lt;br /&gt;
{{abandoned-works|Dragofer|-|{{green|Free for adoption}}|Mansion|Horror, eccentric noble|Architecture mostly done|Sequel to One Step Too Far}}&lt;br /&gt;
Archive name: brambles&lt;br /&gt;
&lt;br /&gt;
Info: Large mansion mission located in the woods, designed for a spooky story, recreated from the real-life [https://en.wikipedia.org/wiki/Bennett_College_(New_York) luxury hotel &amp;quot;Halcyon Hall&amp;quot; / posh girls&#039; school &amp;quot;Bennett College&amp;quot;]. Noble wing in the south, servants&#039; wing in the north. Architecture is mostly in place with some initial interiors. Screenshots of more interiors can be found in the screenshots folder or #2 to #9 in this album https://imgur.com/a/Qs66N - unfortunately they were lost during a backup overwrite.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Brambles1.jpg&lt;br /&gt;
Brambles2.jpg&lt;br /&gt;
Brambles3.jpg&lt;br /&gt;
Brambles4.jpg&lt;br /&gt;
Brambles5.png|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wreckers Reach ===&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/wreckers&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manor Royale ===&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Manor Royale1.jpg&lt;br /&gt;
Manor Royale2.jpg&lt;br /&gt;
Manor Royale3.jpg&lt;br /&gt;
Manor Royale4.jpg&lt;br /&gt;
Manor RoyaleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/manor_royale&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Iceclaw ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Iceclaw1.jpg&lt;br /&gt;
Iceclaw2.jpg&lt;br /&gt;
Iceclaw3.jpg&lt;br /&gt;
Iceclaw4.jpg&lt;br /&gt;
Iceclaw5.jpg&lt;br /&gt;
IceclawDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/iceclaw&lt;br /&gt;
&lt;br /&gt;
=== Letterford Manor ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Letterfold1.jpg&lt;br /&gt;
Letterfold2.jpg&lt;br /&gt;
Letterfold3.jpg&lt;br /&gt;
Letterfold4.jpg&lt;br /&gt;
Letterfold5.jpg&lt;br /&gt;
LetterfoldDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/letterford&lt;br /&gt;
&lt;br /&gt;
=== The Tavern ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
Archive name: crucibleofomens/maps/tavern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Untitled1.jpg&lt;br /&gt;
Untitled2.jpg&lt;br /&gt;
Untitled3.jpg&lt;br /&gt;
Untitled4.jpg&lt;br /&gt;
Untitled.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adopted ==&lt;br /&gt;
&lt;br /&gt;
=== Castle &amp;amp; Caves ===&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castles_caves&lt;br /&gt;
&lt;br /&gt;
=== The White Rose Hotel ===&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Archive name: whiterose&lt;br /&gt;
&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Buried Cloister ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|JackFarmer|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
BuriedCloister1.jpg&lt;br /&gt;
BuriedCloister2.jpg&lt;br /&gt;
BuriedCloister3.jpg&lt;br /&gt;
BuriedCloister4.jpg&lt;br /&gt;
BuriedCloister5.jpg&lt;br /&gt;
BuriedCloisterDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/cloister&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Seeking Lady Leicester ===&lt;br /&gt;
{{abandoned-works|grayman|bikerdude|{{red|Adopted}}|Mansion|undefined|75% completed|-}}&lt;br /&gt;
&lt;br /&gt;
=== Nexus ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/nexus&lt;br /&gt;
&lt;br /&gt;
=== The Dead Gathers ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/gathers&lt;br /&gt;
&lt;br /&gt;
=== Restless Plunder ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/restless&lt;br /&gt;
&lt;br /&gt;
=== Blackheart Manor ===&lt;br /&gt;
{{abandoned-works|Dram, Bikerdude|Bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/blackheart_manor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Released ==&lt;br /&gt;
&lt;br /&gt;
=== The Black Mage ===&lt;br /&gt;
{{abandoned-works|grayman|Jackfarmer|{{red|Released}}|Castle/Fortress|Horror|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Setting the scene ===&lt;br /&gt;
{{abandoned-works|Atti, Bikerdude|Geep|{{red|Released}} (new name: &#039;&#039;&#039;Away 0&#039;&#039;&#039;)|undefined|undefined|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== 245 ===&lt;br /&gt;
{{abandoned-works|?|SirTaffsalot|{{red|Released}} (new name: Vengeance for a Thief 1)|-|-|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Behind closed doors (bcd) ===&lt;br /&gt;
{{abandoned-works|-|Bikerdude and the Crucible Team|{{red|Released}}|City Missions|undefined|-|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30441</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30441"/>
		<updated>2022-12-26T16:57:06Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Available ==&lt;br /&gt;
&lt;br /&gt;
=== Bank ===&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undefined|basic Geometry|-}}&lt;br /&gt;
Archive name: bank&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Canals ===&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undefined|much of the Geometry|-}}&lt;br /&gt;
Archive name: canals&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Castle 1 ===&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castle1&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== High Society ===&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Archive name: highsociety&lt;br /&gt;
&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Life in Luxury ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Archive name: lifeinluxury&lt;br /&gt;
&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lost City ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Archive name: lostcity&lt;br /&gt;
&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Neighbours ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Archive name: neighbours&lt;br /&gt;
&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elixir (earlier version) ===&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Archive name: elixir&lt;br /&gt;
&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1-2.jpg&lt;br /&gt;
Elixiralpha1-3.jpg&lt;br /&gt;
Elixiralpha1-4.jpg&lt;br /&gt;
Elixiralpha1-5.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hmart tests ===&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Archive name: hmart_tests&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Of Brambles and Thorns ===&lt;br /&gt;
{{abandoned-works|Dragofer|-|{{green|Free for adoption}}|Mansion|Horror, eccentric noble|Architecture mostly done|Sequel to One Step Too Far}}&lt;br /&gt;
Archive name: brambles&lt;br /&gt;
&lt;br /&gt;
Info: Large mansion mission located in the woods, designed for a spooky story. Noble wing in the south, servants&#039; wing in the north. Architecture is mostly in place with some initial interiors. Screenshots of more interiors can be found in the screenshots folder or #2 to #9 in this album https://imgur.com/a/Qs66N - unfortunately they were lost during a backup overwrite.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Brambles1.jpg&lt;br /&gt;
Brambles2.jpg&lt;br /&gt;
Brambles3.jpg&lt;br /&gt;
Brambles4.jpg&lt;br /&gt;
Brambles5.png|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wreckers Reach ===&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/wreckers&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manor Royale ===&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Manor Royale1.jpg&lt;br /&gt;
Manor Royale2.jpg&lt;br /&gt;
Manor Royale3.jpg&lt;br /&gt;
Manor Royale4.jpg&lt;br /&gt;
Manor RoyaleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/manor_royale&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Iceclaw ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Iceclaw1.jpg&lt;br /&gt;
Iceclaw2.jpg&lt;br /&gt;
Iceclaw3.jpg&lt;br /&gt;
Iceclaw4.jpg&lt;br /&gt;
Iceclaw5.jpg&lt;br /&gt;
IceclawDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/iceclaw&lt;br /&gt;
&lt;br /&gt;
=== Letterford Manor ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Letterfold1.jpg&lt;br /&gt;
Letterfold2.jpg&lt;br /&gt;
Letterfold3.jpg&lt;br /&gt;
Letterfold4.jpg&lt;br /&gt;
Letterfold5.jpg&lt;br /&gt;
LetterfoldDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/letterford&lt;br /&gt;
&lt;br /&gt;
=== The Tavern ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
Archive name: crucibleofomens/maps/tavern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Untitled1.jpg&lt;br /&gt;
Untitled2.jpg&lt;br /&gt;
Untitled3.jpg&lt;br /&gt;
Untitled4.jpg&lt;br /&gt;
Untitled.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adopted ==&lt;br /&gt;
&lt;br /&gt;
=== Castle &amp;amp; Caves ===&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castles_caves&lt;br /&gt;
&lt;br /&gt;
=== The White Rose Hotel ===&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Archive name: whiterose&lt;br /&gt;
&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Buried Cloister ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|JackFarmer|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
BuriedCloister1.jpg&lt;br /&gt;
BuriedCloister2.jpg&lt;br /&gt;
BuriedCloister3.jpg&lt;br /&gt;
BuriedCloister4.jpg&lt;br /&gt;
BuriedCloister5.jpg&lt;br /&gt;
BuriedCloisterDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/cloister&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Seeking Lady Leicester ===&lt;br /&gt;
{{abandoned-works|grayman|bikerdude|{{red|Adopted}}|Mansion|undefined|75% completed|-}}&lt;br /&gt;
&lt;br /&gt;
=== Nexus ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/nexus&lt;br /&gt;
&lt;br /&gt;
=== The Dead Gathers ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/gathers&lt;br /&gt;
&lt;br /&gt;
=== Restless Plunder ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/restless&lt;br /&gt;
&lt;br /&gt;
=== Blackheart Manor ===&lt;br /&gt;
{{abandoned-works|Dram, Bikerdude|Bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/blackheart_manor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Released ==&lt;br /&gt;
&lt;br /&gt;
=== The Black Mage ===&lt;br /&gt;
{{abandoned-works|grayman|Jackfarmer|{{red|Released}}|Castle/Fortress|Horror|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Setting the scene ===&lt;br /&gt;
{{abandoned-works|Atti, Bikerdude|Geep|{{red|Released}} (new name: &#039;&#039;&#039;Away 0&#039;&#039;&#039;)|undefined|undefined|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== 245 ===&lt;br /&gt;
{{abandoned-works|?|SirTaffsalot|{{red|Released}} (new name: Vengeance for a Thief 1)|-|-|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Behind closed doors (bcd) ===&lt;br /&gt;
{{abandoned-works|-|Bikerdude and the Crucible Team|{{red|Released}}|City Missions|undefined|-|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30440</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30440"/>
		<updated>2022-12-26T16:50:57Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- &amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Available ==&lt;br /&gt;
&lt;br /&gt;
=== Bank ===&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undefined|basic Geometry|-}}&lt;br /&gt;
Archive name: bank&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Canals ===&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undefined|much of the Geometry|-}}&lt;br /&gt;
Archive name: canals&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Castle 1 ===&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castle1&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== High Society ===&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Archive name: highsociety&lt;br /&gt;
&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Life in Luxury ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Archive name: lifeinluxury&lt;br /&gt;
&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lost City ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Archive name: lostcity&lt;br /&gt;
&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Neighbours ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Archive name: neighbours&lt;br /&gt;
&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elixir (earlier version) ===&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Archive name: elixir&lt;br /&gt;
&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1-2.jpg&lt;br /&gt;
Elixiralpha1-3.jpg&lt;br /&gt;
Elixiralpha1-4.jpg&lt;br /&gt;
Elixiralpha1-5.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hmart tests ===&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Archive name: hmart_tests&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Of Brambles and Thorns ===&lt;br /&gt;
{{abandoned-works|Dragofer|-|{{green|Free for adoption}}|undefined|undefined|undefined|Of Brambles and Thorns}}&lt;br /&gt;
Archive name: brambles&lt;br /&gt;
&lt;br /&gt;
Info: Large mansion mission located in the woods, designed for a spooky story. Noble wing in the south, servants&#039; wing in the north. Architecture is mostly in place with some initial interiors. Screenshots of more interiors can be found in the screenshots folder or #2 to #9 in this album https://imgur.com/a/Qs66N - unfortunately they were lost during a backup overwrite.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Brambles1.jpg&lt;br /&gt;
Brambles2.jpg&lt;br /&gt;
Brambles3.jpg&lt;br /&gt;
Brambles4.jpg&lt;br /&gt;
Brambles5.png|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wreckers Reach ===&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/wreckers&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manor Royale ===&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Manor Royale1.jpg&lt;br /&gt;
Manor Royale2.jpg&lt;br /&gt;
Manor Royale3.jpg&lt;br /&gt;
Manor Royale4.jpg&lt;br /&gt;
Manor RoyaleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/manor_royale&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Iceclaw ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Iceclaw1.jpg&lt;br /&gt;
Iceclaw2.jpg&lt;br /&gt;
Iceclaw3.jpg&lt;br /&gt;
Iceclaw4.jpg&lt;br /&gt;
Iceclaw5.jpg&lt;br /&gt;
IceclawDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/iceclaw&lt;br /&gt;
&lt;br /&gt;
=== Letterford Manor ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Letterfold1.jpg&lt;br /&gt;
Letterfold2.jpg&lt;br /&gt;
Letterfold3.jpg&lt;br /&gt;
Letterfold4.jpg&lt;br /&gt;
Letterfold5.jpg&lt;br /&gt;
LetterfoldDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/letterford&lt;br /&gt;
&lt;br /&gt;
=== The Tavern ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
Archive name: crucibleofomens/maps/tavern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Untitled1.jpg&lt;br /&gt;
Untitled2.jpg&lt;br /&gt;
Untitled3.jpg&lt;br /&gt;
Untitled4.jpg&lt;br /&gt;
Untitled.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adopted ==&lt;br /&gt;
&lt;br /&gt;
=== Castle &amp;amp; Caves ===&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castles_caves&lt;br /&gt;
&lt;br /&gt;
=== The White Rose Hotel ===&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Archive name: whiterose&lt;br /&gt;
&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Buried Cloister ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|JackFarmer|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
BuriedCloister1.jpg&lt;br /&gt;
BuriedCloister2.jpg&lt;br /&gt;
BuriedCloister3.jpg&lt;br /&gt;
BuriedCloister4.jpg&lt;br /&gt;
BuriedCloister5.jpg&lt;br /&gt;
BuriedCloisterDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/cloister&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Seeking Lady Leicester ===&lt;br /&gt;
{{abandoned-works|grayman|bikerdude|{{red|Adopted}}|Mansion|undefined|75% completed|-}}&lt;br /&gt;
&lt;br /&gt;
=== Nexus ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/nexus&lt;br /&gt;
&lt;br /&gt;
=== The Dead Gathers ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/gathers&lt;br /&gt;
&lt;br /&gt;
=== Restless Plunder ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/restless&lt;br /&gt;
&lt;br /&gt;
=== Blackheart Manor ===&lt;br /&gt;
{{abandoned-works|Dram, Bikerdude|Bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/blackheart_manor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Released ==&lt;br /&gt;
&lt;br /&gt;
=== The Black Mage ===&lt;br /&gt;
{{abandoned-works|grayman|Jackfarmer|{{red|Released}}|Castle/Fortress|Horror|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Setting the scene ===&lt;br /&gt;
{{abandoned-works|Atti, Bikerdude|Geep|{{red|Released}} (new name: &#039;&#039;&#039;Away 0&#039;&#039;&#039;)|undefined|undefined|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== 245 ===&lt;br /&gt;
{{abandoned-works|?|SirTaffsalot|{{red|Released}} (new name: Vengeance for a Thief 1)|-|-|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Behind closed doors (bcd) ===&lt;br /&gt;
{{abandoned-works|-|Bikerdude and the Crucible Team|{{red|Released}}|City Missions|undefined|-|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Brambles5.png&amp;diff=30439</id>
		<title>File:Brambles5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Brambles5.png&amp;diff=30439"/>
		<updated>2022-12-26T16:45:33Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Brambles4.jpg&amp;diff=30438</id>
		<title>File:Brambles4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Brambles4.jpg&amp;diff=30438"/>
		<updated>2022-12-26T16:45:14Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Brambles3.jpg&amp;diff=30437</id>
		<title>File:Brambles3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Brambles3.jpg&amp;diff=30437"/>
		<updated>2022-12-26T16:45:04Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Brambles2.jpg&amp;diff=30436</id>
		<title>File:Brambles2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Brambles2.jpg&amp;diff=30436"/>
		<updated>2022-12-26T16:44:54Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Brambles1.jpg&amp;diff=30435</id>
		<title>File:Brambles1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Brambles1.jpg&amp;diff=30435"/>
		<updated>2022-12-26T16:44:42Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Tool,_Key,_custom_used_by_inventory_actions&amp;diff=30430</id>
		<title>Tool, Key, custom used by inventory actions</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Tool,_Key,_custom_used_by_inventory_actions&amp;diff=30430"/>
		<updated>2022-12-10T13:19:25Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PLACEHOLDER but fairly complete:&lt;br /&gt;
&lt;br /&gt;
 DOES NOT WORK FOR DOORS - use the normal key method&lt;br /&gt;
&lt;br /&gt;
 Note, this describes how to trigger a script by using any custom &#039;tool&#039; on an object in the world so you either need some knowledge of scripting or have one available.&lt;br /&gt;
&lt;br /&gt;
You&#039;re probably familiar with how you can set used_by and an entity name on a door to make it open with that key. Well, now you can set used_by and an entity name on any entity, and it will call the script in spawnarg &amp;quot;used_action_script&amp;quot; when it is frobhilighted and used by that inventory item.&lt;br /&gt;
&lt;br /&gt;
Note: The inventory item will have to have the spawnarg &amp;quot;usable&amp;quot; set to &amp;quot;1&amp;quot; in order to be used. This spawnarg is not automatically included in the custom item entities. Furthermore, when the item gets used, it will get called once per frame for as long as the item is used. Please take precautions if you want your script to only run once.&lt;br /&gt;
&lt;br /&gt;
Further note: As of TDM 2.11, support for used_action_scripts has been added to doors and other binary movers. However, you must enable this feature by setting &#039;call_used_action_script&#039; &#039;1&#039; on the mover.&lt;br /&gt;
&lt;br /&gt;
But wait, there&#039;s more. You can also specify an entity in different ways:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;used_by_inv_name&amp;quot; : specify by inventory name in inv_name spawnarg&lt;br /&gt;
 &amp;quot;used_by_category&amp;quot; : specify by inventory category&lt;br /&gt;
 &amp;quot;used_by_classname&amp;quot; : specify by classname spawnarg or entityDef name, e.g., atdm:playertools_compass&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, if you have multiple items in the used_by arguments, you can specify different scripts to call for different items. Instead of &amp;quot;used_action_script&amp;quot;, add on the specifier to the key name afterwards, like &amp;quot;used_action_script_&amp;lt;specifier&amp;gt; &amp;quot; Where the specifier can be the entity name, inv name, category or classname.&lt;br /&gt;
&lt;br /&gt;
The order it checks for scripts in is this:&lt;br /&gt;
# entity name (used_by)&lt;br /&gt;
# inventory name (used_by_inv_name)&lt;br /&gt;
# classname (used_by_classname)&lt;br /&gt;
# inventory category (used_by_category)&lt;br /&gt;
&lt;br /&gt;
And if it doesn&#039;t find one, it executes the general &amp;quot;used_action_script&amp;quot; by default.&lt;br /&gt;
&lt;br /&gt;
For example, putting these spawnargs on a frobable entity you want to be usable by stuff:&lt;br /&gt;
 &amp;quot;used_by&amp;quot; &amp;quot;key_12&amp;quot;&lt;br /&gt;
 &amp;quot;used_by1&amp;quot; &amp;quot;key_13&amp;quot;&lt;br /&gt;
 &amp;quot;used_by_inv_name&amp;quot; &amp;quot;Foo&amp;quot; [NOTE THIS MAY BE REPLACED BY inv_id to avoid translation conflict]&lt;br /&gt;
 &amp;quot;used_by_classname&amp;quot; &amp;quot;atdm:playertools_lantern&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;used_action_script_key_12&amp;quot; &amp;quot;UsedByKey12Script&amp;quot;&lt;br /&gt;
 &amp;quot;used_action_script_atdm:playertools_lantern&amp;quot; &amp;quot;UsedByLanternScript&amp;quot;&lt;br /&gt;
 &amp;quot;used_action_script_Keys&amp;quot; &amp;quot;UsedByGenericKey&amp;quot;&lt;br /&gt;
 &amp;quot;used_action_script&amp;quot; &amp;quot;UsedByGeneric&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These scripts could be in the map&#039;s script file, for example. Or they could be globally defined scripts if you want to create a new player tool.&lt;br /&gt;
&lt;br /&gt;
In this example, if you call UsedByKey12Script if you use it with an entity named key_12. You can use it with key_13, and it will notice that the inventory category matches Keys, and call UsedByGenericKey. (NOTE: You don&#039;t need to set used_by_category to specify by category if it&#039;s already covered by another specifier, in this case entity name). If you use it with the lantern, you will call UsedByLanternScript. Finally, if you use it with an inventory item whose inventory name is &amp;quot;Foo&amp;quot;, it will call the default script, UsedByGeneric.&lt;br /&gt;
&lt;br /&gt;
This should help a lot with scripting FMs where you have to use item A on item B. Although a lot of you will probably set up fancy stuff where you have to put a moveable into place with the Grabber instead of using an inventory item, so you won&#039;t use this. But that&#039;s okay.&lt;br /&gt;
&lt;br /&gt;
Additional:&lt;br /&gt;
&lt;br /&gt;
# All frobable entities (except doors/locks/handles) have a default used_action_script that triggers their targets. (Just like frobbing something triggers its targets by default). So all you have to do is set a used_by variable and it will trigger its targets when inventory used by that item.&lt;br /&gt;
# Don&#039;t change anything about the way you handle doors, locks and handles. Because doors work differently, the used_by_* variables won&#039;t work, and the script won&#039;t get triggered. Just keep using used_by, and the usual methods to call a script when a door is opened.&lt;br /&gt;
&lt;br /&gt;
Extra examples:&lt;br /&gt;
&lt;br /&gt;
So say I wanted to brighten a light with a magic amulet. I add to the light used_by amulet and used_action_script myscript and brighten the light in myscript.&lt;br /&gt;
&lt;br /&gt;
If I also want a skull ring to darken the light I would add used_by1 amulet and usedby2 skullring. Then used_action_script_amulet myscript_amulet and used_action_script_skullring myscript_skullring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30390</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30390"/>
		<updated>2022-11-29T08:45:03Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Available ==&lt;br /&gt;
&lt;br /&gt;
=== Bank ===&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undefined|basic Geometry|-}}&lt;br /&gt;
Archive name: bank&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Canals ===&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undefined|much of the Geometry|-}}&lt;br /&gt;
Archive name: canals&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Castle 1 ===&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castle1&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== High Society ===&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Archive name: highsociety&lt;br /&gt;
&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Life in Luxury ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Archive name: lifeinluxury&lt;br /&gt;
&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Lost City ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Archive name: lostcity&lt;br /&gt;
&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Neighbours ===&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Archive name: neighbours&lt;br /&gt;
&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Elixir (earlier version) ===&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Archive name: elixir&lt;br /&gt;
&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1-2.jpg&lt;br /&gt;
Elixiralpha1-3.jpg&lt;br /&gt;
Elixiralpha1-4.jpg&lt;br /&gt;
Elixiralpha1-5.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hmart tests ===&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Archive name: ?&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wreckers Reach ===&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/wreckers&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manor Royale ===&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Manor Royale1.jpg&lt;br /&gt;
Manor Royale2.jpg&lt;br /&gt;
Manor Royale3.jpg&lt;br /&gt;
Manor Royale4.jpg&lt;br /&gt;
Manor RoyaleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/manor_royale&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Iceclaw ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Iceclaw1.jpg&lt;br /&gt;
Iceclaw2.jpg&lt;br /&gt;
Iceclaw3.jpg&lt;br /&gt;
Iceclaw4.jpg&lt;br /&gt;
Iceclaw5.jpg&lt;br /&gt;
IceclawDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/iceclaw&lt;br /&gt;
&lt;br /&gt;
=== Letterford Manor ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Letterfold1.jpg&lt;br /&gt;
Letterfold2.jpg&lt;br /&gt;
Letterfold3.jpg&lt;br /&gt;
Letterfold4.jpg&lt;br /&gt;
Letterfold5.jpg&lt;br /&gt;
LetterfoldDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/letterford&lt;br /&gt;
&lt;br /&gt;
=== The Tavern ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
Archive name: crucibleofomens/maps/tavern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Untitled1.jpg&lt;br /&gt;
Untitled2.jpg&lt;br /&gt;
Untitled3.jpg&lt;br /&gt;
Untitled4.jpg&lt;br /&gt;
Untitled.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adopted ==&lt;br /&gt;
&lt;br /&gt;
=== Castle &amp;amp; Caves ===&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castles_caves&lt;br /&gt;
&lt;br /&gt;
=== The White Rose Hotel ===&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Archive name: whiterose&lt;br /&gt;
&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Buried Cloister ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|JackFarmer|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
BuriedCloister1.jpg&lt;br /&gt;
BuriedCloister2.jpg&lt;br /&gt;
BuriedCloister3.jpg&lt;br /&gt;
BuriedCloister4.jpg&lt;br /&gt;
BuriedCloister5.jpg&lt;br /&gt;
BuriedCloisterDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Archive name: crucibleofomens/maps/cloister&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Seeking Lady Leicester ===&lt;br /&gt;
{{abandoned-works|grayman|bikerdude|{{red|Adopted}}|Mansion|undefined|75% completed|-}}&lt;br /&gt;
&lt;br /&gt;
=== Nexus ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/nexus&lt;br /&gt;
&lt;br /&gt;
=== The Dead Gathers ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/gathers&lt;br /&gt;
&lt;br /&gt;
=== Restless Plunder ===&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/restless&lt;br /&gt;
&lt;br /&gt;
=== Blackheart Manor ===&lt;br /&gt;
{{abandoned-works|Dram, Bikerdude|Bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/blackheart_manor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Released ==&lt;br /&gt;
&lt;br /&gt;
=== The Black Mage ===&lt;br /&gt;
{{abandoned-works|grayman|Jackfarmer|{{red|Released}}|Castle/Fortress|Horror|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Setting the scene ===&lt;br /&gt;
{{abandoned-works|Atti, Bikerdude|Geep|{{red|Released}} (new name: &#039;&#039;&#039;Away 0&#039;&#039;&#039;)|undefined|undefined|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== 245 ===&lt;br /&gt;
{{abandoned-works|?|SirTaffsalot|{{red|Released}} (new name: Vengeance for a Thief 1)|-|-|-|-}}&lt;br /&gt;
&lt;br /&gt;
=== Behind closed doors (bcd) ===&lt;br /&gt;
{{abandoned-works|-|Bikerdude and the Crucible Team|{{red|Released}}|City Missions|undefined|-|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30314</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30314"/>
		<updated>2022-11-22T23:00:27Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Bank ==&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undefined|basic Geometry|-}}&lt;br /&gt;
Archive name: bank&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Canals ==&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undefined|much of the Geometry|-}}&lt;br /&gt;
Archive name: canals&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle 1 ==&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castle1&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle &amp;amp; Caves ==&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castles_caves&lt;br /&gt;
&lt;br /&gt;
== High Society ==&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Archive name: highsociety&lt;br /&gt;
&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Life in Luxury ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Archive name: lifeinluxury&lt;br /&gt;
&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lost City ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Archive name: lostcity&lt;br /&gt;
&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Neighbours ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Archive name: neighbours&lt;br /&gt;
&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The White Rose Hotel ==&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Archive name: whiterose&lt;br /&gt;
&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elixir (earlier version) ==&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Archive name: elixir&lt;br /&gt;
&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hmart tests ==&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Archive name: ?&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wreckers Reach ==&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/wreckers&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manor Royale ==&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/manor_royale&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
== The Buried Cloister ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/cloister&lt;br /&gt;
&lt;br /&gt;
== Iceclaw ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/iceclaw&lt;br /&gt;
&lt;br /&gt;
== Letterford Manor ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/letterford&lt;br /&gt;
&lt;br /&gt;
== Nexus ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/nexus&lt;br /&gt;
&lt;br /&gt;
== The Tavern ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
Archive name: crucibleofomens/maps/tavern&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Untitled1.jpg&lt;br /&gt;
Untitled2.jpg&lt;br /&gt;
Untitled3.jpg&lt;br /&gt;
Untitled4.jpg&lt;br /&gt;
Untitled.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Dead Gathers ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/gathers&lt;br /&gt;
&lt;br /&gt;
== Restless Plunder ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/restless&lt;br /&gt;
&lt;br /&gt;
== Blackheart Manor ==&lt;br /&gt;
{{abandoned-works|Dram, Bikerdude|Bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/blackheart_manor&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30307</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30307"/>
		<updated>2022-11-22T20:48:50Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Bank ==&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undefined|basic Geometry|-}}&lt;br /&gt;
Archive name: bank&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Canals ==&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undefined|much of the Geometry|-}}&lt;br /&gt;
Archive name: canals&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle 1 ==&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castle1&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle &amp;amp; Caves ==&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
Archive name: castles_caves&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== High Society ==&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Archive name: highsociety&lt;br /&gt;
&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Life in Luxury ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Archive name: lifeinluxury&lt;br /&gt;
&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lost City ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Archive name: lostcity&lt;br /&gt;
&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Neighbours ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Archive name: neighbours&lt;br /&gt;
&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The White Rose Hotel ==&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Archive name: whiterose&lt;br /&gt;
&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elixir (earlier version) ==&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Archive name: elixir&lt;br /&gt;
&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hmart tests ==&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Archive name: ?&lt;br /&gt;
&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wreckers Reach ==&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/wreckers&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manor Royale ==&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/manor_royale&lt;br /&gt;
&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
== The Buried Cloister ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/cloister&lt;br /&gt;
&lt;br /&gt;
== Iceclaw ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/iceclaw&lt;br /&gt;
&lt;br /&gt;
== Letterford Manor ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/letterford&lt;br /&gt;
&lt;br /&gt;
== Nexus ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/nexus&lt;br /&gt;
&lt;br /&gt;
== The Tavern ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
Archive name: crucibleofomens/maps/tavern&lt;br /&gt;
&lt;br /&gt;
== The Dead Gathers ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/gathers&lt;br /&gt;
&lt;br /&gt;
== Restless Plunder ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/restless&lt;br /&gt;
&lt;br /&gt;
== Blackheart Manor ==&lt;br /&gt;
{{abandoned-works|Dram, Bikerdude|Bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Archive name: crucibleofomens/maps/blackheart_manor&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30301</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30301"/>
		<updated>2022-11-22T20:24:46Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Bank ==&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undevined|basic Geometry|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Canals ==&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undevined|much of the Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle 1 ==&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle &amp;amp; Caves ==&lt;br /&gt;
{{abandoned-works|JohannesBurock|JackFarmer|{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== High Society ==&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Life in Luxury ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lost City ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Neighbours ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The White Rose Hotel ==&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elixir (earlier version) ==&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hmart tests ==&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wreckers Reach ==&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manor Royale ==&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
== The Buried Cloister ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Iceclaw ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Letterford Manor ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Nexus ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Hotel ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== The Tavern ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
&lt;br /&gt;
== The Dead Gather ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Greebo and Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Restless Plunder ==&lt;br /&gt;
{{abandoned-works|Crucible Campaign Team|Melan|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30300</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30300"/>
		<updated>2022-11-22T20:19:30Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Bank ==&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undevined|basic Geometry|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Canals ==&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undevined|much of the Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle 1 ==&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle &amp;amp; Caves ==&lt;br /&gt;
{{abandoned-works|JohannesBurock|-JackFarmer{{red|Adopted}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== High Society ==&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Life in Luxury ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lost City ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Neighbours ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The White Rose Hotel ==&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elixir (earlier version) ==&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published. The released version of The Elixir was rebuilt using Springheel&#039;s modules.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hmart tests ==&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wreckers Reach ==&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor). The western harbour was extracted and turned into an FM &amp;quot;Perilous Refuge&amp;quot; by Dragofer. Dragofer&#039;s (extensive) changes haven&#039;t been merged back to the complete map.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manor Royale ==&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
== The Buried Cloister ==&lt;br /&gt;
{{abandoned-works|Jdude, Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Iceclaw ==&lt;br /&gt;
{{abandoned-works|Jdude, Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== LetterFord manor ==&lt;br /&gt;
{{abandoned-works|Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Nexus ==&lt;br /&gt;
{{abandoned-works|Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Hotel ==&lt;br /&gt;
{{abandoned-works|, Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== The Tavern ==&lt;br /&gt;
{{abandoned-works| Bikerdude|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30299</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30299"/>
		<updated>2022-11-22T20:11:20Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Removed Setting the Scene as it was released&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Bank ==&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undevined|basic Geometry|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Canals ==&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undevined|much of the Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle ==&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== High Society ==&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Life in Luxery ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lost City ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Neighbours ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The White Rose Hotel ==&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elixir (earlier map) ==&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hmart tests ==&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Wreckers Reach ==&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude, Dragofer|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Manor Royale ==&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
== The Buried Cloister ==&lt;br /&gt;
{{abandoned-works|Jdude, Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Iceclaw ==&lt;br /&gt;
{{abandoned-works|Jdude, Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== LetterFord manor ==&lt;br /&gt;
{{abandoned-works|Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Nexus ==&lt;br /&gt;
{{abandoned-works|Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Hotel ==&lt;br /&gt;
{{abandoned-works|, Bikerdude, Omens team|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== The Tavern ==&lt;br /&gt;
{{abandoned-works| Bikerdude|-|{{green|Free for adoption}}|?|?|?|Behind Closed Doors}}&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30291</id>
		<title>Abandoned Works</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Abandoned_Works&amp;diff=30291"/>
		<updated>2022-11-22T19:42:10Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Removed screenshots subheadings to make the index easier to read.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: x-large&amp;quot;&amp;gt;{{red|This article is WIP}}&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List of current Abandoned works free for adaption. With screenshots of the map(s) ingame and in DarkRadiant.&lt;br /&gt;
&lt;br /&gt;
See forum topic: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/ Abandoned Works]&lt;br /&gt;
&lt;br /&gt;
== Bank ==&lt;br /&gt;
{{abandoned-works|Arcturus|-|{{green|Free for adoption}}|Band / Mansion|undevined|basic Geometry|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/page/3/#comment-290345 Inspiration]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Bank map scs2.jpg|&lt;br /&gt;
Bank map scs3.jpg|&lt;br /&gt;
Bank map scs4.jpg|&lt;br /&gt;
Bank dr 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Canals ==&lt;br /&gt;
{{abandoned-works|Baddcog|-|{{green|Free for adoption}}|City|undevined|much of the Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Canals1.jpg|&lt;br /&gt;
Canals2.jpg|&lt;br /&gt;
Canals3.jpg|&lt;br /&gt;
Canals4.jpg|&lt;br /&gt;
CanalsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Castle ==&lt;br /&gt;
{{abandoned-works|Shadowhide|-|{{green|Free for adoption}}|Castle|undefined|very basic Geometry|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Castle1.jpg&lt;br /&gt;
Castle2.jpg&lt;br /&gt;
CastleDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== High Society ==&lt;br /&gt;
{{abandoned-works|Radiatoryang|-|{{green|Free for adoption}}|Mansion / Chateau|undefined|Geometry, custom Texturing|-}}&lt;br /&gt;
Info: Started with the idea for a giant mansion-fest like Bafford or Running Interference ...&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Highsociety1.jpg&lt;br /&gt;
Highsociety2.jpg&lt;br /&gt;
Highsociety3.jpg&lt;br /&gt;
Highsociety4.jpg&lt;br /&gt;
Highsociety5.jpg&lt;br /&gt;
HsDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Life in Luxery ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|undefined|Lot of Geometry done|-}}&lt;br /&gt;
Info: Requires update, heavy sealing and portaling.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
lifeinluxury1.jpg&lt;br /&gt;
lifeinluxury2.jpg&lt;br /&gt;
lifeinluxury3.jpg&lt;br /&gt;
lifeinluxury4.jpg&lt;br /&gt;
LilDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lost City ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|City|Lost City|A few leafs|-}}&lt;br /&gt;
Info: Made it again runable under 2.07 by Geep (2020)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Lostcity1.jpg&lt;br /&gt;
Lostcity2.jpg&lt;br /&gt;
Lostcity3.jpg&lt;br /&gt;
LostcityDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Neighbours ==&lt;br /&gt;
{{abandoned-works|Theothesnopp|-|{{green|Free for adoption}}|Medium sized interior, may be turned into an exteriors.|undefined|Basic Geometry and a few Interiors|-}}&lt;br /&gt;
Info: Runs in TDM 2.0 but probably need lots of fixing.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Neighbours1.jpg|&lt;br /&gt;
Neighbours2.jpg|&lt;br /&gt;
NeighboursDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The White Rose Hotel ==&lt;br /&gt;
{{abandoned-works|Roman &#039;Skacky&#039; Barrilliot, Springheel. Bikerdude|Baal|{{red|Adopted}}|Mansion / Hotel|Wealthy posh Victorian Establishment. Think Cosas: Mission X and The Grand Hotel (T2X) in TDM|(02-2012) Geometry: 100%, Most loot arleady placed, some lighting and AI, and a story expose by Springheel.|-}}&lt;br /&gt;
Info: This map is rather large. The Geometry has been much finished by skacky to continue to flesh out the misson. Springheel reworked the lighting, did add some additional assets and came up with an story expose.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Whiterose1.jpg|&lt;br /&gt;
Whiterose2.jpg|&lt;br /&gt;
Whiterose3.jpg|&lt;br /&gt;
Whiterose4.jpg|&lt;br /&gt;
WhiteRoseDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Elixir (earlier map) ==&lt;br /&gt;
{{abandoned-works|Bikerdude|-|{{green|Free for adoption}}|City|Heist|Brushwork 80%, needs just about everything else|-}}&lt;br /&gt;
Info: This was the initial draft for the FM The Elixir, however, it was abandoned and never published.&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Elixiralpha1 1.jpg&lt;br /&gt;
Elixiralpha1DR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Hmart tests ==&lt;br /&gt;
{{abandoned-works|Hmart|-|{{green|Free for adoption}}|-|-|-|-}}&lt;br /&gt;
Info: [https://forums.thedarkmod.com/index.php?/topic/12713-abandoned-works/&amp;amp;do=findComment&amp;amp;comment=401020 Link to forum post with info]&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
hmart1.jpg&lt;br /&gt;
hmart2.jpg&lt;br /&gt;
hmart3.jpg&lt;br /&gt;
hmartDR.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Seeking Lady Leicester ==&lt;br /&gt;
{{abandoned-works|grayman|bikerdude|{{red|Adopted}}|Mansion|undefined|75% completed|-}}&lt;br /&gt;
&lt;br /&gt;
== The Black Mage ==&lt;br /&gt;
{{abandoned-works|grayman|Jackfarmer|{{red|Released}}|Castle/Fortress|Horror|-|-}}&lt;br /&gt;
&lt;br /&gt;
== Setting the scene ==&lt;br /&gt;
{{abandoned-works|Atti, Bikerdude|Geep|{{red|Released}} (new name: &#039;&#039;&#039;Away 0&#039;&#039;&#039;)|undefined|undefined|-|-}}&lt;br /&gt;
&lt;br /&gt;
== 245 ==&lt;br /&gt;
{{abandoned-works|?|SirTaffsalot|{{red|Released}} (new name: Vengeance for a Thief 1)|-|-|-|-}}&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
245-1.jpg&lt;br /&gt;
245-2.jpg&lt;br /&gt;
245-3.jpg&lt;br /&gt;
245-4.jpg&lt;br /&gt;
245-5.jpg&lt;br /&gt;
245-DR.jpg&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Behind closed doors (bcd) ==&lt;br /&gt;
{{abandoned-works|-|Bikerdude and the Crucible Team|{{red|Released}}|City Missions|undefined|-|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Wreckers Reach ==&lt;br /&gt;
{{abandoned-works|Crucible of Omens team, Bikerdude, Dragofer|-|{{green|Free for adoption}}|undefined|undefined|undefined|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 4045 and 4046 from wreckers.map (in texteditor)&lt;br /&gt;
&amp;lt;gallery mode=nolines&amp;gt;&lt;br /&gt;
Wreckers1.jpg&lt;br /&gt;
Wreckers2.jpg&lt;br /&gt;
Wreckers3.jpg&lt;br /&gt;
Wreckers4.jpg&lt;br /&gt;
WreckersReach DR 1.jpg|DR screenshot&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Dead Gathers ==&lt;br /&gt;
{{abandoned-works|Greebo, Angua|Greebo, Angua|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== blackheart manor ==&lt;br /&gt;
{{abandoned-works|Dram|bikerdude|{{red|Adopted}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
&lt;br /&gt;
== Manor Royale ==&lt;br /&gt;
{{abandoned-works|Fidcal, Squill|-|{{green|Free for adoption}}|?|?|?|Crucible of Omens}}&lt;br /&gt;
Info: Broken in TDM 2.10+. Map can be made loadable again by commenting out entity 3915 and 3917 from manor_royale.map (in texteditor)&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30247</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30247"/>
		<updated>2022-11-13T10:25:50Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sounds===&lt;br /&gt;
&lt;br /&gt;
The following spawnargs are available for setting sounds, on the spindle and audiograph respectively:&lt;br /&gt;
* snd_audiograph (spindle): the main sound you want the recording to play.&lt;br /&gt;
* snd_noise (spindle): an additional layer of background noise to be played together with the recording. It can be disabled by setting to &amp;quot;silence&amp;quot; or &amp;quot;nosound&amp;quot;.&lt;br /&gt;
* snd_switch_on (audiograph): sound made when starting a recording. The recording will start after this sound finishes.&lt;br /&gt;
* snd_switch_off (audiograph): sound made when a recording ends.&lt;br /&gt;
* snd_load (audiograph): sound made when loading a spindle onto the audiograph.&lt;br /&gt;
* snd_unload (audiograph): sound made when unloading a spindle from the audiograph. Note that this will play simultaneously with &amp;quot;snd_acquire&amp;quot; on the spindle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
By default the targets of the spindle will be triggered if an audiograph finishes playing it, as long as the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;). The following spawnargs for the spindle offer more control over this behaviour:&lt;br /&gt;
* trigger_max: Maximum number of times this spindle is allowed to trigger its targets after the recording finishes playing.&lt;br /&gt;
* trigger_from: Only trigger the spindle&#039;s targets if the spindle is played from the audiograph specified in this spawnarg. More audiographs can be specified in additional spawnargs i.e. trigger_from2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 float is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 float is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 entity spindle //the currently loaded spindle entity&lt;br /&gt;
 Furthermore, the number of times a spindle has triggered its targets is stored as a &amp;quot;trigger_num&amp;quot; spawnarg on the spindle itself.&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle( entity e ) //attempts to load the specified entity into the audiograph. Will do nothing if the entity is not in the inventory category &amp;quot;Recordings&amp;quot; or the audiograph is already loaded.&lt;br /&gt;
 return_spindle( float return_to_inv ) //the currently loaded spindle will be unloaded and either given to the player or reappear where it was picked up, depending on the value of return_to_inv.&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger(aud);&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30246</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30246"/>
		<updated>2022-11-13T10:01:04Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sounds===&lt;br /&gt;
&lt;br /&gt;
The following spawnargs are available for setting sounds, on the spindle and audiograph respectively:&lt;br /&gt;
* snd_audiograph (spindle): the main sound you want the recording to play.&lt;br /&gt;
* snd_noise (spindle): an additional layer of background noise to be played together with the recording. It can be disabled by setting to &amp;quot;silence&amp;quot; or &amp;quot;nosound&amp;quot;.&lt;br /&gt;
* snd_switch_on (audiograph): sound made when starting a recording. The recording will start after this sound finishes.&lt;br /&gt;
* snd_switch_off (audiograph): sound made when a recording ends.&lt;br /&gt;
* snd_load (audiograph): sound made when loading a spindle onto the audiograph.&lt;br /&gt;
* snd_unload (audiograph): sound made when unloading a spindle from the audiograph. Note that this will play simultaneously with &amp;quot;snd_acquire&amp;quot; on the spindle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
By default the targets of the spindle will be triggered if an audiograph finishes playing it, as long as the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;). The following spawnargs for the spindle offer more control over this behaviour:&lt;br /&gt;
* trigger_max: Maximum number of times this spindle is allowed to trigger its targets after the recording finishes playing.&lt;br /&gt;
* trigger_from: Only trigger the spindle&#039;s targets if the spindle is played from the audiograph specified in this spawnarg. More audiographs can be specified in additional spawnargs i.e. trigger_from2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 float is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 float is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 entity spindle //the currently loaded spindle entity&lt;br /&gt;
 Furthermore, the number of times a spindle has triggered its targets is stored as a &amp;quot;trigger_num&amp;quot; spawnarg on the spindle itself.&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle( entity e ) //attempts to load the specified entity into the audiograph. Will do nothing if the entity is not in the inventory category &amp;quot;Recordings&amp;quot; or the audiograph is already loaded.&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		sys.trigger(aud);&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30245</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30245"/>
		<updated>2022-11-13T09:59:45Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sounds===&lt;br /&gt;
&lt;br /&gt;
The following spawnargs are available for setting sounds, on the spindle and audiograph respectively:&lt;br /&gt;
* snd_audiograph (spindle): the main sound you want the recording to play.&lt;br /&gt;
* snd_noise (spindle): an additional layer of background noise to be played together with the recording. It can be disabled by setting to &amp;quot;silence&amp;quot; or &amp;quot;nosound&amp;quot;.&lt;br /&gt;
* snd_switch_on (audiograph): sound made when starting a recording. The recording will start after this sound finishes.&lt;br /&gt;
* snd_switch_off (audiograph): sound made when a recording ends.&lt;br /&gt;
* snd_load (audiograph): sound made when loading a spindle onto the audiograph.&lt;br /&gt;
* snd_unload (audiograph): sound made when unloading a spindle from the audiograph. Note that this will play simultaneously with &amp;quot;snd_acquire&amp;quot; on the spindle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
By default the targets of the spindle will be triggered if an audiograph finishes playing it, as long as the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;). The following spawnargs for the spindle offer more control over this behaviour:&lt;br /&gt;
* trigger_max: Maximum number of times this spindle is allowed to trigger its targets after the recording finishes playing.&lt;br /&gt;
* trigger_from: Only trigger the spindle&#039;s targets if the spindle is played from the audiograph specified in this spawnarg. More audiographs can be specified in additional spawnargs i.e. trigger_from2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 float is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 float is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 entity spindle //the currently loaded spindle entity&lt;br /&gt;
 Furthermore, the number of times a spindle has triggered its targets is stored as a &amp;quot;trigger_num&amp;quot; spawnarg on the spindle itself.&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle( entity e ) //attempts to load the specified entity into the audiograph. Will do nothing if the entity is not in the inventory category &amp;quot;Recordings&amp;quot; or the audiograph is already loaded.&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30244</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30244"/>
		<updated>2022-11-13T09:57:07Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sounds===&lt;br /&gt;
&lt;br /&gt;
The following spawnargs are available for setting sounds, on the spindle and audiograph respectively:&lt;br /&gt;
* snd_audiograph (spindle): the main sound you want the recording to play.&lt;br /&gt;
* snd_noise (spindle): an additional layer of background noise to be played together with the recording. It can be disabled by setting to &amp;quot;silence&amp;quot; or &amp;quot;nosound&amp;quot;.&lt;br /&gt;
* snd_switch_on (audiograph): sound made when starting a recording. The recording will start after this sound finishes.&lt;br /&gt;
* snd_switch_off (audiograph): sound made when a recording ends.&lt;br /&gt;
* snd_load (audiograph): sound made when loading a spindle onto the audiograph.&lt;br /&gt;
* snd_unload (audiograph): sound made when unloading a spindle from the audiograph. Note that this will play simultaneously with &amp;quot;snd_acquire&amp;quot; on the spindle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
By default the targets of the spindle will be triggered if an audiograph finishes playing it, as long as the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;). The following spawnargs for the spindle offer more control over this behaviour:&lt;br /&gt;
* trigger_max: Maximum number of times this spindle is allowed to trigger its targets after the recording finishes playing.&lt;br /&gt;
* trigger_from: Only trigger the spindle&#039;s targets if the spindle is played from the audiograph specified in this spawnarg. More audiographs can be specified in additional spawnargs i.e. trigger_from2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 float is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 float is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 entity spindle //the currently loaded spindle entity&lt;br /&gt;
 Furthermore, the number of times a spindle has triggered its targets is stored as a &amp;quot;trigger_num&amp;quot; spawnarg on the spindle itself.&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle( entity e ) //attempts to load the specified entity into the audiograph. Will do nothing if the entity is not in the inventory category &amp;quot;Recordings&amp;quot;.&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30241</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30241"/>
		<updated>2022-11-12T09:07:24Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sounds===&lt;br /&gt;
&lt;br /&gt;
The following spawnargs are available for setting sounds, on the spindle and audiograph respectively:&lt;br /&gt;
* snd_audiograph (spindle): the main sound you want the recording to play.&lt;br /&gt;
* snd_noise (spindle): an additional layer of background noise to be played together with the recording. It can be disabled by setting to &amp;quot;silence&amp;quot; or &amp;quot;nosound&amp;quot;.&lt;br /&gt;
* snd_switch_on (audiograph): sound made when starting a recording. The recording will start after this sound finishes.&lt;br /&gt;
* snd_switch_off (audiograph): sound made when a recording ends.&lt;br /&gt;
* snd_load (audiograph): sound made when loading a spindle onto the audiograph.&lt;br /&gt;
* snd_unload (audiograph): sound made when unloading a spindle from the audiograph. Note that this will play simultaneously with &amp;quot;snd_acquire&amp;quot; on the spindle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 float is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 float is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 entity spindle //the currently loaded spindle entity&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle() //if the player has a spindle selected in his inventory, it will be loaded into the audiograph&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30240</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30240"/>
		<updated>2022-11-12T09:07:13Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sounds===&lt;br /&gt;
&lt;br /&gt;
The following spawnargs are available for setting sounds, on the spindle and audiograph respectively:&lt;br /&gt;
* snd_audiograph (spindle): the main sound you want the recording to play.&lt;br /&gt;
* snd_noise (spindle): an additional layer of background noise to be played together with the recording. It can be disabled by setting to &amp;quot;silence&amp;quot; or &amp;quot;nosound&amp;quot;.&lt;br /&gt;
* snd_switch_on (audiograph): sound made when starting a recording. The recording will start after this sound finishes.&lt;br /&gt;
* snd_switch_off (audiograph): sound made when a recording ends.&lt;br /&gt;
* snd_load (audiograph): sound made when loading a spindle onto the audiograph.&lt;br /&gt;
* snd_unload (audiograph): sound made when unloading a spindle from the audiograph. Note that this will play simultaneously with &amp;quot;snd_acquire&amp;quot; on the spindle.&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 float is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 float is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 entity spindle //the currently loaded spindle entity&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle() //if the player has a spindle selected in his inventory, it will be loaded into the audiograph&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30235</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30235"/>
		<updated>2022-11-11T11:53:39Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 float is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 float is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 entity spindle //the currently loaded spindle entity&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle() //if the player has a spindle selected in his inventory, it will be loaded into the audiograph&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30232</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30232"/>
		<updated>2022-11-11T10:27:08Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles, which are small metal cylinders the player can pick up and store in his inventory. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load, unload and play any spindle.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays (certain) recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 spindle //the currently loaded spindle entity&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle() //if the player has a spindle selected in his inventory, it will be loaded into the audiograph&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30231</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30231"/>
		<updated>2022-11-11T10:22:34Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load and unload any spindle, a metal cylinder the player can carry in his inventory.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays certain recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 spindle //the currently loaded spindle entity&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle() //if the player has a spindle selected in his inventory, it will be loaded into the audiograph&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
 &lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30230</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30230"/>
		<updated>2022-11-11T10:22:22Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load and unload any spindle, a metal cylinder the player can carry in his inventory.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays certain recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 spindle //the currently loaded spindle entity&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle() //if the player has a spindle selected in his inventory, it will be loaded into the audiograph&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
Example script to cause an audiograph to start playing a sound if it&#039;s loaded with a spindle and isn&#039;t already playing it:&lt;br /&gt;
 void start_audiograph()&lt;br /&gt;
 {&lt;br /&gt;
 	audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
 	if( aud.is_loaded &amp;amp;&amp;amp; !aud.is_playing )&lt;br /&gt;
 	{&lt;br /&gt;
 		aud.toggle_audiograph();&lt;br /&gt;
 	}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30229</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30229"/>
		<updated>2022-11-11T10:19:40Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load and unload any spindle, a metal cylinder the player can carry in his inventory.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays certain recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables that are inside the &amp;quot;audiograph&amp;quot; scriptobject. To begin, you need to create a special type of entity variable named after the &amp;quot;audiograph&amp;quot; scriptobject and assign the audiograph to it:&lt;br /&gt;
 audiograph aud = $atdm_audiograph_1;&lt;br /&gt;
&lt;br /&gt;
The following variables are available:&lt;br /&gt;
 is_loaded //whether a spindle is loaded into this audiograph, 0 or 1&lt;br /&gt;
 is_playing //whether the audiograph is playing the spindle, 0 or 1&lt;br /&gt;
 spindle //the currently loaded spindle entity&lt;br /&gt;
&lt;br /&gt;
The following script functions are suitable for use by external scripts:&lt;br /&gt;
 load_spindle() //if the player has a spindle selected in his inventory, it will be loaded into the audiograph&lt;br /&gt;
 toggle_audiograph() //if a spindle is loaded, the audiograph will either start or stop playing it&lt;br /&gt;
 return_spindle() //the currently loaded spindle will be given to the player&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30228</id>
		<title>Audiograph</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Audiograph&amp;diff=30228"/>
		<updated>2022-11-11T10:13:01Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Created page with &amp;quot;==Audiograph==  &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;  The audiograph is an Inventor&amp;#039;s Guild device for playing back recordings stored on spindles. It offers the following features:  * Every audiograph can load and unload any spindle, a metal cylin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Audiograph==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the audiograph, which will be available from 2.11 onwards. You can download it from here if you want to use it before 2.11 is released: https://forums.thedarkmod.com/index.php?/topic/20475-dragofers-scripting/&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The audiograph is an Inventor&#039;s Guild device for playing back recordings stored on spindles. It offers the following features:&lt;br /&gt;
&lt;br /&gt;
* Every audiograph can load and unload any spindle, a metal cylinder the player can carry in his inventory.&lt;br /&gt;
* Spindles are loaded by frobbing or using an audiograph while the player has a spindle selected in his inventory.&lt;br /&gt;
* To start or stop playing the recording, frob the audiograph or trigger it from i.e. a lever.&lt;br /&gt;
* Audiographs can target a spindle to automatically load it at map start. If the &amp;quot;start_on&amp;quot; spawnarg is set it will play the recording.&lt;br /&gt;
* AIs can be alerted if an audiograph plays certain recordings.&lt;br /&gt;
* The spindle&#039;s targets can be triggered at the end of a recording (non-looping sounds only).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Basic setup===&lt;br /&gt;
&lt;br /&gt;
There are 2 types of entities you need to place in your map, both in the entity folder &amp;quot;Static/Mechanical&amp;quot;:&lt;br /&gt;
* atdm:audiograph - this is the sound player.&lt;br /&gt;
* atdm:audiograph_spindle - this can store one soundshader, set in the &amp;quot;snd_audiograph&amp;quot; spawnarg.&lt;br /&gt;
&lt;br /&gt;
To start the map with a spindle already loaded into an audiograph, let the audiograph target a spindle. Set &amp;quot;start_on&amp;quot; if you want the audiograph to automatically start playing the sound, too. &lt;br /&gt;
&lt;br /&gt;
For looping soundshaders you can set the &amp;quot;loop&amp;quot; spawnarg on the spindle to determine whether the audiograph will switch off after one cycle or continue playing indefinitely. Note that you also need the &amp;quot;looping&amp;quot; keyword in the soundshader definition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
There are 2 steps to using an audiograph:&lt;br /&gt;
* Loading a spindle: this is done by selecting a spindle in the inventory, then either frobbing the audiograph or pressing the &amp;quot;use&amp;quot; key while the audiograph is frob-highlighted.&lt;br /&gt;
* Activating the audiograph: when a spindle is loaded, the recording can be started or stopped by frobbing the audiograph. You can also trigger it from i.e. a button, lever or script.&lt;br /&gt;
&lt;br /&gt;
A spindle is unloaded by frobbing the spindle that&#039;s attached to the audiograph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Triggering targets at the end of a recording===&lt;br /&gt;
&lt;br /&gt;
The targets of the spindle will be triggered if an audiograph finishes playing it, if the spindle is not set to loop (spawnarg &amp;quot;loop&amp;quot; &amp;quot;0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Alerting AIs===&lt;br /&gt;
&lt;br /&gt;
By default, playing a recording will alert nearby AIs up to around 300 units away if there&#039;s no closed door in the way. They may still hear it through a closed door if both the AI and the audiograph are very close to the door. This is completely independent of what the player actually hears and is controlled via the following spawnargs on each spindle:&lt;br /&gt;
* sprS_propagate (default &amp;quot;yell&amp;quot;) - this is a sound propagation preset for how far and how loud this sound can be heard by AIs. You can find more presets in the &amp;quot;Create Entity&amp;quot; menu with the prefix &amp;quot;sprGS_&amp;quot;, keeping in mind that the prefix should be left aside when setting a new spawnarg value. To stop AIs from reacting to the recording, set this spawnarg to &amp;quot;-&amp;quot;.&lt;br /&gt;
* propagate_modifier (default -10) - this spawnarg adjusts the volume in dB of the sound as heard by AIs, which also affects the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
&lt;br /&gt;
There are no script events specific to the audiograph, but you can access script functions and variables inside the audiograph scriptobject.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Mission_Database&amp;diff=29767</id>
		<title>Mission Database</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Mission_Database&amp;diff=29767"/>
		<updated>2022-08-07T18:05:49Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Added concrete steps to the procedure for using pk4diff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All released missions are stored in FM database, which defines what is available in mission downloader in-game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
In order for a mission to be included in the database, it must satisfy the following conditions:&lt;br /&gt;
# It has gone through [[Your Mission - From Beta Testing to Release and Beyond|beta-testing]] by several forum members who did not take part in its creation.&lt;br /&gt;
#* As a rare exceptional case, a mission can be rejected from the database if the majority of beta-testers come to conclusion that it is unplayable or its quality is way too low.&lt;br /&gt;
# Does not contain any questionable material, potential intellectual property infridgements. Including:&lt;br /&gt;
#* using names from the original Thief games&lt;br /&gt;
#* using assets from other games&lt;br /&gt;
#* having content which is so bad that it is forbidden even on our forums (TODO: link to forum rules?)&lt;br /&gt;
&lt;br /&gt;
A very few missions are installed along with the game, like Saint Lucia or Training Mission.&lt;br /&gt;
These official missions are considered to be part of the game, and are &#039;&#039;&#039;not&#039;&#039;&#039; included in the database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= SVN =&lt;br /&gt;
&lt;br /&gt;
Starting from 2021, the FM database is stored in SVN repository ([https://bugs.thedarkmod.com/view.php?id=5551 #5551]).&lt;br /&gt;
Only TDM team members have access to this SVN.&lt;br /&gt;
&lt;br /&gt;
Here is the SVN address:&lt;br /&gt;
:: https://svn.thedarkmod.com/project/missions/trunk&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But please don&#039;t rush to checkout the whole repo yet!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Checkout everything ===&lt;br /&gt;
&lt;br /&gt;
Yes, you can simply copy the link above to SVN Checkout and get single working copy with all the FMs. But keep in mind that you will have to download ~10 GB of data and the working copy will take ~20 GB of space. In most cases you don&#039;t need everything in order to work with the database.&lt;br /&gt;
&lt;br /&gt;
The typical reasons to checkout the whole repo are:&lt;br /&gt;
* You want to run automated search or tests over all released FMs.&lt;br /&gt;
* You are regular committer of the FM database, added a lot of new missions and updates, so the investment is worth it.&lt;br /&gt;
&lt;br /&gt;
[[File:TortoiseSVN RepoBrowser.png|thumb|TortoiseSVN Repo-browser]]&lt;br /&gt;
[[File:FmDatabase_RepoBrowser.png|thumb|Accountant 2 FM in SVN]]&lt;br /&gt;
&lt;br /&gt;
=== Checkout as needed ===&lt;br /&gt;
&lt;br /&gt;
Instead of checking out the whole repo, you can checkout only the few FMs you are going to modify.&lt;br /&gt;
This is the recommended approach.&lt;br /&gt;
&lt;br /&gt;
With this approach, you need the Repo-browser feature of TortoiseSVN.&lt;br /&gt;
It allows to look through all the directories and files on remote SVN without checking it out first.&lt;br /&gt;
&lt;br /&gt;
The directory structure of SVN is show on the picture.&lt;br /&gt;
Most importantly, all information about FM with internal name &amp;quot;qwerty&amp;quot; is stored in &amp;lt;tt&amp;gt;fms/qwerty&amp;lt;/tt&amp;gt; subdirectory of the repo.&lt;br /&gt;
You can checkout only this directory in order to work with FM, just put this checkout address:&lt;br /&gt;
&lt;br /&gt;
:: https://svn.thedarkmod.com/project/missions/trunk/fms/qwerty&lt;br /&gt;
&lt;br /&gt;
Or find the FM directory in Repo-browser, right-click and select Checkout.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions in the rest of the article assume this approach.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Add New Mission =&lt;br /&gt;
&lt;br /&gt;
[[File:FmDatabase_AddDirectory.png|thumb|x100px|Add FM directory in Repo-browser]]&lt;br /&gt;
[[File:FmDatabase_FmCheckout.png|thumb|x80px|Checkout FM]]&lt;br /&gt;
[[File:FmDatabase_Commit2.png|thumb|x70px|Commit changes in FM directory]]&lt;br /&gt;
[[File:FmDatabase_CommitAddFiles.png|x120px|thumb|Add new files in Commit dialog]]&lt;br /&gt;
[[File:FmDatabase_PrecommitHookFailed.png|x120px|thumb|Precommit hook failed due to wrong value of &amp;quot;type&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
Before adding new FM, negotiate internal name with FM author.&lt;br /&gt;
It must be different from names of all existing FMs, consist of only lowercase letters and digits, be rather short (aim for 10-20 letters).&lt;br /&gt;
Among many words in the mission title, prefer rare words and proper nouns over common words when composing the internal name.&lt;br /&gt;
&lt;br /&gt;
Open SVN in Repo-browser, find &amp;lt;/tt&amp;gt;fms&amp;lt;/tt&amp;gt; directory which contains all the FMs.&lt;br /&gt;
Right-click on it and choose Add folder in the context menu.&lt;br /&gt;
Then enter the internal name of FM as the name of the new directory and proceed with commit.&lt;br /&gt;
Now that the directory has been created, you can checkout it: find the directory in Repo-browser, right-click it and Checkout.&lt;br /&gt;
&lt;br /&gt;
The second step is to upload pk4 files.&lt;br /&gt;
Copy all the pk4 files of FM into the working copy directory (i.e. checkout directory).&lt;br /&gt;
Open the directory in Windows Explorer, right-click and select SVN commit.&lt;br /&gt;
Select all pk4 files with Shift, right-click and select Add.&lt;br /&gt;
Also set checkboxes for these files.&lt;br /&gt;
Write commit message in the text area above: it should start with internal name of FM in brackets.&lt;br /&gt;
When everything is done, hit OK to do the actual commit.&lt;br /&gt;
&lt;br /&gt;
While the pk4 files are already in the repository, they are not yet visible in the database.&lt;br /&gt;
A mission is only added when its directory contains &amp;lt;tt&amp;gt;fminfo.xml&amp;lt;/tt&amp;gt; file, so now you need to add it.&lt;br /&gt;
You can take this file from another FM (find it in Repo-browser, right-click, Open with, select text editor), and adjust it for the FM being added.&lt;br /&gt;
Here is explanation for some fields:&lt;br /&gt;
* &#039;&#039;&#039;internalName&#039;&#039;&#039; defines name of the directory and pk4 file.&lt;br /&gt;
* &#039;&#039;&#039;title&#039;&#039;&#039; is the name seen by players in-game.&lt;br /&gt;
* &#039;&#039;&#039;author&#039;&#039;&#039; is one or several people who made the mission.&lt;br /&gt;
* &#039;&#039;&#039;releaseDate&#039;&#039;&#039; shows when the very first version of the mission was added.&lt;br /&gt;
* &#039;&#039;&#039;type&#039;&#039;&#039; is &amp;lt;tt&amp;gt;multi&amp;lt;/tt&amp;gt; if mission contains several playable .map files (i.e. is campaign), and &amp;lt;tt&amp;gt;single&amp;lt;/tt&amp;gt; otherwise.&lt;br /&gt;
* &#039;&#039;&#039;size&#039;&#039;&#039; is size of the main pk4 file in megabytes displayed to users.&lt;br /&gt;
* &#039;&#039;&#039;version&#039;&#039;&#039; is natural number used by in-game downloader to decide whether update is available or not. Starts with 1.&lt;br /&gt;
* &#039;&#039;&#039;description&#039;&#039;&#039; contains text displayed in in-game downloader when player inspects mission details.&lt;br /&gt;
* &#039;&#039;&#039;mainPack&#039;&#039;&#039; points to the main pk4 file of the mission. Note that the name of file is fully determined by internal name.&lt;br /&gt;
* &#039;&#039;&#039;localisationPack&#039;&#039;&#039; points to _l10n.pk4 file if it exists.&lt;br /&gt;
&lt;br /&gt;
Note that XML cannot directly contain some characters, thus they must be escaped:&lt;br /&gt;
* Ampersand (&amp;lt;tt&amp;gt;&amp;amp;amp;amp;&amp;lt;/tt&amp;gt;) quotes (&amp;lt;tt&amp;gt;&amp;amp;amp;quot;&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;amp;amp;apos;&amp;lt;/tt&amp;gt;) and angle brackets (&amp;lt;tt&amp;gt;&amp;amp;amp;lt;&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;&amp;amp;amp;gt;&amp;lt;/tt&amp;gt;): [https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents reference]&lt;br /&gt;
* Line break symbol can be inserted as &amp;lt;tt&amp;gt;&amp;amp;amp;#10;&amp;lt;/tt&amp;gt; according to [https://stackoverflow.com/questions/2004386/how-to-save-newlines-in-xml-attribute reference]&lt;br /&gt;
&lt;br /&gt;
When you have created &amp;lt;tt&amp;gt;fminfo.xml&amp;lt;/tt&amp;gt; file, double-check that all properties are correct.&lt;br /&gt;
Then use SVN to add and commit the file, just like you did with pk4 file.&lt;br /&gt;
&lt;br /&gt;
If you did something wrong (most likely), then you will see an error saying that &amp;quot;Commit blocked by pre-commit hook&amp;quot;.&lt;br /&gt;
A long stacktrace from Python script is included, and the meaningful message should be at the end of it.&lt;br /&gt;
Typically, it is either XML validation error saying that something in fminfo.xml is wrong, or a message from some custom failed check.&lt;br /&gt;
You need to fix the errors and try to commit again --- until you manage to commit successfully.&lt;br /&gt;
&lt;br /&gt;
As the last step, create subdirectory named &amp;lt;tt&amp;gt;screenshots&amp;lt;/tt&amp;gt; in the working copy directory.&lt;br /&gt;
Put screenshots in .jpg or .png format into the directory: they will be displayed in in-game mission downloader.&lt;br /&gt;
Then add and commit all the screenshot files into the repository, same way as you did for pk4 and xml files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Update Mission =&lt;br /&gt;
&lt;br /&gt;
This section covers the case if mission has already been released, but new version should be uploaded.&lt;br /&gt;
&lt;br /&gt;
First of all, make sure you have up-to-date working copy of the FM directory.&lt;br /&gt;
If you already have working copy, do right-click and SVN Update in it in Windows Explorer.&lt;br /&gt;
If you don&#039;t have it yet, then open Repo-browser, find the directory named by FM&#039;s internal name, right-click and select Checkout.&lt;br /&gt;
If you don&#039;t know the internal name, you can learn it like this: install the FM in the game, then look what is written in the &amp;lt;tt&amp;gt;currentfm.txt&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
Suppose internal name is &amp;quot;qwerty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are two ways to update the FM:&lt;br /&gt;
# Minor update changes one or several lines in some file, e.g. in .map file or in .gui file. Such update is usually done when TDM engine is changed, FM gets broken, and merely a small spawnarg change is enough to return proper behavior. Usually such changes are done by TDM developers with approval of FM authors.&lt;br /&gt;
# Major update covers everything else. It happens when FM author sends a new version of pk4 file, with arbitrary changes in .map file, and probably some other changes.&lt;br /&gt;
&lt;br /&gt;
When doing minor update, prefer editing existing pk4 archive instead of creating a new one from scratch.&lt;br /&gt;
For instance, you can open the archive in 7-zip, extract only one file which you want to modify, change it in text editor, then add it back to the archive in 7-zip (overwriting the old version).&lt;br /&gt;
It is a &#039;&#039;&#039;bad&#039;&#039;&#039; idea to extract everything, do some changes, then create a brand new pk4 archive.&lt;br /&gt;
&lt;br /&gt;
Regardless of how major the update is, keep in mind SVN storage specifics to avoid rapid growth of server storage requirements.&lt;br /&gt;
Unless full size of FM package is smaller than 100 MB, please run the diff optimization tool. The tool is located in &amp;lt;tt&amp;gt;devel\pk4diff\bin&amp;lt;/tt&amp;gt; in the assets SVN repo and requires Python 3. The tool will check how much data is really changed inside the archive. If the changes account for less than 10% of the full package size, then the tool will repack it to ensure that this update takes only a very little additional space on server. See more details in [[#Storage Concerns]] section.&lt;br /&gt;
&lt;br /&gt;
The procedure (for Windows) is as follows:&lt;br /&gt;
&lt;br /&gt;
# replace the .pk4 in your working copy of the mission database with your modified .pk4 &lt;br /&gt;
# if you haven&#039;t done so already, install Python 3 and make sure during the installation that it&#039;s added as an environment variable &lt;br /&gt;
# copy&amp;amp;paste pk4diff.py, pk4diffexe.exe and xdelta3.exe from &amp;lt;tt&amp;gt;darkmod_svn\devel\pk4diff\bin&amp;lt;/tt&amp;gt; to the FM&#039;s mission database folder next to the .pk4 &lt;br /&gt;
# open the Windows command console &lt;br /&gt;
# type cd into the console, then copy-paste in the path of the FM&#039;s SVN folder and hit enter to switch to this folder. Use &amp;quot;cd /d&amp;quot; instead of &amp;quot;cd&amp;quot; if this is a different drive than the one currently mentioned in the console. For exampple: cd D:\games\darkmod_fms\packed\fms\cleanneighbourhood &lt;br /&gt;
# paste this command into the command console, adjusting the name of the .pk4: py pk4diff.py --optimize cleanneighbourhood.pk4 &lt;br /&gt;
# load the .pk4 in TDM to test that it works, then commit it &lt;br /&gt;
&lt;br /&gt;
Now you need to edit &amp;lt;tt&amp;gt;fminfo.xml&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
# Increment the integer in &amp;quot;version&amp;quot; property by one. Otherwise in-game downloader won&#039;t know that the mission has been updated.&lt;br /&gt;
# Probably update &amp;quot;size&amp;quot; property if it has changed significantly.&lt;br /&gt;
&lt;br /&gt;
After you have dealt both with pk4 storage concerns and with XML file update, it&#039;s time to commit the changes.&lt;br /&gt;
Open working copy directory in Windows Explorer, right-click and select SVN Commit.&lt;br /&gt;
You should see at least two files marked as modified with checkboxes set: &amp;lt;tt&amp;gt;qwerty.pk4&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;fminfo.xml&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Write commit message which describes the changes. Start commit message with FM internal name in brackets.&lt;br /&gt;
If the new version came from the author, write something like &amp;quot;New version: sent to me by XyMegaMapper yesterday&amp;quot;.&lt;br /&gt;
If the update did not come from FM author, then all the changes must be described in full detail!&lt;br /&gt;
In case of minor update, it can be something like &amp;quot;In guis/mainmenu_custom_defs.gui, removed MM_BRIEFING_VIDEO_MATERIAL_K defines for K &amp;gt; 1&amp;quot;.&lt;br /&gt;
Finally, click OK to commit the changes.&lt;br /&gt;
&lt;br /&gt;
= Storage Concerns =&lt;br /&gt;
&lt;br /&gt;
We store all missions in SVN repository, thus every version of every FM is saved forever.&lt;br /&gt;
While total size of all FMs can be 10 GB, the SVN repository can be larger due to storing full history, especially if large FMs are updated many times.&lt;br /&gt;
As of 2021, it is not clear yet how bad things will become.&lt;br /&gt;
Most likely the repo won&#039;t grow too large, but it&#039;s better to be careful.&lt;br /&gt;
In order to decide how to make history smaller, we should first understand how is SVN repository stored on the server.&lt;br /&gt;
&lt;br /&gt;
=== Xdelta and Zip Format ===&lt;br /&gt;
&lt;br /&gt;
SVN history is a series of revisions.&lt;br /&gt;
For every revision, SVN stores the diff between the previous version and the new one for every modified file.&lt;br /&gt;
So when we commit an update to pk4 file, the size of SVN repository grows by the size of the diff on pk4 file.&lt;br /&gt;
In the worst case the diff can be as large as the new version of pk4 file.&lt;br /&gt;
Unfortunately, such worst-case outcome easily happen even if only a few files inside archive were modified.&lt;br /&gt;
&lt;br /&gt;
Pk4 file is an ordinary zip archive, so it is stored in [https://en.wikipedia.org/wiki/ZIP_(file_format)#Structure Zip format]. All files are stored sequentally inside the archive file, one after another.&lt;br /&gt;
Every file inside zip archive is compressed independently of all the other files, and occupies some subsegment of the file.&lt;br /&gt;
If some file was not changed and was not recompressed, then the new archive contains exactly the same bytes for this file as the old archive.&lt;br /&gt;
In theory, a perfect diff algorithm can detect it, and avoid including any data for such &amp;quot;not-changed&amp;quot; files into the diff.&lt;br /&gt;
&lt;br /&gt;
In SVN, diff between revisions is computed using xdelta algorithm with search window limited to 100 KB.&lt;br /&gt;
Due to the very limited search window, the algorithm cannot reliably detect that files inside the old archive are reused in the new one.&lt;br /&gt;
Changing the order of files inside zip archive or removing files larger than 100 KB are enough to completely break the diff algorithm, resulting in a maximum-size diff.&lt;br /&gt;
That&#039;s why even using 7-zip to modify the old archive does not guarantee that your commit will produce small diff.&lt;br /&gt;
In fact, maximum-size diff is almost guaranteed if you remove at least one file of size larger than 100 KB (same can also happen for file modification).&lt;br /&gt;
&lt;br /&gt;
=== Pk4diff Optimization ===&lt;br /&gt;
&lt;br /&gt;
We have a special tool for &amp;quot;optimizing&amp;quot; pk4 file to reduce diff size.&lt;br /&gt;
This tool inspects the old and the new versions of the archive and finds which files have equal contents.&lt;br /&gt;
Then it repacks the archive in the following way:&lt;br /&gt;
# Take old version of the archive.&lt;br /&gt;
# Rename all files which were modified or removed to &amp;lt;tt&amp;gt;__trash__/trashN._tbin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Append files which were added or modified to the end of the archive.&lt;br /&gt;
The resulting pk4 archive as almost exactly the same as the old one, with new data appended at the end.&lt;br /&gt;
It is almost certain that SVN will produce diff file which only contains the differences (the appended data).&lt;br /&gt;
The downside is: &amp;quot;optimized&amp;quot; pk4 file is slightly larger because it still stores the old data as &amp;quot;trash&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In order to run the optimizer script, Python 3 must be installed.&lt;br /&gt;
Of course, SVN must be available in command line (for TortoiseSVN, make sure to [https://stackoverflow.com/a/9874961/556899 check &amp;quot;command line client tools&amp;quot; during installation]).&lt;br /&gt;
The tool is located in &amp;lt;tt&amp;gt;devel/pk4diff/bin&amp;lt;/tt&amp;gt; in the assets repo and consists of Python script, pk4diff executable, and xdelta3 executable.&lt;br /&gt;
The easiest way to run it is to copy all three files into the directory with pk4 file (which must be in SVN working copy), then execute in command line:&lt;br /&gt;
&lt;br /&gt;
  python pk4diff.py --optimize qwerty.pk4&lt;br /&gt;
&lt;br /&gt;
Here is the sample output:&lt;br /&gt;
&lt;br /&gt;
  CMD: svn export hhta.pk4@BASE __tmp_clean__.pk4&lt;br /&gt;
  A    __tmp_clean__.pk4&lt;br /&gt;
  Export complete.&lt;br /&gt;
  CMD: pk4diffexe __tmp_clean__.pk4 hhta.pk4&lt;br /&gt;
  Added size: 6676263&lt;br /&gt;
  Removed size: 33085296&lt;br /&gt;
  CMD: xdelta3 -e -f -B 524288 -W 524288 -s __tmp_clean__.pk4 hhta.pk4 __tmp_diff__.bin&lt;br /&gt;
  Xdelta diff size: &#039;&#039;&#039;517134007&#039;&#039;&#039;&lt;br /&gt;
  CMD: pk4diffexe __tmp_clean__.pk4 hhta.pk4 __tmp_optimized__.pk4&lt;br /&gt;
  Added size: 6676263&lt;br /&gt;
  Removed size: 33085296&lt;br /&gt;
  CMD: xdelta3 -e -f -B 524288 -W 524288 -s __tmp_clean__.pk4 __tmp_optimized__.pk4 __tmp_diff__.bin&lt;br /&gt;
  Xdelta diff size: &#039;&#039;&#039;6712187&#039;&#039;&#039;&lt;br /&gt;
  Added portion of dead data: &#039;&#039;&#039;5.885588%&#039;&#039;&#039;&lt;br /&gt;
  Replacing pk4 file with optimized file&lt;br /&gt;
&lt;br /&gt;
All lines starting with &amp;quot;&amp;lt;tt&amp;gt;CMD:&amp;lt;/tt&amp;gt;&amp;quot; shows running some program with some parameters.&lt;br /&gt;
The script works like this:&lt;br /&gt;
# The procedure starts with exporting clean version of hhta.pk4 using SVN command.&lt;br /&gt;
# Then pk4diffexe is run: it displays how many bytes are added/removed in the update. The full FM package is about 500 MB, so the changes are pretty small in this example.&lt;br /&gt;
# xdelta3 is run to estimate initial size of the diff. Obviously, it is maximum-size diff in this example (+ 500 MB to repo size).&lt;br /&gt;
# pk4diffexe is run again, but now it produces an optimized pk4 file.&lt;br /&gt;
# xdelta3 is run again on the optimized pk4 file. The diff size becomes about 6 MB, so the optimization has reduced diff a lot.&lt;br /&gt;
# The optimized pk4 file contains some trash data, and we are told which portion of the optimized pk4 is trash. It&#039;s only 6% in this case (33 MB).&lt;br /&gt;
# Since portion of trash is lower than 10%, the pk4 file is replaced with the optimized one. If there is too much trash, then optimized pk4 is simply deleted with a different message.&lt;br /&gt;
&lt;br /&gt;
After running the program, the &amp;lt;tt&amp;gt;hhta.pk4&amp;lt;/tt&amp;gt; file is modified: now it is the optimized version. Also, there is file &amp;lt;tt&amp;gt;hhta.pk4.old&amp;lt;/tt&amp;gt; nearby: this is the copy of modified pk4 before optimization, in case you decide to restore it back. All that is left is to delete the .old file and commit modified pk4 to SVN.&lt;br /&gt;
&lt;br /&gt;
Note that xdelta3 provides only rough estimate on the diff size, because 1) SVN uses xdelta 1 instead of xdelta 3, and 2) SVN uses window size = 100 KB, while command-line xdelta3 does not allow windows size smaller than 512 KB. However, the diff size displayed by the script should be very close to diff size on the SVN server in most cases.&lt;br /&gt;
&lt;br /&gt;
For programmers: the source code for pk4diffexe is located in &amp;lt;tt&amp;gt;devel/pk4diff/src&amp;lt;/tt&amp;gt;.&lt;br /&gt;
It requires CMake and Conan to be built.&lt;br /&gt;
File &amp;lt;tt&amp;gt;conan_install.bat&amp;lt;/tt&amp;gt; contains commands used to build it.&lt;br /&gt;
&lt;br /&gt;
=== Trash ===&lt;br /&gt;
&lt;br /&gt;
Optimized pk4 file contains &amp;quot;trash&amp;quot; files.&lt;br /&gt;
They are located in &amp;lt;tt&amp;gt;__trash__&amp;lt;/tt&amp;gt; directory and have filenames &amp;lt;tt&amp;gt;trashKKK._tbin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Since they have weird extension, they should never affect how TDM game works.&lt;br /&gt;
&lt;br /&gt;
If the total amount of trash is less than 100 KB, then you can safely delete it using 7-zip program before committing update.&lt;br /&gt;
When the total amount of trash is more than 100 KB, then SVN diff algorithm will be broken if you delete it, most likely resulting in maximum-size diff.&lt;br /&gt;
Indeed, we should control amount of trash in order to achieve balance between reducing SVN storage on server and reducing download traffic and storage on players&#039; machines.&lt;br /&gt;
That&#039;s why pk4diff script only accepts optimized package if amount of trash is lower than 10%.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Thread on developer subforum: https://forums.thedarkmod.com/index.php?/topic/20624-store-missions-archive-in-svn/&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=29673</id>
		<title>Security Camera (2.10+)</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=29673"/>
		<updated>2022-07-16T14:05:41Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Security Camera==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the security camera as it will be from 2.10 onwards. See [[Security Camera]] if you&#039;re currently working with TDM 2.09 or older versions.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The security camera provides the following features:&lt;br /&gt;
&lt;br /&gt;
* It can either sweep back and forth between two angles or remain stationary.&lt;br /&gt;
* If the camera sees the player, an AI on a hostile team or a body, it plays a short alert sound that is silent to nearby guards. If the enemy or body is still in view several seconds later, an alarm sounds. This alarm will repeat every few seconds for a while, even if the enemy moves out of sight.&lt;br /&gt;
* The camera is able to track its enemy, making it much harder to escape its view.&lt;br /&gt;
* An optional spotlight that points forward, lighting the area in the direction the camera faces.&lt;br /&gt;
* The ability to toggle the camera power on/off by triggering it. Each of the above described subsystems can be toggled individually.&lt;br /&gt;
* If the camera has targets, these will be activated when the camera is fully alerted. This gives the map author the ability to play a more powerful alarm than the one given off by the camera (or to do a variety of other things.)&lt;br /&gt;
* Sending what it sees to a separate, func_static display screen. Alternatively, it can send what another entity (typically a target_null) sees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Security Camera: Entities and Prefabs==&lt;br /&gt;
&lt;br /&gt;
Security camera entities can be found in &#039;&#039;AI/Machines/Security Camera&#039;&#039; and inherit from &#039;&#039;func_securitycamera&#039;&#039;. Prefabs can be found in &#039;&#039;AI/Machines&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Place the camera entity in your map, and orient it toward its starting direction. A rotating camera will sweep clockwise, halt a moment, then sweep back counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
Some cameras may be designed to use additional parts, i.e. a ceiling pivot entity with scripted gears. See the prefabs or the entity descriptions for more info.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Spawnargs==&lt;br /&gt;
&lt;br /&gt;
===Movement Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;rotate&amp;quot; - If &amp;quot;1&amp;quot; (default) the camera will rotate. If &amp;quot;0&amp;quot;, the camera is stationary.&lt;br /&gt;
* &amp;quot;sweepSpeed&amp;quot; - Horizontal rotation speed in degrees per second.&lt;br /&gt;
* &amp;quot;sweepAngle&amp;quot; - The number of degrees the camera covers during its sweep. You can cause a camera to initially sweep in the counter-clockwise direction by setting this to a negative number.&lt;br /&gt;
* &amp;quot;sweepWait&amp;quot; - How long the pause is after the end of a sweep. Default is 0.5 seconds.&lt;br /&gt;
* &amp;quot;sweepWaitSoundOffset&amp;quot; - Start playing snd_end before the camera reaches the end of its sweep, by this amount of seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Detection Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern how the security camera detects and reacts to enemies: max detection distance, at what light intensity, how long the alarm lasts, whether to trigger anything and so on.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;scanDist&amp;quot; - The distance limit for spotting the enemy.&lt;br /&gt;
* &amp;quot;scanFov&amp;quot; - The camera&#039;s field of view.&lt;br /&gt;
* &amp;quot;seePlayer&amp;quot; - Whether the camera will react to the player.&lt;br /&gt;
* &amp;quot;seeAI&amp;quot; - Whether the camera will react to AIs, and what their relationship to the camera&#039;s team has to be.&lt;br /&gt;
* &amp;quot;seeBodies&amp;quot; - Whether the camera will react to bodies.&lt;br /&gt;
* &amp;quot;seeAnimals&amp;quot; - Whether the camera will react to animals.&lt;br /&gt;
* &amp;quot;sight_threshold&amp;quot; - From 0.0 to 1.0, how lit up the lightgem has to be for the player to be detected.&lt;br /&gt;
* &amp;quot;sightTime&amp;quot; - After seeing the enemy (partial alert), the camera will wait this amount of time. If it still sees the enemy, it will sound the alarm. This gives the enemy some time to hide.&lt;br /&gt;
* &amp;quot;sightResume&amp;quot; - If the camera can&#039;t see the enemy anymore after a partial alert, pause for this amount of time. When this expires, the camera will resume sweeping.&lt;br /&gt;
* &amp;quot;alarm_duration&amp;quot; - Minimum duration of the fully alert state. Will be extended by half if the enemy is still in view at the end or was recently seen.&lt;br /&gt;
* &amp;quot;alarm_interval&amp;quot; - Amount of time inbetween each activation of the alarm sound, when fully alerted.&lt;br /&gt;
* &amp;quot;trigger_alarm_start&amp;quot; - Trigger targets when an alarm begins.&lt;br /&gt;
* &amp;quot;trigger_alarm_end&amp;quot; - Trigger targets when an alarm ends.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Follow Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera can track the enemy&#039;s movements. For as long as the security camera is partially or fully alerted, it will turn to the closest enemy it can see. The models for the camera and mount should be able to support this without clipping into each other. A ceiling-mounted camera will generally have much more freedom to turn than a wall-mounted camera.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;follow&amp;quot; - Enable to let the camera track the enemy horizontally.&lt;br /&gt;
* &amp;quot;follow_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, horizontally.&lt;br /&gt;
* &amp;quot;follow_speed_mult&amp;quot; - Speed up horizontal movements by this multiplier when the camera is following the enemy.&lt;br /&gt;
* &amp;quot;follow_incline&amp;quot; - The camera will also track the enemy vertically.&lt;br /&gt;
* &amp;quot;follow_incline_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, vertically.&lt;br /&gt;
* &amp;quot;follow_incline_speed&amp;quot; - Speed of vertical movements to track the enemy. Not affected by &#039;follow_speed_mult&#039;.&lt;br /&gt;
* &amp;quot;follow_constrain_up&amp;quot; - Limit how far the camera can turn upwards from its starting orientation.&lt;br /&gt;
* &amp;quot;follow_constrain_down&amp;quot; - Limit how far the camera can turn downwards from its starting orientation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Spotlight Spawnargs===&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;spotLight&amp;quot; is set to 1, the security camera&#039;s code will spawn a spotlight and align it with its view. This dates back to the Doom 3 days, so it follows different rules from the def_attach systems. If &amp;quot;useColors&amp;quot; is enabled, the spotlight&#039;s color will change depending on alert state. Otherwise it will look for a &amp;quot;_color&amp;quot; spawnarg on the camera.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can specify an existing light with the spawnarg &amp;quot;spotlight_custom&amp;quot;. Apart from &amp;quot;spotLight&amp;quot; and &amp;quot;useColors&amp;quot;, all other spotlight-relevant spawnargs are ignored. If no valid entity of spawnclass idLight is found, it&#039;ll spawn a spotlight instead.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;spotLight&amp;quot; - If &amp;quot;1&amp;quot; the camera will use a spotlight.&lt;br /&gt;
* &amp;quot;spotlight_range&amp;quot; - Reach of the spotlight.&lt;br /&gt;
* &amp;quot;spotlight_diameter&amp;quot; - Diameter of the spotlight&#039;s projection. If 0, will automatically be calculated to match spotlight_range and scanFov, for scanFov up to 90°.&lt;br /&gt;
* &amp;quot;spotlight_texture&amp;quot; - Texture used by the spotlight. You should use a texture that&#039;s designed for projected lights: one that uses a gradient as its falloff image. This ensures that light intensity gradually fades to black, rather than abruptly cutting to black.&lt;br /&gt;
* &amp;quot;spotlight_volumetric&amp;quot; - The spawned spotlight will be volumetric.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Color Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;useColors&amp;quot; - If &amp;quot;1&amp;quot; the camera will change the colour of its model and spotlight depending on its alert state.&lt;br /&gt;
* &amp;quot;color_sweeping&amp;quot; - Color when the camera is sweeping = unalerted. Default green.&lt;br /&gt;
* &amp;quot;color_sighted&amp;quot; - Color when the camera has noticed an enemy = partially alerted. Default yellow.&lt;br /&gt;
* &amp;quot;color_alerted&amp;quot; - Color when the camera has sounded the alarm = fully alerted. Default red.&lt;br /&gt;
* &amp;quot;_color&amp;quot; - If &amp;quot;useColors&amp;quot; is disabled, the model and spotlight will always have this color.&lt;br /&gt;
&lt;br /&gt;
As an alternative or complement to color spawnargs, you may make use of shaderParm7 in materials used by the security camera. shaderParm7 represents the alert state of the camera:&lt;br /&gt;
* 0 = unalerted&lt;br /&gt;
* 1 = was partially alerted for &amp;quot;sightTime&amp;quot; seconds but the enemy has disappeared, now waiting &amp;quot;sightResume&amp;quot; seconds before resuming sweeping.&lt;br /&gt;
* 2 = partially alerted&lt;br /&gt;
* 3 = fully alerted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Damage Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;health&amp;quot; - amount of damage the camera can take before being destroyed. Setting to 0 will make the camera invincible. Setting to 0 will make the camera invincible. Default base damage per hit: sword - 42; broadhead - 35; fire arrow direct hit - 400.&lt;br /&gt;
* &amp;quot;damage_blackjack&amp;quot; - how much damage the security camera takes from blackjack hits, default: 0.&lt;br /&gt;
* &amp;quot;damage_mult_&amp;quot; - a series of spawnargs to multiply how much damage the security camera takes from various damage sources. You can name specific weapon classnames or damageDefs in the spawnarg, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;.&lt;br /&gt;
* &amp;quot;damage_splash_falloff&amp;quot; - how quickly splash damage from fire arrows exponentially decreases with distance, default: 3.&lt;br /&gt;
* &amp;quot;damage_flinderize&amp;quot; - if a security camera is destroyed and the destroying hit (or post-destruction hit) is greater than this value, the security camera explodes into pieces. Default: 90.&lt;br /&gt;
* &amp;quot;def_flinder1&amp;quot; - the classname of the flinder pieces generated when a camera is flinderized by a heavy hit. Use &amp;quot;def_flinder2&amp;quot; etc. to generate more flinders.&lt;br /&gt;
* &amp;quot;flinder_offset1&amp;quot; - specifies the spawn point of the respective flinder piece relative to the camera&#039;s origin. Takes the camera&#039;s current rotation into account.&lt;br /&gt;
* &amp;quot;broken&amp;quot; - the security camera switches to this model when destroyed&lt;br /&gt;
* &amp;quot;broken_flinderized&amp;quot; - Optional. Specify the model of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - the security camera switches to this skin when destroyed&lt;br /&gt;
* &amp;quot;skin_flinderized&amp;quot; - Optional. Specify the skin of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;hideModelOnBreak&amp;quot; - the security camera will be hidden when destroyed, default: 0.&lt;br /&gt;
* &amp;quot;notice_destroyed&amp;quot; - Whether AIs will become alerted if they find this security camera destroyed.&lt;br /&gt;
* &amp;quot;fx_damage&amp;quot; - Fx to play whenever the camera is damaged while power is on.&lt;br /&gt;
* &amp;quot;fx_damage_nopower&amp;quot; - Fx to play whenever the camera is damaged while power is off.&lt;br /&gt;
* &amp;quot;fx_destroyed&amp;quot; - Fx to play whenever the camera is destroyed while power is on.&lt;br /&gt;
* &amp;quot;fx_destroyed_nopower&amp;quot; - Fx to play whenever the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;break_up_script&amp;quot; - This script is called when the camera is destroyed.&lt;br /&gt;
* &amp;quot;break_up_target&amp;quot; - This entity is triggered if the camera is destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sound Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_sight&amp;quot; - Sound emitted when the camera notices an enemy.&lt;br /&gt;
* &amp;quot;snd_moving&amp;quot; - Sound emitted when the camera is rotating.&lt;br /&gt;
* &amp;quot;snd_stationary&amp;quot; - Sound emitted by a stationary type of camera.&lt;br /&gt;
* &amp;quot;snd_alert&amp;quot; - Alarm sound emitted when fully alerted.&lt;br /&gt;
* &amp;quot;snd_end&amp;quot; - Sound emitted when the camera is about to reach the end point of a sweep.&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound emitted when the camera is destroyed.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound emitted when the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the camera emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;sprS_alert&amp;quot; - How far snd_alert propagates to AIs, at default this is a few rooms. Higher settings than mild can cause large framedrops due to mass AI alerts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sparks Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera spawns a particle emitter when it&#039;s destroyed. By default it uses a single-cycle spark particle which is periodically triggered at random intervals. When power to the camera is switched off, the sparks stop appearing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;sparks&amp;quot; - Whether to spawn a particle emitter at all.&lt;br /&gt;
* &amp;quot;sparks_particle&amp;quot; - Particle that is spawned.&lt;br /&gt;
* &amp;quot;sparks_delay&amp;quot; - Time taken for the particle emitter to spawn initially.&lt;br /&gt;
* &amp;quot;sparks_power_dependent&amp;quot; - Only show the particle if power to the destroyed camera is on.&lt;br /&gt;
* &amp;quot;sparks_interval&amp;quot; - For non-looping particles, minimum time between triggers.&lt;br /&gt;
* &amp;quot;sparks_interval_rand&amp;quot; - For non-looping particles, additional random factor added to the time between triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Model Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs are important if you change the camera model:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;broken&amp;quot; - Use this model when the camera is destroyed.&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot; - A vector that defines the offset of the camera&#039;s &#039;eye&#039; from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot; - A vector that defines the spotlight offset from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;flipAxis&amp;quot; - This and the next spawnarg can be used to turn a model such that it faces forwards. Not needed if the model was created forward-facing.&lt;br /&gt;
* &amp;quot;modelAxis&amp;quot;&lt;br /&gt;
* &amp;quot;skin&amp;quot; - This is the &amp;quot;on&amp;quot; skin. It may contain materials that make use of the colored keyword or shaderParm7, to change depending on alert state.&lt;br /&gt;
* &amp;quot;skin_on_spotlight_off&amp;quot; - This is the &amp;quot;on&amp;quot; skin, but with the spotlight toggled off. This is useful if your model contains inbuilt lightrays that should represent the spotlight.&lt;br /&gt;
* &amp;quot;skin_off&amp;quot; - This is the &amp;quot;off&amp;quot; skin. It should not contain materials with the colored keyword or shaderParm7.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - When the camera is destroyed it will switch to this skin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;start_off&amp;quot; - Whether the camera starts powered on or off.&lt;br /&gt;
* &amp;quot;cameraTarget&amp;quot; - Use the view from this entity instead of from self if sending a view to the display screen. See section &#039;&#039;The Display Screen&#039;&#039; for more.&lt;br /&gt;
* &amp;quot;gearSpeed&amp;quot; - This spawnarg is set on the ceiling pivot of the 2nd type of security camera. It controls how fast the gears turn when the security camera turns.&lt;br /&gt;
* &amp;quot;legacy&amp;quot; - This marks an old version of the security camera, for backwards compatibility with older missions.&lt;br /&gt;
&lt;br /&gt;
The security camera uses spawnargs to place its &#039;eye&#039; and spotlight in front of the model to ensure the view and spotlight aren&#039;t blocked by the model. If you use a different model, you might need to change these.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot;&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Damaging the Camera==&lt;br /&gt;
&lt;br /&gt;
===Damage sources===&lt;br /&gt;
&lt;br /&gt;
By default the security camera is vulnerable only to fire arrows (direct &amp;amp; splash damage). The &amp;quot;damage_&amp;quot; and &amp;quot;damage_mult_&amp;quot; spawnargs allow you to to specify how much damage security cameras take from each weapon, but be sure to communicate the camera&#039;s vulnerabilities to the player. You can create your own &amp;quot;damage_mult_&amp;quot; spawnargs by adding the name of a specific weapon classname or damageDef, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;. Unfortunately it does not appear to be possible to make water damage the camera, since TDM will crash upon load when a water response is applied to the camera. &lt;br /&gt;
&lt;br /&gt;
Setting &amp;quot;health&amp;quot; to 0 will make the camera totally invicible. Alternatively, you can make the camera immune to everything but fire arrow splash damage by binding a tight-fitting nodrawsolid_metal brush. A similar approach is to bind a brush that leaves parts of the camera exposed, i.e. the lens or face. Note that it will weaken fire arrows considerably if they hit from the wrong angle. A direct hit does up to 400 damage, while the splash does a distance-dependent amount of damage below 100. Note that collision detection is done using the camera&#039;s clipmodel, which has a different shape than the visual model.&lt;br /&gt;
&lt;br /&gt;
The player will receive feedback that the camera took damage in the form of spark effects, specified in spawnargs beginning with fx_. An .fx definiton is basically an instruction to emit a sequence of particles and sounds.&lt;br /&gt;
&lt;br /&gt;
===Destroying the Camera===&lt;br /&gt;
&lt;br /&gt;
Security cameras can not only be destroyed, but also be flinderized (burst apart into pieces) which occurs when the security camera takes a hit whose damage is higher than the value of the &amp;quot;damage_flinderize&amp;quot; spawnarg. The &amp;quot;broken&amp;quot; and &amp;quot;skin_broken&amp;quot; spawnargs let you set the model and skin when the camera is destroyed, while the optional &amp;quot;broken_flinderized&amp;quot; and &amp;quot;skin_flinderized&amp;quot; let you set the model and skin when the camera has been flinderized. The &amp;quot;def_flinder&amp;quot; and &amp;quot;flinder_offset&amp;quot; spawnargs allow you to specify the flinder pieces and their spawn point relative to the camera&#039;s origin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
===Script Events===&lt;br /&gt;
&lt;br /&gt;
The security camera supports the following script events:&lt;br /&gt;
* getSecurityCameraState() - Returns the security camera&#039;s state. 1 = unalerted, 2 = partially alerted, 3 = fully alerted, 4 = inactive (power off), 5 = destroyed, 0 = not a security camera.&lt;br /&gt;
* getShaderParm(7) - Returns the current value of shaderParm7 on the camera model. 0 = unalerted, 1 = about to resume sweep after a partial alert, 2 = partially alerted, 3 = fully alerted.&lt;br /&gt;
* On() and Off() - Switch the camera&#039;s power on or off (note the capitalisation).&lt;br /&gt;
* activate() and trigger() - Toggle the camera&#039;s power.&lt;br /&gt;
* getHealth() and setHealth(float newHealth) - As per the name. Setting health to 0 or lower will destroy the security camera, which is irreversible. setHealth() will make an invincible camera vulnerable.&lt;br /&gt;
* getEnemy() - Returns the entity that most recently caused or refreshed the security camera&#039;s suspicious or alert state.&lt;br /&gt;
* canSee() - Tests whether the security camera is able to see a specific entity. Currently only player1 is supported.&lt;br /&gt;
* setSightThreshold() - This changes how lit up the player&#039;s lightgem has to be for the security camera to see him, from 0.0 to 1.0.&lt;br /&gt;
* state_light(boolean set) - Switch the camera&#039;s spotlight on/off, if the camera has one.&lt;br /&gt;
* state_sweep(boolean set) - Switch the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* state_see_player(boolean set) - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
* toggle_light() - Toggle the spotlight on/off, if the camera has one.&lt;br /&gt;
* toggle_sweep() - Toggle the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* toggle_see_player() - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Functions===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject contains the following object functions:&lt;br /&gt;
* toggleSCSpotlight() - calls toggle_light() on the camera if it has a spotlight (spawnarg &amp;quot;spotLight&amp;quot; = &amp;quot;1&amp;quot;)&lt;br /&gt;
* toggleSCSweep() - calls toggle_sweep() on the camera&lt;br /&gt;
* toggleSCPlayer() - calls toggle_see_player() on the camera&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, these object functions simply call the toggle script events on the camera they belong to. This allows you to call the script events from i.e. buttons without scripting. To set this up:&lt;br /&gt;
# create an atdm:target_callobjectfunction entity&lt;br /&gt;
# give it the spawnarg &amp;quot;call&amp;quot; with the name of the desired object function, i.e. &amp;quot;toggleSCSpotlight&amp;quot;&lt;br /&gt;
# let it target the security camera&lt;br /&gt;
# when desired, trigger this entity (from a script, from a button etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scriptobjects===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject only consists of the 3 object functions mentioned above. Beyond some added utility, this scriptobject has no importance for the security camera and you can easily give it your own scriptobject instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upon Destruction===&lt;br /&gt;
&lt;br /&gt;
You may call a script when the camera is destroyed, as per the spawnarg &amp;quot;break_up_script&amp;quot;. This script should be able to receive the name of the destroyed security camera as input, i.e.:&lt;br /&gt;
 void camera_destroyed ( entity camera )&lt;br /&gt;
&lt;br /&gt;
An alternative is to use the spawnarg &amp;quot;break_up_target&amp;quot; to name an entity that calls the script when triggered, but this will not pass the name of the destroyed security camera unless you use an atdm:target_callscriptfunction entity with the spawnarg &amp;quot;forEach&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sending the camera&#039;s view to a Display Screen==&lt;br /&gt;
&lt;br /&gt;
You can create a display screen that shows that the camera sees: all that&#039;s needed is a func_static patch that uses a texture like &#039;&#039;textures/common/camera/camera1&#039;&#039;. It&#039;s recommended to put another patch behind it, since this func_static will get hidden if it&#039;s switched off. The screen then needs to be given a spawnarg &amp;quot;cameraTarget&amp;quot; that names either a security camera or a different entity, typically a target_null. The screen will display what that entity sees.&lt;br /&gt;
&lt;br /&gt;
To change the screen&#039;s field of view, apply the spawnargs &amp;quot;cameraFovX&amp;quot; and &amp;quot;cameraFovY&amp;quot; to the entity sending the view. Otherwise it will default to &amp;quot;scanFov&amp;quot; for security cameras or 120 for other entities.&lt;br /&gt;
&lt;br /&gt;
The screen is hidden or shown automatically if the screen is displaying a security camera&#039;s view. The screen can also be switched on/off manually by triggering it, but this requires the screen to start with the spawnarg &amp;quot;hide&amp;quot; &amp;quot;0&amp;quot; or &amp;quot;hide&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Multiple Display Screens / Reflective Water / Skybox===&lt;br /&gt;
&lt;br /&gt;
If you plan to have multiple security cameras sending to multiple display screens in your mission, or if the camera display will appear in the same player POV as the sky or reflective water surfaces, you&#039;ll need to use unique camera materials for each screen. You can find 9 additional camera materials in the textures/common/camera/ folder. If you should need even more, you can simply clone one of the materials and change the name after the &#039;&#039;map&#039;&#039; keyword.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examining a Test Map==&lt;br /&gt;
&lt;br /&gt;
You can obtain a test map with sample cameras in it here: [https://ftp.thedarkmod.com/tutorials/RemoteCamera/camerawiki2.pk4 camerawiki2.pk4]. Similar setups can be found as prefabs in AI/Machines.&lt;br /&gt;
&lt;br /&gt;
Open the map &#039;&#039;camerawiki.map&#039;&#039; in Dark Radiant. In this map, we have examples of the different cameras.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw1.jpg|256px|thumb|right|cam1]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A rotating camera that sweeps back and forth&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This camera (&#039;&#039;cam1&#039;&#039;) starts its rotation at 135 degrees (assuming +X is 0 degrees), and sweeps clockwise until it reaches 45 degrees. It pauses for a moment, then return-sweeps back to 135 degrees. It has a spotlight.&lt;br /&gt;
&lt;br /&gt;
The display for &#039;&#039;cam1&#039;&#039; is on the wall behind it. (Don&#039;t worry about the material being displayed backward in the screenshot.)&lt;br /&gt;
&lt;br /&gt;
The display patch uses the material &#039;&#039;camera1&#039;&#039; (provided in the camerawiki/materials/tdm_camera.mtr file).&lt;br /&gt;
&lt;br /&gt;
The four buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam1&#039;&#039; directly. When power is off, the display screen is hidden. You can simulate an &amp;quot;off&amp;quot; screen by making sure there&#039;s a black material behind the display. You could also place a glass material behind the display.&lt;br /&gt;
* Toggle Spotlight - calls the &#039;&#039;toggleSCSpotlight()&#039;&#039; object function in the camera&#039;s scriptobject, turning the spotlight on/off&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning Player detection on/off&lt;br /&gt;
* Toggle Sweep - calls the &#039;&#039;toggleSCSweep()&#039;&#039; object function in the camera&#039;s scriptobject, turning camera sweep on/off&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw2.jpg|256px|thumb|right|cam1&#039;s display]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&#039;&#039;&#039;A stationary camera that doesn&#039;t move&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw3.jpg|320px|thumb|right|cam2 and its display]]&lt;br /&gt;
This camera (&#039;&#039;cam2&#039;&#039;)  is stationary, w/o a spotlight.&lt;br /&gt;
&lt;br /&gt;
Its display, to its left, uses the material &#039;&#039;camera2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The two buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam2&#039;&#039; directly. When power is off, the display screen is hidden.&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning player detection on/off&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A screen showing the view from another entity (a target_null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw6.jpg|320px|thumb|right|a small screen showing what a target_null is seeing]]&lt;br /&gt;
&lt;br /&gt;
This is simply a screen referencing a &#039;&#039;target_null&#039;&#039; as its &#039;&#039;cameraTarget&#039;&#039;. The &#039;&#039;target_null&#039;&#039; is in a separate room pointed at a guard.&lt;br /&gt;
&lt;br /&gt;
If you look in the room where the guard is standing, you&#039;ll see that the &#039;&#039;target_null&#039;&#039; has the spawnargs &#039;&#039;cameraFovX&#039;&#039; and &#039;&#039;cameraFovY&#039;&#039;. These were set because the default field of view for a view from a non-camera entity is 120 by 120, which looks quite zoomed out. For a small screen like this one, 60 by 60 is much better.&lt;br /&gt;
&lt;br /&gt;
Also notice that the screen itself has the spawnarg &#039;&#039;hide&#039;&#039; &#039;&#039;0&#039;&#039;. This makes it respond to triggers by hiding or showing itself, allowing you to switch it on or off at the push of a button (see below).&lt;br /&gt;
&lt;br /&gt;
The button below the display does the following:&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets the screen directly to show or hide it. This only works because the screen has a &#039;&#039;hide&#039;&#039; spawnarg.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=29672</id>
		<title>Security Camera (2.10+)</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=29672"/>
		<updated>2022-07-16T13:58:47Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Security Camera==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the security camera as it will be from 2.10 onwards. See [[Security Camera]] if you&#039;re currently working with TDM 2.09 or older versions.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The security camera provides the following features:&lt;br /&gt;
&lt;br /&gt;
* It can either sweep back and forth between two angles or remain stationary.&lt;br /&gt;
* If the camera sees the player or an AI on a hostile AI, it initially plays a short alert sound that is silent to nearby guards. If the enemy is still in view several seconds later, an alarm sounds. This alarm will play intermittently for a while, even if the enemy moves out of sight.&lt;br /&gt;
* The camera is able to track its enemy, making it much harder to escape its view.&lt;br /&gt;
* An optional spotlight that points forward, lighting the area in the direction the camera faces. You can instead let the camera use a light you created.&lt;br /&gt;
* The ability to toggle the camera power on/off by triggering it. Alternatively, the above described subsystems can be toggled individually.&lt;br /&gt;
* If the camera has targets, these will be activated when the camera is fully alerted. This gives the map author the ability to play a more powerful alarm than the one given off by the camera (or to do a variety of other things.)&lt;br /&gt;
* The camera will sound an alarm if it detects bodies.&lt;br /&gt;
* Sending what it sees to a separate, func_static display screen. Alternatively, it can send what another entity (typically a target_null) sees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Security Camera: Entities and Prefabs==&lt;br /&gt;
&lt;br /&gt;
Security camera entities can be found in &#039;&#039;AI/Machines/Security Camera&#039;&#039; and inherit from &#039;&#039;func_securitycamera&#039;&#039;. Prefabs can be found in &#039;&#039;AI/Machines&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Place the camera entity in your map, and orient it toward its starting direction. A rotating camera will sweep clockwise, halt a moment, then sweep back counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
Some cameras may be designed to use additional parts, i.e. a ceiling pivot entity with scripted gears. See the entity descriptions inside DR for more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Spawnargs==&lt;br /&gt;
&lt;br /&gt;
===Movement Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;rotate&amp;quot; - If &amp;quot;1&amp;quot; (default) the camera will rotate. If &amp;quot;0&amp;quot;, the camera is stationary.&lt;br /&gt;
* &amp;quot;sweepSpeed&amp;quot; - Horizontal rotation speed in degrees per second.&lt;br /&gt;
* &amp;quot;sweepAngle&amp;quot; - The number of degrees the camera covers during its sweep. You can cause a camera to initially sweep in the counter-clockwise direction by setting this to a negative number.&lt;br /&gt;
* &amp;quot;sweepWait&amp;quot; - How long the pause is after a sweep completes and starting the return sweep. Default is 0.5 seconds.&lt;br /&gt;
* &amp;quot;sweepWaitSoundOffset&amp;quot; - Start playing snd_end before the camera reaches the end of its sweep, by this amount of seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Detection Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern how the security camera detects and reacts to the player: up to what distance, at what light intensity, how long the alarm lasts, whether to trigger anything and so on.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;scanDist&amp;quot; - The distance limit for spotting the enemy.&lt;br /&gt;
* &amp;quot;scanFov&amp;quot; - The camera&#039;s field of view.&lt;br /&gt;
* &amp;quot;seePlayer&amp;quot; - Whether the camera will react to the player.&lt;br /&gt;
* &amp;quot;seeAI&amp;quot; - Whether the camera will react to AIs.&lt;br /&gt;
* &amp;quot;seeBodies&amp;quot; - Whether the camera will react to bodies.&lt;br /&gt;
* &amp;quot;seeAnimals&amp;quot; - Whether the camera will react to animals.&lt;br /&gt;
* &amp;quot;sight_threshold&amp;quot; - From 0.0 to 1.0, how lit up the lightgem has to be for the player to be detected.&lt;br /&gt;
* &amp;quot;sightTime&amp;quot; - After seeing the enemy (partial alert), the camera will wait this amount of time. If it still sees the enemy, it will sound the alarm. This gives the enemy some time to hide.&lt;br /&gt;
* &amp;quot;sightResume&amp;quot; - If the camera can&#039;t see the enemy anymore after a partial alert, pause for this amount of time. When this expires, the camera will resume sweeping.&lt;br /&gt;
* &amp;quot;alarm_duration&amp;quot; - Minimum duration of the fully alert state. Will be extended by half if the enemy is still in view at the end or was recently seen.&lt;br /&gt;
* &amp;quot;alarm_interval&amp;quot; - Amount of time inbetween each activation of the alarm sound, when fully alerted.&lt;br /&gt;
* &amp;quot;trigger_alarm_start&amp;quot; - Trigger targets when an alarm begins.&lt;br /&gt;
* &amp;quot;trigger_alarm_end&amp;quot; - Trigger targets when an alarm ends.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Follow Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera can track the enemy&#039;s movements. For as long as the security camera is partially or fully alerted, it will turn to the closest enemy it can see. The models for the camera and mount should be able to support this without clipping into each other. A ceiling-mounted camera will generally have much more freedom to turn than a wall-mounted camera.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;follow&amp;quot; - Enable to let the camera track the enemy horizontally.&lt;br /&gt;
* &amp;quot;follow_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, horizontally.&lt;br /&gt;
* &amp;quot;follow_speed_mult&amp;quot; - Speed up horizontal movements by this multiplier when the camera is following the enemy.&lt;br /&gt;
* &amp;quot;follow_incline&amp;quot; - The camera will also track the enemy vertically.&lt;br /&gt;
* &amp;quot;follow_incline_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, vertically.&lt;br /&gt;
* &amp;quot;follow_incline_speed&amp;quot; - Speed of vertical movements to track the enemy. Not affected by &#039;follow_speed_mult&#039;.&lt;br /&gt;
* &amp;quot;follow_constrain_up&amp;quot; - Limit how far the camera can turn upwards from its starting orientation.&lt;br /&gt;
* &amp;quot;follow_constrain_down&amp;quot; - Limit how far the camera can turn downwards from its starting orientation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Spotlight Spawnargs===&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;spotLight&amp;quot; is set to 1, the security camera&#039;s code will spawn a spotlight and align it with its view. This dates back to the Doom3 days, so it follows different rules from the def_attach systems. If &amp;quot;useColors&amp;quot; is enabled, the spotlight&#039;s color will change depending on alert state. Otherwise it will look for a &amp;quot;_color&amp;quot; spawnarg on the camera.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can specify an existing light with the spawnarg &amp;quot;spotlight_custom&amp;quot;. Apart from &amp;quot;spotLight&amp;quot; and &amp;quot;useColors&amp;quot;, all other spotlight-relevant spawnargs are ignored. If no valid entity of spawnclass idLight is found, it&#039;ll spawn a spotlight instead.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;spotLight&amp;quot; - If &amp;quot;1&amp;quot; the camera will use a spotlight.&lt;br /&gt;
* &amp;quot;spotlight_range&amp;quot; - Reach of the spotlight.&lt;br /&gt;
* &amp;quot;spotlight_diameter&amp;quot; - Diameter of the spotlight&#039;s projection. If 0, will automatically be calculated to match spotlight_range and scanFov, for scanFov up to 90°.&lt;br /&gt;
* &amp;quot;spotlight_texture&amp;quot; - Texture used by the spotlight. You should use a texture that&#039;s designed for projected lights: one that uses a gradient as its falloff image. This ensures that light intensity gradually fades to black, rather than abruptly cutting to black.&lt;br /&gt;
* &amp;quot;spotlight_volumetric&amp;quot; - The spawned spotlight will be volumetric.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Color Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;useColors&amp;quot; - If &amp;quot;1&amp;quot; the camera will change the colour of its model and spotlight depending on its alert state.&lt;br /&gt;
* &amp;quot;color_sweeping&amp;quot; - Color when the camera is sweeping = unalerted. Default green.&lt;br /&gt;
* &amp;quot;color_sighted&amp;quot; - Color when the camera has noticed an enemy = partially alerted. Default yellow.&lt;br /&gt;
* &amp;quot;color_alerted&amp;quot; - Color when the camera has sounded the alarm = fully alerted. Default red.&lt;br /&gt;
* &amp;quot;_color&amp;quot; - If &amp;quot;useColors&amp;quot; is disabled, the model and spotlight will always have this color.&lt;br /&gt;
&lt;br /&gt;
As an alternative or complement to color spawnargs, you may make use of shaderParm7 in materials used by the security camera. shaderParm7 represents the alert state of the camera:&lt;br /&gt;
* 0 = unalerted&lt;br /&gt;
* 1 = was partially alerted for &amp;quot;sightTime&amp;quot; seconds but the enemy has disappeared, now waiting &amp;quot;sightResume&amp;quot; seconds before resuming sweeping.&lt;br /&gt;
* 2 = partially alerted&lt;br /&gt;
* 3 = fully alerted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Damage Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;health&amp;quot; - amount of damage the camera can take before being destroyed. Setting to 0 will make the camera invincible. Setting to 0 will make the camera invincible. Default base damage per hit: sword - 42; broadhead - 35; fire arrow direct hit - 400.&lt;br /&gt;
* &amp;quot;damage_blackjack&amp;quot; - how much damage the security camera takes from blackjack hits, default: 0.&lt;br /&gt;
* &amp;quot;damage_mult_&amp;quot; - a series of spawnargs to multiply how much damage the security camera takes from various damage sources. You can name specific weapon classnames or damageDefs in the spawnarg, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;.&lt;br /&gt;
* &amp;quot;damage_splash_falloff&amp;quot; - how quickly splash damage from fire arrows exponentially decreases with distance, default: 3.&lt;br /&gt;
* &amp;quot;damage_flinderize&amp;quot; - if a security camera is destroyed and the destroying hit (or post-destruction hit) is greater than this value, the security camera explodes into pieces. Default: 90.&lt;br /&gt;
* &amp;quot;def_flinder1&amp;quot; - the classname of the flinder pieces generated when a camera is flinderized by a heavy hit. Use &amp;quot;def_flinder2&amp;quot; etc. to generate more flinders.&lt;br /&gt;
* &amp;quot;flinder_offset1&amp;quot; - specifies the spawn point of the respective flinder piece relative to the camera&#039;s origin. Takes the camera&#039;s current rotation into account.&lt;br /&gt;
* &amp;quot;broken&amp;quot; - the security camera switches to this model when destroyed&lt;br /&gt;
* &amp;quot;broken_flinderized&amp;quot; - Optional. Specify the model of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - the security camera switches to this skin when destroyed&lt;br /&gt;
* &amp;quot;skin_flinderized&amp;quot; - Optional. Specify the skin of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;hideModelOnBreak&amp;quot; - the security camera will be hidden when destroyed, default: 0.&lt;br /&gt;
* &amp;quot;notice_destroyed&amp;quot; - Whether AIs will become alerted if they find this security camera destroyed.&lt;br /&gt;
* &amp;quot;fx_damage&amp;quot; - Fx to play whenever the camera is damaged while power is on.&lt;br /&gt;
* &amp;quot;fx_damage_nopower&amp;quot; - Fx to play whenever the camera is damaged while power is off.&lt;br /&gt;
* &amp;quot;fx_destroyed&amp;quot; - Fx to play whenever the camera is destroyed while power is on.&lt;br /&gt;
* &amp;quot;fx_destroyed_nopower&amp;quot; - Fx to play whenever the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;break_up_script&amp;quot; - This script is called when the camera is destroyed.&lt;br /&gt;
* &amp;quot;break_up_target&amp;quot; - This entity is triggered if the camera is destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sound Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_sight&amp;quot; - Sound emitted when the camera notices an enemy.&lt;br /&gt;
* &amp;quot;snd_moving&amp;quot; - Sound emitted when the camera is rotating.&lt;br /&gt;
* &amp;quot;snd_stationary&amp;quot; - Sound emitted by a stationary type of camera.&lt;br /&gt;
* &amp;quot;snd_alert&amp;quot; - Alarm sound emitted when fully alerted.&lt;br /&gt;
* &amp;quot;snd_end&amp;quot; - Sound emitted when the camera is about to reach the end point of a sweep.&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound emitted when the camera is destroyed.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound emitted when the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the camera emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;sprS_alert&amp;quot; - How far snd_alert propagates to AIs, at default this is a few rooms. Higher settings than mild can cause large framedrops due to mass AI alerts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sparks Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera spawns a particle emitter when it&#039;s destroyed. By default it uses a single-cycle spark particle which is periodically triggered at random intervals. When power to the camera is switched off, the sparks stop appearing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;sparks&amp;quot; - Whether to spawn a particle emitter at all.&lt;br /&gt;
* &amp;quot;sparks_particle&amp;quot; - Particle that is spawned.&lt;br /&gt;
* &amp;quot;sparks_delay&amp;quot; - Time taken for the particle emitter to spawn initially.&lt;br /&gt;
* &amp;quot;sparks_power_dependent&amp;quot; - Only show the particle if power to the destroyed camera is on.&lt;br /&gt;
* &amp;quot;sparks_interval&amp;quot; - For non-looping particles, minimum time between triggers.&lt;br /&gt;
* &amp;quot;sparks_interval_rand&amp;quot; - For non-looping particles, additional random factor added to the time between triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Model Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs are important if you change the camera model:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;broken&amp;quot; - Use this model when the camera is destroyed.&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot; - A vector that defines the offset of the camera&#039;s &#039;eye&#039; from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot; - A vector that defines the spotlight offset from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;flipAxis&amp;quot; - This and the next spawnarg can be used to turn a model such that it faces forwards. Not needed if the model was created forward-facing.&lt;br /&gt;
* &amp;quot;modelAxis&amp;quot;&lt;br /&gt;
* &amp;quot;skin&amp;quot; - This is the &amp;quot;on&amp;quot; skin. It may contain materials that make use of the colored keyword or shaderParm7, to change depending on alert state.&lt;br /&gt;
* &amp;quot;skin_on_spotlight_off&amp;quot; - This is the &amp;quot;on&amp;quot; skin, but with the spotlight toggled off. This is useful if your model contains inbuilt lightrays that should represent the spotlight.&lt;br /&gt;
* &amp;quot;skin_off&amp;quot; - This is the &amp;quot;off&amp;quot; skin. It should not contain materials with the colored keyword or shaderParm7.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - When the camera is destroyed it will switch to this skin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;start_off&amp;quot; - Whether the camera starts powered on or off.&lt;br /&gt;
* &amp;quot;cameraTarget&amp;quot; - Use the view from this entity instead of from self if sending a view to the display screen. See section &#039;&#039;The Display Screen&#039;&#039; for more.&lt;br /&gt;
* &amp;quot;gearSpeed&amp;quot; - This spawnarg is set on the ceiling pivot of the 2nd type of security camera. It controls how fast the gears turn when the security camera turns.&lt;br /&gt;
* &amp;quot;legacy&amp;quot; - This marks an old version of the security camera, for backwards compatibility with older missions.&lt;br /&gt;
&lt;br /&gt;
The security camera uses spawnargs to place its &#039;eye&#039; and spotlight in front of the model to ensure the view and spotlight aren&#039;t blocked by the model. If you use a different model, you might need to change these.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot;&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Damaging the Camera==&lt;br /&gt;
&lt;br /&gt;
===Damage sources===&lt;br /&gt;
&lt;br /&gt;
By default the security camera is vulnerable only to fire arrows (direct &amp;amp; splash damage). The &amp;quot;damage_&amp;quot; and &amp;quot;damage_mult_&amp;quot; spawnargs allow you to to specify how much damage security cameras take from each weapon, but be sure to communicate the camera&#039;s vulnerabilities to the player. You can create your own &amp;quot;damage_mult_&amp;quot; spawnargs by adding the name of a specific weapon classname or damageDef, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;. Unfortunately it does not appear to be possible to make water damage the camera, since TDM will crash upon load when a water response is applied to the camera. &lt;br /&gt;
&lt;br /&gt;
Setting &amp;quot;health&amp;quot; to 0 will make the camera totally invicible. Alternatively, you can make the camera immune to everything but fire arrow splash damage by binding a tight-fitting nodrawsolid_metal brush. A similar approach is to bind a brush that leaves parts of the camera exposed, i.e. the lens or face. Note that it will weaken fire arrows considerably if they hit from the wrong angle. A direct hit does up to 400 damage, while the splash does a distance-dependent amount of damage below 100. Note that collision detection is done using the camera&#039;s clipmodel, which has a different shape than the visual model.&lt;br /&gt;
&lt;br /&gt;
The player will receive feedback that the camera took damage in the form of spark effects, specified in spawnargs beginning with fx_. An .fx definiton is basically an instruction to emit a sequence of particles and sounds.&lt;br /&gt;
&lt;br /&gt;
===Destroying the Camera===&lt;br /&gt;
&lt;br /&gt;
Security cameras can not only be destroyed, but also be flinderized (burst apart into pieces) which occurs when the security camera takes a hit whose damage is higher than the value of the &amp;quot;damage_flinderize&amp;quot; spawnarg. The &amp;quot;broken&amp;quot; and &amp;quot;skin_broken&amp;quot; spawnargs let you set the model and skin when the camera is destroyed, while the optional &amp;quot;broken_flinderized&amp;quot; and &amp;quot;skin_flinderized&amp;quot; let you set the model and skin when the camera has been flinderized. The &amp;quot;def_flinder&amp;quot; and &amp;quot;flinder_offset&amp;quot; spawnargs allow you to specify the flinder pieces and their spawn point relative to the camera&#039;s origin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
===Script Events===&lt;br /&gt;
&lt;br /&gt;
The security camera supports the following script events:&lt;br /&gt;
* getSecurityCameraState() - Returns the security camera&#039;s state. 1 = unalerted, 2 = partially alerted, 3 = fully alerted, 4 = inactive (power off), 5 = destroyed, 0 = not a security camera.&lt;br /&gt;
* getShaderParm(7) - Returns the current value of shaderParm7 on the camera model. 0 = unalerted, 1 = about to resume sweep after a partial alert, 2 = partially alerted, 3 = fully alerted.&lt;br /&gt;
* On() and Off() - Switch the camera&#039;s power on or off (note the capitalisation).&lt;br /&gt;
* activate() and trigger() - Toggle the camera&#039;s power.&lt;br /&gt;
* getHealth() and setHealth(float newHealth) - As per the name. Setting health to 0 or lower will destroy the security camera, which is irreversible. setHealth() will make an invincible camera vulnerable.&lt;br /&gt;
* getEnemy() - Returns the entity that most recently caused or refreshed the security camera&#039;s suspicious or alert state.&lt;br /&gt;
* canSee() - Tests whether the security camera is able to see a specific entity. Currently only player1 is supported.&lt;br /&gt;
* setSightThreshold() - This changes how lit up the player&#039;s lightgem has to be for the security camera to see him, from 0.0 to 1.0.&lt;br /&gt;
* state_light(boolean set) - Switch the camera&#039;s spotlight on/off, if the camera has one.&lt;br /&gt;
* state_sweep(boolean set) - Switch the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* state_see_player(boolean set) - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
* toggle_light() - Toggle the spotlight on/off, if the camera has one.&lt;br /&gt;
* toggle_sweep() - Toggle the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* toggle_see_player() - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Functions===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject contains the following object functions:&lt;br /&gt;
* toggleSCSpotlight() - calls toggle_light() on the camera if it has a spotlight (spawnarg &amp;quot;spotLight&amp;quot; = &amp;quot;1&amp;quot;)&lt;br /&gt;
* toggleSCSweep() - calls toggle_sweep() on the camera&lt;br /&gt;
* toggleSCPlayer() - calls toggle_see_player() on the camera&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, these object functions simply call the toggle script events on the camera they belong to. This allows you to call the script events from i.e. buttons without scripting. To set this up:&lt;br /&gt;
# create an atdm:target_callobjectfunction entity&lt;br /&gt;
# give it the spawnarg &amp;quot;call&amp;quot; with the name of the desired object function, i.e. &amp;quot;toggleSCSpotlight&amp;quot;&lt;br /&gt;
# let it target the security camera&lt;br /&gt;
# when desired, trigger this entity (from a script, from a button etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scriptobjects===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject only consists of the 3 object functions mentioned above. Beyond some added utility, this scriptobject has no importance for the security camera and you can easily give it your own scriptobject instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upon Destruction===&lt;br /&gt;
&lt;br /&gt;
You may call a script when the camera is destroyed, as per the spawnarg &amp;quot;break_up_script&amp;quot;. This script should be able to receive the name of the destroyed security camera as input, i.e.:&lt;br /&gt;
 void camera_destroyed ( entity camera )&lt;br /&gt;
&lt;br /&gt;
An alternative is to use the spawnarg &amp;quot;break_up_target&amp;quot; to name an entity that calls the script when triggered, but this will not pass the name of the destroyed security camera unless you use an atdm:target_callscriptfunction entity with the spawnarg &amp;quot;forEach&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sending the camera&#039;s view to a Display Screen==&lt;br /&gt;
&lt;br /&gt;
You can create a display screen that shows that the camera sees: all that&#039;s needed is a func_static patch that uses a texture like &#039;&#039;textures/common/camera/camera1&#039;&#039;. It&#039;s recommended to put another patch behind it, since this func_static will get hidden if it&#039;s switched off. The screen then needs to be given a spawnarg &amp;quot;cameraTarget&amp;quot; that names either a security camera or a different entity, typically a target_null. The screen will display what that entity sees.&lt;br /&gt;
&lt;br /&gt;
To change the screen&#039;s field of view, apply the spawnargs &amp;quot;cameraFovX&amp;quot; and &amp;quot;cameraFovY&amp;quot; to the entity sending the view. Otherwise it will default to &amp;quot;scanFov&amp;quot; for security cameras or 120 for other entities.&lt;br /&gt;
&lt;br /&gt;
The screen is hidden or shown automatically if the screen is displaying a security camera&#039;s view. The screen can also be switched on/off manually by triggering it, but this requires the screen to start with the spawnarg &amp;quot;hide&amp;quot; &amp;quot;0&amp;quot; or &amp;quot;hide&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Multiple Display Screens / Reflective Water / Skybox===&lt;br /&gt;
&lt;br /&gt;
If you plan to have multiple security cameras sending to multiple display screens in your mission, or if the camera display will appear in the same player POV as the sky or reflective water surfaces, you&#039;ll need to use unique camera materials for each screen. You can find 9 additional camera materials in the textures/common/camera/ folder. If you should need even more, you can simply clone one of the materials and change the name after the &#039;&#039;map&#039;&#039; keyword.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examining a Test Map==&lt;br /&gt;
&lt;br /&gt;
You can obtain a test map with sample cameras in it here: [https://ftp.thedarkmod.com/tutorials/RemoteCamera/camerawiki2.pk4 camerawiki2.pk4]. Similar setups can be found as prefabs in AI/Machines.&lt;br /&gt;
&lt;br /&gt;
Open the map &#039;&#039;camerawiki.map&#039;&#039; in Dark Radiant. In this map, we have examples of the different cameras.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw1.jpg|256px|thumb|right|cam1]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A rotating camera that sweeps back and forth&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This camera (&#039;&#039;cam1&#039;&#039;) starts its rotation at 135 degrees (assuming +X is 0 degrees), and sweeps clockwise until it reaches 45 degrees. It pauses for a moment, then return-sweeps back to 135 degrees. It has a spotlight.&lt;br /&gt;
&lt;br /&gt;
The display for &#039;&#039;cam1&#039;&#039; is on the wall behind it. (Don&#039;t worry about the material being displayed backward in the screenshot.)&lt;br /&gt;
&lt;br /&gt;
The display patch uses the material &#039;&#039;camera1&#039;&#039; (provided in the camerawiki/materials/tdm_camera.mtr file).&lt;br /&gt;
&lt;br /&gt;
The four buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam1&#039;&#039; directly. When power is off, the display screen is hidden. You can simulate an &amp;quot;off&amp;quot; screen by making sure there&#039;s a black material behind the display. You could also place a glass material behind the display.&lt;br /&gt;
* Toggle Spotlight - calls the &#039;&#039;toggleSCSpotlight()&#039;&#039; object function in the camera&#039;s scriptobject, turning the spotlight on/off&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning Player detection on/off&lt;br /&gt;
* Toggle Sweep - calls the &#039;&#039;toggleSCSweep()&#039;&#039; object function in the camera&#039;s scriptobject, turning camera sweep on/off&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw2.jpg|256px|thumb|right|cam1&#039;s display]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&#039;&#039;&#039;A stationary camera that doesn&#039;t move&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw3.jpg|320px|thumb|right|cam2 and its display]]&lt;br /&gt;
This camera (&#039;&#039;cam2&#039;&#039;)  is stationary, w/o a spotlight.&lt;br /&gt;
&lt;br /&gt;
Its display, to its left, uses the material &#039;&#039;camera2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The two buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam2&#039;&#039; directly. When power is off, the display screen is hidden.&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning player detection on/off&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A screen showing the view from another entity (a target_null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw6.jpg|320px|thumb|right|a small screen showing what a target_null is seeing]]&lt;br /&gt;
&lt;br /&gt;
This is simply a screen referencing a &#039;&#039;target_null&#039;&#039; as its &#039;&#039;cameraTarget&#039;&#039;. The &#039;&#039;target_null&#039;&#039; is in a separate room pointed at a guard.&lt;br /&gt;
&lt;br /&gt;
If you look in the room where the guard is standing, you&#039;ll see that the &#039;&#039;target_null&#039;&#039; has the spawnargs &#039;&#039;cameraFovX&#039;&#039; and &#039;&#039;cameraFovY&#039;&#039;. These were set because the default field of view for a view from a non-camera entity is 120 by 120, which looks quite zoomed out. For a small screen like this one, 60 by 60 is much better.&lt;br /&gt;
&lt;br /&gt;
Also notice that the screen itself has the spawnarg &#039;&#039;hide&#039;&#039; &#039;&#039;0&#039;&#039;. This makes it respond to triggers by hiding or showing itself, allowing you to switch it on or off at the push of a button (see below).&lt;br /&gt;
&lt;br /&gt;
The button below the display does the following:&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets the screen directly to show or hide it. This only works because the screen has a &#039;&#039;hide&#039;&#039; spawnarg.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=29671</id>
		<title>Security Camera (2.10+)</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Security_Camera_(2.10%2B)&amp;diff=29671"/>
		<updated>2022-07-16T13:39:01Z</updated>

		<summary type="html">&lt;p&gt;Dragofer: Update with new script events.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Security Camera==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;This article documents the security camera as it will be from 2.10 onwards. See [[Security Camera]] if you&#039;re currently working with TDM 2.09 or older versions.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The security camera provides the following features:&lt;br /&gt;
&lt;br /&gt;
* It can either sweep back and forth between two angles or remain stationary.&lt;br /&gt;
* If the camera sees the player or an AI on a hostile AI, it initially plays a short alert sound that is silent to nearby guards. If the enemy is still in view several seconds later, an alarm sounds. This alarm will play intermittently for a while, even if the enemy moves out of sight.&lt;br /&gt;
* The camera is able to track its enemy, making it much harder to escape its view.&lt;br /&gt;
* An optional spotlight that points forward, lighting the area in the direction the camera faces. You can instead let the camera use a light you created.&lt;br /&gt;
* The ability to toggle the camera power on/off by triggering it. Alternatively, the above described subsystems can be toggled individually.&lt;br /&gt;
* If the camera has targets, these will be activated when the camera is fully alerted. This gives the map author the ability to play a more powerful alarm than the one given off by the camera (or to do a variety of other things.)&lt;br /&gt;
* The camera will sound an alarm if it detects bodies.&lt;br /&gt;
* Sending what it sees to a separate, func_static display screen. Alternatively, it can send what another entity (typically a target_null) sees.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The Security Camera: Entities and Prefabs==&lt;br /&gt;
&lt;br /&gt;
Security camera entities can be found in &#039;&#039;AI/Machines/Security Camera&#039;&#039; and inherit from &#039;&#039;func_securitycamera&#039;&#039;. Prefabs can be found in &#039;&#039;AI/Machines&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Place the camera entity in your map, and orient it toward its starting direction. A rotating camera will sweep clockwise, halt a moment, then sweep back counter-clockwise.&lt;br /&gt;
&lt;br /&gt;
Some cameras may be designed to use additional parts, i.e. a ceiling pivot entity with scripted gears. See the entity descriptions inside DR for more.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Spawnargs==&lt;br /&gt;
&lt;br /&gt;
===Movement Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;rotate&amp;quot; - If &amp;quot;1&amp;quot; (default) the camera will rotate. If &amp;quot;0&amp;quot;, the camera is stationary.&lt;br /&gt;
* &amp;quot;sweepSpeed&amp;quot; - Horizontal rotation speed in degrees per second.&lt;br /&gt;
* &amp;quot;sweepAngle&amp;quot; - The number of degrees the camera covers during its sweep. You can cause a camera to initially sweep in the counter-clockwise direction by setting this to a negative number.&lt;br /&gt;
* &amp;quot;sweepWait&amp;quot; - How long the pause is after a sweep completes and starting the return sweep. Default is 0.5 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Detection Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs govern how the security camera detects and reacts to the player: up to what distance, at what light intensity, how long the alarm lasts, whether to trigger anything and so on.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;scanDist&amp;quot; - The distance limit for spotting the enemy.&lt;br /&gt;
* &amp;quot;scanFov&amp;quot; - The camera&#039;s field of view.&lt;br /&gt;
* &amp;quot;seePlayer&amp;quot; - Whether the camera will react to the player.&lt;br /&gt;
* &amp;quot;seeAI&amp;quot; - Whether the camera will react to AIs.&lt;br /&gt;
* &amp;quot;seeBodies&amp;quot; - Whether the camera will react to bodies.&lt;br /&gt;
* &amp;quot;seeAnimals&amp;quot; - Whether the camera will react to animals.&lt;br /&gt;
* &amp;quot;sight_threshold&amp;quot; - From 0.0 to 1.0, how lit up the lightgem has to be for the player to be detected.&lt;br /&gt;
* &amp;quot;sightTime&amp;quot; - After seeing the enemy (partial alert), the camera will wait this amount of time. If it still sees the enemy, it will sound the alarm. This gives the enemy some time to hide.&lt;br /&gt;
* &amp;quot;sightResume&amp;quot; - If the camera can&#039;t see the enemy anymore after a partial alert, pause for this amount of time. When this expires, the camera will resume sweeping.&lt;br /&gt;
* &amp;quot;alarm_duration&amp;quot; - Minimum duration of the fully alert state. Will be extended by half if the enemy is still in view at the end or was recently seen.&lt;br /&gt;
* &amp;quot;alarm_interval&amp;quot; - Amount of time inbetween each activation of the alarm sound, when fully alerted.&lt;br /&gt;
* &amp;quot;trigger_alarm_start&amp;quot; - Trigger targets when an alarm begins.&lt;br /&gt;
* &amp;quot;trigger_alarm_end&amp;quot; - Trigger targets when an alarm ends.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Follow Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera can track the enemy&#039;s movements. For as long as the security camera is partially or fully alerted, it will turn to the closest enemy it can see. The models for the camera and mount should be able to support this without clipping into each other. A ceiling-mounted camera will generally have much more freedom to turn than a wall-mounted camera.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;follow&amp;quot; - Enable to let the camera track the enemy horizontally.&lt;br /&gt;
* &amp;quot;follow_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, horizontally.&lt;br /&gt;
* &amp;quot;follow_speed_mult&amp;quot; - Speed up horizontal movements by this multiplier when the camera is following the enemy.&lt;br /&gt;
* &amp;quot;follow_incline&amp;quot; - The camera will also track the enemy vertically.&lt;br /&gt;
* &amp;quot;follow_incline_tolerance&amp;quot; - How far in degrees the enemy has to move before the camera readjusts its rotation, vertically.&lt;br /&gt;
* &amp;quot;follow_incline_speed&amp;quot; - Speed of vertical movements to track the enemy. Not affected by &#039;follow_speed_mult&#039;.&lt;br /&gt;
* &amp;quot;follow_incline_max_up&amp;quot; - Limit how far the camera can turn upwards from its starting orientation.&lt;br /&gt;
* &amp;quot;follow_incline_max_down&amp;quot; - Limit how far the camera can turn downwards from its starting orientation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Spotlight Spawnargs===&lt;br /&gt;
&lt;br /&gt;
If &amp;quot;spotLight&amp;quot; is set to 1, the security camera&#039;s code will spawn a spotlight and align it with its view. This dates back to the Doom3 days, so it follows different rules from the def_attach systems. If &amp;quot;useColors&amp;quot; is enabled, the spotlight&#039;s color will change depending on alert state. Otherwise it will look for a &amp;quot;_color&amp;quot; spawnarg on the camera.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can specify an existing light with the spawnarg &amp;quot;spotlight_custom&amp;quot;. Apart from &amp;quot;spotLight&amp;quot; and &amp;quot;useColors&amp;quot;, all other spotlight-relevant spawnargs are ignored. If no valid entity of spawnclass idLight is found, it&#039;ll spawn a spotlight instead.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;spotLight&amp;quot; - If &amp;quot;1&amp;quot; the camera will use a spotlight.&lt;br /&gt;
* &amp;quot;spotlight_range&amp;quot; - Reach of the spotlight.&lt;br /&gt;
* &amp;quot;spotlight_diameter&amp;quot; - Diameter of the spotlight&#039;s projection. If 0, will automatically be calculated to match spotlight_range and scanFov, for scanFov up to 90°.&lt;br /&gt;
* &amp;quot;spotlight_texture&amp;quot; - Texture used by the spotlight. You should use a texture that&#039;s designed for projected lights: one that uses a gradient as its falloff image. This ensures that light intensity gradually fades to black, rather than abruptly cutting to black.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Color Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;useColors&amp;quot; - If &amp;quot;1&amp;quot; the camera will change the colour of its model and spotlight depending on its alert state.&lt;br /&gt;
* &amp;quot;color_sweeping&amp;quot; - Color when the camera is sweeping = unalerted. Default green.&lt;br /&gt;
* &amp;quot;color_sighted&amp;quot; - Color when the camera has noticed an enemy = partially alerted. Default yellow.&lt;br /&gt;
* &amp;quot;color_alerted&amp;quot; - Color when the camera has sounded the alarm = fully alerted. Default red.&lt;br /&gt;
* &amp;quot;_color&amp;quot; - If &amp;quot;useColors&amp;quot; is disabled, the model and spotlight will always have this color.&lt;br /&gt;
&lt;br /&gt;
As an alternative or complement to color spawnargs, you may make use of shaderParm7 in materials used by the security camera. shaderParm7 represents the alert state of the camera:&lt;br /&gt;
* 0 = unalerted&lt;br /&gt;
* 1 = was partially alerted for &amp;quot;sightTime&amp;quot; seconds but the enemy has disappeared, now waiting &amp;quot;sightResume&amp;quot; seconds before resuming sweeping.&lt;br /&gt;
* 2 = partially alerted&lt;br /&gt;
* 3 = fully alerted&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Damage Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;health&amp;quot; - amount of damage the camera can take before being destroyed. Setting to 0 will make the camera invincible. Setting to 0 will make the camera invincible. Default base damage per hit: sword - 42; broadhead - 35; fire arrow direct hit - 400.&lt;br /&gt;
* &amp;quot;damage_blackjack&amp;quot; - how much damage the security camera takes from blackjack hits, default: 0.&lt;br /&gt;
* &amp;quot;damage_mult_&amp;quot; - a series of spawnargs to multiply how much damage the security camera takes from various damage sources. You can name specific weapon classnames or damageDefs in the spawnarg, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;.&lt;br /&gt;
* &amp;quot;damage_splash_falloff&amp;quot; - how quickly splash damage from fire arrows exponentially decreases with distance, default: 3.&lt;br /&gt;
* &amp;quot;damage_flinderize&amp;quot; - if a security camera is destroyed and the destroying hit (or post-destruction hit) is greater than this value, the security camera explodes into pieces. Default: 90.&lt;br /&gt;
* &amp;quot;def_flinder1&amp;quot; - the classname of the flinder pieces generated when a camera is flinderized by a heavy hit. Use &amp;quot;def_flinder2&amp;quot; etc. to generate more flinders.&lt;br /&gt;
* &amp;quot;flinder_offset1&amp;quot; - specifies the spawn point of the respective flinder piece relative to the camera&#039;s origin. Takes the camera&#039;s current rotation into account.&lt;br /&gt;
* &amp;quot;broken&amp;quot; - the security camera switches to this model when destroyed&lt;br /&gt;
* &amp;quot;broken_flinderized&amp;quot; - Optional. Specify the model of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - the security camera switches to this skin when destroyed&lt;br /&gt;
* &amp;quot;skin_flinderized&amp;quot; - Optional. Specify the skin of the security camera when destroyed + flinderized.&lt;br /&gt;
* &amp;quot;hideModelOnBreak&amp;quot; - the security camera will be hidden when destroyed, default: 0.&lt;br /&gt;
* &amp;quot;notice_destroyed&amp;quot; - Whether AIs will become alerted if they find this security camera destroyed.&lt;br /&gt;
* &amp;quot;fx_damage&amp;quot; - Fx to play whenever the camera is damaged while power is on.&lt;br /&gt;
* &amp;quot;fx_damage_nopower&amp;quot; - Fx to play whenever the camera is damaged while power is off.&lt;br /&gt;
* &amp;quot;fx_destroyed&amp;quot; - Fx to play whenever the camera is destroyed while power is on.&lt;br /&gt;
* &amp;quot;fx_destroyed_nopower&amp;quot; - Fx to play whenever the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;break_up_script&amp;quot; - This script is called when the camera is destroyed.&lt;br /&gt;
* &amp;quot;break_up_target&amp;quot; - This entity is triggered if the camera is destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sound Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;snd_sight&amp;quot; - Sound emitted when the camera notices an enemy.&lt;br /&gt;
* &amp;quot;snd_moving&amp;quot; - Sound emitted when the camera is rotating.&lt;br /&gt;
* &amp;quot;snd_stationary&amp;quot; - Sound emitted by a stationary type of camera.&lt;br /&gt;
* &amp;quot;snd_alert&amp;quot; - Alarm sound emitted when fully alerted.&lt;br /&gt;
* &amp;quot;snd_end&amp;quot; - Sound emitted when the camera is about to reach the end point of a sweep.&lt;br /&gt;
* &amp;quot;snd_death&amp;quot; - Sound emitted when the camera is destroyed.&lt;br /&gt;
* &amp;quot;snd_death_nopower&amp;quot; - Sound emitted when the camera is destroyed while power is off.&lt;br /&gt;
* &amp;quot;snd_sparks&amp;quot; - Sound emitted when the camera emits sparks after it was destroyed.&lt;br /&gt;
* &amp;quot;sprS_alert&amp;quot; - How far snd_alert propagates to AIs, at default this is a few rooms. Higher settings than mild can cause large framedrops due to mass AI alerts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sparks Spawnargs===&lt;br /&gt;
&lt;br /&gt;
The security camera spawns a particle emitter when it&#039;s destroyed. By default it uses a single-cycle spark particle which is periodically triggered at random intervals. When power to the camera is switched off, the sparks stop appearing.&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;sparks&amp;quot; - Whether to spawn a particle emitter at all.&lt;br /&gt;
* &amp;quot;sparks_particle&amp;quot; - Particle that is spawned.&lt;br /&gt;
* &amp;quot;sparks_delay&amp;quot; - Time taken for the particle emitter to spawn initially.&lt;br /&gt;
* &amp;quot;sparks_power_dependent&amp;quot; - Only show the particle if power to the (dead) camera is on.&lt;br /&gt;
* &amp;quot;sparks_periodic&amp;quot; - Set to &#039;0&#039; if you use a looping particle and sound. For single-cycle particles and sounds, set to &#039;1&#039; so that they are regularly triggered.&lt;br /&gt;
* &amp;quot;sparks_interval&amp;quot; - For non-looping particles, minimum time between triggers.&lt;br /&gt;
* &amp;quot;sparks_interval_rand&amp;quot; - For non-looping particles, additional random factor added to the time between triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Model Spawnargs===&lt;br /&gt;
&lt;br /&gt;
These spawnargs are important if you change the camera model:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;broken&amp;quot; - Use this model when the camera is destroyed.&lt;br /&gt;
* &amp;quot;clipmodel&amp;quot; - Assign a simplified collision mesh to this camera. Should be under 32 tris (as of TDM 2.10), have only convex angles and use textures/common/collision.&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot; - A vector that defines the offset of the camera&#039;s &#039;eye&#039; from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot; - A vector that defines the spotlight offset from the camera&#039;s origin.&lt;br /&gt;
* &amp;quot;flipAxis&amp;quot; - This and the next spawnarg can be used to turn a model such that it faces forwards. Not needed if the model was created forward-facing.&lt;br /&gt;
* &amp;quot;modelAxis&amp;quot;&lt;br /&gt;
* &amp;quot;skin&amp;quot; - This is the &amp;quot;on&amp;quot; skin. It may contain materials that make use of the colored keyword or shaderParm7, to change depending on alert state.&lt;br /&gt;
* &amp;quot;skin_on_spotlight_off&amp;quot; - This is the &amp;quot;on&amp;quot; skin, but with the spotlight toggled off. This is useful if your model contains inbuilt lightrays that should represent the spotlight.&lt;br /&gt;
* &amp;quot;skin_off&amp;quot; - This is the &amp;quot;off&amp;quot; skin. It should not contain materials with the colored keyword or shaderParm7.&lt;br /&gt;
* &amp;quot;skin_broken&amp;quot; - When the camera is destroyed it will switch to this skin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc Spawnargs===&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;start_off&amp;quot; - Whether the camera starts powered on or off.&lt;br /&gt;
* &amp;quot;cameraTarget&amp;quot; - Use the view from this entity instead of from self if sending a view to the display screen. See section &#039;&#039;The Display Screen&#039;&#039; for more.&lt;br /&gt;
* &amp;quot;gearSpeed&amp;quot; - This spawnarg is set on the ceiling pivot of the 2nd type of security camera. It controls how fast the gears turn when the security camera turns.&lt;br /&gt;
&lt;br /&gt;
The security camera uses spawnargs to place its &#039;eye&#039; and spotlight in front of the model to ensure the view and spotlight aren&#039;t blocked by the model. If you use a different model, you might need to change these.&lt;br /&gt;
* &amp;quot;lightOffset&amp;quot;&lt;br /&gt;
* &amp;quot;viewOffset&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Damaging the Camera==&lt;br /&gt;
&lt;br /&gt;
===Damage sources===&lt;br /&gt;
&lt;br /&gt;
By default the security camera is vulnerable only to fire arrows (direct &amp;amp; splash damage). The &amp;quot;damage_&amp;quot; and &amp;quot;damage_mult_&amp;quot; spawnargs allow you to to specify how much damage security cameras take from each weapon, but be sure to communicate the camera&#039;s vulnerabilities to the player. You can create your own &amp;quot;damage_mult_&amp;quot; spawnargs by adding the name of a specific weapon classname or damageDef, i.e. &amp;quot;damage_mult_atdm:weapon_shortsword&amp;quot; &amp;quot;0.5&amp;quot;. Unfortunately it does not appear to be possible to make water damage the camera, since TDM will crash upon load when a water response is applied to the camera. &lt;br /&gt;
&lt;br /&gt;
Setting &amp;quot;health&amp;quot; to 0 will make the camera totally invicible. Alternatively, you can make the camera immune to everything but fire arrow splash damage by binding a tight-fitting nodrawsolid_metal brush. A similar approach is to bind a brush that leaves parts of the camera exposed, i.e. the lens or face. Note that it will weaken fire arrows considerably if they hit from the wrong angle. A direct hit does up to 400 damage, while the splash does a distance-dependent amount of damage below 100. Note that collision detection is done using the camera&#039;s clipmodel, which has a different shape than the visual model.&lt;br /&gt;
&lt;br /&gt;
The player will receive feedback that the camera took damage in the form of spark effects, specified in spawnargs beginning with fx_. An .fx definiton is basically an instruction to emit a sequence of particles and sounds.&lt;br /&gt;
&lt;br /&gt;
===Destroying the Camera===&lt;br /&gt;
&lt;br /&gt;
Security cameras can not only be destroyed, but also be flinderized (burst apart into pieces) which occurs when the security camera takes a hit whose damage is higher than the value of the &amp;quot;damage_flinderize&amp;quot; spawnarg. The &amp;quot;broken&amp;quot; and &amp;quot;skin_broken&amp;quot; spawnargs let you set the model and skin when the camera is destroyed, while the optional &amp;quot;broken_flinderized&amp;quot; and &amp;quot;skin_flinderized&amp;quot; let you set the model and skin when the camera has been flinderized. The &amp;quot;def_flinder&amp;quot; and &amp;quot;flinder_offset&amp;quot; spawnargs allow you to specify the flinder pieces and their spawn point relative to the camera&#039;s origin.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Scripting==&lt;br /&gt;
&lt;br /&gt;
===Script Events===&lt;br /&gt;
&lt;br /&gt;
The security camera supports the following script events:&lt;br /&gt;
* getSecurityCameraState() - Returns the security camera&#039;s state. 1 = unalerted, 2 = partially alerted, 3 = fully alerted, 4 = inactive (power off), 5 = destroyed, 0 = not a security camera.&lt;br /&gt;
* getShaderParm(7) - Returns the current value of shaderParm7 on the camera model. 0 = unalerted, 1 = about to resume sweep after a partial alert, 2 = partially alerted, 3 = fully alerted.&lt;br /&gt;
* On() and Off() - Switch the camera&#039;s power on or off (note the capitalisation).&lt;br /&gt;
* activate() and trigger() - Toggle the camera&#039;s power.&lt;br /&gt;
* getHealth() and setHealth(float newHealth) - As per the name. Setting health to 0 or lower will destroy the security camera, which is irreversible. setHealth() will make an invincible camera vulnerable.&lt;br /&gt;
* setSightThreshold() - This changes how lit up the player&#039;s lightgem has to be for the security camera to see him, from 0.0 to 1.0.&lt;br /&gt;
* state_light(boolean set) - Switch the camera&#039;s spotlight on/off, if the camera has one.&lt;br /&gt;
* state_sweep(boolean set) - Switch the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* state_see_player(boolean set) - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
* toggle_light() - Toggle the spotlight on/off, if the camera has one.&lt;br /&gt;
* toggle_sweep() - Toggle the camera&#039;s sweep on/off. This will also affect enemy tracking.&lt;br /&gt;
* toggle_see_player() - Toggle whether the camera is able to detect the player. An alternative is just to set &amp;quot;seePlayer&amp;quot; to &amp;quot;1&amp;quot; or &amp;quot;0&amp;quot;, since the code monitors this spawnarg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Object Functions===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject contains the following object functions:&lt;br /&gt;
* toggleSCSpotlight() - calls toggle_light() on the camera if it has a spotlight (spawnarg &amp;quot;spotLight&amp;quot; = &amp;quot;1&amp;quot;)&lt;br /&gt;
* toggleSCSweep() - calls toggle_sweep() on the camera&lt;br /&gt;
* toggleSCPlayer() - calls toggle_see_player() on the camera&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, these object functions simply call the toggle script events on the camera they belong to. This allows you to call the script events from i.e. buttons without scripting. To set this up:&lt;br /&gt;
# create an atdm:target_callobjectfunction entity&lt;br /&gt;
# give it the spawnarg &amp;quot;call&amp;quot; with the name of the desired object function, i.e. &amp;quot;toggleSCSpotlight&amp;quot;&lt;br /&gt;
# let it target the security camera&lt;br /&gt;
# when desired, trigger this entity (from a script, from a button etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Scriptobjects===&lt;br /&gt;
&lt;br /&gt;
The security camera&#039;s scriptobject only consists of the 3 object functions mentioned above. Beyond some added utility, this scriptobject has no importance for the security camera and you can easily give it your own scriptobject instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Upon Destruction===&lt;br /&gt;
&lt;br /&gt;
You may call a script when the camera is destroyed, as per the spawnarg &amp;quot;break_up_script&amp;quot;. This script should be able to receive the name of the destroyed security camera as input, i.e.:&lt;br /&gt;
 void camera_destroyed ( entity camera )&lt;br /&gt;
&lt;br /&gt;
An alternative is to use the spawnarg &amp;quot;break_up_target&amp;quot; to name an entity that calls the script when triggered, but this will not pass the name of the destroyed security camera unless you use an atdm:target_callscriptfunction entity with the spawnarg &amp;quot;forEach&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sending the camera&#039;s view to a Display Screen==&lt;br /&gt;
&lt;br /&gt;
You can create a display screen that shows that the camera sees: all that&#039;s needed is a func_static patch that uses a texture like &#039;&#039;textures/common/camera/camera1&#039;&#039;. It&#039;s recommended to put another patch behind it, since this func_static will get hidden if it&#039;s switched off. The screen then needs to be given a spawnarg &amp;quot;cameraTarget&amp;quot; that names either a security camera or a different entity, typically a target_null. The screen will display what that entity sees.&lt;br /&gt;
&lt;br /&gt;
To change the screen&#039;s field of view, apply the spawnargs &amp;quot;cameraFovX&amp;quot; and &amp;quot;cameraFovY&amp;quot; to the entity sending the view. Otherwise it will default to &amp;quot;scanFov&amp;quot; for security cameras or 120 for other entities.&lt;br /&gt;
&lt;br /&gt;
The screen is hidden or shown automatically if the screen is displaying a security camera&#039;s view. The screen can also be switched on/off manually by triggering it, but this requires the screen to start with the spawnarg &amp;quot;hide&amp;quot; &amp;quot;0&amp;quot; or &amp;quot;hide&amp;quot; &amp;quot;1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Multiple Display Screens / Reflective Water / Skybox===&lt;br /&gt;
&lt;br /&gt;
If you plan to have multiple security cameras sending to multiple display screens in your mission, or if the camera display will appear in the same player POV as the sky or reflective water surfaces, you&#039;ll need to use unique camera materials for each screen. You can find 9 additional camera materials in the textures/common/camera/ folder. If you should need even more, you can simply clone one of the materials and change the name after the &#039;&#039;map&#039;&#039; keyword.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examining a Test Map==&lt;br /&gt;
&lt;br /&gt;
You can obtain a test map with sample cameras in it here: [https://ftp.thedarkmod.com/tutorials/RemoteCamera/camerawiki2.pk4 camerawiki2.pk4]. Similar setups can be found as prefabs in AI/Machines.&lt;br /&gt;
&lt;br /&gt;
Open the map &#039;&#039;camerawiki.map&#039;&#039; in Dark Radiant. In this map, we have examples of the different cameras.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw1.jpg|256px|thumb|right|cam1]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A rotating camera that sweeps back and forth&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This camera (&#039;&#039;cam1&#039;&#039;) starts its rotation at 135 degrees (assuming +X is 0 degrees), and sweeps clockwise until it reaches 45 degrees. It pauses for a moment, then return-sweeps back to 135 degrees. It has a spotlight.&lt;br /&gt;
&lt;br /&gt;
The display for &#039;&#039;cam1&#039;&#039; is on the wall behind it. (Don&#039;t worry about the material being displayed backward in the screenshot.)&lt;br /&gt;
&lt;br /&gt;
The display patch uses the material &#039;&#039;camera1&#039;&#039; (provided in the camerawiki/materials/tdm_camera.mtr file).&lt;br /&gt;
&lt;br /&gt;
The four buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam1&#039;&#039; directly. When power is off, the display screen is hidden. You can simulate an &amp;quot;off&amp;quot; screen by making sure there&#039;s a black material behind the display. You could also place a glass material behind the display.&lt;br /&gt;
* Toggle Spotlight - calls the &#039;&#039;toggleSCSpotlight()&#039;&#039; object function in the camera&#039;s scriptobject, turning the spotlight on/off&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning Player detection on/off&lt;br /&gt;
* Toggle Sweep - calls the &#039;&#039;toggleSCSweep()&#039;&#039; object function in the camera&#039;s scriptobject, turning camera sweep on/off&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw2.jpg|256px|thumb|right|cam1&#039;s display]]&lt;br /&gt;
{{clear}}&lt;br /&gt;
&#039;&#039;&#039;A stationary camera that doesn&#039;t move&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw3.jpg|320px|thumb|right|cam2 and its display]]&lt;br /&gt;
This camera (&#039;&#039;cam2&#039;&#039;)  is stationary, w/o a spotlight.&lt;br /&gt;
&lt;br /&gt;
Its display, to its left, uses the material &#039;&#039;camera2&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The two buttons below the display do the following (from left to right):&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets &#039;&#039;cam2&#039;&#039; directly. When power is off, the display screen is hidden.&lt;br /&gt;
* Toggle Player Sighting - calls the &#039;&#039;toggleSCPlayer()&#039;&#039; object function in the camera&#039;s scriptobject, turning player detection on/off&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A screen showing the view from another entity (a target_null)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cw6.jpg|320px|thumb|right|a small screen showing what a target_null is seeing]]&lt;br /&gt;
&lt;br /&gt;
This is simply a screen referencing a &#039;&#039;target_null&#039;&#039; as its &#039;&#039;cameraTarget&#039;&#039;. The &#039;&#039;target_null&#039;&#039; is in a separate room pointed at a guard.&lt;br /&gt;
&lt;br /&gt;
If you look in the room where the guard is standing, you&#039;ll see that the &#039;&#039;target_null&#039;&#039; has the spawnargs &#039;&#039;cameraFovX&#039;&#039; and &#039;&#039;cameraFovY&#039;&#039;. These were set because the default field of view for a view from a non-camera entity is 120 by 120, which looks quite zoomed out. For a small screen like this one, 60 by 60 is much better.&lt;br /&gt;
&lt;br /&gt;
Also notice that the screen itself has the spawnarg &#039;&#039;hide&#039;&#039; &#039;&#039;0&#039;&#039;. This makes it respond to triggers by hiding or showing itself, allowing you to switch it on or off at the push of a button (see below).&lt;br /&gt;
&lt;br /&gt;
The button below the display does the following:&lt;br /&gt;
&lt;br /&gt;
* Toggle Power - targets the screen directly to show or hide it. This only works because the screen has a &#039;&#039;hide&#039;&#039; spawnarg.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Dragofer</name></author>
	</entry>
</feed>