<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.larian.game/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xephael</id>
	<title>Divinity Engine Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.larian.game/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Xephael"/>
	<link rel="alternate" type="text/html" href="https://docs.larian.game/Special:Contributions/Xephael"/>
	<updated>2026-06-02T20:39:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3231</id>
		<title>NPC Patrols</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3231"/>
		<updated>2017-09-23T14:19:15Z</updated>

		<summary type="html">&lt;p&gt;Xephael: Typo fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
This page will guide you through the process of implementing NPC pathing and patrols. It's assumed that you know how to do things such as creating a level and using the Root Template Panel. It's recommended you get a feel for the engine by looking through some pages in the [[Community:_Getting_Started|Getting Started]] section.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Different Patrol types ==&lt;br /&gt;
=== SplinePatrol ===&lt;br /&gt;
A spline patrol is the simplest form of patrol. It uses a spline to create a pathway that a character will walk along. There's a basic spline patrol creation guide included below.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Patrol ===&lt;br /&gt;
A patrol set up using triggers. This type of patrol has more control than a spline patrol however it is limited in length to 7 waypoints.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrolOrdered ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrolRandom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrollingGuard ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Guide - Basic Spline Patrol =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Static NPC ==&lt;br /&gt;
To get started, place a character on your level using a character root template. For this tutorial, I've made a dog.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:CreateDogCharacter.png|800px|none|Create a Character]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select your character and edit it however you like. We'll come back to it a bit later.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Patrol Route ==&lt;br /&gt;
In the Root Templates, right-click the Spline section and add a Spline to the level.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline.png|800px|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select it and you will have a new tool on the left.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add Spline Point.png|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select the tool, click the spline, and click the point that you want the patrol to begin. Continue adding points to make the patrol route. (You'll be able to make your NPC pause at each of these points if you wish, so keep that in mind when placing them.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Route.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
When you're done, select the spline once more and copy the GUID value.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Copy_GUID.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Adding the Patrol Script to Your NPC ==&lt;br /&gt;
The Divinity Engine 2 comes with quite a few premade scripts you can add to your characters and items. Select your NPC and find the scripts option in the sidebar under the Character section. It should look something like this:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Scripts in Sidebar.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Open it and find GEN_SplinePatrol. Assign it to the NPC using the arrows in the middle. Select it and change the SplineGUID to the value we copied earlier. SleepAtNode and SleepOnEveryNode can be used to make the NPC pause along the patrol route.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Patrol Settings.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Click &amp;quot;Ok&amp;quot; and playtest the level. The NPC will follow the route of the spline.&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3230</id>
		<title>NPC Patrols</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3230"/>
		<updated>2017-09-23T14:06:47Z</updated>

		<summary type="html">&lt;p&gt;Xephael: Undo revision 3229 by Xephael (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
This page will guide you through the process of implementing NPC pathing and patrols. It's assumed that you know how to do things such as creating a level and using the Root Template Panel. It's recommended you get a feel for the engine by looking through some pages in the [[Community:_Getting_Started|Getting Started]] section.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Different Patrol types ==&lt;br /&gt;
=== SplinePatrol ===&lt;br /&gt;
A spline patrol is the simplest form of patrol. It uses a spline to create a pathway that and character will walk along. There's a basic spline patrol creation guide included below.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Patrol ===&lt;br /&gt;
A patrol set up using triggers. This type of patrol has more control than a spline patrol however it is limited in length to 7 waypoints.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrolOrdered ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrolRandom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrollingGuard ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Guide - Basic Spline Patrol =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Static NPC ==&lt;br /&gt;
To get started, place a character on your level using a character root template. For this tutorial, I've made a dog.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:CreateDogCharacter.png|800px|none|Create a Character]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select your character and edit it however you like. We'll come back to it a bit later.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Patrol Route ==&lt;br /&gt;
In the Root Templates, right-click the Spline section and add a Spline to the level.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline.png|800px|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select it and you will have a new tool on the left.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add Spline Point.png|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select the tool, click the spline, and click the point that you want the patrol to begin. Continue adding points to make the patrol route. (You'll be able to make your NPC pause at each of these points if you wish, so keep that in mind when placing them.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Route.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
When you're done, select the spline once more and copy the GUID value.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Copy_GUID.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Adding the Patrol Script to Your NPC ==&lt;br /&gt;
The Divinity Engine 2 comes with quite a few premade scripts you can add to your characters and items. Select your NPC and find the scripts option in the sidebar under the Character section. It should look something like this:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Scripts in Sidebar.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Open it and find GEN_SplinePatrol. Assign it to the NPC using the arrows in the middle. Select it and change the SplineGUID to the value we copied earlier. SleepAtNode and SleepOnEveryNode can be used to make the NPC pause along the patrol route.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Patrol Settings.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Click &amp;quot;Ok&amp;quot; and playtest the level. The NPC will follow the route of the spline.&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3229</id>
		<title>NPC Patrols</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3229"/>
		<updated>2017-09-23T14:06:26Z</updated>

		<summary type="html">&lt;p&gt;Xephael: Undo revision 3228 by Xephael (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This page will guide you through the process of implementing basic NPC pathing and patrols using splines. It's assumed that you know how to do things such as creating a level and using the Root Template Panel. It's recommended you get a feel for the engine by looking through some pages in the [[Community:_Getting_Started|Getting Started]] section.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Static NPC ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
To get started, place a character on your level using a character root template. For this tutorial, I've made a dog.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:CreateDogCharacter.png|800px|none|Create a Character]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select your character and edit it however you like. We'll come back to it a bit later.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Patrol Route ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
In the Root Templates, right-click the Spline section and add a Spline to the level.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline.png|800px|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select it and you will have a new tool on the left.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add Spline Point.png|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select the tool, click the spline, and click the point that you want the patrol to begin. Continue adding points to make the patrol route. (You'll be able to make your NPC pause at each of these points if you wish, so keep that in mind when placing them.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Route.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
When you're done, select the spline once more and copy the GUID value.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Copy_GUID.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Adding the Patrol Script to Your NPC ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
The Divinity Engine 2 comes with quite a few premade scripts you can add to your characters and items. Select your NPC and find the scripts option in the sidebar under the Character section. It should look something like this:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Scripts in Sidebar.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Open it and find GEN_SplinePatrol. Assign it to the NPC using the arrows in the middle. Select it and change the SplineGUID to the value we copied earlier. SleepAtNode and SleepOnEveryNode can be used to make the NPC pause along the patrol route.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Patrol Settings.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Click &amp;quot;Ok&amp;quot; and playtest the level. The NPC will follow the route of the spline.&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3228</id>
		<title>NPC Patrols</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3228"/>
		<updated>2017-09-23T14:05:34Z</updated>

		<summary type="html">&lt;p&gt;Xephael: Changed format slighting and added different patrol types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
This page will guide you through the process of implementing NPC pathing and patrols. It's assumed that you know how to do things such as creating a level and using the Root Template Panel. It's recommended you get a feel for the engine by looking through some pages in the [[Community:_Getting_Started|Getting Started]] section.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Different Patrol types ==&lt;br /&gt;
=== SplinePatrol ===&lt;br /&gt;
A spline patrol is the simplest form of patrol. It uses a spline to create a pathway that and character will walk along. There's a basic spline patrol creation guide included below.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== Patrol ===&lt;br /&gt;
A patrol set up using triggers. This type of patrol has more control than a spline patrol however it is limited in length to 7 waypoints.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrolOrdered ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrolRandom ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
=== PatrollingGuard ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Guide - Basic Spline Patrol =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Static NPC ==&lt;br /&gt;
To get started, place a character on your level using a character root template. For this tutorial, I've made a dog.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:CreateDogCharacter.png|800px|none|Create a Character]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select your character and edit it however you like. We'll come back to it a bit later.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Patrol Route ==&lt;br /&gt;
In the Root Templates, right-click the Spline section and add a Spline to the level.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline.png|800px|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select it and you will have a new tool on the left.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add Spline Point.png|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select the tool, click the spline, and click the point that you want the patrol to begin. Continue adding points to make the patrol route. (You'll be able to make your NPC pause at each of these points if you wish, so keep that in mind when placing them.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Route.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
When you're done, select the spline once more and copy the GUID value.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Copy_GUID.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Adding the Patrol Script to Your NPC ==&lt;br /&gt;
The Divinity Engine 2 comes with quite a few premade scripts you can add to your characters and items. Select your NPC and find the scripts option in the sidebar under the Character section. It should look something like this:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Scripts in Sidebar.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Open it and find GEN_SplinePatrol. Assign it to the NPC using the arrows in the middle. Select it and change the SplineGUID to the value we copied earlier. SleepAtNode and SleepOnEveryNode can be used to make the NPC pause along the patrol route.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Patrol Settings.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Click &amp;quot;Ok&amp;quot; and playtest the level. The NPC will follow the route of the spline.&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Community_page_submission&amp;diff=3218</id>
		<title>Community page submission</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Community_page_submission&amp;diff=3218"/>
		<updated>2017-09-22T13:51:32Z</updated>

		<summary type="html">&lt;p&gt;Xephael: Added NPC Patrols link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;&lt;br /&gt;
Welcome to the community page submission section.&amp;lt;br /&amp;gt;&lt;br /&gt;
First and foremost: thanks to all of you from everyone at Larian Studios!&amp;lt;br /&amp;gt;&lt;br /&gt;
Without your love and feedback, we wouldn't be where we are today.&lt;br /&gt;
&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
That being said, let's do our best to keep this wiki just as lovely as you guys:&amp;lt;br /&amp;gt;&lt;br /&gt;
# To add your page to the main wiki pages, please add it to the list below.&lt;br /&gt;
# Once our moderators get a chance, they'll review the submissions and move approved pages to the appropriate location on the [[Community editor guides | Editor Guides]] and/or [[Community tutorials | Community Tutorials]] section.&lt;br /&gt;
# We'll leave the page link a couple of days on here with an approval stamp and a link to its new location, to give the editor a chance to find out where his/her page went.&lt;br /&gt;
# We love you all very much, but we do not tolerate any misbehavior. Please refrain from using foul language, messing with other people's pages,...&lt;br /&gt;
# This wiki follows the general open format. Anyone is allowed to edit a page. View an edit to your page as interest in your content, not as criticism.&lt;br /&gt;
# But do try to avoid editing someone else's pages before it has been approved and moved to the main sections, unless of course you have the permission to do so from the original editor.&lt;br /&gt;
# As always, stay awesome [[File: heart.png | 32px]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:LarianLogo_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Example Submission|Example submission]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:LarianLogo_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Pak Extractor Guide|Pak Extractor Guide]]&amp;lt;/b&amp;gt; [[File:LarianLogo_Icon.png|32px]] &amp;lt;b&amp;gt;&amp;lt;font color='green'&amp;gt;APPROVED&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt; ([[Community editor guides|Editor Guides]])&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:LarianLogo_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Tutorial - Implementing a Basic Quest|Tutorial - Implementing a Basic Quest]]&amp;lt;/b&amp;gt; [[File:LarianLogo_Icon.png|32px]] &amp;lt;b&amp;gt;&amp;lt;font color='green'&amp;gt;APPROVED&amp;lt;/font&amp;gt;&amp;lt;/b&amp;gt; ([[Community tutorials|Community Tutorials]])&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:LarianLogo_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[NPC Patrols|NPC Patrols]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3217</id>
		<title>NPC Patrols</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=NPC_Patrols&amp;diff=3217"/>
		<updated>2017-09-22T13:49:24Z</updated>

		<summary type="html">&lt;p&gt;Xephael: How to create NPC patrols using splines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
This page will guide you through the process of implementing basic NPC pathing and patrols using splines. It's assumed that you know how to do things such as creating a level and using the Root Template Panel. It's recommended you get a feel for the engine by looking through some pages in the [[Community:_Getting_Started|Getting Started]] section.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Static NPC ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
To get started, place a character on your level using a character root template. For this tutorial, I've made a dog.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:CreateDogCharacter.png|800px|none|Create a Character]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select your character and edit it however you like. We'll come back to it a bit later.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Creating the Patrol Route ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
In the Root Templates, right-click the Spline section and add a Spline to the level.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline.png|800px|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select it and you will have a new tool on the left.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Add Spline Point.png|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Select the tool, click the spline, and click the point that you want the patrol to begin. Continue adding points to make the patrol route. (You'll be able to make your NPC pause at each of these points if you wish, so keep that in mind when placing them.)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Route.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
When you're done, select the spline once more and copy the GUID value.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Copy_GUID.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Adding the Patrol Script to Your NPC ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
The Divinity Engine 2 comes with quite a few premade scripts you can add to your characters and items. Select your NPC and find the scripts option in the sidebar under the Character section. It should look something like this:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Scripts in Sidebar.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Open it and find GEN_SplinePatrol. Assign it to the NPC using the arrows in the middle. Select it and change the SplineGUID to the value we copied earlier. SleepAtNode and SleepOnEveryNode can be used to make the NPC pause along the patrol route.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:Spline Patrol Settings.png|800px|thumb|none]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Click &amp;quot;Ok&amp;quot; and playtest the level. The NPC will follow the route of the spline.&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=File:Spline_Patrol_Settings.png&amp;diff=3216</id>
		<title>File:Spline Patrol Settings.png</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=File:Spline_Patrol_Settings.png&amp;diff=3216"/>
		<updated>2017-09-22T13:45:52Z</updated>

		<summary type="html">&lt;p&gt;Xephael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=File:Scripts_in_Sidebar.png&amp;diff=3215</id>
		<title>File:Scripts in Sidebar.png</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=File:Scripts_in_Sidebar.png&amp;diff=3215"/>
		<updated>2017-09-22T13:37:48Z</updated>

		<summary type="html">&lt;p&gt;Xephael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=File:Copy_GUID.png&amp;diff=3214</id>
		<title>File:Copy GUID.png</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=File:Copy_GUID.png&amp;diff=3214"/>
		<updated>2017-09-22T13:31:44Z</updated>

		<summary type="html">&lt;p&gt;Xephael: How to copy a GUID&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to copy a GUID&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=File:Spline_Route.png&amp;diff=3213</id>
		<title>File:Spline Route.png</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=File:Spline_Route.png&amp;diff=3213"/>
		<updated>2017-09-22T13:27:28Z</updated>

		<summary type="html">&lt;p&gt;Xephael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=File:Add_Spline_Point.png&amp;diff=3212</id>
		<title>File:Add Spline Point.png</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=File:Add_Spline_Point.png&amp;diff=3212"/>
		<updated>2017-09-22T13:17:43Z</updated>

		<summary type="html">&lt;p&gt;Xephael: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=File:Spline.png&amp;diff=3211</id>
		<title>File:Spline.png</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=File:Spline.png&amp;diff=3211"/>
		<updated>2017-09-22T13:09:24Z</updated>

		<summary type="html">&lt;p&gt;Xephael: Spline in the root templates.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Spline in the root templates.&lt;/div&gt;</summary>
		<author><name>Xephael</name></author>
	</entry>
</feed>