<?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=Sotha</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=Sotha"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Special:Contributions/Sotha"/>
	<updated>2026-04-30T08:20:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Inventory&amp;diff=18873</id>
		<title>Inventory</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Inventory&amp;diff=18873"/>
		<updated>2016-11-21T18:28:49Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes how to set up inventory items and how they can be given to an entity. An entity&#039;s inventory can be seen as some sort of &amp;quot;container&amp;quot; for various items. Inventory items are distinguished by their category, such as &#039;&#039;Tools&#039;&#039;, &#039;&#039;Maps&#039;&#039;, &#039;&#039;Potions&#039;&#039; and &#039;&#039;Weapons&#039;&#039; (yes, a weapon is also a special kind of inventory item). All entities can have an inventory, even though it may only make sense for AI and the player to actually have one. Also included is a script interface, so that a mapper can interact with the inventory in a more sophisticated way, if the default behaviour is not sufficient.&lt;br /&gt;
&lt;br /&gt;
== Definitions ==&lt;br /&gt;
&lt;br /&gt;
The spawnargs can be either set in the def file as a default, or in the map file to override settings for specific entities. Naturaly this also means that they can be manipulated by scripts as well.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT!&#039;&#039;&#039; Normally items will vanish from the map as soon as the item is successfully put into the inventory. If this doesn&#039;t work, then the item will stay visible. This is a intentionally so, to make the mapper aware of the problem. Check the console and/or enable the inventory logclass in the darkmod.log file to see what went wrong.&lt;br /&gt;
&lt;br /&gt;
There are several terms and types of items that can be used in the inventory:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Anonymous items&#039;&#039;&#039;  An anonymous object means that it will not show up as an item in the inventory. Examples are gold coins and all the other (mostly loot) items that are collected but not being used individually. In this case they only count for the total of loot and are discarded afterwards. Anonymous items also can not be dropped after they are placed into the inventory because they essentially no longer exist. For the loot count it obviously doesn&#039;t matter wether an item is anonymous or not, as all are added up into the loot categories. The same holds for ammonition (arrows). These get added to the weapon&#039;s ammo and are removed from the map.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Stackable items&#039;&#039;&#039;  These are items that can be stacked in the inventory. This means that the player can acquire multiple instances of such items, but only one entry is shown in the inventory with a counter of how many currently are available. An example would be a health potion. The player can possess more than one health potion at a time and this would be indicated by the counter on the HUD. Stackable items are identified by setting the stackable property. They also must always use the same name and category. If this doesn&#039;t match, they are considered to be different. This also allows for dealing out i.e. fake health potions which have no effect or deal damage instead (as an example).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Category&#039;&#039;&#039; Each item has a Category, which is used to group items. This allows the player to faster scroll through the inventory because he doesn&#039;t have to cycle through all the individual items. For example a category would be &#039;Readables&#039; where books and scrolls are stored, and another Category would be &#039;Tools&#039; where lockpicks and other items can be stored. Note that the actual category names are entirely up to the mapper. It doesn&#039;t have any consequence as to the playability and is only a convenience for the player. The inventory category is briefly displayed on the player HUD when cycling through the items.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Cursor&#039;&#039;&#039; &#039;&#039;(This is coding-related information)&#039;&#039; An inventory can have multiple cursors. Each cursor can point to a different place in the same inventory, and can restrict the movement to certain categories. This way, you can implement different HUDs or GUIs which can show different parts of the inventory in different places even though all the items are in one single inventory. Weapons are handled this way; a separate cursor is used which is only allowed to cycle through the weapon category.&lt;br /&gt;
&lt;br /&gt;
== Spawnargs ==&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string &#039;&#039;&#039;[required]&#039;&#039;&#039;&lt;br /&gt;
:Specifies the name the object should display when it is activated in the inventory. Keep in mind that the display name and the category together are used to determine whether two items are of the same type. This is important to determine whether items can be &amp;quot;stacked&amp;quot;. Both &#039;&#039;&#039;inv_name&#039;&#039;&#039; and &#039;&#039;&#039;inv_category&#039;&#039;&#039; must match.&lt;br /&gt;
:Example: &amp;lt;tt&amp;gt;&amp;quot;inv_name&amp;quot; &amp;quot;Health Potion&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_category&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string &#039;&#039;&#039;[required]&#039;&#039;&#039;&lt;br /&gt;
: Specifies the category that the object should be filed under. &lt;br /&gt;
:Example: &amp;lt;tt&amp;gt;&amp;quot;inv_category&amp;quot; &amp;quot;Potions&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_icon&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string (D3 path to icon file)&lt;br /&gt;
:Points to an icon that is to be displayed on the player HUD when the object is selected in the inventory. (This can also point to a shader name.) Note that you don&#039;t need to specify the file extension. &lt;br /&gt;
:Example: &amp;lt;tt&amp;gt;&amp;quot;inv_icon&amp;quot; &amp;quot;guis/assets/hud/inventory_icons/icon_health_potion&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_stackable&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0/1]&lt;br /&gt;
: Determines whether an item can be stacked on top of other items of the same type. An example would be the health potion item. The player can pick up more than one health potion, but in the inventory he will only get one item with a counter. Note that loot items need not to be stackable, they are handled separately by special code.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_item_id&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string&lt;br /&gt;
:This key can be set by the mapper to a value of his or her choice. This is needed if the mapper wants to address specific items or groups of items in order to implement custom behaviour, even if the &amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt; is the same for this group of items. For example, a mapper can create a fake health potion which shows up in the inventory just like a regular one. If the mapper desired, he could set up a script to check for this exact potion and trigger custom behaviour when the item is used.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_count&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | integer number&lt;br /&gt;
: Defines how many instances of an item is to be added to the inventory. Applies only to items with &amp;lt;tt&amp;gt;inv_stackable&amp;lt;/tt&amp;gt; set to 1. Non-stackable items have always an item count of 1 and this argument is ignored. As an example, the mapper could set up a stack of health potions as single entity (some sort of quiver) which immediately adds 5 potions to the player&#039;s inventory.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_droppable&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1]&lt;br /&gt;
:If set to 1 the item can be dropped into the map by the player. This will not work for anonymous items (loot, ammo), since their entity will be removed from the map after they had been put into the inventory.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;drop_to_hands&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1]&lt;br /&gt;
:If set to 1 (default) the item drops to the hands (grabber manipulator) of the player instead of to the ground. Set to 0 and the item drops directly to the floor when dropped.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_loot_type&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [ 0 | 1 | 2 | 3 ]&lt;br /&gt;
::* 0 = No lootitem (default)&lt;br /&gt;
::* 1 = Jewelry/Gems&lt;br /&gt;
::* 2 = Gold&lt;br /&gt;
::* 3 = Goods&lt;br /&gt;
:This has to be set in order to define what kind of item it is and if it is a loot item, which category of loot it should account for. Note: it&#039;s not possible to choose other values (e.g. loot type = 4), the code will probably crash.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_loot_value&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | integer&lt;br /&gt;
:Determines the amount of loot this item accounts for. This spawnarg is only applicable for items with a non-zero &amp;lt;tt&amp;gt;inv_loot_type&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_ammo_amount&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | integer (default is 0)&lt;br /&gt;
: Determines whether this item is an ammo item and how much ammonition this item represents. When this argument is 0, the item is not recognised as ammo. Ordinary ammonition items like [[atdm:ammo_broadhead]] have &amp;lt;tt&amp;gt;inv_ammo_amount&amp;lt;/tt&amp;gt; set to 1, but it&#039;s perfectly valid to set it to higher values for items like quivers. Don&#039;t forget to add the &amp;lt;tt&amp;gt;inv_weapon_name&amp;lt;/tt&amp;gt; spawnarg, which is needed by the code to determine which weapon this ammo belongs to.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_weapon_name&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string&lt;br /&gt;
: This spawnarg applies to weapon and ammo items. Each weapon must have a unique &amp;lt;tt&amp;gt;inv_weapon_name&amp;lt;/tt&amp;gt;, like &amp;quot;broadhead&amp;quot; or &amp;quot;blackjack&amp;quot;. This weapon name is used to determine which weapon an ammonition item is belonging to. If the &amp;lt;tt&amp;gt;inv_weapon_name&amp;lt;/tt&amp;gt; is missing on ammonition, it cannot be recognised as loot (a warning is emitted to the console and the log). &lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_use_on_frob&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1] (default is 0)&lt;br /&gt;
: When this spawnarg is set to 1, it can be used just by hitting the &amp;quot;frob&amp;quot; button (of course it must be selected in the inventory). The code then attempts to &amp;quot;use&amp;quot; this item on the highlighted entity in front of the player. The system is still in the works, so this information might not be fully accurate.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_map_start&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1]&lt;br /&gt;
:Determines wether this object should be automatically moved to the inventory at map start.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_target&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string (entityname, optional, defaults to &amp;quot;player1&amp;quot;)&lt;br /&gt;
:If the &amp;lt;tt&amp;gt;inv_map_start&amp;lt;/tt&amp;gt; argument is set to &amp;quot;1&amp;quot;, this defines the name of the entity that should receive it, otherwise the value is ignored. To give an item to the player, you would use &amp;lt;tt&amp;gt;player1&amp;lt;/tt&amp;gt; as the name (which is the default value anyway).&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_hud&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string (D3 path to .gui file)&lt;br /&gt;
: If this key is set it should point to a GUI file, which defines the hud for this particular item. As an example, you can look at the file tdm_loot.hud, which implements a custom hud that does not use the regular inventory item HUD. The mapper is responsible to maintain the state for such an item on his own. In order to do this, there is an initialization message sent to the specified script and other messages as well like selecting or deselecting an item. In order to make this work, the mapper must set up the correct scriptobject and add a few events to it. An example description of how to operate a custom HUD will be described in the scripting section on this article.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_hud_layer&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | integer (layernumber)&lt;br /&gt;
: If a custom hud is used for an item by setting the key &amp;lt;tt&amp;gt;inv_hud&amp;lt;/tt&amp;gt;, this key can be set to specify a layer number the custom hud should be displayed on. Normally this value can be set to 0 or left blank when using the default screen for the player, but for huds on other objects in the map, this might be needed.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_persistent&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1] (default is 0)&lt;br /&gt;
: If this is set to &amp;quot;1&amp;quot;, the item can be taken to the next map. This is useful for designing campaigns, where important items or weapons can be taken to the next level.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_lgmodifier&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | int (default is 0, maximum is DARKMOD_LG_MAX = 32)&lt;br /&gt;
: This can be used to modify the lightgem brightness when this item is selected in the inventory. Useful for weapons like the fire arrow.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_movement_modifier&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | float | default is 1, must be positive&lt;br /&gt;
: This can be used to slow down the player when this item is equipped (e.g. for weapons like the shortsword). This value is multiplied on the maximum movement speed.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;inv_no_pickup_message&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1] | default is 0&lt;br /&gt;
: Setting this to 1 disables the &amp;quot;pick up message&amp;quot; when this item is put into the player&#039;s inventory.&lt;br /&gt;
&lt;br /&gt;
== Default equipment for map start ==&lt;br /&gt;
&lt;br /&gt;
This describes how to give items to the player at map start time, but the same mechanism can be applied to any other AI (or entity for that matter) as well.&lt;br /&gt;
&lt;br /&gt;
* First create your object in the editor, just like you would if you wanted to put it in the map. Choose Create Entity and select the inventory item of your choice (a health potion for example). Place it where you like, but not outside in the void.&lt;br /&gt;
* Set the key &amp;lt;tt&amp;gt;inv_map_start&amp;lt;/tt&amp;gt; on the object entity to the value 1.&lt;br /&gt;
* (Optional) Set the key &amp;lt;tt&amp;gt;inv_target&amp;lt;/tt&amp;gt; to the name of the entity you would like this item to go to. &lt;br /&gt;
&lt;br /&gt;
The object will be moved to the target entity&#039;s inventory right at map start (and will be hidden or removed). The player will not be  able to see the item (unless there was a mistake in the setup).&lt;br /&gt;
&lt;br /&gt;
== Inventory CVARs ==&lt;br /&gt;
The following cvars can be used to modify the behaviour of some inventory properties. Some of them are probably only of interest to modders, while others are also of interest to players and might be added to a customization menu.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;tdm_inv_hud_file&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string | default &amp;quot;guis/tdm_inv.gui&amp;quot;&lt;br /&gt;
:Specifies the gui file that should be used for the inventory. this can be changed for mods, that wish to implement a different GUI, or provide alternative skins for the player.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;tdm_inv_loot_item_def&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string | default &amp;quot;atdm:inv_loot_info_item&amp;quot;&lt;br /&gt;
: Specifies the entityDef that should be used for the loot info slot in the inventory. This entityDef holds the references for the loot HUD.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;tdm_inv_hud_pickupmessages&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1] | default is 1&lt;br /&gt;
:If set to 1, the HUD is displaying the item the player has just picked up.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;tdm_inv_loot_sound&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | string | default &amp;quot;frob_loot&amp;quot;&lt;br /&gt;
: Specifies the default path to the soundfile that is played when loot is aquired. Note that this can be overriden on a per item level, and wont have an effect for such items. &#039;&#039;(greebo: Should be removed)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;tdm_inv_use_on_frob&amp;lt;/tt&amp;gt;&#039;&#039;&#039; | [0|1] | default is 0 (for now)&lt;br /&gt;
:When set to &#039;1&#039; the code attempts to use the currently selected inventory on frob, provided the selected item supports this action.&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;tdm_inv_use_on_frob_visual_feedback&amp;lt;/tt&amp;gt; | [0|1] | default is 1&lt;br /&gt;
:When set to &#039;1&#039; the HUD is giving visual feedback when the currently highlighted item is used.&lt;br /&gt;
&lt;br /&gt;
=== Related CVARs ===&lt;br /&gt;
;&#039;&#039;&#039;&amp;lt;tt&amp;gt;tdm_hud_opacity&amp;lt;/tt&amp;gt; | float [0..1]&lt;br /&gt;
:Defines the opacity of the HUD GUIs, also affects the lightgem and the weapon HUD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Key bindings ==&lt;br /&gt;
&lt;br /&gt;
For inventory key bindings see [[Bindings_and_User_Settings#Inventory_Related]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scriptsupport ==&lt;br /&gt;
The following events are available for scripters. These events can be called on any entity (as every entity has an inventory), but I assume for 99% of the cases, you will want to use these on &amp;lt;tt&amp;gt;$player1&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent float getLootAmount(float Type);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Returns the amount of loot for the given type (e.g. LOOT_GOODS). There are a few loot constants defined in &amp;lt;tt&amp;gt;tdm_events.script&amp;lt;/tt&amp;gt; file. Pass LOOT_TOTAL to return the sum of all loot types.&lt;br /&gt;
:*LOOT_TOTAL&lt;br /&gt;
:*LOOT_JEWELRY&lt;br /&gt;
:*LOOT_GOLD&lt;br /&gt;
:*LOOT_GOODS&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent float changeLootAmount(float type, float amount);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Changes the loot amount of the given Type (e.g. GOODS) by &amp;lt;amount&amp;gt;. The new value of the changed type is returned (e.g. the new GOODS value if this has been changed). Note: The LOOT_TOTAL type can&#039;t be changed and 0 is returned.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent void addInvItem(entity inv_item);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Adds the given item to the inventory. Depending on the type, the passed entity will be removed from the game (as for loot items) or hidden. If the item couldn&#039;t be added, a warning is emitted to the console.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent float replaceInvItem(entity oldItem, entity newItem);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Replaces the entity &amp;lt;oldItem&amp;gt; with &amp;lt;newItem&amp;gt; in the inventory, while keeping &amp;lt;oldItem&amp;gt;&#039;s inventory position intact.&lt;br /&gt;
:Note: The position guarantee only applies if &amp;lt;oldItem&amp;gt; and newItem share the same category. If the categories are different, the position of &amp;lt;newItem&amp;gt; is likely to be different than the one of &amp;lt;oldItem&amp;gt;.&lt;br /&gt;
:Note that &amp;lt;oldItem&amp;gt; will be removed from the inventory. If &amp;lt;newItem&amp;gt; is the $null_entity, &amp;lt;oldItem&amp;gt; is just removed and no replacement happens.&lt;br /&gt;
:Returns: 1 if the operation was successful, 0 otherwise.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent entity getNextInvItem();&amp;lt;/tt&amp;gt;&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent entity getPrevInvItem();&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Cycles the standard cursor to the next/prev inventory item.&lt;br /&gt;
:Returns: the item entity pointed to after the next/prev operation is complete.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent float setCurInvCategory(string categoryName);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Sets the inventory cursor to the first item of the named category.&lt;br /&gt;
:Returns: 1 on success, 0 on failure (e.g. wrong category name).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent entity setCurInvItem(string itemName);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Sets the inventory cursor to the named item.&lt;br /&gt;
:Returns: the item entity of the newly selected item (can be the $null_entity).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent string getCurInvCategory();&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Returns the name of the currently highlighted inventory category.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent entity getCurInvItemEntity();&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Returns the currently highlighted inventory item entity.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent string getCurInvItemName();&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Returns the name of the currently highlighted inventory item (the one defined in &amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent string getCurInvItemId();&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Returns the name of the currently highlighted inventory item (the one defined in &amp;lt;tt&amp;gt;inv_item_id&amp;lt;/tt&amp;gt;). Most items will return an empty string, unless the &amp;quot;inv_item_id&amp;quot; is set on purpose.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent string getCurInvIcon();&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Returns the icon of the currently highlighted inventory item.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent void changeInvItemCount(string name, string category, float amount);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Decreases the inventory item stack count by amount. The item is addressed using the name and category of the item. These are usually defined on the inventory item entity (&amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;inv_category&amp;lt;/tt&amp;gt;). Amount can be both negative and positive.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent void changeInvLightgemModifier(string name, string category, float modifier);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Sets the lightgem modifier value of the given item. Valid arguments are between 0 and 32 (which is the maximum lightgem value).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;scriptEvent void changeInvIcon(string name, string category, string icon);&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Sets the inventory icon of the given item in the given category to &amp;lt;icon&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
A short example of the above script events in action is the lantern script:&lt;br /&gt;
 // Set the icon to the &amp;quot;on&amp;quot; icon&lt;br /&gt;
 userEntity.changeInvIcon(getKey(&amp;quot;inv_name&amp;quot;), getKey(&amp;quot;inv_category&amp;quot;), getKey(&amp;quot;inv_icon_on&amp;quot;));&lt;br /&gt;
The first call is retrieving the &amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inv_category&amp;lt;/tt&amp;gt; spawnargs from the lantern entityDef and takes them as argument for te &amp;lt;tt&amp;gt;changeInvIcon&amp;lt;/tt&amp;gt; call. The &amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inv_category&amp;lt;/tt&amp;gt; are necessary for the code to lookup the item in the player&#039;s inventory. The third parameter defines which icon the lantern inventory item should have from now on.&lt;br /&gt;
&lt;br /&gt;
== Custom HUDs ==&lt;br /&gt;
It is possible to implement a custom HUD for each inventory item. Examples for inventory items with custom HUDs are the player compass and the loot info item. This describes how to set up a custom HUD for your item.&lt;br /&gt;
&lt;br /&gt;
# First off, you need an entityDef with your inventory item. Look at &amp;lt;tt&amp;gt;atdm:playertools_compass&amp;lt;/tt&amp;gt; for an example.&lt;br /&gt;
# Your inventory item entity needs to have its own script object, so you&#039;ll need to name that in your entityDef using the &amp;quot;scriptobject&amp;quot; spawnarg.&lt;br /&gt;
# The scriptobject (which will be defined in a .script file) needs to implement a small set functions which are invoked by the code when the item is initialised, selected or de-selected.&lt;br /&gt;
&lt;br /&gt;
=== Set up the entityDef ===&lt;br /&gt;
Again, the compass is given as an example: &lt;br /&gt;
 entityDef atdm:playertools_compass&lt;br /&gt;
 {&lt;br /&gt;
     &amp;quot;inherit&amp;quot;				&amp;quot;atdm:playertool&amp;quot;&lt;br /&gt;
     &amp;quot;spawnclass&amp;quot;			&amp;quot;idStaticEntity&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     &amp;quot;editor_usage&amp;quot;			&amp;quot;Compass&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     &amp;quot;model&amp;quot;				&amp;quot;models/darkmod/player_equipment/compass.ase&amp;quot;&lt;br /&gt;
     &amp;quot;scriptobject&amp;quot;			&amp;quot;playertools_compass&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     &amp;quot;inv_name&amp;quot;				&amp;quot;Compass&amp;quot;&lt;br /&gt;
     &amp;quot;inv_category&amp;quot;			&amp;quot;Compass&amp;quot;&lt;br /&gt;
     &amp;quot;inv_map_start&amp;quot;			&amp;quot;1&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
     &amp;quot;inv_hud&amp;quot;				&amp;quot;guis/playertools/compass.gui&amp;quot;&lt;br /&gt;
     &amp;quot;inv_hud_layer&amp;quot;			&amp;quot;11&amp;quot; // greebo: Readables are on layer 10&lt;br /&gt;
     &amp;quot;inv_icon&amp;quot;				&amp;quot;&amp;quot;&lt;br /&gt;
     &amp;quot;inv_droppable&amp;quot;			&amp;quot;0&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
The compass is set up like any other inventory item - the important thing is to specify the &amp;lt;tt&amp;gt;inv_hud&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;inv_hud_layer&amp;lt;/tt&amp;gt; spawnargs. The &amp;lt;tt&amp;gt;inv_hud&amp;lt;/tt&amp;gt; argument is pointing to a sepcific GUI file, which will be displayed when the inventory item is selected by the player. The &amp;lt;tt&amp;gt;inv_hud_layer&amp;lt;/tt&amp;gt; defines on which layer the GUI is being drawn (GUIS with higher overlay numbers are drawn after the ones with lower numbers).&lt;br /&gt;
&lt;br /&gt;
Also note that &amp;lt;tt&amp;gt;scriptobject&amp;lt;/tt&amp;gt; spawnarg which points to the script class, in this case &amp;lt;tt&amp;gt;playertools_compass&amp;lt;/tt&amp;gt;. See the next chapter for information about how to set this up.&lt;br /&gt;
&lt;br /&gt;
=== Set up the scriptobject ===&lt;br /&gt;
As next step, you&#039;ll need to add a custom scriptobject which defines the methods to be called by the SDK code. Create a .script file and define a scriptobject with the following methods:&lt;br /&gt;
 /*&lt;br /&gt;
  * Compass scriptobject, derives from player_tools&lt;br /&gt;
  */&lt;br /&gt;
 object playertools_compass : player_tools&lt;br /&gt;
 {&lt;br /&gt;
 	// greebo: Gets called upon addition to the inventory&lt;br /&gt;
 	void inventory_item_init(entity userEntity, float overlayHandle, string overlayName);	&lt;br /&gt;
 &lt;br /&gt;
 	// Gets called when the player switches to another inventory item &lt;br /&gt;
 	void inventory_item_unselect(entity userEntity, float overlayHandle); &lt;br /&gt;
 &lt;br /&gt;
 	// Gets called when this item is selected in the inventory&lt;br /&gt;
 	void inventory_item_select(entity userEntity, float overlayHandle);&lt;br /&gt;
 &lt;br /&gt;
 	// Gets called to update the HUD (not each frame!)&lt;br /&gt;
 	void inventory_item_update(entity userEntity, float overlayHandle);&lt;br /&gt;
 };&lt;br /&gt;
As you can gather from the comments, the various functions are called by the SDK code on certain occasions. The &amp;lt;tt&amp;gt;userEntity&amp;lt;/tt&amp;gt; argument always defines the entity which holds the inventory item, which is the $player1 entity in almost all cases. The second parameter &amp;lt;tt&amp;gt;overlayHandle&amp;lt;/tt&amp;gt; defines the GUI handle which can be used to set the GUI state variables of the custom HUD. These depend on your implementation, of course. I won&#039;t go into the details here (you can look at the actual files in the scripts/ folder), but as an example I can pick the &amp;lt;tt&amp;gt;inventory_item_select()&amp;lt;/tt&amp;gt; method of the compass scriptobject:&lt;br /&gt;
 void playertools_compass::inventory_item_select(entity userEntity, float overlayHandle)&lt;br /&gt;
 {&lt;br /&gt;
 	_overlayHandle = overlayHandle;&lt;br /&gt;
 &lt;br /&gt;
 	// Disable the default inventory&lt;br /&gt;
 	userEntity.setGuiFloat(userEntity.getInventoryOverlay(), &amp;quot;Inventory_ItemVisible&amp;quot;, 0);&lt;br /&gt;
 &lt;br /&gt;
 	// Make the compass GUI visible&lt;br /&gt;
 	userEntity.setGuiFloat(_overlayHandle, &amp;quot;CompassVisible&amp;quot;, 1);&lt;br /&gt;
 &lt;br /&gt;
 	// Start a new thread &lt;br /&gt;
 	_updateThreadNum = thread updateLoop(userEntity);&lt;br /&gt;
 }&lt;br /&gt;
The interesting part is how to set the GUI state variables, which is easy: just use the &amp;lt;tt&amp;gt;setGui***&amp;lt;/tt&amp;gt; methods on the &amp;lt;tt&amp;gt;userEntity&amp;lt;/tt&amp;gt; (usually the player), passing the overlayHandle along to specify which HUD you are addressing.&lt;br /&gt;
&lt;br /&gt;
== Setting up Weapons ==&lt;br /&gt;
Setting up weapons is not that hard actually from the entityDef point of view. The hard part is to get the models and animations right, which is mostly artwork. However, this short chapter should explain how the various entityDefs are connected to each other.&lt;br /&gt;
&lt;br /&gt;
=== Weapon ===&lt;br /&gt;
First of all, you&#039;ll need a weapon entityDef, one that is inheriting from &amp;lt;tt&amp;gt;atdm:weapon_base&amp;lt;/tt&amp;gt;. The entityDef needs a unique &amp;lt;tt&amp;gt;inv_weapon_name&amp;lt;/tt&amp;gt; serving as identifier for ammunition and scripting. The &amp;lt;tt&amp;gt;atdm:weapon_base&amp;lt;/tt&amp;gt; carries some editor_* spawnargs which explain the various options you have to &amp;quot;configure&amp;quot; your weapon (like whether ammunition is required, or whether it is a toggleable weapon, or the scriptobject, etc.).&lt;br /&gt;
&lt;br /&gt;
Let&#039;s assume you set up a weapon with ammunition (i.e. the weapon carries the spawanrg &amp;lt;tt&amp;gt;&amp;quot;ammo_required&amp;quot; &amp;quot;1&amp;quot;&amp;lt;/tt&amp;gt;). In this case you&#039;ll need a couple of additional entityDefs, namely &#039;&#039;ammo&#039;&#039;, &#039;&#039;attachment&#039;&#039;, &#039;&#039;projectile&#039;&#039; and &#039;&#039;result&#039;&#039; entities.&lt;br /&gt;
&lt;br /&gt;
=== Ammo ===&lt;br /&gt;
For weapons requiring ammunition, you&#039;ll need to add the &amp;lt;tt&amp;gt;def_ammo&amp;lt;/tt&amp;gt; spawnarg, which should point to an entityDef inheriting from &amp;lt;tt&amp;gt;atdm:ammo_base&amp;lt;/tt&amp;gt;. This links the weapon to the correct ammunition entityDef. To link back the ammo to the weapon, add the &amp;lt;tt&amp;gt;inv_weapon_name&amp;lt;/tt&amp;gt; spawnarg to the ammo entityDef pointing back to the weapon (e.g. &amp;quot;broadhead&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== The Weapon Attachment === &lt;br /&gt;
Each arrow weapon in TDM needs an attachment entity for display during the bow animations. For instance, whenever the player selects the water arrow weapon and starts to draw the bow string, the entity of type &amp;lt;tt&amp;gt;atdm:attachment_waterarrow&amp;lt;/tt&amp;gt; is attached to the bow viewmodel. The name of the attachment entityDef is defined on the weapon with the spawnarg &amp;lt;tt&amp;gt;def_attach&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== The Projectile ===&lt;br /&gt;
Once the player releases the bow string, the projectile is fired. The &amp;lt;tt&amp;gt;def_projectile&amp;lt;/tt&amp;gt; spawnarg on the weapon points to the desired projectile entityDef.&lt;br /&gt;
&lt;br /&gt;
=== The Projectile Result ===&lt;br /&gt;
The launched projectile will impact somewhere, and this is the point in space where the so-called &#039;&#039;projectile result&#039;&#039; will be spawned. The projectile entityDef holds the spawnarg &amp;lt;tt&amp;gt;def_result&amp;lt;/tt&amp;gt; pointing to the correct result entityDef. The result in turn has to implement the correct script methods which are called by the projectile collision code in the SDK. These script methods on the result&#039;s scriptobject will implement the actual behaviour of the arrow (like playing sounds, deploying ropes, etc.).&lt;br /&gt;
&lt;br /&gt;
== How to make inventory items to interact with world objects ==&lt;br /&gt;
Kingsal has reported how to use inventory items on items frob-highlighted in the game world. The report is here: http://forums.thedarkmod.com/topic/18505-script-for-placing-the-right-object-in-the-right-place/?p=397333&lt;br /&gt;
&lt;br /&gt;
This is a custom set up for an inventory item you would like the player to use_on_frob when highlighting an object in the world. The scenario in this example  is placing a skull on a pedestal, but there are many different uses/ scenarios.  There are several ways to do this. Check out http://wiki.thedarkmod.com/index.php?title=Tool,_Key,_custom_used_by_inventory_actions for another method. &lt;br /&gt;
 &lt;br /&gt;
You will need the def files and script file below.&lt;br /&gt;
&lt;br /&gt;
This assumes you have basic knowledge of creating .def files and .scripts. If not. PM me (kingsal) for help.&lt;br /&gt;
&lt;br /&gt;
Def files.  Place this in your def file.&lt;br /&gt;
&lt;br /&gt;
//++++++++++++++++++++++++Use Inventory Item++++++++++++++++++++++++++++++&lt;br /&gt;
// The inventory_use_item&#039;s &amp;quot;inv_name&amp;quot; spawnarg MUST match the &amp;quot;item_name&amp;quot; spawnarg on the Altar.&lt;br /&gt;
&lt;br /&gt;
 entityDef inventory__use_item //Change the name if you&#039;d like&lt;br /&gt;
 {&lt;br /&gt;
 	&amp;quot;inherit&amp;quot;							&amp;quot;atdm:moveable_small_base&amp;quot; &lt;br /&gt;
&lt;br /&gt;
 	//editor junk&lt;br /&gt;
 		&amp;quot;editor_displayFolder&amp;quot;			&amp;quot;interactables/special&amp;quot; // Change to a location you&#039;d like it to show up in DR.&lt;br /&gt;
 		&amp;quot;editor_usage&amp;quot;					&amp;quot;Custom use-on-frob item&amp;quot;&lt;br /&gt;
 		&amp;quot;editor_color&amp;quot;					&amp;quot;0.922 0.039 0.855&amp;quot; &lt;br /&gt;
 		&lt;br /&gt;
 	//Model&lt;br /&gt;
 		&amp;quot;model&amp;quot;							&amp;quot;models/darkmod/graveyard/bones/skull2.ase&amp;quot; // Change to appropriate model. Should have a collision mesh.&lt;br /&gt;
 		&amp;quot;mass&amp;quot;							&amp;quot;10&amp;quot; // If item can be dropped, Set this higher to avoid the player from lobbing it too far.&lt;br /&gt;
 		&amp;quot;friction&amp;quot;						&amp;quot;0.7&amp;quot;&lt;br /&gt;
 		&amp;quot;solid&amp;quot;							&amp;quot;0&amp;quot;&lt;br /&gt;
 	&lt;br /&gt;
 	//Inventory stuff&lt;br /&gt;
 		&amp;quot;inv_name&amp;quot;            			                &amp;quot;custom item name&amp;quot; //Rename it something fun! MUST match the name on the Altar.&lt;br /&gt;
 		&amp;quot;inv_icon&amp;quot;			                        &amp;quot;guis\assets\hud\inventory_icons\skull_inv_icon&amp;quot; // GUI icon.&lt;br /&gt;
 		&amp;quot;inv_droppable&amp;quot;         		                &amp;quot;1&amp;quot; //Allows the player to drop this. Beware they might drop it someplace where it can&#039;t be retrieved. &lt;br /&gt;
 		&amp;quot;inv_category&amp;quot;					        &amp;quot;Custom Items&amp;quot; //Rename this to the appropiate category.&lt;br /&gt;
 		&amp;quot;inv_stackable&amp;quot;						&amp;quot;1&amp;quot; //This is only needed if their are multiple of these items that you want to stack in the inventory.&lt;br /&gt;
 		&lt;br /&gt;
 	//sound&lt;br /&gt;
 		&amp;quot;snd_acquire&amp;quot;					&amp;quot;tool_pickup&amp;quot;&lt;br /&gt;
 		&amp;quot;snd_bounce&amp;quot;					&amp;quot;tdm_impact_metal_med_lesser&amp;quot;&lt;br /&gt;
 		&lt;br /&gt;
 	&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 //++++++++++++++++++++++++Altar++++++++++++++++++++++++++++++&lt;br /&gt;
 &lt;br /&gt;
 entityDef use_item_altar //Change the name if you&#039;d like&lt;br /&gt;
 {&lt;br /&gt;
 	&amp;quot;inherit&amp;quot;					        &amp;quot;atdm:entity_base&amp;quot;&lt;br /&gt;
 	&amp;quot;spawnclass&amp;quot;						&amp;quot;idStaticEntity&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 	//editor junk&lt;br /&gt;
 		&amp;quot;editor_displayFolder&amp;quot;			        &amp;quot;interactables/special&amp;quot; // Change to a location you&#039;d like it to show up in DR.&lt;br /&gt;
 		&amp;quot;editor_usage&amp;quot;					&amp;quot;Altar for placing inventory_use_items&amp;quot;&lt;br /&gt;
 		&amp;quot;editor_color&amp;quot;					&amp;quot;0.922 0.039 0.855&amp;quot;&lt;br /&gt;
 		&lt;br /&gt;
 	//Model&lt;br /&gt;
 		&amp;quot;model&amp;quot;							&amp;quot;models/darkmod/furniture/tables/builder_pedestal01.lwo&amp;quot; //Change to appropriate model&lt;br /&gt;
 		&amp;quot;solid&amp;quot;							&amp;quot;1&amp;quot; //Must be solid&lt;br /&gt;
 &lt;br /&gt;
 	//Interaction&lt;br /&gt;
 		&amp;quot;frobable&amp;quot;						&amp;quot;1&amp;quot;&lt;br /&gt;
 		&amp;quot;frob_action_script&amp;quot;			                &amp;quot;use_altar&amp;quot;	&lt;br /&gt;
 		&amp;quot;item_name&amp;quot;						&amp;quot;custom item name&amp;quot; //This must match the inv_name spawnarg of the custom item&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Script. This is the script that goes in your mymap.script. Or fms/scripts which requires adding the script name to your tdm_custom_script file.&lt;br /&gt;
&lt;br /&gt;
 /////////// EVENT SCRIPTS //////////////&lt;br /&gt;
 //Place this in your fms/maps/ as a mymapname.script.&lt;br /&gt;
 void use_altar(entity altar)&lt;br /&gt;
 {&lt;br /&gt;
 		&lt;br /&gt;
     entity curr_item = $player1.getCurInvItemEntity();&lt;br /&gt;
     if ($player1.getCurInvItemName() == altar.getKey(&amp;quot;item_name&amp;quot;))&lt;br /&gt;
 		{&lt;br /&gt;
 			$player1.changeInvItemCount(curr_item.getKey(&amp;quot;inv_name&amp;quot;), curr_item.getKey(&amp;quot;inv_category&amp;quot;), -1); //Removes item count by one.&lt;br /&gt;
 			altar.activateTargets( $player1 ); //Activates the altar&#039;s targets. &lt;br /&gt;
 			altar.setFrobable( 0 ); //Sets to none frobable. One time use. REMOVE THIS TO MAKE RE-USABLE.&lt;br /&gt;
 			altar.startSoundShader (&amp;quot;mage_fireball_impact&amp;quot;, SND_CHANNEL_VOICE ); //Play a sound you like!&lt;br /&gt;
 			sys.wait( 1 );&lt;br /&gt;
 		}&lt;br /&gt;
 		&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Set-up&lt;br /&gt;
&lt;br /&gt;
By default the custom items can be found in DR under yourfms/interactables/special. Unless you changed the path&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
1. Add the inventory_use_item and use_item_altar to your map. &lt;br /&gt;
&lt;br /&gt;
2. Be sure to change the &amp;quot;inv_name&amp;quot; spawnarg on the custom item and the &amp;quot;item_name&amp;quot; spawnarg on the altar. They must match to work.&lt;br /&gt;
&lt;br /&gt;
3. Place a func_static of the item&#039;s model on the altar and set spawnarg  &amp;quot;hidden&amp;quot; to &amp;quot;0&amp;quot;. Have the altar target the func_static and it will appear, giving the illusion it was placed there.&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Doors&amp;diff=18849</id>
		<title>Doors</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Doors&amp;diff=18849"/>
		<updated>2016-10-18T06:23:30Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{todo}}&lt;br /&gt;
&#039;&#039;Written by Fidcal&#039;&#039; &#039;&#039;edit Baddcog&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Quick Summary==&lt;br /&gt;
&lt;br /&gt;
Quick way to get an unlocked door in your map:&lt;br /&gt;
&lt;br /&gt;
* Insert one of the prefab doors complete with handles and select its skin property and click the button to change its skin appearance to whatever you want. Set any other properties you need.&lt;br /&gt;
&lt;br /&gt;
Alternatively,&lt;br /&gt;
&lt;br /&gt;
* Create a door from the entity list&lt;br /&gt;
* Use the &amp;quot;skin&amp;quot; spawnarg on the door to change its appearance. &lt;br /&gt;
* Create a handle from the entity list&lt;br /&gt;
* Add the &#039;&#039;door_handle&#039;&#039; property to the door and give it the name of the handle&lt;br /&gt;
* To the door handle add the value frob_peer and use the name of the door.&lt;br /&gt;
* To open clockwise, change the &#039;&#039;rotate&#039;&#039; property from &amp;lt;code&amp;gt;0 90 0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;0 -90 0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
This tutorial explains how to put doors into your map using Dark Radiant, as well as adjust them and their properties.&lt;br /&gt;
&lt;br /&gt;
The rest of this tutorial assumes that you have a basic understanding of using DarkRadiant. If you haven&#039;t done so, please go read the [[Dark Radiant Must Know Basic Intro]] article first.&lt;br /&gt;
&lt;br /&gt;
Additionally:&lt;br /&gt;
&lt;br /&gt;
* Up, down, right, and left in Dark Radiant&#039;s &#039;&#039;top&#039;&#039; orthoview are regarded here as the standard map directions of North, South, East, and West where useful for clarity.&lt;br /&gt;
* Where the term &#039;&#039;brush&#039;&#039; is used with a door it mostly also applies to a door made up of a group of brushes and/or patches.&lt;br /&gt;
* Where the term &#039;&#039;door&#039;&#039; is used it often will also apply to any object you wish to rotate when frobbed, for instance an openable window, box lid, or even more exotic objects that the imaginative mapper might conceive like a signal, engine part, toy, or whatever. So long as it needs to turn or slide just a fixed amount when frobbed then return when frobbed again then the following applies.&lt;br /&gt;
&lt;br /&gt;
==Door types==&lt;br /&gt;
&lt;br /&gt;
All tangible objects in Dark Mod are &#039;&#039;entities&#039;&#039;, having either a pre-made model shape or else brush/patch(es). So there are two ways to create a door in Dark Radiant: as a model door or a textured brush door (or a hybrid of the two).&lt;br /&gt;
&lt;br /&gt;
Models are ready made door objects but cannot within Dark Radiant (at the time of writing) be resized, rescaled, cropped or clipped whereas brushes are very flexible in that respect and can be worked into custom shapes for your map, including secret doors that blend into walls and other surfaces.&lt;br /&gt;
&lt;br /&gt;
Most of the current door models are found in two places along with the door handles.&lt;br /&gt;
*Model Viewer: doors created from here will be static in the world and have no props other than material type.&lt;br /&gt;
You can add any props to them to make them working doors. If nothing else it is a good place to view the different size and skin options for the doors.&lt;br /&gt;
*Entity List: most of the door models can be found here. These doors have properties already assigned so they are ready to be used. Only one base door of each type is listed, create the size/hinge count door you want (2 hinge doors have a &#039;no hinge&#039; skin). You can choose a skin for the door once it has been created in the editor with the &amp;quot;skin&amp;quot; spawnarg (use the model name of the door you want, taken from the model list, as its value). This is the easiest way to create a door. The same goes for door handles.&lt;br /&gt;
&lt;br /&gt;
Remember also that door functions may be applied to objects other than doors, such as openable windows, drawbridges, gates, etc. In fact, anything that needs a partial rotation or slide when frobbed then return when frobbed again, such as a signal device. Lockboxes and chests use similar properties.&lt;br /&gt;
&lt;br /&gt;
You can create one door/handle set and copy/paste it, but you need to take great care that all the name props are changed to match in each clone. Otherwise you get handles that fly off when a distant door moves, and handles that don&#039;t move.&lt;br /&gt;
&lt;br /&gt;
==Creating a Door==&lt;br /&gt;
&lt;br /&gt;
Put simply, to make a door you will be creating an &#039;entity with model&#039; or &#039;entity with brush&#039; or some variation thereof.&lt;br /&gt;
&lt;br /&gt;
===Creating a Model Door===&lt;br /&gt;
&lt;br /&gt;
There are several approaches to making a model door; the simplest is to create a door from the entity list; or create a door from the model viewer (good for static unusable prop doors).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Entity List&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
*Deselect everything in editor by hitting the Esc button&lt;br /&gt;
*Right-click an ortho view and select Create Entity&lt;br /&gt;
*Navigate to darkmod/movers/&#039;&#039;atdm:door_...&#039;&#039;, choose the door you want&lt;br /&gt;
*Click Add&lt;br /&gt;
*To change its appearance, add a &amp;quot;skin&amp;quot; spawnarg to the door, with the value being the model name of the door you want.&lt;br /&gt;
&lt;br /&gt;
You now have a workable door in your level.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Model Viewer&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
* Right click in the orthoview, select &#039;&#039;Create Model&#039;&#039; then &amp;lt;code&amp;gt;darkmod&amp;lt;/code&amp;gt; and select a door.&lt;br /&gt;
* Note that you can left drag the image in the &#039;&#039;Choose Model&#039;&#039; dialog to rotate it around.&lt;br /&gt;
* Click [[Image:Button ok.png]] and you have a static door.&lt;br /&gt;
* If you want to make it work (openable, frobbable) then:&lt;br /&gt;
** Select the entity inspector,&lt;br /&gt;
** Select the top classname line so it highlights&lt;br /&gt;
** Select the func_static line in the input box &#039;&#039;below&#039;&#039; the properties window.&lt;br /&gt;
** Edit &amp;lt;code&amp;gt;func_static&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;atdm:mover_door&amp;lt;/code&amp;gt;&lt;br /&gt;
** Click {{check}} or press {{key-enter}}&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do it the old way:&lt;br /&gt;
&lt;br /&gt;
* Create any temporary brush&lt;br /&gt;
* Right click in orthoview and select &amp;lt;code&amp;gt;Create Entity&amp;lt;/code&amp;gt; then &amp;lt;code&amp;gt;atdm:mover_door&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Left lick the model name line in the entity inspector.&lt;br /&gt;
* Below it on the &#039;&#039;Entity Inspector&#039;&#039; panel you should now see a button &#039;Choose Model&#039;&lt;br /&gt;
* Left click it, select a door model from the darkmod group.&lt;br /&gt;
* Note that you can left drag the image in the &#039;&#039;Choose Model&#039;&#039; dialog to rotate it around.&lt;br /&gt;
* The temporary brush was deleted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In all three instances, you now have a working door with default properties. &lt;br /&gt;
&lt;br /&gt;
Name your door by adding the prop (or modifing it) to name &#039;&#039;My_Door_1&#039;&#039;. You can use any name that you feel is appropriate but all doors with handles attached &#039;&#039;must&#039;&#039; have their own specific name. Use the name My_Door_1 for your first attempt as it will be referenced when you get around to attaching handles (see below).&lt;br /&gt;
&lt;br /&gt;
To add a handle and other adjustments, see [[#Customising and Adjusting Door Properties]] below.&lt;br /&gt;
&lt;br /&gt;
===Creating a Textured Brush Door===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tip:&#039;&#039;&#039; If unsure of size then you might insert a temporary human AI first to get a sense of height.&lt;br /&gt;
&lt;br /&gt;
==== The simplest brush door: ====&lt;br /&gt;
&lt;br /&gt;
* Drag out a new brush to the size required, eg, a seven foot high door is 84&amp;quot; x 1.1 = about 90 units in Dark Radiant.&lt;br /&gt;
* Give it a door texture from the texture browser (or wall texture for a secret door)&lt;br /&gt;
* Right click in orthoview and select &#039;&#039;Create Entity&#039;&#039; then &amp;lt;code&amp;gt;atdm:mover_door&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You now have a working door but it will rotate around its center. To move the rotation point to where you want the door hinges to be:&lt;br /&gt;
* Select the door and press &#039;v&#039; to enter vertex editing mode. The door&#039;s origin will show up as a small green square in the middle of the brush.&lt;br /&gt;
* In top-down orthoview, move the origin from the center to the corner of the brush. This is easiest in drag mode (&#039;q&#039;), although you can use translate mode (&#039;w&#039;) by manually selecting the vertex first.&lt;br /&gt;
&lt;br /&gt;
==== Multi-brush doors: ====&lt;br /&gt;
&lt;br /&gt;
More complex multi-brush doors can be created using the [[Clipper]] tool, CSG, etc. - this is not covered in this tutorial. Then assign &amp;lt;code&amp;gt;atdm:mover_door&amp;lt;/code&amp;gt; for that whole brush structure. Also you can collect various brushes positioned together in relation to one another as needed, select them all, then assign &amp;lt;code&amp;gt;atdm:mover_door&amp;lt;/code&amp;gt; for the group. All the brushes will be children of the &amp;lt;code&amp;gt;atdm:mover_door&amp;lt;/code&amp;gt; entity and will rotate and be frobbable, etc. as one unit, as one door. To add further brushes or even model shapes later see the section on [[#Adding handles and other items to doors]].&lt;br /&gt;
&lt;br /&gt;
Name your door by adding the prop (or modifing it) to name My_Door_1. You can use any name that you feel is appropriate but all doors with handles attached must have their own specific name. Use the name My_Door_1 for your first attempt as it will be referenced when you get around to attaching handles (see below). (repeated from above in case you didn&#039;t choose to create a model door)&lt;br /&gt;
&lt;br /&gt;
=== Double Doors ===&lt;br /&gt;
Double doors are automatically recognised by the code when the doors are spawned. The prerequisite is that both doors are sharing/touching the same visportal. The spawnarg &#039;&#039;auto_setup_double_door&#039;&#039; (which defaults to &amp;quot;1&amp;quot;) will take care of setting up the open/lock peer relationship between the two doors. The doors will open/close and lock/unlock along with each other as a result.&lt;br /&gt;
&lt;br /&gt;
What happens behind the scenes: the doors are adding each other to their internal open_peer and lock_peer list, which causes the double doors to perform the same action when frobbed or used.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;auto_setup_double_door&#039;&#039; will not set the frob_peer relationship, i.e. each door will frob-highlight on its own without highlighting the other door. You&#039;ll need to add that spawnarg manually if you want to highlight the entire double door as one.&lt;br /&gt;
&lt;br /&gt;
==Customising and Adjusting Door Properties==&lt;br /&gt;
&lt;br /&gt;
Handles, lockplates, etc. can be added to doors and door properties can be adjusted for rotation, sliding, locking, and more.&lt;br /&gt;
&lt;br /&gt;
Some of the door models have hinge plates and lockboxes that are reskinnable with a good variety of skins.&lt;br /&gt;
&lt;br /&gt;
===Door handles and other door attachments===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Summary: just add the property &#039;&#039;bind&#039;&#039; with the door&#039;s name to the attachment and position it where you want it on the door. If it&#039;s a &#039;&#039;atdm:mover_door_handle&#039;&#039; then it automatically will work as a handle but you can bind virtually anything.&#039;&#039;&#039;&lt;br /&gt;
You can add handles and other items to doors such that they move correctly with the door whether rotating, sliding, or both and even if the door is not vertical such as a skylight or trapdoor.&lt;br /&gt;
Handle models come in two types, &#039;&#039;single handles&#039;&#039; and &#039;&#039;double handles&#039;&#039;. A single handle is one sided, this means the handle will be inside the door or outside the door, but not both. A double handle has a lever on the inside of the door and a handle on the outside of the door. Each has benefits.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;&#039;&#039;Single door handles&#039;&#039;&#039;&#039;&#039;:&lt;br /&gt;
Single door handles can be used on a static door, a door that&#039;s just for show that no AI&#039;s or the player can use. In this case you should just create a door handle from the model viewer, it will be static and have no properties such as scripts. It is for looks only.&lt;br /&gt;
&lt;br /&gt;
I will call this &#039;&#039;multiple handles&#039;&#039;, see more below.&lt;br /&gt;
&lt;br /&gt;
These can also be useful on brush doors created in the editor that may be very thin or very wide.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;&#039;&#039;Double door handles&#039;&#039;&#039;&#039;&#039;:&lt;br /&gt;
These are models have have a handle inside and outside. The bonus is that they only use one entity. Maps are limited to about 4,000 entities but when you count lights, AI, sound speakers, ect... you can run out of entities quickly on a large map. If you plan on building a large map this is the way to go, even in a small map they have benefits, namely that you only have to attach one handle per door.&lt;br /&gt;
&lt;br /&gt;
Whether you decide to use a single handle or a double handle you must first follow the instructions below and attach one handle first. If you choose a double handle, follow the instructions below and you are done. If you choose a single handle type follow the instructions then also follow the &#039;&#039;multiple handle&#039;&#039; instructions for the second handle.&lt;br /&gt;
&lt;br /&gt;
Both single and double handle types can be found in two places. The model viewer which will create a static model good for show, you can manually add props to make them work OR you can look in the entity browser.&lt;br /&gt;
Using a handle from the entity browser saves you a little bit of time as some props are already added, you just need to add the frob_peer names for the doors/handles and the door_handle name to the door.&lt;br /&gt;
&lt;br /&gt;
=== Adding a working model door handle===&lt;br /&gt;
&lt;br /&gt;
Quick summary:&lt;br /&gt;
* Create a model or brush handle and make it an &#039;&#039;atdm:mover_door_handle&#039;&#039; entity.&lt;br /&gt;
* Position it on your door.  Use the opposite side from the door&#039;s multicolor X-Y-Z indicator (highlight the door to see it) if it&#039;s not obvious which side it goes on.  &lt;br /&gt;
* &#039;&#039;&#039;Bind&#039;&#039;&#039; the handle to the door (bind &amp;lt;doorname&amp;gt;)&lt;br /&gt;
* It should now be a working handle though may need adjustments of rotation etc. see later. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important: read preceding section on door handle types and performance issues first.&lt;br /&gt;
&lt;br /&gt;
This works with both a model door and a brush door:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rotation&#039;&#039;&#039;:&lt;br /&gt;
* By default the door handle entity rotates &#039;&#039;anti-clockwise&#039;&#039; (looked at from the front) then springs back. A &#039;&#039;double handle&#039;&#039; model is OK but two singles (see &#039;&#039;Multiple door handles&#039;&#039; below) need more care as only one is the functioning entity and the other is just attached to it. So anti-clockwise is fine for a door with its hinge on the left and the handle on the right - the handle will rotate down then spring back. If you put the functioning door handle on the other side you will have to change the default &#039;&#039;rotate&#039;&#039; property from -45 0 0 to 45 0 0. &#039;&#039;&#039;&#039;&#039;Therefore it is easier to generally put this handle on the side of the door where the hinge is on the left and the non-functioning attachment handle on the other side.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
*If your door only needs one handle, eg, a cupboard door, and from outside its hinge is on the right then you will need to change the &#039;&#039;rotate&#039;&#039; property of the handle as described above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;The functioning handle entity:&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
* Create an entity door handle (movers folder) or create a brush or model handle and assign it the entity &#039;&#039;atdm:mover_door_handle&#039;&#039;.&lt;br /&gt;
* Position it where you wish on your door.&lt;br /&gt;
* &#039;&#039;&#039;Bind&#039;&#039;&#039; the handle to the door, by adding the &amp;quot;bind&amp;quot; spawnarg to the handle.&lt;br /&gt;
&lt;br /&gt;
You now have a working door handle with default properties.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Multiple door handles&#039;&#039;&#039;:&lt;br /&gt;
Now that you&#039;ve got a handle attached to one side of the door it is time to add one to the other side (unless you used a double handle).&lt;br /&gt;
* Create the new handle. The single handles come in left and right persuasions. A door needs a left facing handle on one side and a right facing handle on the other, so if you have already added the left handle create a right handle and line it up on the other side of the door.&lt;br /&gt;
* Name this handle. I prefer to keep a naming convention for each door and it&#039;s respective handles, it makes things alot easier. The door is named &#039;&#039;&#039;My_Door_1&#039;&#039;&#039;, the first handle is named &#039;&#039;&#039;My_Handle_1&#039;&#039;&#039; so name the second handle &#039;&#039;&#039;My_Handle_1_1&#039;&#039;&#039;. This will make it stay with the first handle in the entity list. This is important to keep organized. If you name it My_Handle_2 then when you get to another door named My_Door_2 you&#039;ll be confused.&lt;br /&gt;
* Place and &#039;&#039;&#039;bind&#039;&#039;&#039; that handle to your door.&lt;br /&gt;
&lt;br /&gt;
You now have two single door handles on either side of the door that rotate together as if they were physically attached.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To add a brush to a brush door&#039;&#039;&#039;:&lt;br /&gt;
* Select the new brush &#039;&#039;and&#039;&#039; the brush door all together; &#039;&#039;the entity &#039;&#039;&#039;must&#039;&#039;&#039; be selected &#039;&#039;&#039;last&#039;&#039;&#039;.&#039;&#039;&lt;br /&gt;
* Use {{menu|Edit|Reparent primitives}}. This ensures the parent entity adopts the new item(s).&lt;br /&gt;
* If you have trouble selecting them in the orthoview because other brushes, etc. get selected then try in the camera view or as a last resort move them temporarily to an open area (but keep them in the same positions relative to each other.) Use {{key-shift}}+{{LMB}} on new item(s) then {{key-shift}}+{{LMB}} on main entity. Once they are all selected, use the {{menu|Edit|Reparent primitives}}.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To add &#039;&#039;model&#039;&#039; static items&#039;&#039;&#039;: knockers, hinges, static handles etc. to a &#039;&#039;Model Door&#039;&#039;:&lt;br /&gt;
* Select item&lt;br /&gt;
* Right click in orthoview and select &#039;&#039;Create Entity&#039;&#039; then &amp;lt;code&amp;gt;entity func_static&amp;lt;/code&amp;gt;&lt;br /&gt;
* Position it where you wish on your door.&lt;br /&gt;
* To synchronize this with your particular door you need to add the property &#039;&#039;bind&#039;&#039; and the individual door name to the brush entity. To do this...&lt;br /&gt;
** Select the model door.&lt;br /&gt;
** In the entity inspector, select the &#039;&#039;name&#039;&#039; line&lt;br /&gt;
** Select the bottom line in the input box &#039;&#039;below&#039;&#039; the properties window.&lt;br /&gt;
** Copy the name&lt;br /&gt;
** Deselect the door with {{key-esc}}&lt;br /&gt;
** Select the brush entity&lt;br /&gt;
** Add a property &amp;quot;bind&amp;quot; to it.&lt;br /&gt;
** Change the value of the property by pasting in the door name&lt;br /&gt;
** Click {{check}} or press {{key-enter}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;To add &#039;&#039;brush&#039;&#039; static items&#039;&#039;&#039;: knockers, hinges, static handles to a Model Door:&lt;br /&gt;
* This method is not ideal but it seems to work OK.&lt;br /&gt;
* Select the brush.&lt;br /&gt;
* Right click in orthoview and select Create Entity then &#039;&#039;atdm:mover_door_handle&#039;&#039;&lt;br /&gt;
* Position it where you wish on your door.&lt;br /&gt;
&lt;br /&gt;
To synchronize this with your particular door you need to add the property &#039;&#039;door_handle&#039;&#039; on the door, and give as the value the name of the brush you just created.&lt;br /&gt;
&lt;br /&gt;
This brush turns like a handle. To stop it:&lt;br /&gt;
&lt;br /&gt;
* Adding &#039;&#039;rotate 0 0 0&#039;&#039; or disabling the handle script won&#039;t help.&lt;br /&gt;
* Add a real working handle (as in the section above &#039;&#039;To add a working model door handle...&#039;&#039; and it must be added LAST.)&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want too see a real working handle added maybe try another tiny brush with the handle function and hide it inside the door?&lt;br /&gt;
&lt;br /&gt;
===Locking Doors===&lt;br /&gt;
&lt;br /&gt;
To lock a door check the &#039;&#039;show inherited properties&#039;&#039; in the entity inspector for a &#039;&#039;atdm:mover_door&#039;&#039; entity and you should see the &#039;&#039;locked&#039;&#039; property. Select it and in the input box below the properties you can change its value:&lt;br /&gt;
&lt;br /&gt;
* 0 = unlocked (default)&lt;br /&gt;
* 1 = locked&lt;br /&gt;
&lt;br /&gt;
If locked it will require an entity that is associated with it to be able to act as a key to unlock it.&lt;br /&gt;
&lt;br /&gt;
Currently door handles on locked doors will rotate when frobbed, they will bounce back though and the door will stay locked until unlocked.&lt;br /&gt;
&lt;br /&gt;
===Keys===&lt;br /&gt;
&lt;br /&gt;
Assigning specific keys to specific doors is simple.&lt;br /&gt;
&lt;br /&gt;
* It is recommended that you create an existing key entity. These keys have all required props, they just need to be named.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can create a key from the Model Viewer and want it to be useable&lt;br /&gt;
* Make sure it has the properties:&lt;br /&gt;
 useable 1 [so it can be used by the door]&lt;br /&gt;
 frobable 1&lt;br /&gt;
 inv_name &amp;lt;unique name&amp;gt;&lt;br /&gt;
 inv_category Keys&lt;br /&gt;
 inv_target player1&lt;br /&gt;
 inv_icon guis/assets/hud/inventory_icons/&amp;lt;icon name&amp;gt;&lt;br /&gt;
 inv_stackable 0 or 1 where 1 can be used on all copies of the same key so they show as one entry in the inventory with a total.&lt;br /&gt;
&lt;br /&gt;
Add to the door the property &amp;lt;code&amp;gt;used_by&amp;lt;/code&amp;gt; with the name of the key as the value. Multiple keys can open the same door by using several &amp;lt;tt&amp;gt;used_by&amp;lt;/tt&amp;gt; spawnargs:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;used_by&amp;quot;  &amp;quot;doorkey_1&amp;quot;&lt;br /&gt;
 &amp;quot;used_by1&amp;quot; &amp;quot;doorkey_2&lt;br /&gt;
&lt;br /&gt;
==== Keys carried by AI ====&lt;br /&gt;
&lt;br /&gt;
So you have a door and you have a guard Ai and you want the guard to be able to open/close/lock the door but you also want the player to be able to pickpocket the key. For more info on attaching key, props etc - see [[Attaching Props to AI]].&lt;br /&gt;
&lt;br /&gt;
*&amp;quot;def_attach6&amp;quot; &amp;quot;atdm:prop_silverkey&amp;quot; //the entity to spawn - in this case a key.&lt;br /&gt;
*&amp;quot;pos_attach6&amp;quot; &amp;quot;belt_back_right&amp;quot; //where the key will spawn on the Ai.&lt;br /&gt;
*&amp;quot;name_attach6&amp;quot; &amp;quot;door_key&amp;quot; //this gives &#039;attach6&#039; arg the name &amp;quot;door_key&amp;quot; and is the name the arg &amp;quot;used_by&amp;quot; will need, eg: &amp;quot;used_by&amp;quot; &amp;quot;door_key&amp;quot;&lt;br /&gt;
*&amp;quot;set inv_name on door_key&amp;quot; &amp;quot;Door key&amp;quot; //The name the key get when the play adds it to their inventory.&lt;br /&gt;
*&amp;quot;set name on door_key&amp;quot; &amp;quot;door_key&amp;quot; //here it gets a name to be used in the map in general.&lt;br /&gt;
&lt;br /&gt;
Or simply:&lt;br /&gt;
&lt;br /&gt;
* load a key entity&lt;br /&gt;
* position where you want it in relation to the AI, bind it to them&lt;br /&gt;
* Add the spawnarg &amp;quot;bindToJoint&amp;quot; &amp;quot;Hips&amp;quot; (or other location, see AI for list)&lt;br /&gt;
* adjust existing spawnargs accordingly (be sure the name and door&#039;s/chest&#039;s &amp;quot;used_by&amp;quot; match, if you aren&#039;t using a prefab chest w/key)&lt;br /&gt;
&lt;br /&gt;
====Master Key for Testing====&lt;br /&gt;
&lt;br /&gt;
By default, ALL locks can be opened by any key named &#039;&#039;key_master&#039;&#039;. Just create a key in your map, name it &#039;&#039;key_master&#039;&#039; and it becomes a master key for use while testing. Add inv_map_start 1 to it so it is in the player inventory at game start. Remember to delete it when your mission is finished.&lt;br /&gt;
&lt;br /&gt;
===Lockpicks===&lt;br /&gt;
&#039;&#039;by Baddcog&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There are two lock pick types.&lt;br /&gt;
*&#039;&#039;&#039;s&#039;&#039;&#039;=snake&lt;br /&gt;
*&#039;&#039;&#039;t&#039;&#039;&#039;=triangular&lt;br /&gt;
&lt;br /&gt;
A lock can be set with many pins. Each pin has a click sequence and each needs a designated lockpick type (see above). Keep in mind that the lockpicking in The Darkmod is much more involved than in T2 or T3. The player has to listen to sounds or watch a handle or lockbar to know when a lock is pin is picked.&lt;br /&gt;
&lt;br /&gt;
This means that authors can be very evil and really frustrate the player, in which case their missions will probably not be played. So be nice to the player and don&#039;t waste your time. Use simple locks for the most part and save complicated locks for important sections and to build tension. Don&#039;t make the player have 20 pins to pick all with different lockpicks. In most cases 1 or 2 pins will suffice and it isn&#039;t necessary to use both lockpicks on every lock.&lt;br /&gt;
Also try to include a lock lever on lockboxes or chests, door handles will rotate as the pins are being picked. This gives the player visual clues to help with the picking (and essential in noisy environments where you can&#039;t hear the clicks.)&lt;br /&gt;
IMO this system is a huge leap foward for lockpicking but also has the ability to completely frustrate the player as stated above. Keep this in mind when designing your lockpick systems.&lt;br /&gt;
&lt;br /&gt;
These props go on the door itself, or the lid of a chest, eg,&lt;br /&gt;
*&#039;&#039;&#039;lock_pins&#039;&#039;&#039; 1327&lt;br /&gt;
*&#039;&#039;&#039;lock_picktype&#039;&#039;&#039; stts&lt;br /&gt;
&lt;br /&gt;
The lock_pins property specifies how many pins each lockpicktype has.&lt;br /&gt;
The lockpick_type property specifies how many times the player has to switch picks and which pick they have to use. You can see there must always be an equal number of lock_pins and lock_picktypes specified&lt;br /&gt;
&lt;br /&gt;
So looking at the example above we have lockpick_type s(snake), t(triangular), t(triangular), and s(snake). The player will have to use these lockpicks in this order. Once the snake lockpick&#039;s pins are open the player can advance to the triangular pick and so forth.&lt;br /&gt;
5 is added to every click sequence so 5 is the minimum click pattern even if you set it to 0.&lt;br /&gt;
In the example above the lockpins specify in order which pick types have how many pins, so the s pick has 1 + 5 = 6 clicks, the t pick has 8 and so on.&lt;br /&gt;
The above is a difficult lock and to avoid annoying the player it is best only used rarely on a special lock like an important big vault door. Ordinary footlockers and common doors can be just 1 or 2 click sequences, eg, lock_pins 2 and lock_picktype t means the player uses one pick and listens for the end of one sequence of 7 clicks.&lt;br /&gt;
&lt;br /&gt;
lockpick_rotate - is placed on the door. It is the amount the visible rotating handle or pin rotates while picking. For a rotating handle or lockbar normally ignore this and leave the default. During lockpicking it oscillates and progresses to the normal full turn of the handle. Example 0 45 0.&lt;br /&gt;
&lt;br /&gt;
lockpick_translate - is placed on the door. It is the amount the visible handle or pin moves in a straight line while picking. Use this if you have eg, a lockbar that you want to move in a straight line and not rotate, eg sliding catch. Example 0 -5 0&lt;br /&gt;
&lt;br /&gt;
By default, doors are pickable. If you don&#039;t set up the above lockpick spawnargs then it can&#039;t be picked. So there is normally no need to enable lockpicking - just set up the above spawnargs. There is a &#039;&#039;pickable&#039;&#039; spawnarg set to 1 by default. If set to 0 then the door becomes unpickable. But hard to think of an application except in testing or perhaps a special custom situation where it is switched by script perhaps.&lt;br /&gt;
&lt;br /&gt;
===Open, Partially Open, or Closed Door at Game Start===&lt;br /&gt;
&lt;br /&gt;
By default, doors are closed at game start. If you want a door to be already open or partially open then do the following.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note well: Create all doors in their &#039;&#039;closed&#039;&#039; position. Adjust as follows and they will automatically be at the open position when game starts.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Already Open Rotating Door:&lt;br /&gt;
* Select the door.&lt;br /&gt;
* Select the entity inspector&lt;br /&gt;
* Check &#039;&#039;show inherited properties&#039;&#039;&lt;br /&gt;
* Select the &#039;&#039;open&#039;&#039; property&lt;br /&gt;
* Edit the value to 1 in the input box below and tick the check button&lt;br /&gt;
* The door will now be fully open at game start.&lt;br /&gt;
&lt;br /&gt;
* If you want it only partly open:&lt;br /&gt;
* Make sure its &#039;&#039;open&#039;&#039; property is set to 1 as above.&lt;br /&gt;
* Right click the entity inspector and select &#039;&#039;add property&#039;&#039; &lt;br /&gt;
* Click the + sign on the left of the top line where atdm:mover_door is listed to open the folder. (if atdm:mover_door is not listed then the entity was likely changed from eg, func_static. If so, save the map and reload to update the add property list)&lt;br /&gt;
*  scroll down, select &#039;&#039;start_rotate&#039;&#039; then click {{ok}}&lt;br /&gt;
* This adds it to the property list.&lt;br /&gt;
* Now select &#039;&#039;start_rotate&#039;&#039; in the property list.&lt;br /&gt;
* Edit the bottom line of the input box &#039;&#039;below&#039;&#039; the properties window to the angle you want in the same form as described in the &#039;&#039;Rotate Direction and Open Angle&#039;&#039; section. So for example, to have a door that has a fully open default &#039;&#039;rotate&#039;&#039; value of 0 90 0 to start only half open you would give it a &#039;&#039;start_rotate&#039;&#039; value of 0 45 0. &lt;br /&gt;
* In a similar way add the property &#039;&#039;first_frob_open&amp;quot;.&lt;br /&gt;
* Set it to 1 and a partly open door should then open fully on the first frob.&lt;br /&gt;
* Set it to 0 and a partly open door should close on the first frob.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Already Open Sliding Door:&lt;br /&gt;
* Select the door.&lt;br /&gt;
* Select the entity inspector&lt;br /&gt;
* Check &#039;&#039;show inherited properties&#039;&#039;&lt;br /&gt;
* Select the &#039;&#039;open&#039;&#039; property&lt;br /&gt;
* Edit the value to 1 in the input box below and click {{check}} or press {{key-enter}}&lt;br /&gt;
* The door will now be fully open at game start.&lt;br /&gt;
&lt;br /&gt;
* If you want it only partly open:&lt;br /&gt;
* Right click the entity inspector and select &#039;&#039;add property&#039;&#039; &lt;br /&gt;
* Make sure its &#039;&#039;open&#039;&#039; property is set to 1&lt;br /&gt;
* Click the + sign on the left of the top line where atdm:mover_door is listed to open the folder.&lt;br /&gt;
*  scroll down, select &#039;&#039;start_position&#039;&#039; then click OK. (if atdm:mover_door is not listed then the entity was likely changed from eg, func_static. If so, save the map and reload to update the add property list)&lt;br /&gt;
* This adds it to the property list.&lt;br /&gt;
* Now select &#039;&#039;start_position&#039;&#039; in the property list.&lt;br /&gt;
* Edit the bottom line of the input box &#039;&#039;below&#039;&#039; the properties window to the position you want in the same form as described in the &#039;&#039;Sliding (Translation) Amount and Direction&#039;&#039; section. So for example, to have a door that has a fully open default &#039;&#039;translate&#039;&#039; value of 0 50 0 to start only half open you would give it a &#039;&#039;start_position&#039;&#039; value of 0 25 0.&lt;br /&gt;
* In a similar way add the property &#039;&#039;first_frob_open&amp;quot;.&lt;br /&gt;
* Set it to 1 and a partly open door should then open fully on the first frob.&lt;br /&gt;
* Set it to 0 and a partly open door should close on the first frob.&lt;br /&gt;
&lt;br /&gt;
===Rotation Centre, Pivot, Hinge point===&lt;br /&gt;
&lt;br /&gt;
The centre of rotation of a door is at the origin point of its entity and the door rotates with reference to the orientation of that origin point, not the world map. See &#039;&#039;Rotate Direction...&#039;&#039; for more about that. This section only deals with the &#039;&#039;position&#039;&#039; of the rotation centre in the door.&lt;br /&gt;
&lt;br /&gt;
Model Door Centre of Rotation:&amp;lt;br&amp;gt;&lt;br /&gt;
The centre of rotation of a model door cannot be changed within Dark Radiant. Because a model door rotates around the centre &#039;spine&#039; of its back edge this will cause clipping (penetration into solid) as in this example (where the door is set to open to 89 degrees for clarity):&amp;lt;BR&amp;gt;[[Image:modelClipping.jpg]]&amp;lt;BR&amp;gt; So care is needed with placement. You will not normally position a door right next to a wall as in the example but against a shallow frame so clipping will barely be noticeable but either way it can be fixed. You can correct it by adding a translation (see &#039;&#039;Sliding (Translation) Directions&#039;&#039;) value of half the door width in the direction of the door handle. This will gently move the door out as it rotates to clear any solid on that side as in this diagram:&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DoorClip.jpg]]&amp;lt;br&amp;gt;&lt;br /&gt;
Half a door width will typically be about 2. Any &#039;attachments&#039; such as door handles will still synchronize with the door movement whether the door is rotating, sliding, or both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Brush Door Centre of Rotation:&amp;lt;br&amp;gt;&lt;br /&gt;
The centre of rotation of a brush door &#039;&#039;can&#039;&#039; be changed. The default origin point of a brush is at its centre. Therefore a default rotating brush door will rotate around its centre when you first create it. So, mappers will commonly need to move that rotation point to a corner or even to some other offset position for example, for an openable window using the door function.&lt;br /&gt;
&lt;br /&gt;
Put simply, to move the rotation point of a brush door you need to move the entity origin relative to the brush(es.)&lt;br /&gt;
&lt;br /&gt;
Moving the entity origin (centre of rotation) relative to a brush door:&lt;br /&gt;
&lt;br /&gt;
* Select the brush door&lt;br /&gt;
* Select &#039;&#039;Vertices mode&#039;&#039; (default shortcut key is {{key|name=V}} or button on top toolbar &#039;Select Vertices&#039;)&lt;br /&gt;
* Drag the door&#039;s entity origin to the point where you want the door to rotate. This should be on the corner on the leading edge side (the side to where the door is opening.) to avoid clipping as in this diagram....&lt;br /&gt;
[[Image:getCorner.jpg]]&lt;br /&gt;
* You should now find that door rotates around that point.&lt;br /&gt;
&lt;br /&gt;
===Rotate Direction and Open Angle===&lt;br /&gt;
&lt;br /&gt;
By default, rotating doors open anti-clockwise (viewed from above) by 90 degrees from the start orientation. If you want to change this edit the &#039;&#039;rotate&#039;&#039; property in the entity inspector. Don&#039;t confuse this &#039;&#039;rotate&#039;&#039; property with the &#039;&#039;rotation&#039;&#039; property. In the entity inspector remember that to see the inherited rotate property you must check the box &#039;Show inherited properties&#039;.&lt;br /&gt;
&lt;br /&gt;
The three values shown in the rotate property are degrees from the closed position around Y Z X (absolute map axes Front, Top, Side views in DR&#039;s ortho view.)&lt;br /&gt;
&lt;br /&gt;
* Positive Y = Open clockwise (Dark Radiant grid front view, looking north)&lt;br /&gt;
* Negative Y = Open anti-clockwise (Dark Radiant grid front view, looking north)&lt;br /&gt;
&lt;br /&gt;
* Positive Z = Open anti-clockwise (Dark Radiant grid top view, looking down)&lt;br /&gt;
* Negative Z = Open clockwise (Dark Radiant grid top view, looking down)&lt;br /&gt;
&lt;br /&gt;
* Positive X = Open anti-clockwise (Dark Radiant grid side view, looking west)&lt;br /&gt;
* Negative X = Open clockwise (Dark Radiant grid side view, looking west)&lt;br /&gt;
&lt;br /&gt;
There is a problem when you come to rotations that are not around the main Y Z X axes of the map, for instance a drawbridge that lowers down to the south east. You might think you can combine Y Z X values to get the result you want - and this can be done (for south east use 45 45 90) but it is a bit of a kludge and the drawbridge twists eccentrically as it lowers (though it arrives correctly!)&lt;br /&gt;
&lt;br /&gt;
The values are in the range -179 to +180. Positive values give an anti-clockwise opening rotation (looking down from above) and negative values give a clockwise opening rotation. The value 180 is unique in that it continues in an anti-clockwise rotation when closing rather than returning clockwise so might be used if you can think of some object that might need such a motion when frobbed!&lt;br /&gt;
&lt;br /&gt;
Edit the rotate value by selecting it and using the input box at the bottom and clicking the check(tick) button. That will change the angle the door will open to. Note that the line with the original default of 0 90 0 will still be there but your new entry will be added on a separate line and that is the one that will work in the game. CAUTION: when adjusting later make sure you have your new line selected and not the original! If you do it will appear to change but your first setting will remain unaltered.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* 0 90 0 = Opens anti-clockwise round the entity&#039;s &#039;vertical&#039; to 90 degrees - typical default vertical door.&lt;br /&gt;
* 0 0 90 = Lowers a drawbridge from the entity &#039;vertical&#039; to horizontal.&lt;br /&gt;
* 0 0 -45 = Opens clockwise by 45 degrees viewed from the east side. This might suit a skylight in a sloping roof.&lt;br /&gt;
&lt;br /&gt;
&#039;rotate&#039; cannot be combined with translate motions (see [[#Sliding (Translation) Amount and Direction]]) in one door; you need to bind one door to another and link they by targetting one to the other. By that means you can produce exotic and useful motions. A door opening against an upward-sloping floor can thus have a &#039;&#039;lifting hinge&#039;&#039; and raise up slightly to clear the floor; a door can rotate towards you and slide back to one side very effectively.&lt;br /&gt;
&lt;br /&gt;
===Sliding (Translation) Amount and Direction===&lt;br /&gt;
&lt;br /&gt;
By default a Dark Mod door will rotate open. For most sliding doors you want to stop them rotating as well as make them slide. You cannot delete (remove) the &#039;&#039;rotate&#039;&#039; property - you have to set the &#039;&#039;rotate&#039;&#039; property to 0 0 0 to stop a door rotating (see &#039;&#039;Rotate Direction and Open Angle&#039;&#039;.)&lt;br /&gt;
&lt;br /&gt;
Now edit the &#039;&#039;translate&#039;&#039; property value by selecting it (remember to have inherited properties box checked) and using the input box at the bottom and clicking the check(tick) button. That will change the distance the door will slide to. Note that the line with the original default of 0 0 0 will still be there but your new entry will be added on a separate line and that is the one that will work in the game. CAUTION: when adjusting later make sure you have your new line selected and not the original! If you do it will appear to change but your first setting will remain unaltered.&lt;br /&gt;
&lt;br /&gt;
Typically (but not always) you will want your sliding door to slide the width of the door. The three values in the translate property by default are 0 0 0 and are X Y Z &#039;&#039;absolute map&#039;&#039; values (irrespective of door orientation) where:&lt;br /&gt;
&lt;br /&gt;
* Positive X = Slide East (Right side of Dark Radiant grid in top view)&lt;br /&gt;
* Negative X = Slide West (Left side of Dark Radiant grid in top view)&lt;br /&gt;
* Positive Y = Slide North (top of Dark Radiant grid in top view)&lt;br /&gt;
* Negative Y = Slide South (bottom of Dark Radiant grid in top view)&lt;br /&gt;
* Positive Z = Slide Up (Top of Dark Radiant grid in side views)&lt;br /&gt;
* Negative Z = Slide Down (Bottom of Dark Radiant grid in side views)&lt;br /&gt;
&lt;br /&gt;
So for a 50 unit wide door you want to slide fully to the east you would use 50 0 0 for the translate property values. A 100 unit portcullis sliding vertically up would need 0 0 100 to be fully raised.&lt;br /&gt;
&lt;br /&gt;
=== Doors Collision/Push Behaviour ===&lt;br /&gt;
Doors push all entities by default, except for the player. Doors will also stop moving when anything blocks their movement. However, this default behaviour can be changed by setting appropriate spawnargs:&lt;br /&gt;
&lt;br /&gt;
Set &#039;&#039;&#039;push_player&#039;&#039;&#039; to &#039;&#039;&#039;1&#039;&#039;&#039; to let the player be pushed by this door:&lt;br /&gt;
 &amp;quot;push_player&amp;quot;  &amp;quot;1&amp;quot;  // Push the player too (default is off)&lt;br /&gt;
&lt;br /&gt;
By default &#039;&#039;&#039;stop_when_blocked&#039;&#039;&#039; is set to 1 and if a door is blocked by an entity then even if the entity is removed afterwards, the door stays where it is. The next frob will close the door.&lt;br /&gt;
&lt;br /&gt;
Set &#039;&#039;&#039;stop_when_blocked&#039;&#039;&#039; to &#039;&#039;&#039;0&#039;&#039;&#039; to prevent the door from ending the opening sequence when anything blocks its way. It will still pause - but continue to open if the block is removed.&lt;br /&gt;
 &amp;quot;stop_when_blocked&amp;quot;   &amp;quot;0&amp;quot;  // door keeps moving after being blocked (default is off)&lt;br /&gt;
With this setting, doors will still stop at blocking entities (the player, for instance), but will continue to move when the entity moves out of the way.&lt;br /&gt;
&lt;br /&gt;
There is another spawnarg which stops a door pushing a moveable. Apply this to the &#039;&#039;moveable&#039;&#039;, not the door...&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;notPushable&amp;quot;   &amp;quot;1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Door Sounds===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are multiple ways to put sounds on doors.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;snd_open&#039;&#039; &amp;lt;br&amp;gt; &lt;br /&gt;
Sound is triggered as the door begins to open.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;snd_opened&#039;&#039; &amp;lt;br&amp;gt; &lt;br /&gt;
Sound is triggered when the door finishes opening. Defaults to &amp;quot;nosound&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;snd_move&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The sound plays while the door moves.  Defaults to &amp;quot;nosound&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;snd_close&#039;&#039;  &amp;lt;br&amp;gt;&lt;br /&gt;
Sound is triggered as the door finishes closing.&lt;br /&gt;
&lt;br /&gt;
The following sounds should be left on the default sound in most cases so players clearly know what is going on:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;snd_locked&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The sound played when a player or an AI tries to open a locked door.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;snd_unlock string&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The sound played when a door is unlocked.&lt;br /&gt;
&lt;br /&gt;
You can silence any of these sounds by setting the following properties as shown:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;snd_open nosound&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;snd_close nosound&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Don&#039;t just use a dash - as it seems to cause a sound of its own.&lt;br /&gt;
&lt;br /&gt;
===Sound Propagation through Doors and Doorways===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This information will change significantly with the release of 2.0.  See&#039;&#039; [[Controlling Sound Loss Across Portals]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The sound volume reduction to the player (ie, the sound the player hears) is fixed and constant in a cvar which adds a distance factor to the original sound. It is recommended that you do not change that because it will affect other FMs. Currently there is no way to change the way that sound to the player is reduced through doors and doorways.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sound propagation to AI, eg, impact sounds or guard yells is treated separately:&lt;br /&gt;
&lt;br /&gt;
Sound propagation to AI relies on visportals. For details study [[Sound Propagation: Part 1]] and [[Sound Propagation: Part 2]] as well as [[Visportals]] This tutorial will just cover the relevant sound and sound propagation &#039;&#039;properties&#039;&#039; of doors. If you set the &#039;&#039;show inherited properties&#039;&#039; box in the entity inspector you can see them as described here.&lt;br /&gt;
&lt;br /&gt;
Remember, the following have no effect on what the player hears through a door or doorway.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;loss_open&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Drop in sound volume in dB propagated to AI (not player) when going through an open door. (default 1dB)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;loss_closed&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Drop in sound volume in dB propagated to AI (not player) when going through a closed door. (default 15dB) You would want to set this very high to block all sound with a thick door but very low for a barred gate for example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;loss_double_open&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Drop in sound volume in dB propagated to AI (not player) when going through double doors when only one is open. (default 1dB)&lt;br /&gt;
&lt;br /&gt;
There are also various sound properties for lockpicking:&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;snd_lockpick_pin_1 through 14&#039;&#039; and &#039;&#039;snd_lockpick_pin_success&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Speed of Door Opening and Closing===&lt;br /&gt;
&lt;br /&gt;
Rotating Door Speed:&amp;lt;br&amp;gt;&lt;br /&gt;
At the time of writing, the time a rotating door takes to open or close is set in the &#039;&#039;move_time&#039;&#039; property whatever its maximum open angle. So with rotation set at say 150 degrees the door just opens faster than at say 80 degrees. This is likely to be changed to a constant angular velocity so check to see if there a new property added if the following no longer works. The problem is that if an interruptable (see Extra Notes) door is frobbed while in motion it stops; another frob will reverse the motion - so even if the door is only open a crack it will still take the full time to close and vice versa.&lt;br /&gt;
&lt;br /&gt;
To change the time a rotating door takes to open or close, make sure the door is selected then...&lt;br /&gt;
&lt;br /&gt;
* Right click the entity inspector and check &#039;&#039;show inherited properties&#039;&#039;&lt;br /&gt;
* Scroll down, select &#039;&#039;move_time&#039;&#039;&lt;br /&gt;
* Edit the second line of the input box &#039;&#039;below&#039;&#039; the properties window to the time you want.&lt;br /&gt;
* The time is in seconds and decimal fractions can be used.&lt;br /&gt;
* The default is 1 second and if set to this then the door opens and closes in one second whatever the maximum open angle, great or small.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sliding Door Speed:&amp;lt;br&amp;gt;&lt;br /&gt;
The speed of a sliding door is set in the &#039;&#039;translate_speed&#039;&#039; property. To add this, make sure the door is selected then...&lt;br /&gt;
&lt;br /&gt;
* Right click the entity inspector and check &#039;&#039;show inherited properties&#039;&#039;&lt;br /&gt;
* Scroll down, select &#039;&#039;translate_speed&#039;&#039;&lt;br /&gt;
* Edit the second line of the input box &#039;&#039;below&#039;&#039; the properties window to the speed you want.&lt;br /&gt;
* The speed is in Dark Radiant grid units per second.&lt;br /&gt;
* The default is 0 and if set to this then the door slides open in one second whatever the distance, great or small.&lt;br /&gt;
* CAUTION: If you later change the door back to a rotating door then delete the &#039;&#039;translate_speed&#039;&#039; property or ensure it is set to 0 as (at the time of writing but this will be fixed) a bug makes rotating doors open and close instantly. (Note: you can still mix sliding with rotating but check - this bug might only be if &#039;&#039;translate&#039;&#039; is set to 0 0 0)&lt;br /&gt;
&lt;br /&gt;
===Visportals and Doors===&lt;br /&gt;
&lt;br /&gt;
A visportal face surrounded by solid at its edges and in contact with a door is closed when the door is closed and enabled when the door is open. In most cases you will place a visportal in contact with a working door unless you can see through the door (such as a true glass door or barred gate*.) For full details see [[Visportals]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;*As of 2.0 it is possible to make visportals that remain transparent when closed for gates and windows.  See&#039;&#039; [[Controlling Sound Loss Across Portals]]&lt;br /&gt;
&lt;br /&gt;
==Auto-Closing/Opening Doors==&lt;br /&gt;
Doors that automatically close after being open for some time are easy to setup: Each frobmover entity supports these spawnargs:&lt;br /&gt;
&lt;br /&gt;
;&amp;quot;auto_close_time&amp;quot;:Set this to something &amp;gt;= 0 to let the mover automatically close (again) after this time when being fully opened (measured in seconds). Defaults to -1, which means &#039;do not autoclose&#039;. The event is also activated when the mover starts at the open position at map start.&lt;br /&gt;
;&amp;quot;auto_open_time&amp;quot;:&amp;quot;Set this to something &amp;gt;= 0 to let the mover automatically open (again) after this time when being fully closed (measured in seconds). Defaults to -1, which means &#039;do not autoopen&#039;. The event is also activated when the mover starts at the closed position at map start.&lt;br /&gt;
&lt;br /&gt;
Old text:&lt;br /&gt;
&lt;br /&gt;
Note that auto-closing doors and AI closing doors behind them, is very much work in progress at the time of writing, so for now, this is another method that works. Check first if true AI closing of doors is working yet before bothering with this!&lt;br /&gt;
&lt;br /&gt;
I have one door that I particularly want the AI to close as there is a bit of frame lag inside if not. So I set this up and it works good as an auto-closing door - not as good as a true AI closing door as it will auto close when the player goes through as well but it does look very effective to see AI going through and closing the door behind them. Not tested exhaustively so I don&#039;t know if there could be any downside. Here&#039;s what to do....&lt;br /&gt;
&lt;br /&gt;
First a quick summary to make it more clear:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;A trigger_relay is used both as a relay AND carries a stim. We put the trigger_relay with its stim in the path of the open door. The door has a response property. When it opens and contacts the stim its response is to send a signal back to the relay. The relay pauses then closes the door...&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* First, optionally give your door a suitable name like autodoor1, whatever.&lt;br /&gt;
* Copy that name to the clipboard.&lt;br /&gt;
&lt;br /&gt;
Next we need a relay with a delay:&lt;br /&gt;
&lt;br /&gt;
* Create entity &amp;gt; darkmod &amp;gt; trigger_relay&lt;br /&gt;
&lt;br /&gt;
* Place it roughly at the position the door will be at when open and to be on the safe side 3/4th of the way to the far end of the door (not the hinge end) to give max distance from the close door.&lt;br /&gt;
&lt;br /&gt;
* Add the property &#039;target&#039; and paste in the door name you just copied.&lt;br /&gt;
&lt;br /&gt;
* Give the relay itself a name, eg, autoDoor_relay_1, and copy that name to the clipboard, you&#039;ll need that too in a bit.&lt;br /&gt;
&lt;br /&gt;
* Add the property delay and the value 3 - this is the delay in seconds before the door will close; 3 seems about right but 2 might be worth a try because to that 3 is added a random value between 0 to 0.5 seconds from the Time Interval we entered for the stim firings.&lt;br /&gt;
&lt;br /&gt;
* Add the property &#039;wait&#039; and the value 3. This is the time before it can work again in seconds. If you set it too low then in theory the door might trigger again but in this situation I don&#039;t think it&#039;s possible. Too long, eg, one minute, and it won&#039;t work if the AI goes back through the door before then. If this value is -1 then the whole thing will only work ONCE so might be used for an AI who goes through once, closes it behind him, but you don&#039;t want it to be an autodoor thereafter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#039;s the relay, now we add a stim to it:&lt;br /&gt;
&lt;br /&gt;
* Still with the trigger relay selected, go to {{menu|Entity|Stim/Response}}&lt;br /&gt;
&lt;br /&gt;
* Custom stim tab.&lt;br /&gt;
&lt;br /&gt;
* Click Add stim type, select the new custom stim type you just made at the bottom of the list and type in eg, autoDoorStim at top right in the input box.&lt;br /&gt;
&lt;br /&gt;
* Click the stim tab and the little drop down arrow against the &#039;type&#039; selector at bottom left and you should see your new custom stim name. Select it.&lt;br /&gt;
&lt;br /&gt;
* Select the new autoDoorStim in the list and on the right you need only type in the radius box 15.0 There is quite a lot of room for error. I had it working on 10 and also on 25. The value should be less than the distance to the closed door else it will trigger open! But no so small that the door might not reach it.&lt;br /&gt;
&lt;br /&gt;
* Select the check box for Time Interval and enter 500 (millisecs.) This is so it doesn&#039;t keep firing more frequently than is necessary. This stim will be firing all through your mission whether the door is used or not so if you had dozens of these then maybe it would affect performance. Too big a number and there may be a long delay before the door shuts - but it will be random depending on the next time the stim happens to fire. We&#039;ll control the delay we want more precisely later.&lt;br /&gt;
&lt;br /&gt;
* Click {{ok}} to confirm it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#039;s the stim set up, now for the response to it which is put on the door....&lt;br /&gt;
&lt;br /&gt;
* Select the doorm, then use {{menu|Entity|Stim/response}} and select the response tab.&lt;br /&gt;
&lt;br /&gt;
* Click the little drop down arrow against the &#039;type&#039; selector at bottom left and you should see your new custom stim name. Select it.&lt;br /&gt;
&lt;br /&gt;
* Right click in the big &#039;&#039;Response Effects&#039;&#039; box on the bottom right of the panel.&lt;br /&gt;
&lt;br /&gt;
* Add New Effect and you should get a default &#039;Activate Response&#039; response added to the list. Double click it.&lt;br /&gt;
&lt;br /&gt;
* In the Effect selector at the stop select &#039;Trigger&#039;&lt;br /&gt;
&lt;br /&gt;
* in the Target box, paste in the name of the relay you copied or you can select it from the list at the little arrow.&lt;br /&gt;
&lt;br /&gt;
* Leave the Activator box empty.&lt;br /&gt;
&lt;br /&gt;
* Click {{apply}} and then {{ok}} on the main S &amp;amp; R panel bottom right.&lt;br /&gt;
&lt;br /&gt;
It should now work. No need to wait for an AI, just frob the door and watch it close itself. If not, check the position of the stim brush is close to where the door stops when open.&lt;br /&gt;
&lt;br /&gt;
==AI Door management==&lt;br /&gt;
&lt;br /&gt;
See also [[#Keys_carried_by_AI]] above.&lt;br /&gt;
&lt;br /&gt;
By default AI will open doors and close them behind them. Here are some spawnargs the mapper can use to modify that behaviour:&lt;br /&gt;
&lt;br /&gt;
;&amp;quot;ai_should_not_handle&amp;quot; :If set to 1, AI will not attempt to handle it and add it to the forbidden areas when closed (so that it doesn&#039;t try to path through). They might still walk through the door when it is open though. Useful if you have some special use door that you don&#039;t want the AI to operate.&lt;br /&gt;
&lt;br /&gt;
;&amp;quot;ai_should_not_close&amp;quot; :If set to 1, AI will not close the door behind them unless it obstructs them.&lt;br /&gt;
&lt;br /&gt;
;&amp;quot;canRemainOpen&amp;quot; :If set to 1, it&#039;s the same as &amp;quot;ai_should_not_close, with the added behavior that this is ignored if the door needs to be relocked, or the door is marked &amp;quot;shouldBeClosed&amp;quot;. &#039;&#039;&#039;(This spawnarg is available starting in TDM 2.02.)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get AI to unlock/relock specific doors there are two methods currently:&lt;br /&gt;
&lt;br /&gt;
1. add the following spawnarg/value to the AI:&lt;br /&gt;
&lt;br /&gt;
;&amp;quot;can_unlock1&amp;quot; &#039;&#039;&amp;lt;doorname&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Do NOT use can_unlock_1.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For additional doors on the same AI use &#039;&#039;can_unlock2 doorname&#039;&#039; etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. In the editor position an actual key that works for that door on the AI and also add to the key bind &amp;lt;AIname&amp;gt; and also bindToJoint LeftHips_Dummy (see other joints names elsewhere in wiki.) Currently, if the player pickpockets the key then the AI seeks an alternate route but otherwise does nothing (?) This may be upgraded in the future to better strategies.&lt;br /&gt;
&lt;br /&gt;
3. There is the possibility in the future of an additional method which would just use special attach spawnargs to make the above easier. The key would spawn at the correct position at game start. Watch this space.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Door Handling Positions===&lt;br /&gt;
&lt;br /&gt;
It is also possible to set custom door handling positions for the AI. This is especially useful when the standard routine that lets the AI choose their standing positions while opening and closing the door fails, leaving them standing still, or circling around in front of the door helplessly.&lt;br /&gt;
&lt;br /&gt;
Place a movers &amp;gt; &#039;&#039;atdm:door_handling_position&#039;&#039; entity where you want the AI to stand while opening/closing the door from this side.&lt;br /&gt;
&lt;br /&gt;
On the door, you need to set the spawnarg &amp;quot;door_handle_position&amp;quot; &amp;quot;name_of_door_handling_position&amp;quot;. You can also place a &#039;&#039;door_handling_position&#039;&#039; on each side of the door, and the AI will automatically choose the right one. In this case, you need to set spawnargs with &amp;quot;door_handle_position_1&amp;quot; etc., and the corresponding names of the &#039;&#039;door_handling_position&#039;&#039; entities on the door.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;door_handling_position&#039;&#039; entities can also carry spawnargs that define the behaviour of the AI, which are useful for example for doors that can only be opened or locked from one side:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;quot;ai_no_open&amp;quot;&#039;&#039;&#039; If set to true, the AI will not try to open the door from this side (but will still walk through when the door is already open).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;quot;ai_no_close&amp;quot;&#039;&#039;&#039; If set to true, the AI will not attempt to close the door from this side.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;quot;ai_no_unlock&amp;quot;&#039;&#039;&#039; If set true, the AI will not be able to unlock the door from this side, but still use it when it is not locked.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;quot;ai_no_lock&amp;quot;&#039;&#039;&#039; If this is set true, the AI will not lock the door from this side.&lt;br /&gt;
&lt;br /&gt;
===Door Controllers===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Available in TDM 2.02+&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can design a door so it&#039;s operated by buttons or levers or switches (aka &#039;&#039;controllers&#039;&#039;):&lt;br /&gt;
&lt;br /&gt;
1. Set up the door in the normal manner. It can be a rotating door, a sliding door, a locked door, etc.&lt;br /&gt;
&lt;br /&gt;
2. Turn off the &amp;quot;frobable&amp;quot; spawnarg on the door. (&amp;quot;frobable&amp;quot; &amp;quot;0&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
3. Create a controller on each side of the door. If you&#039;re setting up a locked door, there&#039;s no need to put any locking information on the controllers.&lt;br /&gt;
&lt;br /&gt;
4. Give each controller the door as a target. (Alternatively, you can give the door these spawnargs: &amp;quot;door_controller1&amp;quot; &amp;quot;&amp;lt;name of controller 1&amp;gt;&amp;quot;, &amp;quot;door_controller2&amp;quot; &amp;quot;&amp;lt;name of controller 2&amp;gt;&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
When the game starts, it will transfer any locking information from the door to the controllers.&lt;br /&gt;
&lt;br /&gt;
Both the player and any AI that wants to use the door will use the controllers to operate it. Any key, &amp;quot;can_unlock&amp;quot;, or lockpick settings you would normally use at the door are now used at the controllers.&lt;br /&gt;
&lt;br /&gt;
Controllers and &#039;&#039;door_handling_position&#039;&#039; entities can be used on the same door, but in that situation the &#039;&#039;door_handling_position&#039;&#039; entities don&#039;t define where the AI stands to operate the door. They simply provide the &amp;quot;ai_no_*&amp;quot; spawnargs that define AI behavior on each side of the door.&lt;br /&gt;
&lt;br /&gt;
You may have a controller on only one side of the door. Note that, since the door is not frobable, the player and the AIs won&#039;t be able to operate the door from the non-controller side, even if that side has a &#039;&#039;door_handling_position&#039;&#039; entity.&lt;br /&gt;
&lt;br /&gt;
===AI locking doors behind them===&lt;br /&gt;
&lt;br /&gt;
If one AI is involved (no one else is in the queue), he&#039;ll lock it behind him if he had to unlock it in the first place.&lt;br /&gt;
&lt;br /&gt;
Prior to TDM 1.08, if more than one AI is using the door at the same time (there&#039;s a queue), the first AI unlocks the door, and the last AI through will only lock it if it&#039;s marked &amp;quot;should_always_be_locked&amp;quot; AND they have a &amp;quot;can_unlock&amp;quot; for that door or they have a key for that door. The last AI to use the door doesn&#039;t know that the first AI found it locked, because that info is kept per AI, and not per door. &lt;br /&gt;
&lt;br /&gt;
Starting in TDM 1.08, if the first AI in a door queue found the door locked, that information is remembered by the door and the last AI through uses it to relock the door, as long as they have a &amp;quot;can_unlock&amp;quot; for that door or they have a key for that door.&lt;br /&gt;
&lt;br /&gt;
In the rare case where a door is set up to use door-handling position entities (necessary for AI to use sliding doors), either or both of those entities can have the &amp;quot;ai_no_lock&amp;quot; spawnarg, which means AI aren&#039;t allowed to lock the door from that side.&lt;br /&gt;
&lt;br /&gt;
==Doors as Triggers==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by Ishtvan &amp;amp; greebo&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Doors (or any binary frob mover, buttons, levers, etc) now have the option to [[Triggers|trigger]] their target on closing or opening. (For definition purposes, a button is defined as &amp;quot;closed&amp;quot; in the state when it starts out and &amp;quot;open&amp;quot; in the state you press it down to. I know that&#039;s a little non-intuitive, but it came from deriving from doors).&lt;br /&gt;
&lt;br /&gt;
New spawnargs on frob movers:&lt;br /&gt;
;&amp;quot;trigger_on_open&amp;quot; :If set to 1, this binary mover will trigger its targets when it starts out completely closed and is opened.&lt;br /&gt;
;&amp;quot;trigger_when_opened&amp;quot;:If set to 1, this binary mover will trigger its targets when it is completely opened. Code defaults to 0.&lt;br /&gt;
;&amp;quot;trigger_on_close&amp;quot;:If set to 1, this binary mover will trigger its targets when it completely closes after being open.&lt;br /&gt;
&lt;br /&gt;
== Suspicious Doors ==&lt;br /&gt;
&lt;br /&gt;
If you give a door the spawnarg &#039;&#039;&#039;&amp;quot;shouldBeClosed&amp;quot; &amp;quot;1&amp;quot;&#039;&#039;&#039;, then AI will treat it as suspicious if they find the door open.&lt;br /&gt;
&lt;br /&gt;
Doors with that spawnarg should work like this:&lt;br /&gt;
&lt;br /&gt;
- an AI opening the door knows he&#039;s not to become suspicious if he opened the door&lt;br /&gt;
&lt;br /&gt;
- nearby AI alerted by the open door will also not react if they can see the door, and can see the AI that opened it&lt;br /&gt;
&lt;br /&gt;
- AI who come upon the open door later probably won&#039;t be able to see the AI that opened it, so they&#039;ll treat it as suspicious&lt;br /&gt;
&lt;br /&gt;
- if the AI who opened the door comes upon the door later, and it&#039;s still open, and no one&#039;s touched it since he opened it, he&#039;ll see his name on the door and won&#039;t become suspicious. &amp;quot;Oh, crap. I forgot to close it earlier.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
- If an AI comes upon an open door that should be closed, he should close it whether he becomes suspicious or not.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Post TDM 2.00:&#039;&#039;&#039;&lt;br /&gt;
-  AI turn to look at a door they see opening.  The player can crack open a suspicious door to peek out w/o grabbing the attention of a nearby AI. After 5s, the AI will notice the cracked open door. Non-suspicious doors can be cracked open indefinitely w/o nearby AI noticing.&lt;br /&gt;
&lt;br /&gt;
==Slanted or Tilted Doors==&lt;br /&gt;
Slanted or tilted doors can be made as follows:&lt;br /&gt;
&lt;br /&gt;
1) Place your door, preferrably one of the prefab doors, which have a model door and model handle and all the rotation spawnargs pre-set.&lt;br /&gt;
&lt;br /&gt;
2) rotate and place the door+handle model into place you want it to be. Now, if you use the door in the game, the door will rotate around the world z-axis, and not the door model z-axis (which is rotated).&lt;br /&gt;
&lt;br /&gt;
3) to get the door to rotate around the door model z-axis, you must place a model (any model will do, and it can be placed anywhere in the map). Rotate the new model into the same orientation your door model was rotated, i.e. if you door is rotated 45 degrees around the x-axis, do the same rotation on the new model.&lt;br /&gt;
&lt;br /&gt;
4) bind the doors on the new model. This makes the doors start rotating along the new model origin (which is rotated the same way as the doors).&lt;br /&gt;
&lt;br /&gt;
5) working slanted door.&lt;br /&gt;
&lt;br /&gt;
Do note, that all the rotated objects need to be models (suspicion, not tested). You can export DR built stuff into a model using the DR ase exporter script. For custom doors, remember that the exporter places the model origin at the map orogon if you do not choose the &amp;quot;place origin in the middle of the object&amp;quot; option.&lt;br /&gt;
&lt;br /&gt;
Also note that the AI probably cannot use slanted doors and might get stuck (suspicion, not tested).&lt;br /&gt;
&lt;br /&gt;
There is a link to a test map here:&lt;br /&gt;
http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/?p=395486&lt;br /&gt;
&lt;br /&gt;
==Skins: A Wide Variety of Door Textures==&lt;br /&gt;
&lt;br /&gt;
This is to remind you that as with many Dark Mod models, there is a wide range of extras skins (textures) available for door models. There are now several basic door entities of different sizes so choose your size first. Then enter the spawnarg: skin with any temporary value. Now select it and click the skin button at the bottom of Dark Radiant&#039;s Entity Inspector and you will find a large of range of skin textures from which to select to give you a choice of appearances for your door.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Extra Notes==&lt;br /&gt;
The property &#039;&#039;interruptable&#039;&#039; determines whether a door can be stopped by frobbing while it is opening or closing. So by frobbing then frobbing again, the player can open a door to any position, eg, slightly ajar to peek through.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;func_darkmod_door&#039;&#039; is no longer used (just in case you come across it in the Dark Mod forums or wiki.) &#039;&#039;&#039;&amp;lt;code&amp;gt;atdm:mover_door&amp;lt;/code&amp;gt;&#039;&#039;&#039; is the entity to use.&lt;br /&gt;
&lt;br /&gt;
{{tutorial-editing}}&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Performance:_Essential_Must-Knows&amp;diff=16007</id>
		<title>Performance: Essential Must-Knows</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Performance:_Essential_Must-Knows&amp;diff=16007"/>
		<updated>2013-04-07T07:47:49Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;written by Fidcal, some additions by Sotha&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This article relates to performance issues &#039;&#039;for mappers&#039;&#039;. For performance information &#039;&#039;for players&#039;&#039;, see [[Performance Tweaks]]&lt;br /&gt;
&lt;br /&gt;
All mappers should know the following but remember not to blindly follow every rule but consider the balance between performance and presentation on a case by case basis. Don&#039;t spoil a beautiful view or an interesting interaction to gain efficiency unless it is worth the trade.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Useful Cvars==&lt;br /&gt;
&lt;br /&gt;
[http://www.modwiki.net/wiki/CVars_%28Doom_3%29 Modwiki Cvars]&lt;br /&gt;
&lt;br /&gt;
[[Console Useful Controls]]&lt;br /&gt;
&lt;br /&gt;
===Frames Per Second===&lt;br /&gt;
&lt;br /&gt;
The console command com_showFps 1 allows you to see the framerate at any part of your map, so that you have an idea of how changes you make affect the FPS in a given area.&lt;br /&gt;
 &lt;br /&gt;
===Triangle Counts===&lt;br /&gt;
&lt;br /&gt;
r_showTris 	... enables wireframe rendering of the world, 1 = only draw visible ones, 2 = draw all front facing, 3 = draw all&lt;br /&gt;
&lt;br /&gt;
===Light Counts===&lt;br /&gt;
&lt;br /&gt;
r_showLightCount 	... 1 = colors surfaces based on light count, 2 = also count everything through walls, 3 = also print overdraw&lt;br /&gt;
&lt;br /&gt;
===Overdraw===&lt;br /&gt;
&lt;br /&gt;
(Shows how much is drawn that the viewer never sees. Good for scenes with lots of alpha-test materials or post-processing.)&lt;br /&gt;
&lt;br /&gt;
r_showOverDraw 	... 1 = geometry overdraw, 2 = light interaction overdraw, 3 = geometry and light interaction overdraw &lt;br /&gt;
&lt;br /&gt;
===Interactions===&lt;br /&gt;
&lt;br /&gt;
r_showInteractions ...1 = shows the number of light/surface interactions that were generated that frame, as well as the number of shadows that were generated. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Build Airtight. Seal out the Void. Avoid Leaks ==&lt;br /&gt;
&lt;br /&gt;
=== Building Airtight ===&lt;br /&gt;
&lt;br /&gt;
Probably the first thing to learn when building a map (mission) with the Doom3 software engine is that you are building in a void and your map must be airtight, sealed against the void, much like a spaceship. Nothing to do with air of course but with the way the software renders your map. These are the rules:&lt;br /&gt;
&lt;br /&gt;
# Your map must not have any gaps in its outer walls leading to the void. The tiniest hairline, near invisible gap caused by two angled lines that are not grid snapped can be enough to cause a leak.&lt;br /&gt;
# The origin coordinates of any entity must not be in, or exposed to, the void. Keep in mind that it is possible for the origin of an entity to be outside its visible shape. Such an entity may appear to be inside while its origin is outside in the void. And of course no entity must form part of the outer wall so if you convert a beam or group of brushes to func_static for instance, they must not form part of the outer wall.&lt;br /&gt;
# Some materials (textures) such as nodraw do not seal against the void. Such textures must not be used on the surfaces of any brush open to the void.&lt;br /&gt;
# There is a rare type of leak caused if the worldspawn entity has the &#039;angle&#039; property - just delete that property.&lt;br /&gt;
&lt;br /&gt;
The above rules also apply between areas &#039;&#039;within&#039;&#039; your map separated by [[Visportals]] to reduce what needs to be rendered at any one time. So one area can leak to another area &#039;&#039;within&#039;&#039; the outer walls of your map. This is like internal bleeding - there may be no visible symptom but the patient is not functioning very well! With an external leak you will get an error when compiling your map with dmap and the compilation will abort. But with an internal leak no error is reported and the map will compile if it is otherwise OK. The map will work but performance will be reduced because the software will waste effort rendering areas that are not needed. So, there should be no gaps in the separating walls; no entity must form part or all of the separating walls; textures like nodraw should not be used on those walls.&lt;br /&gt;
&lt;br /&gt;
==== Grid Size ====&lt;br /&gt;
&lt;br /&gt;
As of DR 1.6.0 default grid size is set to 1. So it&#039;s really easy, especially for new mappers, to get leaks. Set your preferences to 16 on the grid before doing anything.&lt;br /&gt;
&lt;br /&gt;
Each time you update DR (until it is fixed) it will reset to 1 and you need to save preferences again.&lt;br /&gt;
&lt;br /&gt;
16 is best for walls that seal to void to avoid having leaks.&lt;br /&gt;
&lt;br /&gt;
(8 is considered to be the &amp;quot;absolute minimum&amp;quot; by many veteran mappers)&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== How to detect and fix leaks ===&lt;br /&gt;
&lt;br /&gt;
Note there is more on fixing leaks at [[Leaking maps]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====External Leaks to the Void====&lt;br /&gt;
&lt;br /&gt;
If your map leaks to the void then you will get a &#039;Leaked&#039; error in the console while trying to dmap and the compilation will abort and generate a &#039;pointfile&#039; with a filename prefix the same as your map and the suffix .lin instead of .map in the same folder as your map. In Dark Radiant you can use this to track the path of the leak, determine the cause, and fix it. Use the File menu option &#039;Pointfile&#039; and a red line is drawn along the path of the leak. You can use Ctrl+Shift+L to move the camera along the line towards the leak to the void (useful to spot an actual leak) and Ctrl+Shift+K to move towards the entity at the other end (useful if an entities origin is outside in the void.) With the above rules in mind you will be looking for gaps, entities making up part of the outer walls or else an entities origin outside the walls in the void. If you think you have found and fixed the problem but get the error again check carefully as it might be a different leak or you missed the first one.&lt;br /&gt;
&lt;br /&gt;
====Internal Leaks====&lt;br /&gt;
&lt;br /&gt;
Internal leaks between visportalled areas do not cause a formal error or stop map compilation but they will affect performance and sound propagation. No pointfile is generated so how can you detect them or even know they have occurred? You might realize you have such a leak two ways:&lt;br /&gt;
&lt;br /&gt;
# If you have a visportal that remains open when you would expect it to be closed or unprocessed yet it seems to be set up correctly (see [[Visportals]].)&lt;br /&gt;
# You hear sounds from another area as if they were coming directly through walls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Whenever a pointfile is created, the red line always starts at a specific entity (supposedly the first entity you placed in your map).  You need to find out what entity that is by intentionally opening a leak.  Then you&#039;ll move that entity from zone to zone checking for internal leaks.&lt;br /&gt;
&lt;br /&gt;
To test an internal visportalled area that has no external walls to the void....&lt;br /&gt;
&lt;br /&gt;
# Deliberately make a leak in the &#039;&#039;outer&#039;&#039; wall (to the void) of your map where the area is located by just peeling back a brush a few units.&lt;br /&gt;
# Drag your first entity inside the area to be tested.&lt;br /&gt;
# Visportals seal the area internally when closed in game but they will not do this during dmap compilation so they must be temporarily changed. ALL surfaces of the visportal brush should be changed. Don&#039;t use nodraw or any texture that will not seal but use stone or wood or maybe something very distinctive unused elsewhere in the map then you can use Dark Radiant&#039;s replace textures to restore nodraw after then you need only add the visportal texture manually. If you have visportals inside entity doors then you need to hide those doors temporarily to change the visportal texture.&lt;br /&gt;
# Save the map with a new name so the original is kept as a backup (always play safe)&lt;br /&gt;
# Run dmap in the console. I usually do a &#039;clear&#039; command first too to clear the console so there is less clutter.&lt;br /&gt;
# When the &#039;leak&#039; error appears use the Page up key to scroll up and you should see it refer to the entity relevant to the leak. Make sure it is your first entity if that is what you are testing as described here.&lt;br /&gt;
# Back in Dark Radiant, select Pointfile from the file menu then Shift+Ctrl+K repeatedly to move the camera along the red line from the leak to the entity or just look. If the entity is &#039;&#039;outside&#039;&#039; of the internal area being tested then it is not your first entity and confirms that your area is sealed correctly. If however, it &#039;&#039;is&#039;&#039; your #1 entity then you have a leak in your inner area. NOTE: It sometimes happens that the first entity is referred to in the console leak error message but the pointfile leads to a different entity nearby. The pointfile is just a list of coordinates along the leak path and its final coordinate is the origin of this other entity. Presumably the pointfile is created differently. I wouldn&#039;t worry so long as the console message gave the first entity. Especially if the pointfile entity is within the inner area you are testing anyway.&lt;br /&gt;
# If there is a leak from the internal area then use Shift+Ctrl+K and Shift+Ctrl+L to move the camera along the red line. You need to follow the bends to see where the leak is in the walls to the test area. No need to go all the way out to the external leak you created deliberately - you know about that - how is it leaking from within the inner area to next area? Remember the above &#039;rules&#039; and you need to be looking for gaps or if any part of the wall is an entity.&lt;br /&gt;
# If you can fix it then redo the dmap to see if there is any other leak. Only stop when the only leak leads to an entity in the outer area from your gap to the void. That means your inner area is sealed.&lt;br /&gt;
# Job nearly done. Close up your gap. Remember to retexture your visportals! Save and test again and now there should be no leaks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==Render-Sectioning using Visportals==&lt;br /&gt;
&lt;br /&gt;
If visportals are not used then the entire map will be rendered at once wherever the player is - greatly reducing performance to the point where most  maps are not likely to be playable at all. It is crucial that the map should be compartmentalized using visportals. Study the [[Visportals]] tutorial for details.&lt;br /&gt;
&lt;br /&gt;
===Func Portals===&lt;br /&gt;
&lt;br /&gt;
In scenarios where you would like to force visportals closed while in view, you can use [[Visportals#Visportal_switches:_func_portals | Func_Portals]].&lt;br /&gt;
&lt;br /&gt;
In addition to having more control over portal closure, you can also target a textured (or cubemap-ed, etc) patch to obscure the portal on closure.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==&#039;&#039;func_static&#039;&#039; v &#039;&#039;worldspawn&#039;&#039; Brushes==&lt;br /&gt;
&lt;br /&gt;
By converting &#039;&#039;worldspawn&#039;&#039; brushes to &#039;&#039;func_static&#039;&#039;...&lt;br /&gt;
&lt;br /&gt;
* You can add the property noshadows = 1 so that it doesn&#039;t cast shadows, improving frame rates.&lt;br /&gt;
* It avoids creation of millions of polys in certain situations where the engine converts a brush into loads.&lt;br /&gt;
* It reduces pathfinding complexity (see &#039;&#039;Preventing and Reducing Pathfinding Complexity in Select Locations&#039;&#039; in [[Pathfinding]])&lt;br /&gt;
&lt;br /&gt;
But be careful to use r_showtris = 3 in the console to check the results. It sometimes happens that large func_statics get processed through visportals. For example, an L-shaped room with the ceiling criss-crossing with beams all converted to one giant func_static and all within the portal area sealed by the door. Yet outside one could clearly see all their tris. By splitting the beams into two groups, one in each &#039;leg&#039; of the L so making two separate func_statics, they were effectively as good and no longer showed outside. So don&#039;t be tempted eg, to convert all trim throughout a house into one giant func_static.&lt;br /&gt;
&lt;br /&gt;
* Many of the same trade-offs between func_static and worldspawn apply to comparing brushes (worldspawn) to models.&lt;br /&gt;
* Models can be converted to worldspawn at map compile via the &amp;quot;inline 1&amp;quot; spawnarg. This should be used sparingly as there are many caveats the least of which is that you lose the lower memory footprint of models vs brushes.&lt;br /&gt;
* See [http://www.modwiki.net/wiki/Models_vs_brushes Models vs Brushes]&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==Caulk==&lt;br /&gt;
&lt;br /&gt;
Read [[Caulk]] about when to use the texture &#039;&#039;common &amp;gt; caulk&#039;&#039; to remove faces from the rendering process.&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
&lt;br /&gt;
There are differing opinions about using Caulk as a performance optimization.&lt;br /&gt;
&lt;br /&gt;
It should be noted that even though it shouldn&#039;t be a relied upon by sloppy builders, &lt;br /&gt;
careful caulk placement is likely to reduce the chance for map leaks and thus improve performance in that aspect.&lt;br /&gt;
&lt;br /&gt;
It can also be seen as akin to any other optimization that allows a mapper to instruct the map compiler &lt;br /&gt;
&amp;quot;which areas are emphasized as important&amp;quot; verses &amp;quot;which areas can be discarded during optimization&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==Collision Model Removal on some func_static Entities==&lt;br /&gt;
&lt;br /&gt;
For models that neither the player nor any AI nor any object can reach or interact with then some memory can be saved by setting the property:&lt;br /&gt;
&lt;br /&gt;
[[noclipmodel]] 1&lt;br /&gt;
&lt;br /&gt;
All moving game elements would then pass through the model so only normally use on inaccessible model features.&lt;br /&gt;
&lt;br /&gt;
This should only be applied to Func_Statics as it would remove ALL collision from Worldspawn if applied there.&lt;br /&gt;
&lt;br /&gt;
(This can be a critical memory saver for LARGE maps that are near the dmap memory limit. )&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==Patches, Fixed Tessellation==&lt;br /&gt;
&lt;br /&gt;
Setting patches to fixed tessellation instead of automatic can significantly decrease the number of polygons.&lt;br /&gt;
&lt;br /&gt;
===Triangulation===&lt;br /&gt;
&lt;br /&gt;
A related topic, though of more concern with regard to modeling, is triangulation. Essentially, graphic hardware likes to render large equilateral triangles. If your geometry is composed of tall thin triangles it will be significantly more punishing to the graphic processor, much more than a stack of small triangles that cover the same area. Of course, brush-work will be cut however the map compiler sees fit so you would need to employ [[Performance:_Essential_Must-Knows#Brush_Carving | Brush Carving]] to gain any control over the resultant triangles. Fixed Patch tessellation  &lt;br /&gt;
can also reduce the chance of poor triangulation.&lt;br /&gt;
&lt;br /&gt;
See: http://www.humus.name/index.php?page=Comments&amp;amp;ID=228&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==AI Performance Considerations==&lt;br /&gt;
&lt;br /&gt;
===Pathfinding Complexity Reduction===&lt;br /&gt;
&lt;br /&gt;
see &#039;&#039;Preventing and Reducing Pathfinding Complexity in Select Locations&#039;&#039; in [[Pathfinding]]&lt;br /&gt;
&lt;br /&gt;
===Interleaved Thinking===&lt;br /&gt;
&lt;br /&gt;
see [[Interleaved Thinking optimization]]&lt;br /&gt;
&lt;br /&gt;
===Neverdormant 0===&lt;br /&gt;
&lt;br /&gt;
Adding &amp;quot;neverdormant&amp;quot; &amp;quot;0&amp;quot; to an AI will cause it to suspend all activity when not in view. Use sparingly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==Entity Management==&lt;br /&gt;
&lt;br /&gt;
There are several things that can be done to reduce the resource usage caused by entities. &lt;br /&gt;
&lt;br /&gt;
Entities can be dynamically merged, changed, or removed to enhance performance.&lt;br /&gt;
&lt;br /&gt;
===SEED===&lt;br /&gt;
&lt;br /&gt;
The Dark Mod has a dedicated procedural content generator which also acts as an Entity Manager. &lt;br /&gt;
&lt;br /&gt;
See the [[SEED]] wiki.&lt;br /&gt;
&lt;br /&gt;
===LOD===&lt;br /&gt;
&lt;br /&gt;
Level of Detail. Objects can swap models for lower poly versions or versions with materials that have lower performance impact. &lt;br /&gt;
&lt;br /&gt;
See the [[LOD]] wiki.&lt;br /&gt;
&lt;br /&gt;
===Hide Distance===&lt;br /&gt;
&lt;br /&gt;
The most basic [[LOD]] attribute that you can specify for entities is at what distance they should disappear. &lt;br /&gt;
&lt;br /&gt;
Simply add &amp;quot;dist_check_period&amp;quot; &amp;quot;hide_distance&amp;quot; spawnargs (with associated values) to the desired entities as such.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;dist_check_period&amp;quot; &amp;quot;.5&amp;quot;&lt;br /&gt;
&amp;quot;hide_distance&amp;quot; &amp;quot;2500&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a very basic form of LOD but can be very effective, especially for outdoor scenes with particle effects for weather (etc).&lt;br /&gt;
&lt;br /&gt;
===Location Settings===&lt;br /&gt;
&lt;br /&gt;
This (also) mainly applies to particle effect management. You can use Location Entities (see [[Location_Settings#Example_script_to_turn_entities_on.2Foff_when_player_enters_a_location | Location Settings]] ) to manage whether particle effects like Moon Beams and Torches are rendered out of view.&lt;br /&gt;
&lt;br /&gt;
===Merging Entities===&lt;br /&gt;
&lt;br /&gt;
Combining several Func_Static entities into one can improve performance. &lt;br /&gt;
&lt;br /&gt;
Risks \ Caveats:&lt;br /&gt;
&lt;br /&gt;
* If the size of the entity when combined is too great it can overwhelm your GPU.&lt;br /&gt;
&lt;br /&gt;
* If the new merged entity crosses any visportals it will not be split. (See [[Performance:_Essential_Must-Knows#func_static_v_worldspawn_Brushes | Func_static vs Worldspawn]] )&lt;br /&gt;
&lt;br /&gt;
* If the new merged entity is hit with too many lights the overall light count may sap performance (See [[Performance:_Essential_Must-Knows#Lighting_overlaps | Light Overlaps]] )&lt;br /&gt;
&lt;br /&gt;
Use this method carefully (or use the [[SEED]] system).&lt;br /&gt;
&lt;br /&gt;
===Stim Response and Custom Scripted Entities===&lt;br /&gt;
&lt;br /&gt;
You can also manage Entities via the [[Stim/Response | &amp;quot;Stim Response&amp;quot;]] system or custom scripting. Just be careful about the number of these custom entity checks and&lt;br /&gt;
the &amp;quot;check periods&amp;quot; like &amp;quot;sr_time_interval_N&amp;quot;. (And, of course, carefully debug any script conditionals and loops.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==Texture Performance Considerations==&lt;br /&gt;
&lt;br /&gt;
===Texture Variety===&lt;br /&gt;
&lt;br /&gt;
This is probably the single most disappointing limit after the limits of overlapping lights. The more texture variety, the more draw batches and thus more draw calls. One way around this limit is to combine multiple textures into a texture atlas ( [http://wiki.splashdamage.com/index.php/Texturesheets Texture Sheet] ). Another approach would be to use careful decal placement to break-up the monotony of repeat textures rather than using more diverse texture sets. Blendlight projection can also be used to have visual elements span a variety of materials, but it would usually be less expensive to use decals.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Texture Batching ====&lt;br /&gt;
&lt;br /&gt;
Another thing that can be done with Func_Static is to batch repeated textures together.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A mapper would prefer that a game engine work like:&lt;br /&gt;
&lt;br /&gt;
Texture + Texture + Texture + Polygon (or group of polys)&lt;br /&gt;
&lt;br /&gt;
Nearly all game engines and video hardware will prefer:&lt;br /&gt;
&lt;br /&gt;
Polygon + Polygon + Polyon + Texture&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Anything you can do to make your map render like the latter example will improve CPU performance.&lt;br /&gt;
The old advised ratio was 500 to 1000 polygons per texture but this may have moved up to 2000 or more with newer GPUs.&lt;br /&gt;
Too many polygons per batch will increase your CPU performance but decrease your GPU performance.&lt;br /&gt;
You must find the right balance for your target hardware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If your scene has lots of the same texture on decorative features &lt;br /&gt;
or geometry that is not split by too many visportals then it may improve rendering speed to&lt;br /&gt;
combine all the geometry in the scene that has the same texture (or a large percentage of the&lt;br /&gt;
same texture) into a single Func_Static. One specific but common scenario is a scene that has&lt;br /&gt;
lots of decal patches with the same texture. These can be combined into Func_Static&#039;s to reduce draw calls.&lt;br /&gt;
Lunaran&#039;s &amp;quot;Strombine&amp;quot; map for Quake 4 used this method and improved performance to the point that&lt;br /&gt;
his map was rendering &amp;quot;as fast as if it had a third of the polygons in the worst corners&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
&lt;br /&gt;
* Quake 4 has a built-in r_showBatchSize command that can be used to diagnose batching performance in detail.&lt;br /&gt;
&lt;br /&gt;
* [[SEED]] can serve the same purpose as func_static for the above &amp;quot;decal scenario&amp;quot; and has a lower memory footprint.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Texture Stretching===&lt;br /&gt;
&lt;br /&gt;
Yes, this is a TERRIBLE option... but a valid one nonetheless. &lt;br /&gt;
&lt;br /&gt;
If your texture is scaled to fine detail level it means more rendering work (more pixels per poly).&lt;br /&gt;
&lt;br /&gt;
(...and more frame-buffer memory consumption)&lt;br /&gt;
&lt;br /&gt;
If you can get away with scaling\stretching a couple of textures a bit and need a little boost, &lt;br /&gt;
then do it (just don&#039;t admit to it).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;[edit: Is there any actual evidence this has a noticeable benefit?  I find it hard to believe this would accomplish anything. - Springheel]&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Alpha Test===&lt;br /&gt;
&lt;br /&gt;
One of the most expensive material operations that the any engine must perform is to evaluate transparency. Use alpha materials sparingly.&lt;br /&gt;
&lt;br /&gt;
===Mutli-stage Materials===&lt;br /&gt;
&lt;br /&gt;
The more stages in your material the more passes are required to render it.&lt;br /&gt;
&lt;br /&gt;
===Animating Textures===&lt;br /&gt;
&lt;br /&gt;
While animating textures or normal maps are more expensive than static ones, you can reduce their performance impact by creating a &amp;quot;Film strip&amp;quot; texture of all the frames and using scroll and a time offset or snap table. Using conditional parms to invoke individual frames is far more expensive.&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Lighting Performance Considerations==&lt;br /&gt;
&lt;br /&gt;
While Doom 3 has arguably one of the fastest &amp;quot;dynamic&amp;quot; light methods, it comes at the expense of the overall performance benefit&lt;br /&gt;
of &amp;quot;baked lighting&amp;quot; or &amp;quot;light maps&amp;quot; You should carefully consider light and geometry placement and work to ensure that you make the most&lt;br /&gt;
of the lights placed in your scene.&lt;br /&gt;
&lt;br /&gt;
Quote:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Lights require a hell of a lot more than just a GL status change: the rendering algorithm processes lights one by one, and accumulates the result. Therefore there is no performance advantage to using the same texture on lots of lights, because each light (and its contained geometry) is still going to be processed in its own individual pass.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;What does Doom 3 want?&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The most common answer to this question, inferred by the Doom 3 game map design, is that Doom 3 wants maps to have lots of small non-overlapping lights close to the world geometry. This is a natural fit for the electronic filled laboratory areas of the Doom 3 setting but it has been a frustration to mappers as light placement is a tedious process.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The real answer:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
(Presuming you do not want large swaths of darkness punctuated by sparse illumination...)&lt;br /&gt;
&lt;br /&gt;
If you wanted to illuminate a scene in a way that the Doom 3 engine would render the fastest you would create razor thin light volumes that cover as much of the surface geometry as possible without exceeding the triangle batch size limit. Smaller volumes means that the CPU and GPU have to spend less resources evaluating what each volume contains. These may also be broken-up by material as best as possible (one light per texture is the best possible). &amp;quot;What about dynamic objects and AI?&amp;quot; you say... Well they would be handled by either a few sparse projected lights, or large &amp;quot;in air&amp;quot; light volumes that do not touch the world geometry. &amp;quot;How would those &amp;quot;razor thin&amp;quot; &amp;quot;surface hugging&amp;quot; volumes look any good?&amp;quot; you ask... It wouldn&#039;t be easy but if each were either over-bright or had a custom texture it should be comparable or better than using a more natural volume distribution. As one of the few saving graces in this example, you can take advantage of the fact that intersecting light volumes have almost no negative performance impact if they do not intersect with geometry. Yes, this convoluted light example would be very unwieldy and it would be hard to utilize dynamic shadows and directional light. It would be virtually impossible to live up to the ideals in this example but you may use it as a guide. &lt;br /&gt;
&lt;br /&gt;
Alternately, you would create tunnel-like geometry around all light sources, the fastest rendering being a string of non-overlapping point-lights that recedes into the distance contained within a long hallway or tunnel.&lt;br /&gt;
&lt;br /&gt;
If you know that an area of your map is purely decorative (no player or AI can reach it), you may try to use the former scenario as a guide. If you feel that your structure can be made to be more tunnel-like, then the latter alternative can be used as a guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Now you know what Doom 3 wants.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Lighting overlaps===&lt;br /&gt;
&lt;br /&gt;
Generally be cautious about the light from more than one source falling into the same geometry triangle. This overlapping lighting makes the rendering calculations more complex and reduces game performance resulting in slowdown. The console command &#039;&#039;&#039;r_showtris 2&#039;&#039;&#039; shows what is currently rendered (as triangular wireframes) so you can check any suspect areas. Counter to common intuition large flat surfaces can be big offenders for light performance considerations. Often, large surface areas span several lights and the map compiler does not split the triangles at light boundaries. This means that the entire surface has the same light count (a total of every light that makes contact).  You can add trim and other detail to split up large triangles to reduce this (see Brush Carving below).&lt;br /&gt;
&lt;br /&gt;
Non-directional lighting which can pass through walls is usually seen as a problem but this property can be used to your advantage by placing lights inside of structures and projecting them outward so they only affect the desire surface.&lt;br /&gt;
&lt;br /&gt;
====Brush Carving====&lt;br /&gt;
&lt;br /&gt;
The name given for splitting up Brushes so that light counts are kept in-check is [http://www.modwiki.net/wiki/Brush_carving Brush Carving]. There are many methods to achieve this result including:&lt;br /&gt;
&lt;br /&gt;
* Add trim or detail to break-up large surfaces&lt;br /&gt;
* Convert some of the adjacent brushes to (caulked) patches.&lt;br /&gt;
* Changing a material parameter for adjacent polygons.&lt;br /&gt;
* Using the &amp;quot;Discrete&amp;quot; and &amp;quot;NoFragment&amp;quot; keywords in the material definitions to control splits (use sparingly)&lt;br /&gt;
* [[Dmap]] using the [http://www.modwiki.net/wiki/LightCarve LightCarve] keyword (primarily useful for maps with large open-space areas with large light volumes and simple geometry, a large warehouse map, etc.)&lt;br /&gt;
&lt;br /&gt;
Related Doom3world topic: http://www.doom3world.org/phpbb2/viewtopic.php?f=1&amp;amp;t=4924&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a&lt;br /&gt;
&lt;br /&gt;
====Spectrum Lighting====&lt;br /&gt;
&lt;br /&gt;
You can isolate specific lights to specific materials with the use of the &#039;&#039;&#039;spectrum&#039;&#039;&#039; keyword. &lt;br /&gt;
&lt;br /&gt;
In this way lights that would normally overlap will not but at the expense of cumulative lighting from lights that are not of the same spectrum. This is usually used for &amp;quot;special effect&amp;quot; lighting but could potentially be used to control illumination in tricky areas to keep the light counts low. Yes, &#039;&#039;&#039;VERY&#039;&#039;&#039; cumbersome.&lt;br /&gt;
[http://www.modwiki.net/wiki/Spectrum_%28Material_global_keyword%29 Spectrum Keyword at Modwiki]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===BlendLight Keyword===&lt;br /&gt;
&lt;br /&gt;
[[Light_Properties#Blend_Light|Blend Lights]] are the lowest impact lighting method possible in Doom 3 other than emissive textures. They are non interactive and can be thought of as a volumetric decals. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Virtual Ambient Light===&lt;br /&gt;
&lt;br /&gt;
Dark Mod provides a virtual main ambient light to help performance on low end systems. See [[Virtual_Darkness#Virtual_Ambient_Light|Virtual Darkness]]&lt;br /&gt;
&lt;br /&gt;
====AmbientLight Keyword====&lt;br /&gt;
&lt;br /&gt;
Other than the ambient_world (see entry above) you may use ambient lights to add subtle lighting variation to areas. They do not produce normals or specular so it is recommended that you do not use these as primary light sources but instead for faked radiance. Ambient lighting has less performance impact than other light methods.&lt;br /&gt;
&lt;br /&gt;
( For an advanced use of ambient lighting see [[Location Settings]] and [[Light Textures and Falloff Images]] )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Shadow Casting Removal===&lt;br /&gt;
&lt;br /&gt;
Where appropriate, remove shadows from lights, entity brushes, and models by settings the property noshadows = 1 (see &#039;&#039;func_static&#039;&#039; v &#039;&#039;worldspawn&#039;&#039; Brushes&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Further details&#039;&#039;&#039;: [[Turning Shadows Off]]&lt;br /&gt;
&lt;br /&gt;
====Brushwork Shadowmesh====&lt;br /&gt;
&lt;br /&gt;
Just as you can create a simple shadow-casting mesh for a detailed model to save on performance, you can also&lt;br /&gt;
set a complex entity brush noshadows = 1 then build a simpler entity brush with shadowed nodraw brushes (texture common caulk shadow and shadow2 )&lt;br /&gt;
inside it. [http://modetwo.net/darkmod/index.php?/topic/11893-ungoliants-mapping-questions/page__view__findpost__p__236701 Discussion]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Moving Lights vs. Static Lights ===&lt;br /&gt;
Moving lights have a considerable performance impact. Be sure to use this effect sparingly.&lt;br /&gt;
&lt;br /&gt;
===No Dynamic Interactions===&lt;br /&gt;
&lt;br /&gt;
This is a last resort optimization. &lt;br /&gt;
&lt;br /&gt;
If you are sure that no dynamic lighting will hit a surface and that neither the player nor AI can use a lantern\torch or activate a light of any kind near a surface, then you may set the property &amp;quot;noDynamicInteractions = 1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The lighting, shaders, specular, etc will be baked-into the affected entity or brush. No light will affect the appearance; it will always have the same appearance &#039;&#039;&#039;no matter what&#039;&#039;&#039;. This can be used for distant &amp;quot;decorative&amp;quot; geometry or scenarios where a large amount of terrain is being traversed by a player with a vehicle with multiple dynamic lights (see the Monorail map in Doom 3 for an example).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===shadowopt : use it with dmap===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CAUTION! THIS FEATURE CAUSED PATHFINDING ERRORS IN ONE MAP&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For better performance, when you compile your map with [[Dmap]] use...&lt;br /&gt;
&lt;br /&gt;
dmap shadowopt 2 &amp;lt;mapname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also try values 0 to 5 but at the time of writing 2 is considered likely the best.&lt;br /&gt;
&lt;br /&gt;
This page also refers : http://www.modwiki.net/wiki/Dmap_(console_command)&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
==Quick Performance Improvement Checklist==&lt;br /&gt;
If you have low fps areas in your map, it may help analyzing the scene. Console command &amp;quot;r_showprimitives 1&amp;quot; gives an output what is being drawn. Especially check the amount of tris and shadow tris. In a heavily patched areas you can save performance by reducing the patch tessellation with the patch inspector. The default auto-tessellated patches have a LOT of redundant tris generated. You can easily save a lot of tris by setting the tessellation to manual and 2x2 or 3x3, without much reducing the scene details visually. Setting complex patchwork or models into &amp;quot;noshadows 1&amp;quot; can also help a lot without having any effects on visuals. Finally, the most common culprit for performance degradation is multiple lights shining on the same area. Ie, lights overlapping. Never have more lights overlapping than two or three. Just adjust your lights so that they aren&#039;t overlapping and you gain performance without changing scene visuals much. Making worldspawn things into func_static also reduces tris.&lt;br /&gt;
&lt;br /&gt;
Tl; Dr or simple scene optimization (assuming visportalling has been already done correctly.)&lt;br /&gt;
*0) have your map to have boxy worldspawn geometry with all the details as func_statics.&lt;br /&gt;
*1) reduce lights overlapping&lt;br /&gt;
*2) reduce patch tessellation&lt;br /&gt;
*3) make things into noshadows. (lights and func_static objects). &lt;br /&gt;
&lt;br /&gt;
==Other References==&lt;br /&gt;
&lt;br /&gt;
This is a useful article on optimising... &lt;br /&gt;
http://www.modwiki.net/wiki/Optimising_maps&lt;br /&gt;
&lt;br /&gt;
Optimizing maps thread: [http://modetwo.net/darkmod/index.php?/topic/12527-optimising-maps/page__view__getnewpost Optimizing Maps]&lt;br /&gt;
&lt;br /&gt;
Quake 4 performance guide from id software:&lt;br /&gt;
&lt;br /&gt;
[http://www.iddevnet.com/quake4/LevelEditor_Performance LevelEditor Performance]&lt;br /&gt;
&lt;br /&gt;
More related TDM articles: &lt;br /&gt;
&lt;br /&gt;
* [[Creating Large Areas]]&lt;br /&gt;
* [[Map Optimization]]&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=16003</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=FAQ&amp;diff=16003"/>
		<updated>2013-04-05T07:11:24Z</updated>

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

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

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side track RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else. This kind of AI can be really surprising as the AI can indeed be walking between any of the two points, giving large amount of different scenarios.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined. In practice, the mapper could set the chance spawnargs so that the important path node chance sums up to 75% near the important door. In this case, the path_corner_1 near the door would have chance 0.37 and path_corner_2 chance 0.37. Some of the remaining path nodes would then be targeted at a 26% probability.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Sitting and Sleeping RIT AI =&lt;br /&gt;
This is important. If you have sitting and sleeping AI in you RIT networks, be sure to put an extra path_corner so that the AI always walks away from the bed or the chair after they finish whatever they are doing there. If such a path is not set the situation might go like this:&lt;br /&gt;
 1) AI comes to bed, goes to sleep&lt;br /&gt;
 2) AI gets up, targets decision node&lt;br /&gt;
 3) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
 4) AI goes back to sleep, but is too close to the bed and gets stuck.&lt;br /&gt;
 5) AI gets stuck.&lt;br /&gt;
&lt;br /&gt;
By adding a path_corner that makes the AI to walk away from the bed to a safe distance:&lt;br /&gt;
 1) AI comes to bed, goes to sleep&lt;br /&gt;
 2) AI gets up, targets the walk away path_corner. AI moves away from the bed.&lt;br /&gt;
 3) The AI targets the decision making node.&lt;br /&gt;
 4) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
 5) AI goes back to sleep, but is safely away from the bed so he walks to the bed and goes to sleep without issue.&lt;br /&gt;
 6) All is well&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Roads&amp;diff=15503</id>
		<title>Roads</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Roads&amp;diff=15503"/>
		<updated>2012-08-24T17:51:54Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Roads =&lt;br /&gt;
This tutorial tells how to make organic roads fairly easily. It is recommended the mappers familiarizes himself with basics of patches before trying to do these.&lt;br /&gt;
&lt;br /&gt;
0) As always, it is good to plan your work beforehand and try to build modular structures, ie structures you can easily copy out, duplicate and use elsewhere.&lt;br /&gt;
&lt;br /&gt;
1) See figure 1. Create three patches, 5x5 size are fine. The more control points you have in your patch, the more you can add detail into the ground. On the other hand, too many nodes make the process error prone. 5x5 or 7x7 is good. Lay them out next to each other. The middle patch will be the road. The two patches on the sides will be wilderness/grass. Make the patches into the size category you want. A dirt path made for cart-traffic might be some 128 units wide. Texture the patches so you see which one are which. Open the surface inspector, select texture scale 0.5 for all patches and press the natural button. This gives you a good baseline texture scale. &lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial1.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 1.&lt;br /&gt;
&lt;br /&gt;
2) See figure 2. Clone one of the patches and resize it to 64 units width. Move it in the middle of the seam between the road patch and the grass patch. Good rule of the thumb would be that it overlaps 4x8 units over the grass and another 4x8 units over the road. Make another similar patch and place it on the other seam between the road and the grass. These two patches will later become the alpha patches to make a neat smooth transition from the grass into the road. They will now z-fight with the other patches, but don&#039;t worry about it. That is fixed soon. &lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial2.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 2.&lt;br /&gt;
&lt;br /&gt;
3) See figure 3. Select all the patches. Press the button that shows the control points (cube with a dot in the corner). Select the middlemost control points and create the depression in terrain where the road sits in. Be sure to grab also the two alphapatches and modify them exactly the same as the others. See figure 4.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial3.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial4.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 4.&lt;br /&gt;
&lt;br /&gt;
4) See figure 5. Adjust the two alpha patches which were supposed to be the grass-road transition. Apply the desired texture from darkmod/nature/grass/grass_edge. Be sure to scale the texture so that it fills the whole patch as shown in the image. In my case, I used a patch that can accomodate 0.5x natural grass edge texture (the very same size scale as the road and the grass patches were!). Note how the coarse side points towards the interior of the road and the smooth towards the wilderness. Fine tune the patches so that they slightly bump out from the ground and touch the ground patches. Use the smallest grid for this task.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial5.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 5.&lt;br /&gt;
&lt;br /&gt;
5) See figure 6. Select all the patches (road, grasses, alphapatches) with shift drag select. Show the control points. Shift drag select the patch control points from the middle (road + grass + alphapatches) and move them in the south/north direction top-down orthoview screen. Make the road wind a bit as per your desires. Tip: don&#039;t touch the edge vertices of the whole patch ensemble, if you move them, you&#039;ll have hard time mashing the road modules next to each other.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial6.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 6.&lt;br /&gt;
&lt;br /&gt;
6) See figure 7. Select everything except the alphapatches. Open the patch inspector from the top menu. Select fixed subdivision. Play with the numbers. The idea is to make your terrain patch look as realistic and good as possible with as minimal amount of subdivisions as possible. Too many subdivisions increase the triscount of you terrain. Too few subdivisions make your terrain look blocky. Optimize between looks and simplicity.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial7.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 7.&lt;br /&gt;
&lt;br /&gt;
7) See figure 8. Make sure you all the road + grass patches selected. In the camera view, fly over your work and introduce bumps in the grass and the road by dragging the control points. Make the terrain realistic and interesting. I recommend you use a grid of 8 or 4 for this task.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial8.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 8.&lt;br /&gt;
&lt;br /&gt;
8) See figure 9. Select the alpha patches and do the same fixed subdivisions with the patch inspector you did previously to the road and the grass. Make the alphapatches as simple as possible so that they still look good. Select your alpha patch, enter the control point mode, select the smallest grid. Fly over both patches and make them like shown in the picture. The patch should bump out from the ground and sink very slightly into the ground at its edge. Note how the white area never sinks into the ground, but only the black areas. If you fail in this, your grass will hover uglily over the road/grass. If you have difficulties, insert more control nodes into the patch or increase the amount of subdivisions from the patch inspector. After you are done, make the alphapatches into a func_static. Give them properties &amp;quot;noshadows 1&amp;quot; and &amp;quot;shaderparm3 0.5&amp;quot; (noshadows is self-explanatory, shaderparm controls the amount of alpha in the patch)&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial9.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 9.&lt;br /&gt;
&lt;br /&gt;
9) Select everything else (road + grass patches), make them into a func_static and give it the properties &amp;quot;noshadows 1&amp;quot;. This should prevent ugly/unrealistic black sharp shadows originating from the patchwork.&lt;br /&gt;
&lt;br /&gt;
10) You are done! Now you can clone the road set around or fill it with details.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial11.png‎]]&lt;br /&gt;
&lt;br /&gt;
End result might look like this.&lt;br /&gt;
&lt;br /&gt;
=Tips&amp;amp;Tricks=&lt;br /&gt;
*Difficulties with the patches? You can insert new control nodes into any patch from the patch menu. This may be required for getting the alpha-patches perfectly aligned onto a particularily bumpy road.&lt;br /&gt;
*If you used a patch with a lot of control nodes and simplified it a lot with the patch inspector (fixed subdivisions), you may need to move multiple pathnodes to see any change in the patch.&lt;br /&gt;
*You cloned your road and wanted to put a few of them next to each other, but you get an ugly seam because of texture differences? Add a brush, apply your texture onto it, scale it the way you want. Copy the texture from the brush and paste it onto the patches. Every patch you paste, should have identical texture alignment. This applies for road and grass textures.&lt;br /&gt;
*You get an ugly seam on the spot where two road module alphapatches meet? Put some decoration to hide it. Additional grass patch? Boulder, vegetation...&lt;br /&gt;
*Want a hill? Simply look at the side view orthoview, select all the patches, show the control points and move them. The alphapatches should move snugly with the other parts. If they do not, repeat the fine adjustment for the alphapatches.&lt;br /&gt;
&lt;br /&gt;
{{editing}}&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Roads&amp;diff=15502</id>
		<title>Roads</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Roads&amp;diff=15502"/>
		<updated>2012-08-24T17:49:20Z</updated>

		<summary type="html">&lt;p&gt;Sotha: Created page with &amp;quot;= Roads = This tutorial tells how to make organic roads fairly easily. It is recommended the mappers familiarizes himself with basics of patches before trying to do these.  0) As...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Roads =&lt;br /&gt;
This tutorial tells how to make organic roads fairly easily. It is recommended the mappers familiarizes himself with basics of patches before trying to do these.&lt;br /&gt;
&lt;br /&gt;
0) As always, it is good to plan your work beforehand and try to build modular structures, ie structures you can easily copy out, duplicate and use elsewhere.&lt;br /&gt;
&lt;br /&gt;
1) See figure 1. Create three patches, 5x5 size are fine. The more control points you have in your patch, the more you can add detail into the ground. On the other hand, too many nodes make the process error prone. 5x5 or 7x7 is good. Lay them out next to each other. The middle patch will be the road. The two patches on the sides will be wilderness/grass. Make the patches into the size category you want. A dirt path made for cart-traffic might be some 128 units wide. Texture the patches so you see which one are which. Open the surface inspector, select texture scale 0.5 for all patches and press the natural button. This gives you a good baseline texture scale. &lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial1.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 1.&lt;br /&gt;
&lt;br /&gt;
2) See figure 2. Clone one of the patches and resize it to 64 units width. Move it in the middle of the seam between the road patch and the grass patch. Good rule of the thumb would be that it overlaps 4x8 units over the grass and another 4x8 units over the road. Make another similar patch and place it on the other seam between the road and the grass. These two patches will later become the alpha patches to make a neat smooth transition from the grass into the road. They will now z-fight with the other patches, but don&#039;t worry about it. That is fixed soon. &lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial2.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 2.&lt;br /&gt;
&lt;br /&gt;
3) See figure 3. Select all the patches. Press the button that shows the control points (cube with a dot in the corner). Select the middlemost control points and create the depression in terrain where the road sits in. Be sure to grab also the two alphapatches and modify them exactly the same as the others. See figure 4.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial3.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 3.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial4.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 4.&lt;br /&gt;
&lt;br /&gt;
4) See figure 5. Adjust the two alpha patches which were supposed to be the grass-road transition. Apply the desired texture from darkmod/nature/grass/grass_edge. Be sure to scale the texture so that it fills the whole patch as shown in the image. In my case, I used a patch that can accomodate 0.5x natural grass edge texture (the very same size scale as the road and the grass patches were!). Note how the coarse side points towards the interior of the road and the smooth towards the wilderness. Fine tune the patches so that they slightly bump out from the ground and touch the ground patches. Use the smallest grid for this task.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial5.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 5.&lt;br /&gt;
&lt;br /&gt;
5) See figure 6. Select all the patches (road, grasses, alphapatches) with shift drag select. Show the control points. Shift drag select the patch control points from the middle (road + grass + alphapatches) and move them in the south/north direction top-down orthoview screen. Make the road wind a bit as per your desires. Tip: don&#039;t touch the edge vertices of the whole patch ensemble, if you move them, you&#039;ll have hard time mashing the road modules next to each other.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial6.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 6.&lt;br /&gt;
&lt;br /&gt;
6) See figure 7. Select everything except the alphapatches. Open the patch inspector from the top menu. Select fixed subdivision. Play with the numbers. The idea is to make your terrain patch look as realistic and good as possible with as minimal amount of subdivisions as possible. Too many subdivisions increase the triscount of you terrain. Too few subdivisions make your terrain look blocky. Optimize between looks and simplicity.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial7.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 7.&lt;br /&gt;
&lt;br /&gt;
7) See figure 8. Make sure you all the road + grass patches selected. In the camera view, fly over your work and introduce bumps in the grass and the road by dragging the control points. Make the terrain realistic and interesting. I recommend you use a grid of 8 or 4 for this task.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial8.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 8.&lt;br /&gt;
&lt;br /&gt;
8) See figure 9. Select the alpha patches and do the same fixed subdivisions with the patch inspector you did previously to the road and the grass. Make the alphapatches as simple as possible so that they still look good. Select your alpha patch, enter the control point mode, select the smallest grid. Fly over both patches and make them like shown in the picture. The patch should bump out from the ground and sink very slightly into the ground at its edge. Note how the white area never sinks into the ground, but only the black areas. If you fail in this, your grass will hover uglily over the road/grass. If you have difficulties, insert more control nodes into the patch or increase the amount of subdivisions from the patch inspector. After you are done, make the alphapatches into a func_static. Give them properties &amp;quot;noshadows 1&amp;quot; and &amp;quot;shaderparm3 0.5&amp;quot; (noshadows is self-explanatory, shaderparm controls the amount of alpha in the patch)&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial9.png‎]]&lt;br /&gt;
&lt;br /&gt;
Figure 9.&lt;br /&gt;
&lt;br /&gt;
9) Select everything else (road + grass patches), make them into a func_static and give it the properties &amp;quot;noshadows 1&amp;quot;. This should prevent ugly/unrealistic black sharp shadows originating from the patchwork.&lt;br /&gt;
&lt;br /&gt;
10) You are done! Now you can clone the road set around or fill it with details.&lt;br /&gt;
&lt;br /&gt;
[[Image:Road_tutorial11.png‎]]&lt;br /&gt;
&lt;br /&gt;
End result might look like this.&lt;br /&gt;
&lt;br /&gt;
=Tips&amp;amp;Tricks=&lt;br /&gt;
*Difficulties with the patches? You can insert new control nodes into any patch from the patch menu. This may be required for getting the alpha-patches perfectly aligned onto a particularily bumpy road.&lt;br /&gt;
*If you used a patch with a lot of control nodes and simplified it a lot with the patch inspector (fixed subdivisions), you may need to move multiple pathnodes to see any change in the patch.&lt;br /&gt;
*You cloned your road and wanted to put a few of them next to each other, but you get an ugly seam because of texture differences? Add a brush, apply your texture onto it, scale it the way you want. Copy the texture from the brush and paste it onto the patches. Every patch you paste, should have identical texture alignment. This applies for road and grass textures.&lt;br /&gt;
*You get an ugly seam on the spot where two road module alphapatches meet? Put some decoration to hide it. Additional grass patch? Boulder, vegetation...&lt;br /&gt;
*Want a hill? Simply look at the side view orthoview, select all the patches, show the control points and move them. The alphapatches should move snugly with the other parts. If they do not, repeat the fine adjustment for the alphapatches.&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial11.png&amp;diff=15501</id>
		<title>File:Road tutorial11.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial11.png&amp;diff=15501"/>
		<updated>2012-08-24T17:37:16Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial9.png&amp;diff=15500</id>
		<title>File:Road tutorial9.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial9.png&amp;diff=15500"/>
		<updated>2012-08-24T17:35:43Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial8.png&amp;diff=15499</id>
		<title>File:Road tutorial8.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial8.png&amp;diff=15499"/>
		<updated>2012-08-24T17:35:24Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial7.png&amp;diff=15498</id>
		<title>File:Road tutorial7.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial7.png&amp;diff=15498"/>
		<updated>2012-08-24T17:35:03Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial6.png&amp;diff=15497</id>
		<title>File:Road tutorial6.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial6.png&amp;diff=15497"/>
		<updated>2012-08-24T17:34:46Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial5.png&amp;diff=15496</id>
		<title>File:Road tutorial5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial5.png&amp;diff=15496"/>
		<updated>2012-08-24T17:34:25Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial4.png&amp;diff=15495</id>
		<title>File:Road tutorial4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial4.png&amp;diff=15495"/>
		<updated>2012-08-24T17:34:00Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial3.png&amp;diff=15494</id>
		<title>File:Road tutorial3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial3.png&amp;diff=15494"/>
		<updated>2012-08-24T17:33:41Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial2.png&amp;diff=15493</id>
		<title>File:Road tutorial2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial2.png&amp;diff=15493"/>
		<updated>2012-08-24T17:33:25Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial1.png&amp;diff=15492</id>
		<title>File:Road tutorial1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Road_tutorial1.png&amp;diff=15492"/>
		<updated>2012-08-24T17:28:17Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15188</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15188"/>
		<updated>2012-05-17T09:51:35Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Sitting and Sleeping RIT AI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side track RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else. This kind of AI can be really surprising as the AI can indeed be walking between any of the two points, giving large amount of different scenarios.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined. In practice, the mapper could set the chance spawnargs so that the important path node chance sums up to 75% near the important door. In this case, the path_corner_1 near the door would have chance 0.37 and path_corner_2 chance 0.37. Some of the remaining path nodes would then be targeted at a 26% probability.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Sitting and Sleeping RIT AI =&lt;br /&gt;
This is important. If you have sitting and sleeping AI in you RIT networks, be sure to put an extra path_corner so that the AI always walks away from the bed or the chair after they finish whatever they are doing there. If such a path is not set the situation might go like this:&lt;br /&gt;
 1) AI comes to bed, goes to sleep&lt;br /&gt;
 2) AI gets up, targets decision node&lt;br /&gt;
 3) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
 4) AI goes back to sleep, but is too close to the bed and gets stuck.&lt;br /&gt;
 5) AI gets stuck.&lt;br /&gt;
&lt;br /&gt;
By adding a path_corner that makes the AI to walk away from the bed to a safe distance:&lt;br /&gt;
 1) AI comes to bed, goes to sleep&lt;br /&gt;
 2) AI gets up, targets the walk away path_corner. AI moves away from the bed.&lt;br /&gt;
 3) The AI targets the decision making node.&lt;br /&gt;
 4) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
 5) AI goes back to sleep, but is safely away from the bed so he walks to the bed and goes to sleep without issue.&lt;br /&gt;
 6) All is well&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15187</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15187"/>
		<updated>2012-05-17T09:50:29Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Sitting and Sleeping RIT AI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side track RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else. This kind of AI can be really surprising as the AI can indeed be walking between any of the two points, giving large amount of different scenarios.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined. In practice, the mapper could set the chance spawnargs so that the important path node chance sums up to 75% near the important door. In this case, the path_corner_1 near the door would have chance 0.37 and path_corner_2 chance 0.37. Some of the remaining path nodes would then be targeted at a 26% probability.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Sitting and Sleeping RIT AI =&lt;br /&gt;
