<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.svencoop.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hezus</id>
	<title>Sven Co-op - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.svencoop.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hezus"/>
	<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/Special:Contributions/Hezus"/>
	<updated>2026-06-03T00:22:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=855</id>
		<title>Mapping/Multiple skies with point light support</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=855"/>
		<updated>2023-03-14T12:52:58Z</updated>

		<summary type="html">&lt;p&gt;Hezus: /* Environment light */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SC 5.21 added a new entity called trigger_changesky, which allows you to change the skybox texture on the fly. Changing the light of the sky is possible but you&#039;ll run into a few limitations. This tutorial will show you how to work around these problems with a nifty trick. It&#039;ll also go into detail about the nature of environment lights.&lt;br /&gt;
&lt;br /&gt;
==Environment light==&lt;br /&gt;
&lt;br /&gt;
A light_environment entity will cast light from the SKY brush to illuminate brushes, just like any other light entity does. The light information on a brush will be stored in the lightmap. Nearly all models in the game will look below their origin for this light information and take on the colour and intensity of that light. In the screenshot below the player is standing on a red light spot and thus becomes the same shade of red.&lt;br /&gt;
&lt;br /&gt;
[[File:ZzD7tM4.jpg]]&lt;br /&gt;
&lt;br /&gt;
A light_environment does something extra: it creates a global light and a vector point. The sky vector point is a point in 3D space where the sky light is coming from. As soon as a model can trace a line to this point, it&#039;ll take on the colour and intensity of the global light. This global light will always override the light info in the lightmap below the model. See the illustration below:&lt;br /&gt;
&lt;br /&gt;
You can experiment with the sky vector and colour by using the sv_skycolor and sv_skyvector commands in your server. However, these cannot be dynamicly changed by map entities.&lt;br /&gt;
&lt;br /&gt;
==Light_spot and -noskyfix==&lt;br /&gt;
&lt;br /&gt;
Having a global light override all your lightmap info can be quite annoying. Imagine a dark map where you&#039;re model is always a dark shade of blue even when you are walking under a spot light. Luckely, there is a way to get rid of it. You can either use the -noskyfix parameter for RAD or use a light_spot instead of a light_environment. Both methods have the same result: they nullify the global light. For this tutorial I&#039;m using the light_spot route, since it&#039;s easier to work with.&lt;br /&gt;
&lt;br /&gt;
Remove the light_enviroment from your map and put in a light_spot. Then set the keyvalue Is Sky? to Yes. (_sky 1). You can give this light the desired colour and intensity and you can also add Ambient light by click on SmartEdit and add the &#039;_diffuse_light&#039; keyvalue with RGB values. It only needs a targetname. I&#039;m calling mine &#039;light1&#039;. You can add a button to the map to target our light and turn it on and off.&lt;br /&gt;
&lt;br /&gt;
==Lighting problems==&lt;br /&gt;
&lt;br /&gt;
There are some issues with this setup, though. For starters, the SKY brush doesn&#039;t hold any lighting information. So if your map has an Osprey flying above a SKY brush, it will be rendered completely black. Or if you have a Xen map, where players jump from island to island: in between the islands their models will become black. Note that models only take lighting info from world geometry. Even though brush entities such as func_walls have lightmaps, the engine will ignore them and look further down below until it hits a world brush and take the light info from that face. If that face happens to be a SKY brush, your model will be black again.&lt;br /&gt;
&lt;br /&gt;
The second problem is that the light_spot is a point light entity and the engine limits the casting range of those to 2048 units. If your model is flying above a world brush higher than 2048 units it will not recieve any more lightmap info.&lt;br /&gt;
&lt;br /&gt;
==The work-around==&lt;br /&gt;
To make sure our models are lit correctly in the skybox, we&#039;ll have to find an invisible brush that can hold the lightmap data. The ZHLT tools provide us with just such a thing: BLACK_HIDDEN. Make sure you have zhlt.wad loaded.&lt;br /&gt;
&lt;br /&gt;
Create a brush over the area of the SKY brush and put the SKIP texture on all sides. Then put the BLACK_HIDDEN on top of this brush. You can cover the entire bottom of the SKY but I&#039;ll advise you to only use it where it&#039;s necessary. These brushes can be very large and it might take a while to calculate lighting on during compilation. Therefore, also scale the texture to 4.00 or 8.00, so the lightmap becomes larger. This will improve compile times a lot and you will not be able to notice the difference, since there is only one gradient of light cast on them anyhow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now compile it and our Apache will have correct lighting above the skybox!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You might notice that if your Apache flies over areas with other lightmap info, it&#039;ll start shifting colour and intensity because it takes on different lightmap info. This can be very undisirable, but there is a fix for it. Create another brush at the top of the skybox and this time put the BLACK_HIDDEN texture on the bottom.&lt;br /&gt;
&lt;br /&gt;
Now go into the properties of the Apache, click SmartEdit and add the keyvalue &#039;effects&#039; with a value of 16. This invokes EF_INVLIGHT, which will cause this entity to search for lightmap info ABOVE the origin (in this case: our new brush). Now our Apache will always use this sky light for its light info.&lt;br /&gt;
&lt;br /&gt;
==Setting up multiple togglable skies==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve found a solution to the lighting issues, we can begin to set up our multiple sky system. NOTE: There is a hard limit of three sky lights. This is because the engine can handle one static light (unnamed light entities) and three dynamic lights (named lights or light with appearance settings). If you add a fourth dynamic light, you&#039;ll get the &amp;quot;too many lightstyles on a face&amp;quot; error. Keep this in mind if you plan to use other dynamic lights in your outside areas. In this case you are better off with just two different skies, so you have one free channel for your other dynamic lights.&lt;br /&gt;
&lt;br /&gt;
-Create three light_spot entities and call them &amp;quot;light1&amp;quot;, &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot;. Give each of them a unique colour. Flag &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot; to Initially Dark.&lt;br /&gt;
-Create three trigger_changesky entities and call them &amp;quot;light1_sky&amp;quot;, &amp;quot;light2_sky&amp;quot; and &amp;quot;light3_sky&amp;quot;. Give each of them a unique sky name. You can find these in the ../gfx/env folder. Flag &amp;quot;All Players&amp;quot; and &amp;quot;Update server&amp;quot; on all three.&lt;br /&gt;
-Create a multimanager and name it &amp;quot;set_light1&amp;quot;.&lt;br /&gt;
-Click on SmartEdit and add &amp;quot;light1_sky&amp;quot; with a value of &amp;quot;0&amp;quot;. This will set the sky for light system 1.&lt;br /&gt;
-Add &amp;quot;light1&amp;quot; with a value of &amp;quot;0#1&amp;quot;. In this case &amp;quot;0&amp;quot; means the delay and &amp;quot;#1&amp;quot; will force it to go ON.&lt;br /&gt;
-Add &amp;quot;light2&amp;quot; with a value of &amp;quot;0#0&amp;quot;. &amp;quot;#0&amp;quot; will force it to go OFF.&lt;br /&gt;
-Add &amp;quot;light3&amp;quot; with a value of &amp;quot;0#0&amp;quot;.&lt;br /&gt;
-Duplicate the multimanger and call it &amp;quot;set_light2&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1_sky&amp;quot; to &amp;quot;light2_sky&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1&amp;quot; value to &amp;quot;0#0&amp;quot; and &amp;quot;light2&amp;quot; to 0#1&amp;quot;. Now this will force light2 to be ON.&lt;br /&gt;
-Duplicate the multimanager again and make similar changes for &amp;quot;light3&amp;quot;.&lt;br /&gt;
-Create a trigger (or button) to target &amp;quot;set_light1&amp;quot;, &amp;quot;set_light2&amp;quot; and &amp;quot;set_light3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now compile and watch your lights change! &lt;br /&gt;
&lt;br /&gt;
==Setting up the multiple simultaneous skies==&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to set up a map where you have two seperate skyboxes at the same time. Imagine a scenario where you travel forward or back in time through a teleporter.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll start by making two rooms with a SKY brush. You can shape them however you like, as long as they are seperate areas that do not connect to one another. Place a light_environment in each of them and create a trigger_teleporter and info_teleport_destination, so you travel from one to the other.&lt;br /&gt;
&lt;br /&gt;
Add two trigger_changesky&#039;s and add the skies of your choice. I&#039;m going with &#039;morning&#039; for one and &#039;night&#039; for the other. I&#039;m giving them the targetnames &#039;morning_sky&#039; and &#039;night_sky&#039;. Now I&#039;m going to adjust the light properties of each light_enviroment to match a morning and a night light. Do not tag any flags. By default the sky will only change for the player who activates it. Finally, go into your Map Properties and set the sky you want to player to begin with.&lt;br /&gt;
&lt;br /&gt;
Go into the info_teleport_destination and in FLAGS, tag &#039;trigger on arrival&#039;. Then in the target field add the sky that should be enabled once you arrive here. The teleport_destination in my night area will target &#039;night_sky&#039; and the teleport_destination in my morning area will target &#039;morning_sky&#039;. You might now have something that resembles this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now here comes trouble: as established earlier in this tutorial, using a light_environment will cause the global light to enable. The engine will take the light information from the light_environment which was placed LAST to use for the global light. In my case that would be night, so even in the morning area, all models will have night lighting. Luckily, there is a work-around: Create a small room with SKY textures and place a light_enviroment in there. Now change the &#039;brightness&#039; to 0 0 0 0. This will set the global light to nothing and will fix our lighting problems.&lt;br /&gt;
&lt;br /&gt;
To enable the simultaneous skies, you must add the -noskyfix parameter to your RAD compiler. Now you can hop from one time zone into another!&lt;br /&gt;
&lt;br /&gt;
==global_light_control==&lt;br /&gt;
&lt;br /&gt;
There is a special entity you might be able to use in specific cases when it comes to controling your lights: global_light_control. This entity can change the appearance of all unnamed lights in the entire map. With appearance I mean the custom appearance field (pattern), which can give light an effect like fluorescent flicker, gentle pulse, etc. With custom appearance you can also control the intensity of the lights: &#039;a&#039; is completely dark and &#039;z&#039; is full bright. The default value is &#039;m&#039;.&lt;br /&gt;
&lt;br /&gt;
So imagine your map is mostly set in an outdoor environment and you use lights (like street lamps) to light your night environment. Then if you want to use a day environment, you can trigger the global_light_control entity with the appearance &amp;quot;a&amp;quot; to toggle all lights off. Note that this will toggle ALL unnamed lights, so if you have any indoor lights you wish to remain lit, make sure they have a targetname.&lt;br /&gt;
&lt;br /&gt;
Turning lights on and off can of course also be done simply by giving the outside lights a targetname. However, by giving them a name, they become part of an additional lightstyle. As determined in this tutorial, there is a limit to the amount of lightstyles you can have per face. So if you happen to run into this problem, you can instead use global_light_control to toggle them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:ZzD7tM4.jpg&amp;diff=854</id>
		<title>File:ZzD7tM4.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:ZzD7tM4.jpg&amp;diff=854"/>
		<updated>2023-03-14T12:51:12Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=853</id>
		<title>Mapping/Multiple skies with point light support</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=853"/>
		<updated>2023-03-14T12:47:54Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SC 5.21 added a new entity called trigger_changesky, which allows you to change the skybox texture on the fly. Changing the light of the sky is possible but you&#039;ll run into a few limitations. This tutorial will show you how to work around these problems with a nifty trick. It&#039;ll also go into detail about the nature of environment lights.&lt;br /&gt;
&lt;br /&gt;
==Environment light==&lt;br /&gt;
&lt;br /&gt;
A light_environment entity will cast light from the SKY brush to illuminate brushes, just like any other light entity does. The light information on a brush will be stored in the lightmap. Nearly all models in the game will look below their origin for this light information and take on the colour and intensity of that light. In the screenshot below the player is standing on a red light spot and thus becomes the same shade of red.&lt;br /&gt;
&lt;br /&gt;
A light_environment does something extra: it creates a global light and a vector point. The sky vector point is a point in 3D space where the sky light is coming from. As soon as a model can trace a line to this point, it&#039;ll take on the colour and intensity of the global light. This global light will always override the light info in the lightmap below the model. See the illustration below:&lt;br /&gt;
&lt;br /&gt;
You can experiment with the sky vector and colour by using the sv_skycolor and sv_skyvector commands in your server. However, these cannot be dynamicly changed by map entities.&lt;br /&gt;
&lt;br /&gt;
==Light_spot and -noskyfix==&lt;br /&gt;
&lt;br /&gt;
Having a global light override all your lightmap info can be quite annoying. Imagine a dark map where you&#039;re model is always a dark shade of blue even when you are walking under a spot light. Luckely, there is a way to get rid of it. You can either use the -noskyfix parameter for RAD or use a light_spot instead of a light_environment. Both methods have the same result: they nullify the global light. For this tutorial I&#039;m using the light_spot route, since it&#039;s easier to work with.&lt;br /&gt;
&lt;br /&gt;
Remove the light_enviroment from your map and put in a light_spot. Then set the keyvalue Is Sky? to Yes. (_sky 1). You can give this light the desired colour and intensity and you can also add Ambient light by click on SmartEdit and add the &#039;_diffuse_light&#039; keyvalue with RGB values. It only needs a targetname. I&#039;m calling mine &#039;light1&#039;. You can add a button to the map to target our light and turn it on and off.&lt;br /&gt;
&lt;br /&gt;
==Lighting problems==&lt;br /&gt;
&lt;br /&gt;
There are some issues with this setup, though. For starters, the SKY brush doesn&#039;t hold any lighting information. So if your map has an Osprey flying above a SKY brush, it will be rendered completely black. Or if you have a Xen map, where players jump from island to island: in between the islands their models will become black. Note that models only take lighting info from world geometry. Even though brush entities such as func_walls have lightmaps, the engine will ignore them and look further down below until it hits a world brush and take the light info from that face. If that face happens to be a SKY brush, your model will be black again.&lt;br /&gt;
&lt;br /&gt;
The second problem is that the light_spot is a point light entity and the engine limits the casting range of those to 2048 units. If your model is flying above a world brush higher than 2048 units it will not recieve any more lightmap info.&lt;br /&gt;
&lt;br /&gt;
==The work-around==&lt;br /&gt;
To make sure our models are lit correctly in the skybox, we&#039;ll have to find an invisible brush that can hold the lightmap data. The ZHLT tools provide us with just such a thing: BLACK_HIDDEN. Make sure you have zhlt.wad loaded.&lt;br /&gt;
&lt;br /&gt;
Create a brush over the area of the SKY brush and put the SKIP texture on all sides. Then put the BLACK_HIDDEN on top of this brush. You can cover the entire bottom of the SKY but I&#039;ll advise you to only use it where it&#039;s necessary. These brushes can be very large and it might take a while to calculate lighting on during compilation. Therefore, also scale the texture to 4.00 or 8.00, so the lightmap becomes larger. This will improve compile times a lot and you will not be able to notice the difference, since there is only one gradient of light cast on them anyhow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now compile it and our Apache will have correct lighting above the skybox!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You might notice that if your Apache flies over areas with other lightmap info, it&#039;ll start shifting colour and intensity because it takes on different lightmap info. This can be very undisirable, but there is a fix for it. Create another brush at the top of the skybox and this time put the BLACK_HIDDEN texture on the bottom.&lt;br /&gt;
&lt;br /&gt;
Now go into the properties of the Apache, click SmartEdit and add the keyvalue &#039;effects&#039; with a value of 16. This invokes EF_INVLIGHT, which will cause this entity to search for lightmap info ABOVE the origin (in this case: our new brush). Now our Apache will always use this sky light for its light info.&lt;br /&gt;
&lt;br /&gt;
==Setting up multiple togglable skies==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve found a solution to the lighting issues, we can begin to set up our multiple sky system. NOTE: There is a hard limit of three sky lights. This is because the engine can handle one static light (unnamed light entities) and three dynamic lights (named lights or light with appearance settings). If you add a fourth dynamic light, you&#039;ll get the &amp;quot;too many lightstyles on a face&amp;quot; error. Keep this in mind if you plan to use other dynamic lights in your outside areas. In this case you are better off with just two different skies, so you have one free channel for your other dynamic lights.&lt;br /&gt;
&lt;br /&gt;
-Create three light_spot entities and call them &amp;quot;light1&amp;quot;, &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot;. Give each of them a unique colour. Flag &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot; to Initially Dark.&lt;br /&gt;
-Create three trigger_changesky entities and call them &amp;quot;light1_sky&amp;quot;, &amp;quot;light2_sky&amp;quot; and &amp;quot;light3_sky&amp;quot;. Give each of them a unique sky name. You can find these in the ../gfx/env folder. Flag &amp;quot;All Players&amp;quot; and &amp;quot;Update server&amp;quot; on all three.&lt;br /&gt;
-Create a multimanager and name it &amp;quot;set_light1&amp;quot;.&lt;br /&gt;
-Click on SmartEdit and add &amp;quot;light1_sky&amp;quot; with a value of &amp;quot;0&amp;quot;. This will set the sky for light system 1.&lt;br /&gt;
-Add &amp;quot;light1&amp;quot; with a value of &amp;quot;0#1&amp;quot;. In this case &amp;quot;0&amp;quot; means the delay and &amp;quot;#1&amp;quot; will force it to go ON.&lt;br /&gt;
-Add &amp;quot;light2&amp;quot; with a value of &amp;quot;0#0&amp;quot;. &amp;quot;#0&amp;quot; will force it to go OFF.&lt;br /&gt;
-Add &amp;quot;light3&amp;quot; with a value of &amp;quot;0#0&amp;quot;.&lt;br /&gt;
-Duplicate the multimanger and call it &amp;quot;set_light2&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1_sky&amp;quot; to &amp;quot;light2_sky&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1&amp;quot; value to &amp;quot;0#0&amp;quot; and &amp;quot;light2&amp;quot; to 0#1&amp;quot;. Now this will force light2 to be ON.&lt;br /&gt;
-Duplicate the multimanager again and make similar changes for &amp;quot;light3&amp;quot;.&lt;br /&gt;
-Create a trigger (or button) to target &amp;quot;set_light1&amp;quot;, &amp;quot;set_light2&amp;quot; and &amp;quot;set_light3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now compile and watch your lights change! &lt;br /&gt;
&lt;br /&gt;
==Setting up the multiple simultaneous skies==&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to set up a map where you have two seperate skyboxes at the same time. Imagine a scenario where you travel forward or back in time through a teleporter.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll start by making two rooms with a SKY brush. You can shape them however you like, as long as they are seperate areas that do not connect to one another. Place a light_environment in each of them and create a trigger_teleporter and info_teleport_destination, so you travel from one to the other.&lt;br /&gt;
&lt;br /&gt;
Add two trigger_changesky&#039;s and add the skies of your choice. I&#039;m going with &#039;morning&#039; for one and &#039;night&#039; for the other. I&#039;m giving them the targetnames &#039;morning_sky&#039; and &#039;night_sky&#039;. Now I&#039;m going to adjust the light properties of each light_enviroment to match a morning and a night light. Do not tag any flags. By default the sky will only change for the player who activates it. Finally, go into your Map Properties and set the sky you want to player to begin with.&lt;br /&gt;
&lt;br /&gt;
Go into the info_teleport_destination and in FLAGS, tag &#039;trigger on arrival&#039;. Then in the target field add the sky that should be enabled once you arrive here. The teleport_destination in my night area will target &#039;night_sky&#039; and the teleport_destination in my morning area will target &#039;morning_sky&#039;. You might now have something that resembles this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now here comes trouble: as established earlier in this tutorial, using a light_environment will cause the global light to enable. The engine will take the light information from the light_environment which was placed LAST to use for the global light. In my case that would be night, so even in the morning area, all models will have night lighting. Luckily, there is a work-around: Create a small room with SKY textures and place a light_enviroment in there. Now change the &#039;brightness&#039; to 0 0 0 0. This will set the global light to nothing and will fix our lighting problems.&lt;br /&gt;
&lt;br /&gt;
To enable the simultaneous skies, you must add the -noskyfix parameter to your RAD compiler. Now you can hop from one time zone into another!&lt;br /&gt;
&lt;br /&gt;
==global_light_control==&lt;br /&gt;
&lt;br /&gt;
There is a special entity you might be able to use in specific cases when it comes to controling your lights: global_light_control. This entity can change the appearance of all unnamed lights in the entire map. With appearance I mean the custom appearance field (pattern), which can give light an effect like fluorescent flicker, gentle pulse, etc. With custom appearance you can also control the intensity of the lights: &#039;a&#039; is completely dark and &#039;z&#039; is full bright. The default value is &#039;m&#039;.&lt;br /&gt;
&lt;br /&gt;
So imagine your map is mostly set in an outdoor environment and you use lights (like street lamps) to light your night environment. Then if you want to use a day environment, you can trigger the global_light_control entity with the appearance &amp;quot;a&amp;quot; to toggle all lights off. Note that this will toggle ALL unnamed lights, so if you have any indoor lights you wish to remain lit, make sure they have a targetname.&lt;br /&gt;
&lt;br /&gt;
Turning lights on and off can of course also be done simply by giving the outside lights a targetname. However, by giving them a name, they become part of an additional lightstyle. As determined in this tutorial, there is a limit to the amount of lightstyles you can have per face. So if you happen to run into this problem, you can instead use global_light_control to toggle them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Svencraft&amp;diff=509</id>
		<title>Svencraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Svencraft&amp;diff=509"/>
		<updated>2020-03-25T12:45:03Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Svencraft is the Map Editor for Sven Co-op. It closely resembles Valve Hammer Editor in design and use but comes with additional features. &lt;br /&gt;