This is important. If you have sitting and sleeping AI in you RIT networks, be sure to put an extra path_corner so that the AI always walks away from the bed or the chair after they finish whatever they are doing there. If such a path is not set the situation might go like this:&lt;br /&gt;
1) AI comes to bed, goes to sleep&lt;br /&gt;
2) AI gets up, targets decision node&lt;br /&gt;
3) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
4) AI goes back to sleep, but is too close to the bed and gets stuck.&lt;br /&gt;
5) AI gets stuck.&lt;br /&gt;
&lt;br /&gt;
By adding a path_corner that makes the AI to walk away from the bed to a safe distance:&lt;br /&gt;
1) AI comes to bed, goes to sleep&lt;br /&gt;
2) AI gets up, targets the walk away path_corner. AI moves away from the bed.&lt;br /&gt;
3) The AI targets the decision making node.&lt;br /&gt;
3) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
4) AI goes back to sleep, but is safely away from the bed so he walks to the bed and goes to sleep without issue.&lt;br /&gt;
5) All is well&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15186</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15186"/>
		<updated>2012-05-17T09:49:54Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side track RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else. This kind of AI can be really surprising as the AI can indeed be walking between any of the two points, giving large amount of different scenarios.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined. In practice, the mapper could set the chance spawnargs so that the important path node chance sums up to 75% near the important door. In this case, the path_corner_1 near the door would have chance 0.37 and path_corner_2 chance 0.37. Some of the remaining path nodes would then be targeted at a 26% probability.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Sitting and Sleeping RIT AI =&lt;br /&gt;