&lt;br /&gt;
If you want to use Svencraft, please refer to the guide on [[Setting up the SDK]].&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Svencraft&amp;diff=508</id>
		<title>Svencraft</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Svencraft&amp;diff=508"/>
		<updated>2020-03-25T12:44:12Z</updated>

		<summary type="html">&lt;p&gt;Hezus: Created page with &amp;quot;Svencraft is the Map Editor for Sven Co-op. It closely resembles Valve Hammer Editor in design and use but comes with additional features.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Svencraft is the Map Editor for Sven Co-op. It closely resembles Valve Hammer Editor in design and use but comes with additional features.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Main_Page&amp;diff=507</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Main_Page&amp;diff=507"/>
		<updated>2020-03-25T12:42:35Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the official [[Sven Co-op]] wiki.&lt;br /&gt;
&lt;br /&gt;
== Contents ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This monstrous list is work-in-progress and is here mainly to show the general structure of the wiki. It will be replaced with something fancier later on, once we have a better idea of what the main topics will be (only the top level will be shown here most likely, to keep things nice and tidy).&lt;br /&gt;
&lt;br /&gt;
* [[Real world]]&lt;br /&gt;
** [[Sven Co-op|The Game]]&lt;br /&gt;
*** [[Svengine]]&lt;br /&gt;
*** [[Svencraft]]&lt;br /&gt;
** [[The Team]]&lt;br /&gt;
** [[Change logs]]&lt;br /&gt;
* [[Campaigns]]&lt;br /&gt;
** [[Half-Life]]&lt;br /&gt;
** [[Opposing Force]]&lt;br /&gt;
** [[Blue Shift]]&lt;br /&gt;
** [[They Hunger]]&lt;br /&gt;
* [[Game Modes]]&lt;br /&gt;
** [[Survival Mode]]&lt;br /&gt;
** [[Classic Mode]]&lt;br /&gt;
* [[:Category:Non-player characters|Non-player characters]]&lt;br /&gt;
** [[Allies]]&lt;br /&gt;
** [[Enemies]]&lt;br /&gt;
** [[Neutral]]&lt;br /&gt;
** [[Class Relationship Table|Relationship]]&lt;br /&gt;
* [[:Category:Weapons|Weapons]]&lt;br /&gt;
* [[Maps]]&lt;br /&gt;
** [[Official]]&lt;br /&gt;
* [[Developers]]&lt;br /&gt;
** [[Mapping]]&lt;br /&gt;
** [[Sprites]]&lt;br /&gt;
** [[Models]]&lt;br /&gt;
** [[Skies]]&lt;br /&gt;
** [[:Category:Entities|Entities]]&lt;br /&gt;
*** [[:Category:Point entities|Point entities]]&lt;br /&gt;
*** [[:Category:Brush entities|Brush entities]]&lt;br /&gt;
** [[Angelscript]]&lt;br /&gt;
** [[Console]]&lt;br /&gt;
*** [[Console variables]]&lt;br /&gt;
*** [[Console commands]]&lt;br /&gt;
****[[Impulse commands]]&lt;br /&gt;
** [[Command Line Options]]&lt;br /&gt;
* [[Running a server]]&lt;br /&gt;
** [[Installation]]&lt;br /&gt;
** [[Configuration]]&lt;br /&gt;
** [[Starting a server]]&lt;br /&gt;
** [[Advanced]]&lt;br /&gt;
&lt;br /&gt;
== Getting started with MediaWiki ==&lt;br /&gt;
&lt;br /&gt;
Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User&#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]&lt;br /&gt;
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=506</id>
		<title>Mapping/Multiple skies with point light support</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=506"/>
		<updated>2020-03-25T12:40:14Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SC 5.21 added a new entity called trigger_changesky, which allows you to change the skybox texture on the fly. Changing the light of the sky is possible but you&#039;ll run into a few limitations. This tutorial will show you how to work around these problems with a nifty trick. It&#039;ll also go into detail about the nature of environment lights.&lt;br /&gt;