This is important. If you have sitting and sleeping AI, be sure to put an extra path_corner so that the AI always walks away from the bed or the chair. If such a path is not set the situation might go like this&lt;br /&gt;
1) AI comes to bed, goes to sleep&lt;br /&gt;
2) AI gets up, targets decision node&lt;br /&gt;
3) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
4) AI goes back to sleep, but is too close to the bed and gets stuck.&lt;br /&gt;
5) AI gets stuck.&lt;br /&gt;
&lt;br /&gt;
By adding a path_corner that makes the AI to walk away from the bed to a safe distance&lt;br /&gt;
1) AI comes to bed, goes to sleep&lt;br /&gt;
2) AI gets up, targets the walk away path_corner. AI moves away from the bed.&lt;br /&gt;
3) The AI targets the decision making node.&lt;br /&gt;
3) By chance, decision node tells AI to go back to sleep&lt;br /&gt;
4) AI goes back to sleep, but is safely away from the bed so he walks to the bed and goes to sleep without issue.&lt;br /&gt;
5) All is well&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15185</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15185"/>
		<updated>2012-05-17T09:44:17Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* The Basic Door Guard RIT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side track RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else. This kind of AI can be really surprising as the AI can indeed be walking between any of the two points, giving large amount of different scenarios.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined. In practice, the mapper could set the chance spawnargs so that the important path node chance sums up to 75% near the important door. In this case, the path_corner_1 near the door would have chance 0.37 and path_corner_2 chance 0.37. Some of the remaining path nodes would then be targeted at a 26% probability.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15184</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15184"/>
		<updated>2012-05-17T09:40:07Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* The Basic Roaming RIT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side track RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else. This kind of AI can be really surprising as the AI can indeed be walking between any of the two points, giving large amount of different scenarios.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15183</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15183"/>
		<updated>2012-05-17T09:38:51Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* The Basic Guard Patrol RIT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side track RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15182</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15182"/>
		<updated>2012-05-17T08:54:14Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* RIT Troubleshooting and Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side tract RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one RIT you are creating at that time.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15181</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15181"/>
		<updated>2012-05-17T08:53:15Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Putting Even More Life to the AI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side tract RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversations encountered in the Phrase Book mission. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat.&lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one you are creating.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15180</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15180"/>
		<updated>2012-05-17T08:52:30Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* The Basic Door Guard RIT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side tract RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave the door and take the break action the mapper defined.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversation in the Phrase Book. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat. &lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one you are creating.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15179</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15179"/>
		<updated>2012-05-17T08:52:00Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* The Basic Door Guard RIT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side tract RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar time of the cycle at the door. Then occasionally the AI would leave door and take the break action the mapper defined.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversation in the Phrase Book. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat. &lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one you are creating.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Path_Nodes&amp;diff=15178</id>
		<title>Path Nodes</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Path_Nodes&amp;diff=15178"/>
		<updated>2012-05-17T08:44:51Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* How to Make AI do Random Interesting Things (RIT) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;originally written by Springheel&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For more information on pathfinding, see [[Pathfinding]].  For more general info on getting your AI to patrol, see [[AI Patrol]].&lt;br /&gt;