&lt;br /&gt;
==Environment light==&lt;br /&gt;
&lt;br /&gt;
A light_environment entity will cast light from the SKY brush to illuminate brushes, just like any other light entity does. The light information on a brush will be stored in the lightmap. Nearly all models in the game will look below their origin for this light information and take on the colour and intensity of that light. In the screenshot below the player is standing on a red light spot and thus becomes the same shade of red.&lt;br /&gt;
&lt;br /&gt;
[[File:ZzD7tM4.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
A light_environment does something extra: it creates a global light and a vector point. The sky vector point is a point in 3D space where the sky light is coming from. As soon as a model can trace a line to this point, it&#039;ll take on the colour and intensity of the global light. This global light will always override the light info in the lightmap below the model. See the illustration below:&lt;br /&gt;
&lt;br /&gt;
[[File:PX1Tuhs.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can experiment with the sky vector and colour by using the sv_skycolor and sv_skyvector commands in your server. However, these cannot be dynamicly changed by map entities.&lt;br /&gt;
&lt;br /&gt;
==Light_spot and -noskyfix==&lt;br /&gt;
&lt;br /&gt;
Having a global light override all your lightmap info can be quite annoying. Imagine a dark map where you&#039;re model is always a dark shade of blue even when you are walking under a spot light. Luckely, there is a way to get rid of it. You can either use the -noskyfix parameter for RAD or use a light_spot instead of a light_environment. Both methods have the same result: they nullify the global light. For this tutorial I&#039;m using the light_spot route, since it&#039;s easier to work with.&lt;br /&gt;
&lt;br /&gt;
Remove the light_enviroment from your map and put in a light_spot. Then set the keyvalue Is Sky? to Yes. (_sky 1). You can give this light the desired colour and intensity and you can also add Ambient light by click on SmartEdit and add the &#039;_diffuse_light&#039; keyvalue with RGB values. It only needs a targetname. I&#039;m calling mine &#039;light1&#039;. You can add a button to the map to target our light and turn it on and off.&lt;br /&gt;
&lt;br /&gt;
==Lighting problems==&lt;br /&gt;
&lt;br /&gt;
There are some issues with this setup, though. For starters, the SKY brush doesn&#039;t hold any lighting information. So if your map has an Osprey flying above a SKY brush, it will be rendered completely black. Or if you have a Xen map, where players jump from island to island: in between the islands their models will become black. Note that models only take lighting info from world geometry. Even though brush entities such as func_walls have lightmaps, the engine will ignore them and look further down below until it hits a world brush and take the light info from that face. If that face happens to be a SKY brush, your model will be black again.&lt;br /&gt;
&lt;br /&gt;
[[File:JiP90YY.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The second problem is that the light_spot is a point light entity and the engine limits the casting range of those to 2048 units. If your model is flying above a world brush higher than 2048 units it will not recieve any more lightmap info.&lt;br /&gt;
&lt;br /&gt;
[[File:FIT7n10.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==The work-around==&lt;br /&gt;
To make sure our models are lit correctly in the skybox, we&#039;ll have to find an invisible brush that can hold the lightmap data. The ZHLT tools provide us with just such a thing: BLACK_HIDDEN. Make sure you have zhlt.wad loaded.&lt;br /&gt;
&lt;br /&gt;
Create a brush over the area of the SKY brush and put the SKIP texture on all sides. Then put the BLACK_HIDDEN on top of this brush. You can cover the entire bottom of the SKY but I&#039;ll advise you to only use it where it&#039;s necessary. These brushes can be very large and it might take a while to calculate lighting on during compilation. Therefore, also scale the texture to 4.00 or 8.00, so the lightmap becomes larger. This will improve compile times a lot and you will not be able to notice the difference, since there is only one gradient of light cast on them anyhow.&lt;br /&gt;
&lt;br /&gt;
[[File:6GU8ZT9.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Now compile it and our Apache will have correct lighting above the skybox!&lt;br /&gt;
&lt;br /&gt;
[[File:8i1GaWa.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You might notice that if your Apache flies over areas with other lightmap info, it&#039;ll start shifting colour and intensity because it takes on different lightmap info. This can be very undisirable, but there is a fix for it. Create another brush at the top of the skybox and this time put the BLACK_HIDDEN texture on the bottom.&lt;br /&gt;
&lt;br /&gt;
Now go into the properties of the Apache, click SmartEdit and add the keyvalue &#039;effects&#039; with a value of 16. This invokes EF_INVLIGHT, which will cause this entity to search for lightmap info ABOVE the origin (in this case: our new brush). Now our Apache will always use this sky light for its light info.&lt;br /&gt;
&lt;br /&gt;
==Setting up multiple togglable skies==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve found a solution to the lighting issues, we can begin to set up our multiple sky system. NOTE: There is a hard limit of three sky lights. This is because the engine can handle one static light (unnamed light entities) and three dynamic lights (named lights or light with appearance settings). If you add a fourth dynamic light, you&#039;ll get the &amp;quot;too many lightstyles on a face&amp;quot; error. Keep this in mind if you plan to use other dynamic lights in your outside areas. In this case you are better off with just two different skies, so you have one free channel for your other dynamic lights.&lt;br /&gt;
&lt;br /&gt;
-Create three light_spot entities and call them &amp;quot;light1&amp;quot;, &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot;. Give each of them a unique colour. Flag &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot; to Initially Dark.&lt;br /&gt;
-Create three trigger_changesky entities and call them &amp;quot;light1_sky&amp;quot;, &amp;quot;light2_sky&amp;quot; and &amp;quot;light3_sky&amp;quot;. Give each of them a unique sky name. You can find these in the ../gfx/env folder. Flag &amp;quot;All Players&amp;quot; and &amp;quot;Update server&amp;quot; on all three.&lt;br /&gt;
-Create a multimanager and name it &amp;quot;set_light1&amp;quot;.&lt;br /&gt;
-Click on SmartEdit and add &amp;quot;light1_sky&amp;quot; with a value of &amp;quot;0&amp;quot;. This will set the sky for light system 1.&lt;br /&gt;
-Add &amp;quot;light1&amp;quot; with a value of &amp;quot;0#1&amp;quot;. In this case &amp;quot;0&amp;quot; means the delay and &amp;quot;#1&amp;quot; will force it to go ON.&lt;br /&gt;
-Add &amp;quot;light2&amp;quot; with a value of &amp;quot;0#0&amp;quot;. &amp;quot;#0&amp;quot; will force it to go OFF.&lt;br /&gt;
-Add &amp;quot;light3&amp;quot; with a value of &amp;quot;0#0&amp;quot;.&lt;br /&gt;
-Duplicate the multimanger and call it &amp;quot;set_light2&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1_sky&amp;quot; to &amp;quot;light2_sky&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1&amp;quot; value to &amp;quot;0#0&amp;quot; and &amp;quot;light2&amp;quot; to 0#1&amp;quot;. Now this will force light2 to be ON.&lt;br /&gt;
-Duplicate the multimanager again and make similar changes for &amp;quot;light3&amp;quot;.&lt;br /&gt;
-Create a trigger (or button) to target &amp;quot;set_light1&amp;quot;, &amp;quot;set_light2&amp;quot; and &amp;quot;set_light3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now compile and watch your lights change! &lt;br /&gt;
&lt;br /&gt;
==Setting up the multiple simultaneous skies==&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to set up a map where you have two seperate skyboxes at the same time. Imagine a scenario where you travel forward or back in time through a teleporter.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll start by making two rooms with a SKY brush. You can shape them however you like, as long as they are seperate areas that do not connect to one another. Place a light_environment in each of them and create a trigger_teleporter and info_teleport_destination, so you travel from one to the other.&lt;br /&gt;
&lt;br /&gt;
Add two trigger_changesky&#039;s and add the skies of your choice. I&#039;m going with &#039;morning&#039; for one and &#039;night&#039; for the other. I&#039;m giving them the targetnames &#039;morning_sky&#039; and &#039;night_sky&#039;. Now I&#039;m going to adjust the light properties of each light_enviroment to match a morning and a night light. Do not tag any flags. By default the sky will only change for the player who activates it. Finally, go into your Map Properties and set the sky you want to player to begin with.&lt;br /&gt;
&lt;br /&gt;
Go into the info_teleport_destination and in FLAGS, tag &#039;trigger on arrival&#039;. Then in the target field add the sky that should be enabled once you arrive here. The teleport_destination in my night area will target &#039;night_sky&#039; and the teleport_destination in my morning area will target &#039;morning_sky&#039;. You might now have something that resembles this:&lt;br /&gt;
&lt;br /&gt;
[[File:UX9Oe3C.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Now here comes trouble: as established earlier in this tutorial, using a light_environment will cause the global light to enable. The engine will take the light information from the light_environment which was placed LAST to use for the global light. In my case that would be night, so even in the morning area, all models will have night lighting. Luckily, there is a work-around: Create a small room with SKY textures and place a light_enviroment in there. Now change the &#039;brightness&#039; to 0 0 0 0. This will set the global light to nothing and will fix our lighting problems.&lt;br /&gt;
&lt;br /&gt;
To enable the simultaneous skies, you must add the -noskyfix parameter to your RAD compiler. Now you can hop from one time zone into another!&lt;br /&gt;
&lt;br /&gt;
[[File:Vbkmosl.jpg|400px]]&lt;br /&gt;
[[File:VKMrcEM.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==global_light_control==&lt;br /&gt;
&lt;br /&gt;
There is a special entity you might be able to use in specific cases when it comes to controling your lights: global_light_control. This entity can change the appearance of all unnamed lights in the entire map. With appearance I mean the custom appearance field (pattern), which can give light an effect like fluorescent flicker, gentle pulse, etc. With custom appearance you can also control the intensity of the lights: &#039;a&#039; is completely dark and &#039;z&#039; is full bright. The default value is &#039;m&#039;.&lt;br /&gt;
&lt;br /&gt;
So imagine your map is mostly set in an outdoor environment and you use lights (like street lamps) to light your night environment. Then if you want to use a day environment, you can trigger the global_light_control entity with the appearance &amp;quot;a&amp;quot; to toggle all lights off. Note that this will toggle ALL unnamed lights, so if you have any indoor lights you wish to remain lit, make sure they have a targetname.&lt;br /&gt;
&lt;br /&gt;
Turning lights on and off can of course also be done simply by giving the outside lights a targetname. However, by giving them a name, they become part of an additional lightstyle. As determined in this tutorial, there is a limit to the amount of lightstyles you can have per face. So if you happen to run into this problem, you can instead use global_light_control to toggle them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=505</id>
		<title>Mapping/All about info nodes</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=505"/>
		<updated>2020-03-25T12:39:57Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide teaches you all about the usage of info_nodes. There is actually a bit more to it than just tossing a few of them into your map, so here we go:&lt;br /&gt;
&lt;br /&gt;
==What is a node?==&lt;br /&gt;
A node is a nagivation point used by the AI to help them move around in your map. You might have seen the message &amp;quot;&#039;&#039;Rebuilding Node Graph&#039;&#039;&amp;quot; when loading up a new map. At this stage the engine is creating a network of lines between all nodes, so monsters and NPCs know where valid paths are from one node to another.&lt;br /&gt;
&lt;br /&gt;
==Nodes and AI==&lt;br /&gt;
Even without the nodes, the AI in the Goldsrc engine knows how to walk through 3D space and navigate around small objects. The AI has been improved in Sven Co-op over the years and is even better at navigating on its own. However, it still relies on nodes to find its way through more complicated scenarios and execute its AI behaviour.&lt;br /&gt;
&lt;br /&gt;
This first example scenario puts the Zombie behind the counter. It will want to walk towards the player but it will fail since it can&#039;t determine a clear path. The AI might be smart enough to navigate past smaller objects but this large counter is too much for it to handle.&lt;br /&gt;
&lt;br /&gt;
[[File:NmcnQdj.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add some info_nodes (yellow squares). These points will generate a network of paths for the Zombie to take. As soon as it spots the player and it can&#039;t directly engage him, it will look to the node network for guidance and determine the fastest path from its current node to the node the player is currently closest to (indicated by the red line).&lt;br /&gt;
&lt;br /&gt;
[[File:Tc1vzny.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Another example of the usage of nodes is to help the AI execute its special behaviour. The AI code of this Grunt for instance, tells it to find cover when it is taking damage. It will look to the node network to find this spot, so I&#039;ve placed a strategic node behind the sandbag.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyqp87F.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Node Networks==&lt;br /&gt;
As we&#039;ve established, nodes are important for the AI to function properly. But how is the network built? The engine will determine if there is a straight visual line between two nodes and if there is, a link is made. I&#039;ve placed four nodes in this room, and the links will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:VV1RNjq.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can actualy see these links in game. Walk to a spot where you know a node is at and type &#039;&#039;&#039;impulse 199&#039;&#039;&#039; into the console. This will show you all links for this node for a limited amount of time. Mind that it will only show this information for nodes you are close enough to, it will not show you the network for the entire map.&lt;br /&gt;
&lt;br /&gt;
[[File:NSCSirg.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
A single node can hold very many link to the rest of the network. As long as there is a possible line of sight, there shall be another link.&lt;br /&gt;
&lt;br /&gt;
[[File:Wu17QvH.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The visibility between the nodes can be blocked by solid world geometry and also by func_walls, &#039;&#039;&#039;as long as the wall is higher than 32 units.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:KhV5Z2u.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The point where the node will be created will always float at 32 units above ground level, so if a wall is 32 units or lower there will be a link. The engine will also create links through non-solid brushes no matter how high they are.&lt;br /&gt;
&lt;br /&gt;
[[File:KsdYcxT.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Four different types==&lt;br /&gt;
Now we know how the network is built, we can expand on this knowledge by introducing the different types of monsters. There are four types:&lt;br /&gt;
*Small sized (Headcrab, Chumtoad, etc)&lt;br /&gt;
*Normal sized (Zombie, Grunt, etc)&lt;br /&gt;
*Large sized (Gargantua, Bullsquid, etc)&lt;br /&gt;
*Flying (Alien Controller, Stukabat, etc)&lt;br /&gt;
&lt;br /&gt;
When the node network is built, it will also determine if a certain monster type can actually use the paths. A passage might be too small for a Large sized creature, so it will not establish a usable link between the nodes. You can highlight the different types by use of the other impulse commands. Small creatures will use the default path visible with &#039;&#039;impulse 199&#039;&#039;, &#039;&#039;impulse 197&#039;&#039; will show you the paths for Normal sized creatures, &#039;&#039;impulse 196&#039;&#039; for Large sized Creatures and &#039;&#039;impulse 195&#039;&#039; for all airborne creatures (more on them later!).&lt;br /&gt;
&lt;br /&gt;
In the following example you can see how the node network for Normal sized creatures (highlighted as a pink beam) doesn&#039;t extend under the low beam, because the brush blocks the way. Small sized creatures would however be able to crawl under it and use the default node link to find their way.&lt;br /&gt;
&lt;br /&gt;
[[File:4eJNF4S.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==How to properly place info_nodes==&lt;br /&gt;
Now that we know how the node network works, we can move on to placing our nodes. What are good practises to get the most out of our nodes?&lt;br /&gt;
&lt;br /&gt;
When the map starts, all info_node entities will fall to ground level, so it does not matter how high above the ground you place them. Node points will always be created 32 units above the ground where you place your info_node entity. Just make sure that the origin on the info_node is not inside the floor because this might cause the engine to overlook them.&lt;br /&gt;
&lt;br /&gt;
[[File:CQZrkhs.png|400px]]&lt;br /&gt;
&lt;br /&gt;
So where to place your nodes? We&#039;ve seen that AI can get into trouble whenever there is an obstacle or no clear line between it and the player. So it&#039;s good to add a few nodes to help them navigate around (green). You can see those nodes at the door and around the counter. Next to that it&#039;s good to place a few &#039;anchor points&#039; (blue) in the room. This will give the AI a starting point to navigate from and it can serve as a spot for special AI behaviour (such as the Grunt running for cover earlier).&lt;br /&gt;
&lt;br /&gt;
[[File:WlKqghy.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Some guides might tell you to place an info_node every X units. This is not strictly necessary. The engine also doesn&#039;t require it. You can place two nodes at a distance of 9000 units from eachother and they will still create a link, as long as they have a line of sight to eachother. You just have to place enough nodes for the AI to have enough anchor points. If you do not have enough, you might encounter undesirable AI behaviour. For instance, if the node a Grunt is falling back to is too far away, it will not resume its normal behavior for a long time. If the node is closer, it will then decide on a new course of action once it has reached the node.&lt;br /&gt;
&lt;br /&gt;
As mentioned before, nodes will only create a link where there is a visual line of sight between two nodes. Luckily, it ignores movable brush entities, such as func_doors, so you can place this door in between the nodes and there still will be a link.&lt;br /&gt;
&lt;br /&gt;
[[File:GKabYUx.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The nodes will link through most brush entities that are movable, such as func_train, func_rotating, func_button, but also func_breakables. Next to that it will go through all non-solid entities such as func_illusionary and everything that uses zhlt_noclip 1.&lt;br /&gt;
&lt;br /&gt;
==info_node_air==&lt;br /&gt;
Airborne monsters use a special type of node called the info_node_air. Just as regular info_nodes, these are used for navigation and AI behaviour. However, you might find that airborne monsters are not as good as finding their way to the player as land creatures, since they also have to navigate in upward and downward directions. Info_node_air will not drop down to ground level and info_node_air and info_node will not create links to eachother.&lt;br /&gt;
&lt;br /&gt;
Especially the Alien Controller will hardly move on its own without the help of air nodes. To make sure it will float down or up to engage players on their level, you&#039;ll need enough air nodes on that same level. Without these, the Alien Controller will just hover there, not knowing how to get to the player under the ledge. So when you use these monsters, it&#039;s good to place extra nodes.&lt;br /&gt;
&lt;br /&gt;
[[File:BoVrm08.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other flying creatures that use the air nodes are the Stukabat and the Flyer Flock but also swimming creatures make use of them, such as the Leech and the Ichthyosaur. So make sure you place enough info_node_air entities in the waters that house them.&lt;br /&gt;
&lt;br /&gt;
[[File:AHxgxAw.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Apache and the Osprey technically also use the air nodes network for navigation, however, the Osprey will only function with path_corners to guide it (the game crashes without). The Apache will use air nodes to find its way to the player but isn&#039;t very good at it and will just wierdly wobble after the player. Setting up a network of path_corners for the Apache will make it behave far more realisticly and it will then require no air nodes for its navigation.&lt;br /&gt;
&lt;br /&gt;
==Less is more==&lt;br /&gt;
As we&#039;ve established, you just need enough nodes for the monsters to find their way around. But often maps are littered with nodes that serve hardly any function at all. The example below shows you the route (red line) the Grunt has to take to find its way to the player. It only needs those four nodes to get there, so each node in between is just an extra unneccesary step. So if we remove all of those and leave a few nodes as anchor points for navigation and AI behaviour, we can do with almost a third of the nodes we started with.&lt;br /&gt;
&lt;br /&gt;
[[File:UBuzlT1.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Having less nodes is good in multiple ways. First, it uses up less entity slots (which are limited). Secondly, it makes the node graph calculation faster and finally, it makes the node network far less complex. This can benefit the performance of your map, since each monster has to do route calculations. For only a handfull of monsters this will not be a problem but imagine a large map with many active roaming enemies accessing the node network constantly.&lt;br /&gt;
&lt;br /&gt;
==Misc. info==&lt;br /&gt;
In Sven Co-op, the info_node entity also has an Activity and Hint type keyvalue. These currently have no function. Judging from the source code, Valve planned to put extra information into nodes, so the AI could use them for specific purposes. Imagine a node that suggests to a Grunt that this is a place to find cover. These hint nodes actually ended up being used in Half-Life 2. In HL1 the code for hint nodes is only found for the Houndeye, where it can investigate buzzing machinery and blinking lights.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=504</id>
		<title>Mapping/Setting Up Survival Mode</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=504"/>
		<updated>2020-03-25T12:39:36Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Survival mode offers an interesting alternative to the typical spawn-die-respawn-repeat gameplay of many Sven Co-op maps. About 30 seconds after the map starts it disables spawn points, and any players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
Everything that a mapper or server operator needs to enable survival mode comes packaged with Sven Co-op by default. You can add survival mode to any map, regardless of whether or not you are an experienced level designer. This guide explains the process.&lt;br /&gt;
&lt;br /&gt;
Setting up survival mode in a map involves two steps:&lt;br /&gt;
#Enabling the survival mode script&lt;br /&gt;
#Placing respawn checkpoints&lt;br /&gt;
&lt;br /&gt;
==Enabling the &amp;quot;Survival Mode&amp;quot; script for a map==&lt;br /&gt;
&lt;br /&gt;
Find the map&#039;s CFG file in the svencoop/maps folder. It should have the same name as the BSP file. If the file doesn&#039;t exist, just make a new TXT file with the name of the BSP and rename the extension to &#039;cfg&#039;.&lt;br /&gt;
&lt;br /&gt;
In the CFG file, add the line:&lt;br /&gt;
:&#039;&#039;map_script survival_generic&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tells the map to load scripts/maps/survival_generic.as on startup.&lt;br /&gt;
&lt;br /&gt;
This script also runs Survival.as, which lays down gameplay rules for survival mode, and point_checkpoint.as, which gives checkpoint entities their functionality.&lt;br /&gt;
&lt;br /&gt;
With these scripts enabled, about 30 seconds after the map starts, respawning will be disabled and all players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
[[File:Cfg_01_runscript.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Map Editor(for custom maps)==&lt;br /&gt;
&lt;br /&gt;
To use the respawn point entity you must first add the survival.fgd file to the editor&#039;s configuration. This file can be found in &#039;&#039;\svencoop\scripts\maps\fgd&#039;&#039;. Restart the editor and find &#039;&#039;point_checkpoint&#039;&#039; in the list.&lt;br /&gt;
&lt;br /&gt;
[[File:Hammer_800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
All of the checkpoint entities in Sven Co-op&#039;s Half-Life maps are 48 units off of the ground, and will hover in the air at any height that you place them.&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Ripent (for already-compiled maps)==&lt;br /&gt;
&lt;br /&gt;
Ripent is a very powerful tool that allows server operators to customize a map without forcing players to redownload the bsp, and will not result in &amp;quot;Map differs from server&amp;quot; errors when a player who already has the unmodified version of the map tries to connect to the server. This is the method that was utilized to place checkpoints in sc_another and YABMA, as the map source files are not available. Ripent allows you to export a map&#039;s entity data, modify it, and put it back into the map. Sven Co-op includes Ripent.exe in the svencoop/maps folder.&lt;br /&gt;
&lt;br /&gt;
Because it requires a command prompt to operate, I prefer to use batch files to export/import the entity data. Setting this up allows you to drag and drop a BSP or ENT file onto the batch file and convert the files without typing a bunch of stuff into a command prompt. It is also a good idea to make a separate &#039;ripent&#039; folder, containing ripent.exe, your batch files, and whatever ENT or modified BSP files you&#039;re working on. Otherwise they just get mixed up in the maps folder.&lt;br /&gt;
&lt;br /&gt;
In the same folder as ripent.exe, make a batch (.BAT) file to export the map&#039;s entity data to a .ENT file. Below is an example of my &#039;export&#039; batch file, named &amp;quot;BSP_2_ENT.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -export %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Drag and drop the desired BSP file onto this batch file to export it to an ENT file. In this case, I&#039;m adding checkpoints to svencoop1.bsp.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat_export.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Next, open the ENT file in a text editor.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 01.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The ENT file is literally a text list of every single entity in the map and all of their keyvalues. You can change any existing entity or add new ones. The only restriction is that you cannot add new brush models to a map that has already been compiled. You can only re-use brush models that are already in the map. But, since we&#039;re only adding checkpoints, that doesn&#039;t matter to us.&lt;br /&gt;
&lt;br /&gt;
All you need to do now is insert &amp;quot;point_checkpoint&amp;quot; entities. First, though, you need to find coordinates where you&#039;d like to add a checkpoint. Play through the map and find events where a lot of players might typically die. It is generally a good idea to place checkpoints after these events. When you reach a good checkpoint position, enter &amp;quot;status&amp;quot; into the console to get the coordinates where you&#039;re going to place the checkpoint.&lt;br /&gt;
&lt;br /&gt;
[[File:Console 01 coordinates.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can see the X-Y-Z coordinates of your position on the &#039;map&#039; line. Scroll down to the bottom of the ENT file and add the following:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;{&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;origin&amp;quot; &amp;quot;[X] [Y] [Z]&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;classname&amp;quot; &amp;quot;point_checkpoint&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;}&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Where [X] [Y] [Z] are the coordinates, without the [] brackets.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re done adding checkpoints, make a batch file to import the map&#039;s entity data from the .ENT file back into the .BSP. Below is an example of my &#039;import&#039; batch file, named &amp;quot;ENT_2_BSP.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -import %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure the BSP is in the same folder as the ENT file, then drag and drop the ENT file into the import batch file.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat import.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The BSP file should now have a checkpoint entity at the coordinates specified in the ENT file. Load it up in-game to check.&lt;br /&gt;
&lt;br /&gt;
[[File:Svencoop1-2016-01-30-0013 800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Map Configuration File CVARs==&lt;br /&gt;
Several CVARs are available for map configuration files that can be used to control the behavior of Survival Mode when a map starts or ends.&lt;br /&gt;
&lt;br /&gt;
*mp_survival_supported - If set to &#039;1&#039;, this tells the game that Survival Mode is supported by the map. This enables Survival Mode voting and toggling capabilities.&lt;br /&gt;
*mp_survival_starton - If set to &#039;1&#039;, Survival Mode will auto-start after the map loads. If set to &#039;0&#039;, Survival Mode will be &#039;off&#039; when the map starts. This is useful for maps that want to turn Survival Mode on at a later point in the map.&lt;br /&gt;
*mp_survival_startdelay - Delay (in seconds) before survival mode starts.&lt;br /&gt;
*mp_survival_nextmap - Specifies the name of the next survival map in a series. This is useful if you have multiple maps in a series where Survival Mode settings should be carried across level changes.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Sentences_Replacement_Guide&amp;diff=503</id>
		<title>Mapping/Sentences Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Sentences_Replacement_Guide&amp;diff=503"/>
		<updated>2020-03-25T12:39:08Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sentence replacement has been possible for many long years through Global Sound Replacement but it&#039;s also possible to make your own sentences. This is how it&#039;s done!&lt;br /&gt;
&lt;br /&gt;
==What are sentences?==&lt;br /&gt;
The sentences.txt (or default_sentences.txt) file handles all speech and sounds within the game. For instance:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;OT_ANSWER0 otis/yes&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using &#039;OT_ANSWER0&amp;quot; will make Otis use the yes.wav file stored in ../svencoop/sound/otis/.&lt;br /&gt;
&lt;br /&gt;
Another example is the intercom announcer:&lt;br /&gt;
:&#039;&#039;C1A1_0 bizwarn bizwarn bizwarn warning, high energy detonation detected in materials lab&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you can see, you can create full sentences with seperate words, as long as they have a corresponding .wav file. And it&#039;s not limited to words. It will play whatever is stored in the .wav file. You can also add a comma (,) to make the speaker pause for a second.&lt;br /&gt;
&lt;br /&gt;
==How to make your own sentences?==&lt;br /&gt;
Since the default_sentences.txt is used by the game, you should not edit it. It&#039;s better to make your own! Create a text file and the following line to it:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;SECTORSEC vox/doop, sector secured&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you can see, it uses the doop.wav, sector.wav and secured.wav from the ../sound/vox/ folder to create a sentence. Save your file as &#039;mymap_sentences.txt&#039; and store it in ../svencoop/sound/mymap/.&lt;br /&gt;
&lt;br /&gt;
Now, open your maps&#039; CFG file and add this line to it:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;sentence_file sound/mymap/mymap_sentences.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will now point the game towards your custom sentence file.&lt;br /&gt;
&lt;br /&gt;
==How to put them ingame?==&lt;br /&gt;
Open your map and add an &#039;ambient_generic&#039; entity. Give it a targetname and in the &#039;Sound File&#039; field type: !SECTORSEC .Make sure you start with an exclamation mark (!) so the engine knows it is loading that sound from a sentence.txt file.&lt;br /&gt;
&lt;br /&gt;
To make sure my sound is only heard after triggering it and everywhere in the map, I&#039;ll check the &#039;Play Everwhere&#039; and &#039;Start Silent&#039; flags. Now set up a button/trigger targeting your ambient_generic and the intercom will speak your custom sentence.&lt;br /&gt;
&lt;br /&gt;
You can also do this with NPCs such as scientists, so they will lipsync your custom sentence. To do this, you must use a &#039;scripted_sentence&#039; entity. Give it a targetname (scientist1_speak), in &#039;Sentence Name&#039; add your custom sentence starting with a ! (!LEAVEBRITNEYALONE), and in &#039;Speaker Type&#039; use the name of the NPC you want to use (scientist).&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to put custom sentences for using and unusing NPCs. Just add your custom sentence to the &#039;Use Sentence&#039; (!DOYOUWANTTOBUILDASNOWMAN) and &#039;Un-use Sentence&#039; (!OKBYE). Note that this is only applies to friendly units.&lt;br /&gt;
&lt;br /&gt;
Lastly, you can replace existing sentences. If you want your scientist to have different screams than the default ones, you can use Global Sound Replacement. More info on that here.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*Never start your sentence names with symbols or numbers. The game will not be able to find them.&lt;br /&gt;
*Save your custom sentence file in ANSI format. By default Windows saves .txt files in UTF-8, but the game engine can&#039;t read that format.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Model_Replacement_Guide&amp;diff=502</id>
		<title>Mapping/Model Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Model_Replacement_Guide&amp;diff=502"/>
		<updated>2020-03-25T12:38:52Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What is Model Replacement?==&lt;br /&gt;
Model replacements allows you to replace a model with something else on a global basis. This is useful for well themed maps to easily use alternative models for weapons, without having to define the model for each weapon/ammo entity you put in your maps. You can replace models globally and locally.&lt;br /&gt;
&lt;br /&gt;
==How to set up Global Model Replacement==&lt;br /&gt;
&lt;br /&gt;
1. Create a GMR file in the &amp;quot;maps&amp;quot; folder matching a map name (eg. mymap.gmr).&lt;br /&gt;
&lt;br /&gt;
2. Copy and paste groups of weapon models into the file. In this example I&#039;m replacing the crowbar model with a custom candy cane model.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;models/p_crowbar.mdl&amp;quot; &amp;quot;models/christmas/p_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/v_crowbar.mdl&amp;quot; &amp;quot;models/christmas/v_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/w_crowbar.mdl&amp;quot; &amp;quot;models/christmas/w_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Open or create the map CFG file (eg. mymap.cfg) in the &amp;quot;maps&amp;quot; folder and add this line to the end for your map:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;globalmodellist ../../maps/mymap.gmr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Save both the GMR and CFG file and load up your map.&lt;br /&gt;
&lt;br /&gt;
==How to set up Local Model Replacement==&lt;br /&gt;
Each individual entity can also have a custom model by simply adding the path to the custom model in the &#039;Custom Model&#039; field of the entity. This Barney for example now uses the Blue Shift model.&lt;br /&gt;
&lt;br /&gt;
[[File:Barney.png|400px]]&lt;br /&gt;
&lt;br /&gt;
For weapons you can select custom models for p_, w_ and v_ models.&lt;br /&gt;
&lt;br /&gt;
==Using Global Model Replacement to free up resources==&lt;br /&gt;
&lt;br /&gt;
It can also be used to strip out default weapon models for maps that have the &amp;quot;512 model limit exceeded&amp;quot; crash upon loading. You can take out weapon models that aren&#039;t used in the map to free up some model precache slots. In the following example I&#039;m not using the Egon, so I&#039;m going to replace it with the not-precached model.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;models/p_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/v_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/w_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
* In the CFG file using &amp;quot;../../&amp;quot; is important, as the working directory doesn&#039;t start at &amp;quot;svencoop&amp;quot;.&lt;br /&gt;
* You also need to use the quotation marks &amp;quot; &amp;quot;.&lt;br /&gt;
* You cannot use comments (// or ##) in the GMR file.&lt;br /&gt;
* Be aware that you should not take out remove donor specific models just because you don&#039;t expect any donors to be joining your server.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Sound_Replacement_Guide&amp;diff=501</id>
		<title>Mapping/Sound Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Sound_Replacement_Guide&amp;diff=501"/>
		<updated>2020-03-25T12:38:40Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What is Sound Replacement?==&lt;br /&gt;
&lt;br /&gt;
Sven Co-op features coding that allows for the mapper (and server-side) replacement of sounds in monsters and global entities. This works by using a file that overrides the default sound file paths and directs the game to use one sound instead of another. Sounds can be replaced globally and locally.&lt;br /&gt;
&lt;br /&gt;
==How to set up Global Sound Replacement?==&lt;br /&gt;
1. Create a GSR file in the &amp;quot;maps&amp;quot; folder matching your maps name (eg. mymap.gsr).&lt;br /&gt;
&lt;br /&gt;
2. Type the desired sounds into the file. In this example I&#039;ve replaced the crowbar model with a knife model and I want to replace the crowbar sounds with their knife counterparts.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_hit1.wav&amp;quot; &amp;quot;weapons/knife_hit_wall1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_hit2.wav&amp;quot; &amp;quot;weapons/knife_hit_wall2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_miss1.wav&amp;quot; &amp;quot;weapons/knife1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_miss2.wav&amp;quot; &amp;quot;weapons/knife2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_miss1.wav&amp;quot; &amp;quot;weapons/knife3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod1.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod2.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod3.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hit1.wav&amp;quot; &amp;quot;weapons/knife_hit_wall1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hit2.wav&amp;quot; &amp;quot;weapons/knife_hit_wall2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Open or create the map CFG file (eg. mymap.cfg) in the &amp;quot;maps&amp;quot; folder and add this line to the end for your map:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;globalsoundlist ../../maps/mymap.gsr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Save both the GMR and CFG file and load up your map.&lt;br /&gt;
&lt;br /&gt;
==How to set up Local Sound Replacement?==&lt;br /&gt;
If you want to change the sounds to a specific monster you can do so via Local Sound Replacement.&lt;br /&gt;
&lt;br /&gt;
1. Go into the &amp;quot;sound&amp;quot; folder and create a new folder which has the same name as your BSP file (eg. mymap.bsp =&amp;gt; /sound/mymap/)&lt;br /&gt;
&lt;br /&gt;
2. Create a TXT file for this monster and add the lines for your desired sound replacement. I&#039;m going to replace the Alien Slave sounds with the Skeleton from They Hunger. My file name will be &#039;&#039;hungerslave.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert1.wav&amp;quot; &amp;quot;hungerslave/slv_alert1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert3.wav&amp;quot; &amp;quot;hungerslave/slv_alert3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert4.wav&amp;quot; &amp;quot;hungerslave/slv_alert4.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_die1.wav&amp;quot; &amp;quot;hungerslave/slv_die1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_die2.wav&amp;quot; &amp;quot;hungerslave/slv_die2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_pain1.wav&amp;quot; &amp;quot;hungerslave/slv_pain1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_pain2.wav&amp;quot; &amp;quot;hungerslave/slv_pain2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word1.wav&amp;quot; &amp;quot;hungerslave/slv_word1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word2.wav&amp;quot; &amp;quot;hungerslave/slv_word2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word3.wav&amp;quot; &amp;quot;hungerslave/slv_word3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word4.wav&amp;quot; &amp;quot;hungerslave/slv_word4.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word5.wav&amp;quot; &amp;quot;hungerslave/slv_word5.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word6.wav&amp;quot; &amp;quot;hungerslave/slv_word6.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word7.wav&amp;quot; &amp;quot;hungerslave/slv_word7.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word8.wav&amp;quot; &amp;quot;hungerslave/slv_word8.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_IDLE0&amp;quot; &amp;quot;hungerslave/slv_word1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_ALERT0&amp;quot; &amp;quot;hungerslave/slv_alert1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_ALERT3&amp;quot; &amp;quot;hungerslave/slv_word2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Go into the entity properties and the name of the TXT file to the &#039;Sound Replacement File&#039; field. Since the folder and BSP names are the same, the engine doesn&#039;t need you to specify any paths here.&lt;br /&gt;
&lt;br /&gt;
[[File:Hungerslave.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*As seen from the example of local replacement, you can also directly replace sentences from the sentences.txt file, however some sentence files are made up of more than one wav file, it is not possible to replace the file with more than one wav file.&lt;br /&gt;
*For weapons, only crowbar and wrench sounds can be sound replaced, this is due to all other weapons being client-side, there is an option for setting a sound replacement file in all weapon entities, but this only works for the weapon_wrench and weapon_crowbar.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Materials_Replacement_Guide&amp;diff=500</id>
		<title>Mapping/Materials Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Materials_Replacement_Guide&amp;diff=500"/>
		<updated>2020-03-25T12:38:09Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Next to models, sounds and sentences, you can also create a custom materials.txt file for your own WAD.&lt;br /&gt;
&lt;br /&gt;
==What is materials.txt?==&lt;br /&gt;
Materials.txt is a file found in the &#039;/sound&#039; folder. This file keeps track of which type of footstep sound should be played on which texture. There are different types of material classifications:&lt;br /&gt;
&lt;br /&gt;
*metal (M)&lt;br /&gt;
*ventilation (V)&lt;br /&gt;
*dirt (D)&lt;br /&gt;
*slosh liquid (S)&lt;br /&gt;
*tile (T)&lt;br /&gt;
*grate (G)&lt;br /&gt;
*wood (W)&lt;br /&gt;
*computer (P)&lt;br /&gt;
*glass (Y)&lt;br /&gt;
*flesh (F)&lt;br /&gt;
*snow (O)&lt;br /&gt;
*concrete (is used by default)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a line you will find in the default materials.txt file:&lt;br /&gt;
&lt;br /&gt;
: M LAB3_FLR2B&lt;br /&gt;
&lt;br /&gt;
This means that the texture &#039;LAB3_FLR2B&#039; will use the metallic (M) footstep sounds.&lt;br /&gt;
&lt;br /&gt;
==How to assign your own materials?==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Method 1&#039;&#039;&lt;br /&gt;
This is the most simple one: You can use these prefixes to enable the correct sounds for your textures. So if you name your custom texture &amp;quot;WOODTEXTURE_WD1&amp;quot; the game will play the correct footstep sounds for wooden surfaces. Here is the full list of prefixes:&lt;br /&gt;
&lt;br /&gt;
*VENTTEXTURE_&lt;br /&gt;
*DIRTTEXTURE_&lt;br /&gt;
*GRATETEXTURE&lt;br /&gt;
*METALTEXTURE&lt;br /&gt;
*SLOSHTEXTURE&lt;br /&gt;
*TILETEXTURE_&lt;br /&gt;
*WOODTEXTURE_&lt;br /&gt;
*COMPTEXTURE_&lt;br /&gt;
*GLASSTEXTURE&lt;br /&gt;
*FLESHTEXTURE&lt;br /&gt;
*SNOWTEXTURE_&lt;br /&gt;
&lt;br /&gt;
Note that textures names can&#039;t be longer than 16 characters (WAD format limitation). This considerably limits the amount of characters you have left to name your textures while using method 1. Therefore, I&#039;d advice you to use method 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Method 2&#039;&#039;&lt;br /&gt;
Method 2 can be handy if you don&#039;t like long texture file names (because of the prefixes) or you are using a WAD file of which you can&#039;t change the texture names (because it&#039;s shared with other maps). Add lines with the right letter (accoring to the classifications above) and the name of your textures. For instance:&lt;br /&gt;
&lt;br /&gt;
# Create a new folder in the &#039;/sound&#039; folder. You can use whatever name you like. I&#039;m going to call mine &#039;mymap&#039;.&lt;br /&gt;
# In this new folder, create a file called &#039;mymap_materials.txt&#039;. Make sure to save it in ANSI format. Windows uses UTF-8 as default, which the engine can&#039;t read properly.&lt;br /&gt;
# Add your material classifications, according the the list above. Here are some examples: W PLANKS1  /  S WATER_DIRT1A  /  M METAL_BORD2&lt;br /&gt;
# In the &#039;/maps&#039; folder, create (or edit) your map&#039;s CFG file (mymap.cfg). The CFG file needs to have the same name as the BSP file.&lt;br /&gt;
# Then add the following line to the CFG file and save it.&lt;br /&gt;
:&#039;&#039;materials_file ../mymap/mymap_materials.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*Do NOT edit the default materials.txt file found in the &#039;/sound&#039; folder. This one is used for Half-Life WADs and official maps. Supplying a modified version of this file with your map may cause conflicts. Plus, your file might be overridden in the next update of SvenCo-op, rendering your work useless.&lt;br /&gt;
*The system only uses the first 12 characters from each texture entry. This means that you could create bundles of textures which start with the same first 12 characters and let them all have the same sound. If you add &amp;quot;M HEAVYMETAL00&amp;quot; to the materials.txt file, it will also apply the metallic footstep sounds to the textures such as: &amp;quot;HEAVYMETAL00_FLOOR&amp;quot;, &amp;quot;HEAVYMETAL00_BORD&amp;quot;, &amp;quot;HEAVYMETAL00_CEIL&amp;quot;, etc. This is what makes Method 1 (described above) possible.&lt;br /&gt;
*Prefixes (such as +1,-1, ~, +A) are ignored by this system. So &amp;quot;M HEAVYMETAL00&amp;quot; will also work for +1HEAVYMETAL, ~HEAVYMETAL, +AHEAVYMETAL, etc.&lt;br /&gt;
*The materials.txt file cannot be used to use the ladder climbing sound (func_ladder) or the wading sound when players are walking knee high through a liquid (func_water).&lt;br /&gt;
*You cannot assign the concrete sound type, since this is used by default. So if you want this sound, don&#039;t add those textures to the materials.txt file.&lt;br /&gt;
*The engine can not load more than 2048 texture material definitions in total. The current default materials.txt file has around 1550 entries, so you can safely add up to 500 lines to your own custom file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Materials_Replacement_Guide&amp;diff=499</id>
		<title>Mapping/Materials Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Materials_Replacement_Guide&amp;diff=499"/>
		<updated>2020-03-25T12:37:53Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Next to models, sounds and sentences, you can also create a custom materials.txt file for your own WAD.&lt;br /&gt;
&lt;br /&gt;
==What is materials.txt?==&lt;br /&gt;
Materials.txt is a file found in the &#039;/sound&#039; folder. This file keeps track of which type of footstep sound should be played on which texture. There are different types of material classifications:&lt;br /&gt;
&lt;br /&gt;
*metal (M)&lt;br /&gt;
*ventilation (V)&lt;br /&gt;
*dirt (D)&lt;br /&gt;
*slosh liquid (S)&lt;br /&gt;
*tile (T)&lt;br /&gt;
*grate (G)&lt;br /&gt;
*wood (W)&lt;br /&gt;
*computer (P)&lt;br /&gt;
*glass (Y)&lt;br /&gt;
*flesh (F)&lt;br /&gt;
*snow (O)&lt;br /&gt;
*concrete (is used by default)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a line you will find in the default materials.txt file:&lt;br /&gt;
&lt;br /&gt;
: M LAB3_FLR2B&lt;br /&gt;
&lt;br /&gt;
This means that the texture &#039;LAB3_FLR2B&#039; will use the metallic (M) footstep sounds.&lt;br /&gt;
&lt;br /&gt;
==How to assign your own materials?==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Method 1&#039;&#039;&lt;br /&gt;
This is the most simple one: You can use these prefixes to enable the correct sounds for your textures. So if you name your custom texture &amp;quot;WOODTEXTURE_WD1&amp;quot; the game will play the correct footstep sounds for wooden surfaces. Here is the full list of prefixes:&lt;br /&gt;
&lt;br /&gt;
*VENTTEXTURE_&lt;br /&gt;
*DIRTTEXTURE_&lt;br /&gt;
*GRATETEXTURE&lt;br /&gt;
*METALTEXTURE&lt;br /&gt;
*SLOSHTEXTURE&lt;br /&gt;
*TILETEXTURE_&lt;br /&gt;
*WOODTEXTURE_&lt;br /&gt;
*COMPTEXTURE_&lt;br /&gt;
*GLASSTEXTURE&lt;br /&gt;
*FLESHTEXTURE&lt;br /&gt;
*SNOWTEXTURE_&lt;br /&gt;
&lt;br /&gt;
Note that textures names can&#039;t be longer than 16 characters (WAD format limitation). This considerably limits the amount of characters you have left to name your textures while using method 1. Therefore, I&#039;d advice you to use method 2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Method 2&#039;&#039;&lt;br /&gt;
Method 2 can be handy if you don&#039;t like long texture file names (because of the prefixes) or you are using a WAD file of which you can&#039;t change the texture names (because it&#039;s shared with other maps). Add lines with the right letter (accoring to the classifications above) and the name of your textures. For instance:&lt;br /&gt;
&lt;br /&gt;
# Create a new folder in the &#039;/sound&#039; folder. You can use whatever name you like. I&#039;m going to call mine &#039;mymap&#039;.&lt;br /&gt;
# In this new folder, create a file called &#039;mymap_materials.txt&#039;. Make sure to save it in ANSI format. Windows uses UTF-8 as default, which the engine can&#039;t read properly.&lt;br /&gt;
# Add your material classifications, according the the list above. Here are some examples: W PLANKS1  /  S WATER_DIRT1A  /  M METAL_BORD2&lt;br /&gt;
# In the &#039;/maps&#039; folder, create (or edit) your map&#039;s CFG file (mymap.cfg). The CFG file needs to have the same name as the BSP file.&lt;br /&gt;
# Then add the following line to the CFG file and save it.&lt;br /&gt;
:&#039;&#039;materials_file ../mymap/mymap_materials.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*Do NOT edit the default materials.txt file found in the &#039;/sound&#039; folder. This one is used for Half-Life WADs and official maps. Supplying a modified version of this file with your map may cause conflicts. Plus, your file might be overridden in the next update of SvenCo-op, rendering your work useless.&lt;br /&gt;
*The system only uses the first 12 characters from each texture entry. This means that you could create bundles of textures which start with the same first 12 characters and let them all have the same sound. If you add &amp;quot;M HEAVYMETAL00&amp;quot; to the materials.txt file, it will also apply the metallic footstep sounds to the textures such as: &amp;quot;HEAVYMETAL00_FLOOR&amp;quot;, &amp;quot;HEAVYMETAL00_BORD&amp;quot;, &amp;quot;HEAVYMETAL00_CEIL&amp;quot;, etc. This is what makes Method 1 (described above) possible.&lt;br /&gt;
*Prefixes (such as +1,-1, ~, +A) are ignored by this system. So &amp;quot;M HEAVYMETAL00&amp;quot; will also work for +1HEAVYMETAL, ~HEAVYMETAL, +AHEAVYMETAL, etc.&lt;br /&gt;
*The materials.txt file cannot be used to use the ladder climbing sound (func_ladder) or the wading sound when players are walking knee high through a liquid (func_water).&lt;br /&gt;
*You cannot assign the concrete sound type, since this is used by default. So if you want this sound, don&#039;t add those textures to the materials.txt file.&lt;br /&gt;
*The engine can not load more than 2048 texture material definitions in total. The current default materials.txt file has around 1550 entries, so you can safely add up to 500 lines to your own custom file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Sentences_Replacement_Guide&amp;diff=498</id>
		<title>Mapping/Sentences Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Sentences_Replacement_Guide&amp;diff=498"/>
		<updated>2020-03-25T12:37:34Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sentence replacement has been possible for many long years through Global Sound Replacement but it&#039;s also possible to make your own sentences. This is how it&#039;s done!&lt;br /&gt;
&lt;br /&gt;
==What are sentences?==&lt;br /&gt;
The sentences.txt (or default_sentences.txt) file handles all speech and sounds within the game. For instance:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;OT_ANSWER0 otis/yes&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Using &#039;OT_ANSWER0&amp;quot; will make Otis use the yes.wav file stored in ../svencoop/sound/otis/.&lt;br /&gt;
&lt;br /&gt;
Another example is the intercom announcer:&lt;br /&gt;
:&#039;&#039;C1A1_0 bizwarn bizwarn bizwarn warning, high energy detonation detected in materials lab&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you can see, you can create full sentences with seperate words, as long as they have a corresponding .wav file. And it&#039;s not limited to words. It will play whatever is stored in the .wav file. You can also add a comma (,) to make the speaker pause for a second.&lt;br /&gt;
&lt;br /&gt;
==How to make your own sentences?==&lt;br /&gt;
Since the default_sentences.txt is used by the game, you should not edit it. It&#039;s better to make your own! Create a text file and the following line to it:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;SECTORSEC vox/doop, sector secured&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As you can see, it uses the doop.wav, sector.wav and secured.wav from the ../sound/vox/ folder to create a sentence. Save your file as &#039;mymap_sentences.txt&#039; and store it in ../svencoop/sound/mymap/.&lt;br /&gt;
&lt;br /&gt;
Now, open your maps&#039; CFG file and add this line to it:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;sentence_file sound/mymap/mymap_sentences.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will now point the game towards your custom sentence file.&lt;br /&gt;
&lt;br /&gt;
==How to put them ingame?==&lt;br /&gt;
Open your map and add an &#039;ambient_generic&#039; entity. Give it a targetname and in the &#039;Sound File&#039; field type: !SECTORSEC .Make sure you start with an exclamation mark (!) so the engine knows it is loading that sound from a sentence.txt file.&lt;br /&gt;
&lt;br /&gt;
To make sure my sound is only heard after triggering it and everywhere in the map, I&#039;ll check the &#039;Play Everwhere&#039; and &#039;Start Silent&#039; flags. Now set up a button/trigger targeting your ambient_generic and the intercom will speak your custom sentence.&lt;br /&gt;
&lt;br /&gt;
You can also do this with NPCs such as scientists, so they will lipsync your custom sentence. To do this, you must use a &#039;scripted_sentence&#039; entity. Give it a targetname (scientist1_speak), in &#039;Sentence Name&#039; add your custom sentence starting with a ! (!LEAVEBRITNEYALONE), and in &#039;Speaker Type&#039; use the name of the NPC you want to use (scientist).&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to put custom sentences for using and unusing NPCs. Just add your custom sentence to the &#039;Use Sentence&#039; (!DOYOUWANTTOBUILDASNOWMAN) and &#039;Un-use Sentence&#039; (!OKBYE). Note that this is only applies to friendly units.&lt;br /&gt;
&lt;br /&gt;
Lastly, you can replace existing sentences. If you want your scientist to have different screams than the default ones, you can use Global Sound Replacement. More info on that here.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*Never start your sentence names with symbols or numbers. The game will not be able to find them.&lt;br /&gt;
*Save your custom sentence file in ANSI format. By default Windows saves .txt files in UTF-8, but the game engine can&#039;t read that format.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Model_Replacement_Guide&amp;diff=497</id>
		<title>Mapping/Model Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Model_Replacement_Guide&amp;diff=497"/>
		<updated>2020-03-25T12:37:18Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What is Model Replacement?==&lt;br /&gt;
Model replacements allows you to replace a model with something else on a global basis. This is useful for well themed maps to easily use alternative models for weapons, without having to define the model for each weapon/ammo entity you put in your maps. You can replace models globally and locally.&lt;br /&gt;
&lt;br /&gt;
==How to set up Global Model Replacement==&lt;br /&gt;
&lt;br /&gt;
1. Create a GMR file in the &amp;quot;maps&amp;quot; folder matching a map name (eg. mymap.gmr).&lt;br /&gt;
&lt;br /&gt;
2. Copy and paste groups of weapon models into the file. In this example I&#039;m replacing the crowbar model with a custom candy cane model.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;models/p_crowbar.mdl&amp;quot; &amp;quot;models/christmas/p_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/v_crowbar.mdl&amp;quot; &amp;quot;models/christmas/v_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/w_crowbar.mdl&amp;quot; &amp;quot;models/christmas/w_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Open or create the map CFG file (eg. mymap.cfg) in the &amp;quot;maps&amp;quot; folder and add this line to the end for your map:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;globalmodellist ../../maps/mymap.gmr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Save both the GMR and CFG file and load up your map.&lt;br /&gt;
&lt;br /&gt;
==How to set up Local Model Replacement==&lt;br /&gt;
Each individual entity can also have a custom model by simply adding the path to the custom model in the &#039;Custom Model&#039; field of the entity. This Barney for example now uses the Blue Shift model.&lt;br /&gt;
&lt;br /&gt;
[[File:Barney.png|400px]]&lt;br /&gt;
&lt;br /&gt;
For weapons you can select custom models for p_, w_ and v_ models.&lt;br /&gt;
&lt;br /&gt;
==Using Global Model Replacement to free up resources==&lt;br /&gt;
&lt;br /&gt;
It can also be used to strip out default weapon models for maps that have the &amp;quot;512 model limit exceeded&amp;quot; crash upon loading. You can take out weapon models that aren&#039;t used in the map to free up some model precache slots. In the following example I&#039;m not using the Egon, so I&#039;m going to replace it with the not-precached model.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;models/p_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/v_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/w_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
* In the CFG file using &amp;quot;../../&amp;quot; is important, as the working directory doesn&#039;t start at &amp;quot;svencoop&amp;quot;.&lt;br /&gt;
* You also need to use the quotation marks &amp;quot; &amp;quot;.&lt;br /&gt;
* You cannot use comments (// or ##) in the GMR file.&lt;br /&gt;
* Be aware that you should not take out remove donor specific models just because you don&#039;t expect any donors to be joining your server.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Sound_Replacement_Guide&amp;diff=496</id>
		<title>Mapping/Sound Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Sound_Replacement_Guide&amp;diff=496"/>
		<updated>2020-03-25T12:37:04Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What is Sound Replacement?==&lt;br /&gt;
&lt;br /&gt;
Sven Co-op features coding that allows for the mapper (and server-side) replacement of sounds in monsters and global entities. This works by using a file that overrides the default sound file paths and directs the game to use one sound instead of another. Sounds can be replaced globally and locally.&lt;br /&gt;
&lt;br /&gt;
==How to set up Global Sound Replacement?==&lt;br /&gt;
1. Create a GSR file in the &amp;quot;maps&amp;quot; folder matching your maps name (eg. mymap.gsr).&lt;br /&gt;
&lt;br /&gt;
2. Type the desired sounds into the file. In this example I&#039;ve replaced the crowbar model with a knife model and I want to replace the crowbar sounds with their knife counterparts.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_hit1.wav&amp;quot; &amp;quot;weapons/knife_hit_wall1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_hit2.wav&amp;quot; &amp;quot;weapons/knife_hit_wall2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_miss1.wav&amp;quot; &amp;quot;weapons/knife1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_miss2.wav&amp;quot; &amp;quot;weapons/knife2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_miss1.wav&amp;quot; &amp;quot;weapons/knife3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod1.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod2.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod3.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hit1.wav&amp;quot; &amp;quot;weapons/knife_hit_wall1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hit2.wav&amp;quot; &amp;quot;weapons/knife_hit_wall2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Open or create the map CFG file (eg. mymap.cfg) in the &amp;quot;maps&amp;quot; folder and add this line to the end for your map:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;globalsoundlist ../../maps/mymap.gsr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Save both the GMR and CFG file and load up your map.&lt;br /&gt;
&lt;br /&gt;
==How to set up Local Sound Replacement?==&lt;br /&gt;
If you want to change the sounds to a specific monster you can do so via Local Sound Replacement.&lt;br /&gt;
&lt;br /&gt;
1. Go into the &amp;quot;sound&amp;quot; folder and create a new folder which has the same name as your BSP file (eg. mymap.bsp =&amp;gt; /sound/mymap/)&lt;br /&gt;
&lt;br /&gt;
2. Create a TXT file for this monster and add the lines for your desired sound replacement. I&#039;m going to replace the Alien Slave sounds with the Skeleton from They Hunger. My file name will be &#039;&#039;hungerslave.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert1.wav&amp;quot; &amp;quot;hungerslave/slv_alert1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert3.wav&amp;quot; &amp;quot;hungerslave/slv_alert3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert4.wav&amp;quot; &amp;quot;hungerslave/slv_alert4.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_die1.wav&amp;quot; &amp;quot;hungerslave/slv_die1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_die2.wav&amp;quot; &amp;quot;hungerslave/slv_die2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_pain1.wav&amp;quot; &amp;quot;hungerslave/slv_pain1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_pain2.wav&amp;quot; &amp;quot;hungerslave/slv_pain2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word1.wav&amp;quot; &amp;quot;hungerslave/slv_word1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word2.wav&amp;quot; &amp;quot;hungerslave/slv_word2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word3.wav&amp;quot; &amp;quot;hungerslave/slv_word3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word4.wav&amp;quot; &amp;quot;hungerslave/slv_word4.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word5.wav&amp;quot; &amp;quot;hungerslave/slv_word5.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word6.wav&amp;quot; &amp;quot;hungerslave/slv_word6.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word7.wav&amp;quot; &amp;quot;hungerslave/slv_word7.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word8.wav&amp;quot; &amp;quot;hungerslave/slv_word8.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_IDLE0&amp;quot; &amp;quot;hungerslave/slv_word1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_ALERT0&amp;quot; &amp;quot;hungerslave/slv_alert1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_ALERT3&amp;quot; &amp;quot;hungerslave/slv_word2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Go into the entity properties and the name of the TXT file to the &#039;Sound Replacement File&#039; field. Since the folder and BSP names are the same, the engine doesn&#039;t need you to specify any paths here.&lt;br /&gt;
&lt;br /&gt;
[[File:Hungerslave.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*As seen from the example of local replacement, you can also directly replace sentences from the sentences.txt file, however some sentence files are made up of more than one wav file, it is not possible to replace the file with more than one wav file.&lt;br /&gt;
*For weapons, only crowbar and wrench sounds can be sound replaced, this is due to all other weapons being client-side, there is an option for setting a sound replacement file in all weapon entities, but this only works for the weapon_wrench and weapon_crowbar.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=495</id>
		<title>Mapping/All about info nodes</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=495"/>
		<updated>2020-03-25T12:34:40Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide teaches you all about the usage of info_nodes. There is actually a bit more to it than just tossing a few of them into your map, so here we go:&lt;br /&gt;
&lt;br /&gt;
==What is a node?==&lt;br /&gt;
A node is a nagivation point used by the AI to help them move around in your map. You might have seen the message &amp;quot;&#039;&#039;Rebuilding Node Graph&#039;&#039;&amp;quot; when loading up a new map. At this stage the engine is creating a network of lines between all nodes, so monsters and NPCs know where valid paths are from one node to another.&lt;br /&gt;
&lt;br /&gt;
==Nodes and AI==&lt;br /&gt;
Even without the nodes, the AI in the Goldsrc engine knows how to walk through 3D space and navigate around small objects. The AI has been improved in Sven Co-op over the years and is even better at navigating on its own. However, it still relies on nodes to find its way through more complicated scenarios and execute its AI behaviour.&lt;br /&gt;
&lt;br /&gt;
This first example scenario puts the Zombie behind the counter. It will want to walk towards the player but it will fail since it can&#039;t determine a clear path. The AI might be smart enough to navigate past smaller objects but this large counter is too much for it to handle.&lt;br /&gt;
&lt;br /&gt;
[[File:NmcnQdj.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add some info_nodes (yellow squares). These points will generate a network of paths for the Zombie to take. As soon as it spots the player and it can&#039;t directly engage him, it will look to the node network for guidance and determine the fastest path from its current node to the node the player is currently closest to (indicated by the red line).&lt;br /&gt;
&lt;br /&gt;
[[File:Tc1vzny.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Another example of the usage of nodes is to help the AI execute its special behaviour. The AI code of this Grunt for instance, tells it to find cover when it is taking damage. It will look to the node network to find this spot, so I&#039;ve placed a strategic node behind the sandbag.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyqp87F.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Node Networks==&lt;br /&gt;
As we&#039;ve established, nodes are important for the AI to function properly. But how is the network built? The engine will determine if there is a straight visual line between two nodes and if there is, a link is made. I&#039;ve placed four nodes in this room, and the links will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:VV1RNjq.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can actualy see these links in game. Walk to a spot where you know a node is at and type &#039;&#039;&#039;impulse 199&#039;&#039;&#039; into the console. This will show you all links for this node for a limited amount of time. Mind that it will only show this information for nodes you are close enough to, it will not show you the network for the entire map.&lt;br /&gt;
&lt;br /&gt;
[[File:NSCSirg.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
A single node can hold very many link to the rest of the network. As long as there is a possible line of sight, there shall be another link.&lt;br /&gt;
&lt;br /&gt;
[[File:Wu17QvH.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The visibility between the nodes can be blocked by solid world geometry and also by func_walls, &#039;&#039;&#039;as long as the wall is higher than 32 units.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:KhV5Z2u.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The point where the node will be created will always float at 32 units above ground level, so if a wall is 32 units or lower there will be a link. The engine will also create links through non-solid brushes no matter how high they are.&lt;br /&gt;
&lt;br /&gt;
[[File:KsdYcxT.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Four different types==&lt;br /&gt;
Now we know how the network is built, we can expand on this knowledge by introducing the different types of monsters. There are four types:&lt;br /&gt;
*Small sized (Headcrab, Chumtoad, etc)&lt;br /&gt;
*Normal sized (Zombie, Grunt, etc)&lt;br /&gt;
*Large sized (Gargantua, Bullsquid, etc)&lt;br /&gt;
*Flying (Alien Controller, Stukabat, etc)&lt;br /&gt;
&lt;br /&gt;
When the node network is built, it will also determine if a certain monster type can actually use the paths. A passage might be too small for a Large sized creature, so it will not establish a usable link between the nodes. You can highlight the different types by use of the other impulse commands. Small creatures will use the default path visible with &#039;&#039;impulse 199&#039;&#039;, &#039;&#039;impulse 197&#039;&#039; will show you the paths for Normal sized creatures, &#039;&#039;impulse 196&#039;&#039; for Large sized Creatures and &#039;&#039;impulse 195&#039;&#039; for all airborne creatures (more on them later!).&lt;br /&gt;
&lt;br /&gt;
In the following example you can see how the node network for Normal sized creatures (highlighted as a pink beam) doesn&#039;t extend under the low beam, because the brush blocks the way. Small sized creatures would however be able to crawl under it and use the default node link to find their way.&lt;br /&gt;
&lt;br /&gt;
[[File:4eJNF4S.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==How to properly place info_nodes==&lt;br /&gt;
Now that we know how the node network works, we can move on to placing our nodes. What are good practises to get the most out of our nodes?&lt;br /&gt;
&lt;br /&gt;
When the map starts, all info_node entities will fall to ground level, so it does not matter how high above the ground you place them. Node points will always be created 32 units above the ground where you place your info_node entity. Just make sure that the origin on the info_node is not inside the floor because this might cause the engine to overlook them.&lt;br /&gt;
&lt;br /&gt;
[[File:CQZrkhs.png|400px]]&lt;br /&gt;
&lt;br /&gt;
So where to place your nodes? We&#039;ve seen that AI can get into trouble whenever there is an obstacle or no clear line between it and the player. So it&#039;s good to add a few nodes to help them navigate around (green). You can see those nodes at the door and around the counter. Next to that it&#039;s good to place a few &#039;anchor points&#039; (blue) in the room. This will give the AI a starting point to navigate from and it can serve as a spot for special AI behaviour (such as the Grunt running for cover earlier).&lt;br /&gt;
&lt;br /&gt;
[[File:WlKqghy.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Some guides might tell you to place an info_node every X units. This is not strictly necessary. The engine also doesn&#039;t require it. You can place two nodes at a distance of 9000 units from eachother and they will still create a link, as long as they have a line of sight to eachother. You just have to place enough nodes for the AI to have enough anchor points. If you do not have enough, you might encounter undesirable AI behaviour. For instance, if the node a Grunt is falling back to is too far away, it will not resume its normal behavior for a long time. If the node is closer, it will then decide on a new course of action once it has reached the node.&lt;br /&gt;
&lt;br /&gt;
As mentioned before, nodes will only create a link where there is a visual line of sight between two nodes. Luckily, it ignores movable brush entities, such as func_doors, so you can place this door in between the nodes and there still will be a link.&lt;br /&gt;
&lt;br /&gt;
[[File:GKabYUx.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The nodes will link through most brush entities that are movable, such as func_train, func_rotating, func_button, but also func_breakables. Next to that it will go through all non-solid entities such as func_illusionary and everything that uses zhlt_noclip 1.&lt;br /&gt;
&lt;br /&gt;
==info_node_air==&lt;br /&gt;
Airborne monsters use a special type of node called the info_node_air. Just as regular info_nodes, these are used for navigation and AI behaviour. However, you might find that airborne monsters are not as good as finding their way to the player as land creatures, since they also have to navigate in upward and downward directions. Info_node_air will not drop down to ground level and info_node_air and info_node will not create links to eachother.&lt;br /&gt;
&lt;br /&gt;
Especially the Alien Controller will hardly move on its own without the help of air nodes. To make sure it will float down or up to engage players on their level, you&#039;ll need enough air nodes on that same level. Without these, the Alien Controller will just hover there, not knowing how to get to the player under the ledge. So when you use these monsters, it&#039;s good to place extra nodes.&lt;br /&gt;
&lt;br /&gt;
[[File:BoVrm08.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other flying creatures that use the air nodes are the Stukabat and the Flyer Flock but also swimming creatures make use of them, such as the Leech and the Ichthyosaur. So make sure you place enough info_node_air entities in the waters that house them.&lt;br /&gt;
&lt;br /&gt;
[[File:AHxgxAw.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Apache and the Osprey technically also use the air nodes network for navigation, however, the Osprey will only function with path_corners to guide it (the game crashes without). The Apache will use air nodes to find its way to the player but isn&#039;t very good at it and will just wierdly wobble after the player. Setting up a network of path_corners for the Apache will make it behave far more realisticly and it will then require no air nodes for its navigation.&lt;br /&gt;
&lt;br /&gt;
==Less is more==&lt;br /&gt;
As we&#039;ve established, you just need enough nodes for the monsters to find their way around. But often maps are littered with nodes that serve hardly any function at all. The example below shows you the route (red line) the Grunt has to take to find its way to the player. It only needs those four nodes to get there, so each node in between is just an extra unneccesary step. So if we remove all of those and leave a few nodes as anchor points for navigation and AI behaviour, we can do with almost a third of the nodes we started with.&lt;br /&gt;
&lt;br /&gt;
[[File:UBuzlT1.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Having less nodes is good in multiple ways. First, it uses up less entity slots (which are limited). Secondly, it makes the node graph calculation faster and finally, it makes the node network far less complex. This can benefit the performance of your map, since each monster has to do route calculations. For only a handfull of monsters this will not be a problem but imagine a large map with many active roaming enemies accessing the node network constantly.&lt;br /&gt;
&lt;br /&gt;
==Misc. info==&lt;br /&gt;
In Sven Co-op, the info_node entity also has an Activity and Hint type keyvalue. These currently have no function. Judging from the source code, Valve planned to put extra information into nodes, so the AI could use them for specific purposes. Imagine a node that suggests to a Grunt that this is a place to find cover. These hint nodes actually ended up being used in Half-Life 2. In HL1 the code for hint nodes is only found for the Houndeye, where it can investigate buzzing machinery and blinking lights.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=494</id>
		<title>Mapping/Multiple skies with point light support</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Multiple_skies_with_point_light_support&amp;diff=494"/>
		<updated>2020-03-25T12:27:44Z</updated>

		<summary type="html">&lt;p&gt;Hezus: Created page with &amp;quot;SC 5.21 added a new entity called trigger_changesky, which allows you to change the skybox texture on the fly. Changing the light of the sky is possible but you&amp;#039;ll run into a...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SC 5.21 added a new entity called trigger_changesky, which allows you to change the skybox texture on the fly. Changing the light of the sky is possible but you&#039;ll run into a few limitations. This tutorial will show you how to work around these problems with a nifty trick. It&#039;ll also go into detail about the nature of environment lights.&lt;br /&gt;
&lt;br /&gt;
==Environment light==&lt;br /&gt;
&lt;br /&gt;
A light_environment entity will cast light from the SKY brush to illuminate brushes, just like any other light entity does. The light information on a brush will be stored in the lightmap. Nearly all models in the game will look below their origin for this light information and take on the colour and intensity of that light. In the screenshot below the player is standing on a red light spot and thus becomes the same shade of red.&lt;br /&gt;
&lt;br /&gt;
[[File:ZzD7tM4.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
A light_environment does something extra: it creates a global light and a vector point. The sky vector point is a point in 3D space where the sky light is coming from. As soon as a model can trace a line to this point, it&#039;ll take on the colour and intensity of the global light. This global light will always override the light info in the lightmap below the model. See the illustration below:&lt;br /&gt;
&lt;br /&gt;
[[File:PX1Tuhs.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can experiment with the sky vector and colour by using the sv_skycolor and sv_skyvector commands in your server. However, these cannot be dynamicly changed by map entities.&lt;br /&gt;
&lt;br /&gt;
==Light_spot and -noskyfix==&lt;br /&gt;
&lt;br /&gt;
Having a global light override all your lightmap info can be quite annoying. Imagine a dark map where you&#039;re model is always a dark shade of blue even when you are walking under a spot light. Luckely, there is a way to get rid of it. You can either use the -noskyfix parameter for RAD or use a light_spot instead of a light_environment. Both methods have the same result: they nullify the global light. For this tutorial I&#039;m using the light_spot route, since it&#039;s easier to work with.&lt;br /&gt;
&lt;br /&gt;
Remove the light_enviroment from your map and put in a light_spot. Then set the keyvalue Is Sky? to Yes. (_sky 1). You can give this light the desired colour and intensity and you can also add Ambient light by click on SmartEdit and add the &#039;_diffuse_light&#039; keyvalue with RGB values. It only needs a targetname. I&#039;m calling mine &#039;light1&#039;. You can add a button to the map to target our light and turn it on and off.&lt;br /&gt;
&lt;br /&gt;
==Lighting problems==&lt;br /&gt;
&lt;br /&gt;
There are some issues with this setup, though. For starters, the SKY brush doesn&#039;t hold any lighting information. So if your map has an Osprey flying above a SKY brush, it will be rendered completely black. Or if you have a Xen map, where players jump from island to island: in between the islands their models will become black. Note that models only take lighting info from world geometry. Even though brush entities such as func_walls have lightmaps, the engine will ignore them and look further down below until it hits a world brush and take the light info from that face. If that face happens to be a SKY brush, your model will be black again.&lt;br /&gt;
&lt;br /&gt;
[[File:JiP90YY.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The second problem is that the light_spot is a point light entity and the engine limits the casting range of those to 2048 units. If your model is flying above a world brush higher than 2048 units it will not recieve any more lightmap info.&lt;br /&gt;
&lt;br /&gt;
[[File:FIT7n10.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==The work-around==&lt;br /&gt;
To make sure our models are lit correctly in the skybox, we&#039;ll have to find an invisible brush that can hold the lightmap data. The ZHLT tools provide us with just such a thing: BLACK_HIDDEN. Make sure you have zhlt.wad loaded.&lt;br /&gt;
&lt;br /&gt;
Create a brush over the area of the SKY brush and put the SKIP texture on all sides. Then put the BLACK_HIDDEN on top of this brush. You can cover the entire bottom of the SKY but I&#039;ll advise you to only use it where it&#039;s necessary. These brushes can be very large and it might take a while to calculate lighting on during compilation. Therefore, also scale the texture to 4.00 or 8.00, so the lightmap becomes larger. This will improve compile times a lot and you will not be able to notice the difference, since there is only one gradient of light cast on them anyhow.&lt;br /&gt;
&lt;br /&gt;
[[File:6GU8ZT9.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Now compile it and our Apache will have correct lighting above the skybox!&lt;br /&gt;
&lt;br /&gt;
[[File:8i1GaWa.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You might notice that if your Apache flies over areas with other lightmap info, it&#039;ll start shifting colour and intensity because it takes on different lightmap info. This can be very undisirable, but there is a fix for it. Create another brush at the top of the skybox and this time put the BLACK_HIDDEN texture on the bottom.&lt;br /&gt;
&lt;br /&gt;
Now go into the properties of the Apache, click SmartEdit and add the keyvalue &#039;effects&#039; with a value of 16. This invokes EF_INVLIGHT, which will cause this entity to search for lightmap info ABOVE the origin (in this case: our new brush). Now our Apache will always use this sky light for its light info.&lt;br /&gt;
&lt;br /&gt;
==Setting up multiple togglable skies==&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve found a solution to the lighting issues, we can begin to set up our multiple sky system. NOTE: There is a hard limit of three sky lights. This is because the engine can handle one static light (unnamed light entities) and three dynamic lights (named lights or light with appearance settings). If you add a fourth dynamic light, you&#039;ll get the &amp;quot;too many lightstyles on a face&amp;quot; error. Keep this in mind if you plan to use other dynamic lights in your outside areas. In this case you are better off with just two different skies, so you have one free channel for your other dynamic lights.&lt;br /&gt;
&lt;br /&gt;
-Create three light_spot entities and call them &amp;quot;light1&amp;quot;, &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot;. Give each of them a unique colour. Flag &amp;quot;light2&amp;quot; and &amp;quot;light3&amp;quot; to Initially Dark.&lt;br /&gt;
-Create three trigger_changesky entities and call them &amp;quot;light1_sky&amp;quot;, &amp;quot;light2_sky&amp;quot; and &amp;quot;light3_sky&amp;quot;. Give each of them a unique sky name. You can find these in the ../gfx/env folder. Flag &amp;quot;All Players&amp;quot; and &amp;quot;Update server&amp;quot; on all three.&lt;br /&gt;
-Create a multimanager and name it &amp;quot;set_light1&amp;quot;.&lt;br /&gt;
-Click on SmartEdit and add &amp;quot;light1_sky&amp;quot; with a value of &amp;quot;0&amp;quot;. This will set the sky for light system 1.&lt;br /&gt;
-Add &amp;quot;light1&amp;quot; with a value of &amp;quot;0#1&amp;quot;. In this case &amp;quot;0&amp;quot; means the delay and &amp;quot;#1&amp;quot; will force it to go ON.&lt;br /&gt;
-Add &amp;quot;light2&amp;quot; with a value of &amp;quot;0#0&amp;quot;. &amp;quot;#0&amp;quot; will force it to go OFF.&lt;br /&gt;
-Add &amp;quot;light3&amp;quot; with a value of &amp;quot;0#0&amp;quot;.&lt;br /&gt;
-Duplicate the multimanger and call it &amp;quot;set_light2&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1_sky&amp;quot; to &amp;quot;light2_sky&amp;quot;.&lt;br /&gt;
-Change &amp;quot;light1&amp;quot; value to &amp;quot;0#0&amp;quot; and &amp;quot;light2&amp;quot; to 0#1&amp;quot;. Now this will force light2 to be ON.&lt;br /&gt;
-Duplicate the multimanager again and make similar changes for &amp;quot;light3&amp;quot;.&lt;br /&gt;
-Create a trigger (or button) to target &amp;quot;set_light1&amp;quot;, &amp;quot;set_light2&amp;quot; and &amp;quot;set_light3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now compile and watch your lights change! &lt;br /&gt;
&lt;br /&gt;
==Setting up the multiple simultaneous skies==&lt;br /&gt;
&lt;br /&gt;
It&#039;s also possible to set up a map where you have two seperate skyboxes at the same time. Imagine a scenario where you travel forward or back in time through a teleporter.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll start by making two rooms with a SKY brush. You can shape them however you like, as long as they are seperate areas that do not connect to one another. Place a light_environment in each of them and create a trigger_teleporter and info_teleport_destination, so you travel from one to the other.&lt;br /&gt;
&lt;br /&gt;
Add two trigger_changesky&#039;s and add the skies of your choice. I&#039;m going with &#039;morning&#039; for one and &#039;night&#039; for the other. I&#039;m giving them the targetnames &#039;morning_sky&#039; and &#039;night_sky&#039;. Now I&#039;m going to adjust the light properties of each light_enviroment to match a morning and a night light. Do not tag any flags. By default the sky will only change for the player who activates it. Finally, go into your Map Properties and set the sky you want to player to begin with.&lt;br /&gt;
&lt;br /&gt;
Go into the info_teleport_destination and in FLAGS, tag &#039;trigger on arrival&#039;. Then in the target field add the sky that should be enabled once you arrive here. The teleport_destination in my night area will target &#039;night_sky&#039; and the teleport_destination in my morning area will target &#039;morning_sky&#039;. You might now have something that resembles this:&lt;br /&gt;
&lt;br /&gt;
[[File:UX9Oe3C.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Now here comes trouble: as established earlier in this tutorial, using a light_environment will cause the global light to enable. The engine will take the light information from the light_environment which was placed LAST to use for the global light. In my case that would be night, so even in the morning area, all models will have night lighting. Luckily, there is a work-around: Create a small room with SKY textures and place a light_enviroment in there. Now change the &#039;brightness&#039; to 0 0 0 0. This will set the global light to nothing and will fix our lighting problems.&lt;br /&gt;
&lt;br /&gt;
To enable the simultaneous skies, you must add the -noskyfix parameter to your RAD compiler. Now you can hop from one time zone into another!&lt;br /&gt;
&lt;br /&gt;
[[File:Vbkmosl.jpg|400px]]&lt;br /&gt;
[[File:VKMrcEM.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==global_light_control==&lt;br /&gt;
&lt;br /&gt;
There is a special entity you might be able to use in specific cases when it comes to controling your lights: global_light_control. This entity can change the appearance of all unnamed lights in the entire map. With appearance I mean the custom appearance field (pattern), which can give light an effect like fluorescent flicker, gentle pulse, etc. With custom appearance you can also control the intensity of the lights: &#039;a&#039; is completely dark and &#039;z&#039; is full bright. The default value is &#039;m&#039;.&lt;br /&gt;
&lt;br /&gt;
So imagine your map is mostly set in an outdoor environment and you use lights (like street lamps) to light your night environment. Then if you want to use a day environment, you can trigger the global_light_control entity with the appearance &amp;quot;a&amp;quot; to toggle all lights off. Note that this will toggle ALL unnamed lights, so if you have any indoor lights you wish to remain lit, make sure they have a targetname.&lt;br /&gt;
&lt;br /&gt;
Turning lights on and off can of course also be done simply by giving the outside lights a targetname. However, by giving them a name, they become part of an additional lightstyle. As determined in this tutorial, there is a limit to the amount of lightstyles you can have per face. So if you happen to run into this problem, you can instead use global_light_control to toggle them.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:VKMrcEM.jpg&amp;diff=493</id>
		<title>File:VKMrcEM.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:VKMrcEM.jpg&amp;diff=493"/>
		<updated>2020-03-25T12:27:22Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:Vbkmosl.jpg&amp;diff=492</id>
		<title>File:Vbkmosl.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:Vbkmosl.jpg&amp;diff=492"/>
		<updated>2020-03-25T12:27:09Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:UX9Oe3C.png&amp;diff=491</id>
		<title>File:UX9Oe3C.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:UX9Oe3C.png&amp;diff=491"/>
		<updated>2020-03-25T12:26:25Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:8i1GaWa.jpg&amp;diff=490</id>
		<title>File:8i1GaWa.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:8i1GaWa.jpg&amp;diff=490"/>
		<updated>2020-03-25T12:25:44Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:6GU8ZT9.png&amp;diff=489</id>
		<title>File:6GU8ZT9.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:6GU8ZT9.png&amp;diff=489"/>
		<updated>2020-03-25T12:25:12Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:FIT7n10.png&amp;diff=488</id>
		<title>File:FIT7n10.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:FIT7n10.png&amp;diff=488"/>
		<updated>2020-03-25T12:24:36Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:JiP90YY.png&amp;diff=487</id>
		<title>File:JiP90YY.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:JiP90YY.png&amp;diff=487"/>
		<updated>2020-03-25T12:23:50Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:PX1Tuhs.png&amp;diff=486</id>
		<title>File:PX1Tuhs.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:PX1Tuhs.png&amp;diff=486"/>
		<updated>2020-03-25T12:23:12Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping&amp;diff=484</id>
		<title>Mapping</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping&amp;diff=484"/>
		<updated>2020-03-25T12:21:46Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== New Users ==&lt;br /&gt;
&lt;br /&gt;
*[[Setting up the SDK]]&lt;br /&gt;
*[[Creating a Sven Co-op Map]]&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
*[[Sound Replacement Guide]]&lt;br /&gt;
*[[Model Replacement Guide]]&lt;br /&gt;
*[[Sentences Replacement Guide]]&lt;br /&gt;
*[[Materials Replacement Guide]]&lt;br /&gt;
*[[Setting Up Survival Mode]]&lt;br /&gt;
*[[All about info_nodes]]&lt;br /&gt;
*[[Multiple skies with point light support]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping&amp;diff=483</id>
		<title>Mapping</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping&amp;diff=483"/>
		<updated>2020-03-25T12:20:39Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== New Users ==&lt;br /&gt;
&lt;br /&gt;
*[[Setting up the SDK]]&lt;br /&gt;
*[[Creating a Sven Co-op Map]]&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
*[[Sound Replacement Guide]]&lt;br /&gt;
*[[Model Replacement Guide]]&lt;br /&gt;
*[[Sentences Replacement Guide]]&lt;br /&gt;
*[[Materials Replacement Guide]]&lt;br /&gt;
*[[Setting Up Survival Mode]]&lt;br /&gt;
*[[All about info_nodes]]&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Model_Replacement_Guide&amp;diff=482</id>
		<title>Mapping/Model Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Model_Replacement_Guide&amp;diff=482"/>
		<updated>2020-03-25T12:20:07Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What is Model Replacement?==&lt;br /&gt;
Model replacements allows you to replace a model with something else on a global basis. This is useful for well themed maps to easily use alternative models for weapons, without having to define the model for each weapon/ammo entity you put in your maps. You can replace models globally and locally.&lt;br /&gt;
&lt;br /&gt;
==How to set up Global Model Replacement==&lt;br /&gt;
&lt;br /&gt;
1. Create a GMR file in the &amp;quot;maps&amp;quot; folder matching a map name (eg. mymap.gmr).&lt;br /&gt;
&lt;br /&gt;
2. Copy and paste groups of weapon models into the file. In this example I&#039;m replacing the crowbar model with a custom candy cane model.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;models/p_crowbar.mdl&amp;quot; &amp;quot;models/christmas/p_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/v_crowbar.mdl&amp;quot; &amp;quot;models/christmas/v_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/w_crowbar.mdl&amp;quot; &amp;quot;models/christmas/w_candycane.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Open or create the map CFG file (eg. mymap.cfg) in the &amp;quot;maps&amp;quot; folder and add this line to the end for your map:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;globalmodellist ../../maps/mymap.gmr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Save both the GMR and CFG file and load up your map.&lt;br /&gt;
&lt;br /&gt;
==How to set up Local Model Replacement==&lt;br /&gt;
Each individual entity can also have a custom model by simply adding the path to the custom model in the &#039;Custom Model&#039; field of the entity. This Barney for example now uses the Blue Shift model.&lt;br /&gt;
&lt;br /&gt;
[[File:Barney.png|400px]]&lt;br /&gt;
&lt;br /&gt;
For weapons you can select custom models for p_, w_ and v_ models.&lt;br /&gt;
&lt;br /&gt;
==Using Global Model Replacement to free up resources==&lt;br /&gt;
&lt;br /&gt;
It can also be used to strip out default weapon models for maps that have the &amp;quot;512 model limit exceeded&amp;quot; crash upon loading. You can take out weapon models that aren&#039;t used in the map to free up some model precache slots. In the following example I&#039;m not using the Egon, so I&#039;m going to replace it with the not-precached model.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;models/p_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/v_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;models/w_egon.mdl&amp;quot; &amp;quot;models/not_precached.mdl&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
* In the CFG file using &amp;quot;../../&amp;quot; is important, as the working directory doesn&#039;t start at &amp;quot;svencoop&amp;quot;.&lt;br /&gt;
* You also need to use the quotation marks &amp;quot; &amp;quot;.&lt;br /&gt;
* You cannot use comments (// or ##) in the GMR file.&lt;br /&gt;
* Be aware that you should not take out remove donor specific models just because you don&#039;t expect any donors to be joining your server.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Sound_Replacement_Guide&amp;diff=481</id>
		<title>Mapping/Sound Replacement Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Sound_Replacement_Guide&amp;diff=481"/>
		<updated>2020-03-25T12:19:48Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What is Sound Replacement?==&lt;br /&gt;
&lt;br /&gt;
Sven Co-op features coding that allows for the mapper (and server-side) replacement of sounds in monsters and global entities. This works by using a file that overrides the default sound file paths and directs the game to use one sound instead of another. Sounds can be replaced globally and locally.&lt;br /&gt;
&lt;br /&gt;
==How to set up Global Sound Replacement?==&lt;br /&gt;
1. Create a GSR file in the &amp;quot;maps&amp;quot; folder matching your maps name (eg. mymap.gsr).&lt;br /&gt;
&lt;br /&gt;
2. Type the desired sounds into the file. In this example I&#039;ve replaced the crowbar model with a knife model and I want to replace the crowbar sounds with their knife counterparts.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_hit1.wav&amp;quot; &amp;quot;weapons/knife_hit_wall1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_hit2.wav&amp;quot; &amp;quot;weapons/knife_hit_wall2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_miss1.wav&amp;quot; &amp;quot;weapons/knife1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbe/cbe_miss2.wav&amp;quot; &amp;quot;weapons/knife2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_miss1.wav&amp;quot; &amp;quot;weapons/knife3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod1.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod2.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hitbod3.wav&amp;quot; &amp;quot;weapons/knife_hit_flesh1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hit1.wav&amp;quot; &amp;quot;weapons/knife_hit_wall1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;weapons/cbar_hit2.wav&amp;quot; &amp;quot;weapons/knife_hit_wall2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Open or create the map CFG file (eg. mymap.cfg) in the &amp;quot;maps&amp;quot; folder and add this line to the end for your map:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;globalsoundlist ../../maps/mymap.gsr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Save both the GMR and CFG file and load up your map.&lt;br /&gt;
&lt;br /&gt;
==How to set up Local Sound Replacement?==&lt;br /&gt;
If you want to change the sounds to a specific monster you can do so via Local Sound Replacement.&lt;br /&gt;
&lt;br /&gt;
1. Go into the &amp;quot;sound&amp;quot; folder and create a new folder which has the same name as your BSP file (eg. mymap.bsp =&amp;gt; /sound/mymap/)&lt;br /&gt;
&lt;br /&gt;
2. Create a TXT file for this monster and add the lines for your desired sound replacement. I&#039;m going to replace the Alien Slave sounds with the Skeleton from They Hunger. My file name will be &#039;&#039;hungerslave.txt&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert1.wav&amp;quot; &amp;quot;hungerslave/slv_alert1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert3.wav&amp;quot; &amp;quot;hungerslave/slv_alert3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_alert4.wav&amp;quot; &amp;quot;hungerslave/slv_alert4.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_die1.wav&amp;quot; &amp;quot;hungerslave/slv_die1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_die2.wav&amp;quot; &amp;quot;hungerslave/slv_die2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_pain1.wav&amp;quot; &amp;quot;hungerslave/slv_pain1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_pain2.wav&amp;quot; &amp;quot;hungerslave/slv_pain2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word1.wav&amp;quot; &amp;quot;hungerslave/slv_word1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word2.wav&amp;quot; &amp;quot;hungerslave/slv_word2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word3.wav&amp;quot; &amp;quot;hungerslave/slv_word3.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word4.wav&amp;quot; &amp;quot;hungerslave/slv_word4.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word5.wav&amp;quot; &amp;quot;hungerslave/slv_word5.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word6.wav&amp;quot; &amp;quot;hungerslave/slv_word6.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word7.wav&amp;quot; &amp;quot;hungerslave/slv_word7.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;aslave/slv_word8.wav&amp;quot; &amp;quot;hungerslave/slv_word8.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_IDLE0&amp;quot; &amp;quot;hungerslave/slv_word1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_ALERT0&amp;quot; &amp;quot;hungerslave/slv_alert1.wav&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;!SLV_ALERT3&amp;quot; &amp;quot;hungerslave/slv_word2.wav&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
3. Go into the entity properties and the name of the TXT file to the &#039;Sound Replacement File&#039; field. Since the folder and BSP names are the same, the engine doesn&#039;t need you to specify any paths here.&lt;br /&gt;
&lt;br /&gt;
[[File:Hungerslave.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*As seen from the example of local replacement, you can also directly replace sentences from the sentences.txt file, however some sentence files are made up of more than one wav file, it is not possible to replace the file with more than one wav file.&lt;br /&gt;
*For weapons, only crowbar and wrench sounds can be sound replaced, this is due to all other weapons being client-side, there is an option for setting a sound replacement file in all weapon entities, but this only works for the weapon_wrench and weapon_crowbar.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=480</id>
		<title>Mapping/Setting Up Survival Mode</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=480"/>
		<updated>2020-03-25T12:19:14Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Survival mode offers an interesting alternative to the typical spawn-die-respawn-repeat gameplay of many Sven Co-op maps. About 30 seconds after the map starts it disables spawn points, and any players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
Everything that a mapper or server operator needs to enable survival mode comes packaged with Sven Co-op by default. You can add survival mode to any map, regardless of whether or not you are an experienced level designer. This guide explains the process.&lt;br /&gt;
&lt;br /&gt;
Setting up survival mode in a map involves two steps:&lt;br /&gt;
#Enabling the survival mode script&lt;br /&gt;
#Placing respawn checkpoints&lt;br /&gt;
&lt;br /&gt;
==Enabling the &amp;quot;Survival Mode&amp;quot; script for a map==&lt;br /&gt;
&lt;br /&gt;
Find the map&#039;s CFG file in the svencoop/maps folder. It should have the same name as the BSP file. If the file doesn&#039;t exist, just make a new TXT file with the name of the BSP and rename the extension to &#039;cfg&#039;.&lt;br /&gt;
&lt;br /&gt;
In the CFG file, add the line:&lt;br /&gt;
:&#039;&#039;map_script survival_generic&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tells the map to load scripts/maps/survival_generic.as on startup.&lt;br /&gt;
&lt;br /&gt;
This script also runs Survival.as, which lays down gameplay rules for survival mode, and point_checkpoint.as, which gives checkpoint entities their functionality.&lt;br /&gt;
&lt;br /&gt;
With these scripts enabled, about 30 seconds after the map starts, respawning will be disabled and all players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
[[File:Cfg_01_runscript.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Map Editor(for custom maps)==&lt;br /&gt;
&lt;br /&gt;
To use the respawn point entity you must first add the survival.fgd file to the editor&#039;s configuration. This file can be found in &#039;&#039;\svencoop\scripts\maps\fgd&#039;&#039;. Restart the editor and find &#039;&#039;point_checkpoint&#039;&#039; in the list.&lt;br /&gt;
&lt;br /&gt;
[[File:Hammer_800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
All of the checkpoint entities in Sven Co-op&#039;s Half-Life maps are 48 units off of the ground, and will hover in the air at any height that you place them.&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Ripent (for already-compiled maps)==&lt;br /&gt;
&lt;br /&gt;
Ripent is a very powerful tool that allows server operators to customize a map without forcing players to redownload the bsp, and will not result in &amp;quot;Map differs from server&amp;quot; errors when a player who already has the unmodified version of the map tries to connect to the server. This is the method that was utilized to place checkpoints in sc_another and YABMA, as the map source files are not available. Ripent allows you to export a map&#039;s entity data, modify it, and put it back into the map. Sven Co-op includes Ripent.exe in the svencoop/maps folder.&lt;br /&gt;
&lt;br /&gt;
Because it requires a command prompt to operate, I prefer to use batch files to export/import the entity data. Setting this up allows you to drag and drop a BSP or ENT file onto the batch file and convert the files without typing a bunch of stuff into a command prompt. It is also a good idea to make a separate &#039;ripent&#039; folder, containing ripent.exe, your batch files, and whatever ENT or modified BSP files you&#039;re working on. Otherwise they just get mixed up in the maps folder.&lt;br /&gt;
&lt;br /&gt;
In the same folder as ripent.exe, make a batch (.BAT) file to export the map&#039;s entity data to a .ENT file. Below is an example of my &#039;export&#039; batch file, named &amp;quot;BSP_2_ENT.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -export %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Drag and drop the desired BSP file onto this batch file to export it to an ENT file. In this case, I&#039;m adding checkpoints to svencoop1.bsp.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat_export.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Next, open the ENT file in a text editor.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 01.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The ENT file is literally a text list of every single entity in the map and all of their keyvalues. You can change any existing entity or add new ones. The only restriction is that you cannot add new brush models to a map that has already been compiled. You can only re-use brush models that are already in the map. But, since we&#039;re only adding checkpoints, that doesn&#039;t matter to us.&lt;br /&gt;
&lt;br /&gt;
All you need to do now is insert &amp;quot;point_checkpoint&amp;quot; entities. First, though, you need to find coordinates where you&#039;d like to add a checkpoint. Play through the map and find events where a lot of players might typically die. It is generally a good idea to place checkpoints after these events. When you reach a good checkpoint position, enter &amp;quot;status&amp;quot; into the console to get the coordinates where you&#039;re going to place the checkpoint.&lt;br /&gt;
&lt;br /&gt;
[[File:Console 01 coordinates.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can see the X-Y-Z coordinates of your position on the &#039;map&#039; line. Scroll down to the bottom of the ENT file and add the following:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;{&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;origin&amp;quot; &amp;quot;[X] [Y] [Z]&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;classname&amp;quot; &amp;quot;point_checkpoint&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;}&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Where [X] [Y] [Z] are the coordinates, without the [] brackets.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re done adding checkpoints, make a batch file to import the map&#039;s entity data from the .ENT file back into the .BSP. Below is an example of my &#039;import&#039; batch file, named &amp;quot;ENT_2_BSP.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -import %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure the BSP is in the same folder as the ENT file, then drag and drop the ENT file into the import batch file.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat import.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The BSP file should now have a checkpoint entity at the coordinates specified in the ENT file. Load it up in-game to check.&lt;br /&gt;
&lt;br /&gt;
[[File:Svencoop1-2016-01-30-0013 800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Map Configuration File CVARs==&lt;br /&gt;
Several CVARs are available for map configuration files that can be used to control the behavior of Survival Mode when a map starts or ends.&lt;br /&gt;
&lt;br /&gt;
*mp_survival_supported - If set to &#039;1&#039;, this tells the game that Survival Mode is supported by the map. This enables Survival Mode voting and toggling capabilities.&lt;br /&gt;
*mp_survival_starton - If set to &#039;1&#039;, Survival Mode will auto-start after the map loads. If set to &#039;0&#039;, Survival Mode will be &#039;off&#039; when the map starts. This is useful for maps that want to turn Survival Mode on at a later point in the map.&lt;br /&gt;
*mp_survival_startdelay - Delay (in seconds) before survival mode starts.&lt;br /&gt;
*mp_survival_nextmap - Specifies the name of the next survival map in a series. This is useful if you have multiple maps in a series where Survival Mode settings should be carried across level changes.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=479</id>
		<title>Mapping/Setting Up Survival Mode</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=479"/>
		<updated>2020-03-25T12:15:54Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Survival mode offers an interesting alternative to the typical spawn-die-respawn-repeat gameplay of many Sven Co-op maps. About 30 seconds after the map starts it disables spawn points, and any players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
Everything that a mapper or server operator needs to enable survival mode comes packaged with Sven Co-op by default. You can add survival mode to any map, regardless of whether or not you are an experienced level designer. This guide explains the process.&lt;br /&gt;
&lt;br /&gt;
Setting up survival mode in a map involves two steps:&lt;br /&gt;
#Enabling the survival mode script&lt;br /&gt;
#Placing respawn checkpoints&lt;br /&gt;
&lt;br /&gt;
==Enabling the &amp;quot;Survival Mode&amp;quot; script for a map==&lt;br /&gt;
&lt;br /&gt;
Find the map&#039;s CFG file in the svencoop/maps folder. It should have the same name as the BSP file. If the file doesn&#039;t exist, just make a new TXT file with the name of the BSP and rename the extension to &#039;cfg&#039;.&lt;br /&gt;
&lt;br /&gt;
In the CFG file, add the line:&lt;br /&gt;
:&#039;&#039;map_script survival_generic&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tells the map to load scripts/maps/survival_generic.as on startup.&lt;br /&gt;
&lt;br /&gt;
This script also runs Survival.as, which lays down gameplay rules for survival mode, and point_checkpoint.as, which gives checkpoint entities their functionality.&lt;br /&gt;
&lt;br /&gt;
With these scripts enabled, about 30 seconds after the map starts, respawning will be disabled and all players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
[[File:Cfg_01_runscript.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Map Editor(for custom maps)==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re making a map and you have all of the source files, it is obviously a better idea to add checkpoint entities in the RMF file and compile the map with them than it would be to add checkpoints with Ripent after the map is already compiled. You really don&#039;t need to load a special FGD to add a checkpoint to a map. However, if you&#039;d like to be able to select the entity from the dropdown list of entities, or to see a model preview of the entity in Hammer&#039;s 3D view window, you&#039;ll need to make an FGD or add an entry to the Sven Co-op FGD.&lt;br /&gt;
&lt;br /&gt;
The FGD entry that I use is as follows:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;@PointClass base(Targetname) studio(&amp;quot;models/common/lambda.mdl&amp;quot;) size(-8 -8 -8, 8 8 8) = point_checkpoint : &amp;quot;A respawn checkpoint&amp;quot; []&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t do this step, it will show up as a pink box in Hammer&#039;s 3D view, and you&#039;ll just have to manually type &amp;quot;point_checkpoint&amp;quot; into the &amp;quot;Class&amp;quot; text entry box when creating the entity. No big deal. It will work the same.&lt;br /&gt;
&lt;br /&gt;
[[File:Hammer_800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
All of the checkpoint entities in Sven Co-op&#039;s Half-Life maps are 48 units off of the ground, and will hover in the air at any height that you place them.&lt;br /&gt;
&lt;br /&gt;
Now compile the map, and you&#039;re good to go.&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Ripent (for already-compiled maps)==&lt;br /&gt;
&lt;br /&gt;
Ripent is a very powerful tool that allows server operators to customize a map without forcing players to redownload the bsp, and will not result in &amp;quot;Map differs from server&amp;quot; errors when a player who already has the unmodified version of the map tries to connect to the server. This is the method that was utilized to place checkpoints in sc_another and YABMA, as the map source files are not available. Ripent allows you to export a map&#039;s entity data, modify it, and put it back into the map. Sven Co-op includes Ripent.exe in the svencoop/maps folder.&lt;br /&gt;
&lt;br /&gt;
Because it requires a command prompt to operate, I prefer to use batch files to export/import the entity data. Setting this up allows you to drag and drop a BSP or ENT file onto the batch file and convert the files without typing a bunch of stuff into a command prompt. It is also a good idea to make a separate &#039;ripent&#039; folder, containing ripent.exe, your batch files, and whatever ENT or modified BSP files you&#039;re working on. Otherwise they just get mixed up in the maps folder.&lt;br /&gt;
&lt;br /&gt;
In the same folder as ripent.exe, make a batch (.BAT) file to export the map&#039;s entity data to a .ENT file. Below is an example of my &#039;export&#039; batch file, named &amp;quot;BSP_2_ENT.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -export %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Drag and drop the desired BSP file onto this batch file to export it to an ENT file. In this case, I&#039;m adding checkpoints to svencoop1.bsp.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat_export.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Next, open the ENT file in a text editor.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 01.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The ENT file is literally a text list of every single entity in the map and all of their keyvalues. You can change any existing entity or add new ones. The only restriction is that you cannot add new brush models to a map that has already been compiled. You can only re-use brush models that are already in the map. But, since we&#039;re only adding checkpoints, that doesn&#039;t matter to us.&lt;br /&gt;
&lt;br /&gt;
All you need to do now is insert &amp;quot;point_checkpoint&amp;quot; entities. First, though, you need to find coordinates where you&#039;d like to add a checkpoint. Play through the map and find events where a lot of players might typically die. It is generally a good idea to place checkpoints after these events. When you reach a good checkpoint position, enter &amp;quot;status&amp;quot; into the console to get the coordinates where you&#039;re going to place the checkpoint.&lt;br /&gt;
&lt;br /&gt;
[[File:Console 01 coordinates.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can see the X-Y-Z coordinates of your position on the &#039;map&#039; line. Scroll down to the bottom of the ENT file and add the following:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;{&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;origin&amp;quot; &amp;quot;[X] [Y] [Z]&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;classname&amp;quot; &amp;quot;point_checkpoint&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;}&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Where [X] [Y] [Z] are the coordinates, without the [] brackets.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re done adding checkpoints, make a batch file to import the map&#039;s entity data from the .ENT file back into the .BSP. Below is an example of my &#039;import&#039; batch file, named &amp;quot;ENT_2_BSP.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -import %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure the BSP is in the same folder as the ENT file, then drag and drop the ENT file into the import batch file.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat import.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The BSP file should now have a checkpoint entity at the coordinates specified in the ENT file. Load it up in-game to check.&lt;br /&gt;
&lt;br /&gt;
[[File:Svencoop1-2016-01-30-0013 800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Map Configuration File CVARs==&lt;br /&gt;
Several CVARs are available for map configuration files that can be used to control the behavior of Survival Mode when a map starts or ends.&lt;br /&gt;
&lt;br /&gt;
*mp_survival_supported - If set to &#039;1&#039;, this tells the game that Survival Mode is supported by the map. This enables Survival Mode voting and toggling capabilities.&lt;br /&gt;
*mp_survival_starton - If set to &#039;1&#039;, Survival Mode will auto-start after the map loads. If set to &#039;0&#039;, Survival Mode will be &#039;off&#039; when the map starts. This is useful for maps that want to turn Survival Mode on at a later point in the map.&lt;br /&gt;
*mp_survival_startdelay - Delay (in seconds) before survival mode starts.&lt;br /&gt;
*mp_survival_nextmap - Specifies the name of the next survival map in a series. This is useful if you have multiple maps in a series where Survival Mode settings should be carried across level changes.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=478</id>
		<title>Mapping/Setting Up Survival Mode</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/Setting_Up_Survival_Mode&amp;diff=478"/>
		<updated>2020-03-25T12:15:33Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Survival mode offers an interesting alternative to the typical spawn-die-respawn-repeat gameplay of many Sven Co-op maps. About 30 seconds after the map starts it disables spawn points, and any players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
Everything that a mapper or server operator needs to enable survival mode comes packaged with Sven Co-op by default. You can add survival mode to any map, regardless of whether or not you are an experienced level designer. This guide explains the process.&lt;br /&gt;
&lt;br /&gt;
Setting up survival mode in a map involves two steps:&lt;br /&gt;
#Enabling the survival mode script&lt;br /&gt;
#Placing respawn checkpoints&lt;br /&gt;
&lt;br /&gt;
==Enabling the &amp;quot;Survival Mode&amp;quot; script for a map==&lt;br /&gt;
&lt;br /&gt;
Find the map&#039;s CFG file in the svencoop/maps folder. It should have the same name as the BSP file. If the file doesn&#039;t exist, just make a new TXT file with the name of the BSP and rename the extension to &#039;cfg&#039;.&lt;br /&gt;
&lt;br /&gt;
In the CFG file, add the line:&lt;br /&gt;
:&#039;&#039;map_script survival_generic&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This tells the map to load scripts/maps/survival_generic.as on startup.&lt;br /&gt;
&lt;br /&gt;
This script also runs Survival.as, which lays down gameplay rules for survival mode, and point_checkpoint.as, which gives checkpoint entities their functionality.&lt;br /&gt;
&lt;br /&gt;
With these scripts enabled, about 30 seconds after the map starts, respawning will be disabled and all players who die will be placed into &#039;observer mode&#039; until a checkpoint is reached or all players are dead, at which point a vote will be called to either restart the map or change the level.&lt;br /&gt;
&lt;br /&gt;
[[File:Cfg_01_runscript.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Map Editor(for custom maps)==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re making a map and you have all of the source files, it is obviously a better idea to add checkpoint entities in the RMF file and compile the map with them than it would be to add checkpoints with Ripent after the map is already compiled. You really don&#039;t need to load a special FGD to add a checkpoint to a map. However, if you&#039;d like to be able to select the entity from the dropdown list of entities, or to see a model preview of the entity in Hammer&#039;s 3D view window, you&#039;ll need to make an FGD or add an entry to the Sven Co-op FGD.&lt;br /&gt;
&lt;br /&gt;
The FGD entry that I use is as follows:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;@PointClass base(Targetname) studio(&amp;quot;models/common/lambda.mdl&amp;quot;) size(-8 -8 -8, 8 8 8) = point_checkpoint : &amp;quot;A respawn checkpoint&amp;quot; []&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t do this step, it will show up as a pink box in Hammer&#039;s 3D view, and you&#039;ll just have to manually type &amp;quot;point_checkpoint&amp;quot; into the &amp;quot;Class&amp;quot; text entry box when creating the entity. No big deal. It will work the same.&lt;br /&gt;
&lt;br /&gt;
[[File:Hammer_800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
All of the checkpoint entities in Sven Co-op&#039;s Half-Life maps are 48 units off of the ground, and will hover in the air at any height that you place them.&lt;br /&gt;
&lt;br /&gt;
Now compile the map, and you&#039;re good to go.&lt;br /&gt;
&lt;br /&gt;
==Adding checkpoints with Ripent (for already-compiled maps)==&lt;br /&gt;
&lt;br /&gt;
Ripent is a very powerful tool that allows server operators to customize a map without forcing players to redownload the bsp, and will not result in &amp;quot;Map differs from server&amp;quot; errors when a player who already has the unmodified version of the map tries to connect to the server. This is the method that was utilized to place checkpoints in sc_another and YABMA, as the map source files are not available. Ripent allows you to export a map&#039;s entity data, modify it, and put it back into the map. Sven Co-op includes Ripent.exe in the svencoop/maps folder.&lt;br /&gt;
&lt;br /&gt;
Because it requires a command prompt to operate, I prefer to use batch files to export/import the entity data. Setting this up allows you to drag and drop a BSP or ENT file onto the batch file and convert the files without typing a bunch of stuff into a command prompt. It is also a good idea to make a separate &#039;ripent&#039; folder, containing ripent.exe, your batch files, and whatever ENT or modified BSP files you&#039;re working on. Otherwise they just get mixed up in the maps folder.&lt;br /&gt;
&lt;br /&gt;
In the same folder as ripent.exe, make a batch (.BAT) file to export the map&#039;s entity data to a .ENT file. Below is an example of my &#039;export&#039; batch file, named &amp;quot;BSP_2_ENT.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -export %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Drag and drop the desired BSP file onto this batch file to export it to an ENT file. In this case, I&#039;m adding checkpoints to svencoop1.bsp.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat_export.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Next, open the ENT file in a text editor.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 01.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The ENT file is literally a text list of every single entity in the map and all of their keyvalues. You can change any existing entity or add new ones. The only restriction is that you cannot add new brush models to a map that has already been compiled. You can only re-use brush models that are already in the map. But, since we&#039;re only adding checkpoints, that doesn&#039;t matter to us.&lt;br /&gt;
&lt;br /&gt;
All you need to do now is insert &amp;quot;point_checkpoint&amp;quot; entities. First, though, you need to find coordinates where you&#039;d like to add a checkpoint. Play through the map and find events where a lot of players might typically die. It is generally a good idea to place checkpoints after these events. When you reach a good checkpoint position, enter &amp;quot;status&amp;quot; into the console to get the coordinates where you&#039;re going to place the checkpoint.&lt;br /&gt;
&lt;br /&gt;
[[File:Console 01 coordinates.png|200px]]&lt;br /&gt;
&lt;br /&gt;
You can see the X-Y-Z coordinates of your position on the &#039;map&#039; line. Scroll down to the bottom of the ENT file and add the following:&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;{&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;origin&amp;quot; &amp;quot;[X] [Y] [Z]&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&amp;quot;classname&amp;quot; &amp;quot;point_checkpoint&amp;quot;&#039;&#039;&lt;br /&gt;
:&#039;&#039;}&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Where [X] [Y] [Z] are the coordinates, without the [] brackets.&lt;br /&gt;
&lt;br /&gt;
[[File:Entdata 02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re done adding checkpoints, make a batch file to import the map&#039;s entity data from the .ENT file back into the .BSP. Below is an example of my &#039;import&#039; batch file, named &amp;quot;ENT_2_BSP.bat&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;ripent.exe -import %1&#039;&#039;&lt;br /&gt;
:&#039;&#039;pause&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Make sure the BSP is in the same folder as the ENT file, then drag and drop the ENT file into the import batch file.&lt;br /&gt;
&lt;br /&gt;
[[File:Bat import.png|200px]]&lt;br /&gt;
&lt;br /&gt;
The BSP file should now have a checkpoint entity at the coordinates specified in the ENT file. Load it up in-game to check.&lt;br /&gt;
&lt;br /&gt;
[[File:Svencoop1-2016-01-30-0013 800.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Map Configuration File CVARs==&lt;br /&gt;
Several CVARs are available for map configuration files that can be used to control the behavior of Survival Mode when a map starts or ends.&lt;br /&gt;
&lt;br /&gt;
*mp_survival_supported - If set to &#039;1&#039;, this tells the game that Survival Mode is supported by the map. This enables Survival Mode voting and toggling capabilities.&lt;br /&gt;
*mp_survival_starton - If set to &#039;1&#039;, Survival Mode will auto-start after the map loads. If set to &#039;0&#039;, Survival Mode will be &#039;off&#039; when the map starts. This is useful for maps that want to turn Survival Mode on at a later point in the map.&lt;br /&gt;
*mp_survival_startdelay - Delay (in seconds) before survival mode starts.&lt;br /&gt;
*mp_survival_nextmap - Specifies the name of the next survival map in a series. This is useful if you have multiple maps in a series where Survival Mode settings should be carried across level changes.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=477</id>
		<title>Mapping/All about info nodes</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=477"/>
		<updated>2020-03-25T12:14:34Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide teaches you all about the usage of info_nodes. There is actually a bit more to it than just tossing a few of them into your map, so here we go:&lt;br /&gt;
&lt;br /&gt;
==What is a node?==&lt;br /&gt;
A node is a nagivation point used by the AI to help them move around in your map. You might have seen the message &amp;quot;Rebuilding Node Graph&amp;quot; when loading up a new map. At this stage the engine is creating a network of lines between all nodes, so monsters and NPCs know where valid paths are from one node to another.&lt;br /&gt;
&lt;br /&gt;
==Nodes and AI==&lt;br /&gt;
Even without the nodes, the AI in the Goldsrc engine knows how to walk through 3D space and navigate around small objects. The AI has been improved in Sven Co-op over the years and is even better at navigating on its own. However, it still relies on nodes to find its way through more complicated scenarios and execute its AI behaviour.&lt;br /&gt;
&lt;br /&gt;
This first example scenario puts the Zombie behind the counter. It will want to walk towards the player but it will fail since it can&#039;t determine a clear path. The AI might be smart enough to navigate past smaller objects but this large counter is too much for it to handle.&lt;br /&gt;
&lt;br /&gt;
[[File:NmcnQdj.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add some info_nodes (yellow squares). These points will generate a network of paths for the Zombie to take. As soon as it spots the player and it can&#039;t directly engage him, it will look to the node network for guidance and determine the fastest path from its current node to the node the player is currently closest to (indicated by the red line).&lt;br /&gt;
&lt;br /&gt;
[[File:Tc1vzny.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Another example of the usage of nodes is to help the AI execute its special behaviour. The AI code of this Grunt for instance, tells it to find cover when it is taking damage. It will look to the node network to find this spot, so I&#039;ve placed a strategic node behind the sandbag.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyqp87F.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Node Networks==&lt;br /&gt;
As we&#039;ve established, nodes are important for the AI to function properly. But how is the network built? The engine will determine if there is a straight visual line between two nodes and if there is, a link is made. I&#039;ve placed four nodes in this room, and the links will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:VV1RNjq.png|400px]]&lt;br /&gt;
&lt;br /&gt;
You can actualy see these links in game. Walk to a spot where you know a node is at and type &#039;impulse 199&#039; into the console. This will show you all links for this node for a limited amount of time. Mind that it will only show this information for nodes you are close enough to, it will not show you the network for the entire map.&lt;br /&gt;
&lt;br /&gt;
[[File:NSCSirg.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
A single node can hold very many link to the rest of the network. As long as there is a possible line of sight, there shall be another link.&lt;br /&gt;
&lt;br /&gt;
[[File:Wu17QvH.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The visibility between the nodes can be blocked by solid world geometry and also by func_walls, as long as the wall is higher than 32 units.&lt;br /&gt;
&lt;br /&gt;
[[File:KhV5Z2u.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The point where the node will be created will always float at 32 units above ground level, so if a wall is 32 units or lower there will be a link. The engine will also create links through non-solid brushes no matter how high they are.&lt;br /&gt;
&lt;br /&gt;
[[File:KsdYcxT.png|400px]]&lt;br /&gt;
&lt;br /&gt;
==Four different types==&lt;br /&gt;
Now we know how the network is built, we can expand on this knowledge by introducing the different types of monsters. There are four types:&lt;br /&gt;
*Small sized (Headcrab, Chumtoad, etc)&lt;br /&gt;
*Normal sized (Zombie, Grunt, etc)&lt;br /&gt;
*Large sized (Gargantua, Bullsquid, etc)&lt;br /&gt;
*Flying (Alien Controller, Stukabat, etc)&lt;br /&gt;
&lt;br /&gt;
When the node network is built, it will also determine if a certain monster type can actually use the paths. A passage might be too small for a Large sized creature, so it will not establish a usable link between the nodes. You can highlight the different types by use of the other impulse commands. Small creatures will use the default path visible with impulse 199. impulse 197 will show you the paths for Normal sized creatures, impulse 196 for Large sized Creatures and impulse 195 for all airborne creatures (more on them later!).&lt;br /&gt;
&lt;br /&gt;
In the following example you can see how the node network for Normal sized creatures (highlighted as a pink beam) doesn&#039;t extend under the low beam, because the brush blocks the way. Small sized creatures would however be able to crawl under it and use the default node link to find their way.&lt;br /&gt;
&lt;br /&gt;
[[File:4eJNF4S.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
==How to properly place info_nodes==&lt;br /&gt;
Now that we know how the node network works, we can move on to placing our nodes. What are good practises to get the most out of our nodes?&lt;br /&gt;
&lt;br /&gt;
When the map starts, all info_node entities will fall to ground level, so it does not matter how high above the ground you place them. Node points will always be created 32 units above the ground where you place your info_node entity. Just make sure that the origin on the info_node is not inside the floor because this might cause the engine to overlook them.&lt;br /&gt;
&lt;br /&gt;
[[File:CQZrkhs.png|400px]]&lt;br /&gt;
&lt;br /&gt;
So where to place your nodes? We&#039;ve seen that AI can get into trouble whenever there is an obstacle or no clear line between it and the player. So it&#039;s good to add a few nodes to help them navigate around (green). You can see those nodes at the door and around the counter. Next to that it&#039;s good to place a few &#039;anchor points&#039; (blue) in the room. This will give the AI a starting point to navigate from and it can serve as a spot for special AI behaviour (such as the Grunt running for cover earlier).&lt;br /&gt;
&lt;br /&gt;
[[File:WlKqghy.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Some guides might tell you to place an info_node every X units. This is not strictly necessary. The engine also doesn&#039;t require it. You can place two nodes at a distance of 9000 units from eachother and they will still create a link, as long as they have a line of sight to eachother. You just have to place enough nodes for the AI to have enough anchor points. If you do not have enough, you might encounter undesirable AI behaviour. For instance, if the node a Grunt is falling back to is too far away, it will not resume its normal behavior for a long time. If the node is closer, it will then decide on a new course of action once it has reached the node.&lt;br /&gt;
&lt;br /&gt;
As mentioned before, nodes will only create a link where there is a visual line of sight between two nodes. Luckily, it ignores movable brush entities, such as func_doors, so you can place this door in between the nodes and there still will be a link.&lt;br /&gt;
&lt;br /&gt;
[[File:GKabYUx.png|400px]]&lt;br /&gt;
&lt;br /&gt;
The nodes will link through most brush entities that are movable, such as func_train, func_rotating, func_button, but also func_breakables. Next to that it will go through all non-solid entities such as func_illusionary and everything that uses zhlt_noclip 1.&lt;br /&gt;
&lt;br /&gt;
==info_node_air==&lt;br /&gt;
Airborne monsters use a special type of node called the info_node_air. Just as regular info_nodes, these are used for navigation and AI behaviour. However, you might find that airborne monsters are not as good as finding their way to the player as land creatures, since they also have to navigate in upward and downward directions. Info_node_air will not drop down to ground level and info_node_air and info_node will not create links to eachother.&lt;br /&gt;
&lt;br /&gt;
Especially the Alien Controller will hardly move on its own without the help of air nodes. To make sure it will float down or up to engage players on their level, you&#039;ll need enough air nodes on that same level. Without these, the Alien Controller will just hover there, not knowing how to get to the player under the ledge. So when you use these monsters, it&#039;s good to place extra nodes.&lt;br /&gt;
&lt;br /&gt;
[[File:BoVrm08.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Other flying creatures that use the air nodes are the Stukabat and the Flyer Flock but also swimming creatures make use of them, such as the Leech and the Ichthyosaur. So make sure you place enough info_node_air entities in the waters that house them.&lt;br /&gt;
&lt;br /&gt;
[[File:AHxgxAw.png|400px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Apache and the Osprey technically also use the air nodes network for navigation, however, the Osprey will only function with path_corners to guide it (the game crashes without). The Apache will use air nodes to find its way to the player but isn&#039;t very good at it and will just wierdly wobble after the player. Setting up a network of path_corners for the Apache will make it behave far more realisticly and it will then require no air nodes for its navigation.&lt;br /&gt;
&lt;br /&gt;
==Less is more==&lt;br /&gt;
As we&#039;ve established, you just need enough nodes for the monsters to find their way around. But often maps are littered with nodes that serve hardly any function at all. The example below shows you the route (red line) the Grunt has to take to find its way to the player. It only needs those four nodes to get there, so each node in between is just an extra unneccesary step. So if we remove all of those and leave a few nodes as anchor points for navigation and AI behaviour, we can do with almost a third of the nodes we started with.&lt;br /&gt;
&lt;br /&gt;
[[File:UBuzlT1.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Having less nodes is good in multiple ways. First, it uses up less entity slots (which are limited). Secondly, it makes the node graph calculation faster and finally, it makes the node network far less complex. This can benefit the performance of your map, since each monster has to do route calculations. For only a handfull of monsters this will not be a problem but imagine a large map with many active roaming enemies accessing the node network constantly.&lt;br /&gt;
&lt;br /&gt;
==Misc. info==&lt;br /&gt;
In Sven Co-op, the info_node entity also has an Activity and Hint type keyvalue. These currently have no function. Judging from the source code, Valve planned to put extra information into nodes, so the AI could use them for specific purposes. Imagine a node that suggests to a Grunt that this is a place to find cover. These hint nodes actually ended up being used in Half-Life 2. In HL1 the code for hint nodes is only found for the Houndeye, where it can investigate buzzing machinery and blinking lights.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=476</id>
		<title>Mapping/All about info nodes</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=Mapping/All_about_info_nodes&amp;diff=476"/>
		<updated>2020-03-25T12:13:21Z</updated>

		<summary type="html">&lt;p&gt;Hezus: Created page with &amp;quot;This guide teaches you all about the usage of info_nodes. There is actually a bit more to it than just tossing a few of them into your map, so here we go:  ==What is a node?==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This guide teaches you all about the usage of info_nodes. There is actually a bit more to it than just tossing a few of them into your map, so here we go:&lt;br /&gt;
&lt;br /&gt;
==What is a node?==&lt;br /&gt;
A node is a nagivation point used by the AI to help them move around in your map. You might have seen the message &amp;quot;Rebuilding Node Graph&amp;quot; when loading up a new map. At this stage the engine is creating a network of lines between all nodes, so monsters and NPCs know where valid paths are from one node to another.&lt;br /&gt;
&lt;br /&gt;
==Nodes and AI==&lt;br /&gt;
Even without the nodes, the AI in the Goldsrc engine knows how to walk through 3D space and navigate around small objects. The AI has been improved in Sven Co-op over the years and is even better at navigating on its own. However, it still relies on nodes to find its way through more complicated scenarios and execute its AI behaviour.&lt;br /&gt;
&lt;br /&gt;
This first example scenario puts the Zombie behind the counter. It will want to walk towards the player but it will fail since it can&#039;t determine a clear path. The AI might be smart enough to navigate past smaller objects but this large counter is too much for it to handle.&lt;br /&gt;
&lt;br /&gt;
[[File:NmcnQdj.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Let&#039;s add some info_nodes (yellow squares). These points will generate a network of paths for the Zombie to take. As soon as it spots the player and it can&#039;t directly engage him, it will look to the node network for guidance and determine the fastest path from its current node to the node the player is currently closest to (indicated by the red line).&lt;br /&gt;
&lt;br /&gt;
[[File:Tc1vzny.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Another example of the usage of nodes is to help the AI execute its special behaviour. The AI code of this Grunt for instance, tells it to find cover when it is taking damage. It will look to the node network to find this spot, so I&#039;ve placed a strategic node behind the sandbag.&lt;br /&gt;
&lt;br /&gt;
[[File:Zyqp87F.png|200px]]&lt;br /&gt;
&lt;br /&gt;
==Node Networks==&lt;br /&gt;
As we&#039;ve established, nodes are important for the AI to function properly. But how is the network built? The engine will determine if there is a straight visual line between two nodes and if there is, a link is made. I&#039;ve placed four nodes in this room, and the links will look like this:&lt;br /&gt;
&lt;br /&gt;
[[File:VV1RNjq.png|200px]]&lt;br /&gt;
&lt;br /&gt;
You can actualy see these links in game. Walk to a spot where you know a node is at and type &#039;impulse 199&#039; into the console. This will show you all links for this node for a limited amount of time. Mind that it will only show this information for nodes you are close enough to, it will not show you the network for the entire map.&lt;br /&gt;
&lt;br /&gt;
[[File:NSCSirg.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
A single node can hold very many link to the rest of the network. As long as there is a possible line of sight, there shall be another link.&lt;br /&gt;
&lt;br /&gt;
[[File:Wu17QvH.png|200px]]&lt;br /&gt;
&lt;br /&gt;
The visibility between the nodes can be blocked by solid world geometry and also by func_walls, as long as the wall is higher than 32 units.&lt;br /&gt;
&lt;br /&gt;
[[File:KhV5Z2u.png|200px]]&lt;br /&gt;
&lt;br /&gt;
The point where the node will be created will always float at 32 units above ground level, so if a wall is 32 units or lower there will be a link. The engine will also create links through non-solid brushes no matter how high they are.&lt;br /&gt;
&lt;br /&gt;
[[File:KsdYcxT.png|200px]]&lt;br /&gt;
&lt;br /&gt;
==Four different types==&lt;br /&gt;
Now we know how the network is built, we can expand on this knowledge by introducing the different types of monsters. There are four types:&lt;br /&gt;
*Small sized (Headcrab, Chumtoad, etc)&lt;br /&gt;
*Normal sized (Zombie, Grunt, etc)&lt;br /&gt;
*Large sized (Gargantua, Bullsquid, etc)&lt;br /&gt;
*Flying (Alien Controller, Stukabat, etc)&lt;br /&gt;
&lt;br /&gt;
When the node network is built, it will also determine if a certain monster type can actually use the paths. A passage might be too small for a Large sized creature, so it will not establish a usable link between the nodes. You can highlight the different types by use of the other impulse commands. Small creatures will use the default path visible with impulse 199. impulse 197 will show you the paths for Normal sized creatures, impulse 196 for Large sized Creatures and impulse 195 for all airborne creatures (more on them later!).&lt;br /&gt;
&lt;br /&gt;
In the following example you can see how the node network for Normal sized creatures (highlighted as a pink beam) doesn&#039;t extend under the low beam, because the brush blocks the way. Small sized creatures would however be able to crawl under it and use the default node link to find their way.&lt;br /&gt;
&lt;br /&gt;
[[File:4eJNF4S.jpg|200px]]&lt;br /&gt;
&lt;br /&gt;
==How to properly place info_nodes==&lt;br /&gt;
Now that we know how the node network works, we can move on to placing our nodes. What are good practises to get the most out of our nodes?&lt;br /&gt;
&lt;br /&gt;
When the map starts, all info_node entities will fall to ground level, so it does not matter how high above the ground you place them. Node points will always be created 32 units above the ground where you place your info_node entity. Just make sure that the origin on the info_node is not inside the floor because this might cause the engine to overlook them.&lt;br /&gt;
&lt;br /&gt;
[[File:CQZrkhs.png|200px]]&lt;br /&gt;
&lt;br /&gt;
So where to place your nodes? We&#039;ve seen that AI can get into trouble whenever there is an obstacle or no clear line between it and the player. So it&#039;s good to add a few nodes to help them navigate around (green). You can see those nodes at the door and around the counter. Next to that it&#039;s good to place a few &#039;anchor points&#039; (blue) in the room. This will give the AI a starting point to navigate from and it can serve as a spot for special AI behaviour (such as the Grunt running for cover earlier).&lt;br /&gt;
&lt;br /&gt;
[[File:WlKqghy.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Some guides might tell you to place an info_node every X units. This is not strictly necessary. The engine also doesn&#039;t require it. You can place two nodes at a distance of 9000 units from eachother and they will still create a link, as long as they have a line of sight to eachother. You just have to place enough nodes for the AI to have enough anchor points. If you do not have enough, you might encounter undesirable AI behaviour. For instance, if the node a Grunt is falling back to is too far away, it will not resume its normal behavior for a long time. If the node is closer, it will then decide on a new course of action once it has reached the node.&lt;br /&gt;
&lt;br /&gt;
As mentioned before, nodes will only create a link where there is a visual line of sight between two nodes. Luckily, it ignores movable brush entities, such as func_doors, so you can place this door in between the nodes and there still will be a link.&lt;br /&gt;
&lt;br /&gt;
[[File:GKabYUx.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The nodes will link through most brush entities that are movable, such as func_train, func_rotating, func_button, but also func_breakables. Next to that it will go through all non-solid entities such as func_illusionary and everything that uses zhlt_noclip 1.&lt;br /&gt;
&lt;br /&gt;
==info_node_air==&lt;br /&gt;
Airborne monsters use a special type of node called the info_node_air. Just as regular info_nodes, these are used for navigation and AI behaviour. However, you might find that airborne monsters are not as good as finding their way to the player as land creatures, since they also have to navigate in upward and downward directions. Info_node_air will not drop down to ground level and info_node_air and info_node will not create links to eachother.&lt;br /&gt;
&lt;br /&gt;
Especially the Alien Controller will hardly move on its own without the help of air nodes. To make sure it will float down or up to engage players on their level, you&#039;ll need enough air nodes on that same level. Without these, the Alien Controller will just hover there, not knowing how to get to the player under the ledge. So when you use these monsters, it&#039;s good to place extra nodes.&lt;br /&gt;
&lt;br /&gt;
[[File:BoVrm08.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Other flying creatures that use the air nodes are the Stukabat and the Flyer Flock but also swimming creatures make use of them, such as the Leech and the Ichthyosaur. So make sure you place enough info_node_air entities in the waters that house them.&lt;br /&gt;
&lt;br /&gt;
[[File:AHxgxAw.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Apache and the Osprey technically also use the air nodes network for navigation, however, the Osprey will only function with path_corners to guide it (the game crashes without). The Apache will use air nodes to find its way to the player but isn&#039;t very good at it and will just wierdly wobble after the player. Setting up a network of path_corners for the Apache will make it behave far more realisticly and it will then require no air nodes for its navigation.&lt;br /&gt;
&lt;br /&gt;
==Less is more==&lt;br /&gt;
As we&#039;ve established, you just need enough nodes for the monsters to find their way around. But often maps are littered with nodes that serve hardly any function at all. The example below shows you the route (red line) the Grunt has to take to find its way to the player. It only needs those four nodes to get there, so each node in between is just an extra unneccesary step. So if we remove all of those and leave a few nodes as anchor points for navigation and AI behaviour, we can do with almost a third of the nodes we started with.&lt;br /&gt;
&lt;br /&gt;
[[File:UBuzlT1.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Having less nodes is good in multiple ways. First, it uses up less entity slots (which are limited). Secondly, it makes the node graph calculation faster and finally, it makes the node network far less complex. This can benefit the performance of your map, since each monster has to do route calculations. For only a handfull of monsters this will not be a problem but imagine a large map with many active roaming enemies accessing the node network constantly.&lt;br /&gt;
&lt;br /&gt;
==Misc. info==&lt;br /&gt;
In Sven Co-op, the info_node entity also has an Activity and Hint type keyvalue. These currently have no function. Judging from the source code, Valve planned to put extra information into nodes, so the AI could use them for specific purposes. Imagine a node that suggests to a Grunt that this is a place to find cover. These hint nodes actually ended up being used in Half-Life 2. In HL1 the code for hint nodes is only found for the Houndeye, where it can investigate buzzing machinery and blinking lights.&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:UBuzlT1.png&amp;diff=475</id>
		<title>File:UBuzlT1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:UBuzlT1.png&amp;diff=475"/>
		<updated>2020-03-25T12:12:58Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:AHxgxAw.png&amp;diff=474</id>
		<title>File:AHxgxAw.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:AHxgxAw.png&amp;diff=474"/>
		<updated>2020-03-25T12:12:22Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:BoVrm08.png&amp;diff=473</id>
		<title>File:BoVrm08.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:BoVrm08.png&amp;diff=473"/>
		<updated>2020-03-25T12:11:53Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:GKabYUx.png&amp;diff=472</id>
		<title>File:GKabYUx.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:GKabYUx.png&amp;diff=472"/>
		<updated>2020-03-25T12:11:09Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:WlKqghy.png&amp;diff=471</id>
		<title>File:WlKqghy.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:WlKqghy.png&amp;diff=471"/>
		<updated>2020-03-25T12:10:39Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:CQZrkhs.png&amp;diff=470</id>
		<title>File:CQZrkhs.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:CQZrkhs.png&amp;diff=470"/>
		<updated>2020-03-25T12:09:59Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:4eJNF4S.jpg&amp;diff=469</id>
		<title>File:4eJNF4S.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:4eJNF4S.jpg&amp;diff=469"/>
		<updated>2020-03-25T12:09:24Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:KsdYcxT.png&amp;diff=468</id>
		<title>File:KsdYcxT.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:KsdYcxT.png&amp;diff=468"/>
		<updated>2020-03-25T12:08:10Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:KhV5Z2u.png&amp;diff=467</id>
		<title>File:KhV5Z2u.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:KhV5Z2u.png&amp;diff=467"/>
		<updated>2020-03-25T12:07:19Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:Wu17QvH.png&amp;diff=466</id>
		<title>File:Wu17QvH.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:Wu17QvH.png&amp;diff=466"/>
		<updated>2020-03-25T12:06:44Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:NSCSirg.jpg&amp;diff=465</id>
		<title>File:NSCSirg.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:NSCSirg.jpg&amp;diff=465"/>
		<updated>2020-03-25T12:06:16Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:VV1RNjq.png&amp;diff=464</id>
		<title>File:VV1RNjq.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:VV1RNjq.png&amp;diff=464"/>
		<updated>2020-03-25T12:05:47Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:Zyqp87F.png&amp;diff=463</id>
		<title>File:Zyqp87F.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:Zyqp87F.png&amp;diff=463"/>
		<updated>2020-03-25T12:04:59Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
	<entry>
		<id>https://wiki.svencoop.com/index.php?title=File:Tc1vzny.png&amp;diff=462</id>
		<title>File:Tc1vzny.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.svencoop.com/index.php?title=File:Tc1vzny.png&amp;diff=462"/>
		<updated>2020-03-25T12:04:24Z</updated>

		<summary type="html">&lt;p&gt;Hezus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Hezus</name></author>
	</entry>
</feed>