&lt;br /&gt;
= What are Path Nodes? =&lt;br /&gt;
&lt;br /&gt;
Path entities (or path nodes) are the things that you use to make your AI move (patrol) around the map. Placing path nodes can take a little getting used to; hopefully this article will help (I&#039;m far from an expert, but here&#039;s what I&#039;ve discovered so far).&lt;br /&gt;
&lt;br /&gt;
There are lots of different kinds of path nodes.  It can sometimes help to think of them as &amp;quot;travel nodes&amp;quot; (nodes that AI will travel to) and &amp;quot;behaviour nodes&amp;quot; (nodes that tell AI how to behave at a certain point).  &lt;br /&gt;
&lt;br /&gt;
Although path nodes have a directional arrow in the editor, it has no impact on most nodes.  Rotating the node does add a corresponding &amp;quot;angle&amp;quot; property to the entity (matching the direction of the arrow).  Certain nodes (path_anim, path_wait, and path_turn, for example) are affected by the &amp;quot;angle&amp;quot; property, but most will ignore it.&lt;br /&gt;
&lt;br /&gt;
= How to use Path Nodes =&lt;br /&gt;
&lt;br /&gt;
Path nodes are placed like any other entity (RMB and select &amp;quot;add entity&amp;quot;, then scroll to &amp;quot;paths&amp;quot;).  They show up as a coloured box with an arrow in the editor (colour varies depending on config.)&lt;br /&gt;
&lt;br /&gt;
Path nodes are useless if they are not linked to another entity (either an AI or another node).  In order to link them, you use the &amp;quot;target&amp;quot; property.  This tells the AI what path node they should go to (or act on) next.  If you type &amp;quot;target&amp;quot; &amp;quot;path_corner_1&amp;quot; in your AI property list, then your AI will walk to &amp;quot;path_corner_1&amp;quot; when the map starts.  Without a &amp;quot;target&amp;quot; property, your AI will not go anywhere.  Once you add a &amp;quot;target&amp;quot; property to either your AI or another node, you should see a colored line connecting the two entities.&lt;br /&gt;
&lt;br /&gt;
Behaviour nodes activate behaviour in order.  In other words, if you want an AI to reach a path_corner, then turn to face a direction, then wait for a time, then play an animation, you need to link the nodes in that order.  &lt;br /&gt;
&lt;br /&gt;
 path_corner ---&amp;gt; path_turn ----&amp;gt; path_wait ----&amp;gt; path_cycleanim -----&amp;gt; next path_corner&lt;br /&gt;
&lt;br /&gt;
== Variation and Randomness ==&lt;br /&gt;
&lt;br /&gt;
It is also possible to target multiple nodes (using &amp;quot;target1&amp;quot;, &amp;quot;target2&amp;quot; etc. spawn args). In this case, the AI will choose one of these nodes with equal probability. &lt;br /&gt;
If the &#039;&#039;&#039;&amp;quot;chance&amp;quot;&#039;&#039;&#039; spawn arg (between 0 and 1) is set on a node, it defines the probability for the AI to choose this path node next when multiple path nodes are targetted.  The chances at any point must not add to greater than 1, or it won&#039;t work properly.  For example, if a path_corner targets two different nodes, you could set &amp;quot;chance&amp;quot; &amp;quot;.75&amp;quot; on one and &amp;quot;chance&amp;quot; &amp;quot;.25&amp;quot; on the other.  This will result in AI choosing the first path 3/4 of the time.&lt;br /&gt;
&lt;br /&gt;
There are now two new spawnargs, &#039;&#039;&#039;&amp;quot;alert_idle_only&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;&amp;quot;idle_only&amp;quot;&#039;&#039;&#039; that can be set on path nodes. The nodes are then only chosen when the AI is in that state.  For example, if you set a path_corner as &amp;quot;idle_only&amp;quot;, then the AI will no longer go to that path node when it has been alerted.  This allows the mapper to set a complete set of alternate patrols and actions for AI who have been alerted (like sending them to guard important areas).  (for info on how to use Objectives to alter paths, see [[Objectives#Using_Objectives_Creatively]])&lt;br /&gt;
&lt;br /&gt;
Nodes that make the AI walk to a specified location (currently the only one that does this is the path_corner) can have an &#039;&#039;&#039;&amp;quot;move_to_position_tolerance&amp;quot;&#039;&#039;&#039; spawn arg, which defines how close the AI has to be to the destination point to determine the position as reached. Normally, the AI considers the position reached as soon as it is inside its bounding box (most of our humanoid AI are using aas32, so the point would need to be within 16 units from the AI&#039;s origin). This is not always accurate enough, for example when a path_corner is placed in front of a chair where the AI is supposed to sit down, making the AI place half of their back next to the chair.&lt;br /&gt;
&lt;br /&gt;
[Fidcal: I believe the accuracy spawnarg is replaced by the move_to_position_tolerance above. The following likely applies to the new spawnarg anyway.]&lt;br /&gt;
Setting the accuracy spawn arg will change the horizontal size of the bounding box used for checking. If the accuracy is set to negative values (default is -1), the standard bounding box will be used as before.&lt;br /&gt;
&lt;br /&gt;
This spawnarg is available for all entities and can also affect AIs moving towards levers or buttons.&lt;br /&gt;
&lt;br /&gt;
= Kinds of Path Nodes =&lt;br /&gt;
&lt;br /&gt;
== path_corner ==&lt;br /&gt;
Probably the most common path node, this is a &amp;quot;travel node&amp;quot;.  AI will walk from their current position to this node in as straight a line as possible.  This node must be on the ground and in an area AI can reach.  See [[Pathfinding]] for more information on how to help AI go from one node to another.&lt;br /&gt;
&lt;br /&gt;
To make AI patrol an area, each path_corner node can target the next one in sequence.  If AI reach a node that does not target anything, they will stop there and no longer move without player interaction.  It is possible for two path_nodes to target each other, which means the AI will walk from one to the other and back again endlessly.&lt;br /&gt;
&lt;br /&gt;
A single entity (path node or AI) can target more than one path_corner; D3 will randomly choose between the targetted nodes.  Use the following syntax:  &#039;&#039;(actually this syntax needs to be double checked)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 target path_corner_1&lt;br /&gt;
 target2 path_corner_2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(At the moment, targetting more than 2 path_corners from the same entity does not seem to work (possibly a DR bug).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the example below, both A and B are path_corner nodes.  On map start, the AI will walk to A, then turn and walk to B, then stop.&lt;br /&gt;
&lt;br /&gt;
[[image:pathfinding2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Extra note: To make an AI run on patrol add the property/value : &amp;quot;run&amp;quot; &amp;quot;1&amp;quot; to a path_corner on the AI&#039;s patrol and the AI will run to it (then resume walking after it if the next path_corner does not have that property set.) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that an AI will return to a path_corner &#039;&#039;(does it choose the nearest or most recent?)&#039;&#039; after a failed search.  If you do not have at least one path_corner, the AI will stop wherever they are when their search is complete.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Also note that if the AI is going to stop at a path_corner--perhaps to wait a spell--the path_corner origin should be kept at least 16 horizontal units away from monsterclip and worldspawn brushes. Otherwise, the stopping animation might not look right.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== path_wait ==&lt;br /&gt;
&lt;br /&gt;
This is a behaviour node. It does not tell an AI to move anywhere.  This node tells an AI to wait in an idle state for a given amount of time.  Once that time is up, the AI will proceed to whatever the next target is (a path_wait with no target is pretty pointless).  &lt;br /&gt;
&lt;br /&gt;
A path_wait node appears as a small orange box.  It has a directional arrow, but that has no affect on which direction the AI faces in the first place. However, you can set the angle key on the path either by rotating the entity or by setting the key directly to make the AI turn and face this direction before starting to wait. &#039;&#039;&#039;Important:&#039;&#039;&#039; If the angle is 0 make sure it is actually on the entity and not just default.&lt;br /&gt;
&lt;br /&gt;
A path_wait node should have a &amp;quot;wait&amp;quot; property, with the number of seconds the AI should wait there before proceeding.  It can also have a &amp;quot;wait_max&amp;quot; property  which will vary the repeat time. So for example...&lt;br /&gt;
&lt;br /&gt;
    * wait 30&lt;br /&gt;
    * wait_max 40 &lt;br /&gt;
&lt;br /&gt;
...will cause the AI to wait between 30 to 40 seconds before proceeding. If wait_max is set to 0, the AI will always wait exactly the time specified in wait before proceeding. If you set wait to 0, the AI will wait between 0 seconds and the time specified in wait_max. Default values are 2 seconds for wait, and 0 seconds for wait_max, so the AI will always wait exactly 2 seconds.&lt;br /&gt;
&lt;br /&gt;
In the following example, A and B are path_corners, and the small orange box is a path_wait entity.  On map start, the AI will walk to A and wait there for the required amount of time, then turn and proceeds to B.&lt;br /&gt;
&lt;br /&gt;
[[image:pathfinding3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note that it does not matter &#039;&#039;&#039;where&#039;&#039;&#039; the path_wait node is placed.  The AI does not actually follow the orange lines (this is not really intuitive, I know).  The example below would cause the exact same behaviour as the example above--in both cases the AI will walk directly from A to B.&lt;br /&gt;
&lt;br /&gt;
[[image:pathfinding4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another useful example for path_wait is that of the stationary guard who turns to look in different directions periodically.  This can be schematically represented (arrows indicate target links) as:&lt;br /&gt;
&lt;br /&gt;
AI -&amp;gt; path_corner1 -&amp;gt; path_wait1 -&amp;gt; path_wait2 -&amp;gt; path_corner1&lt;br /&gt;
&lt;br /&gt;
Example properties for the path_wait are:&lt;br /&gt;
 wait: 5  (minimum time to wait on action)&lt;br /&gt;
 wait_max: 10  (maximum time to wait on action)&lt;br /&gt;
 angle: 0  (&#039;&#039;&#039;Important&#039;&#039;&#039;:  this property is essential for proper function even if the angle is 0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The AI walks to or stands at the path_corner.  The next action is to do what is indicated by the first path_wait.  In this example, it tells the AI to face a particular direction for a certain period of time.  This then targets a second path_wait which has the AI face a different direction for a certain period of time.  To complete the cycle, the second path_wait then targets the original path_corner.  The path_corners are necessary because again, the path_wait doesn&#039;t contain pathing or location information.  Without the path_corner, if the AI is caused to wander (e.g. becomes alerted), it might not return to the original standing spot, and instead will do the look angles right where it stands.  The path_corner assures the AI returns to its original position.&lt;br /&gt;
&lt;br /&gt;
== path_turn == &lt;br /&gt;
&lt;br /&gt;
This behaviour node tells an AI to turn in place to face a chosen direction.  It does not make the AI walk anywhere.  This is the one node where the directional arrow does seem to matter--the AI turns to face the same direction as the arrow.  Alternately, you can use  the property &amp;quot;angle&amp;quot; and the values below:&lt;br /&gt;
&lt;br /&gt;
* 0 = East (X)&lt;br /&gt;
* 90 = North (Y)&lt;br /&gt;
* 180 = West (-X)&lt;br /&gt;
* 270 = South (-Y)&lt;br /&gt;
* 360 = East(X)&lt;br /&gt;
&lt;br /&gt;
(Actually, to be more accurate, rotating the entity automatically adds the &amp;quot;angle&amp;quot; property to the entity. If you just leave the arrow facing the way it is when you create the entity, there will be no &amp;quot;angle&amp;quot; property, and therefore the AI will not turn.)&lt;br /&gt;
&lt;br /&gt;
== path_anim ==&lt;br /&gt;
&lt;br /&gt;
This is a behaviour node that makes the AI play an animation, once.  When that animation is done, it proceeds to the next target (if any).  This could be used to make an AI walk over to a bookshelf and play a &#039;reaching out&#039; animation, for example.  Other possibilities include peering through a window, picking a carrot off a table and eating it, or running to a spot and cowering.  &lt;br /&gt;
&lt;br /&gt;
The syntax proper syntax is:&lt;br /&gt;
&lt;br /&gt;
 anim  [animation name]&lt;br /&gt;
&lt;br /&gt;
You can see the list of animations names here: [[Animation List]].  Do not use the name of the actual animation file.  &lt;br /&gt;
&lt;br /&gt;
A path_anim can have only one animation, but it is possible for a single entity to target more than one path_anim.  The AI will pick one of the path_anim nodes at random and play that animation.&lt;br /&gt;
&lt;br /&gt;
When you first create the path_anim entity, the directional arrow is meaningless.  However, if you rotate the entity, the &amp;quot;angle&amp;quot; property is added to the entity and is updated based on which direction the arrow is pointing.  That property indicates the direction the AI will face while playing the animation.  &#039;&#039;&#039;This value appears to be necessary to make the animation work.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tip:  Animation blending doesn&#039;t seem to do very much, so AI often &amp;quot;snap&amp;quot; into position from walking to playing the animation.  For a more natural look, add a path_wait of a few seconds first, so AI transition to their idle pose before playing the animation.&lt;br /&gt;
&lt;br /&gt;
== path_sit ==&lt;br /&gt;
&lt;br /&gt;
This is a behaviour node that makes the AI sit down at its current location.  See [[Sitting Behaviour for AI]] for more information.&lt;br /&gt;
&lt;br /&gt;
== path_waitfortrigger ==&lt;br /&gt;
&lt;br /&gt;
Waits at a given place until triggered, then proceeds to the next target.  This is useful if you want some control over exactly where the AI is when the players first see it.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;path_waitfortrigger&amp;quot; basically operates like a wall, blocking the AI from proceeding until triggered.&lt;br /&gt;
&lt;br /&gt;
Here are the steps for future reference. Let&#039;s say you want an AI to stand somewhere until a player triggers him, then you want him to walk to path_corner 1.&lt;br /&gt;
&lt;br /&gt;
1. Make a &amp;quot;path_waitfortrigger&amp;quot; pathnode, and have it target &amp;quot;path_corner_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Have the AI target the &amp;quot;path_waitfortrigger&amp;quot; pathnode.&lt;br /&gt;
&lt;br /&gt;
3. Create a trigger_once entity, and target the AI.&lt;br /&gt;
&lt;br /&gt;
The AI will stand where they are at map start and behave as if there are no pathnodes set (ie, he plays idle animations and can be alerted). When the player goes through the trigger, the &amp;quot;path_waitfortrigger&amp;quot; is cleared and the AI will proceed to path_corner_1.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried a few different setups and gotten unusual results...more testing needed.&lt;br /&gt;
&lt;br /&gt;
== path_interact ==&lt;br /&gt;
&lt;br /&gt;
This lets the AI interact with an entity (for example a button) in a similar way to frobbing. This will only work for buttons etc, not for inventory items and moveables. The AI will stop and look at the entiy while interacting, but not walk to it, so a path_corner next to the entity is required.  AI will use normal doors and elevators without needing a path_interact (confirmation needed).  However, this could be used to make AI turn on lightswitches, open mechanical doors, etc.&lt;br /&gt;
&lt;br /&gt;
You need to add these spawnargs to the path_interact entity:&lt;br /&gt;
&lt;br /&gt;
ent &amp;lt;name of entity to be frobbed by AI&amp;gt;&lt;br /&gt;
&lt;br /&gt;
target &amp;lt;next path entity (if any)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= How to Make AI do Random Interesting Things (RIT) =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by Sotha&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use the above to make individual AI seem to do Random Interesting Things (RIT) when entering a room. Note that it will work with basic dendritic AI, so you could have multiple AI&#039;s running in several rooms doing things.&lt;br /&gt;
&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
Please see the dedicated RIT network article for more details. [[RIT Networks]]&lt;br /&gt;
&lt;br /&gt;
= Flee Points =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do NOT target the AI to a flee point; AI will automatically go to a flee point if in danger. Just make available path_flee_point entities at suitable places where you would like your AI to flee to.&lt;br /&gt;
&lt;br /&gt;
On the path_flee_point entity:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;is_guarded&amp;quot; A fleeing AI, eg, a civilian, would give this preference (but it is up to the mapper to actually provide a guard there.)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;team&amp;quot; Only AI on this team would use this flee point.&lt;br /&gt;
&lt;br /&gt;
* This is how the code works:&lt;br /&gt;
* The AI tries to determine the nearest friendly guarded flee point and flee to it.&lt;br /&gt;
* If there is no friendly guarded flee point, the AI tries to find the nearest friendly flee point (on friendly team) and run to it.&lt;br /&gt;
* If this also fails, the AI tries to find an AAS area far from the enemy and run there.&lt;br /&gt;
* If the enemy is still visible when the AI reaches his destination, he chooses the farthest friendly guarded flee point to run to, &lt;br /&gt;
* if this fails, the farthest friendly flee point, &lt;br /&gt;
* and if this also fails falls back to choosing an AAS area far from the enemy to run to.&lt;br /&gt;
* So neither the priority nor the target spawn arg have any function here, it is not possible to weight the flee points. The AI will choose one automatically.&lt;br /&gt;
&lt;br /&gt;
A problem occurs when the AI doesn&#039;t find any appropriate flee points but also no AAS area that is far away enough from the enemy. In this case, he will just stand there. Maybe he should either cower and be afraid in this case or just run around like a mad chicken?&lt;br /&gt;
&lt;br /&gt;
Whether a fleeing AI passes on info to other AI as to the source of their alert (ie so armed guard would go to investigate to the right place whereas another civilan might also flee to the farthest point.)&lt;br /&gt;
Yes, they do. The cry for help bark is propagated to other AI and carries information about the last alert position.&lt;br /&gt;
&lt;br /&gt;
Armed AI will also flee if their health points drop to a certain level? Where is that determined?&lt;br /&gt;
This is determined by the health_critical spawn arg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Untested Nodes =&lt;br /&gt;
&lt;br /&gt;
I have not personally tested the following, so I&#039;m just going by their editor descriptions.  They may or may not work as described.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== path_cycleanim ==&lt;br /&gt;
&lt;br /&gt;
The AI stays in place and loops the selected animation, either for a specified amount of time (using the &#039;wait&#039; property) or until triggered.  Syntax needed.&lt;br /&gt;
&lt;br /&gt;
== path_lookat ==&lt;br /&gt;
&lt;br /&gt;
This does not stop the AI, but they will turn their head and look somewhere specific as they walk to their next target.  For the next &#039;&#039;wait&#039;&#039; seconds, turn head to look at the entity given by the &#039;&#039;focus&#039;&#039; spawnarg (defaults to looking at the path_lookat entity itself). This is useful if you want to make sure an AI is looking at a specific spot (or away from a certain spot) during their patrol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== path_hide ==&lt;br /&gt;
&lt;br /&gt;
Supposedly deactivates and stops rendering the AI.  &lt;br /&gt;
&lt;br /&gt;
Turns out this doesn&#039;t work well with TDM...makes AI invisible but they still talk and occupy space.  To remove an AI from the map, try grayman&#039;s approach:&lt;br /&gt;
&lt;br /&gt;
 Create a [b]func_remove[/b] with this spawnarg:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;target&amp;quot; &amp;quot;&amp;lt;AI&#039;s name&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 At the point in his path where you want him to disappear, place a [b]trigger_once_entityname[/b] with these spawnargs:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;entityname&amp;quot; &amp;quot;&amp;lt;AI&#039;s name&amp;gt;&amp;quot;&lt;br /&gt;
 &amp;quot;target&amp;quot; &amp;quot;&amp;lt;func_remove&#039;s name&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When the AI walks through the [b]trigger_once_entityname[/b], it recognizes him, triggers the [b]func_remove[/b], and that takes the AI out of the game.&lt;br /&gt;
&lt;br /&gt;
I wrapped the AI&#039;s final path corner in a trigger_once_entityname and gave the trigger the keyword pair &amp;quot;entityname &amp;lt;AI_name&amp;gt;&amp;quot;. (The docs don&#039;t tell you about this key, but the game will error out if it&#039;s not there, and tell you it&#039;s missing. A classic &amp;quot;trial by error&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
== path_show ==&lt;br /&gt;
&lt;br /&gt;
Starts rendering the AI.  I would assume this one would be linked to a path_waitfortrigger, to create AI that spawn when triggered.  This could be used to create the effect that an AI just came through a doorway or around a corner.&lt;br /&gt;
&lt;br /&gt;
== path_attack ==&lt;br /&gt;
&lt;br /&gt;
Used to script AI attacking a particular enemy, for scripted sequences I guess. AI will continue on to the next path entity if it kills the enemy.&lt;br /&gt;
&lt;br /&gt;
Questions:  How do you define who the AI attacks?&lt;br /&gt;
&lt;br /&gt;
[Fidcal]: Just found this - &amp;quot;Character will attack the character specified by &#039;enemy&#039; key. Character will go to next path when enemy dies or when activated.&amp;quot; Not tested.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tutorial-editing}}&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15177</id>
		<title>RIT Networks</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=RIT_Networks&amp;diff=15177"/>
		<updated>2012-05-17T08:43:01Z</updated>

		<summary type="html">&lt;p&gt;Sotha: Created page with &amp;quot;= What are RITs? = RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.  = How Do They ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What are RITs? =&lt;br /&gt;
RITs (Random Interesting Things) can be used to make your AI more interesting, unpredictable and challenging. More lifelike AI can be achieved.&lt;br /&gt;
&lt;br /&gt;
= How Do They Work? =&lt;br /&gt;
For RITs, there are two types of path nodes: decision making nodes and normal nodes. The decision making ones are always path_waits and normal nodes can be any kind of path entities.&lt;br /&gt;
The core idea behind RITs is the following:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_basic.png‎]]&lt;br /&gt;
&lt;br /&gt;
The blue boxes are path_waits. They should have wait 0 and the angle spawnarg removed. These path nodes are used as the decision making nodes. The AI does not need to walk to them, but it will choose some of the path nodes the path_wait is targeting. The red/green boxes mean any kind of combination of path nodes. Typically a path_corner to make the AI to walk to a certain location, maybe a path_anim to make the AI to play an animation there, and maybe a path_wait to make the AI stand still for a while.&lt;br /&gt;
&lt;br /&gt;
As you can see, the basic idea is that the AI targets a path_wait (enter), which doesn&#039;t do anything else, but sends the AI to some of its targets. The AI then goes and does one of the things dictated by the path_wait decision making node. Once the AI has gone through one of the paths, the final path node in that path targets another path_wait (exit). This exit path can then target what ever the mapper wishes, as long as the decision making nodes form an endless loop. If there is no loop, the AI will eventually stop and the path route terminus.&lt;br /&gt;
&lt;br /&gt;
= Practical Setup =&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Example RIT Network Setups =&lt;br /&gt;
The common situation in a map is a guarded location. The mapper could build a common RIT network for all the guards in a specific location. The mapper might still want to place static (or the RIT door guard setup) to ultra critical areas that must be manned at all times. Guard RIT patrol routes are fantastic for those ordinary patrolling guards. The benefit is that you only need a single network that can handle multiple AI at once. Also you can later inject more guards (for example sleeping AI that got alerted) into the network without the need to build individual patrol routes to new guards. The mapper could also inject additional guards in the network based on the difficulty the player chooses.&lt;br /&gt;
&lt;br /&gt;
== The Basic Guard Patrol RIT ==&lt;br /&gt;
The basic RIT guard network concept looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The green boxes are a static route the AI follows. They are path_corners. At some point the route either continues along the normal static route, or sends the AI to a side tract RIT network. See the basic RIT unit to understand what the teal RIT circle means. Basically the AI goes side track, visit a room that is on his route. The mapper can use the chance spawnarg on the RIT enter path_wait, to control how likely the AI is to take the side road. The RITs might be room specific. AI guard RIT in the kitchen means snack time, side track RIT in the main hall might mean sitting down and chilling for a while.&lt;br /&gt;
&lt;br /&gt;
Note the shortcut in the rightmost RIT circle. RIT exits could make the AI take shortcut or even make the AI go back in the opposite direction. This is a good option to consider as you see the RIT patrol would always take a clockwise general direction. If there was a single anti-clockwise path, which the AI could occasionally take, the RIT would function in all directions.&lt;br /&gt;
&lt;br /&gt;
== The Basic Servant RIT ==&lt;br /&gt;
Servants do something else than the guards, therefore they should not use RITs designed for guards. An example of a good servant RIT network is presented here.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_servant.png‎]]&lt;br /&gt;
&lt;br /&gt;
As you can see, the setup is room specific and there are no static patrol parts. Note also how the RIT cycles target each other and even themselves. This means that the servant roams to a room, doing tasks the RIT sidetracks make them do: cleaning, cooking, etc. Since the RIT circles target themselves, (and if the &amp;quot;exit&amp;quot; path_wait targets the &amp;quot;enter&amp;quot; path_wait of the room the AI is currently in with a high chance) the servant can spend some time doing tasks in a single room. Then after a while he moves to another location. Servants could thus be anywhere: cooking, cleaning, getting a bottle of wine from the cellar, sitting in the backyard for a break, etc...&lt;br /&gt;
&lt;br /&gt;
== The Basic Roaming RIT ==&lt;br /&gt;
Sometimes the guard and servant RITs are not enough and you need to do something specific. Maybe the lord of the house is strolling around the house and the manor grounds. Maybe there is a thief lurking in the city. Maybe there are some random civilians walking around. In these cases roaming RITs are good option.&lt;br /&gt;
&lt;br /&gt;
[[Image:roaming_RIT.png‎]]&lt;br /&gt;
&lt;br /&gt;
In this setup, the AI uses a single RIT circle, but the circle is spread across the whole map. The &amp;quot;enter&amp;quot; path_wait can send the arbitrarily anywhere in the map. Once the AI reaches the goal the &amp;quot;exit&amp;quot; path_wait targets again the &amp;quot;enter&amp;quot; path_wait. And again the AI goes somewhere totally else.&lt;br /&gt;
&lt;br /&gt;
== The Basic Door Guard RIT ==&lt;br /&gt;
The Basic Door Guard RIT is a good option for static guards that are supposed to guard a single critical location. In old thief games these were the guards that stay put, but turn to look the other way every now and then. With RIT version you can do exactly that but you can do so much more.&lt;br /&gt;
&lt;br /&gt;
[[Image:RIT_door_guard.png‎]]&lt;br /&gt;
&lt;br /&gt;
The basic idea is that there is a normal repeating RIT cycle (&amp;quot;enter&amp;quot; targets path nodes, which target &amp;quot;exit&amp;quot; which targets &amp;quot;enter&amp;quot; again; an endless loop.) In this case the AI is guarding the door. The mapper could build an interesting RIT network for all kinds of random stuff a bored door guard might do: take leak, get a snack, walk around a bit, etc. The thing is, that the mapper simply sets the chance spawnarg on the &amp;quot;guard door&amp;quot; path nodes (a path_corner, a path_anim (look around) and a path_wait) so that the AI spends 75% or similar at the door. Then occasionally the AI would leave door and take the break action the mapper defined.&lt;br /&gt;
&lt;br /&gt;
== Putting Even More Life to the AI ==&lt;br /&gt;
RIT increases the liveliness of the AI but you can push the immersion even further. For instance, you could place trigger_entityname -entities in places where the AI of a certain name walks past. When the AI walks through the trigger, a conversation would be triggered between the passing AI and a nearby AI. A good example of this are all the conversation in the Phrase Book. Designing the conversation so that you can mix and match different lines so that the discussion still works, would create a scene where AI behave like real people and occasionally stop and have a random chat. &lt;br /&gt;
&lt;br /&gt;
== RIT Troubleshooting and Testing ==&lt;br /&gt;
As the networks can seem quite complex at first, one might think that troubleshooting them is very difficult. It is not. You can simply test you RIT networks by letting you map run for a long time. If there are some mistakes that break the cycle, the AI are standing near the path entity that failed to send the AI back into the RIT network cycle. &lt;br /&gt;
&lt;br /&gt;
One way to efficiently test your RITs is to create temporary AIs in the map so you have large amount of AIs testing the network.&lt;br /&gt;
&lt;br /&gt;
If you generate a particularily challenging RIT branch for the AI (using path_nodes you are not familiar with, for example) it might be a good idea to create a test AI or a few which directly target the branch and check ingame how they manage.&lt;br /&gt;
&lt;br /&gt;
When creating separate guard partrol RITs, servant RITs and roaming RITs in your map, it might be a good idea to use the DR layer function so that you can hide all the non-related path_nodes and focus on the one you are creating.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
RIT networks are a nice and relatively simple way to add liveliness and unpredictability for your AI. It also makes it easy for the mapper to inject more AI to the mission flow if needed. However, the added unpredictability increases the mission challenge and difficulty so the mapper should be careful how many AI he adds to the networks. Generally a good RIT has the possibility of sending AI to any location in the map, but the probabilities should be tuned so that the golden rule of location security levels still apply. (Meaning, that the map has areas of varying danger: low tension, medium tension and high tension)&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:RIT_door_guard.png&amp;diff=15176</id>
		<title>File:RIT door guard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:RIT_door_guard.png&amp;diff=15176"/>
		<updated>2012-05-17T07:59:14Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:Roaming_RIT.png&amp;diff=15175</id>
		<title>File:Roaming RIT.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:Roaming_RIT.png&amp;diff=15175"/>
		<updated>2012-05-17T07:58:02Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:RIT_servant.png&amp;diff=15174</id>
		<title>File:RIT servant.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:RIT_servant.png&amp;diff=15174"/>
		<updated>2012-05-17T07:57:30Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:RIT_guard.png&amp;diff=15173</id>
		<title>File:RIT guard.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:RIT_guard.png&amp;diff=15173"/>
		<updated>2012-05-17T07:56:49Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=File:RIT_basic.png&amp;diff=15172</id>
		<title>File:RIT basic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=File:RIT_basic.png&amp;diff=15172"/>
		<updated>2012-05-17T07:50:26Z</updated>

		<summary type="html">&lt;p&gt;Sotha: The basic unit of RITs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The basic unit of RITs&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14665</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14665"/>
		<updated>2012-03-31T19:16:36Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wiki page is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs on an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
=== Loot Paintings ===&lt;br /&gt;
&lt;br /&gt;
A new feature in [[What&#039;s new in v1.01|TDM v1.01]] are &#039;&#039;&#039;loot paintings&#039;&#039;&#039;. This are simple paintings that the player can frob, and then steal.&lt;br /&gt;
&lt;br /&gt;
[[Image:Painting_before_frob.jpg|240px]]&lt;br /&gt;
[[Image:Painting_after_frob.jpg|240px]]&lt;br /&gt;
&lt;br /&gt;
==== How to add to your map ====&lt;br /&gt;
&lt;br /&gt;
Add one of the following entities to your map:&lt;br /&gt;
&lt;br /&gt;
* atdm:loot_painting&lt;br /&gt;
* atdm:loot_painting_medium&lt;br /&gt;
* atdm:loot_painting_large&lt;br /&gt;
&lt;br /&gt;
==== Customizing ====&lt;br /&gt;
&lt;br /&gt;
You can set the spawnarg [[skin]] on the created entity and then select a different skin.&lt;br /&gt;
&lt;br /&gt;
In addition, you can add the following spawnargs and modify them:&lt;br /&gt;
&lt;br /&gt;
* [[inv_loot_value]] (default is 225)&lt;br /&gt;
* [[inv_loot_type]] (default is 3, meaning LOOT_GOODS)&lt;br /&gt;
&lt;br /&gt;
It makes sense to keep the type at 3. For the value, be careful to not set it too high or too low.&lt;br /&gt;
&lt;br /&gt;
==== See also ====&lt;br /&gt;
&lt;br /&gt;
* [[Combo entities]]&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot to be located in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it &amp;quot;name loot_cache&amp;quot; and &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. Have it to trigger an entity named exec_inventory_grab. Create a atdm:target_callscriptfunction-entity and name it &amp;quot;exec_inventory_grab&amp;quot;. Also give it spawnarg &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the exec_inventory_grab, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, i.e. add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
If you like, you could make a visual cue suggesting the Loot Cache contains objects. You could place a dummy func_static object, a broadhead shaft for example, to stick out from the Cache. Give the dummy-func_static spawnargs: &amp;quot;name dummy_arrow&amp;quot; &amp;quot;bind loot_cache&amp;quot;, &amp;quot;frobable 1&amp;quot;, &amp;quot;frob_distance 1&amp;quot;. Give the loot_cache spawnarg &amp;quot;frob_peer_1 dummy_arrow&amp;quot;. Now the arrow shaft is glued on the Cache and moves with it when the Cache is teleported. Also when the Cache is frob-highlighted, the dummy arrowshaft will highlight as well. If you add the command &lt;br /&gt;
 $dummy_arrow.remove();&lt;br /&gt;
to the last if sentence, the arrow shaft will vanish when the last object has been taken out from the cache, providing a visual clue that the cache indeed is now empty.&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot_paintings&amp;diff=14664</id>
		<title>Loot paintings</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot_paintings&amp;diff=14664"/>
		<updated>2012-03-31T18:04:13Z</updated>

		<summary type="html">&lt;p&gt;Sotha: Redirected page to Loot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Loot]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14663</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14663"/>
		<updated>2012-03-31T18:03:34Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs or an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
=== Loot Paintings ===&lt;br /&gt;
&lt;br /&gt;
A new feature in [[What&#039;s new in v1.01|TDM v1.01]] are &#039;&#039;&#039;loot paintings&#039;&#039;&#039;. This are simple paintings that the player can frob, and then steal.&lt;br /&gt;
&lt;br /&gt;
[[Image:Painting_before_frob.jpg|240px]]&lt;br /&gt;
[[Image:Painting_after_frob.jpg|240px]]&lt;br /&gt;
&lt;br /&gt;
==== How to add to your map ====&lt;br /&gt;
&lt;br /&gt;
Add one of the following entities to your map:&lt;br /&gt;
&lt;br /&gt;
* atdm:loot_painting&lt;br /&gt;
* atdm:loot_painting_medium&lt;br /&gt;
* atdm:loot_painting_large&lt;br /&gt;
&lt;br /&gt;
==== Customizing ====&lt;br /&gt;
&lt;br /&gt;
You can set the spawnarg [[skin]] on the created entity and then select a different skin.&lt;br /&gt;
&lt;br /&gt;
In addition, you can add the following spawnargs and modify them:&lt;br /&gt;
&lt;br /&gt;
* [[inv_loot_value]] (default is 225)&lt;br /&gt;
* [[inv_loot_type]] (default is 3, meaning LOOT_GOODS)&lt;br /&gt;
&lt;br /&gt;
It makes sense to keep the type at 3. For the value, be careful to not set it too high or too low.&lt;br /&gt;
&lt;br /&gt;
==== See also ====&lt;br /&gt;
&lt;br /&gt;
* [[Combo entities]]&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot to be located in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it &amp;quot;name loot_cache&amp;quot; and &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. Have it to trigger an entity named exec_inventory_grab. Create a atdm:target_callscriptfunction-entity and name it &amp;quot;exec_inventory_grab&amp;quot;. Also give it spawnarg &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the exec_inventory_grab, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, i.e. add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
If you like, you could make a visual cue suggesting the Loot Cache contains objects. You could place a dummy func_static object, a broadhead shaft for example, to stick out from the Cache. Give the dummy-func_static spawnargs: &amp;quot;name dummy_arrow&amp;quot; &amp;quot;bind loot_cache&amp;quot;, &amp;quot;frobable 1&amp;quot;, &amp;quot;frob_distance 1&amp;quot;. Give the loot_cache spawnarg &amp;quot;frob_peer_1 dummy_arrow&amp;quot;. Now the arrow shaft is glued on the Cache and moves with it when the Cache is teleported. Also when the Cache is frob-highlighted, the dummy arrowshaft will highlight as well. If you add the command &lt;br /&gt;
 $dummy_arrow.remove();&lt;br /&gt;
to the last if sentence, the arrow shaft will vanish when the last object has been taken out from the cache, providing a visual clue that the cache indeed is now empty.&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14662</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14662"/>
		<updated>2012-03-31T18:00:25Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Loot Cache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs or an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot to be located in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it &amp;quot;name loot_cache&amp;quot; and &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. Have it to trigger an entity named exec_inventory_grab. Create a atdm:target_callscriptfunction-entity and name it &amp;quot;exec_inventory_grab&amp;quot;. Also give it spawnarg &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the exec_inventory_grab, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, i.e. add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
If you like, you could make a visual cue suggesting the Loot Cache contains objects. You could place a dummy func_static object, a broadhead shaft for example, to stick out from the Cache. Give the dummy-func_static spawnargs: &amp;quot;name dummy_arrow&amp;quot; &amp;quot;bind loot_cache&amp;quot;, &amp;quot;frobable 1&amp;quot;, &amp;quot;frob_distance 1&amp;quot;. Give the loot_cache spawnarg &amp;quot;frob_peer_1 dummy_arrow&amp;quot;. Now the arrow shaft is glued on the Cache and moves with it when the Cache is teleported. Also when the Cache is frob-highlighted, the dummy arrowshaft will highlight as well. If you add the command &lt;br /&gt;
 $dummy_arrow.remove();&lt;br /&gt;
to the last if sentence, the arrow shaft will vanish when the last object has been taken out from the cache, providing a visual clue that the cache indeed is now empty.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Loot paintings]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14661</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14661"/>
		<updated>2012-03-31T17:58:09Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Loot Cache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs or an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot to be located in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it &amp;quot;name loot_cache&amp;quot; and &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. Have it to trigger an entity named exec_inventory_grab. Create a atdm:target_callscriptfunction-entity and name it &amp;quot;exec_inventory_grab&amp;quot;. Also give it spawnarg &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the exec_inventory_grab, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, i.e. add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
If you like, you could make a visual cue suggesting the Loot Cache contains objects. You could place a dummy func_static object, a broadhead shaft for example, to stick out from the Cache. Give the dummy-func_static spawnargs: &amp;quot;name dummy_arrow&amp;quot; &amp;quot;bind loot_cache&amp;quot;, &amp;quot;frobable 1&amp;quot;, &amp;quot;frob_distance 1&amp;quot;. Give the loot_cache spawnarg &amp;quot;frob_peer_1 dummy_arrow. Now the arrow shaft is glued on the Cache and moves with it when the Cache is teleported. Also when the Cache is frob-highlighted, the dummy arrowshaft will highlight as well. If you add the command &lt;br /&gt;
 $dummy_arrow.remove();&lt;br /&gt;
to the last if sentence, the arrow shaft will vanish when the last object has been taken out from the cache, providing a visual clue that the cache indeed is now empty.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Loot paintings]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14660</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14660"/>
		<updated>2012-03-31T17:57:24Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Loot Cache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs or an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot to be located in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it &amp;quot;name loot_cache&amp;quot; and &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. Have it to trigger an entity named exec_inventory_grab. Create a atdm:target_callscriptfunction-entity and name it &amp;quot;exec_inventory_grab&amp;quot;. Also give it spawnargs &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the exec_inventory_grab, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, i.e. add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
If you like, you could make a visual cue suggesting the Loot Cache contains objects. You could place a dummy func_static object, a broadhead shaft for example, to stick out from the Cache. Give the dummy-func_static spawnargs: &amp;quot;name dummy_arrow&amp;quot; &amp;quot;bind loot_cache&amp;quot;, &amp;quot;frobable 1&amp;quot;, &amp;quot;frob_distance 1&amp;quot;. Give the loot_cache spawnarg &amp;quot;frob_peer_1 dummy_arrow. Now the arrow shaft is glued on the Cache and moves with it when the Cache is teleported. Also when the Cache is frob-highlighted, the dummy arrowshaft will highlight as well. If you add the command &lt;br /&gt;
 $dummy_arrow.remove();&lt;br /&gt;
to the last if sentence, the arrow shaft will vanish when the last object has been taken out from the cache, providing a visual clue that the cache indeed is now empty.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Loot paintings]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14659</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14659"/>
		<updated>2012-03-31T17:53:04Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Loot Cache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs or an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot to be located in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it spawnarg &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. The target should be a name of a atdm:target_callscriptfunction-entity, which &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the atdm:target_callscriptfunction, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, i.e. add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
If you like, you could make a visual cue suggesting the Loot Cache contains objects. You could place a dummy func_static object, a broadhead shaft for example, to stick out from the Cache. Give the dummy-func_static spawnargs: &amp;quot;bind name-of-the-Cache-object&amp;quot;, &amp;quot;frobable 1&amp;quot;, &amp;quot;frob_distance 1&amp;quot;. Give the Cache-object spawnarg &amp;quot;frob_peer_1 name-of-the-dummy-func_static. Now the arrow shaft is glued on the Cache and moves with it when the Cache is teleported. Also when the Cache is frob-highlighted, the dummy arrowshaft will highlight as well. If you add the command &lt;br /&gt;
 $name-of-the-dummy-func_static.remove();&lt;br /&gt;
to the last if sentence, the arrow shaft will vanish when the last object has been taken out from the cache, providing a visual clue that the cache indeed is now empty.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Loot paintings]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14658</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14658"/>
		<updated>2012-03-31T17:50:47Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Loot Cache */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs or an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot to be located in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it spawnarg &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. The target should be a name of a atdm:target_callscriptfunction-entity, which &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the atdm:target_callscriptfunction, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, i.e. add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
If you like, you could make a visual cue suggesting the Loot Cache contains objects. You could place a dummy func_static object, a broadhead shaft for example, to stick out from the Cache. Give func_static spawnargs: &amp;quot;bind name-of-the-Cache-object&amp;quot;, &amp;quot;frobable 1&amp;quot;, &amp;quot;frob_distance 1&amp;quot;. Give the Cache-object spawnarg &amp;quot;frob_peer_1 (name-of-the-dummy-func_static). Now the arrow shaft is glued on the Cache and moves with it when the Cache is teleported. Also when the Cache is frob-highlighted, the dummy arrowshaft will hightlight as well. If you add the command &lt;br /&gt;
 $name-of-the-dummy-func_static.remove();&lt;br /&gt;
to the last last if sentence, the arrow shaft will vanish from the Cache, providing a visual cue that the last object has been taken out from the cache.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Loot paintings]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14657</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14657"/>
		<updated>2012-03-31T17:43:10Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Basic Loot Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting &#039;create entity&#039;. Preconfigured loot objects are available in the entity lists. You can also make new non-standard loot objects by changing the spawnargs or an already added loot item: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot be in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it spawnarg &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. The target should be a name of a atdm:target_callscriptfunction-entity, which &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the atdm:target_callscriptfunction, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, ie add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Loot paintings]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14656</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Loot&amp;diff=14656"/>
		<updated>2012-03-31T17:37:38Z</updated>

		<summary type="html">&lt;p&gt;Sotha: Created page with &amp;quot;== Introduction == This wikipage is for general information and guides dealing with loot related things.   == Basic Loot Objects == You can add loot into your map by right clicki...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This wikipage is for general information and guides dealing with loot related things. &lt;br /&gt;
&lt;br /&gt;
== Basic Loot Objects ==&lt;br /&gt;
You can add loot into your map by right clicking the orthoview in DR and selecting create entity. Preconfigured loot objects are available in the entitylists. You can also make new non-standard objects into loot by changing an already added loot items spawnargs: inv_loot_value, model, etc.&lt;br /&gt;
&lt;br /&gt;
== Advanced Loot Objects ==&lt;br /&gt;
Sometimes more elaborate loot elements are required.&lt;br /&gt;
&lt;br /&gt;
=== Loot Cache ===&lt;br /&gt;
A Loot Cache is a special object that gives items to the player upon frobbing. A closed bag, for example. The player frobs it and receives an arrow. He frobs again and receives a health potion. When the player frobs the third time the bag is empty and the player gets nothing. These kind of objects could be useful for random stashes in the map. Mapper could prepare such a bag and teleport it anywhere in the map upon each mission restart, making the loot be in a different place each playtime, increasing replayability of the mission. When placing Loot Caches, be sure to make them seem unusual and different from their surroundings, luring the player to go and frob it.&lt;br /&gt;
&lt;br /&gt;
Recipe:&lt;br /&gt;
Create a func_static stash object. A bag, for example. Give it spawnarg &amp;quot;frobable 1&amp;quot;. Select the object and open it in the S&amp;amp;R editor. Add frob from the response list. The effect of the response should be trigger. The target should be a name of a atdm:target_callscriptfunction-entity, which &amp;quot;call inventory_grab&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
The end result should be that when the object receives a frob, the S&amp;amp;R triggers the atdm:target_callscriptfunction, which in turn calls a script named inventory_grab.&lt;br /&gt;
&lt;br /&gt;
Create in your maps folder, alongside the mission-name.map a file called mission-name.script. &lt;br /&gt;
Enter this kind of script into the file:&lt;br /&gt;
&lt;br /&gt;
 float cache_state = 0; // a global mapwide variable to tell the map how much stuff the player has taken from the cache.&lt;br /&gt;
 void inventory_grab()&lt;br /&gt;
 {&lt;br /&gt;
 sys.println(&amp;quot;inventory grab script running&amp;quot;); // Print the text to the console&lt;br /&gt;
    if ( cache_state == 0 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 0&amp;quot;);&lt;br /&gt;
        $item_name_0.addItemToInv($player1); //put item_name_0 into player inventory and let the player know about it.&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 1 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 1&amp;quot;);&lt;br /&gt;
        $item_name_1.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
    if ( cache_state == 2 ) {&lt;br /&gt;
        sys.println(&amp;quot;Give item 2&amp;quot;);&lt;br /&gt;
        $item_name_2.addItemToInv($player1);&lt;br /&gt;
    }&lt;br /&gt;
 cache_state = cache_state + 1; // increment the variable to make the script give the next object to the player when he frobs the cache again.&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You need to create item_name_X objects into your map&#039;s blueroom. These objects could be anything that can be picked up: loot, scrolls, books, player tools, player weapons, arrows. Expand the script if you have more objects in the cache, ie add more if sentences. Handy tip: remember that arrows have the inv_ammo_amount spawnarg. Setting this to 10 on the arrow entity could make the player receive 10 broadheads with a single frob.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Loot paintings]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Path_Nodes&amp;diff=13745</id>
		<title>Path Nodes</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Path_Nodes&amp;diff=13745"/>
		<updated>2012-01-28T17:35:40Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* How to Make AI do Random Interesting Things (RIT) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;originally written by Springheel&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For more information on pathfinding, see [[Pathfinding]].  For more general info on getting your AI to patrol, see [[AI Patrol]].&lt;br /&gt;
&lt;br /&gt;
= What are Path Nodes? =&lt;br /&gt;
&lt;br /&gt;
Path entities (or path nodes) are the things that you use to make your AI move (patrol) around the map. Placing path nodes can take a little getting used to; hopefully this article will help (I&#039;m far from an expert, but here&#039;s what I&#039;ve discovered so far).&lt;br /&gt;
&lt;br /&gt;
There are lots of different kinds of path nodes.  It can sometimes help to think of them as &amp;quot;travel nodes&amp;quot; (nodes that AI will travel to) and &amp;quot;behaviour nodes&amp;quot; (nodes that tell AI how to behave at a certain point).  &lt;br /&gt;
&lt;br /&gt;
Although path nodes have a directional arrow in the editor, it has no impact on most nodes.  Rotating the node does add a corresponding &amp;quot;angle&amp;quot; property to the entity (matching the direction of the arrow).  Certain nodes (path_anim, path_wait, and path_turn, for example) are affected by the &amp;quot;angle&amp;quot; property, but most will ignore it.&lt;br /&gt;
&lt;br /&gt;
= How to use Path Nodes =&lt;br /&gt;
&lt;br /&gt;
Path nodes are placed like any other entity (RMB and select &amp;quot;add entity&amp;quot;, then scroll to &amp;quot;paths&amp;quot;).  They show up as a coloured box with an arrow in the editor (colour varies depending on config.)&lt;br /&gt;
&lt;br /&gt;
Path nodes are useless if they are not linked to another entity (either an AI or another node).  In order to link them, you use the &amp;quot;target&amp;quot; property.  This tells the AI what path node they should go to (or act on) next.  If you type &amp;quot;target&amp;quot; &amp;quot;path_corner_1&amp;quot; in your AI property list, then your AI will walk to &amp;quot;path_corner_1&amp;quot; when the map starts.  Without a &amp;quot;target&amp;quot; property, your AI will not go anywhere.  Once you add a &amp;quot;target&amp;quot; property to either your AI or another node, you should see a colored line connecting the two entities.&lt;br /&gt;
&lt;br /&gt;
Behaviour nodes activate behaviour in order.  In other words, if you want an AI to reach a path_corner, then turn to face a direction, then wait for a time, then play an animation, you need to link the nodes in that order.  &lt;br /&gt;
&lt;br /&gt;
 path_corner ---&amp;gt; path_turn ----&amp;gt; path_wait ----&amp;gt; path_cycleanim -----&amp;gt; next path_corner&lt;br /&gt;
&lt;br /&gt;
== Variation and Randomness ==&lt;br /&gt;
&lt;br /&gt;
It is also possible to target multiple nodes (using &amp;quot;target1&amp;quot;, &amp;quot;target2&amp;quot; etc. spawn args). In this case, the AI will choose one of these nodes with equal probability. &lt;br /&gt;
If the &#039;&#039;&#039;&amp;quot;chance&amp;quot;&#039;&#039;&#039; spawn arg (between 0 and 1) is set on a node, it defines the probability for the AI to choose this path node next when multiple path nodes are targetted.  The chances at any point must not add to greater than 1, or it won&#039;t work properly.  For example, if a path_corner targets two different nodes, you could set &amp;quot;chance&amp;quot; &amp;quot;.75&amp;quot; on one and &amp;quot;chance&amp;quot; &amp;quot;.25&amp;quot; on the other.  This will result in AI choosing the first path 3/4 of the time.&lt;br /&gt;
&lt;br /&gt;
There are now two new spawnargs, &#039;&#039;&#039;&amp;quot;alert_idle_only&amp;quot;&#039;&#039;&#039; and &#039;&#039;&#039;&amp;quot;idle_only&amp;quot;&#039;&#039;&#039; that can be set on path nodes. The nodes are then only chosen when the AI is in that state.  For example, if you set a path_corner as &amp;quot;idle_only&amp;quot;, then the AI will no longer go to that path node when it has been alerted.  This allows the mapper to set a complete set of alternate patrols and actions for AI who have been alerted (like sending them to guard important areas).  (for info on how to use Objectives to alter paths, see [[Objectives#Using_Objectives_Creatively]])&lt;br /&gt;
&lt;br /&gt;
Nodes that make the AI walk to a specified location (currently the only one that does this is the path_corner) can have an &#039;&#039;&#039;&amp;quot;move_to_position_tolerance&amp;quot;&#039;&#039;&#039; spawn arg, which defines how close the AI has to be to the destination point to determine the position as reached. Normally, the AI considers the position reached as soon as it is inside its bounding box (most of our humanoid AI are using aas32, so the point would need to be within 16 units from the AI&#039;s origin). This is not always accurate enough, for example when a path_corner is placed in front of a chair where the AI is supposed to sit down, making the AI place half of their back next to the chair.&lt;br /&gt;
&lt;br /&gt;
[Fidcal: I believe the accuracy spawnarg is replaced by the move_to_position_tolerance above. The following likely applies to the new spawnarg anyway.]&lt;br /&gt;
Setting the accuracy spawn arg will change the horizontal size of the bounding box used for checking. If the accuracy is set to negative values (default is -1), the standard bounding box will be used as before.&lt;br /&gt;
&lt;br /&gt;
This spawnarg is available for all entities and can also affect AIs moving towards levers or buttons.&lt;br /&gt;
&lt;br /&gt;
= Kinds of Path Nodes =&lt;br /&gt;
&lt;br /&gt;
== path_corner ==&lt;br /&gt;
Probably the most common path node, this is a &amp;quot;travel node&amp;quot;.  AI will walk from their current position to this node in as straight a line as possible.  This node must be on the ground and in an area AI can reach.  See [[Pathfinding]] for more information on how to help AI go from one node to another.&lt;br /&gt;
&lt;br /&gt;
To make AI patrol an area, each path_corner node can target the next one in sequence.  If AI reach a node that does not target anything, they will stop there and no longer move without player interaction.  It is possible for two path_nodes to target each other, which means the AI will walk from one to the other and back again endlessly.&lt;br /&gt;
&lt;br /&gt;
A single entity (path node or AI) can target more than one path_corner; D3 will randomly choose between the targetted nodes.  Use the following syntax:  &#039;&#039;(actually this syntax needs to be double checked)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 target path_corner_1&lt;br /&gt;
 target2 path_corner_2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(At the moment, targetting more than 2 path_corners from the same entity does not seem to work (possibly a DR bug).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the example below, both A and B are path_corner nodes.  On map start, the AI will walk to A, then turn and walk to B, then stop.&lt;br /&gt;
&lt;br /&gt;
[[image:pathfinding2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Extra note: To make an AI run on patrol add the property/value : &amp;quot;run&amp;quot; &amp;quot;1&amp;quot; to a path_corner on the AI&#039;s patrol and the AI will run to it (then resume walking after it if the next path_corner does not have that property set.) &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note that an AI will return to a path_corner &#039;&#039;(does it choose the nearest or most recent?)&#039;&#039; after a failed search.  If you do not have at least one path_corner, the AI will stop wherever they are when their search is complete.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Also note that if the AI is going to stop at a path_corner--perhaps to wait a spell--the path_corner origin should be kept at least 16 horizontal units away from monsterclip and worldspawn brushes. Otherwise, the stopping animation might not look right.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== path_wait ==&lt;br /&gt;
&lt;br /&gt;
This is a behaviour node. It does not tell an AI to move anywhere.  This node tells an AI to wait in an idle state for a given amount of time.  Once that time is up, the AI will proceed to whatever the next target is (a path_wait with no target is pretty pointless).  &lt;br /&gt;
&lt;br /&gt;
A path_wait node appears as a small orange box.  It has a directional arrow, but that has no affect on which direction the AI faces in the first place. However, you can set the angle key on the path either by rotating the entity or by setting the key directly to make the AI turn and face this direction before starting to wait. &#039;&#039;&#039;Important:&#039;&#039;&#039; If the angle is 0 make sure it is actually on the entity and not just default.&lt;br /&gt;
&lt;br /&gt;
A path_wait node should have a &amp;quot;wait&amp;quot; property, with the number of seconds the AI should wait there before proceeding.  It can also have a &amp;quot;wait_max&amp;quot; property  which will vary the repeat time. So for example...&lt;br /&gt;
&lt;br /&gt;
    * wait 30&lt;br /&gt;
    * wait_max 40 &lt;br /&gt;
&lt;br /&gt;
...will cause the AI to wait between 30 to 40 seconds before proceeding. If wait_max is set to 0, the AI will always wait exactly the time specified in wait before proceeding. If you set wait to 0, the AI will wait between 0 seconds and the time specified in wait_max. Default values are 2 seconds for wait, and 0 seconds for wait_max, so the AI will always wait exactly 2 seconds.&lt;br /&gt;
&lt;br /&gt;
In the following example, A and B are path_corners, and the small orange box is a path_wait entity.  On map start, the AI will walk to A and wait there for the required amount of time, then turn and proceeds to B.&lt;br /&gt;
&lt;br /&gt;
[[image:pathfinding3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Note that it does not matter &#039;&#039;&#039;where&#039;&#039;&#039; the path_wait node is placed.  The AI does not actually follow the orange lines (this is not really intuitive, I know).  The example below would cause the exact same behaviour as the example above--in both cases the AI will walk directly from A to B.&lt;br /&gt;
&lt;br /&gt;
[[image:pathfinding4.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another useful example for path_wait is that of the stationary guard who turns to look in different directions periodically.  This can be schematically represented (arrows indicate target links) as:&lt;br /&gt;
&lt;br /&gt;
AI -&amp;gt; path_corner1 -&amp;gt; path_wait1 -&amp;gt; path_wait2 -&amp;gt; path_corner1&lt;br /&gt;
&lt;br /&gt;
Example properties for the path_wait are:&lt;br /&gt;
 wait: 5  (minimum time to wait on action)&lt;br /&gt;
 wait_max: 10  (maximum time to wait on action)&lt;br /&gt;
 angle: 0  (&#039;&#039;&#039;Important&#039;&#039;&#039;:  this property is essential for proper function even if the angle is 0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The AI walks to or stands at the path_corner.  The next action is to do what is indicated by the first path_wait.  In this example, it tells the AI to face a particular direction for a certain period of time.  This then targets a second path_wait which has the AI face a different direction for a certain period of time.  To complete the cycle, the second path_wait then targets the original path_corner.  The path_corners are necessary because again, the path_wait doesn&#039;t contain pathing or location information.  Without the path_corner, if the AI is caused to wander (e.g. becomes alerted), it might not return to the original standing spot, and instead will do the look angles right where it stands.  The path_corner assures the AI returns to its original position.&lt;br /&gt;
&lt;br /&gt;
== path_turn == &lt;br /&gt;
&lt;br /&gt;
This behaviour node tells an AI to turn in place to face a chosen direction.  It does not make the AI walk anywhere.  This is the one node where the directional arrow does seem to matter--the AI turns to face the same direction as the arrow.  Alternately, you can use  the property &amp;quot;angle&amp;quot; and the values below:&lt;br /&gt;
&lt;br /&gt;
* 0 = East (X)&lt;br /&gt;
* 90 = North (Y)&lt;br /&gt;
* 180 = West (-X)&lt;br /&gt;
* 270 = South (-Y)&lt;br /&gt;
* 360 = East(X)&lt;br /&gt;
&lt;br /&gt;
(Actually, to be more accurate, rotating the entity automatically adds the &amp;quot;angle&amp;quot; property to the entity. If you just leave the arrow facing the way it is when you create the entity, there will be no &amp;quot;angle&amp;quot; property, and therefore the AI will not turn.)&lt;br /&gt;
&lt;br /&gt;
== path_anim ==&lt;br /&gt;
&lt;br /&gt;
This is a behaviour node that makes the AI play an animation, once.  When that animation is done, it proceeds to the next target (if any).  This could be used to make an AI walk over to a bookshelf and play a &#039;reaching out&#039; animation, for example.  Other possibilities include peering through a window, picking a carrot off a table and eating it, or running to a spot and cowering.  &lt;br /&gt;
&lt;br /&gt;
The syntax proper syntax is:&lt;br /&gt;
&lt;br /&gt;
 anim  [animation name]&lt;br /&gt;
&lt;br /&gt;
You can see the list of animations names here: [[Animation List]].  Do not use the name of the actual animation file.  &lt;br /&gt;
&lt;br /&gt;
A path_anim can have only one animation, but it is possible for a single entity to target more than one path_anim.  The AI will pick one of the path_anim nodes at random and play that animation.&lt;br /&gt;
&lt;br /&gt;
When you first create the path_anim entity, the directional arrow is meaningless.  However, if you rotate the entity, the &amp;quot;angle&amp;quot; property is added to the entity and is updated based on which direction the arrow is pointing.  That property indicates the direction the AI will face while playing the animation.  &#039;&#039;&#039;This value appears to be necessary to make the animation work.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tip:  Animation blending doesn&#039;t seem to do very much, so AI often &amp;quot;snap&amp;quot; into position from walking to playing the animation.  For a more natural look, add a path_wait of a few seconds first, so AI transition to their idle pose before playing the animation.&lt;br /&gt;
&lt;br /&gt;
== path_sit ==&lt;br /&gt;
&lt;br /&gt;
This is a behaviour node that makes the AI sit down at its current location.  See [[Sitting Behaviour for AI]] for more information.&lt;br /&gt;
&lt;br /&gt;
== path_waitfortrigger ==&lt;br /&gt;
&lt;br /&gt;
Waits at a given place until triggered, then proceeds to the next target.  This is useful if you want some control over exactly where the AI is when the players first see it.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;path_waitfortrigger&amp;quot; basically operates like a wall, blocking the AI from proceeding until triggered.&lt;br /&gt;
&lt;br /&gt;
Here are the steps for future reference. Let&#039;s say you want an AI to stand somewhere until a player triggers him, then you want him to walk to path_corner 1.&lt;br /&gt;
&lt;br /&gt;
1. Make a &amp;quot;path_waitfortrigger&amp;quot; pathnode, and have it target &amp;quot;path_corner_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. Have the AI target the &amp;quot;path_waitfortrigger&amp;quot; pathnode.&lt;br /&gt;
&lt;br /&gt;
3. Create a trigger_once entity, and target the AI.&lt;br /&gt;
&lt;br /&gt;
The AI will stand where they are at map start and behave as if there are no pathnodes set (ie, he plays idle animations and can be alerted). When the player goes through the trigger, the &amp;quot;path_waitfortrigger&amp;quot; is cleared and the AI will proceed to path_corner_1.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve tried a few different setups and gotten unusual results...more testing needed.&lt;br /&gt;
&lt;br /&gt;
== path_interact ==&lt;br /&gt;
&lt;br /&gt;
This lets the AI interact with an entity (for example a button) in a similar way to frobbing. This will only work for buttons etc, not for inventory items and moveables. The AI will stop and look at the entiy while interacting, but not walk to it, so a path_corner next to the entity is required.  AI will use normal doors and elevators without needing a path_interact (confirmation needed).  However, this could be used to make AI turn on lightswitches, open mechanical doors, etc.&lt;br /&gt;
&lt;br /&gt;
You need to add these spawnargs to the path_interact entity:&lt;br /&gt;
&lt;br /&gt;
ent &amp;lt;name of entity to be frobbed by AI&amp;gt;&lt;br /&gt;
&lt;br /&gt;
target &amp;lt;next path entity (if any)&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= How to Make AI do Random Interesting Things (RIT) =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;by Sotha&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can use the above to make individual AI seem to do Random Interesting Things (RIT) when entering a room. Note that it will work with basic dendritic AI, so you could have multiple AI&#039;s running in several rooms doing things.&lt;br /&gt;
&lt;br /&gt;
1) Build a room with RITs. A statue. A few chairs. Maybe a lit fireplace.&lt;br /&gt;
&lt;br /&gt;
2) On each RIT place the necessary interaction path_nodes to make an AI interact with them:  path_corner to walk over to them; path_sit on each of the chairs, path_anims for warming hands at the fireplace and standing in front of the statue and pondering, etc (A, B &amp;amp; C in image).&lt;br /&gt;
&lt;br /&gt;
3) Place two path_waits (1 &amp;amp; 2 in image) on the ceiling of the room. (They could be anywhere in the room, but it is easiest to manage if they are in the ceiling.)&lt;br /&gt;
&lt;br /&gt;
4) Name one of the path_waits &amp;quot;enter_room_decide_what_to_do.&amp;quot; (1) From that path_wait target each of the RIT path_corners. Set the path_wait &amp;quot;wait 0&amp;quot;. so AI won&#039;t stop there. The idea is to use the path_wait as a simple decision making node. Be sure that the path_wait has no angle-spawnarg. If it does, the AI will turn towards the angle each time he targets the node.&lt;br /&gt;
&lt;br /&gt;
5) Name the other path_wait &amp;quot;exit_room_decide_what_to_do.&amp;quot; (2) Make each RIT final path_node  target this path_wait. Make the path_wait target other rooms with similar decision making path_waits.&lt;br /&gt;
&lt;br /&gt;
6) Done.&lt;br /&gt;
&lt;br /&gt;
[[Image:Rits.jpg]] &lt;br /&gt;
&lt;br /&gt;
AI will come into the room, select A, B or C at random, and then leave.  Next time they enter, they&#039;ll again pick at random.&lt;br /&gt;
&lt;br /&gt;
This could be used to make servants to run around a mansion, cleaning, making food, taking sitting breaks, visit the toilet, etc. You could build room decision making network separately for different AI. Servants clean, cook and take breaks. Guards patrol, make random deviations once in a while, and of course take breaks. Controlling the RIT path_corner chance-spawnarg gives you control what RITs the AI do more likely.&lt;br /&gt;
&lt;br /&gt;
= Flee Points =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do NOT target the AI to a flee point; AI will automatically go to a flee point if in danger. Just make available path_flee_point entities at suitable places where you would like your AI to flee to.&lt;br /&gt;
&lt;br /&gt;
On the path_flee_point entity:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;is_guarded&amp;quot; A fleeing AI, eg, a civilian, would give this preference (but it is up to the mapper to actually provide a guard there.)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;team&amp;quot; Only AI on this team would use this flee point.&lt;br /&gt;
&lt;br /&gt;
* This is how the code works:&lt;br /&gt;
* The AI tries to determine the nearest friendly guarded flee point and flee to it.&lt;br /&gt;
* If there is no friendly guarded flee point, the AI tries to find the nearest friendly flee point (on friendly team) and run to it.&lt;br /&gt;
* If this also fails, the AI tries to find an AAS area far from the enemy and run there.&lt;br /&gt;
* If the enemy is still visible when the AI reaches his destination, he chooses the farthest friendly guarded flee point to run to, &lt;br /&gt;
* if this fails, the farthest friendly flee point, &lt;br /&gt;
* and if this also fails falls back to choosing an AAS area far from the enemy to run to.&lt;br /&gt;
* So neither the priority nor the target spawn arg have any function here, it is not possible to weight the flee points. The AI will choose one automatically.&lt;br /&gt;
&lt;br /&gt;
A problem occurs when the AI doesn&#039;t find any appropriate flee points but also no AAS area that is far away enough from the enemy. In this case, he will just stand there. Maybe he should either cower and be afraid in this case or just run around like a mad chicken?&lt;br /&gt;
&lt;br /&gt;
Whether a fleeing AI passes on info to other AI as to the source of their alert (ie so armed guard would go to investigate to the right place whereas another civilan might also flee to the farthest point.)&lt;br /&gt;
Yes, they do. The cry for help bark is propagated to other AI and carries information about the last alert position.&lt;br /&gt;
&lt;br /&gt;
Armed AI will also flee if their health points drop to a certain level? Where is that determined?&lt;br /&gt;
This is determined by the health_critical spawn arg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Untested Nodes =&lt;br /&gt;
&lt;br /&gt;
I have not personally tested the following, so I&#039;m just going by their editor descriptions.  They may or may not work as described.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== path_cycleanim ==&lt;br /&gt;
&lt;br /&gt;
The AI stays in place and loops the selected animation, either for a specified amount of time (using the &#039;wait&#039; property) or until triggered.  Syntax needed.&lt;br /&gt;
&lt;br /&gt;
== path_lookat ==&lt;br /&gt;
&lt;br /&gt;
This does not stop the AI, but they will turn their head and look somewhere specific as they walk to their next target.  For the next &#039;&#039;wait&#039;&#039; seconds, turn head to look at the entity given by the &#039;&#039;focus&#039;&#039; spawnarg (defaults to looking at the path_lookat entity itself). This is useful if you want to make sure an AI is looking at a specific spot (or away from a certain spot) during their patrol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== path_hide ==&lt;br /&gt;
&lt;br /&gt;
Supposedly deactivates and stops rendering the AI.  &lt;br /&gt;
&lt;br /&gt;
Turns out this doesn&#039;t work well with TDM...makes AI invisible but they still talk and occupy space.  To remove an AI from the map, try grayman&#039;s approach:&lt;br /&gt;
&lt;br /&gt;
 Create a [b]func_remove[/b] with this spawnarg:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;target&amp;quot; &amp;quot;&amp;lt;AI&#039;s name&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 At the point in his path where you want him to disappear, place a [b]trigger_once_entityname[/b] with these spawnargs:&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;entityname&amp;quot; &amp;quot;&amp;lt;AI&#039;s name&amp;gt;&amp;quot;&lt;br /&gt;
 &amp;quot;target&amp;quot; &amp;quot;&amp;lt;func_remove&#039;s name&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
When the AI walks through the [b]trigger_once_entityname[/b], it recognizes him, triggers the [b]func_remove[/b], and that takes the AI out of the game.&lt;br /&gt;
&lt;br /&gt;
I wrapped the AI&#039;s final path corner in a trigger_once_entityname and gave the trigger the keyword pair &amp;quot;entityname &amp;lt;AI_name&amp;gt;&amp;quot;. (The docs don&#039;t tell you about this key, but the game will error out if it&#039;s not there, and tell you it&#039;s missing. A classic &amp;quot;trial by error&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
== path_show ==&lt;br /&gt;
&lt;br /&gt;
Starts rendering the AI.  I would assume this one would be linked to a path_waitfortrigger, to create AI that spawn when triggered.  This could be used to create the effect that an AI just came through a doorway or around a corner.&lt;br /&gt;
&lt;br /&gt;
== path_attack ==&lt;br /&gt;
&lt;br /&gt;
Used to script AI attacking a particular enemy, for scripted sequences I guess. AI will continue on to the next path entity if it kills the enemy.&lt;br /&gt;
&lt;br /&gt;
Questions:  How do you define who the AI attacks?&lt;br /&gt;
&lt;br /&gt;
[Fidcal]: Just found this - &amp;quot;Character will attack the character specified by &#039;enemy&#039; key. Character will go to next path when enemy dies or when activated.&amp;quot; Not tested.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tutorial-editing}}&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Fan_Missions_for_The_Dark_Mod&amp;diff=13699</id>
		<title>Fan Missions for The Dark Mod</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Fan_Missions_for_The_Dark_Mod&amp;diff=13699"/>
		<updated>2012-01-03T20:46:59Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{infobox|&amp;lt;center&amp;gt;&#039;&#039;&#039;Big Ugly Disclaimer:&#039;&#039;&#039;&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt; &#039;&#039;&#039;The Dark Mod&#039;&#039;&#039; team does not necessarily support or endorse content listed here, and only hosts missions listed on the [http://www.thedarkmod.com/ official TDM website]. This is a community maintained list, and an ongoing work in progress.  Mission entries which are suspected to violate copyright must be text-only, and cannot contain links.  Report and/or remove links found in violation of this rule.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* For details about editing this table, see [http://modetwo.net/darkmod/wiki/index.php?title=Fan_Missions_for_The_Dark_Mod#Editing_This_Table below].&lt;br /&gt;
* For details about how to install Fan Missions please visit: [[Installing and Running Fan Missions]]&lt;br /&gt;
* To sort by a different criterion, click the [[Image:Sort none.gif]] icon in the relevant column header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; border=1 style=&amp;quot;border-collapse: collapse;&amp;quot; cellspacing=0 cellpadding=2 width=100%&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;30%&amp;quot;|Fan Mission Title&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;23%&amp;quot;|Author(s)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;10%&amp;quot; class=&amp;quot;unsortable&amp;quot;|Links&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;10%&amp;quot;|First Release&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;7%&amp;quot;|Size (MB)&lt;br /&gt;
!bgcolor=#d0d0e0 width=&amp;quot;20%&amp;quot;|Series&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--INSERT NEW MISSIONS BELOW THIS LINE--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|56|House of Theo}}&lt;br /&gt;
|Theothesnopp&lt;br /&gt;
|{{Bloodgate|houseoftheo.pk4}} {{Mirrorlink|http://www.gamefront.com/files/21053391/houseoftheo__2__2.pk4}} {{Forumlink|http://forums.thedarkmod.com/topic/13242-fan-mission-house-of-theo/}}&lt;br /&gt;
|2011-12-04&lt;br /&gt;
|6.2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|[http://darkfate.org/view/details/files/projects/darkmod/fm/krysztalowy_grob/KrysztGrob1.zip Krysztalowy Grob (Crystal Grave)]&lt;br /&gt;
|ERH+&lt;br /&gt;
|{{Mirrorlink|http://darkfate.org/view/details/files/projects/darkmod/fm/krysztalowy_grob/KrysztGrob1.zip}} {{Forumlink|http://forums.thedarkmod.com/topic/13208-fm-crystal-grave-krysztaowy-grob/}} [http://darkfate.org/view/details/files/projects/darkmod/fm/krysztalowy_grob/screenshots Images]&lt;br /&gt;
|2011-11-12&lt;br /&gt;
|6&lt;br /&gt;
|Unknown (Polish language)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|53|Dragon&#039;s Claw}}&lt;br /&gt;
|Bikerdude, Flanders (map assets)&lt;br /&gt;
|{{Bloodgate|claw.pk4}}{{Mirrorlink|http://www.gamefront.com/files/20948800/claw.pk4}} {{Taffers Paradise|claw.pk4}} {{Forumlink|http://forums.thedarkmod.com/topic/13181-fan-missiondragons-claw-by-b1k3rdude-31102011/}}&lt;br /&gt;
|2011-10-31&lt;br /&gt;
|98&lt;br /&gt;
|HSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|52|A Night to Remember}}&lt;br /&gt;
|Fieldmedic&lt;br /&gt;
|{{Bloodgate|antr.pk4}}{{Mirrorlink|http://www.mediafire.com/?d4hch59m4nef3dc}} {{Taffers Paradise|antr.pk4}} {{Forumlink|http://forums.thedarkmod.com/topic/13177-fan-mission-a-night-to-remember-by-fieldmedic-20111030/}}&lt;br /&gt;
|2011-10-31&lt;br /&gt;
|32&lt;br /&gt;
|HSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|51|The Creeps}}&lt;br /&gt;
|Mortem Desino&lt;br /&gt;
|{{Bloodgate|thecreeps.pk4}}{{Mirrorlink|http://www.gamefront.com/files/20939925/thecreeps.pk4}} {{Taffers Paradise|thecreeps.pk4}} {{Forumlink|http://forums.thedarkmod.com/topic/13176-fan-mission-creeps-the-20111030-by-mortem-desino/}}&lt;br /&gt;
|2011-10-30&lt;br /&gt;
|61&lt;br /&gt;
|HSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|50|House in Blackbog Hollow}}&lt;br /&gt;
|Stumpy&lt;br /&gt;
|{{Bloodgate|blackbog.pk4}}{{Mirrorlink|http://www.bookofages.co.uk/doom3/mods/blackbog.html}} {{Taffers Paradise|blackbog.pk4}} {{Forumlink|http://forums.thedarkmod.com/topic/13172-fan-mission-house-in-blackbog-hollow-by-stumpy-20111028/}}&lt;br /&gt;
|2011-10-28&lt;br /&gt;
|12&lt;br /&gt;
|HSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|49|Let Sleeping Thieves Lie}}&lt;br /&gt;
|Sir Taffsalot, Bikerdude&lt;br /&gt;
|{{Bloodgate|lstl.pk4}}{{Mirrorlink|http://www.mediafire.com/?zkd1jn4lpwgioh9}} {{Taffers Paradise|lstl.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/13153-let-sleeping-thieves-lie-by-sir-taffsalot-bikerdude-20102011/}}&lt;br /&gt;
|2011-10-20&lt;br /&gt;
|13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|48|Samhain Night on Bone Hill}}&lt;br /&gt;
|PranQster&lt;br /&gt;
|{{Bloodgate|samhain.pk4}}{{Mirrorlink|http://jdchoate.mcn.org/games/darkmod/samhain.zip}} {{Taffers Paradise|samhain.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/13127-fan-mission-samhain-night-on-bone-hill-by-pranqster-20111009/}}&lt;br /&gt;
|2011-10-09&lt;br /&gt;
|10&lt;br /&gt;
|HSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|47|A Score to Settle}}&lt;br /&gt;
|Springheel&lt;br /&gt;
|{{Bloodgate|score_to_settle.pk4}}{{Mirrorlink|http://www.mediafire.com/?f3o7hm4h4ew7o3l}} {{Taffers Paradise|score_to_settle.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12894-fan-mission-%2348-a-score-to-settle-by-springheel-20110701/}}&lt;br /&gt;
|2011-07-01&lt;br /&gt;
|135&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|46|Siege Shop}}&amp;lt;br&amp;gt;(v1.2 2011/09/21)&lt;br /&gt;
|PranQster&lt;br /&gt;
|{{Bloodgate|siegeshop.pk4}}{{Mirrorlink|http://jdchoate.mcn.org/games/darkmod/siegeshop.pk4}} {{Taffers Paradise|siegeshop.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12874-fan-mission-the-siege-shop-by-pranqster-20110626/}}&lt;br /&gt;
|2011-06-26&lt;br /&gt;
|13&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|44|Alberic&#039;s Curse}}&lt;br /&gt;
|Bikerdude&lt;br /&gt;
|{{Bloodgate|alberic.pk4}} {{Mirrorlink|http://www.gamefront.com/files/20459738/alberic.pk4}} {{Taffers Paradise|alberic.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12850-fan-mission-alberics-curse-by-b1k3rdude-20062011/}}&lt;br /&gt;
|2011-06-20&lt;br /&gt;
|29&lt;br /&gt;
|CSC 11 (Winner), T2 FM homage&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|45|Reap as you sow}}&lt;br /&gt;
|Fieldmedic&lt;br /&gt;
|{{Bloodgate|reap.pk4}} {{Taffers Paradise|reap.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12849-fan-mission-reap-as-you-sow-by-fieldmedic-20110619/}}&lt;br /&gt;
|2011-06-19&lt;br /&gt;
|52&lt;br /&gt;
|CSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|43|Rake Off}}&lt;br /&gt;
|Jesps&lt;br /&gt;
|{{Bloodgate|rake_off.pk4}} {{Taffers Paradise|rake_off.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12846-fm-rake-off-19-06-2011/}}&lt;br /&gt;
|2011-06-19&lt;br /&gt;
|8&lt;br /&gt;
|CSC 11, Selis Woderose 2&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|42|Winter Harvest}}&amp;lt;br&amp;gt;(v2.0 2011/07/24 with Bikerdude)&lt;br /&gt;
|ShadowHide&lt;br /&gt;
|{{Bloodgate|winterharvest.pk4}} {{Taffers Paradise|winterharvest.pk4}} {{Forumlink|http://modetwo.net/darkmod/index.php?/topic/12690-seasons-contest-entry-winter-harvest-by-shadowhide/}}&lt;br /&gt;
|2011-05-08&lt;br /&gt;
|10&lt;br /&gt;
|CSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|41|Fiasco at Fauchard Street}}&lt;br /&gt;
|Melan&lt;br /&gt;
|{{Bloodgate|fauchard.pk4}} {{Taffers Paradise|fauchard.pk4}} {{Mirrorlink|https://rapidshare.com/files/460141132/fauchard.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/12655-fan-mission-fiasco-at-fauchard-street-by-melan-20110501//}}&lt;br /&gt;
|2011-05-01&lt;br /&gt;
|62&lt;br /&gt;
|Talbot 3&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|40|Mandrasola}}&lt;br /&gt;
|Sotha&lt;br /&gt;
|{{Bloodgate|mandrasola.pk4}} {{Taffers Paradise|mandrasola.pk4}} {{Mirrorlink|http://www.mediafire.com/?2ox2nbhh796ne71}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/12575-fan-mission-mandrasola-by-sotha-20110410/}}&lt;br /&gt;
|2011-04-10&lt;br /&gt;
|10&lt;br /&gt;
|Thomas Porter 0, CSC 11&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|[http://www.gamefront.com/files/20167184/yantdm1.1.pk4 Q4 Conversion: Yan&#039;s Test]&lt;br /&gt;
|Bikerdude&lt;br /&gt;
|{{Mirrorlink|http://www.mediafire.com/?2nona089nzi00sv}} {{Mirrorlink|http://www.gamefront.com/files/20167184/yantdm1.1.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/12506-fan-mission-q4-map-conversion-yantdm1-280311/}}&lt;br /&gt;
|2011-03-28&lt;br /&gt;
|28&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|38|The Transaction}}&lt;br /&gt;
|Sotha&lt;br /&gt;
|{{Bloodgate|transaction.pk4}} {{Taffers Paradise|transaction.pk4}} {{Mirrorlink|http://www.mediafire.com/?ux7mx79wumnvcb6}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/12408-fan-mission-the-transaction-by-sotha-20110304/}}&lt;br /&gt;
|2011-03-04&lt;br /&gt;
|10&lt;br /&gt;
|Thomas Porter 4&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|13|Return to the City}}&amp;lt;br&amp;gt;(v2.0 2011/03/01)&lt;br /&gt;
|Melan, Bikerdude&lt;br /&gt;
|{{Bloodgate|ReturnToTheCityV2.pk4}}{{Mirrorlink|1=http://www.southquarter.com/downloads/2011/ReturnToTheCityV2.pk4}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10509-fan-mission-return-to-the-city-by-melan-20100110/}} {{Forumlink|1=http://www.ttlg.com/forums/showthread.php?t=130519/}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/12390-fan-mission-return-to-the-city-v2-01032011/}}&lt;br /&gt;
|2010-01-10&lt;br /&gt;
|26&lt;br /&gt;
|Version 1.0, GCC 09 (Winner); Talbot 2&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|39|Lockdown}}&lt;br /&gt;
|GameDevGoro Bikerdude Fidcal&lt;br /&gt;
|{{Bloodgate|lockdown1_2_1.pk4}} {{Taffers Paradise|lockdown1_2_1.pk4}} {{Mirrorlink|http://www.fidcal.com/darkuser/missions/lockdown1_2_1.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/12064-fm-lockdown-part-1-by-gamedevgoro-and-bikerdude-20101224/}}&lt;br /&gt;
|2010-12-25&lt;br /&gt;
|3&lt;br /&gt;
|Lockdown 1&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|37|Flakebridge Monastery}}&lt;br /&gt;
|Jesps&lt;br /&gt;
|{{Bloodgate|flakebridge.pk4}} {{Taffers Paradise|flakebridge.pk4}} {{Mirrorlink|http://www.file-upload.net/download-3024426/flakebridge.pk4.html}} {{Mirrorlink|http://rapidshare.com/files/434997519/flakebridge.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11991-fm-flakebridge-monastery-by-jesps/}}&lt;br /&gt;
|2010-12-05&lt;br /&gt;
|16&lt;br /&gt;
|Selis Woderose 1&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|36|Knighton Manor, The}}&lt;br /&gt;
|Sotha&lt;br /&gt;
|{{Bloodgate|knighton_manor.pk4}} {{Taffers Paradise|knighton_manor.pk4}} {{Mirrorlink|http://www.mediafire.com/?xrdts3j4t2qxre2}}  {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11898-fan-mission-the-knighton-manor-by-sotha-20101109/page__view__getnewpost}}&lt;br /&gt;
|2010-11-09&lt;br /&gt;
|21&lt;br /&gt;
|Thomas Porter 1&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|35|St Albans Cathedral}}&amp;lt;br&amp;gt;(v1.6 2011/03/13)&lt;br /&gt;
|Bikerdude&lt;br /&gt;
|{{Bloodgate|stac160.pk4}} {{Taffers Paradise|stac160.pk4}} [[http://www.bloodgate.com/fms/stac142.pk4 Classic]] {{Mirrorlink|http://www.filefront.com/17464439/stac141.pk4}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11872-fan-mission-st-albans-cathedral-01112010/}} {{Loot|FM:TDM_St_Alban&#039;s_Cathedral_-_Bikerdude}}&lt;br /&gt;
|2010-11-01&lt;br /&gt;
|67&lt;br /&gt;
|St Alban&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|33|Swing}}&lt;br /&gt;
|Komag&lt;br /&gt;
|{{Bloodgate|swing_v1.2.pk4}} {{Taffers Paradise|swing_v1.2.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11660-vertigo-contest-entry-swing-by-komag-20100825/}} {{Loot|FM:TDM_Swing_-_Komag}}&lt;br /&gt;
|2010-08-25&lt;br /&gt;
|3&lt;br /&gt;
|SVC 10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|32|The Caduceus of St. Alban}}&amp;lt;br&amp;gt;(v.1.5.5 2010/08/26)&lt;br /&gt;
|Bikerdude&lt;br /&gt;
|{{bloodgate|stalban.pk4}} {{Taffers Paradise|stalban.pk4}} {{Mirrorlink|http://www.filefront.com/17237609/stalban.pk4/}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11644-the-caduceus-of-st-alban-vertical-fm-contest-entry-aug-8th-2010/}}&lt;br /&gt;
|2010-08-23&lt;br /&gt;
|11.3&lt;br /&gt;
|SVC 10/St Alban&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|30|Somewhere Above the City}}&amp;lt;br&amp;gt;(v1.1 2010/08/27)&lt;br /&gt;
|Grayman&lt;br /&gt;
|{{Bloodgate|somewhere1.1.pk4}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11619-vertical-contest-mission-somewhere-above-the-city-by-grayman-aug-20-2010/}} {{Loot|FM:TDM_Somewhere_Above_the_City_-_grayman}}&lt;br /&gt;
|2010-08-20&lt;br /&gt;
|11&lt;br /&gt;
|SVC 10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|29|Betrayal}}&amp;lt;br&amp;gt;(v.1.1, 2010/09/01)&lt;br /&gt;
|Fieldmedic&lt;br /&gt;
|{{Bloodgate|betrayal.pk4}} {{Taffers Paradise|betrayal.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11605-betrayal-by-fieldmedic-20100817-summer-fm-vertical-contest-entry/}} {{Loot|FM:TDM_Awaiting_the_Storm_-_HappyCheeze}}&lt;br /&gt;
|2010-08-17&lt;br /&gt;
|12&lt;br /&gt;
|SVC 10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|31|Rift, The}}&lt;br /&gt;
|Baddcog&lt;br /&gt;
|{{Bloodgate|rift.pk4}} {{Taffers Paradise|rift.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11599-vert-contest-mission-the-rift-by-baddcog-aug-15-2010/}}&lt;br /&gt;
|2010-08-15&lt;br /&gt;
|10&lt;br /&gt;
|SVC 10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|34|Illusionist&#039;s Tower}}&lt;br /&gt;
|stumpy&lt;br /&gt;
|{{Bloodgate|holetower.pk4}} {{Taffers Paradise|holetower.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11541-illusionists-tower-by-stumpy-201085-summer-fm-vertical-contest-entry}} {{Forumlink|1=http://www.bookofages.co.uk/doom3/mods/holetower.html}} {{Loot|FM:TDM_Illusionist%27s_Tower_-_stumpy}}&lt;br /&gt;
|2010-08-05&lt;br /&gt;
|9&lt;br /&gt;
|SVC 10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|28|Mad&#039;s Mountain}}&lt;br /&gt;
|Jesps&lt;br /&gt;
|{{Bloodgate|madmountain.pk4}} {{Taffers Paradise|madmountain.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11510-fan-mission-mads-mountain-by-jesps-20100731}} {{Loot|FM:TDM_Lord_Dufford%27s_-_stumpy}}&lt;br /&gt;
|2010-07-31&lt;br /&gt;
|2&lt;br /&gt;
|SVC 10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|27|Glenham Tower, The}}&lt;br /&gt;
|Sotha&lt;br /&gt;
|{{Bloodgate|glenham_tower.pk4}} {{Taffers Paradise|glenham_tower.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11423-fan-mission-the-glenham-tower-by-sotha-20100717}}&lt;br /&gt;
|2010-07-17&lt;br /&gt;
|5&lt;br /&gt;
|Thomas Porter 3, SVC 10 (Winner)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|25|Pandora&#039;s Box}}&lt;br /&gt;
|Jesps, Fidcal&lt;br /&gt;
|{{Bloodgate|pandoras_box.pk4}} {{Taffers Paradise|pandoras_box.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11381-fan-mission-pandoras-box-by-jesps20100711}} {{Loot|FM:TDM_Pandora%27s_Box_-_Jesps}}&lt;br /&gt;
|2010-07-11&lt;br /&gt;
|7&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|23|Beleaguered Fence, The}}&lt;br /&gt;
|Sotha&lt;br /&gt;
|{{Bloodgate|beleaguered_fence.pk4}} {{Taffers Paradise|beleaguered_fence.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11298-fan-mission-the-beleaguered-fence-by-sotha-20100623}} {{Loot|FM:TDM_The_Beleaguered_Fence_-_Sotha}}&lt;br /&gt;
|2010-06-23&lt;br /&gt;
|11&lt;br /&gt;
|Thomas Porter 2&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|22|Special Delivery, A}}&lt;br /&gt;
|Silencium18&lt;br /&gt;
|{{Bloodgate|delivery.pk4}} {{Taffers Paradise|delivery.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11247-fan-mission-a-special-delivery-by-silencium1820100612}} {{Loot|FM:TDM_A_Special_Delivery_-_Silencium18}}&lt;br /&gt;
|2010-06-12&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|21|Alchemist, The}}&amp;lt;br&amp;gt;(2010/06/04)&lt;br /&gt;
|Sotha, Fidcal&lt;br /&gt;
|{{Bloodgate|alchemist.pk4}} {{Taffers Paradise|alchemist.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11170-fan-mission-the-alchemist-by-sotha-fidcal20100601}} {{Loot|FM:TDM_The_Alchemist_-_Sotha_%26_Fidcal}}&lt;br /&gt;
|2010-06-01&lt;br /&gt;
|27&lt;br /&gt;
|Thief&#039;s Den 4&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|20|Awaiting The Storm}}&lt;br /&gt;
|HappyCheeze&lt;br /&gt;
|{{Bloodgate|storm.pk4}} {{Taffers Paradise|storm.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11095-fm-awaiting-the-storm-by-happycheeze-20200522}} {{Loot|FM:TDM_Awaiting_the_Storm_-_HappyCheeze}}&lt;br /&gt;
|2010-05-22&lt;br /&gt;
|4&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|18|No Honor Among Thieves}}&lt;br /&gt;
|Goldchocobo, RailGun, Mortem Desino&lt;br /&gt;
|{{Taffers Paradise|NHAT.zip}} {{Mirrorlink|http://tinyurl.com/2a9mdcs}}{{Mirrorlink|http://www.southquarter.com/downloads/NHAT.zip}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10993-fan-mission-no-honor-among-thieves-20100429}} {{Loot|FM:TDM_No_Honor_Among_Thieves_-_Goldchocobo}}&lt;br /&gt;
|2010-04-29&lt;br /&gt;
|144&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|17|Heart of Lone Salvation, The}}&amp;lt;br&amp;gt;(v.2.0, 2010/04/12)&lt;br /&gt;
|Fidcal, Baddcog&lt;br /&gt;
|{{Bloodgate|heart.pk4}} {{Taffers Paradise|heart.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10878-fan-mission-the-heart-of-lone-salvation-by-fidcal-baddcog-20100402/}} {{Walkthrough|FM:TDM_The_Heart_of_Lone_Salvation_-_Fidcal_%26_Baddcog}} {{loot|FM:TDM_The_Heart_of_Lone_Salvation_-_Fidcal_%26_Baddcog}}&lt;br /&gt;
|2010-04-02&lt;br /&gt;
|41&lt;br /&gt;
|Thief&#039;s Den 3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|[http://www.bookofages.co.uk/doom3/mods/dufford.pk4 Lord Dufford&#039;s]&lt;br /&gt;
|stumpy&lt;br /&gt;
|{{Taffers Paradise|dufford.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10868-fan-mission-lord-duffords-20100331}} {{Loot|FM:TDM_Lord_Dufford%27s_-_stumpy}}&lt;br /&gt;
|2010-03-31&lt;br /&gt;
|22&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|16|Builder&#039;s Influence, The}}&amp;lt;br&amp;gt;(2010/03/23)&lt;br /&gt;
|Railgun, Springheel&lt;br /&gt;
|{{Bloodgate|builders_influence.pk4}} {{Taffers Paradise|builders_influence.pk4}} {{Mirrorlink|http://www.fidcal.com/darkuser/missions/builders_influence.pk4}}{{Forumlink|http://modetwo.net/darkmod/index.php?/topic/10811-fan-mission-the-builders-influence-20100320/}} {{Loot|FM:TDM_The_Builders_Influence_-_Railgun%26Springheel}}&lt;br /&gt;
|2010-03-20&lt;br /&gt;
|15&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|14|Business as Usual}}&amp;lt;br&amp;gt;(v2.0 2011/09/24)&lt;br /&gt;
|Bikerdude&lt;br /&gt;
|{{Bloodgate|business.pk4}}{{Mirrorlink|1=http://rapidshare.com/files/335299431/business.pk4.html}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10533-fan-mission-business-as-usual-by-b1k3rdude-14012010-christmas-fm-contest-entry/page__view__findpost__p__207055}}&lt;br /&gt;
|2010-01-14&lt;br /&gt;
|4&lt;br /&gt;
|GCC 09&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|12|Sons of Baltona 1, The}}&lt;br /&gt;
|Carnage&lt;br /&gt;
|{{Bloodgate|sons_of_baltona_1.pk4}} {{Taffers Paradise|sons_of_baltona_1.pk4}} {{Mirrorlink|1=http://www.mediafire.com/?m4ywobjodm0}}{{Mirrorlink|1=http://www.southquarter.com/downloads/sons_of_baltona_1.pk4}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10498-fan-mission-the-sons-of-baltona-1-by-carnage-20100109}}&lt;br /&gt;
|2010-01-09&lt;br /&gt;
|3&lt;br /&gt;
|GCC 09 / Baltona 1&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|11|Living Expenses}}&lt;br /&gt;
|Sonosuke&lt;br /&gt;
|{{Bloodgate|living_expenses.pk4}} {{Taffers Paradise|living_expenses.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10451-fm-living-expenses-by-sonosuke-2-jan-10/page__view__findpost__p__205386}}&lt;br /&gt;
|2010-01-02&lt;br /&gt;
|6&lt;br /&gt;
|GCC 09&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|10|Trapped!}}&lt;br /&gt;
|RailGun&lt;br /&gt;
|{{Bloodgate|trapped.pk4}} {{Taffers Paradise|trapped.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10442-fm-trapped-by-railgun-dec-30/page__view__findpost__p__205092}}&lt;br /&gt;
|2009-12-30&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|8|Parcel, The}}&lt;br /&gt;
|Xonze&lt;br /&gt;
|{{Bloodgate|parcel.pk4}} {{Taffers Paradise|parcel.pk4}} {{Mirrorlink|1=http://www.southquarter.com/downloads/parcel.pk4}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10404-fm-the-parcel-by-xonze-dec-24/page__view__findpost__p__204459}}&lt;br /&gt;
|2009-12-24&lt;br /&gt;
|7&lt;br /&gt;
|GCC 09&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|9|Too Late}}&lt;br /&gt;
|Nielsen74&lt;br /&gt;
|{{Bloodgate|too_late.pk4}} {{Taffers Paradise|too_late.pk4}} {{Mirrorlink|1=http://www.southquarter.com/downloads/too_late.pk4}}{{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10400-fm-too-late-by-nielsen74-24-dec-09/page__view__findpost__p__204396}}&lt;br /&gt;
|2009-12-24&lt;br /&gt;
|4&lt;br /&gt;
|GCC 09&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|7|Thieves}}&lt;br /&gt;
|Silencium, RailGun, Fidcal&lt;br /&gt;
|{{Bloodgate|thieves.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10286-fm-the-thieves-nov-2509/}}&lt;br /&gt;
|2009-11-26&lt;br /&gt;
|9&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|6|Patently Dangerous}}&lt;br /&gt;
|demagogue&lt;br /&gt;
|{{Bloodgate|patently_dangerous.pk4}} {{Taffers Paradise|patently_dangerous.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10125-fm-patently-dangerous-oct3109/page__view__findpost__p__199324/}}&lt;br /&gt;
|2009-10-31&lt;br /&gt;
|24&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|5|Dark Mod Training Mission, The}}&lt;br /&gt;
|TDM Team&lt;br /&gt;
|{{Bloodgate|training_mission.pk4}} {{Taffers Paradise|training_mission.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/9932-fm-training-mission-17-oct-09/}}&lt;br /&gt;
|2009-10-17&lt;br /&gt;
|6&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|2|Crown of Penitence, The}}&lt;br /&gt;
|Jesps&lt;br /&gt;
|{{Bloodgate|crow_of_penitence.pk4}} {{Taffers Paradise|crow_of_penitence.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/9934-fm-crown-of-penitence-by-jesps-17-oct-09/}}&lt;br /&gt;
|2009-10-16&lt;br /&gt;
|12&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|3|Chalice of Kings, The}}&lt;br /&gt;
|Fidcal&lt;br /&gt;
|{{Bloodgate|chalice.pk4}} {{Taffers Paradise|chalice.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/9935-fm-chalice-of-kings-by-fidcal-17-oct-09/}} {{Loot|FM:TDM_Chalice_of_Kings_-_Fidcal}}&lt;br /&gt;
|2009-10-15&lt;br /&gt;
|3&lt;br /&gt;
|Thief&#039;s Den 2&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|1|Outpost, The}}&lt;br /&gt;
|angua, greebo&lt;br /&gt;
|{{Bloodgate|outpost.pk4}} {{Taffers Paradise|outpost.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/9937-fm-the-outpost-by-angua-greebo-17-oct-09/}}&lt;br /&gt;
|2008-12-23&lt;br /&gt;
|2&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|15|Tears of Saint Lucia, The}}&amp;lt;br&amp;gt;(v.1.01, 2010/04/29)&lt;br /&gt;
|TDM Team&lt;br /&gt;
|{{Bloodgate|saintlucia.pk4}} {{Taffers Paradise|saintlucia.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/10579-fan-mission-the-tears-of-st-lucia-20081021/page__view__findpost__p__207972}} {{Loot|FM:TDM_The_Tears_of_Saint_Lucia_-_jdude}}&lt;br /&gt;
|2008-10-21&lt;br /&gt;
|18&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
!align=left|{{TDM-FM|24|Thief&#039;s Den}}&amp;lt;br&amp;gt;(v.2.0, 2010/07/04)&lt;br /&gt;
|Fidcal, greebo&lt;br /&gt;
|{{Bloodgate|thiefs_den.pk4}} {{Taffers Paradise|thiefs_den.pk4}} {{Forumlink|1=http://modetwo.net/darkmod/index.php?/topic/11347-fan-mission-thiefs-den-re-release-by-fidcal20100704}} {{Walkthrough|FM:TDM_Thief&#039;s_Den_-_Fidcal}} {{Loot|FM:TDM_Thief%27s_Den_-_Fidcal}}&lt;br /&gt;
|2008-01-18&lt;br /&gt;
|3&lt;br /&gt;
|Thief&#039;s Den 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To see a speculative list of Upcoming Fan Missions please visit: [[Upcoming Fan Missions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Series Key&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
GCC 09:  Grand Christmas Contest 2009&lt;br /&gt;
&lt;br /&gt;
SVC 10:  Summer Vertical Contest 2010&lt;br /&gt;
&lt;br /&gt;
CSC 11:  Community Seasons Contest 2011&lt;br /&gt;
&lt;br /&gt;
HSC 11:  Halloween Speed-Build Contest 2011&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Links Key&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{Forumlink|}} : Link to discussion in Forums&lt;br /&gt;
&lt;br /&gt;
{{Mirrorlink|}} : Misc. dowload mirror&lt;br /&gt;
&lt;br /&gt;
{{Bloodgate|}} : Bloodgate download mirror&lt;br /&gt;
&lt;br /&gt;
{{Taffers Paradise|}} : Taffer&#039;s Paradise download mirror&lt;br /&gt;
&lt;br /&gt;
{{Loot|}} : Loot list&lt;br /&gt;
&lt;br /&gt;
{{Walkthrough|}} : Walkthrough&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Editing This Table ==&lt;br /&gt;
* Please only include playable missions that are fully released, not those currently in development or testing.  Tutorials, demos, prefabs, etc. should be listed elsewhere. &lt;br /&gt;
* A mission title may be listed in plain text as a record of release, or preferably a link to an information page or primary direct download.&lt;br /&gt;
* List by release date descending (newest at the top).&lt;br /&gt;
* If a fan mission only has a single mirror/host please consider adding additional mirrors. &lt;br /&gt;
{{general|sort=Fan Missions}}&lt;br /&gt;
[[Category:Fan Missions]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=Objectives&amp;diff=13698</id>
		<title>Objectives</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=Objectives&amp;diff=13698"/>
		<updated>2012-01-03T15:48:25Z</updated>

		<summary type="html">&lt;p&gt;Sotha: /* Using Objectives Creatively */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Original_Reference|Ishtvan|4121}} &#039;&#039;additions by greebo&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 This article covers details of the objectives system. Note that mappers can use &lt;br /&gt;
 DarkRadiant&#039;s [[Objectives Editor]] to make it easier to create objectives.&lt;br /&gt;
&lt;br /&gt;
The objectives system exists to determine when the player has completed the mission. At the highest level, a mission consists of a list of objectives to be completed and boolean logic to determine when the mission has succeeded or failed based on which of the objectives are complete. At the objective level, an objective consists of individual components and boolean logic to determine when the objective is completed or failed. At the component level, each component has a type, a specifier, and arguments. These will be explained fully in the components section.&lt;br /&gt;
&lt;br /&gt;
= Mission =&lt;br /&gt;
Objectives are stored by entities named [[target_tdm_addobjectives]]. Your mission can have several of these but typically you will only want one for all your objectives.&lt;br /&gt;
&lt;br /&gt;
By default these entities self-trigger (activates themselves) at mission start. If you need to delay this and activate it later (via any trigger entity that can have a target spawnarg) then add the spawnarg &#039;&#039;wait_for_trigger&#039;&#039; with a value of 1.&lt;br /&gt;
&lt;br /&gt;
When triggered, these entities add objectives to the mission based on their spawnargs.&lt;br /&gt;
&lt;br /&gt;
Spawnargs governing mission level behavior may be entered on any target_addobjectives. Non-empty spawnargs will be overwritten by the most recently triggered target_addobjectives (FM authors may want to do this if they add an objective later on and want to change the mission success logic to include that objective, for example). The following is a list of the mission-level spawnargs and what they mean:&lt;br /&gt;
&lt;br /&gt;
== Success/Failure Logic ==&lt;br /&gt;
By default, all mandatory objectives need to be completed for mission success. However, it&#039;s possible to define a custom success and failure logic string on an objective entity. Be sure to have this addobjectives entity active at map start so that the logic is parsed right at map load.&lt;br /&gt;
&lt;br /&gt;
=== Default Logic ===&lt;br /&gt;
*;&amp;lt;tt&amp;gt;mission_logic_success&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:A string of boolean logic applied to individual objective states to determine if the mission succeeds. AND, OR, NOT and parenthesis are available. The FM author can construct strings using these and the integer index for an objective. For example: &amp;quot;1 OR (NOT(2) AND 3)&amp;quot; would complete the mission if either objective 1 is true, or if 2 is false and 3 is true. By default, a mission succeeds when all mandatory objectives are completed.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;mission_logic_failure&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:Boolean logic applied to individual objective component states to determine if the mission has failed. By default, if any mandatory objective fails, the mission fails.&lt;br /&gt;
&lt;br /&gt;
=== Difficulty Dependent Logic ===&lt;br /&gt;
The above spawnargs apply to all difficulty levels. It&#039;s of course possible to override this default for a given difficulty level, by setting these spawnargs. The index N is referring to the difficulty level number (starting from 0 = Easy):&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;mission_logic_success_diff_N&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:Defines the success logic for the difficulty level N (override the default logic), e.g. &amp;quot;1 AND 2 AND 3&amp;quot;.&lt;br /&gt;
*;&amp;lt;tt&amp;gt;mission_logic_failure_diff_N&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:Defines the failure logic for the difficulty level N (override the default logic). When this condition is fulfilled, the mission has failed.&lt;br /&gt;
&lt;br /&gt;
If specific logic is not specified for a certain difficulty level, the default spawnargs (without _diff_*) will be used.&lt;br /&gt;
&lt;br /&gt;
= Objectives =&lt;br /&gt;
Objectives added by the target_addobjectives each have a unique integer index, starting with objective 1, the first objective. The spawnargs associated with an objective are prefixed in the following manner:&lt;br /&gt;
 obj&amp;lt;objective index&amp;gt;_&amp;lt;spawnarg name&amp;gt;&lt;br /&gt;
Example: &#039;&#039;obj3_desc&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The spawnargs (minus prefix) and meanings for objective attributes are listed below. Each objective also includes a list of components and their attributes, which will be covered in the next section.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_desc&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:The description of this objective. This is used to display the objective in the GUI - the user will never see the objective number, only this string. The default value is an empty string.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_state&amp;lt;/tt&amp;gt; (int) Defines the state of the objective at map start. &lt;br /&gt;
:&#039;&#039;&#039;Possible Objective States:&#039;&#039;&#039;&lt;br /&gt;
:* 0 = STATE_INCOMPLETE&lt;br /&gt;
:* 1 = STATE_COMPLETE&lt;br /&gt;
:* 2 = STATE_INVALID&lt;br /&gt;
:* 3 = STATE_FAILED&lt;br /&gt;
:Code defaults to 0 = incomplete.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_mandatory&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:Set to 0 for optional objective that doesn&#039;t fail the mission if you fail it. Objective must be completed to complete the mission if 1. Code defaults to 1.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_irreversible&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:Irreversible objectives lock their state once they&#039;re changed to COMPLETE or FAILED. Irreversible components will only change state once and then stay in that state. (Note: There are scriptfunctions to reset irreversible objectives and components if the FM author wants to let them change again for some reason). Code defaults to 0.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_ongoing&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:If true, this objective is not marked as complete and the player is not informed that it&#039;s complete until the end of the mission. Typically used for &amp;quot;do not kill&amp;quot; type objectives, because technically they would be complete right from the beginning, but we don&#039;t want to mark them off or tell the player they&#039;re complete right at the beginning. Could also be used for &amp;quot;have some item with you when you complete the mission.&amp;quot; Code defaults to 0.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_visible&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:Whether the objective appears in the player&#039;s Objectives GUI. Use invalidated and hidden objectives to queue up objectives for later, or hidden but valid objectives as another way of scripting events when the player does a certain thing, since objectives can launch an arbitrary script after they&#039;re completed. Code defaults to 1.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_difficulty&amp;lt;/tt&amp;gt; (integer)&lt;br /&gt;
:Space delimited list of difficulty levels that should include this objective. For example, &amp;quot;2 3&amp;quot; would enable this objective at difficulty levels 2 and 3, but not for other difficulty levels. Default value is empty - the objective applies to all difficulty levels.&lt;br /&gt;
:&#039;&#039;Note:&#039;&#039; When the objective is not active for a given difficutly, it is invalidated and hidden, but it still exists, so the numbering of the next objective should still increase by 1. E.g., objective 5 only appears on hard difficulty, but you still have to call the next objective objective 6, you can&#039;t call it objective 5 only appearing on easy or medium difficulty.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_enabling_objs&amp;lt;/tt&amp;gt; (space-delimited integers) &lt;br /&gt;
:This is a list of objectives which must be completed &#039;&#039;before&#039;&#039; this objective can be completed. For example, we shouldn&#039;t mark &amp;quot;objective complete&amp;quot; for exiting the mission until all the other mission goals have been completed. An example value for this spawnarg would be &amp;quot;4 6&amp;quot; to let this objective depend on objectives #4 and #6.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_script_complete&amp;lt;/tt&amp;gt; (string)&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_script_failed&amp;lt;/tt&amp;gt; (string)&lt;br /&gt;
:Name of a script to call when this objective is completed or failed. For example, this could be used in campaigns to set up optional objectives in one mission that effect other missions. This feature could also be used as a general scripting aide if the author wants to set up the conditions for something happening using a hidden objective.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_target_complete&amp;lt;/tt&amp;gt; (string)&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_target_failed&amp;lt;/tt&amp;gt; (string)&lt;br /&gt;
:Name of a target entity to call when this objective is completed or failed, similar to the completion/failure script. Only one entity name is allowed here. If you need to trigger multiple entities on objective state change, use a [[trigger_relay]] entity.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_logic_success&amp;lt;/tt&amp;gt; (string)&lt;br /&gt;
:Boolean logic applied to individual objective component states to determine if the objective is complete. The same boolean logic options are available as in the mission-level logic described above. By default, all of the components must be true to complete the objective. In other words, all components are ANDed together (1 AND 2 AND 3...).&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_logic_failure&amp;lt;/tt&amp;gt; (string)&lt;br /&gt;
:Boolean logic applied to individual objective component states to determine if the objective is failed. By default, if an objective is ongoing, and any opponent becomes false, that objective will fail.&lt;br /&gt;
&lt;br /&gt;
= Objective Components =&lt;br /&gt;
Each objective has an associated list of components and spawnargs defining the attributes of those components. These component spawnargs associated with a given objective are prefixed in the following manner:&lt;br /&gt;
 obj&amp;lt;objective index&amp;gt;_&amp;lt;component index&amp;gt;_&amp;lt;spawnarg name&amp;gt;&lt;br /&gt;
Example: &#039;&#039;obj1_2_state&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In the following, the index N defines the objective number and M refers to the component number. Programmers beware that both numbers start from the value 1.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_state&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:Defines the state of the component at map start, which can only be &amp;quot;1&amp;quot; (complete) or &amp;quot;0&amp;quot; (incomplete). Code defaults to 0.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_player_responsible&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:When true, the player must be responsible for the events that satisfy this component. Events the player is not responsible for are not counted. (e.g., the player kills an AI vs. another AI killing an AI). Code defaults to 1.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_not&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:Code defaults to 0. If true, this component is logically NOTed, so when the conditions described by the type and speifiers are not met, the component state is true, and when they are met, it is false.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_irreversible&amp;lt;/tt&amp;gt; (1/0) &lt;br /&gt;
:When the component state changes from its initial state, it will stay in its new state regardless of what happens later. (There is a script event to &amp;quot;unlatch&amp;quot; a latched objective component if needed). Code defaults to 0.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_type&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:Defines the type of this objective component. See the section [[#Component_Types|Component Types]] below for detailed information.&lt;br /&gt;
:&#039;&#039;&#039;Possible &#039;Objective Component&#039; Types:&#039;&#039;&#039;&lt;br /&gt;
:* kill (also includes non-living things being destroyed)&lt;br /&gt;
:* ko&lt;br /&gt;
:* ai_find_item (not implemented)&lt;br /&gt;
:* ai_find_body (not implemented)&lt;br /&gt;
:* alert&lt;br /&gt;
:* destroy (inanimate item destroyed (&amp;quot;killed&amp;quot;))&lt;br /&gt;
:* item (picked up or dropped an inventory item)&lt;br /&gt;
:* pickpocket (inventory item acquired from conscious AI)&lt;br /&gt;
:* location (Item A at location B, where &amp;quot;A&amp;quot; is any entity that must have the key &amp;quot;objective_ent&amp;quot; set to &amp;quot;1&amp;quot; on it, and location B is a special entity info_objective_location. Later on we may support using the D3 location system as well)&lt;br /&gt;
:* custom (custom component that is set true/false by a map script)&lt;br /&gt;
:These components are triggered every N milliseconds by a system clock:&lt;br /&gt;
:* custom_clocked (runs a custom map script that should check something and set the objective)&lt;br /&gt;
:* info_location (Item A at info_location area B) - TODO: more information needed&lt;br /&gt;
:* distance (distance between the origin of entity X and that of entity Y)&lt;br /&gt;
&lt;br /&gt;
Any component can have up to two specifiers, each of which can carry a value. Here, K refers to the number of the specifier, e.g. (&amp;quot;obj2_1_spec4&amp;quot; &amp;quot;name&amp;quot;).&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_specK&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:&#039;&#039;&#039;Specification Methods:&#039;&#039;&#039;&lt;br /&gt;
:Specification methods determine what the objective component is looking for. Does it look at how many AI of a specific team you&#039;ve KO&#039;d, how many humans, how many overall, or whether you&#039;ve KO&#039;d an AI with a certain name? Each objective component can have up to two of the following specifiers (Not all components can take two specifiers, and not all specifiers make sense for all component types, future documentation will cover that). See the section [[#Specifiers|Specifiers]] below for a detailed description.&lt;br /&gt;
:&#039;&#039;&#039;The following apply to both AIs and items:&#039;&#039;&#039;&lt;br /&gt;
:* none&lt;br /&gt;
:* name (name of entity)&lt;br /&gt;
:* overall (overall count of something: kills, loot, kos, etc)&lt;br /&gt;
:* group (inventory group)&lt;br /&gt;
:* classname (soft/scripting classname)&lt;br /&gt;
:* spawnclass (hard / SDK classname, e.g. &amp;quot;idPlayer&amp;quot;)&lt;br /&gt;
:&#039;&#039;&#039;The following specification methods apply only to AI:&#039;&#039;&#039;&lt;br /&gt;
:* ai_type (human, beast, undead, bot, etc)&lt;br /&gt;
:* ai_team (mapper defined team of the AI)&lt;br /&gt;
:* ai_innocence (For distinguishing noncombatants)&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_spec_valK&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Value that the Kth specifier should match in order to count towards this component. (E.g., an entity name if we specify by name.)&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_args&amp;lt;/tt&amp;gt; (space-delimited string) &lt;br /&gt;
:&#039;&#039;&#039;Integer and String Arguments:&#039;&#039;&#039;&lt;br /&gt;
:A component can have an arbitrary number of int and string arguments that are fed in space delimited lists. The type of component and specifier determines which args it will use and what it will do with them. For example, the first integer arg is often used to determine how many times something can happen, e.g., the player is only allowed 4 KOs, or must get 500 loot. Not all events are counted up though. The only things that are counted up are things in the mission statistics like loot and kills, so everything else is pretty much a one shot deal where it happens once. Future documentation will detail which objective events are counted up and which are one shots.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;objN_M_clock_interval&amp;lt;/tt&amp;gt; (float/seconds)&lt;br /&gt;
:For clocked components like &amp;quot;custom_clocked&amp;quot; this determines how often they are updated. The value is to be set in seconds.&lt;br /&gt;
&lt;br /&gt;
== Component Types ==&lt;br /&gt;
=== AI-Related Components ===&lt;br /&gt;
The following specifiers are termed &amp;quot;Standard AI Specifiers&amp;quot;: All specifiers minus the &amp;lt;tt&amp;gt;group&amp;lt;/tt&amp;gt; specifier.&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;kill&amp;lt;/tt&amp;gt;&lt;br /&gt;
:An AI must be killed to satisfy this component.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_KILL&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (object that must be killed)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: Standard AI Specifiers&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (number of kills required)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;ko&amp;lt;/tt&amp;gt; (Knockout)&lt;br /&gt;
:An AI must be knocked out by any means (gas, blackjack, other).&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_KO&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (AI that must be KO&#039;d)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: Standard AI Specifiers&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (number of KOs required)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;ai_find_item&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&#039;&#039;not yet implemented&#039;&#039;&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_AI_FIND_ITEM&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: --&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: --&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: --&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;ai_find_body&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&#039;&#039;not yet implemented&#039;&#039; An AI must find a body. Currently, the specifiers apply to the bodies found, and any AI finding the bodies triggers this component. Future revisions might add another specifier for the AI that finds the body.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_AI_FIND_BODY&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (Type of body that must be found)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: Standard AI Specifiers&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (number of bodies that must be found)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;alert&amp;lt;/tt&amp;gt;&lt;br /&gt;
:True if an AI or type of AI is alerted. Use the player_responsible flag to determine if this should count alerts not caused by the player&#039;s actions (e.g., enemy AI being sighted)&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_ALERT&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (AI that must be alerted)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: Standard AI Specifiers&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (number of alerts required), int (minimum alert level that counts: 1-5 with 5 being the combat state)&lt;br /&gt;
&lt;br /&gt;
=== Non-AI Components ===&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;destroy&amp;lt;/tt&amp;gt;&lt;br /&gt;
:An inanimate item must be destroyed (damage it until its health is lower than zero).&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_DESTROY&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (item to be destroyed)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: all&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (number of items to be destroyed)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;item&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Completed when the player has this inventory item or loot.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_ITEM&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (item the player must have)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: All except AI type, team and innocence.&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (number of items to have, 1 by default)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;pickpocket&amp;lt;/tt&amp;gt;&lt;br /&gt;
:An inventory item must be taken from a conscious AI. Note that it doesn&#039;t matter what happens to the item after it is pickpocketed. It could be destroyed or dropped, but as long as it was originally pickpocketed, it counts.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_PICKPOCKET&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (Item the player must pickpocket)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: All except AI type, team and innocence&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (number of items to pickpocket, 1 by default)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;location&amp;lt;/tt&amp;gt; Object in location brush (using info_tdm_objective_location brush)&lt;br /&gt;
:A particular item must be in a particular location, defined by an info_objective_location brush. For optimization reasons, the entity or entities to be checked must also have this spawnarg: &amp;quot;objective_ent&amp;quot; set to &amp;quot;1&amp;quot;. NOTE: Multiple objects in a single location are not counted up for this component, this is a single-shot objective. If you want the player to put more than one object in a location, you must currently create several of these components, specifying by name, and OR them together in the objective logic.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_LOCATION&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 2 (object entity to check, location entity to check)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: For the object to check, all specifiers apply, but multiple objects are not counted up. Typically the objects will be specified by name. For the location to check, it will either be specified by name or by group.&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: None (if both specifiers match, the objective is completed).&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;info_location&amp;lt;/tt&amp;gt; Object in location area (using info_location entities)&lt;br /&gt;
:A particular item must be in a particular location, defined by an info_location area (see vanilla D3 documentation for info_location). Multiple objects in a single location are not counted up for this component, this is a single-shot objective. If you want the player to put more than one object in a location, you must currently create several of these components, specifying by name, and OR them together in the objective logic.&lt;br /&gt;
:This check is done periodically. Set spawnarg &amp;lt;tt&amp;gt;clock_interval&amp;lt;/tt&amp;gt; to the time in seconds between periodic checks.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_INFO_LOCATION&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 2 (object entity to check, location entity to check)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: For the object to check, all specifiers apply, but multiple objects are not counted up. Typically the objects will be specified by name. For the location to check, it will either be specified by name or by group.&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: None (if both specifiers match, the objective is completed).&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;custom&amp;lt;/tt&amp;gt;&lt;br /&gt;
:This custom objective component is only changed when an external script changes it. Otherwise it does nothing.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_CUSTOM_ASYNC&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: none&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: none&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: none&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;custom_clocked&amp;lt;/tt&amp;gt;&lt;br /&gt;
:This component calls a custom script periodically to check some condition. When run, the script is expected to this component true or false based on the custom check. This objective component could also be used as a convenient method to periodically call a script that has nothing to do with objectives.&lt;br /&gt;
:Set spawnarg &amp;lt;tt&amp;gt;clock_interval&amp;lt;/tt&amp;gt; to the time in seconds between periodic calls of the script.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_CUSTOM_CLOCKED&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: none&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: none&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: string (name of the script to call periodically)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;distance&amp;lt;/tt&amp;gt;&lt;br /&gt;
:Two entities must be sufficiently close to eachother to satisfy this component. The distance check is done between the origin of the first object and that of the second object. If this distance is below the input maximum distance, the component is set to true.&lt;br /&gt;
:This check is done periodically. Set spawnarg &amp;quot;clock_interval&amp;quot; to the time in seconds between periodic checks.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_DISTANCE&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: none (see arguments below)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: none&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: string (name of first entity), string (name of second entity), int (maximum distance in doom units)&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;readable_opened&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&#039;&#039;available since TDM 1.02&#039;&#039;&lt;br /&gt;
:The player must open a named readable to satisfy this component. This doesn&#039;t refer to a specific page, just opening the readable is enough.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_READABLE_OPENED&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (The name of the readable)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: name&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: none&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;readable_closed&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&#039;&#039;available since TDM 1.02&#039;&#039;&lt;br /&gt;
:The player must close a named readable to satisfy this component. This doesn&#039;t check whether the player has finished reading all pages, just closing the previously opened readable is enough.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_READABLE_CLOSED&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (The name of the readable)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: name&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: none&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;readable_page_reached&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&#039;&#039;available since TDM 1.02&#039;&#039;&lt;br /&gt;
:The player must open/read a specific page of a named readable to fulfil this component. Scrolling to the page is enough to trigger this event.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: COMP_READABLE_PAGE_REACHED&lt;br /&gt;
:&#039;&#039;&#039;Number of Specificatons&#039;&#039;&#039;: 1 (The name of the readable)&lt;br /&gt;
:&#039;&#039;&#039;Applicable Specifiers&#039;&#039;&#039;: name&lt;br /&gt;
:&#039;&#039;&#039;Expected Arguments&#039;&#039;&#039;: int (the page number which should be reached, the number 1 refers to the first page)&lt;br /&gt;
&lt;br /&gt;
== Specifiers ==&lt;br /&gt;
;*&amp;lt;tt&amp;gt;none&amp;lt;/tt&amp;gt; &lt;br /&gt;
:No specifier. Component will be completed as soon as any event of that component type happens. (E.g., if you set a KO component type, with specifier none, it would be set to true as soon as soon as the player KO&#039;s anyone). This is the default specifier if none is entered. Not very useful, except for blanket &amp;quot;don&#039;t do this&amp;quot; objectives. Even then, it is better to use &amp;quot;overall&amp;quot; described below.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_NONE&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: No spec argument needed since we don&#039;t have to match anything.&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; &lt;br /&gt;
:Name of the entity&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_NAME&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: string&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;overall&amp;lt;/tt&amp;gt; &lt;br /&gt;
:In the context of inventory item objectives, this refers to overall loot. In the context of AI objectives, this refers to all AI, regardless of team, type, etc.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_OVERALL&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: No spec argument needed since we don&#039;t have to match anything.&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;Group&amp;lt;/tt&amp;gt; &lt;br /&gt;
:For inventory items, the item&#039;s &amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt; spawnarg value will be used here. For example, if you want the player to get 5 flashbombs, you would use this with group equal to the &amp;lt;tt&amp;gt;inv_name&amp;lt;/tt&amp;gt; of flashbombs. As opposed to getting a specific flashbomb in the map, where you would use the &amp;lt;tt&amp;gt;name&amp;lt;/tt&amp;gt; specifier instead. If an inventory item is loot, the loot group is used here instead (e.g., &amp;lt;tt&amp;gt;loot_gold&amp;lt;/tt&amp;gt;).&lt;br /&gt;
:Group is also used for other component types as a convenient way to group things, such as info_objective_location or info_location entities checked by COMP_LOCATION and COMP_INFO_LOCATION, respectively.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_GROUP&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: string&lt;br /&gt;
:&#039;&#039;&#039;Loot group names:&#039;&#039;&#039; &amp;lt;tt&amp;gt;loot_gold&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;loot_goods&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;loot_jewels&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;loot_total&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;Classname&amp;lt;/tt&amp;gt; &lt;br /&gt;
:The entityDef classname of the entity. For example: atdm:ai_builder_guard&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_CLASSNAME&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: string&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;Spawnclass&amp;lt;/tt&amp;gt; &lt;br /&gt;
: The SDK classname of the entity. For example: idAI&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_SPAWNCLASS&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: string&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;ai_type&amp;lt;/tt&amp;gt; &lt;br /&gt;
:Type of AI: human, beast, undead, steambot, etc. (reads m_AIType in the SDK, which is set by the &amp;quot;type&amp;quot; spawnarg on idActors. Not sure if this is implemented yet).&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_AI_TYPE&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: int&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;ai_team&amp;lt;/tt&amp;gt; &lt;br /&gt;
:The AI&#039;s team integer. This can be set up by the mapper to put AI on arbitrary teams. Mapper can also team up AI for objective purposes, and use this team specifier as a fast way of saying &amp;quot;KO any of these 5 AI.&amp;quot; Alternatively, one could use the name specifier and put in multiple components for each of those 5 AI, then OR all the components in the objective success logic. Making a new team may save time over that method.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_AI_TEAM&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: int&lt;br /&gt;
&lt;br /&gt;
;*&amp;lt;tt&amp;gt;ai_innocence&amp;lt;/tt&amp;gt; &lt;br /&gt;
:Differentiates between combatants and non-combatants. A value of 1 = non-combatant, a value of 0 =&amp;gt; non-combatant, or otherwise not deemed &amp;quot;innocent&amp;quot; by the FM author.&lt;br /&gt;
:&#039;&#039;&#039;SDK Name&#039;&#039;&#039;: SPEC_AI_INNOCENCE&lt;br /&gt;
:&#039;&#039;&#039;Specifier Argument Type Expected&#039;&#039;&#039;: int (1 = innocent, 0 = not)&lt;br /&gt;
&lt;br /&gt;
= Objective Conditions =&lt;br /&gt;
With the campaign code added to TDM 1.06 a new set of spawnargs can be used to let objectives depend on those in a previous mission. These spawnargs are starting with the &amp;lt;tt&amp;gt;obj_condition&amp;lt;/tt&amp;gt; prefix.&lt;br /&gt;
&lt;br /&gt;
Each condition defines the &amp;quot;source&amp;quot; mission and the source objective by number, plus the state of the source objective. It also needs to specify the &amp;quot;target&amp;quot; objective (which is always in the current mission) by number and which action to take. Right now, three different actions are supported: &lt;br /&gt;
* Change Objective State (complete, failed, etc.)&lt;br /&gt;
* Change the Objective&#039;s Visibility (hide or show)&lt;br /&gt;
* Change the Objective&#039;s Mandatory Flag&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;obj_condition_N_src_mission&amp;lt;/tt&amp;gt; (integer) &lt;br /&gt;
:Defines the source mission the condition depends on. The integer is 0-based, i.e. the first mission has the number 0. The placeholder N is the number of the condition.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;obj_condition_N_src_obj&amp;lt;/tt&amp;gt; (integer) &lt;br /&gt;
:Defines the number of the source objective in the source mission. The integer is 0-based, i.e. the first objective has the number 0. The placeholder N is the number of the condition.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;obj_condition_N_src_state&amp;lt;/tt&amp;gt; (integer) &lt;br /&gt;
:Defines the state the source objective needs to be in for this condition to apply. The value can be in the same range as the objN_state spawnarg above:&lt;br /&gt;
:* 0 = STATE_INCOMPLETE&lt;br /&gt;
:* 1 = STATE_COMPLETE&lt;br /&gt;
:* 2 = STATE_INVALID&lt;br /&gt;
:* 3 = STATE_FAILED&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;obj_condition_N_target_obj&amp;lt;/tt&amp;gt; (integer) &lt;br /&gt;
:Defines the number of the target objective in the current mission. The integer is 0-based, i.e. the first objective has the number 0. The placeholder N is the number of the condition.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;obj_condition_N_type&amp;lt;/tt&amp;gt; (string) &lt;br /&gt;
:Defines the action to take if the condition applies. There are three possible action types available:&lt;br /&gt;
:* &amp;quot;changestate&amp;quot; Change the state of the target objective.&lt;br /&gt;
:* &amp;quot;changevisibility&amp;quot; Change the visibility of the target objective.&lt;br /&gt;
:* &amp;quot;changemandatory&amp;quot; Change the mandatory flag of the target objective.&lt;br /&gt;
:The combination of this &amp;quot;type&amp;quot; spawnarg and the &amp;quot;value&amp;quot; spawnarg below defines exactly what action is performed on the target objective.&lt;br /&gt;
&lt;br /&gt;
*;&amp;lt;tt&amp;gt;obj_condition_N_value&amp;lt;/tt&amp;gt; (integer) &lt;br /&gt;
:The meaning and possible values of this spawnarg depend on the &amp;quot;type&amp;quot; spawnarg above. It is used as &amp;quot;parameter&amp;quot; or &amp;quot;argument&amp;quot; for the above action, e.g. the &amp;quot;changevisibility&amp;quot; action needs to know whether to show or hide the target objective. The possible values are listed below:&lt;br /&gt;
:* For type &amp;quot;changestate&amp;quot;&lt;br /&gt;
:** 0: set to incomplete&lt;br /&gt;
:** 1: set to complete&lt;br /&gt;
:** 2: set to invalid&lt;br /&gt;
:** 3: set to failed&lt;br /&gt;
:* For type &amp;quot;changevisibility&amp;quot;&lt;br /&gt;
:** 0: set to invisible&lt;br /&gt;
:** 1: set to visible&lt;br /&gt;
:* For type &amp;quot;changemandatory&amp;quot;&lt;br /&gt;
:** 0: clear mandatory flag&lt;br /&gt;
:** 1: set mandatory flag&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
Using components that combine component types with up to 2 entity arguments and 2 specifier types, plus objectives that are a boolean combination of those components should hopefully allow for a variety of different objectives.&lt;br /&gt;
&lt;br /&gt;
= Using Objectives Creatively =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A method for using objectives to change AI patrols when alert.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This works beautifully. The AI are placed at the seats just like in the card player prefab. Each player have &amp;quot;sitting 1&amp;quot; so they sit down at map start. AI&#039;s have no targets.&lt;br /&gt;
&lt;br /&gt;
Then I have one unseen objective per player:&lt;br /&gt;
Objective component is only &amp;quot;AI is alerted&amp;quot;, with the single entity card playing AI name. I can set the minimum alert level required for the AI to react. I set that to 3, so if the AI search actively, he won&#039;t be playing cards anymore, but goes patrolling instead.&lt;br /&gt;
Basically the objective component says: &amp;quot;Alert entity cardgamer1 1 times to a minimum alert level of 3.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And when that gets satisfied, the objective has completion target gopatrol_start, which is an ordinary trigger_once. This in turn targets a func_static which gives all the cardgamers new targets to their patrol routes. &lt;br /&gt;
&lt;br /&gt;
This is done as follows: Choose any kind of func_static. Open it in the Stim&amp;amp;Response editor. Add response trigger. Add an effect to this response. Choose &amp;quot;Add Target.&amp;quot; Put in the entity box the name of the AI. Put in the target box the name of the path_node where the AI should go.&lt;br /&gt;
&lt;br /&gt;
When I make one objective for each player, alerting any single one of them will make everyone of them to go for patrol. And once the trigger_once is gone, further alerting of the AI has no effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Editing]]&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=AI_Patrol&amp;diff=12053</id>
		<title>AI Patrol</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=AI_Patrol&amp;diff=12053"/>
		<updated>2011-01-23T10:58:48Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
This article describes the ways how the mapper can get his/her AI&#039;s to move around in their map. Regardless of which method you use, you should understand basic [[Pathfinding]]. Read that article first.&lt;br /&gt;
&lt;br /&gt;
There are several methods of getting your AI to move around your map.&lt;br /&gt;
*Path_corners&lt;br /&gt;
*Conversations&lt;br /&gt;
*Scripting&lt;br /&gt;
&lt;br /&gt;
=== Path_corners ===&lt;br /&gt;
The typical choice the mappers use path-corners. Using them is quite straight forward. Information how to set up path_corners is given here [[A - Z Beginner Full Guide Page 4]] and here [[Path Nodes]]&lt;br /&gt;
&lt;br /&gt;
=== Conversations ===&lt;br /&gt;
Conversation entities can be used to move AI too. See information in the [[Conversation]] article. Note that in TDM v1.03 the AI returns to the original place it was before the conversation, when the conversation end. This means that you can make the AI walk around, but it will not stay there where you sent it when the conversation ends.&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
Scripting is a powerful tool to control all kinds of things. AI movement can be also controlled with scripting.&lt;br /&gt;
====Example AI control====&lt;br /&gt;
*Place an AI in your map. Name it &amp;quot;ai&amp;quot;.&lt;br /&gt;
*Place a path_corner in your map. Name it &amp;quot;destination&amp;quot;.&lt;br /&gt;
*Place a atdm:target_callscriptfunction. Name it &amp;quot;call_ai_walk_script&amp;quot;. Add spawnarg &amp;quot;call&amp;quot; &amp;quot;ai_walk_script&amp;quot;&lt;br /&gt;
*Place a switch in your map, which targets the above atdm:target_callscriptfunction.&lt;br /&gt;
&lt;br /&gt;
*Create an ordinary textfile mymapname.script and place it in your /maps folder.&lt;br /&gt;
*Put the following info in the script file:&lt;br /&gt;
&lt;br /&gt;
 void ai_walk_script() &lt;br /&gt;
 {&lt;br /&gt;
 $ai.moveToEntity($destination);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
When the player pulls the lever, the AI walks to the entity destination and stays there. You can add more levers which send the AI to different locations. Note: it was observed in TDM v1.03 that sometimes, if a script is called from a conversation, the AI will occasionally not move to the position even if the script is running. This can be fixed by adding a small delay in the beginning of the script (sys.wait(1);).&lt;br /&gt;
&lt;br /&gt;
Mappers can also use $ai_name_here.moveToPosition(&amp;quot;123,456,768&amp;quot;); and replace the coordinates where the AI should go. (Not tested.)&lt;br /&gt;
&lt;br /&gt;
Other AI control commands exist, like $ai_name_here.turnToEntity(entityname);, which makes the AI to turn towards the specified entity.&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=AI_Patrol&amp;diff=12052</id>
		<title>AI Patrol</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=AI_Patrol&amp;diff=12052"/>
		<updated>2011-01-23T09:09:29Z</updated>

		<summary type="html">&lt;p&gt;Sotha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Written by Sotha.&lt;br /&gt;
&lt;br /&gt;
This article describes the ways how the mapper can get his/her AI&#039;s to move around in their map. Regardless of which method you use, you should understand basic [[Pathfinding]]. Read that article first.&lt;br /&gt;
&lt;br /&gt;
There are several methods of getting your AI to move around your map.&lt;br /&gt;
*Path_corners&lt;br /&gt;
*Conversations&lt;br /&gt;
*Scripting&lt;br /&gt;
&lt;br /&gt;
=== Path_corners ===&lt;br /&gt;
The typical choice the mappers use path-corners. Using them is quite straight forward. Information how to set up path_corners is given here [[A - Z Beginner Full Guide Page 4]] and here [[Path Nodes]]&lt;br /&gt;
&lt;br /&gt;
=== Conversations ===&lt;br /&gt;
Conversation entities can be used to move AI too. See information in the [[Conversation]] article. Note that in TDM v1.03 the AI returns to the original place it was before the conversation, when the conversation end. This means that you can make the AI walk around, but it will not stay there where you sent it when the conversation ends.&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
Scripting is a powerful tool to control all kinds of things. AI movement can be also controlled with scripting.&lt;br /&gt;
====Example AI control====&lt;br /&gt;
*Place an AI in your map. Name it &amp;quot;ai&amp;quot;.&lt;br /&gt;
*Place a path_corner in your map. Name it &amp;quot;destination&amp;quot;.&lt;br /&gt;
*Place a atdm:target_callscriptfunction. Name it &amp;quot;call_ai_walk_script&amp;quot;. Add spawnarg &amp;quot;call&amp;quot; &amp;quot;ai_walk_script&amp;quot;&lt;br /&gt;
*Place a switch in your map, which targets the above atdm:target_callscriptfunction.&lt;br /&gt;
&lt;br /&gt;
*Create an ordinary textfile mymapname.script and place it in your /maps folder.&lt;br /&gt;
*Put the following info in the script file:&lt;br /&gt;
&lt;br /&gt;
 void ai_walk_script() &lt;br /&gt;
 {&lt;br /&gt;
 $ai.moveToEntity($destination);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
When the player pulls the lever, the AI walks to the entity destination and stays there. You can add more levers which send the AI to different locations. Note: it was observed in TDM v1.03 that sometimes, if a script is called from a conversation, the AI will occasionally not move to the position even if the script is running. This can be fixed by adding a small delay in the beginning of the script (sys.wait(1);).&lt;br /&gt;
&lt;br /&gt;
Mappers can also use $ai_name_here.moveToPosition(&amp;quot;123,456,768&amp;quot;); and replace the coordinates where the AI should go. (Not tested.)&lt;br /&gt;
&lt;br /&gt;
Other AI control commands exist, like $ai_name_here.turnToEntity(entityname);, which makes the AI to turn towards the specified entity.&lt;/div&gt;</summary>
		<author><name>Sotha</name></author>
	</entry>
</feed>