<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://planeshift.top-ix.org//pswiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Talad</id>
	<title>PSwiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://planeshift.top-ix.org//pswiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Talad"/>
	<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php/Special:Contributions/Talad"/>
	<updated>2026-09-06T23:56:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25785</id>
		<title>Unreal Performance Tests</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25785"/>
		<updated>2026-09-02T07:29:21Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PERFORMANCE TESTING for Unreal Migration from 5.4.3 (old) to 5.7.4 (new) &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;
&lt;br /&gt;
1280x720 windowed mode, all settings to EPIC&lt;br /&gt;
&lt;br /&gt;
Numbers are FPS&lt;br /&gt;
&lt;br /&gt;
Note: on Mac I had to upgrade XCode from 15.4 (used by the old release) to 16.2 (used by the new release).&lt;br /&gt;
&lt;br /&gt;
Note: On a PC, textures and render targets live in the GPU&#039;s &#039;&#039;&#039;dedicated VRAM,&#039;&#039;&#039; Apple Silicon uses &#039;&#039;&#039;Unified Memory&#039;&#039;&#039; - CPU and GPU share one physical pool. So on the Mac, that same ~5 GB of textures/render targets shows up &#039;&#039;in the process footprint&#039;&#039; and counts against the RAM you see with &#039;top&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;hydlaa main (worst spot)&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 205529.87, t.loc_y = -313437.28, t.loc_z = 10587, t.loc_yrot = 2.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 46-47  new: 65  (memory used: old: 1.34Gb new: 1.639Gb)&lt;br /&gt;
&lt;br /&gt;
Mac: old: 9.5 new: 2.5!! (memory used: old: 3.381Gb new: 7.375Gb) Here we are trashing memory to swap, as we go above about 1.5Gb of the physical memory. In a case where it was not swapping we got 19FPS.&lt;br /&gt;
&lt;br /&gt;
Linux: old: 24 new: 31 (memory used: old: 1.3Gb new: 1.7Gb)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;harnquist stair, looking towards jayose&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 198075.67, t.loc_y = -315402.4, t.loc_z = 10657.97, t.loc_yrot = 3.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 51  new: 68&lt;br /&gt;
&lt;br /&gt;
Mac: old: 10 (all low 25) new: 20 (all low 55)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 26 new: 34&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;ojaveda top&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 526936.98, t.loc_y = -358348.34, t.loc_z = 16021.26, t.loc_yrot = 5.57 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 76 new: 125&lt;br /&gt;
&lt;br /&gt;
Mac: old: 14.6 new: 32&lt;br /&gt;
&lt;br /&gt;
Linux: old: 32 new: 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;bronze doors&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 127914.89, t.loc_y = -707701.47, t.loc_z = 13639.43, t.loc_yrot = 4.7 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 113 new: 165&lt;br /&gt;
&lt;br /&gt;
Mac: old: 16.3 new: 36.5 (memory used: old: 2.431Gb new: 5.759Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 37 new: 55&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25784</id>
		<title>Unreal Performance Tests</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25784"/>
		<updated>2026-09-02T06:50:25Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PERFORMANCE TESTING for Unreal Migration from 5.4.3 (old) to 5.7.4 (new) &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;
&lt;br /&gt;
1280x720 windowed mode, all settings to EPIC&lt;br /&gt;
&lt;br /&gt;
Numbers are FPS&lt;br /&gt;
&lt;br /&gt;
Note: on Mac I had to upgrade XCode from 15.4 (used by the old release) to 16.2 (used by the new release).&lt;br /&gt;
&lt;br /&gt;
Note: On a PC, textures and render targets live in the GPU&#039;s &#039;&#039;&#039;dedicated VRAM,&#039;&#039;&#039; Apple Silicon uses &#039;&#039;&#039;Unified Memory&#039;&#039;&#039; - CPU and GPU share one physical pool. So on the Mac, that same ~5 GB of textures/render targets shows up &#039;&#039;in the process footprint&#039;&#039; and counts against the RAM you see with &#039;top&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;hydlaa main (worst spot)&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 205529.87, t.loc_y = -313437.28, t.loc_z = 10587, t.loc_yrot = 2.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 46-47  new: 65  (memory used: old: 1.34Gb new: 1.639Gb)&lt;br /&gt;
&lt;br /&gt;
Mac: old: 9.5 new: 2.5!! (memory used: old: 3.381Gb new: 7.375Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 24 new: 31 (memory used: old: 1.3Gb new: 1.7Gb)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;harnquist stair, looking towards jayose&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 198075.67, t.loc_y = -315402.4, t.loc_z = 10657.97, t.loc_yrot = 3.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 51  new: 68&lt;br /&gt;
&lt;br /&gt;
Mac: old: 10 (all low 25) new: 20 (all low 55)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 26 new: 34&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;ojaveda top&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 526936.98, t.loc_y = -358348.34, t.loc_z = 16021.26, t.loc_yrot = 5.57 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 76 new: 125&lt;br /&gt;
&lt;br /&gt;
Mac: old: 14.6 new: 32&lt;br /&gt;
&lt;br /&gt;
Linux: old: 32 new: 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;bronze doors&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 127914.89, t.loc_y = -707701.47, t.loc_z = 13639.43, t.loc_yrot = 4.7 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 113 new: 165&lt;br /&gt;
&lt;br /&gt;
Mac: old: 16.3 new: 36.5 (memory used: old: 2.431Gb new: 5.759Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 37 new: 55&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25783</id>
		<title>Unreal Performance Tests</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25783"/>
		<updated>2026-09-01T23:07:47Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PERFORMANCE TESTING for Unreal Migration from 5.4.3 (old) to 5.7.4 (new) &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;
&lt;br /&gt;
1280x720 windowed mode, all settings to EPIC&lt;br /&gt;
&lt;br /&gt;
Numbers are FPS&lt;br /&gt;
&lt;br /&gt;
Note: on Mac I had to upgrade XCode from 15.4 (used by the old release) to 16.2 (used by the new release).&lt;br /&gt;
&lt;br /&gt;
Note: On a PC, textures and render targets live in the GPU&#039;s &#039;&#039;&#039;dedicated VRAM,&#039;&#039;&#039; Apple Silicon uses &#039;&#039;&#039;Unified Memory&#039;&#039;&#039; - CPU and GPU share one physical pool. So on the Mac, that same ~5 GB of textures/render targets shows up &#039;&#039;in the process footprint&#039;&#039; and counts against the 8 GB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;hydlaa main (worst spot)&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 205529.87, t.loc_y = -313437.28, t.loc_z = 10587, t.loc_yrot = 2.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 46-47  new: 65  (memory used: old: 1.34Gb new: 1.639Gb)&lt;br /&gt;
&lt;br /&gt;
Mac: old: 9.5 new: 2.5!! (memory used: old: 3.381Gb new: 7.375Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 24 new: 31 (memory used: old: 1.3Gb new: 1.7Gb)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;harnquist stair, looking towards jayose&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 198075.67, t.loc_y = -315402.4, t.loc_z = 10657.97, t.loc_yrot = 3.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 51  new: 68&lt;br /&gt;
&lt;br /&gt;
Mac: old: 10 (all low 25) new: 20 (all low 55)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 26 new: 34&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;ojaveda top&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 526936.98, t.loc_y = -358348.34, t.loc_z = 16021.26, t.loc_yrot = 5.57 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 76 new: 125&lt;br /&gt;
&lt;br /&gt;
Mac: old: 14.6 new: 32&lt;br /&gt;
&lt;br /&gt;
Linux: old: 32 new: 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;bronze doors&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 127914.89, t.loc_y = -707701.47, t.loc_z = 13639.43, t.loc_yrot = 4.7 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 113 new: 165&lt;br /&gt;
&lt;br /&gt;
Mac: old: 16.3 new: 36.5 (memory used: old: 2.431Gb new: 5.759Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 37 new: 55&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25782</id>
		<title>Unreal Performance Tests</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25782"/>
		<updated>2026-09-01T22:40:11Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PERFORMANCE TESTING for Unreal Migration from 5.4.3 (old) to 5.7.4 (new) &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;
&lt;br /&gt;
1280x720 windowed mode, all settings to EPIC&lt;br /&gt;
&lt;br /&gt;
Numbers are FPS&lt;br /&gt;
&lt;br /&gt;
Note: on Mac I had to upgrade XCode from 15.4 (used by the old release) to 16.2 (used by the new release).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;hydlaa main (worst spot)&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 205529.87, t.loc_y = -313437.28, t.loc_z = 10587, t.loc_yrot = 2.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 46-47  new: 65  (memory used: old: 1.34Gb new: 1.639Gb)&lt;br /&gt;
&lt;br /&gt;
Mac: old: 9.5 new: 2.5!! (memory used: old: 3.381Gb new: 7.375Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 24 new: 31 (memory used: old: 1.3Gb new: 1.7Gb)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;harnquist stair, looking towards jayose&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 198075.67, t.loc_y = -315402.4, t.loc_z = 10657.97, t.loc_yrot = 3.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 51  new: 68&lt;br /&gt;
&lt;br /&gt;
Mac: old: 10 (all low 25) new: 20 (all low 55)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 26 new: 34&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;ojaveda top&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 526936.98, t.loc_y = -358348.34, t.loc_z = 16021.26, t.loc_yrot = 5.57 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 76 new: 125&lt;br /&gt;
&lt;br /&gt;
Mac: old: 14.6 new: 32&lt;br /&gt;
&lt;br /&gt;
Linux: old: 32 new: 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;bronze doors&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 127914.89, t.loc_y = -707701.47, t.loc_z = 13639.43, t.loc_yrot = 4.7 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 113 new: 165&lt;br /&gt;
&lt;br /&gt;
Mac: old: 16.3 new: 36.5 (memory used: old: 2.431Gb new: 5.759Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 37 new: 55&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25781</id>
		<title>Unreal Performance Tests</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Unreal_Performance_Tests&amp;diff=25781"/>
		<updated>2026-09-01T22:32:05Z</updated>

		<summary type="html">&lt;p&gt;Talad: Created page with &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PERFORMANCE TESTING for Unreal Migration from 5.4.3 (old) to 5.7.4 (new) &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;  1280x720 windowed mode, all settings to EPIC  Numbers are FPS  &amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;hydlaa main (worst spot)  UPDATE planeshift_prod2.characters t SET t.loc_x = 205529.87, t.loc_y = -313437.28, t.loc_z = 10587, t.loc_yrot = 2.6 WHERE t.id = 9087604;  Windows: old: 46-47  new: 65  (memory used: old: 1.34Gb new: 1.639Gb)  Mac: old: 9.5 new: 2.5!! (memory used: old: 3.381Gb new: 7.375Gb)  L...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; PERFORMANCE TESTING for Unreal Migration from 5.4.3 (old) to 5.7.4 (new) &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;br /&gt;
&lt;br /&gt;
1280x720 windowed mode, all settings to EPIC&lt;br /&gt;
&lt;br /&gt;
Numbers are FPS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;hydlaa main (worst spot)&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 205529.87, t.loc_y = -313437.28, t.loc_z = 10587, t.loc_yrot = 2.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 46-47  new: 65  (memory used: old: 1.34Gb new: 1.639Gb)&lt;br /&gt;
&lt;br /&gt;
Mac: old: 9.5 new: 2.5!! (memory used: old: 3.381Gb new: 7.375Gb)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 24 new: 31 (memory used: old: 1.3Gb new: 1.7Gb)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;harnquist stair, looking towards jayose&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 198075.67, t.loc_y = -315402.4, t.loc_z = 10657.97, t.loc_yrot = 3.6 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 51  new: 68&lt;br /&gt;
&lt;br /&gt;
Mac: old: 10 (all low 25) new: 20 (all low 55)&lt;br /&gt;
&lt;br /&gt;
Linux: old: 26 new: 34&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;ojaveda top&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 526936.98, t.loc_y = -358348.34, t.loc_z = 16021.26, t.loc_yrot = 5.57 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 76 new: 125&lt;br /&gt;
&lt;br /&gt;
Mac: old: 14.6 new: 32&lt;br /&gt;
&lt;br /&gt;
Linux: old: 32 new: 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;bronze doors&lt;br /&gt;
&lt;br /&gt;
UPDATE planeshift_prod2.characters t SET t.loc_x = 127914.89, t.loc_y = -707701.47, t.loc_z = 13639.43, t.loc_yrot = 4.7 WHERE t.id = 9087604;&lt;br /&gt;
&lt;br /&gt;
Windows: old: 113 new: 165&lt;br /&gt;
&lt;br /&gt;
Mac: old: 16.3 new: 36.5&lt;br /&gt;
&lt;br /&gt;
Linux: old: 37 new: 55&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Programming&amp;diff=25780</id>
		<title>PSUnreal Programming</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Programming&amp;diff=25780"/>
		<updated>2026-09-01T22:03:00Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* PS Unreal Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Installation of Unreal Engine ==&lt;br /&gt;
&lt;br /&gt;
The overall process begins by installing Unreal Engine and building from source, then follows through the PSUnreal setup page.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 85%;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| http://www.planeshift.it/graphics/bullets/windows_icon.png|| http://www.planeshift.it/graphics/bullets/linux_icon.png || http://www.planeshift.it/graphics/bullets/mac_icon.png&lt;br /&gt;
|-&lt;br /&gt;
| [[Building PSUnreal on Windows]]|| [[Building PSUnreal on Linux]]|| [[Building PSUnreal on macOS]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Errors in Database connection]]&lt;br /&gt;
&lt;br /&gt;
[[Errors Unreal Compile]]&lt;br /&gt;
&lt;br /&gt;
[[Errors in Running the client]]&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
&lt;br /&gt;
[[Best tutorials to start]] with UE&lt;br /&gt;
&lt;br /&gt;
[[Packing and shipping a project]]&lt;br /&gt;
&lt;br /&gt;
[[CS Code convertion]]&lt;br /&gt;
&lt;br /&gt;
[[PSUnreal Classes]]&lt;br /&gt;
&lt;br /&gt;
[[PSUnreal Navigation Meshes]]&lt;br /&gt;
&lt;br /&gt;
[[Engine inner working]]&lt;br /&gt;
&lt;br /&gt;
[[List of all Unreal Engine Log categories]]&lt;br /&gt;
&lt;br /&gt;
[[Build one Unreal Engine Plugin only]]&lt;br /&gt;
&lt;br /&gt;
Check this article if you are suffering from slow Intellisense parsing: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/65252-for-those-who-suffer-from-visual-studio-intellisense-slowness&lt;br /&gt;
&lt;br /&gt;
[[Network load]]&lt;br /&gt;
&lt;br /&gt;
[[PSUnreal GDB Debug Hints]]&lt;br /&gt;
&lt;br /&gt;
[[PNG File Validation]]&lt;br /&gt;
&lt;br /&gt;
[[Enhanced Input]]&lt;br /&gt;
&lt;br /&gt;
[[JetBrains Rider]]&lt;br /&gt;
&lt;br /&gt;
== PS Unreal Engine ==&lt;br /&gt;
&lt;br /&gt;
Put here the notes of our architecture for Unreal.&lt;br /&gt;
&lt;br /&gt;
[[PSUECharacter setup]]&lt;br /&gt;
&lt;br /&gt;
[[Unreal Performance Tests]]&lt;br /&gt;
&lt;br /&gt;
== Update Unreal Engine and Git commands ==&lt;br /&gt;
If you messed up your repository, try: git reset --hard&lt;br /&gt;
&lt;br /&gt;
If you miss files try : git checkout .&lt;br /&gt;
&lt;br /&gt;
To update to a newer UE version:&lt;br /&gt;
&lt;br /&gt;
* git fetch&lt;br /&gt;
* git reset --hard (to discard local changes in case you have)&lt;br /&gt;
* git checkout 5.1.1-release --force&lt;br /&gt;
* (OPTIONAL to check if you have the right version now) git status&lt;br /&gt;
* (OPTIONAL if things go bad) Delete all files contained in UnrealEngine\Intermediate AND PSUnreal\Intermediate&lt;br /&gt;
* launch Setup.bat to update dependencies&lt;br /&gt;
* launch GenerateProjectFiles.bat&lt;br /&gt;
* COPY the files under PSUnreal\UESource in UnrealEngine main dir&lt;br /&gt;
* Clean the UE4 project from VS&lt;br /&gt;
* Rebuild UE from VS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see tags:&lt;br /&gt;
* git tag --list (to list all available new tags)&lt;br /&gt;
* git log --tags --simplify-by-decoration --pretty=&amp;quot;format:%ai %d&amp;quot;  (to see all tags with dates)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you get an error for the new authentication token: &amp;quot;Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See: https://magecomp.com/blog/generate-personal-access-token-github/&lt;br /&gt;
&lt;br /&gt;
and use this for the last line: git remote set-url origin https://&amp;lt;token&amp;gt;@github.com/EpicGames/UnrealEngine.git/&lt;br /&gt;
&lt;br /&gt;
== Advanced Locomotion System (ALS_CPP v4) ==&lt;br /&gt;
[[ALS for UE5.4]]&lt;br /&gt;
&lt;br /&gt;
[[ALS Idle Animations]]&lt;br /&gt;
&lt;br /&gt;
== Alternative Update Unreal Engine using Tortoise Git GUI ==&lt;br /&gt;
&lt;br /&gt;
[https://tortoisegit.org/download/ Get TortoiseGit here].&lt;br /&gt;
&lt;br /&gt;
To update to a newer UE version, In windows explorer right click on folder containing Unreal engine then:&lt;br /&gt;
&lt;br /&gt;
* Delete all files contained in PSUnreal\Intermediate and UnrealEngine\Engine\Intermediate&lt;br /&gt;
* select &amp;gt; TortoiseGit &amp;gt; fetch. (make sure in window that opens &amp;quot;tags&amp;quot; is selected under options&lt;br /&gt;
* TortoiseGit &amp;gt; revert (to discard local changes in case you have)&lt;br /&gt;
* TortoiseGit &amp;gt; switch/checkout&lt;br /&gt;
** Then select tag and choose 5.1.1-release from dropdown&lt;br /&gt;
** Under options only have &amp;quot;overwrite working tree changes (force)&amp;quot; selected&lt;br /&gt;
** Press &amp;quot;ok&amp;quot; and allow it to update.&lt;br /&gt;
* Copy files in PSUnreal\UESource &amp;gt; to the appropriate folder in UnrealEngine\Engine\Source.&lt;br /&gt;
* launch Setup.bat to update dependencies&lt;br /&gt;
* launch GenerateProjectFiles.bat&lt;br /&gt;
* Clean the UE4 project from VS&lt;br /&gt;
* Rebuild&lt;br /&gt;
&lt;br /&gt;
== Unreal Engine 5 ==&lt;br /&gt;
1) Tried minimal clone as the full one was failing continuously. This will create a subdirectory called 5.4.3-release&amp;lt;blockquote&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/EpicGames/UnrealEngine.git&amp;lt;/nowiki&amp;gt; --depth=1 --single-branch 5.4.3-release&amp;lt;/blockquote&amp;gt;2) Setup.bat (or .sh or .command)&lt;br /&gt;
&lt;br /&gt;
3) GenerateProjectFiles.bat ( or .sh or .command)&lt;br /&gt;
&lt;br /&gt;
3) From VS 2022, it required install of Net framework 3.1, done.&lt;br /&gt;
&lt;br /&gt;
4) open UE5.sln and Build Unreal Engine 5 with Development Editor configuration and Win64 Platform&lt;br /&gt;
&lt;br /&gt;
== Other Stuff ==&lt;br /&gt;
[[Compiling Mumble Lib]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Linux&amp;diff=25779</id>
		<title>Building PSUnreal on Linux</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Linux&amp;diff=25779"/>
		<updated>2026-08-30T11:29:34Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Building PSUnreal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Building UEEditor on Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
  https://docs.unrealengine.com/en-US/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html&lt;br /&gt;
&lt;br /&gt;
  https://www.ue4community.wiki/Legacy/Running_On_Linux&lt;br /&gt;
  https://www.ue4community.wiki/Legacy/Cooking_On_Linux&lt;br /&gt;
&lt;br /&gt;
  [[Some Linux commands]]&lt;br /&gt;
&lt;br /&gt;
=== Installation steps ===&lt;br /&gt;
&lt;br /&gt;
# Register for a free account at github.com&lt;br /&gt;
# Per the first link above, join the unreal project &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to install all dependencies first&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo apt-key update&lt;br /&gt;
  &amp;gt; sudo apt-get update&lt;br /&gt;
  &amp;gt; sudo apt-get upgrade&lt;br /&gt;
  &amp;gt; sudo apt-get install git&lt;br /&gt;
&lt;br /&gt;
get source code. On Linux I had to use the SSH git URL. I had to create a new key with:&lt;br /&gt;
  &amp;gt; ssh-keygen -t ed25519 -C my@email.it&lt;br /&gt;
  &amp;gt; ssh-add ~/.ssh/id_ed25519&lt;br /&gt;
  &amp;gt; cat ~/.ssh/id_ed25519.pub (and copy the result in github.com under Settings add new SSH Key)&lt;br /&gt;
  &amp;gt; ssh -T git@github.com (then this command should give you a success result)&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; git clone --depth=1 --single-branch -b 5.7.4-release git@github.com:EpicGames/UnrealEngine.git 5.7.4-release&lt;br /&gt;
&lt;br /&gt;
this will create a &amp;quot;5.4.3-release&amp;quot; directory as child of the dir where you run the command&lt;br /&gt;
&lt;br /&gt;
Launch the setup to download &#039;&#039;&#039;19.2Gb&#039;&#039;&#039; of dependencies&lt;br /&gt;
  &amp;gt; ./Setup.sh&lt;br /&gt;
&lt;br /&gt;
Generate project files&lt;br /&gt;
  &amp;gt; ./GenerateProjectFiles.sh&lt;br /&gt;
&lt;br /&gt;
Build UnrealEngine (this builds Shipping)&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
Build UnrealEngine (this buildings Development)&lt;br /&gt;
 ./Engine/Build/BatchFiles/Linux/Build.sh UnrealEditor Linux Development&lt;br /&gt;
&lt;br /&gt;
== Running the editor ==&lt;br /&gt;
&lt;br /&gt;
Before moving to PlaneShift Unreal, its best to test if the standard Unreal Engine works.&lt;br /&gt;
&lt;br /&gt;
To do this you need to have X available. If you are in a server only configuration, you need to install X.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo apt-get install xinit&lt;br /&gt;
  &amp;gt; sudo apt-get install ubuntu-desktop&lt;br /&gt;
&lt;br /&gt;
and you need then to start it:&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo startx&lt;br /&gt;
&lt;br /&gt;
When you are in X, open a terminal window and&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; cd Engine/Binaries/Linux/&lt;br /&gt;
  &amp;gt; ./UE4Editor&lt;br /&gt;
&lt;br /&gt;
== Building PSUnreal ==&lt;br /&gt;
&lt;br /&gt;
Download the PSUnreal project&lt;br /&gt;
  &amp;gt; cd \&lt;br /&gt;
  &amp;gt; svn co svn://xxx.xxx.xxx/psunreal/PSUnreal PSUnreal&lt;br /&gt;
&lt;br /&gt;
You need to install &#039;&#039;&#039;MariaDB Connector&#039;&#039;&#039; from: https://mariadb.com/downloads/#connectors&lt;br /&gt;
&lt;br /&gt;
* Select C connector and the linux platform&lt;br /&gt;
* PLEASE NOTE UBUNTU 20.4 requires the new version of mariadb connector: mariadb-connector-c-3.1.11-ubuntu-focal-amd64.tar.gz or you will get a libssl1.0 error when running the server.&lt;br /&gt;
* Extract in a temporary directory the file you get&lt;br /&gt;
  tar -xzvf mariadb-connector-c-3.1.7-linux-x86_64.tar.gz &lt;br /&gt;
&lt;br /&gt;
* From the MariaDB extracted directory, copy both &amp;lt;code&amp;gt;lib/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;include/&amp;lt;/code&amp;gt; (with subfolders) into &amp;lt;code&amp;gt;PSUnreal\ThirdParty\MariaDB\&amp;lt;/code&amp;gt;&lt;br /&gt;
  cp -r * /home/planeshift/PSUnreal/ThirdParty/MariaDB/&lt;br /&gt;
&lt;br /&gt;
* Recompile Wordnet&lt;br /&gt;
  &amp;gt; cd /home/planeshift/PSUnreal/ThirdParty/Wordnet/&lt;br /&gt;
  &amp;gt; cd /home/planeshift/disk2/PSUnreal511/ThirdParty/Wordnet/&lt;br /&gt;
  &amp;gt; gcc -c -fPIC *.h *.c -Wformat-overflow=0&lt;br /&gt;
  &amp;gt; ar -cvq libWordnet.so *.o&lt;br /&gt;
  &amp;gt; mv libWordnet.so lib/x64/Wordnet.so&lt;br /&gt;
&lt;br /&gt;
* generate project files&lt;br /&gt;
  &amp;gt; /home/planeshift/UnrealEngine/GenerateProjectFiles.sh -project=&amp;quot;/home/planeshift/PSUnreal/PSUnreal.uproject&amp;quot; -game -engine&lt;br /&gt;
  &amp;gt; /home/planeshift/disk2/5.1.1-release/GenerateProjectFiles.sh -project=&amp;quot;/home/planeshift/disk2/PSUnreal511/PSUnreal.uproject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* recompile the project&lt;br /&gt;
  &amp;gt; /home/planeshift/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh PSUnrealEditor Linux Development -Project=&amp;quot;/home/planeshift/PSUnreal/PSUnreal.uproject&amp;quot;&lt;br /&gt;
  &amp;gt; /home/planeshift/disk2/5.1.1-release/Engine/Build/BatchFiles/Linux/Build.sh PSUnrealEditor Linux Development -Project=&amp;quot;/home/planeshift/disk2/PSUnreal511/PSUnreal.uproject&amp;quot;&lt;br /&gt;
  &amp;gt; /home/luke/External/5.7.4-release/Engine/Build/BatchFiles/Linux/Build.sh PSUnrealEditor Linux Development -Project=&amp;quot;/home/luke/PSUnreal511/PSUnreal.uproject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Be sure to have Unreal Engine find all the libraries needed&lt;br /&gt;
  &amp;gt; export LD_LIBRARY_PATH=/home/planeshift/UnrealEngine/Engine/Binaries/Linux:/home/planeshift/PSUnreal/ThirdParty/MariaDB/lib/mariadb&lt;br /&gt;
&lt;br /&gt;
== Package Development server and client ==&lt;br /&gt;
/mnt/nvme/ue/UnrealEngine-4.27/Engine/Build/BatchFiles/RunUAT.sh -ScriptsForProject=&amp;lt;PATH TO PROJECT&amp;gt;.uproject BuildCookRun -project=&amp;lt;PATH TO PROJECT&amp;gt;.uproject -noP4 -clientconfig=Development -serverconfig=Development -utf8output -platform=Linux -server -serverplatform=Linux -targetplatform=Linux -build -cook -allmaps -compressed -stage -archive -unversionedcookedcontent -archivedirectory=&amp;quot;&amp;lt;Archive Dir&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== File couldn&#039;t be loaded by the OS===&lt;br /&gt;
&lt;br /&gt;
I got this error:&lt;br /&gt;
&lt;br /&gt;
  [2020.05.05-17.04.04:228][  0]LogCore: Warning: dlopen failed: (null)&lt;br /&gt;
  [2020.05.05-17.04.04:228][  0]LogModuleManager: Warning: ModuleManager: Unable to load module &#039;/home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUnreal.so&#039; because the file couldn&#039;t be loaded by the OS.&lt;br /&gt;
&lt;br /&gt;
So I used this to get the list of libraries he is in need of&lt;br /&gt;
&lt;br /&gt;
  ldd /home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUnreal.so&lt;br /&gt;
&lt;br /&gt;
and then added the export LD_LIBRARY_PATH mentioned above, and it worked&lt;br /&gt;
&lt;br /&gt;
Same error on PSUpdater module:&lt;br /&gt;
&lt;br /&gt;
[2020.07.03-14.59.50:796][  0]LogModuleManager: Warning: ModuleManager: Unable to load module &#039;/home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUpdater.so&#039; because the file couldn&#039;t be loaded by the OS.&lt;br /&gt;
&lt;br /&gt;
  ldd /home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUpdater.so&lt;br /&gt;
&lt;br /&gt;
I set the environment variable LD_DEBUG and then launch the program&lt;br /&gt;
export LD_DEBUG=libs&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t connect to local MySQL server ===&lt;br /&gt;
&lt;br /&gt;
Error: Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)&lt;br /&gt;
&lt;br /&gt;
Check your /etc/mysql/my.cnf , and see where is the socket location. for me it was /var/run/mysqld/mysqld.sock , so I added a symbolic link to it.&lt;br /&gt;
&lt;br /&gt;
  ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some errors that you may encounter along the way ===&lt;br /&gt;
&lt;br /&gt;
You see a file named something like &amp;quot;GitDependencies-crash.log&amp;quot; in your UnrealEngine directory. The contents of the file contains this message:&lt;br /&gt;
&lt;br /&gt;
  mono GitDependencies.exe --prompt crashed with return code 134&lt;br /&gt;
&lt;br /&gt;
Solution: Ensure your copy of mono is up to date and rerun the Setup.sh script&lt;br /&gt;
At time of writing, I am using mono 3.2.8&lt;br /&gt;
&lt;br /&gt;
Reason - This could be due to an old version of mono, but it seems to happen for other reasons too.&lt;br /&gt;
&lt;br /&gt;
Should probably clean and recompile UEEditor at this point.&lt;br /&gt;
&lt;br /&gt;
=== error while loading shared libraries: libLND.so ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
user@u13:~/Development/UnrealEngine/Engine/Binaries/Linux$ ./UE4Editor &lt;br /&gt;
./UE4Editor: error while loading shared libraries: libLND.so: cannot open shared object file: No such file or directory&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix this, copy libLND.so (there are several flavors) from another directory to the Binaries/Linux directory. Do not use a symbolic link, just make a copy of the file. On my installation, a sym link worked in some places but failed in miserably others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ find ../../../../ -name libLND.so -print&lt;br /&gt;
../../../../UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/lib/Linux/x86_64-unknown-linux-gnu/libLND.so&lt;br /&gt;
cp ../../../../UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/lib/Linux/x86_64-unknown-linux-gnu/libLND.so .&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some fonts are in the wrong place. Its important to fix this ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-07.28.52:548][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Slate/Fonts/Roboto-Italic.ttf&#039;&lt;br /&gt;
$ find ../../../ -name Roboto-Italic.ttf -print&lt;br /&gt;
../../../Engine/Content/Editor/Slate/Fonts/Roboto-Italic.ttf&lt;br /&gt;
../../../Engine/Content/Slate/Testing/Fonts/Roboto-Italic.ttf&lt;br /&gt;
cp ../../../Engine/Content/Editor/Slate/Fonts/*  ../../../Engine/Content/Slate/Fonts/&lt;br /&gt;
cp ../../../Engine/Content/Slate/Testing/Fonts/* ../../../Engine/Content/Slate/Fonts/&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I don&#039;t know what to do about these two errors yet ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-07.29.12:524][  0]LogDirectoryWatcher:Error: inotify_add_watch cannot watch folder /home/user/Development/UnrealEngine/Engine/Plugins/Experimental/CharacterAI/Content/&lt;br /&gt;
[2015.05.03-07.29.12:524][  0]LogDirectoryWatcher:Warning: Failed to begin reading directory changes for ../../../Engine/Plugins/Experimental/CharacterAI/Content/.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== asoundlib error after adding voice and midi modules ===&lt;br /&gt;
   /home/planeshift/PSUnreal/Plugins/MidiAsset/Source/MidiInterface/Classes/RtMidi.cpp:1449:10: fatal error: &#039;alsa/asoundlib.h&#039; file not found&lt;br /&gt;
   #include &amp;lt;alsa/asoundlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Had to:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; sudo apt-get install libasound2-dev libasound2&lt;br /&gt;
==Manual Compile==&lt;br /&gt;
&lt;br /&gt;
===Create and Save the &amp;quot;Blank&amp;quot; project from the Blueprint Tab===&lt;br /&gt;
&lt;br /&gt;
once you have the Editor open and working, create the &amp;quot;Blank&amp;quot; project and save it. We need to do this, otherwise we will not be able to cook content later on and will get an error message stating that some folder ( /Saved/Sandbox/DefaultGame/ ? )  is missing. This seems to be some sort of a bug or perhaps lazy initialization. &lt;br /&gt;
&lt;br /&gt;
#Open the editor&lt;br /&gt;
#Click on New Project&lt;br /&gt;
# Click on &amp;quot;Blank&amp;quot;  ( In the Blueprint tab, not the one in the C++ tab )&lt;br /&gt;
# Click &amp;quot;Create Project&amp;quot;&lt;br /&gt;
#Save All and exit for now.&lt;br /&gt;
&lt;br /&gt;
===Clone and Import the psunreal project:===&lt;br /&gt;
&lt;br /&gt;
Get the svn password and the link from Talad. We are going to download the source and put it into the UnrealEngine directory in order to work around yet another bug. After that, we run GenerateProjectFiles.sh once more to add our project to The Makefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cd ~/Development/UnrealEngine/&lt;br /&gt;
svn co svn://super.secret.source.path&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we now have ~/Development/UnrealEngine/psunreal. Run the script below to add our project to the Makefile &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./GenerateProjectFiles.sh &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open the PSUNREAL project ( finally.. )===&lt;br /&gt;
&lt;br /&gt;
Click File and then Open Project&lt;br /&gt;
&lt;br /&gt;
You will now see the Blank Project and another named MyProject2 ( that&#039;s ours )&lt;br /&gt;
&lt;br /&gt;
Click MyProject2 and then open.&lt;br /&gt;
&lt;br /&gt;
You will get another error message:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a few errors about missing Android stuff. I don&#039;t we need to worry about this.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-08.14.15:716][  0]LogModuleManager:Warning: ModuleManager: Unable to load module &#039;AndroidRuntimeSettings&#039; because the file &#039;/home/user/Development2/UnrealEngine/Engine/Binaries/Linux/&#039; was not found.&lt;br /&gt;
&lt;br /&gt;
[2015.05.03-08.14.15:719][  0]LogModuleManager:Warning: ModuleManager: Unable to load module &#039;AndroidPlatformEditor&#039; because the file &#039;/home/user/Development2/UnrealEngine/Engine/Binaries/Linux/&#039; was not found.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this missing font, we need to repeat the solution above for Roboto-Italic...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-08.14.18:469][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Editor/Slate/Fonts/Roboto-Regular.ttf&#039;&lt;br /&gt;
[2015.05.03-08.14.18:471][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Editor/Slate/Fonts/Roboto-Bold.ttf&#039;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Building, cooking, packaging... oh my.===&lt;br /&gt;
&lt;br /&gt;
So when you build the game there are several things that need to be built: &lt;br /&gt;
*shaders&lt;br /&gt;
* the code itself&lt;br /&gt;
*some lighting resources&lt;br /&gt;
&lt;br /&gt;
You also need to cook the game&#039;s content. This means, you are taking all the art, models, textures, etc.. and converting them into a format that the Unreal engine likes. When you go to build the game for another platform - like an android tablet, pc, mac, or whatever, it will convert those &amp;quot;assets&amp;quot; into a format that is more suitable for the target platform.&lt;br /&gt;
&lt;br /&gt;
After you have cooked the content, you should be able to &amp;quot;package&amp;quot; the game. This simply means, you are setting up the files that will be distributed to the client. They will be formatted to work on the target platform and will be laid out into a directory structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setting up the server===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions in the &amp;quot;Planeshift Compiling Guide&amp;quot; for setting up the mysql database. You&#039;ll need to set it up ( either Mariadb or mysql ) and then run a few scripts to get a planeshift user account set up along with some needed data.&lt;br /&gt;
&lt;br /&gt;
When you run the new unreal server ( make target is: MyProject2Server ), it will attempt to connect to the DB. If successful, you will see something like this in the shell that you ran it from:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogWorld: Bringing up level for play took: 0.000330&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogTemp:Warning: Hello world! BEFORE&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogTemp: Hello world! AFTER 4 5&lt;br /&gt;
[2015.05.02-08.25.58:371][  0]LOG_STARTUP:Display: Database Host: &#039;localhost&#039; User: &#039;planeshift&#039; Databasename: &#039;planeshift&#039; Port: 128880496&lt;br /&gt;
[2015.05.02-08.25.58:559][  0]LOG_STARTUP:Display: Started Database with version: 1279&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You can also check to see if the server connected to your mysql or mariadb server by making a simple script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  SELECT SUBSTRING_INDEX(host, &#039;:&#039;, 1) AS host_short,&lt;br /&gt;
            GROUP_CONCAT(DISTINCT USER)   AS users,&lt;br /&gt;
            COUNT(*)&lt;br /&gt;
     FROM   information_schema.processlist&lt;br /&gt;
     GROUP  BY host_short&lt;br /&gt;
     ORDER  BY COUNT(*),&lt;br /&gt;
               host_short;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this to a file called show_connected.sql and then log into the db and run it from there.&lt;br /&gt;
               &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  $ mysql -u root -pMYSECRETPASSWORD&lt;br /&gt;
  Welcome to the MariaDB monitor.  Commands end with ; or \g.&lt;br /&gt;
  Your MariaDB connection id is 51&lt;br /&gt;
  Server version: 5.5.41-MariaDB-1ubuntu0.14.10.1 (Ubuntu)&lt;br /&gt;
  Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.&lt;br /&gt;
  Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the current input statement.&lt;br /&gt;
  MariaDB $ \. show_connected.sql&lt;br /&gt;
  +------------+-----------------+----------+&lt;br /&gt;
  | host_short | users           | COUNT(*) | &lt;br /&gt;
  +------------+-----------------+----------+&lt;br /&gt;
  | localhost  | planeshift,root |        2 |&lt;br /&gt;
  +------------+-----------------+----------+ &lt;br /&gt;
  1 row in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===cmake command for libzip===&lt;br /&gt;
  mkdir build&lt;br /&gt;
  cd build&lt;br /&gt;
  &amp;gt;cmake -DZLIB_LIBRARY=/home/planeshift/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8/lib/Linux/x86_64-unknown-linux-gnu/libz_fPIC.a -DZLIB_INCLUDE_DIR=/home/planeshift/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8/include/Linux/x86_64-unknown-linux-gnu/ -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===build xdelta===&lt;br /&gt;
  cd xdelta/xdelta3&lt;br /&gt;
  rm -rf build&lt;br /&gt;
  mkdir build&lt;br /&gt;
  cd build&lt;br /&gt;
&lt;br /&gt;
I had to add -fPIC to this line:&lt;br /&gt;
  vi CMakeLists.txt&lt;br /&gt;
&lt;br /&gt;
 set(CMAKE_C_FLAGS &amp;quot;${CMAKE_C_FLAGS} -fPIC -DSIZEOF_SIZE_T=8 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  cmake ..&lt;br /&gt;
  cmake --build .&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Linux&amp;diff=25778</id>
		<title>Building PSUnreal on Linux</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Linux&amp;diff=25778"/>
		<updated>2026-08-30T10:27:15Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Installation steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Building UEEditor on Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
  https://docs.unrealengine.com/en-US/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html&lt;br /&gt;
&lt;br /&gt;
  https://www.ue4community.wiki/Legacy/Running_On_Linux&lt;br /&gt;
  https://www.ue4community.wiki/Legacy/Cooking_On_Linux&lt;br /&gt;
&lt;br /&gt;
  [[Some Linux commands]]&lt;br /&gt;
&lt;br /&gt;
=== Installation steps ===&lt;br /&gt;
&lt;br /&gt;
# Register for a free account at github.com&lt;br /&gt;
# Per the first link above, join the unreal project &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to install all dependencies first&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo apt-key update&lt;br /&gt;
  &amp;gt; sudo apt-get update&lt;br /&gt;
  &amp;gt; sudo apt-get upgrade&lt;br /&gt;
  &amp;gt; sudo apt-get install git&lt;br /&gt;
&lt;br /&gt;
get source code. On Linux I had to use the SSH git URL. I had to create a new key with:&lt;br /&gt;
  &amp;gt; ssh-keygen -t ed25519 -C my@email.it&lt;br /&gt;
  &amp;gt; ssh-add ~/.ssh/id_ed25519&lt;br /&gt;
  &amp;gt; cat ~/.ssh/id_ed25519.pub (and copy the result in github.com under Settings add new SSH Key)&lt;br /&gt;
  &amp;gt; ssh -T git@github.com (then this command should give you a success result)&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; git clone --depth=1 --single-branch -b 5.7.4-release git@github.com:EpicGames/UnrealEngine.git 5.7.4-release&lt;br /&gt;
&lt;br /&gt;
this will create a &amp;quot;5.4.3-release&amp;quot; directory as child of the dir where you run the command&lt;br /&gt;
&lt;br /&gt;
Launch the setup to download &#039;&#039;&#039;19.2Gb&#039;&#039;&#039; of dependencies&lt;br /&gt;
  &amp;gt; ./Setup.sh&lt;br /&gt;
&lt;br /&gt;
Generate project files&lt;br /&gt;
  &amp;gt; ./GenerateProjectFiles.sh&lt;br /&gt;
&lt;br /&gt;
Build UnrealEngine (this builds Shipping)&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
Build UnrealEngine (this buildings Development)&lt;br /&gt;
 ./Engine/Build/BatchFiles/Linux/Build.sh UnrealEditor Linux Development&lt;br /&gt;
&lt;br /&gt;
== Running the editor ==&lt;br /&gt;
&lt;br /&gt;
Before moving to PlaneShift Unreal, its best to test if the standard Unreal Engine works.&lt;br /&gt;
&lt;br /&gt;
To do this you need to have X available. If you are in a server only configuration, you need to install X.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo apt-get install xinit&lt;br /&gt;
  &amp;gt; sudo apt-get install ubuntu-desktop&lt;br /&gt;
&lt;br /&gt;
and you need then to start it:&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo startx&lt;br /&gt;
&lt;br /&gt;
When you are in X, open a terminal window and&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; cd Engine/Binaries/Linux/&lt;br /&gt;
  &amp;gt; ./UE4Editor&lt;br /&gt;
&lt;br /&gt;
== Building PSUnreal ==&lt;br /&gt;
&lt;br /&gt;
Download the PSUnreal project&lt;br /&gt;
  &amp;gt; cd \&lt;br /&gt;
  &amp;gt; svn co svn://xxx.xxx.xxx/psunreal/PSUnreal PSUnreal&lt;br /&gt;
&lt;br /&gt;
You need to install &#039;&#039;&#039;MariaDB Connector&#039;&#039;&#039; from: https://mariadb.com/downloads/#connectors&lt;br /&gt;
&lt;br /&gt;
* Select C connector and the linux platform&lt;br /&gt;
* PLEASE NOTE UBUNTU 20.4 requires the new version of mariadb connector: mariadb-connector-c-3.1.11-ubuntu-focal-amd64.tar.gz or you will get a libssl1.0 error when running the server.&lt;br /&gt;
* Extract in a temporary directory the file you get&lt;br /&gt;
  tar -xzvf mariadb-connector-c-3.1.7-linux-x86_64.tar.gz &lt;br /&gt;
&lt;br /&gt;
* From the MariaDB extracted directory, copy both &amp;lt;code&amp;gt;lib/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;include/&amp;lt;/code&amp;gt; (with subfolders) into &amp;lt;code&amp;gt;PSUnreal\ThirdParty\MariaDB\&amp;lt;/code&amp;gt;&lt;br /&gt;
  cp -r * /home/planeshift/PSUnreal/ThirdParty/MariaDB/&lt;br /&gt;
&lt;br /&gt;
* Recompile Wordnet&lt;br /&gt;
  &amp;gt; cd /home/planeshift/PSUnreal/ThirdParty/Wordnet/&lt;br /&gt;
  &amp;gt; cd /home/planeshift/disk2/PSUnreal511/ThirdParty/Wordnet/&lt;br /&gt;
  &amp;gt; gcc -c -fPIC *.h *.c -Wformat-overflow=0&lt;br /&gt;
  &amp;gt; ar -cvq libWordnet.so *.o&lt;br /&gt;
  &amp;gt; mv libWordnet.so lib/x64/Wordnet.so&lt;br /&gt;
&lt;br /&gt;
* generate project files&lt;br /&gt;
  &amp;gt; /home/planeshift/UnrealEngine/GenerateProjectFiles.sh -project=&amp;quot;/home/planeshift/PSUnreal/PSUnreal.uproject&amp;quot; -game -engine&lt;br /&gt;
  &amp;gt; /home/planeshift/disk2/5.1.1-release/GenerateProjectFiles.sh -project=&amp;quot;/home/planeshift/disk2/PSUnreal511/PSUnreal.uproject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* recompile the project&lt;br /&gt;
  &amp;gt; /home/planeshift/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh PSUnrealEditor Linux Development -Project=&amp;quot;/home/planeshift/PSUnreal/PSUnreal.uproject&amp;quot;&lt;br /&gt;
  &amp;gt; /home/planeshift/disk2/5.1.1-release/Engine/Build/BatchFiles/Linux/Build.sh PSUnrealEditor Linux Development -Project=&amp;quot;/home/planeshift/disk2/PSUnreal511/PSUnreal.uproject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Be sure to have Unreal Engine find all the libraries needed&lt;br /&gt;
  &amp;gt; export LD_LIBRARY_PATH=/home/planeshift/UnrealEngine/Engine/Binaries/Linux:/home/planeshift/PSUnreal/ThirdParty/MariaDB/lib/mariadb&lt;br /&gt;
&lt;br /&gt;
== Package Development server and client ==&lt;br /&gt;
/mnt/nvme/ue/UnrealEngine-4.27/Engine/Build/BatchFiles/RunUAT.sh -ScriptsForProject=&amp;lt;PATH TO PROJECT&amp;gt;.uproject BuildCookRun -project=&amp;lt;PATH TO PROJECT&amp;gt;.uproject -noP4 -clientconfig=Development -serverconfig=Development -utf8output -platform=Linux -server -serverplatform=Linux -targetplatform=Linux -build -cook -allmaps -compressed -stage -archive -unversionedcookedcontent -archivedirectory=&amp;quot;&amp;lt;Archive Dir&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== File couldn&#039;t be loaded by the OS===&lt;br /&gt;
&lt;br /&gt;
I got this error:&lt;br /&gt;
&lt;br /&gt;
  [2020.05.05-17.04.04:228][  0]LogCore: Warning: dlopen failed: (null)&lt;br /&gt;
  [2020.05.05-17.04.04:228][  0]LogModuleManager: Warning: ModuleManager: Unable to load module &#039;/home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUnreal.so&#039; because the file couldn&#039;t be loaded by the OS.&lt;br /&gt;
&lt;br /&gt;
So I used this to get the list of libraries he is in need of&lt;br /&gt;
&lt;br /&gt;
  ldd /home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUnreal.so&lt;br /&gt;
&lt;br /&gt;
and then added the export LD_LIBRARY_PATH mentioned above, and it worked&lt;br /&gt;
&lt;br /&gt;
Same error on PSUpdater module:&lt;br /&gt;
&lt;br /&gt;
[2020.07.03-14.59.50:796][  0]LogModuleManager: Warning: ModuleManager: Unable to load module &#039;/home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUpdater.so&#039; because the file couldn&#039;t be loaded by the OS.&lt;br /&gt;
&lt;br /&gt;
  ldd /home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUpdater.so&lt;br /&gt;
&lt;br /&gt;
I set the environment variable LD_DEBUG and then launch the program&lt;br /&gt;
export LD_DEBUG=libs&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t connect to local MySQL server ===&lt;br /&gt;
&lt;br /&gt;
Error: Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)&lt;br /&gt;
&lt;br /&gt;
Check your /etc/mysql/my.cnf , and see where is the socket location. for me it was /var/run/mysqld/mysqld.sock , so I added a symbolic link to it.&lt;br /&gt;
&lt;br /&gt;
  ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some errors that you may encounter along the way ===&lt;br /&gt;
&lt;br /&gt;
You see a file named something like &amp;quot;GitDependencies-crash.log&amp;quot; in your UnrealEngine directory. The contents of the file contains this message:&lt;br /&gt;
&lt;br /&gt;
  mono GitDependencies.exe --prompt crashed with return code 134&lt;br /&gt;
&lt;br /&gt;
Solution: Ensure your copy of mono is up to date and rerun the Setup.sh script&lt;br /&gt;
At time of writing, I am using mono 3.2.8&lt;br /&gt;
&lt;br /&gt;
Reason - This could be due to an old version of mono, but it seems to happen for other reasons too.&lt;br /&gt;
&lt;br /&gt;
Should probably clean and recompile UEEditor at this point.&lt;br /&gt;
&lt;br /&gt;
=== error while loading shared libraries: libLND.so ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
user@u13:~/Development/UnrealEngine/Engine/Binaries/Linux$ ./UE4Editor &lt;br /&gt;
./UE4Editor: error while loading shared libraries: libLND.so: cannot open shared object file: No such file or directory&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix this, copy libLND.so (there are several flavors) from another directory to the Binaries/Linux directory. Do not use a symbolic link, just make a copy of the file. On my installation, a sym link worked in some places but failed in miserably others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ find ../../../../ -name libLND.so -print&lt;br /&gt;
../../../../UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/lib/Linux/x86_64-unknown-linux-gnu/libLND.so&lt;br /&gt;
cp ../../../../UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/lib/Linux/x86_64-unknown-linux-gnu/libLND.so .&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some fonts are in the wrong place. Its important to fix this ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-07.28.52:548][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Slate/Fonts/Roboto-Italic.ttf&#039;&lt;br /&gt;
$ find ../../../ -name Roboto-Italic.ttf -print&lt;br /&gt;
../../../Engine/Content/Editor/Slate/Fonts/Roboto-Italic.ttf&lt;br /&gt;
../../../Engine/Content/Slate/Testing/Fonts/Roboto-Italic.ttf&lt;br /&gt;
cp ../../../Engine/Content/Editor/Slate/Fonts/*  ../../../Engine/Content/Slate/Fonts/&lt;br /&gt;
cp ../../../Engine/Content/Slate/Testing/Fonts/* ../../../Engine/Content/Slate/Fonts/&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I don&#039;t know what to do about these two errors yet ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-07.29.12:524][  0]LogDirectoryWatcher:Error: inotify_add_watch cannot watch folder /home/user/Development/UnrealEngine/Engine/Plugins/Experimental/CharacterAI/Content/&lt;br /&gt;
[2015.05.03-07.29.12:524][  0]LogDirectoryWatcher:Warning: Failed to begin reading directory changes for ../../../Engine/Plugins/Experimental/CharacterAI/Content/.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== asoundlib error after adding voice and midi modules ===&lt;br /&gt;
   /home/planeshift/PSUnreal/Plugins/MidiAsset/Source/MidiInterface/Classes/RtMidi.cpp:1449:10: fatal error: &#039;alsa/asoundlib.h&#039; file not found&lt;br /&gt;
   #include &amp;lt;alsa/asoundlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Had to:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; sudo apt-get install libasound2-dev libasound2&lt;br /&gt;
==Manual Compile==&lt;br /&gt;
&lt;br /&gt;
===Create and Save the &amp;quot;Blank&amp;quot; project from the Blueprint Tab===&lt;br /&gt;
&lt;br /&gt;
once you have the Editor open and working, create the &amp;quot;Blank&amp;quot; project and save it. We need to do this, otherwise we will not be able to cook content later on and will get an error message stating that some folder ( /Saved/Sandbox/DefaultGame/ ? )  is missing. This seems to be some sort of a bug or perhaps lazy initialization. &lt;br /&gt;
&lt;br /&gt;
#Open the editor&lt;br /&gt;
#Click on New Project&lt;br /&gt;
# Click on &amp;quot;Blank&amp;quot;  ( In the Blueprint tab, not the one in the C++ tab )&lt;br /&gt;
# Click &amp;quot;Create Project&amp;quot;&lt;br /&gt;
#Save All and exit for now.&lt;br /&gt;
&lt;br /&gt;
===Clone and Import the psunreal project:===&lt;br /&gt;
&lt;br /&gt;
Get the svn password and the link from Talad. We are going to download the source and put it into the UnrealEngine directory in order to work around yet another bug. After that, we run GenerateProjectFiles.sh once more to add our project to The Makefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cd ~/Development/UnrealEngine/&lt;br /&gt;
svn co svn://super.secret.source.path&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we now have ~/Development/UnrealEngine/psunreal. Run the script below to add our project to the Makefile &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./GenerateProjectFiles.sh &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open the PSUNREAL project ( finally.. )===&lt;br /&gt;
&lt;br /&gt;
Click File and then Open Project&lt;br /&gt;
&lt;br /&gt;
You will now see the Blank Project and another named MyProject2 ( that&#039;s ours )&lt;br /&gt;
&lt;br /&gt;
Click MyProject2 and then open.&lt;br /&gt;
&lt;br /&gt;
You will get another error message:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a few errors about missing Android stuff. I don&#039;t we need to worry about this.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-08.14.15:716][  0]LogModuleManager:Warning: ModuleManager: Unable to load module &#039;AndroidRuntimeSettings&#039; because the file &#039;/home/user/Development2/UnrealEngine/Engine/Binaries/Linux/&#039; was not found.&lt;br /&gt;
&lt;br /&gt;
[2015.05.03-08.14.15:719][  0]LogModuleManager:Warning: ModuleManager: Unable to load module &#039;AndroidPlatformEditor&#039; because the file &#039;/home/user/Development2/UnrealEngine/Engine/Binaries/Linux/&#039; was not found.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this missing font, we need to repeat the solution above for Roboto-Italic...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-08.14.18:469][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Editor/Slate/Fonts/Roboto-Regular.ttf&#039;&lt;br /&gt;
[2015.05.03-08.14.18:471][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Editor/Slate/Fonts/Roboto-Bold.ttf&#039;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Building, cooking, packaging... oh my.===&lt;br /&gt;
&lt;br /&gt;
So when you build the game there are several things that need to be built: &lt;br /&gt;
*shaders&lt;br /&gt;
* the code itself&lt;br /&gt;
*some lighting resources&lt;br /&gt;
&lt;br /&gt;
You also need to cook the game&#039;s content. This means, you are taking all the art, models, textures, etc.. and converting them into a format that the Unreal engine likes. When you go to build the game for another platform - like an android tablet, pc, mac, or whatever, it will convert those &amp;quot;assets&amp;quot; into a format that is more suitable for the target platform.&lt;br /&gt;
&lt;br /&gt;
After you have cooked the content, you should be able to &amp;quot;package&amp;quot; the game. This simply means, you are setting up the files that will be distributed to the client. They will be formatted to work on the target platform and will be laid out into a directory structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setting up the server===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions in the &amp;quot;Planeshift Compiling Guide&amp;quot; for setting up the mysql database. You&#039;ll need to set it up ( either Mariadb or mysql ) and then run a few scripts to get a planeshift user account set up along with some needed data.&lt;br /&gt;
&lt;br /&gt;
When you run the new unreal server ( make target is: MyProject2Server ), it will attempt to connect to the DB. If successful, you will see something like this in the shell that you ran it from:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogWorld: Bringing up level for play took: 0.000330&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogTemp:Warning: Hello world! BEFORE&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogTemp: Hello world! AFTER 4 5&lt;br /&gt;
[2015.05.02-08.25.58:371][  0]LOG_STARTUP:Display: Database Host: &#039;localhost&#039; User: &#039;planeshift&#039; Databasename: &#039;planeshift&#039; Port: 128880496&lt;br /&gt;
[2015.05.02-08.25.58:559][  0]LOG_STARTUP:Display: Started Database with version: 1279&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You can also check to see if the server connected to your mysql or mariadb server by making a simple script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  SELECT SUBSTRING_INDEX(host, &#039;:&#039;, 1) AS host_short,&lt;br /&gt;
            GROUP_CONCAT(DISTINCT USER)   AS users,&lt;br /&gt;
            COUNT(*)&lt;br /&gt;
     FROM   information_schema.processlist&lt;br /&gt;
     GROUP  BY host_short&lt;br /&gt;
     ORDER  BY COUNT(*),&lt;br /&gt;
               host_short;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this to a file called show_connected.sql and then log into the db and run it from there.&lt;br /&gt;
               &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  $ mysql -u root -pMYSECRETPASSWORD&lt;br /&gt;
  Welcome to the MariaDB monitor.  Commands end with ; or \g.&lt;br /&gt;
  Your MariaDB connection id is 51&lt;br /&gt;
  Server version: 5.5.41-MariaDB-1ubuntu0.14.10.1 (Ubuntu)&lt;br /&gt;
  Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.&lt;br /&gt;
  Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the current input statement.&lt;br /&gt;
  MariaDB $ \. show_connected.sql&lt;br /&gt;
  +------------+-----------------+----------+&lt;br /&gt;
  | host_short | users           | COUNT(*) | &lt;br /&gt;
  +------------+-----------------+----------+&lt;br /&gt;
  | localhost  | planeshift,root |        2 |&lt;br /&gt;
  +------------+-----------------+----------+ &lt;br /&gt;
  1 row in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===cmake command for libzip===&lt;br /&gt;
  mkdir build&lt;br /&gt;
  cd build&lt;br /&gt;
  &amp;gt;cmake -DZLIB_LIBRARY=/home/planeshift/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8/lib/Linux/x86_64-unknown-linux-gnu/libz_fPIC.a -DZLIB_INCLUDE_DIR=/home/planeshift/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8/include/Linux/x86_64-unknown-linux-gnu/ -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===build xdelta===&lt;br /&gt;
  cd xdelta/xdelta3&lt;br /&gt;
  rm -rf build&lt;br /&gt;
  mkdir build&lt;br /&gt;
  cd build&lt;br /&gt;
&lt;br /&gt;
I had to add -fPIC to this line:&lt;br /&gt;
  vi CMakeLists.txt&lt;br /&gt;
&lt;br /&gt;
 set(CMAKE_C_FLAGS &amp;quot;${CMAKE_C_FLAGS} -fPIC -DSIZEOF_SIZE_T=8 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  cmake ..&lt;br /&gt;
  cmake --build .&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_macOS&amp;diff=25777</id>
		<title>Building PSUnreal on macOS</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_macOS&amp;diff=25777"/>
		<updated>2026-08-28T15:28:53Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Compiling Unreal Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reference docs ==&lt;br /&gt;
&lt;br /&gt;
* Downloading Unreal Engine source code: https://docs.unrealengine.com/en-US/GettingStarted/DownloadingUnrealEngine/index.html&lt;br /&gt;
* Compiling Unreal Engine source code: https://github.com/EpicGames/UnrealEngine/blob/release/README.md&lt;br /&gt;
&lt;br /&gt;
== Compiling Unreal Engine ==&lt;br /&gt;
&lt;br /&gt;
Note: As of 2024, you need ~XXXGB of disk space for a compiled version of the Unreal Engine 5.&lt;br /&gt;
&lt;br /&gt;
* Step 1: Install the latest version of Xcode.&lt;br /&gt;
** Install the latest version of [https://itunes.apple.com/us/app/xcode/id497799835 Xcode] from the App Store.&lt;br /&gt;
** Install the Command Line Tools by running &#039;&#039;&#039;xcode-select --install&#039;&#039;&#039; from a Terminal.&lt;br /&gt;
&lt;br /&gt;
* Step 2: Get access to the Unreal Engine source code.&lt;br /&gt;
** You must be an Unreal Engine subscriber (if not, open an account there: https://www.unrealengine.com)&lt;br /&gt;
** You must have a GitHub account (if not, open an account there: https://github.com)&lt;br /&gt;
** Have associated your GitHub account with your Unreal Engine account as described on the [https://www.unrealengine.com/en-US/ue4-on-github UE4 on GitHub page].&lt;br /&gt;
** At this point you should be able to access the [https://github.com/EpicGames/UnrealEngine Unreal Engine repository] on GitHub.&lt;br /&gt;
&lt;br /&gt;
* Step 3: Get the Unreal Engine source code.&lt;br /&gt;
** On MacI had to use the SSH git URL. I had to create a new key with:&lt;br /&gt;
  &amp;gt; ssh-keygen -t ed25519 -C my@email.it&lt;br /&gt;
  &amp;gt; ssh-add --apple-use-keychain ~/.ssh/id_ed25519&lt;br /&gt;
  &amp;gt; cat ~/.ssh/id_ed25519.pub (and copy the result in github.com under Settings add new SSH Key)&lt;br /&gt;
  &amp;gt; ssh -T git@github.com (then this command should give you a success result)&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; git clone --depth=1 --single-branch -b 5.7.4-release git@github.com:EpicGames/UnrealEngine.git 5.7.4-release&lt;br /&gt;
* This will create an &#039;&#039;&#039;5.7.4-release&#039;&#039;&#039; sub-directory where you run the commands of the next step. Step 4: Prepare the Xcode workspace.&lt;br /&gt;
** In the &#039;&#039;&#039;UnrealEngine&#039;&#039;&#039; directory, run the script &#039;&#039;&#039;Setup.command&#039;&#039;&#039;. It downloads 19.4GB of dependencies and may take a while.&lt;br /&gt;
** At the same location, run the script &#039;&#039;&#039;GenerateProjectFiles.command&#039;&#039;&#039;. It generates the &#039;&#039;&#039;UE5 (Mac).xcworkspace&#039;&#039;&#039; Xcode workspace.&lt;br /&gt;
&lt;br /&gt;
* Step 5: Compile Unreal Engine with Xcode.&lt;br /&gt;
** Load the &#039;&#039;&#039;UE5 (Mac).xcworkspace&#039;&#039;&#039; into Xcode.&lt;br /&gt;
** Select the &amp;quot;Project Navigator&amp;quot; icon (looks like a folder icon) on the left, then click on &amp;quot;Unreal Editor (Mac)&amp;quot; , the right panel will populate. &lt;br /&gt;
** Click on &amp;quot;Signing and Capabilities&amp;quot; and leave &amp;quot;Team&amp;quot; empty, &amp;quot;Sign to run locally&amp;quot;&lt;br /&gt;
** Click on &amp;quot;Build Settings&amp;quot;, search &amp;quot;Signing Identity&amp;quot;, remove everything there by clicking on &amp;quot;Others&amp;quot; and clearing the field. Or use Sign Run Locally. This way we disable the signing completely.&lt;br /&gt;
** Select the &#039;&#039;&#039;ShaderCompileWorker &amp;gt; My Mac&#039;&#039;&#039; target in the title bar, then build with &#039;&#039;&#039;Product &amp;gt; Build&#039;&#039;&#039; menu item.&lt;br /&gt;
** Click on the last icon &amp;quot;Report Navigator&amp;quot; , looks like a document, you can see here the log of the build. Wait for the build to complete.&lt;br /&gt;
** Select the &#039;&#039;&#039;UnrealEditor &amp;gt; My Mac&#039;&#039;&#039; target, and build again.&lt;br /&gt;
** Compiling may take a long time, depending on your system specs.&lt;br /&gt;
** After the compilation finishes, select the &#039;Product &amp;gt; Run&#039; menu item to load the editor.&lt;br /&gt;
&lt;br /&gt;
* Step 6: set xcode tools&lt;br /&gt;
** Open Xcode and go to Preferences&amp;gt;Locations and set the Command Line Tools or Unreal will give this error: &amp;quot;Xcode is not installed on this Mac ... Falling back to runtime text shaders, which are slower. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Launch the Editor to test if it works&lt;br /&gt;
** You can launch the editor with \UnrealEngine\Engine\Binaries\Mac\UE4Editor.app&lt;br /&gt;
&lt;br /&gt;
If you get this error:&lt;br /&gt;
  xcode command codesign failed with exit code 1 &lt;br /&gt;
Check the error log detail, I had some old files in /Users/luke/UnrealEngine/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/ which I had to delete, and then it worked.&lt;br /&gt;
&lt;br /&gt;
== Obtaining PSUnreal ==&lt;br /&gt;
&lt;br /&gt;
* Create PSUnreal dir&lt;br /&gt;
  &amp;gt; cd \&lt;br /&gt;
  &amp;gt; mkdir PSUnreal&lt;br /&gt;
&lt;br /&gt;
* Install macports and svn command line&lt;br /&gt;
** Install macports: Download  https://distfiles.macports.org/MacPorts/MacPorts-2.6.2-10.15-Catalina.pkg&lt;br /&gt;
  &amp;gt; sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
Get the sources from the Planeshift repository.&lt;br /&gt;
* Open a Terminal and go to you home directory with &lt;br /&gt;
  &amp;gt; &#039;&#039;&#039;cd ~&#039;&#039;&#039;. We will build from there; adapt if needed.&lt;br /&gt;
&lt;br /&gt;
* Checkout the sources from the PS Unreal repository with: &lt;br /&gt;
  &amp;gt; svn co svn://xxx.xxx.xxx/psunreal/PSUnreal PSUnreal&lt;br /&gt;
&lt;br /&gt;
== Building dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== MariaDB connector ===&lt;br /&gt;
&lt;br /&gt;
* Build the MariaDB Connector from source.&lt;br /&gt;
** Install prerequisites: sudo port install cmake jemalloc judy openssl boost gnutls&lt;br /&gt;
** Download the MariaDB Connector for C (source code version) from https://downloads.mariadb.com/Connectors/c/connector-c-3.3.10/mariadb-connector-c-3.3.10-src.tar.gz&lt;br /&gt;
** In your home directory: tar -xvf mariadb-connector-c-3.3.10-src.tar.gz.&lt;br /&gt;
**From your terminal, &#039;&#039;&#039;cd ~/mariadb-connector-c-3.3.10-src&#039;&#039;&#039;, to go to the directory that contain the MariaDB Connector sources.&lt;br /&gt;
** move the sources in PSUnreal: mv * /Users/luke/PSUnreal511/ThirdParty/MariaDB&lt;br /&gt;
**cd /Users/luke/PSUnreal511/ThirdParty/MariaDB&lt;br /&gt;
** Generate the makefiles with &#039;&#039;&#039;cmake . &#039;&#039;&#039;.&lt;br /&gt;
** Build and install the connector in your PSUnreal source tree with &#039;&#039;&#039;make all install&#039;&#039;&#039;.&lt;br /&gt;
**file /Users/luke/PSUnreal511/ThirdParty/MariaDB/libmariadb/libmariadb.dylib (check if it&#039;s arm64 or x86_64)&lt;br /&gt;
&lt;br /&gt;
=== Wordnet ===&lt;br /&gt;
&lt;br /&gt;
* Build Wordnet&lt;br /&gt;
  &amp;gt; cd /Users/luke/PSUnreal511/ThirdParty/Wordnet&lt;br /&gt;
Compiles the library for arm64 architecture:&lt;br /&gt;
  &amp;gt; gcc -shared -o Wordnet.dylib -fPIC *.c&lt;br /&gt;
Compiles the library for x86_64 architecture:&lt;br /&gt;
  &amp;gt; gcc -shared -arch x86_64 -o Wordnet.dylib -fPIC *.c&lt;br /&gt;
Compiles for arm64&lt;br /&gt;
 &amp;gt; gcc -shared -arch arm64 -o Wordnet.dylib -fPIC *.c&lt;br /&gt;
&lt;br /&gt;
=== libzip ===&lt;br /&gt;
&lt;br /&gt;
* Obtain https://libzip.org with:&lt;br /&gt;
  &amp;gt; git clone git@github.com:nih-at/libzip.git&lt;br /&gt;
* In the newly created &#039;&#039;&#039;libzip&#039;&#039;&#039; directory, create a &#039;&#039;&#039;build&#039;&#039;&#039; sub-directory.&lt;br /&gt;
  &amp;gt; cd libzip&lt;br /&gt;
  &amp;gt; mkdir build&lt;br /&gt;
* In &#039;&#039;&#039;libzip/build&#039;&#039;&#039; run &#039;&#039;&#039;cmake&#039;&#039;&#039; as follows (this turns off all the options we do not need):&lt;br /&gt;
  &amp;gt; cd build&lt;br /&gt;
  &amp;gt; cmake -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF ..&lt;br /&gt;
* Then build with:&lt;br /&gt;
  &amp;gt; make --build .&lt;br /&gt;
* Copy the &#039;&#039;&#039;libzip&#039;&#039;&#039; library and headers to the third party subfolder of PSUnreal.&lt;br /&gt;
  &amp;gt; cp lib/libzip.5.3.dylib PSUnreal/ThirdParty/Libzip/Libraries/Mac/libzip.5.dylib&lt;br /&gt;
  &amp;gt; cp ../lib/zip.h PSUnreal/ThirdParty/Libzip/Includes/.&lt;br /&gt;
  &amp;gt; cp zipconf.h PSUnreal/ThirdParty/Libzip/Includes/Mac/.&lt;br /&gt;
* Finalize the library.&lt;br /&gt;
  &amp;gt; cd PSUnreal/ThirdParty/Libzip/Libraries/Mac&lt;br /&gt;
  &amp;gt; install_name_tool&lt;br /&gt;
&lt;br /&gt;
=== Create a signing certificate ===&lt;br /&gt;
(OPTIONAL) If you need to create a signing certificate, you can do it by opening XCode, click on the top menu &amp;quot;XCode&amp;quot; then &amp;quot;Preferences&amp;quot;, then Accounts, and Manage Certificates.&lt;br /&gt;
&lt;br /&gt;
== Build PS Unreal. ==&lt;br /&gt;
* Generate project files (NO QUOTATION MARKS on -project option):&lt;br /&gt;
  &amp;gt; /Volumes/DATA-2TB/5.4.3-release/GenerateProjectFiles.command -project=/Users/luke/PSUnreal511/PSUnreal.uproject -game&lt;br /&gt;
* The resulting files should be directories, not files, like:&lt;br /&gt;
 drwxr-xr-x@  5 luke  staff    160 Aug 24 18:10 PSUnreal (Mac).xcworkspace&lt;br /&gt;
*Launch XCode and open PSUnreal.xcworkspace&lt;br /&gt;
* Select the UE4 blue icon for the project on the left, and click on &amp;quot;Project Navigator&amp;quot; icon (looks like a folder icon)&lt;br /&gt;
* Click on &amp;quot;Signing and Capabilities&amp;quot; and leave &amp;quot;Team&amp;quot; empty, &amp;quot;Sign to run locally&amp;quot;&lt;br /&gt;
* Click on &amp;quot;Build Settings&amp;quot;, search &amp;quot;Signing Identity&amp;quot;, remove everything there by clicking on &amp;quot;Others&amp;quot; and clearing the field. Or use Sign Run Locally. This way we disable the signing completely.&lt;br /&gt;
* Build with Product &amp;gt; Build menu item.&lt;br /&gt;
&lt;br /&gt;
== Finalize PS Unreal ==&lt;br /&gt;
&lt;br /&gt;
Note: The following should be added to the build process. To be done by hand for now.&lt;br /&gt;
&lt;br /&gt;
* Copy &#039;&#039;&#039;Wordnet.dylib&#039;&#039;&#039;, &#039;&#039;&#039;libmariadb.3.dylib&#039;&#039;&#039;, &#039;&#039;&#039;libmariadb.dylib&#039;&#039;&#039; to inside folder &#039;&#039;&#039;./PSUnreal.app/Content/MacOS&#039;&#039;&#039;.&lt;br /&gt;
* Modify the library paths in the main &#039;&#039;&#039;PSUnreal&#039;&#039;&#039; executable as follows:&lt;br /&gt;
** &#039;&#039;&#039;install_name_tool -change /Users/luke/PSUnreal/ThirdParty/MariaDB/libmariadb/libmariadb.3.dylib @loader_path/libmariadb.3.dylib ./PSUnreal.app/Contents/MacOS/PSUnreal&#039;&#039;&#039;&lt;br /&gt;
** &#039;&#039;&#039;install_name_tool -change Wordnet.dylib @loader_path/Wordnet.dylib ./PSUnreal.app/Contents/MacOS/PSUnreal&#039;&#039;&#039;&lt;br /&gt;
* Add file &#039;&#039;&#039;serverlist.xml&#039;&#039;&#039; to inside folder &#039;&#039;&#039;./PSUnreal.app/Contents/UE4/PSUnreal/Config&#039;&#039;&#039;. (&#039;&#039;&#039;Config&#039;&#039;&#039; directory needs to be created)&lt;br /&gt;
* Finally, you can sign the app bundle with the following &#039;&#039;&#039;codesign -s &amp;lt;email&amp;gt; PSUnreal.app&#039;&#039;&#039;, where &amp;lt;email&amp;gt; is the E-mail for your Apple Development ID (check it in your Keychain Access app &amp;gt; My Certificates).&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== PSLauncher codesign error ===&lt;br /&gt;
I got this error while trying to build PSLauncher:&lt;br /&gt;
 /usr/bin/codesign --force --sign - --entitlements /Users/luke/PSLauncher511/Binaries/PSLauncher\ \(Mac\).build/Mac/PSLauncher.build/PSLauncher-Mac-Shipping.app.xcent --timestamp\=none --generate-entitlement-der /Users/luke/PSLauncher511/Binaries/Mac/PSLauncher-Mac-Shipping.app&lt;br /&gt;
  /Users/luke/PSLauncher511/Binaries/Mac/PSLauncher-Mac-Shipping.app: code object is not signed at all&lt;br /&gt;
 In subcomponent: /Users/luke/PSLauncher511/Binaries/Mac/PSLauncher-Mac-Shipping.app/Contents/MacOS/libzip.5.dylib&lt;br /&gt;
 Command CodeSign failed with a nonzero exit code&lt;br /&gt;
 ** BUILD FAILED **&lt;br /&gt;
 The following build commands failed:&lt;br /&gt;
         CodeSign /Users/luke/PSLauncher511/Binaries/Mac/PSLauncher-Mac-Shipping.app (in target &#039;PSLauncher&#039; from project &#039;PSLauncher (Mac)&#039;)&lt;br /&gt;
 (1 failure)&lt;br /&gt;
 ERROR: Failed to finalize the .app with Xcode. Check the log for more information&lt;br /&gt;
I had to recompile the libzip located in ThirdParty and codesign it, otherwise when it&#039;s copied over the PSLauncher install during the build it fails on codesign.&lt;br /&gt;
&lt;br /&gt;
=== XCode 16.0 ===&lt;br /&gt;
After an update to Xcode 16.0 , I got this error while building UE 5.4.3 from Xcode&lt;br /&gt;
 Platform Mac is not a valid platform to build.&lt;br /&gt;
I downgraded my XCode to 15.4 by downloading it from this page:&lt;br /&gt;
&lt;br /&gt;
https://developer.apple.com/download/all/?q=xcode&lt;br /&gt;
&lt;br /&gt;
=== Undecorated configuration ===&lt;br /&gt;
When building with PSUnreal.Target.cs modified with :&lt;br /&gt;
 UndecoratedConfiguration = UnrealTargetConfiguration.Shipping;&lt;br /&gt;
I get this error&lt;br /&gt;
&lt;br /&gt;
fatal error: cannot open file &#039;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/operations.h&#039;: No such file or directory&lt;br /&gt;
&lt;br /&gt;
The only way in 5.4.3 is to comment out the UndecoratedConfiguration  line.&lt;br /&gt;
&lt;br /&gt;
=== Could not create socket ===&lt;br /&gt;
https://forums.unrealengine.com/t/ue-5-4-3-macosx-shipping-build-could-not-create-socket-for-bind-address-and-error-initializing-network-layer/1990023&lt;br /&gt;
&lt;br /&gt;
For some reason the &amp;quot;PSUnrealClient (Mac)&amp;quot; project in XCode, under &amp;quot;Signing &amp;amp; Capabilities&amp;quot; -&amp;gt; &amp;quot;App Sandbox&amp;quot; had &amp;quot;Incoming/Outgoing Connections&amp;quot; disabled. Must be enabled.&lt;br /&gt;
&lt;br /&gt;
=== arm64 vs x86_64 ===&lt;br /&gt;
When you are compiling you will see a tag on each line saying if you are compiling for arm64 [Apple] or for x86_64 [Intel], example:&lt;br /&gt;
 [1681/3233] Compile &#039;&#039;&#039;[Apple]&#039;&#039;&#039; Module.LandscapeEditor.4.cpp&lt;br /&gt;
 vs&lt;br /&gt;
 [1681/3233] Compile &#039;&#039;&#039;[Intel]&#039;&#039;&#039; Module.LandscapeEditor.4.cpp&lt;br /&gt;
you can change the way the solution is compiled by using the -specifiedarchitecture and -architecture flags on RunUAT. For some reason after 5.4 upgrade the -architecture was not enough anymore, and I had to add also -specifiedarchitecture&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 -specifiedarchitecture=x86_64 -platform=Mac -architecture=x86_64&lt;br /&gt;
&lt;br /&gt;
=== Unable to load module ===&lt;br /&gt;
If there is a problem like:&lt;br /&gt;
  Unable to load module &#039;/Users/luke/PSUnreal/Binaries/Mac/UE4Editor-PSUnreal.dylib&#039; because the file couldn&#039;t be loaded by the OS.&lt;br /&gt;
  OR&lt;br /&gt;
  The game module &#039;PSUnreal&#039; could not be loaded. There may be an operating system error, the module may not be properly set up....&lt;br /&gt;
&lt;br /&gt;
You can use otool to see the dependencies&lt;br /&gt;
  otool -L /Users/luke/PSUnreal/Binaries/Mac/UE4Editor-PSUnreal.dylib&lt;br /&gt;
&lt;br /&gt;
If the problem is Wordnet then use this command:&lt;br /&gt;
  install_name_tool -change Wordnet.dylib @loader_path/Wordnet.dylib /Users/luke/PSUnreal/Binaries/Mac/UE4Editor-PSUnreal.dylib&lt;br /&gt;
  AND/OR&lt;br /&gt;
  install_name_tool -change /Users/luke/PSUnreal/ThirdParty/MariaDB/libmariadb/libmariadb.3.dylib /Users/luke/PSUnreal511/ThirdParty/MariaDB/libmariadb/libmariadb.3.dylib /Users/luke/PSUnreal511/Binaries/Mac/UnrealEditor-PSUnreal.dylib&lt;br /&gt;
&lt;br /&gt;
After this command you should relaunch RunUAT, but without -build or it will recreate the same problem.&lt;br /&gt;
&lt;br /&gt;
=== Your session has expired ===&lt;br /&gt;
While building , RunUAT is trying to read this URL: &amp;lt;nowiki&amp;gt;https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action&amp;lt;/nowiki&amp;gt; , but this URL gets a &amp;quot;Your session has expired. Please log in.&amp;quot; message. This is the error in the log&lt;br /&gt;
 DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 &amp;quot;Your session has expired. Please log in.&amp;quot;&lt;br /&gt;
The problem seems to happen only if you run the build command from ssh, running it directly on the Mac works well.&lt;br /&gt;
&lt;br /&gt;
=== Info.plist  During compilation from XCode you may get this error: ===&lt;br /&gt;
 Cannot code sign because the target does not have an Info.plist file and one is not being generated automatically. Apply an Info.plist file to the target using the INFOPLIST_FILE build setting or generate one automatically by setting the GENERATE_INFOPLIST_FILE build setting to YES (recommended).&lt;br /&gt;
Click on the left on the Folder icon, then PSUnreal, then on the right select &amp;quot;Build Settings&amp;quot;, search for &amp;quot;Generate Info.plist File&amp;quot; and set it to YES.&lt;br /&gt;
&lt;br /&gt;
During compilation from XCode you may get this error:&lt;br /&gt;
 /Users/luke/UnrealEngine/Engine/Source/Runtime/Core/Public/Math/BigInt.h:964:9: variable &#039;Result&#039; set but not used [-Werror,-Wunused-but-set-variable]&lt;br /&gt;
In this case open &lt;br /&gt;
 Engine/Source/Programs/UnrealBuildTool/Platform/Mac/MacToolChain.cs&lt;br /&gt;
and change line 218 to this:&lt;br /&gt;
 Result += &amp;quot; -Wall -Werror -Wno-error=unused-but-set-variable&amp;quot;;&lt;br /&gt;
I got this error after XCode was updated to 13.0 , previous was 12.3. &lt;br /&gt;
 /Users/luke/UnrealEngine/clang:1:1: no such sysroot directory: &#039;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk&#039; [-Werror,-Wmissing-sysroot]&lt;br /&gt;
a clean build of everything, including Unreal Engine fixed this error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)&lt;br /&gt;
&lt;br /&gt;
This error was not saying anything in the log file, so I had to&lt;br /&gt;
 tail -f /Volumes/DATA-2TB/5.1.1-release/Engine/Programs/AutomationTool/Saved/Cook-2023.02.19-23.53.38.txt&lt;br /&gt;
and in that file the real error showed: &amp;quot;The game module &#039;PSUnreal&#039; could not be loaded. &amp;quot; which is the otool thing.&lt;br /&gt;
&lt;br /&gt;
=== Compilation on M1 hardware ===&lt;br /&gt;
   ld: warning: ignoring file /Users/luke/UnrealEngine/Engine/Source/ThirdParty/rd_route/lib/Mac/librd_route.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64&lt;br /&gt;
   ld: warning: ignoring file /Users/luke/UnrealEngine/Engine/Binaries/Mac/UnrealHeaderTool-BuildSettings.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64&lt;br /&gt;
   Undefined symbols for architecture arm64:&lt;br /&gt;
     &amp;quot;BuildSettings::GetBuildDate()&amp;quot;, referenced from:&lt;br /&gt;
         FApp::GetBuildDate() in Module.Core.9_of_15.cpp.o&lt;br /&gt;
     &amp;quot;BuildSettings::GetBranchName()&amp;quot;, referenced from:&lt;br /&gt;
         FApp::GetBranchName() in Module.Core.9_of_15.cpp.o&lt;br /&gt;
         FGlobalEngineVersions::FGlobalEngineVersions() in Module.Core.10_of_15.cpp.o&lt;br /&gt;
     &amp;quot;BuildSettings::GetBuildVersion()&amp;quot;, referenced from:&lt;br /&gt;
         FApp::GetBuildVersion() in Module.Core.9_of_15.cpp.o&lt;br /&gt;
         FApp::PrintStartupLogMessages() in Module.Core.9_of_15.cpp.o&lt;br /&gt;
     &amp;quot;BuildSettings::IsPromotedBuild()&amp;quot;, referenced from:&lt;br /&gt;
         FApp::GetEngineIsPromotedBuild() in Module.Core.9_of_15.cpp.o&lt;br /&gt;
     &amp;quot;BuildSettings::IsLicenseeVersion()&amp;quot;, referenced from:&lt;br /&gt;
         FMacCrashContext::GenerateCrashInfoAndLaunchReporter() const in Module.Core.7_of_15.cpp.o&lt;br /&gt;
         FMacCrashContext::GenerateEnsureInfoAndLaunchReporter() const in Module.Core.7_of_15.cpp.o&lt;br /&gt;
         FGlobalEngineVersions::FGlobalEngineVersions() in Module.Core.10_of_15.cpp.o&lt;br /&gt;
     &amp;quot;BuildSettings::GetCurrentChangelist()&amp;quot;, referenced from:&lt;br /&gt;
         FGlobalEngineVersions::FGlobalEngineVersions() in Module.Core.10_of_15.cpp.o&lt;br /&gt;
     &amp;quot;BuildSettings::GetCompatibleChangelist()&amp;quot;, referenced from:&lt;br /&gt;
         FNetworkVersion::GetNetworkCompatibleChangelist() in Module.Core.10_of_15.cpp.o&lt;br /&gt;
         FGlobalEngineVersions::FGlobalEngineVersions() in Module.Core.10_of_15.cpp.o&lt;br /&gt;
   ld: symbol(s) not found for architecture arm64&lt;br /&gt;
https://forums.unrealengine.com/t/building-shipping-package-on-mac-m1-for-intel-architecture/685206&lt;br /&gt;
&lt;br /&gt;
Was giving me again the problem, what I did was to go on the macmini, and recompile UnrealHeaderTool forcing x86_64 architecture, then the compilation worked&lt;br /&gt;
&lt;br /&gt;
 Exceeded max memory on all configured triggers&lt;br /&gt;
Change BaseEditor.ini&lt;br /&gt;
&lt;br /&gt;
    MemoryMinFreePhysical=1024&lt;br /&gt;
&lt;br /&gt;
    MemoryMinFreeVirtual=1024&lt;br /&gt;
&lt;br /&gt;
 Detected max mem exceeded - forcing shader compilation flush&lt;br /&gt;
    MemoryMinFreePhysical=256&lt;br /&gt;
&lt;br /&gt;
== Running a local server ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the server database ===&lt;br /&gt;
&lt;br /&gt;
* Connect to your database as root, create the planeshift database and user.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; CREATE DATABASE planeshift;&lt;br /&gt;
  mysql&amp;gt; CREATE USER &#039;planeshift&#039;@&#039;localhost&#039; IDENTIFIED WITH mysql_native_password BY &#039;planeshift&#039;;&lt;br /&gt;
  mysql&amp;gt; GRANT ALL PRIVILEGES ON planeshift.* TO &#039;planeshift&#039;@&#039;localhost&#039;;&lt;br /&gt;
  mysql&amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
* Connect to the database as planeshift, populate the database (adapt psunreal_mysql_XXXXXXXX.sql to the currently available file).&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; cd PSUnreal\Scripts&lt;br /&gt;
  &amp;gt; mysql -u planeshift -pplaneshift&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; USE planeshift;&lt;br /&gt;
  mysql&amp;gt; SOURCE psunreal_mysql_XXXXXXXX.sql;&lt;br /&gt;
  mysql&amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
* If you need to upgrade your database, perform the following as root, and re-populate the database as done above.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mysql -u root -p&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; DROP DATABASE planeshift;&lt;br /&gt;
  mysql&amp;gt; CREATE DATABASE planeshift;&lt;br /&gt;
  mysql&amp;gt; GRANT ALL PRIVILEGES ON planeshift.* TO &#039;planeshift&#039;@&#039;localhost&#039;;&lt;br /&gt;
  mysql&amp;gt; quit&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Linux&amp;diff=25776</id>
		<title>Building PSUnreal on Linux</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Linux&amp;diff=25776"/>
		<updated>2026-08-28T15:27:22Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Building UEEditor on Linux ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
  https://docs.unrealengine.com/en-US/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html&lt;br /&gt;
&lt;br /&gt;
  https://www.ue4community.wiki/Legacy/Running_On_Linux&lt;br /&gt;
  https://www.ue4community.wiki/Legacy/Cooking_On_Linux&lt;br /&gt;
&lt;br /&gt;
  [[Some Linux commands]]&lt;br /&gt;
&lt;br /&gt;
=== Installation steps ===&lt;br /&gt;
&lt;br /&gt;
# Register for a free account at github.com&lt;br /&gt;
# Per the first link above, join the unreal project &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Be sure to install all dependencies first&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo apt-key update&lt;br /&gt;
  &amp;gt; sudo apt-get update&lt;br /&gt;
  &amp;gt; sudo apt-get upgrade&lt;br /&gt;
  &amp;gt; sudo apt-get install git&lt;br /&gt;
&lt;br /&gt;
get source code. On Linux I had to use the SSH git URL. I had to create a new key with:&lt;br /&gt;
  &amp;gt; ssh-keygen -t ed25519 -C my@email.it&lt;br /&gt;
  &amp;gt; ssh-add ~/.ssh/id_ed25519&lt;br /&gt;
  &amp;gt; cat ~/.ssh/id_ed25519.pub (and copy the result in github.com under Settings add new SSH Key)&lt;br /&gt;
  &amp;gt; ssh -T git@github.com (then this command should give you a success result)&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; git clone --depth=1 --single-branch -b 5.7.4-release git@github.com:EpicGames/UnrealEngine.git 5.7.4-release&lt;br /&gt;
&lt;br /&gt;
this will create a &amp;quot;5.4.3-release&amp;quot; directory as child of the dir where you run the command&lt;br /&gt;
&lt;br /&gt;
Launch the setup to download &#039;&#039;&#039;19.2Gb&#039;&#039;&#039; of dependencies&lt;br /&gt;
  &amp;gt; ./Setup.sh&lt;br /&gt;
&lt;br /&gt;
Generate project files&lt;br /&gt;
  &amp;gt; ./GenerateProjectFiles.sh&lt;br /&gt;
&lt;br /&gt;
Build UnrealEngine&lt;br /&gt;
  &amp;gt; make&lt;br /&gt;
&lt;br /&gt;
== Running the editor ==&lt;br /&gt;
&lt;br /&gt;
Before moving to PlaneShift Unreal, its best to test if the standard Unreal Engine works.&lt;br /&gt;
&lt;br /&gt;
To do this you need to have X available. If you are in a server only configuration, you need to install X.&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo apt-get install xinit&lt;br /&gt;
  &amp;gt; sudo apt-get install ubuntu-desktop&lt;br /&gt;
&lt;br /&gt;
and you need then to start it:&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; sudo startx&lt;br /&gt;
&lt;br /&gt;
When you are in X, open a terminal window and&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; cd Engine/Binaries/Linux/&lt;br /&gt;
  &amp;gt; ./UE4Editor&lt;br /&gt;
&lt;br /&gt;
== Building PSUnreal ==&lt;br /&gt;
&lt;br /&gt;
Download the PSUnreal project&lt;br /&gt;
  &amp;gt; cd \&lt;br /&gt;
  &amp;gt; svn co svn://xxx.xxx.xxx/psunreal/PSUnreal PSUnreal&lt;br /&gt;
&lt;br /&gt;
You need to install &#039;&#039;&#039;MariaDB Connector&#039;&#039;&#039; from: https://mariadb.com/downloads/#connectors&lt;br /&gt;
&lt;br /&gt;
* Select C connector and the linux platform&lt;br /&gt;
* PLEASE NOTE UBUNTU 20.4 requires the new version of mariadb connector: mariadb-connector-c-3.1.11-ubuntu-focal-amd64.tar.gz or you will get a libssl1.0 error when running the server.&lt;br /&gt;
* Extract in a temporary directory the file you get&lt;br /&gt;
  tar -xzvf mariadb-connector-c-3.1.7-linux-x86_64.tar.gz &lt;br /&gt;
&lt;br /&gt;
* From the MariaDB extracted directory, copy both &amp;lt;code&amp;gt;lib/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;include/&amp;lt;/code&amp;gt; (with subfolders) into &amp;lt;code&amp;gt;PSUnreal\ThirdParty\MariaDB\&amp;lt;/code&amp;gt;&lt;br /&gt;
  cp -r * /home/planeshift/PSUnreal/ThirdParty/MariaDB/&lt;br /&gt;
&lt;br /&gt;
* Recompile Wordnet&lt;br /&gt;
  &amp;gt; cd /home/planeshift/PSUnreal/ThirdParty/Wordnet/&lt;br /&gt;
  &amp;gt; cd /home/planeshift/disk2/PSUnreal511/ThirdParty/Wordnet/&lt;br /&gt;
  &amp;gt; gcc -c -fPIC *.h *.c -Wformat-overflow=0&lt;br /&gt;
  &amp;gt; ar -cvq libWordnet.so *.o&lt;br /&gt;
  &amp;gt; mv libWordnet.so lib/x64/Wordnet.so&lt;br /&gt;
&lt;br /&gt;
* generate project files&lt;br /&gt;
  &amp;gt; /home/planeshift/UnrealEngine/GenerateProjectFiles.sh -project=&amp;quot;/home/planeshift/PSUnreal/PSUnreal.uproject&amp;quot; -game -engine&lt;br /&gt;
  &amp;gt; /home/planeshift/disk2/5.1.1-release/GenerateProjectFiles.sh -project=&amp;quot;/home/planeshift/disk2/PSUnreal511/PSUnreal.uproject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* recompile the project&lt;br /&gt;
  &amp;gt; /home/planeshift/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh PSUnrealEditor Linux Development -Project=&amp;quot;/home/planeshift/PSUnreal/PSUnreal.uproject&amp;quot;&lt;br /&gt;
  &amp;gt; /home/planeshift/disk2/5.1.1-release/Engine/Build/BatchFiles/Linux/Build.sh PSUnrealEditor Linux Development -Project=&amp;quot;/home/planeshift/disk2/PSUnreal511/PSUnreal.uproject&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Be sure to have Unreal Engine find all the libraries needed&lt;br /&gt;
  &amp;gt; export LD_LIBRARY_PATH=/home/planeshift/UnrealEngine/Engine/Binaries/Linux:/home/planeshift/PSUnreal/ThirdParty/MariaDB/lib/mariadb&lt;br /&gt;
&lt;br /&gt;
== Package Development server and client ==&lt;br /&gt;
/mnt/nvme/ue/UnrealEngine-4.27/Engine/Build/BatchFiles/RunUAT.sh -ScriptsForProject=&amp;lt;PATH TO PROJECT&amp;gt;.uproject BuildCookRun -project=&amp;lt;PATH TO PROJECT&amp;gt;.uproject -noP4 -clientconfig=Development -serverconfig=Development -utf8output -platform=Linux -server -serverplatform=Linux -targetplatform=Linux -build -cook -allmaps -compressed -stage -archive -unversionedcookedcontent -archivedirectory=&amp;quot;&amp;lt;Archive Dir&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== File couldn&#039;t be loaded by the OS===&lt;br /&gt;
&lt;br /&gt;
I got this error:&lt;br /&gt;
&lt;br /&gt;
  [2020.05.05-17.04.04:228][  0]LogCore: Warning: dlopen failed: (null)&lt;br /&gt;
  [2020.05.05-17.04.04:228][  0]LogModuleManager: Warning: ModuleManager: Unable to load module &#039;/home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUnreal.so&#039; because the file couldn&#039;t be loaded by the OS.&lt;br /&gt;
&lt;br /&gt;
So I used this to get the list of libraries he is in need of&lt;br /&gt;
&lt;br /&gt;
  ldd /home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUnreal.so&lt;br /&gt;
&lt;br /&gt;
and then added the export LD_LIBRARY_PATH mentioned above, and it worked&lt;br /&gt;
&lt;br /&gt;
Same error on PSUpdater module:&lt;br /&gt;
&lt;br /&gt;
[2020.07.03-14.59.50:796][  0]LogModuleManager: Warning: ModuleManager: Unable to load module &#039;/home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUpdater.so&#039; because the file couldn&#039;t be loaded by the OS.&lt;br /&gt;
&lt;br /&gt;
  ldd /home/planeshift/PSUnreal/Binaries/Linux/libUE4Editor-PSUpdater.so&lt;br /&gt;
&lt;br /&gt;
I set the environment variable LD_DEBUG and then launch the program&lt;br /&gt;
export LD_DEBUG=libs&lt;br /&gt;
&lt;br /&gt;
=== Can&#039;t connect to local MySQL server ===&lt;br /&gt;
&lt;br /&gt;
Error: Can&#039;t connect to local MySQL server through socket &#039;/tmp/mysql.sock&#039; (2)&lt;br /&gt;
&lt;br /&gt;
Check your /etc/mysql/my.cnf , and see where is the socket location. for me it was /var/run/mysqld/mysqld.sock , so I added a symbolic link to it.&lt;br /&gt;
&lt;br /&gt;
  ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some errors that you may encounter along the way ===&lt;br /&gt;
&lt;br /&gt;
You see a file named something like &amp;quot;GitDependencies-crash.log&amp;quot; in your UnrealEngine directory. The contents of the file contains this message:&lt;br /&gt;
&lt;br /&gt;
  mono GitDependencies.exe --prompt crashed with return code 134&lt;br /&gt;
&lt;br /&gt;
Solution: Ensure your copy of mono is up to date and rerun the Setup.sh script&lt;br /&gt;
At time of writing, I am using mono 3.2.8&lt;br /&gt;
&lt;br /&gt;
Reason - This could be due to an old version of mono, but it seems to happen for other reasons too.&lt;br /&gt;
&lt;br /&gt;
Should probably clean and recompile UEEditor at this point.&lt;br /&gt;
&lt;br /&gt;
=== error while loading shared libraries: libLND.so ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
user@u13:~/Development/UnrealEngine/Engine/Binaries/Linux$ ./UE4Editor &lt;br /&gt;
./UE4Editor: error while loading shared libraries: libLND.so: cannot open shared object file: No such file or directory&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To fix this, copy libLND.so (there are several flavors) from another directory to the Binaries/Linux directory. Do not use a symbolic link, just make a copy of the file. On my installation, a sym link worked in some places but failed in miserably others.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
$ find ../../../../ -name libLND.so -print&lt;br /&gt;
../../../../UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/lib/Linux/x86_64-unknown-linux-gnu/libLND.so&lt;br /&gt;
cp ../../../../UnrealEngine/Engine/Source/ThirdParty/LinuxNativeDialogs/UELinuxNativeDialogs/lib/Linux/x86_64-unknown-linux-gnu/libLND.so .&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Some fonts are in the wrong place. Its important to fix this ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-07.28.52:548][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Slate/Fonts/Roboto-Italic.ttf&#039;&lt;br /&gt;
$ find ../../../ -name Roboto-Italic.ttf -print&lt;br /&gt;
../../../Engine/Content/Editor/Slate/Fonts/Roboto-Italic.ttf&lt;br /&gt;
../../../Engine/Content/Slate/Testing/Fonts/Roboto-Italic.ttf&lt;br /&gt;
cp ../../../Engine/Content/Editor/Slate/Fonts/*  ../../../Engine/Content/Slate/Fonts/&lt;br /&gt;
cp ../../../Engine/Content/Slate/Testing/Fonts/* ../../../Engine/Content/Slate/Fonts/&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== I don&#039;t know what to do about these two errors yet ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-07.29.12:524][  0]LogDirectoryWatcher:Error: inotify_add_watch cannot watch folder /home/user/Development/UnrealEngine/Engine/Plugins/Experimental/CharacterAI/Content/&lt;br /&gt;
[2015.05.03-07.29.12:524][  0]LogDirectoryWatcher:Warning: Failed to begin reading directory changes for ../../../Engine/Plugins/Experimental/CharacterAI/Content/.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== asoundlib error after adding voice and midi modules ===&lt;br /&gt;
   /home/planeshift/PSUnreal/Plugins/MidiAsset/Source/MidiInterface/Classes/RtMidi.cpp:1449:10: fatal error: &#039;alsa/asoundlib.h&#039; file not found&lt;br /&gt;
   #include &amp;lt;alsa/asoundlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Had to:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; sudo apt-get install libasound2-dev libasound2&lt;br /&gt;
==Manual Compile==&lt;br /&gt;
&lt;br /&gt;
===Create and Save the &amp;quot;Blank&amp;quot; project from the Blueprint Tab===&lt;br /&gt;
&lt;br /&gt;
once you have the Editor open and working, create the &amp;quot;Blank&amp;quot; project and save it. We need to do this, otherwise we will not be able to cook content later on and will get an error message stating that some folder ( /Saved/Sandbox/DefaultGame/ ? )  is missing. This seems to be some sort of a bug or perhaps lazy initialization. &lt;br /&gt;
&lt;br /&gt;
#Open the editor&lt;br /&gt;
#Click on New Project&lt;br /&gt;
# Click on &amp;quot;Blank&amp;quot;  ( In the Blueprint tab, not the one in the C++ tab )&lt;br /&gt;
# Click &amp;quot;Create Project&amp;quot;&lt;br /&gt;
#Save All and exit for now.&lt;br /&gt;
&lt;br /&gt;
===Clone and Import the psunreal project:===&lt;br /&gt;
&lt;br /&gt;
Get the svn password and the link from Talad. We are going to download the source and put it into the UnrealEngine directory in order to work around yet another bug. After that, we run GenerateProjectFiles.sh once more to add our project to The Makefile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cd ~/Development/UnrealEngine/&lt;br /&gt;
svn co svn://super.secret.source.path&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
we now have ~/Development/UnrealEngine/psunreal. Run the script below to add our project to the Makefile &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
./GenerateProjectFiles.sh &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Open the PSUNREAL project ( finally.. )===&lt;br /&gt;
&lt;br /&gt;
Click File and then Open Project&lt;br /&gt;
&lt;br /&gt;
You will now see the Blank Project and another named MyProject2 ( that&#039;s ours )&lt;br /&gt;
&lt;br /&gt;
Click MyProject2 and then open.&lt;br /&gt;
&lt;br /&gt;
You will get another error message:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a few errors about missing Android stuff. I don&#039;t we need to worry about this.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-08.14.15:716][  0]LogModuleManager:Warning: ModuleManager: Unable to load module &#039;AndroidRuntimeSettings&#039; because the file &#039;/home/user/Development2/UnrealEngine/Engine/Binaries/Linux/&#039; was not found.&lt;br /&gt;
&lt;br /&gt;
[2015.05.03-08.14.15:719][  0]LogModuleManager:Warning: ModuleManager: Unable to load module &#039;AndroidPlatformEditor&#039; because the file &#039;/home/user/Development2/UnrealEngine/Engine/Binaries/Linux/&#039; was not found.&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this missing font, we need to repeat the solution above for Roboto-Italic...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.03-08.14.18:469][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Editor/Slate/Fonts/Roboto-Regular.ttf&#039;&lt;br /&gt;
[2015.05.03-08.14.18:471][  0]LogSlate:Warning: Failed to load font data from &#039;../../../Engine/Content/Editor/Slate/Fonts/Roboto-Bold.ttf&#039;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Building, cooking, packaging... oh my.===&lt;br /&gt;
&lt;br /&gt;
So when you build the game there are several things that need to be built: &lt;br /&gt;
*shaders&lt;br /&gt;
* the code itself&lt;br /&gt;
*some lighting resources&lt;br /&gt;
&lt;br /&gt;
You also need to cook the game&#039;s content. This means, you are taking all the art, models, textures, etc.. and converting them into a format that the Unreal engine likes. When you go to build the game for another platform - like an android tablet, pc, mac, or whatever, it will convert those &amp;quot;assets&amp;quot; into a format that is more suitable for the target platform.&lt;br /&gt;
&lt;br /&gt;
After you have cooked the content, you should be able to &amp;quot;package&amp;quot; the game. This simply means, you are setting up the files that will be distributed to the client. They will be formatted to work on the target platform and will be laid out into a directory structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Setting up the server===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions in the &amp;quot;Planeshift Compiling Guide&amp;quot; for setting up the mysql database. You&#039;ll need to set it up ( either Mariadb or mysql ) and then run a few scripts to get a planeshift user account set up along with some needed data.&lt;br /&gt;
&lt;br /&gt;
When you run the new unreal server ( make target is: MyProject2Server ), it will attempt to connect to the DB. If successful, you will see something like this in the shell that you ran it from:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogWorld: Bringing up level for play took: 0.000330&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogTemp:Warning: Hello world! BEFORE&lt;br /&gt;
[2015.05.02-08.25.58:359][  0]LogTemp: Hello world! AFTER 4 5&lt;br /&gt;
[2015.05.02-08.25.58:371][  0]LOG_STARTUP:Display: Database Host: &#039;localhost&#039; User: &#039;planeshift&#039; Databasename: &#039;planeshift&#039; Port: 128880496&lt;br /&gt;
[2015.05.02-08.25.58:559][  0]LOG_STARTUP:Display: Started Database with version: 1279&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You can also check to see if the server connected to your mysql or mariadb server by making a simple script&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  SELECT SUBSTRING_INDEX(host, &#039;:&#039;, 1) AS host_short,&lt;br /&gt;
            GROUP_CONCAT(DISTINCT USER)   AS users,&lt;br /&gt;
            COUNT(*)&lt;br /&gt;
     FROM   information_schema.processlist&lt;br /&gt;
     GROUP  BY host_short&lt;br /&gt;
     ORDER  BY COUNT(*),&lt;br /&gt;
               host_short;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save this to a file called show_connected.sql and then log into the db and run it from there.&lt;br /&gt;
               &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  $ mysql -u root -pMYSECRETPASSWORD&lt;br /&gt;
  Welcome to the MariaDB monitor.  Commands end with ; or \g.&lt;br /&gt;
  Your MariaDB connection id is 51&lt;br /&gt;
  Server version: 5.5.41-MariaDB-1ubuntu0.14.10.1 (Ubuntu)&lt;br /&gt;
  Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.&lt;br /&gt;
  Type &#039;help;&#039; or &#039;\h&#039; for help. Type &#039;\c&#039; to clear the current input statement.&lt;br /&gt;
  MariaDB $ \. show_connected.sql&lt;br /&gt;
  +------------+-----------------+----------+&lt;br /&gt;
  | host_short | users           | COUNT(*) | &lt;br /&gt;
  +------------+-----------------+----------+&lt;br /&gt;
  | localhost  | planeshift,root |        2 |&lt;br /&gt;
  +------------+-----------------+----------+ &lt;br /&gt;
  1 row in set (0.03 sec)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===cmake command for libzip===&lt;br /&gt;
  mkdir build&lt;br /&gt;
  cd build&lt;br /&gt;
  &amp;gt;cmake -DZLIB_LIBRARY=/home/planeshift/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8/lib/Linux/x86_64-unknown-linux-gnu/libz_fPIC.a -DZLIB_INCLUDE_DIR=/home/planeshift/UnrealEngine/Engine/Source/ThirdParty/zlib/v1.2.8/include/Linux/x86_64-unknown-linux-gnu/ -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF ..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===build xdelta===&lt;br /&gt;
  cd xdelta/xdelta3&lt;br /&gt;
  rm -rf build&lt;br /&gt;
  mkdir build&lt;br /&gt;
  cd build&lt;br /&gt;
&lt;br /&gt;
I had to add -fPIC to this line:&lt;br /&gt;
  vi CMakeLists.txt&lt;br /&gt;
&lt;br /&gt;
 set(CMAKE_C_FLAGS &amp;quot;${CMAKE_C_FLAGS} -fPIC -DSIZEOF_SIZE_T=8 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  cmake ..&lt;br /&gt;
  cmake --build .&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Windows&amp;diff=25775</id>
		<title>Building PSUnreal on Windows</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Building_PSUnreal_on_Windows&amp;diff=25775"/>
		<updated>2026-08-23T17:41:53Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Compiling Unreal Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Reference docs ==&lt;br /&gt;
&lt;br /&gt;
Check this page as reference: https://wiki.unrealengine.com/Dedicated_Server_Guide_%28Windows_%26_Linux%29&lt;br /&gt;
&lt;br /&gt;
There are two ways to compile and run your project:&lt;br /&gt;
 * Compiling the editor and then running/debugging the game within the editor. Please note VS breakpoints will work also in this mode. THIS IS THE ONE WE USE AS DEFAULT.&lt;br /&gt;
 * Compiling the client without editor, and you will then need cooked content (prepared art files). All non-editor builds require cooked content, however, you can run an editor build with the &amp;quot;-game&amp;quot; command line flag to run the game directly using the editor data; please note however that this will be slower than a cooked build as the editor is essentially processing assets on the fly.&lt;br /&gt;
&lt;br /&gt;
== Compiling Unreal Engine ==&lt;br /&gt;
&lt;br /&gt;
High level steps:&lt;br /&gt;
&lt;br /&gt;
* Step 1:  Register an account at UnrealEngine and GitHub&lt;br /&gt;
* Step 2:  Add your GitHub username to in your UnrealEngine profile under your dashboard&lt;br /&gt;
* Step 3:  Download the source code from UE4 Repo&lt;br /&gt;
** list remote branches with: git ls-remote https://github.com/EpicGames/UnrealEngine.git&lt;br /&gt;
** get source code with: git clone --depth=1 --single-branch -b 5.4.3-release https://github.com/EpicGames/UnrealEngine.git&lt;br /&gt;
** this will create a &amp;quot;Unreal Engine&amp;quot; directory as child of the dir where you run the command&lt;br /&gt;
* Step 4:  Install Visual Studio 2022, follow [https://docs.unrealengine.com/en-us/Programming/Development/VisualStudioSetup#optionsforanewvisualstudioinstallation these instructions] to get the right components in your Visual Studio&lt;br /&gt;
* Step 5:  Run Setup.bat to download and install the prerequisites&lt;br /&gt;
* Step 6:  Run GenerateProjectFiles.bat to make project files&lt;br /&gt;
** if it complains about windows 8.1 sdk, just install it from [https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk here]&lt;br /&gt;
** If you get the error &amp;quot;The reference assemblies for framework &amp;quot;.NETFramework,Version=v4.6.2&amp;quot; were not found.&amp;quot; just install it from [https://www.microsoft.com/en-us/download/details.aspx?id=53321 here]&lt;br /&gt;
* Step 7:  If you dont have it yet, you need to make an account to login to Visual Studio.&lt;br /&gt;
* Step 8:  Launch Visual Studio, open UE5.sln and Build Unreal Engine 5 with Development Editor configuration and Win64 Platform&lt;br /&gt;
* Step 9: Copy F:\UnrealEngine\Engine\Source\ThirdParty\zlib\v1.2.8\lib\Win64\VS2015\zlib.dll to F:\Unreal Projects\MyProject2\PSUnreal\Binaries\Win64&lt;br /&gt;
* Step 10:  Run the UnrealEditor.exe from Engine\Binaries\Win64\ subdirectory&lt;br /&gt;
&lt;br /&gt;
== Compiling PSUnreal ==&lt;br /&gt;
&lt;br /&gt;
You need to install MariaDB Connector from: https://mariadb.com/downloads/#connectors&lt;br /&gt;
&lt;br /&gt;
* Select C connector , version 3.3.1GA and MS Windows (64-bit) as platform&lt;br /&gt;
* It will install it in C:\Program Files\MariaDB\MariaDB Connector C 64-bit&lt;br /&gt;
* From the MariaDB install directory, copy both lib/ and include/ (with subfolders) into PSUnreal\ThirdParty\MariaDB\&lt;br /&gt;
&lt;br /&gt;
Compile Wordnet&lt;br /&gt;
* Open PSUnreal\ThirdParty\Wordnet\Wordnet.sln with Visual Studio&lt;br /&gt;
* Click on Compile&lt;br /&gt;
* Copy this file: PSUnreal\ThirdParty\Wordnet\x64\Debug\Wordnet.lib in PSUnreal\ThirdParty\Wordnet\lib\x64\Wordnet.lib&lt;br /&gt;
&lt;br /&gt;
In this mode you will use the Editor to run/debug the game&lt;br /&gt;
&lt;br /&gt;
* Generate project files, by right clicking on PSUnreal.uproject and &amp;quot;Generate Visual Studio project files&amp;quot;&lt;br /&gt;
* Open Visual Studio &#039;&#039;&#039;2017&#039;&#039;&#039;&lt;br /&gt;
* Open PSUnreal.sln&lt;br /&gt;
* Be sure you have PSUnreal selected as startup project&lt;br /&gt;
[[File:Psunreal compile1.png|400px]]&lt;br /&gt;
&lt;br /&gt;
* Select &amp;quot;PSUnreal&amp;quot; project from the left tree view and &amp;quot;DebugGame Editor&amp;quot; as configuration from the top dropdown&lt;br /&gt;
[[File:Psunreal compile2.png]]&lt;br /&gt;
* NOTE: DebugGame configuration builds the engine as optimized, but leaves the game code debuggable. This configuration is ideal for debugging only game modules.&lt;br /&gt;
* Compile&lt;br /&gt;
&lt;br /&gt;
== Preparing the server ==&lt;br /&gt;
&lt;br /&gt;
* Install mysql server and launch it&lt;br /&gt;
* Create the PlaneShift database&lt;br /&gt;
  &amp;gt; mysql -u username -ppassword&lt;br /&gt;
&lt;br /&gt;
* IF you get &#039;mysql&#039; is not recognized command, means windows cannot find it. Do the following&lt;br /&gt;
** press start, type &amp;quot;advanced setting&amp;quot;, the click on &amp;quot;View advanced system settings&amp;quot;&lt;br /&gt;
** Click on &amp;quot;Environment Variables&amp;quot; at the bottom&lt;br /&gt;
** Click on PATH line, end &amp;quot;Edit&amp;quot;.&lt;br /&gt;
** Then click on &amp;quot;New&amp;quot; to add a new element in the PATH variable&lt;br /&gt;
** Copy paste the directory where your mysql.exe is , for me is &amp;quot;F:\Develop\MySQL\MySQL Server 5.5\bin&amp;quot;&lt;br /&gt;
** Click on OK on both windows to apply&lt;br /&gt;
** open A NEW command prompt, now it will work&lt;br /&gt;
&lt;br /&gt;
The default username is root with no password.&lt;br /&gt;
&lt;br /&gt;
Then from within mysql:&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; create database planeshift;&lt;br /&gt;
  mysql&amp;gt; GRANT ALL PRIVILEGES ON planeshift.* TO planeshift@localhost IDENTIFIED BY &#039;planeshift&#039;;&lt;br /&gt;
  mysql&amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; cd PSUnreal\Scripts&lt;br /&gt;
  &amp;gt; mysql -u planeshift -pplaneshift&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; use planeshift;&lt;br /&gt;
  mysql&amp;gt; source psunreal_mysql_20200401.sql;&lt;br /&gt;
  mysql&amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
* To test if you can connect to your database install: https://dbeaver.io/&lt;br /&gt;
* Provide the connect information : locahost , port 3306, you should see the planeshift schema with a set of tables.&lt;br /&gt;
&lt;br /&gt;
== Launching the server and client ==&lt;br /&gt;
&lt;br /&gt;
There are different ways to launch the client in debug mode:&lt;br /&gt;
&lt;br /&gt;
1) PREFERRED. PSUnreal\Scripts\client.bat (you may need to adapt the path to your installation)&lt;br /&gt;
&lt;br /&gt;
2) From Visual Studio&lt;br /&gt;
* Select the DebugGameEditor configuration&lt;br /&gt;
* From VS properties on PSUnreal add command line -debug -game&lt;br /&gt;
* It will launch directly without opening the editor app&lt;br /&gt;
&lt;br /&gt;
3) From Visual Studio with the Editor first&lt;br /&gt;
* Select the DebugGameEditor configuration&lt;br /&gt;
* From VS properties on PSUnreal remove -game from command line&lt;br /&gt;
* It will launch the Editor, then you press &amp;quot;Play&amp;quot; in the editor. The breakpoints placed in VS are working as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to launch the server:&lt;br /&gt;
1) PREFERRED. Use PSUnreal\Scripts\server.bat (you may need to adapt the path to your installation)&lt;br /&gt;
&lt;br /&gt;
2) from VS:&lt;br /&gt;
* Select the &amp;quot;DebugGame Editor&amp;quot; configuration (if you select Development Editor then the Editor will start instead of the server)&lt;br /&gt;
* From VS properties on PSUnreal , select &amp;quot;Debugging&amp;quot; and then add this in the command line: -server -log&lt;br /&gt;
* The resulting property will be like: &amp;quot;$(SolutionDir)$(ProjectName).uproject&amp;quot; -server -log&lt;br /&gt;
* It will launch directly without going through the editor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Updating your database ==&lt;br /&gt;
&lt;br /&gt;
From time to time a new database is posted under \Scripts, example: psunreal_mysql_20200401.sql&lt;br /&gt;
&lt;br /&gt;
To update your database you need to:&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; cd PSUnreal\Scripts&lt;br /&gt;
  &amp;gt; mysql -u root -p&lt;br /&gt;
  &lt;br /&gt;
  mysql&amp;gt; drop database planeshift;&lt;br /&gt;
  mysql&amp;gt; create database planeshift;&lt;br /&gt;
  mysql&amp;gt; GRANT ALL PRIVILEGES ON planeshift.* TO planeshift@localhost IDENTIFIED BY &#039;planeshift&#039;;&lt;br /&gt;
  mysql&amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
  &amp;gt; mysql -u planeshift -pplaneshift&lt;br /&gt;
&lt;br /&gt;
  mysql&amp;gt; use planeshift;&lt;br /&gt;
  mysql&amp;gt; source psunreal_mysql_20200401.sql;&lt;br /&gt;
  mysql&amp;gt; quit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
If you need to debug the server or the client in Visual Studio:&lt;br /&gt;
&lt;br /&gt;
# Keep the configuration &amp;quot;DebugGame Editor&amp;quot;&lt;br /&gt;
# Right click on PSUnreal project -&amp;gt; Properties&lt;br /&gt;
# Select the &amp;quot;Debugging&amp;quot; category&lt;br /&gt;
# To debug the client add -game to the &amp;quot;Command Arguments&amp;quot;&lt;br /&gt;
# To debug the server add -server to the &amp;quot;Command Arguments&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[File:Vs_debug.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running the PSLauncher I got this error:&lt;br /&gt;
 Assetion failed: GraphicsContext. There is no active graphics context on this command list. There may be a missing call to Switchpipeline().&lt;br /&gt;
It was caused by this line in Target.cs&lt;br /&gt;
 bUseChecksInShipping = true;&lt;br /&gt;
seems to be broken in UE5&lt;br /&gt;
&lt;br /&gt;
=== GetObjectFromNetGUID: Network checksum mismatch. ===&lt;br /&gt;
In 5.4.3 I was getting this error, as there is a UE bug in the replication code. use my patch UESource\replication_bug.diff&lt;br /&gt;
 LogNetPackageMap: Warning: GetObjectFromNetGUID: Network checksum mismatch. FullNetGUIDPath: [19]/Game/Blueprints/dummyChar.[17]Default__dummyChar_C, 124483537, 159126252&lt;br /&gt;
 LogNetPackageMap: Warning: InternalLoadObject: Unable to resolve object from path. Path: Default__dummyChar_C, Outer: /Game/Blueprints/dummyChar, NetGUID: 17&lt;br /&gt;
 LogNetPackageMap: Warning: InternalLoadObject: Unable to resolve object. FullNetGUIDPath: [19]/Game/Blueprints/dummyChar.[17]Default__dummyChar_C&lt;br /&gt;
 LogNetPackageMap: Error: UPackageMapClient::SerializeNewActor. Unresolved Archetype GUID. Path: Default__dummyChar_C, NetGUID: 17.&lt;br /&gt;
 LogNetPackageMap: Error: UPackageMapClient::SerializeNewActor Unable to read Archetype for NetGUID 21904 / 17&lt;br /&gt;
 LogNet: Warning: UActorChannel::ProcessBunch: SerializeNewActor failed to find/spawn actor. Actor: None, Channel: 4&lt;br /&gt;
&lt;br /&gt;
== cmake command for libzip ==&lt;br /&gt;
  mkdir build&lt;br /&gt;
  cd build&lt;br /&gt;
  C:\PSUnreal\ThirdParty\Libzip\libzip\build&amp;gt;&amp;quot;F:\My Programs\Develop\CMake\bin\cmake&amp;quot; -DZLIB_LIBRARY=C:\UnrealEngine\Engine\Source\ThirdParty\zlib\v1.2.8\lib\Win64\VS2015\Release\zlibstatic.lib -DZLIB_INCLUDE_DIR=C:\UnrealEngine\Engine\Source\ThirdParty\zlib\v1.2.8\include -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF -DENABLE_WINDOWS_CRYPTO=OFF -DENABLE_BZIP2=OFF -DENABLE_LZMA=OFF -G &amp;quot;Visual Studio 15 2017 Win64&amp;quot; ..&lt;br /&gt;
&lt;br /&gt;
== LoadConfig - import failed ==&lt;br /&gt;
I got this error:&lt;br /&gt;
&lt;br /&gt;
LogInit: Display: LogObj: Error: LoadConfig (/Script/GLTFExporter.Default__GLTFExportOptions): import failed for DefaultMaterialBakeSize in: POT_1024&lt;br /&gt;
&lt;br /&gt;
I solved it by deleting G:\PSUnreal511\Saved\Config . You must have the Editor closed, or the editor is resaving those ini files.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Compendium_entries&amp;diff=25774</id>
		<title>Compendium entries</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Compendium_entries&amp;diff=25774"/>
		<updated>2026-07-23T20:08:44Z</updated>

		<summary type="html">&lt;p&gt;Talad: Created page with &amp;quot;To add a new creature/plant/mineral compendium entry look at codex_nature.item_type and codex_nature.ref_id&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To add a new creature/plant/mineral compendium entry look at [[Codex natureTable|codex_nature]].item_type and [[Codex natureTable|codex_nature]].ref_id&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Config&amp;diff=25773</id>
		<title>PSUnreal Config</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Config&amp;diff=25773"/>
		<updated>2026-07-23T20:01:41Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Dynamic elements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Static elements ==&lt;br /&gt;
&lt;br /&gt;
* [[Config Races]]&lt;br /&gt;
&lt;br /&gt;
* [[Config Character Creation]]&lt;br /&gt;
&lt;br /&gt;
* [[How to define Sectors]]&lt;br /&gt;
&lt;br /&gt;
* [[Music and Ambience Sounds]]&lt;br /&gt;
*[[Creatures and Attack sounds]]&lt;br /&gt;
*[[Creatures, Attack Types and Attacks]]&lt;br /&gt;
&lt;br /&gt;
* Lights&lt;br /&gt;
&lt;br /&gt;
* [[HowtoAddASpellToTheDatabase|Howto add a spell to the database.]]&lt;br /&gt;
*[[Combat and chase acceptance range]]&lt;br /&gt;
*[[Factions and Organizations]]&lt;br /&gt;
*[[Weapon Trails]]&lt;br /&gt;
*[[Voiceovers (audio files)]]&lt;br /&gt;
&lt;br /&gt;
== Dynamic elements ==&lt;br /&gt;
&lt;br /&gt;
* [[PSUnreal Proximity Triggers]]&lt;br /&gt;
&lt;br /&gt;
* [[Random Generated events]]&lt;br /&gt;
&lt;br /&gt;
* [[Hunt Locations and Natural Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Levers and Interactable Objects]]&lt;br /&gt;
&lt;br /&gt;
* [[Traps]]&lt;br /&gt;
* [[Instances]]&lt;br /&gt;
*[[Loot]]&lt;br /&gt;
*[[PSUnreal Guildhouses|Guildhouses (action locations)]]&lt;br /&gt;
*[[Setting Items]]&lt;br /&gt;
*[[Add new NPC]]&lt;br /&gt;
*[[Add Waypoints and paths]]&lt;br /&gt;
*[[Minigames]]&lt;br /&gt;
*[[Procedural Dungeon Generation]]&lt;br /&gt;
*[[Reload - Reloading at runtime]]&lt;br /&gt;
*[[PSUnreal Fishing Setup|Fishing Setup]]&lt;br /&gt;
*[[Compendium entries]]&lt;br /&gt;
&lt;br /&gt;
== Npcs ==&lt;br /&gt;
&lt;br /&gt;
* Behaviours: Nearly all we have is documented in [[NpcClient Design|this page]] and its sub pages&lt;br /&gt;
* [[KAs (Knowledge Areas) list and structure|Knowledge Areas]] (for dialogues)&lt;br /&gt;
&lt;br /&gt;
== Quests ==&lt;br /&gt;
&lt;br /&gt;
* [[Quest scripts syntax]]&lt;br /&gt;
&lt;br /&gt;
== Mechanisms ==&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Loot&amp;diff=25772</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Loot&amp;diff=25772"/>
		<updated>2026-07-21T20:58:09Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can get loot through a number of methods:&lt;br /&gt;
&lt;br /&gt;
1) Through quests, we have the possibility to reward players items or money. See [https://planeshift.top-ix.org/pswiki/index.php/Quest_scripts_syntax#Give Give] script directive. At the moment this cannot be randomized.&lt;br /&gt;
&lt;br /&gt;
2) Harvesting loot items from [[Hunt Locations and Natural Resources]], which spawn items on the ground or allow you to dig for items. At the moment this cannot be randomized. Only quality changes when harvesting.&lt;br /&gt;
&lt;br /&gt;
2.1) Special chests, declared as &#039;CONSUMABLE&#039; . This is the current list of items:&lt;br /&gt;
&lt;br /&gt;
* Hardened treasure crate&lt;br /&gt;
* Adorned treasure Crate&lt;br /&gt;
* Sturdy treasure Chest&lt;br /&gt;
* Metal treasure Chest&lt;br /&gt;
* Reinforced treasure Chest&lt;br /&gt;
* Wide treasure Chest&lt;br /&gt;
* Ancient treasure Chest&lt;br /&gt;
*Jeweled treasure Chest&lt;br /&gt;
&lt;br /&gt;
These have a special consume script stored in [[ItemStatsTable|item_stats.consume_script]] which is pointing to a [[ProgressionEventsTable|progression event]] . This can be the legacy &#039;treasure_chest&#039; script looking at the base price and scaling rewards accordingly, OR it can be a new script using the [[ProgressionEvents#LootSetOp|LootSetOp]] which points to [[Loot rulesTable|loot_rules.id]].&lt;br /&gt;
&lt;br /&gt;
2.2) For Procedural Dungeon Generation we added a new feature. The chests are generated with a defined item_quality, which will determine the loot rule to use. In psScheduleItem::CreateItem() we set the quality, and then the consume script (treasure_chest_rnd_loot) uses the quality to determine the loot rules. The chest used is ID 7111 (Arcana treasure Chest).&lt;br /&gt;
&lt;br /&gt;
3) Killing creatures will allow players to loot. Loot is defined in [[CharactersTable|characters.npc_addl_loot_category_id]] field, which points to [[Loot rulesTable|loot_rules.id]] , and then to [[Loot rule detailsTable|loot_rule_details]] table. Here we can control the list of items and the % of chance to be random.&lt;br /&gt;
&lt;br /&gt;
4) Buy from merchants. Any item present in the inventory of a NPC in a bulk slot can be bought is the NPC is a merchant. This is defined in table [[Merchant item categoriesTable|merchant_item_categories]] where all item categories are listed for this NPC. &lt;br /&gt;
&lt;br /&gt;
5) Generated events:&lt;br /&gt;
&lt;br /&gt;
* may spawn chests or puzzles providing rewards. in this case we may spawn a chest listed in point 2.1) above, but we will then specify in the event XML the traps properties. &lt;br /&gt;
*may spawn creatures with special loot tables, see point 3) above&lt;br /&gt;
* may spawn merchants with special goods to sell, see point 4) above&lt;br /&gt;
6) Main loot and furniture loot in generated dungeons&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Loot&amp;diff=25771</id>
		<title>Loot</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Loot&amp;diff=25771"/>
		<updated>2026-07-21T20:53:55Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can get loot through a number of methods:&lt;br /&gt;
&lt;br /&gt;
1) Through quests, we have the possibility to reward players items or money. See [https://planeshift.top-ix.org/pswiki/index.php/Quest_scripts_syntax#Give Give] script directive. At the moment this cannot be randomized.&lt;br /&gt;
&lt;br /&gt;
2) Harvesting loot items from [[Hunt Locations and Natural Resources]], which spawn items on the ground or allow you to dig for items. At the moment this cannot be randomized. Only quality changes when harvesting.&lt;br /&gt;
&lt;br /&gt;
2.1) Special chests, declared as &#039;CONSUMABLE&#039; . This is the current list of items:&lt;br /&gt;
&lt;br /&gt;
* Hardened crate&lt;br /&gt;
* Adorned Crate&lt;br /&gt;
* Sturdy Chest&lt;br /&gt;
* Metal Chest&lt;br /&gt;
* Reinforced Chest&lt;br /&gt;
* Wide Chest&lt;br /&gt;
* Ancient Chest&lt;br /&gt;
*Jeweled Chest&lt;br /&gt;
&lt;br /&gt;
These have a special consume script stored in [[ItemStatsTable|item_stats.consume_script]] which is pointing to a [[ProgressionEventsTable|progression event]] . This can be the legacy &#039;treasure_chest&#039; script looking at the base price and scaling rewards accordingly, OR it can be a new script using the [[ProgressionEvents#LootSetOp|LootSetOp]] which points to [[Loot rulesTable|loot_rules.id]].&lt;br /&gt;
&lt;br /&gt;
2.2) For Procedural Dungeon Generation we added a new feature. The chests are generated with a defined item_quality, which will determine the loot rule to use. In psScheduleItem::CreateItem() we set the quality, and then the consume script (treasure_chest_rnd_loot) uses the quality to determine the loot rules. The chest used is ID 7111 (Arcana treasure Chest).&lt;br /&gt;
&lt;br /&gt;
3) Killing creatures will allow players to loot. Loot is defined in [[CharactersTable|characters.npc_addl_loot_category_id]] field, which points to [[Loot rulesTable|loot_rules.id]] , and then to [[Loot rule detailsTable|loot_rule_details]] table. Here we can control the list of items and the % of chance to be random.&lt;br /&gt;
&lt;br /&gt;
4) Buy from merchants. Any item present in the inventory of a NPC in a bulk slot can be bought is the NPC is a merchant. This is defined in table [[Merchant item categoriesTable|merchant_item_categories]] where all item categories are listed for this NPC. &lt;br /&gt;
&lt;br /&gt;
5) Generated events:&lt;br /&gt;
&lt;br /&gt;
* may spawn chests or puzzles providing rewards. in this case we may spawn a chest listed in point 2.1) above, but we will then specify in the event XML the traps properties. &lt;br /&gt;
*may spawn creatures with special loot tables, see point 3) above&lt;br /&gt;
* may spawn merchants with special goods to sell, see point 4) above&lt;br /&gt;
6) Main loot and furniture loot in generated dungeons&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25770</id>
		<title>Quest scripts syntax</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25770"/>
		<updated>2026-06-17T20:24:18Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Give */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Structure of a quest script ==&lt;br /&gt;
Quests are written out in chunks called steps. Each step covering the requirements of the previous one.&lt;br /&gt;
&lt;br /&gt;
== Things to know before you start ==&lt;br /&gt;
&lt;br /&gt;
* Quest scripts should written ideally in a text editor and now in MS Word or similar so that no illegal characters make it into the quest dialog which would result in errors when viewed in game.&lt;br /&gt;
* Quotes are usually the ones which break the scripts and :&lt;br /&gt;
* Only &#039; &amp;quot; should be used&lt;br /&gt;
* ‘ ’ ” “ … These should not be present in the text at all.&lt;br /&gt;
* Any line of text in the script which begins with a ‘#’ character is ignored by the server and only acts as a comment by the author so that they can leave explanations as to what is happening, or, give information about the step number.&lt;br /&gt;
* The start of a ‘step’ is defined by a series of three dots ‘...’ Everything after this text up until the next ‘...’ is included in the step. The only unique case is the first step, this does not need ‘...’ and includes all the text before the first ‘...’&lt;br /&gt;
&lt;br /&gt;
== Important rules concerning steps ==&lt;br /&gt;
&lt;br /&gt;
* Every step in the quest should be explicitly completed or locked correctly. Example: &amp;quot;Complete Quest Name Step #&amp;quot; before the Quest is completed.&lt;br /&gt;
* A step can require the completion of another step by the command: &amp;quot;Requires completion of Quest Name Step #&amp;quot;&lt;br /&gt;
* Step 1 does not exist, step 1 is part of the start script (where you use the command &amp;quot;give me a quest&amp;quot;) and cannot be used as a require completion of step number.&lt;br /&gt;
* You may have multiple Require Completes at the beginning of a step.&lt;br /&gt;
* A step may also require another step NOT to have been completed with the command: &amp;quot;Require no completion of Quest Name Step #&amp;quot;.&lt;br /&gt;
* The Quest name must be exact! It is case sensitive. The same goes for NPC names.&lt;br /&gt;
* Each step should be commented like this: &amp;quot;# Step 2 - A description of actions of this step&amp;quot;. # Marks it as a comment not processed by the engine.&lt;br /&gt;
* You can also check for statements with this syntax: &amp;quot;Require &amp;lt;no/not&amp;gt; operator1 | &amp;lt;no/not&amp;gt; operator2 | ...| &amp;lt;no/not&amp;gt; operatorN.&amp;quot; Where operator is a prerequisite (see below the prerequisite chapter), from completion of to time of day etc. The | represents the OR. &#039;&#039;Example: &amp;quot;Require completion of Questname Step 3 | completion of Questname Step 7.&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s see an example before beginning the explanation. The following example is made of two steps. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 1&#039;&#039;&#039;&lt;br /&gt;
 P: Short Trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Do you have any work for me to do?&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes I do. Just breathe one time.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 P: Ok, I did it!&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Great, your quest is completed.&lt;br /&gt;
&lt;br /&gt;
== Syntax Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
To create a comment line you must start the line with a &amp;quot;#&amp;quot;. These lines are not evaluated by the engine as things that need to be done. These comment lines show what is going on and what are the intentions of the quest writer. This is important because more than one person are often working on a quest script, or eventually for laterbug fixing it will be easier to find the exact problem without reading the entire quest.&lt;br /&gt;
&lt;br /&gt;
Each step in a quest should be started by a comment like this &amp;quot;#Step 2 - Description of step.&amp;quot;. You can use comments to more that just noting the step number. Any where within the script you can add comments to help your fellow scripters understand the code. We will use comments to explain things within the scripts here.&lt;br /&gt;
&lt;br /&gt;
=== Trigger and Menu ===&lt;br /&gt;
The trigger is for the engine, while the menu is what shows up in the player quest menu. The trigger is defined by a &amp;quot;P:&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
P: use to be what the player typed to trigger the step, but with the menu system are now used as a description of what step the player is choosing, for example P:yeshelp. (slide 3). The only time you must use exact text is when a player types the answer to a question you pose them&lt;br /&gt;
&lt;br /&gt;
Because you are talking to the engine it must be exact a colon after the &amp;quot;P:&amp;quot; and a period at the end of the sentence. This is also true of the Menu in every case in which the player (P) says something to the NPC in question &amp;quot;P: Short Trigger.&amp;quot; comes first, then below comes the &amp;quot;Menu:&amp;quot; line, with exactly the same requirements.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Menu&amp;quot;: Text is what the player sees when they look at the quest menu.&lt;br /&gt;
&lt;br /&gt;
Please remember that the engine does not think, it reacts to the written cues, so the syntax MUST be exact. The first player statement gives the engine the quest name. The Menu allows the player to ask for the quest from the NPC.&lt;br /&gt;
&lt;br /&gt;
Having the two &amp;quot;P:&amp;quot; and two &amp;quot;Menu:&amp;quot; on the same line informs the engine that the player has two different options. It is standard that the &amp;quot;P:&amp;quot; line is above the &amp;quot;Menu:&amp;quot; line and the &amp;quot;No.&amp;quot; answer comes first.&lt;br /&gt;
&lt;br /&gt;
These lines trigger the NPC response. In more elaborate quests the &amp;quot;Menu:&amp;quot; line may have variations on the No. or Yes. response. However remember KISS (Keep It Simple Stupid) is generally a good thing to keep in mind when you are beginning. You can have many options, but remember each &amp;quot;P:&amp;quot; must have a matching &amp;quot;Menu:&amp;quot; and they must be put in the same order&lt;br /&gt;
&lt;br /&gt;
In order to include a free textfield, you will have to include a quotation mark after the menu. The &amp;lt;?&amp;gt; has to be followed by &amp;lt;=&amp;gt; and a text. This will produce a printout of the text and the user will be able to enter a free text. E.g. &amp;quot;Menu: ?=What shall Jardet do?&amp;quot; This will result in the text &amp;quot;What shall Jardet do?&amp;quot; being printed, followed by free form input.&lt;br /&gt;
&lt;br /&gt;
 P: *. P: rock pick.&lt;br /&gt;
 Menu: ?=Please tell me your answer.&lt;br /&gt;
 Smith: No, you didn&#039;t get the right answer.&lt;br /&gt;
 Smith: Yes, it&#039;s a rock pick!.&lt;br /&gt;
&lt;br /&gt;
 P: Nothirstyinterst. P: Yesthirstyintrest.&lt;br /&gt;
 Menu: No, sounds like work. Menu: Sure, I can get it for you.&lt;br /&gt;
 Serana Tuvi: Alright. I will see you around then, stranger.&lt;br /&gt;
 Serana Tuvi: Ah, good good. &lt;br /&gt;
&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember the &amp;quot;: &amp;quot; after the P and Menu are important, as is the &amp;quot;.&amp;quot; at the end of the line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For triggers used to start quests, never use NPC names into it, because this will confuse the engine, and the trigger will not be recognized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every P: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every Menu: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every NPC: used in one step must be on different lines.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== NPC Response ===&lt;br /&gt;
Aono Rikas: here you can add a response.&lt;br /&gt;
&lt;br /&gt;
The line above is interpreted as an answer from the NPC and the engine will extract the name before the colon (:) + space as the NPC involved in this step of the quest. From now on, we will call this a response.&lt;br /&gt;
&lt;br /&gt;
The full name of the NPC is required, just the first name will not work. If it is only one name e.g Harnquist use that, and if your NPC somehow ends up with three names use all of them.&lt;br /&gt;
&lt;br /&gt;
In the first step of a quest the NPC statement will end in a question mark and is triggered by the first 2 lines. Responses are linked to each of the Triggers and Menus. So if you have two triggers you need two menu options and two NPC responses. All arranged in the same order.&lt;br /&gt;
&lt;br /&gt;
=== Dialogues ===&lt;br /&gt;
The dialogues are the most important part of the quest for a player to get immersed. So let us talk about how to make the dialogue.&lt;br /&gt;
&lt;br /&gt;
* Every punctuation, exclamation mark and question mark will create a short pause in the dialogue and create a new line.&lt;br /&gt;
* To create actions all you have to do is to use square brackets within the dialogue like this &amp;quot;Blablabla [NPC Name picks his nose] Bla bla blabla&amp;quot;&lt;br /&gt;
You may use also these commands:&lt;br /&gt;
&lt;br /&gt;
* $playerrace can be used in an impersonal and a personal manner in terms of context, consider its usage carefully.&lt;br /&gt;
&lt;br /&gt;
* $sir which gives you &amp;quot;Sir&amp;quot; or &amp;quot;Madam&amp;quot; or &amp;quot;Gemma&amp;quot; depending on the gender of the player&#039;s character. Again, this can be used to positive and negative effect. Be mindful of the NPCâ€™s tone. (Gemma is the honorific for Kran.)&lt;br /&gt;
* $playername clearly not to be used in newbie quests, have NPC establish rapport use this in second quest or even the third time a player works with a given NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Quest Notes ===&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Make sure to leave a hint of where to go next.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
== A sample quest script ==&lt;br /&gt;
&lt;br /&gt;
=== The first step ===&lt;br /&gt;
As previously mentioned Step 1 does not exist, it is just the start of the quest, and can not be required by subsequent steps. The Start of the Quest will look something like the example at the beginning (Structure 1).&lt;br /&gt;
&lt;br /&gt;
The same example can also be scripted like this:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 2&#039;&#039;&#039;&lt;br /&gt;
 P: Short trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Initial question, give me a quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes, I do have a quest for you. I need you to give Item of Importance to NPC2 Name.&lt;br /&gt;
 &lt;br /&gt;
 P: Yes P: No.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Yes, I will do that. Menu: No way stupid.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is Yes.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Item of Importance.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is No.&lt;br /&gt;
&lt;br /&gt;
In Structure 2 the answers &amp;quot;No&amp;quot; and &amp;quot;Yes&amp;quot; are inverted, like the two &amp;quot;Menu:&amp;quot; commands, so it will give the same result as Structure 1. (Answer No: nothing happens. Answer Yes: the player will get 1Item of Importance and the Quest.)&lt;br /&gt;
&lt;br /&gt;
Now, let us use a more detailed example. We will make a very simple quest: Aono wants to deliver a bottle of milk to Orchibaly. The player can choose the quest from Aono&#039;s quest menu. Orchibaly will then give the player 2 pies and a receipt to give back to Aono. The first step will be the step that assigns the quest. The P: tells the engine that this line represents something the player will say to the NPC, but what you must pay extra attention to is the &amp;quot;Menu:&amp;quot; This will be what the player will see as an option in the quest menu. If there are several options you will have to create one &amp;quot;P:&amp;quot; and a &amp;quot;Menu:&amp;quot; for each of them.&lt;br /&gt;
&lt;br /&gt;
Here we firstly gives the player the option to ask for the quest. Then Aono describes the nature of the quest and the player can choose yes or no. Right after the &amp;quot;Menu:&amp;quot; line the NPC responsewill be put. In this example Aono will reply: &amp;quot;Well, I will get someone else to do it for me.&amp;quot; if the player says no or &amp;quot;That&#039;s great. Here is the milk. Be sure not to spill it. TellOrchibaly I sent you.&amp;quot;, give the player 1 Milk Bottle and assign the quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Assign Quest&#039;&#039;&#039;&lt;br /&gt;
 # Quest: Delivery for Aono Rikas&lt;br /&gt;
 &lt;br /&gt;
 # Quest Description: Sample Quest.&lt;br /&gt;
 &lt;br /&gt;
 # The rest of the header will not be covered here.&lt;br /&gt;
 &lt;br /&gt;
 # Step 1 Aono Rikas in Hydlaa needs someone to deliver milk to Orchibally Gurpleferd in Ojaveda.&lt;br /&gt;
 &lt;br /&gt;
 P: Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Are there any jobs you need done?&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well, yes. I need some milk delivered to Orchibaly in Ojaveda. Can you do this for me?&lt;br /&gt;
 &lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Menu: No. Menu: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well I will get someone else to do it for me.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: That&#039;s great. Here is the milk. Be sure not to spill it. Tell Orchibaly I sent you.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
&lt;br /&gt;
A quest can be automatically assigned or there can be a step at the beginning of the quest to ask the player if he accepts it.&lt;br /&gt;
&lt;br /&gt;
If you want to assign it automatically use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
If you want to ask the player use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here, with the question if you want to help.&lt;br /&gt;
  P: nohelp. P: yeshelp.&lt;br /&gt;
  Menu: I don&#039;t want to. Menu: Yes I will help.&lt;br /&gt;
  NPC: Fine... Go away.&lt;br /&gt;
  NPC: Good great.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; The “Assign quest.” command will only trigger after the second NPC: dialogue line is triggered, nothing happens if the first is triggered.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The next step ===&lt;br /&gt;
To separate the step we use &amp;quot;...&amp;quot; and then a comment on what step it is and what the step is about. If you don&#039;t want this step to be repeatable you will also have to add &amp;quot;NoRepeat&amp;quot; after the &amp;quot;...&amp;quot;. The second step does not need a completion of Step 1, because Step 1 does not exist so to speak. The structure will be more or less the same as for the initial step.&lt;br /&gt;
&lt;br /&gt;
Let us continue our Delivery for Aono Quest. We have assigned the quest and the player has been given 1 Milk Bottle to give to Orchibaly. Now the player must give that milk to Orchibaly. Either by using the give GUI or by using the quest menu. The first thing we have to do here is to set up the give trigger. If the player gives Orchibaly the milk, he will answer &amp;quot;Oh, yes the milk. Please give it to me. Now i need you to deliver these two pies and this receipt back toAono.&amp;quot;, Give the player 2 pies and a Receipt from Orchibaly. The step is then completed.&lt;br /&gt;
&lt;br /&gt;
In this example although the player is given two pies no &amp;quot;s&amp;quot; is added to the line. This is important, especially because most writers tend to add a plural automatically to plural items. Remember the engine does not. An item is designated in the singular, the engine always interprets it in the singular regardless of the number included. The numbers are again not spelt out and Arabic numerals used. Remember that each &amp;quot;Player gives&amp;quot;-command must have menu option in the next line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Step 2&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this bottle of milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Thanks, please give it to me. Now deliver two pies and a receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Completing a step&lt;br /&gt;
 &lt;br /&gt;
 At the end of a step remember to insert the line:&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;Complete Delivery for Aono Rikas Step 2.&amp;quot;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Note the use of Capitals, the use of the quest name, the use of the appropriate numeral and the period at the end of the sentence. The line marks the step as complete and allows the player and the quest to move forward.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Last step ===&lt;br /&gt;
To make sure the player has completed the previous step we start with &amp;quot;Require completion of delivery for Aono step 2.&amp;quot;. Then we move on to the trigger which is the player giving 2 pies and the receipt to Aono. Aono answers &amp;quot;Ah, pie. Thank you. Please accept this for your time.&amp;quot;, gives the player a pie and 100Tria. The step is closed and so is the quest with &amp;quot;Complete Delivery for Aono Rikas.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last Step&#039;&#039;&#039;&lt;br /&gt;
 ...NoRepeat.&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of delivery for Aono step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here are your pies and your receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you use multiple options in the last step of a quest you have to explicitly complete the quest with a command for the first option.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example: Last step with multiple options&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest doesn&#039;t complete automatically so make sure you have added a complete line for this response.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2. Complete Harnquist Needs Gold.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest completes automatically because it is the last line in quest so no complete line is required.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2.&lt;br /&gt;
&lt;br /&gt;
If you omit the Complete Step and Complete Quest line, the quest will not end properly when choosing &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Branches of a quest (Non exclusive) ===&lt;br /&gt;
Some times you want to have several different outcomes for a quest. Let us use the Delivery quest once again. If the first NPC says that you must NOT give the milk to some one else... specially NPC3. Then you should also add the option for the player to actually give the milk to NPC3 . This will complicate your script a bit, but is not as hard as it might seem. Most of the job is done by placing the right &amp;quot;Require completion of&amp;quot; and &amp;quot;Require no completion of&amp;quot; commands.&lt;br /&gt;
&lt;br /&gt;
Let us take a look at that Delivery Quest again. Now we want to add an option for the player to give the milk to Reffitia instead. Reffitia will shake the milk until it becomes butter and this will make Orchibaly angry and demand a new bottle of milk. To do that we will have to add a few more steps and we will start from step 2 as step 1 will be the same as above.&lt;br /&gt;
&lt;br /&gt;
The Third step will be our previous Step 2. And the last step will be the same. Though Aono should mention something like: &amp;quot;Make sure you don&#039;t give that milk toReffitia.&amp;quot; in Step 1.&amp;lt;blockquote&amp;gt;&lt;br /&gt;
IMPORTANT NOTE: This is a non exclusive branching, meaning that the first branch is available also when executing the second one.&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: We will not add an additional step for the player to get milk again from Aono, but the player have to figure out another way to get hold of it (Buy from an NPC).&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Branching&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Alternative is to give the milk to refittia&lt;br /&gt;
 &lt;br /&gt;
 Player gives 1 Milk Bottle to Reffitia&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here Reffitia, take this milk.&lt;br /&gt;
 &lt;br /&gt;
 Reffitia Thamal: Ah! Orchibaly&#039;s milk. Here, now you can give the bottle to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy.&lt;br /&gt;
 # The player then have to find another way of getting a bottle of milk (buy from NPC?)&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 5 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
=== Alternative outcome ===&lt;br /&gt;
If we wanted the quest to have a different outcome if the player gives the milk to Reffitia than to Orchibaly we would need to get creative with the require commands. Let us say that if the player gives butter to Orchibaly he will give &amp;quot;bad pies&amp;quot; so when Aono receives them and takes a taste he will be very angry and no reward is given. To do this we will have to add just one more step. Let us start with step 3. Here we will have to change only the NPC response a bit to something like &amp;quot;Milk? This is butter. Have you been shaking the bottle all the way over here? This is completely useless to me, butter I have more than enough of. Any way someMenki came with another bottle just before you. Here takes these pies to Aono . Oh, and don&#039;t forget this receipt.&amp;quot;. Step 4 will be the step where the player gives the bad pies to Aono, this step will complete the quest. Step 5 and 6 are the outcome if the player gives the milk directly toOrchibaly. Notice that Step 5 require a NO completion of Step 4. This is actually not necessary for this script, because the previous the other branch of the quest, ending in step 4 closes the quest it self.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Alternative Outcome&#039;&#039;&#039;&lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy. And receives 2 pies and a receipt&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the &amp;quot;bad&amp;quot; pies and the receipt to Aono. Receives gunk as reward and Quest is completed.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 3&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 2 Pie, 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. [Aono takes a bite at the pie] You have tricked me!&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Gunk.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 # Step 5 - Player gives the milk directly to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Require no completion of Delivery for Aono Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 5.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 6 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
=== Quest Timeout (Passing of time) ===&lt;br /&gt;
&lt;br /&gt;
If you want to allow a certain part of the quest to wait a certain amount of time before it can be a executed, you can use this script:&lt;br /&gt;
 Run script give_quest_timeout &amp;lt;&amp;lt;&#039;Time until Harnquist is ready&#039;,6&amp;gt;&amp;gt;&lt;br /&gt;
this will create a temporary active magic with name &#039;Time until Harnquist is ready&#039; which will last for 6 minutes. &lt;br /&gt;
&lt;br /&gt;
Then in the prerequisite of the step have this:&lt;br /&gt;
 # Step 12.&lt;br /&gt;
 Require active magic Time until Harnquist is ready.&lt;br /&gt;
 P: swordnotready.&lt;br /&gt;
 Menu: Is Vresa&#039;s sword ready yet?&lt;br /&gt;
 Harnquist: No, not yet.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 # Step 13.&lt;br /&gt;
 Require no active magic Time until Harnquist is ready.&lt;br /&gt;
 P: about Vresa sword.&lt;br /&gt;
 Menu: Is Vresa&#039;s sword ready?&lt;br /&gt;
 Harnquist: Yes, Vresa&#039;s sword is done.&lt;br /&gt;
&lt;br /&gt;
=== Important commands and expressions used ===&lt;br /&gt;
&lt;br /&gt;
=== Assign Quest. ===&lt;br /&gt;
This line tells the engine to assign the quest to the player and generally results in the &amp;quot;YOU GOT A QUEST&amp;quot;. and placing the quest in the player&#039;s quest log, under &amp;quot;uncompleted&amp;quot;. Again remember to be exact here, Capitalize the two words and put a &amp;quot;.&amp;quot; at the end. It cannot be emphasized enough that the engine only interprets what it sees and the way it sees it. If you are not precise the quest will NOT happen or in the cases of the next steps move forward.&lt;br /&gt;
&lt;br /&gt;
=== ... ===&lt;br /&gt;
The three dots mark the beginning of a new step. Better, the three dots create a new step. So you need a &amp;quot;three dots&amp;quot; line before every &amp;quot;Complete Quest Name Step #&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== NoRepeat. ===&lt;br /&gt;
This line means that the quest step cannot be done over and over. Note that there are three periods &amp;quot;...&amp;quot; a space and &#039;NoRepeat.&#039; is one word not two. Each part of this sentence is required in exactly this form.&lt;br /&gt;
&lt;br /&gt;
Basically &amp;quot;...&amp;quot; tells the engine that some time can pass before the next lines are used.&lt;br /&gt;
&lt;br /&gt;
NoRepeat allows this quest step to be only done one time. This also applies to actions as seen in later steps. (in reality NoRepeat is a synonym for Require no completion of &amp;quot;this step&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Require completion of Quest Name Step #. ===&lt;br /&gt;
This command is like a closed door. To open it and enter in the current step the player needs to complete the step number #. You can also refer to a future step (for example, you&#039;re on step 4 and add &amp;quot;Require completion of Quest Name Step 8.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== Require no completion of Quest Name Step #. ===&lt;br /&gt;
This command is like an open door. The player is free to continue the quest and entering the current step, UNLESS he completed the step number #. Completing the step number # will close the door. Forever! You can also refer to a future step.&lt;br /&gt;
&lt;br /&gt;
=== Complete Quest A Step. ===&lt;br /&gt;
You can complete one step in another one. But remember to insert one &amp;quot;...&amp;quot; line for every &amp;quot;Complete Quest Name Step #.&amp;quot; line.&lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
&lt;br /&gt;
=== Complete Quest Name. ===&lt;br /&gt;
This command will end the quest. After this the quest will be deleted from the uncompleted quest list and appear in the Completed quest list.&lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
=== P: ===&lt;br /&gt;
The trigger is actually a ghost from the previous scripting system, but it is still needed (for now). Before the player had to type the exact trigger stated after the &amp;quot;P:&amp;quot;. Now they click the option from &amp;quot;Menu:&amp;quot;. Triggers must be four words or less. Triggers must end with a period, no other punctuation is allowed (question marks especially are known to break aquest on the server).&lt;br /&gt;
&lt;br /&gt;
If you want multiple phrases to activate the same trigger, you can just separate the phrases by a period; for example: &amp;quot;P: about guards. about hydlaa guards. about hydlaa militia.&amp;quot; In this case the NPC&#039;s response will be fired on any of the three options. This technique can be used also when you have multiple choices: &amp;quot;P: one. two. P: more.&amp;quot;. Both &#039;one&#039; and &#039;two&#039; will trigger the first response, while &#039;more&#039; will trigger the second.&lt;br /&gt;
&lt;br /&gt;
WARNING: Triggers cannot contain any of the following words: a, am, an, and, any, anything, are, do, I, is, isnâ€™t, please, that, the, this, to, too.&lt;br /&gt;
&lt;br /&gt;
They also may not contain the name of the NPC you&#039;re talking to as that&#039;ll be stripped.&lt;br /&gt;
&lt;br /&gt;
These words just take up space in a trigger as they are dropped by the engine when evaluating player response. To make the best use of your word counts ignore them when writing your triggers.Example: If you wanted the player to say &#039;please help Levrus&#039; the trigger would become &#039;help&#039; as please would be an ignored word and Levrus would confuse the server.&lt;br /&gt;
&lt;br /&gt;
WARNING: If a player needs to write &amp;quot;NPC needs this&amp;quot; syntax it as &amp;quot;NPC wants this&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Menu: ===&lt;br /&gt;
After this command you can add the sentence said by the player in game. This sentence will appear on the screen and could be selected when one talks to the NPC.&lt;br /&gt;
&lt;br /&gt;
Remember that for every menu line you need to create a response from the NPC.&lt;br /&gt;
&lt;br /&gt;
=== Give ===&lt;br /&gt;
Give is a very useful command. It tells the engine to give the player items. Be it rewards or special items needed for the quest. When you reward a player, you can basically give items and/or experience. The syntax to award 1500 experience points would be: &amp;quot;Give 1500 Exp.&amp;quot; Note that &amp;quot;Exp&amp;quot; is case-sensitive. You can also reward items AND experience, using this syntax: &amp;quot;Give Leather Gloves. Give 1500 Exp.&amp;quot; Remember that you can only have two give commands on the same line, but you can have multiple lines, Remember to keep a clean style, it is prefered to only have one item per line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give more than two items&#039;&#039;&#039;&lt;br /&gt;
 Give 1 Leather Gloves.&lt;br /&gt;
 Give 1500 Exp.&lt;br /&gt;
 Give 1 Apple.&lt;br /&gt;
&lt;br /&gt;
You can also add a number if you need to give more than one item (like you do for experience) example: &amp;quot;Give 5 Iron Ingot.&amp;quot; It is not necessary in the case of one item to include the numeral, however it is good practice to do so as numerals tell the engine how many and should be written as a numeral, a word will NOT work as the engine cannot interpret it as such. Remember that all special items must be declared in the script header.&lt;br /&gt;
&lt;br /&gt;
Another option you have is to give one item OR another. The following will pop up a window in which the player has to choose just one item:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give the player a choice between items&#039;&#039;&#039;&lt;br /&gt;
 Give Cold or Arrow or Energy.&lt;br /&gt;
You can also specify the quality of the item to give. Example to give 1 Hammer of 150 quality&lt;br /&gt;
&lt;br /&gt;
 Give 1 150 Hammer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; At this time, don&#039;t use the following in an OR option: Tria, hexa, octa, circles, or items without a graphic. Also, for now, do NOT put quantities in front of items that are given using the &amp;quot;OR&amp;quot; parameter. An example of what NOT to do: &amp;quot;Give 1 Cold or 1 Arrow or 1 Energy.&amp;quot; This will lock the server right up. An example of what SHOULD be done: &amp;quot;Give Cold or Arrow or Energy.&amp;quot; (Check this statement if it is correct. --Katu)&lt;br /&gt;
&lt;br /&gt;
=== Player gives NPC Name 1 Item ===&lt;br /&gt;
This can be used as a trigger (instead of the &amp;quot;P:&amp;quot;). It tells the engine to trigger the NPC dialogue when one or any fixed amount of a special item.&lt;br /&gt;
&lt;br /&gt;
When a player have to give multiple items just add them to the original line using a comma:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Player gives item&#039;&#039;&#039;&lt;br /&gt;
 Player gives Harnquist Water Pouch, 1 Pie.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Item name rules must be followed at all times.&lt;br /&gt;
&lt;br /&gt;
=== Item Name Rules ===&lt;br /&gt;
&lt;br /&gt;
* Notice that the item name is &amp;quot;Iron Ingot&amp;quot;, so &amp;quot;Iron Ingots&amp;quot; will not work, even if itâ€™s the correct plural form. Keep all names singular.&lt;br /&gt;
* Also, do not use a number (3, 14, etc) in the name of an item. An item called 3 Circles Receipt will probably generate problems when we script &amp;quot;Give 3 Circles Receipt.&amp;quot; It is better named &amp;quot;Three Circles Receipt.&amp;quot;&lt;br /&gt;
* Numbers should be spelled out everywhere unless you are referring to the quantity given or dealing with a trigger (give me 5 apples. give me five apples.) as both would be correct in a trigger.&lt;br /&gt;
* Character limit for an item name is 60 characters.&lt;br /&gt;
* Do not use an s&#039; in an item name, like &amp;quot;Levrus&#039; Left Shoe,&amp;quot; use &amp;quot;Left Shoe of Levrus&amp;quot; or a similar substitute instead.&lt;br /&gt;
&lt;br /&gt;
=== Set and unset a variable and Require a variable ===&lt;br /&gt;
You can set a variable to be later used by the quest or other quests. Variables are set on the character and visible from all quests.&lt;br /&gt;
Variables here are only boolean, so the only valid value is 1. The requirements only checks if the variable is set or not.&lt;br /&gt;
&lt;br /&gt;
Use a prefix for all variables, so they don&#039;t get confused with other variables: &amp;quot;Quest_questname_variablename&amp;quot;.&lt;br /&gt;
 Smith: Here is your winch access&lt;br /&gt;
 Setvariable Quest_Winch_Access 1&lt;br /&gt;
&lt;br /&gt;
You can then require a variable to be set as prerequisite of a quest step.&lt;br /&gt;
 Require variable Quest_Winch_Access.&lt;br /&gt;
 P: access.&lt;br /&gt;
 Menu: I have access&lt;br /&gt;
 Bobaus: Ok, good.&lt;br /&gt;
&lt;br /&gt;
If you want to unset a variable use the &amp;quot;Unsetvariable&amp;quot; command:&lt;br /&gt;
 Unsetvariable Quest_Alchemy_Winch_Access.&lt;br /&gt;
&lt;br /&gt;
=== Rewards at the end of the quest ===&lt;br /&gt;
When completing a quest, the player usually gets experience and money, or some items. In particular for experience and money you should use the following scripts. This allows us to split the rewards on a scale from 1 to 10 and then to tweak the actual values in the engine. The values in brackets indicate the complexity of the quest. The more complex the more rewards the player will get.&lt;br /&gt;
&lt;br /&gt;
 Run script give_quest_money &amp;lt;&amp;lt;3&amp;gt;&amp;gt;.&lt;br /&gt;
 Run script give_quest_exp &amp;lt;&amp;lt;2&amp;gt;&amp;gt;.&lt;br /&gt;
You can also award faction points by using &amp;quot;give_quest_faction&amp;quot; , the number given is multiplied by 5 so if you want +5 point, you need 1 on the second parameter:&lt;br /&gt;
 Run script give_quest_faction &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 1&amp;gt;&amp;gt;. &lt;br /&gt;
We have script also to push the faction point up to a given value, if you are already higher, this script will do nothing.&lt;br /&gt;
 Run script give_quest_faction_level &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
* value = 1-&amp;gt; max faction points = 10;&lt;br /&gt;
* value = 2-&amp;gt; max faction points = 20;&lt;br /&gt;
* value = 3-&amp;gt; max faction points = 35;&lt;br /&gt;
* value = 4-&amp;gt; max faction points = 55;&lt;br /&gt;
* value = 5-&amp;gt; max faction points = 75;&lt;br /&gt;
* value = 6-&amp;gt; max faction points = 100;&lt;br /&gt;
* value = 7-&amp;gt; max faction points = 125;&lt;br /&gt;
* value = 8-&amp;gt; max faction points = 150;&lt;br /&gt;
* value = 9-&amp;gt; max faction points = 200;&lt;br /&gt;
&lt;br /&gt;
If you want to assign a faction title you can use this script. In the example it will assign the second title.&lt;br /&gt;
 Run script give_quest_faction_title &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
== The Quest Header ==&lt;br /&gt;
The header should contain a lot of information. All the information is commented out by a &amp;quot;#&amp;quot;. The example below is from one of the mount quests.&lt;br /&gt;
First section is information about the quest itself. Name of the quest, a short description and category. Categories will be discussed in detail later on.&lt;br /&gt;
&lt;br /&gt;
The next sections are for unique items used in the quest, name of the item followed by the description.&lt;br /&gt;
&lt;br /&gt;
The third section is for recording versions of the script and all naming authors. Also who last edited the quest should be noted.&lt;br /&gt;
&lt;br /&gt;
The last section is for additional metadata which will be added to the quest in the database (not part of the db) and will be used by the engine to determine lockouts and prerequisites. Here it locks all players from doing the quest again and locks all other players to take the quest with 60 seconds.&lt;br /&gt;
&lt;br /&gt;
Lastly we tell the engine that the player have to complete the Ring of Familiar quest before this one. Note that these comments aren&#039;t taken by the engine; it&#039;s the duty of who loads the quest to fill the correct entries with the data found in the header: so it&#039;s just a way to keep all data together on the script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Header&#039;&#039;&#039;&lt;br /&gt;
 # Quest name: Drifting for a Drifter&lt;br /&gt;
 # Quest Description: Taemian wants to sell you a mount&lt;br /&gt;
 # Quest Category: General&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest Items: Item name/Item description&lt;br /&gt;
 # Taemian&#039;s Pouch: - Pouch with all sorts of coins&lt;br /&gt;
 # Green Gem of the Drifter - A magical gem with a green glow&lt;br /&gt;
 # Unsigned Drifter Permit - A permit that still needs to be signed by Datal&lt;br /&gt;
 # Signed Drifter Permit - A permit that has been signed by Datal&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest specific variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Author(s): Ravna, Katu, weltall&lt;br /&gt;
 # Current Version: 1.01&lt;br /&gt;
 # Player lockout: -1&lt;br /&gt;
 # Quest lockout: 60&lt;br /&gt;
 # Prerequisites: &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;completed quest=&amp;quot;Ring of Familiar&amp;quot;/&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 # Variables used: Quest_Variable_Name used to do.....&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Version history and change log&lt;br /&gt;
 # Last edited by: weltall&lt;br /&gt;
 # Version 1.00: Initial draft - 05/01/2010 - Katu.&lt;br /&gt;
 # Version 1.01: Added extra steps - 1/22/2011 - Venalan.&lt;br /&gt;
 # ----------------------&lt;br /&gt;
&lt;br /&gt;
==== Quest Lockouts ====&lt;br /&gt;
Each quest has two different lockout types:&lt;br /&gt;
&lt;br /&gt;
* Player lockout: When this parameter is set, the engine will wait the specified amount of seconds before allowing the same player to redo the same quest. If you want a quest to be available to each player only one time, then set the lockout to -1. Setting it to 600 will have the engine wait 10 minutes before unlocking the quest again.&lt;br /&gt;
* Quest lockout: When this parameter is set, the engine will wait the specified amount of seconds before reactivating the quest for ALL players. This means no one can start the same quest during this period, but the ones that had it already active can complete it.&lt;br /&gt;
&lt;br /&gt;
Usually we want quests to be unique to players, so most have a player lockout -1, except the very simple ones. Try always to think if itâ€™s meaningful for that player to redo it. (For example, Harnquist can require iron ore more than once, but won&#039;t need to teach you how to make a sword more than once.)&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&#039;&#039;&#039;Example: Prerequisites&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A sample of the coding used to set prerequisites for a quest (All on one line):&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;and&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest One&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Two&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Three&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;assigned quest=&amp;quot;Test Quest Four&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Delivery for Aono Riskas&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Gorbiak Disease&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;/and&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sample requires that the player have completed Test Quests 1 through 3, have Test Quest 4 assigned (not completed) and have NOT completed Fancy Dancing and High-Class Aspirations. To get these arranged correctly can take some practice if one is not familiar with working with booleans, so it is best to include a plain-English comments of what you wish your pre-requisites to be in addition to the one with the &amp;quot;pre&amp;quot; coding statements.&lt;br /&gt;
&lt;br /&gt;
== Requirements and Prerequisites ==&lt;br /&gt;
You can have as many requirements as you wish for a step, but again we remind you to keep it as simple as possible, so thing thoroughly through your choices here.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Requirements with OR ===&lt;br /&gt;
You can have an &amp;quot;or&amp;quot; statement between requirements by using &amp;quot;|&amp;quot;:&lt;br /&gt;
 Require Completion of Quest Winch Access | Completion of Harnquist is Hungry.&lt;br /&gt;
This needs all to be on one line.&lt;br /&gt;
&lt;br /&gt;
=== Require Compendium ===&lt;br /&gt;
You can require the player to have a certain knowledge in the Compendium.&lt;br /&gt;
 Require compendium creature StoneHammer.&lt;br /&gt;
 P: comps&lt;br /&gt;
 Menu: I know everything about the StoneHammers!&lt;br /&gt;
 Fighter3: WOW&lt;br /&gt;
 ...&lt;br /&gt;
 Require no compendium creature StoneHammer.&lt;br /&gt;
 P: nocomps&lt;br /&gt;
 Menu: Sorry I dont know anything about StoneHammers!&lt;br /&gt;
 Fighter3: Ah, study more!&lt;br /&gt;
The syntax is: compendium &amp;lt;creature/plant/mineral&amp;gt; &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another more complex version of the prerequisites is the: REQUIRE MIN &amp;lt;number&amp;gt;: this tells the engine that there are specific requirements to be fulfilled before the player is able to get the quest. This script indicated it requires a minimum number of quests to be completed in a given list.&lt;br /&gt;
&lt;br /&gt;
=== Require min and Require Category Min ===&lt;br /&gt;
Example: &lt;br /&gt;
 require min 2 of Quest1, Quest2, Quest3.&lt;br /&gt;
To match this prerequisite the player can complete Quest1 and Quest3 or 2 and 3, or all 3. The request is minimum 2 in the given list.&lt;br /&gt;
&lt;br /&gt;
CATEGORY MIN &amp;lt;number&amp;gt;: quests have an attribute called &amp;quot;category&amp;quot;, we use it to identify the difficulty of quests, but can be used of any other purpose, for example one can say that a group of quests is &amp;quot;Evil&amp;quot; or &amp;quot;Laanx related&amp;quot; or &amp;quot; Newbie&amp;quot;. Just one category is allowed per quest. This prerequisite allows you to specify the category and the minimum number of quests completed in that category.&lt;br /&gt;
&lt;br /&gt;
=== Require Time of Day ===&lt;br /&gt;
Requires the time of day to be at a specific point. The in game time has 24 hours.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 Require time of day 1-2.&lt;br /&gt;
This example will trigger when the game time is between 1 and 2.&lt;br /&gt;
&lt;br /&gt;
=== Require Active Magic ===&lt;br /&gt;
Checks if the player character has active magic.&lt;br /&gt;
 Require active magic Weakness.&lt;br /&gt;
&lt;br /&gt;
=== Require Race ===&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
 Require not race Klyros. Require race Kran.&lt;br /&gt;
&lt;br /&gt;
=== Require Gender ===&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
 Require gender female.&lt;br /&gt;
&lt;br /&gt;
=== Require Possessed ===&lt;br /&gt;
Checking if the player character possesses an item/ has it in their inventory:&lt;br /&gt;
 Require possessed item Ruby Crystal.&lt;br /&gt;
You can also check the amount of items as well as the quality of the items:&lt;br /&gt;
 Require Possessed amount 3 200-300 item Steel Falchion.&lt;br /&gt;
it works also with money, as we handle this specifically. It will convert any currency, and check player total money for it.&lt;br /&gt;
 Require no possessed amount 500 item Tria.&lt;br /&gt;
&lt;br /&gt;
=== Require Skill ===&lt;br /&gt;
 Require skill &amp;lt;buffed&amp;gt; name &amp;lt;skillmin&amp;gt;-&amp;lt;skillmax&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Require Variable ===&lt;br /&gt;
 Require variable Quest_Winch_Access.&lt;br /&gt;
&lt;br /&gt;
=== Require Trait ===&lt;br /&gt;
Check if the player character has certain traits.&lt;br /&gt;
 Require trait Black in HAIR_COLOR.&lt;br /&gt;
The different traits are: &amp;quot;NONE&amp;quot;,&amp;quot;FACE&amp;quot;,&amp;quot;HAIR_STYLE&amp;quot;,&amp;quot;BEARD_STYLE&amp;quot;,&amp;quot;HAIR_COLOR&amp;quot;,&amp;quot;SKIN_TONE&amp;quot;,&amp;quot;ITEM&amp;quot;, &amp;quot;EYE_COLOR&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Require Guild ===&lt;br /&gt;
Unknown if this works.&lt;br /&gt;
&lt;br /&gt;
=== Require Known Spell ===&lt;br /&gt;
Check if the character knows a spell.&lt;br /&gt;
 Require known spell Nature Intuition.&lt;br /&gt;
&lt;br /&gt;
=== Require Equipped ===&lt;br /&gt;
Checks if the player has a certain item equipped.&lt;br /&gt;
 Require equipped category Armor - Helms.&lt;br /&gt;
&lt;br /&gt;
 Require no equipped category Armor - Helms.&lt;br /&gt;
&lt;br /&gt;
 Require equipped item Sword Handle.&lt;br /&gt;
&lt;br /&gt;
 Require not equipped item Sword Handle.&lt;br /&gt;
&lt;br /&gt;
=== Require Married ===&lt;br /&gt;
This is untested and unknown if it works.&lt;br /&gt;
&lt;br /&gt;
= Notes on Creating Quest Files (Rules and Header Information) =&lt;br /&gt;
&lt;br /&gt;
* The quest documents you submit should always be in notepad format: this is to avoid special characters added by Word or other text editors, most notably &amp;quot;smart quotes&amp;quot; which will appear as squares in game. Notepad++ is recommended, HIGHLY recommended.&lt;br /&gt;
* Use only ANSI encoding.&lt;br /&gt;
* The file name when saving the quest should begin with &#039;Quest&#039; , then have the name of the quest. For example: Quest Hinoserri Cannot See.txt&lt;br /&gt;
* Titles of quests should follow some scheme of capitalization. There are many sets of rules, but a quick and easy format is to capitalize the first word and then all other words, except a, an, the, at, by, for, in, of, on, to, up, and, as, but, it, or, and nor.&lt;br /&gt;
* Each quest script begins with the title and a one or two sentence description; this is what the player reads so keep that in mind. The proper way to do this is to &amp;quot;comment out&amp;quot; your description and quest title, this is done by beginning a line with the number sign or pound symbol (#). Also, any quest item created for your quest should have a description written into the quest. Notes on quest items should also be commented out. Lastly, there should also be a &amp;quot;Quest Category&amp;quot; line that must be commented out as well. Approved quest categories are: Alchemy, Black Flame, Chain (don&#039;t use this one unless told), Cooking, Death Realm, Easy, Gugrontid, Magic Ways, Medium, Metal Working, Newbie, Repeatable. This is a work in progress, so if you have any questions ask an associate dev or developer. No quest can have more than one category - pick one and ONLY one. New quest categories must be approved by the associate devs/devs before use.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Damage_Types_and_Resistance&amp;diff=25758</id>
		<title>Damage Types and Resistance</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Damage_Types_and_Resistance&amp;diff=25758"/>
		<updated>2026-05-21T22:42:29Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Through various means you can get resistance to certain types of damage. For example in character creation your choices will determine some of those resistances. Also when equipping an item or casting a spell you may get resistance to certain elements.&lt;br /&gt;
&lt;br /&gt;
For Magic, there are 6 types of resistance, one for each way:&lt;br /&gt;
* Crystal Way Resistance (generally energy/blind/light damage)&lt;br /&gt;
* Blue Way Resistance (generally freeze/ice damage)&lt;br /&gt;
* Red Way Resistance (generally fire/lava/lightning damage)&lt;br /&gt;
* Azure Way Resistance (generally psychic damage)&lt;br /&gt;
* Dark Way Resistance (generally drain/weakness damage)&lt;br /&gt;
* Brown Way Resistance (generally impact damage, like rocks, sand wind, thorns, ...)&lt;br /&gt;
&lt;br /&gt;
There are also other damage types, and specific resistances:&lt;br /&gt;
* Poison Resistance&lt;br /&gt;
* Disease Resistance&lt;br /&gt;
Resistances may come from different sources:&lt;br /&gt;
&lt;br /&gt;
- through character creation: are stored in the database in the form of [[Character variablesTable|character variables]]. A progression script runs at char creation and sets &amp;lt;variableset aim=&amp;quot;Actor&amp;quot; name=&amp;quot;Crystal Way Resistance&amp;quot; value=&amp;quot;4&amp;quot;/&amp;gt;. The variables are loaded when the char is loaded.&lt;br /&gt;
&lt;br /&gt;
- Through loot modifiers in player crafted armor. Example suffix &amp;quot;of Confusion&amp;quot; as armor increases Brown, Dark, Blue resistance by 6.&lt;br /&gt;
&lt;br /&gt;
- through spells. Most spells have a Saving Throw, which is calculated by the Caster Way skill vs defender Way Skill. Plus there is reduction of damage based on the Way resistance. Both are directly in the spell cast script.&lt;br /&gt;
&lt;br /&gt;
There are also damage types by type of weapon:&lt;br /&gt;
&lt;br /&gt;
* Slashing (reference weapon Long Sword)&lt;br /&gt;
* Bludgeoning (reference weapon Mace)&lt;br /&gt;
* Piercing (reference weapon Long Bow)&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Maps_editing_workflow&amp;diff=25757</id>
		<title>Maps editing workflow</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Maps_editing_workflow&amp;diff=25757"/>
		<updated>2026-05-16T13:41:51Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How Landscape is setup ==&lt;br /&gt;
In the outliner we have a Landscape Object. If you click on it, you see the details it&#039;s linked to a MI_Landscape.&lt;br /&gt;
&lt;br /&gt;
MI_Landscape contains all the parameters including the visibility of rocks , grass, etc...&lt;br /&gt;
&lt;br /&gt;
The actual meshes are part of &amp;quot;Landscape Grass Type&amp;quot; a special object that can contain a mesh, its density, culling distance, etc...&lt;br /&gt;
&lt;br /&gt;
M_Landscape has a special node called : &amp;quot;Landscape Grass&amp;quot; of type &amp;quot;Landscape Grass Output&amp;quot;. It the detail panel of this node, there are all the &amp;quot;Landscape Grass Type&amp;quot; linked with a name (which is the name of the layer).&lt;br /&gt;
&lt;br /&gt;
You HAVE to use grass.FlushCache in console after you do changes to this node or you will NOT see the changes!&lt;br /&gt;
&lt;br /&gt;
M_Landscape has a special node called : &amp;quot;MF_LandscapeLayers&amp;quot; it determines how the landscape looks (color, roughness, normal), defines the textures.&lt;br /&gt;
&lt;br /&gt;
=== Landscape limits ===&lt;br /&gt;
Vertically our landscape can go from -250 meters up to +250 meters, if you try to go beyond these values you just get flat terrain at the max height and you cant go beyond.&lt;br /&gt;
&lt;br /&gt;
Our maps at the moment have the lowest point to the south of Homestead where it reach -177 meters. Plus we need to consider the Death Ream boundaries, that reach at the moment -199 meters.&lt;br /&gt;
&lt;br /&gt;
We have set the Kill Z value to -185 meters.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
* BuiltData files are storing:&lt;br /&gt;
** lightmap textures (created by Build Lighting only)&lt;br /&gt;
** volumetric light probes / samples (created by Build Lighting only)&lt;br /&gt;
* umap files are storing:&lt;br /&gt;
** navigation paths (created by Build Paths)&lt;br /&gt;
&lt;br /&gt;
=== Map creation flow ===&lt;br /&gt;
You should never upload BuiltData file in SVN. Those will be regenerated when we create the shipping release.&lt;br /&gt;
&lt;br /&gt;
If you want to test locally the full game including lights then you need to:&lt;br /&gt;
&lt;br /&gt;
* Load all the levels and Build Lighting only, this gives the best result on map borders, but I think you can avoid it&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
* Load Persistent Level + one or more maps you want relit, and Build Lighting only. In this case the single maps will be ok, but the borders between maps will not &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to test locally the full game including NPC movement then you need to:&lt;br /&gt;
&lt;br /&gt;
* Follow Option 1 in [[PSUnreal Navigation Meshes|this page]].&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25756</id>
		<title>Quest scripts syntax for AI</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25756"/>
		<updated>2026-04-25T18:07:18Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In our game PlaneShift MMO, we have a script syntax to create new quests. I want to create quest script for the following quest. I&#039;m giving you only the Player and NPC answers, you have to transform it in the syntax below.&lt;br /&gt;
&lt;br /&gt;
This quest is named: &amp;quot;The ink of the desert&amp;quot;, and has ID: 1510&lt;br /&gt;
&lt;br /&gt;
This is the syntax to create a quest script.&lt;br /&gt;
&lt;br /&gt;
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
The quest script is divided in steps. Each one being separated with this line:&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
&lt;br /&gt;
This line tells the engine to create a new step. Only the first step does not have the ... line&lt;br /&gt;
&lt;br /&gt;
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:&lt;br /&gt;
&lt;br /&gt;
  # Step 2&lt;br /&gt;
&lt;br /&gt;
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.&lt;br /&gt;
&lt;br /&gt;
Requiments are expressed like this, where we substitute &amp;lt;quest name&amp;gt; with the name of the quest:&lt;br /&gt;
&lt;br /&gt;
  Require completion of &amp;lt;quest name&amp;gt; step 2.&lt;br /&gt;
&lt;br /&gt;
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:&lt;br /&gt;
&lt;br /&gt;
  P: 15002.&lt;br /&gt;
&lt;br /&gt;
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:&lt;br /&gt;
&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
&lt;br /&gt;
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:&lt;br /&gt;
&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
Every step must finish with a line that completes the step, example:&lt;br /&gt;
&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
The first step is a different than the others in this way:&lt;br /&gt;
1) it doesn&#039;t have a Require completion of&lt;br /&gt;
2) instead of the &amp;quot;Complete&amp;quot; step line, it has &amp;quot;Assign Quest.&amp;quot; line, which basically stores the quest in the player log as started.&lt;br /&gt;
&lt;br /&gt;
The second step differs just for the fact it doesn&#039;t have a &amp;quot;Require completion of&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
We also use brackets [] to indicate some visual action from the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword.&lt;br /&gt;
&lt;br /&gt;
All lines except comments should always end with a period or a question/exclamation mark. This is how the engine knows that directive is completed.&lt;br /&gt;
&lt;br /&gt;
We also have the possibility to have multiple questions and answers in the same step, this is done usually when the discussion is about the same topic and doesn&#039;t require a separate QuestNote. In this case the structure is P: , then Menu: , then the npc line. The P must be unique so here we append a letter to the end, example 15005a, 15005b, ... But please note the step number will still be 5. So all Require and Complete will refer to 5, not to 5a or 5b.&lt;br /&gt;
&lt;br /&gt;
When we move to another NPC it&#039;s required to have a separate step.&lt;br /&gt;
&lt;br /&gt;
If the dialogue branches and then we need to merge it again in one step later on, we can use the OR operator that&#039;s a pipe |. This example requires step 3 or step 4 to be completed:&lt;br /&gt;
&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
&lt;br /&gt;
A full example follows. In this example there are two parallel possible answers to the NPC question, and also a longer discussion in one last step:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
  P: 15001.&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
  Assign Quest.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 2&lt;br /&gt;
  P: 15002.&lt;br /&gt;
  Menu: Do you need any help?&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword. Are you interested in it?&lt;br /&gt;
  QuestNote Harnquist asked if we want to help forging a new longsword.&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 3&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15003.&lt;br /&gt;
  Menu: Yes, sure I would like help.&lt;br /&gt;
  Harnquist: Great, then please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I agreed to help, and Harnquist asked for 10 iron ore.&lt;br /&gt;
  Complete Searching the blacksmith Step 3.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 4&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15004.&lt;br /&gt;
  Menu: Yes I want to help, but I can do it tomorrow.&lt;br /&gt;
  Harnquist: Ok, come back tomorrow then and please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I had to ask one more day, and Harnquist asked for 10 iron ore to be delivered tomorrow.&lt;br /&gt;
  Complete Searching the blacksmith Step 4.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 5&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
  P: 15005.&lt;br /&gt;
  Menu: I have the ore you requested.&lt;br /&gt;
  Harnquist: Very good!&lt;br /&gt;
  P: 15005a.&lt;br /&gt;
  Menu: Can you evaluate its quality?&lt;br /&gt;
  Harnquist: Sure I can, let me look. [Harnquist puts on a set of glasses to inspect the ore]&lt;br /&gt;
  QuestNote I brought the ore to Harnquist.&lt;br /&gt;
  Complete Searching the blacksmith Step 5.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Hunt_Locations_and_Natural_Resources&amp;diff=25755</id>
		<title>Hunt Locations and Natural Resources</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Hunt_Locations_and_Natural_Resources&amp;diff=25755"/>
		<updated>2026-04-24T22:26:26Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Natural Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We have two different ways to configure locations where players can gather materials.&lt;br /&gt;
&lt;br /&gt;
== Natural Resources ==&lt;br /&gt;
Used when we need invisible items to be harvested, example a mine will be modeled in 3d, but the individual ore are not 3d objects in the world.&lt;br /&gt;
&lt;br /&gt;
So we configure a location on the map, defined by a center (in x/y/z coordinates) and a radius, where the player will be able to harvest. We also define the tool to be used (example a rock pick), the difficulty, and the resulting item.&lt;br /&gt;
* The table [[natural_resourcesTable|natural_resources]] is holding this information&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;wood harvesting&#039;&#039;&#039;, we created a different system, based on the mesh name you right click on. To have one type of tree being recognized for harvesting you need to do the following:&lt;br /&gt;
&lt;br /&gt;
1) Set Collision = &amp;quot;Custom&amp;quot; and &amp;quot;Query Only&amp;quot;. Set all channels to &amp;quot;Ignore&amp;quot; except &amp;quot;InteractMouseTrace&amp;quot; to Block.&lt;br /&gt;
&lt;br /&gt;
2) In the mesh object (Example oak_03) set the &amp;quot;Collision Complexity&amp;quot; to &amp;quot;Use Simple as Complex&amp;quot;, this is because when we LineTrace we use Complex.&lt;br /&gt;
&lt;br /&gt;
3) Save the level again&lt;br /&gt;
&lt;br /&gt;
4) Set the mesh name in [[natural_resourcesTable|natural_resources]].trace_mesh. This name can be set just with the first part of the name, example &amp;quot;oak_&amp;quot;, so that all trees with name &amp;quot;oak_*&amp;quot; will be picked up, like oak_01, oak_02, .....&lt;br /&gt;
&lt;br /&gt;
5) In [[natural_resourcesTable|natural_resources]] set the location and sector to 0, as it will be ignored anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;flowers/plants&#039;&#039;&#039;, the engine is spawning a mesh on the location of the natural resources, line tracing down to the ground, remember to:&lt;br /&gt;
&lt;br /&gt;
1) Remove the collision from the mesh in Unreal&lt;br /&gt;
&lt;br /&gt;
2) set the mesh name in [[natural_resourcesTable|natural_resources]].spawn_mesh.&lt;br /&gt;
&lt;br /&gt;
3) If you want the plant to ALWAYS be available, then do not add any children to it&lt;br /&gt;
&lt;br /&gt;
4) If you want to use the new random spawn system, then add a new child resource in natural_resources_items . This will make the main resource just a container (nothing will spawn there) and the system will select at random X locations to spawn, where X is defined by  [[natural_resourcesTable|natural_resources]].active_locations. Then  [[natural_resourcesTable|natural_resources]].amount will define how many times you can harvest that resource before its depleted. When it&#039;s depleted it will disappear and the game will wait  [[natural_resourcesTable|natural_resources]].interval +  [[natural_resourcesTable|natural_resources]].max_random milliseconds before spawning a new one in a non active location.&lt;br /&gt;
&lt;br /&gt;
To spawn new natural resources in game do this:&lt;br /&gt;
&lt;br /&gt;
/resource display (shows all resources)&lt;br /&gt;
&lt;br /&gt;
/resource add &amp;lt;itemname&amp;gt; &amp;lt;active_locations&amp;gt; &amp;lt;amount&amp;gt; (creates the starting point for one plant area, but doesnt spawn anything)&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;active_locations&amp;gt; is how many locations are active at the same time, and &amp;lt;amount&amp;gt; is how many times you can harvest before the resource disappears&lt;br /&gt;
&lt;br /&gt;
/resource addsub &amp;lt;natural_resource_id&amp;gt; Create a location to SPAWN an item, it refers to the starting point&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;natural_resource_id&amp;gt; is the starting point you created with &amp;quot;/resource add&amp;quot; above.&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;fishing&#039;&#039;&#039; we created a linked table natural_resource_items and [[natural_resourcesTable|natural_resources]].item_group points to natural_resource_items.group_id . This table contains the characteristics of the group.&lt;br /&gt;
&lt;br /&gt;
== Hunt Locations ==&lt;br /&gt;
Used when we want a visual 3d object to be spawned as a pickupable item. When the player picks up the item, a new item is scheduled to be spawn later on based on configured interval.&lt;br /&gt;
&lt;br /&gt;
* The table [[hunt_locationsTable|hunt_locations]] is holding this information&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25754</id>
		<title>Quest scripts syntax</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25754"/>
		<updated>2026-04-21T21:46:40Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* More Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Structure of a quest script =&lt;br /&gt;
Quests are written out in chunks called steps. Each step covering the requirements of the previous one.&lt;br /&gt;
&lt;br /&gt;
= Things to know before you start =&lt;br /&gt;
Quest scripts should written ideally in a text editor and now in MS Word or similar so that no illegal characters make it into the quest dialog which would result in errors when viewed in game.&lt;br /&gt;
&lt;br /&gt;
Quotes are usually the ones which break the scripts and :&lt;br /&gt;
&lt;br /&gt;
• Only &#039; &amp;quot; should be used&lt;br /&gt;
&lt;br /&gt;
• ‘ ’ ” “ … These should not be present in the text at all.&lt;br /&gt;
&lt;br /&gt;
Any line of text in the script which begins with a ‘#’ character is ignored by the server and only acts as a comment by the author so that they can leave explanations as to what is happening, or, give information about the step number.&lt;br /&gt;
&lt;br /&gt;
The start of a ‘step’ is defined by a series of three dots ‘...’ Everything after this text up until the next ‘...’ is included in the step. The only unique case is the first step, this does not need ‘...’ and includes all the text before the first ‘...’&lt;br /&gt;
&lt;br /&gt;
== Important rules concerning steps ==&lt;br /&gt;
&lt;br /&gt;
* Every step in the quest should be explicitly completed or locked correctly. Example: &amp;quot;Complete Quest Name Step #&amp;quot; before the Quest is completed.&lt;br /&gt;
* A step can require the completion of another step by the command: &amp;quot;Requires completion of Quest Name Step #&amp;quot;&lt;br /&gt;
* Step 1 does not exist, step 1 is part of the start script (where you use the command &amp;quot;give me a quest&amp;quot;) and cannot be used as a require completion of step number.&lt;br /&gt;
* You may have multiple Require Completes at the beginning of a step.&lt;br /&gt;
* A step may also require another step NOT to have been completed with the command: &amp;quot;Require no completion of Quest Name Step #&amp;quot;.&lt;br /&gt;
* The Quest name must be exact! It is case sensitive. The same goes for NPC names.&lt;br /&gt;
* Each step should be commented like this: &amp;quot;# Step 2 - A description of actions of this step&amp;quot;. # Marks it as a comment not processed by the engine.&lt;br /&gt;
* You can also check for statements with this syntax: &amp;quot;Require &amp;lt;no/not&amp;gt; operator1 | &amp;lt;no/not&amp;gt; operator2 | ...| &amp;lt;no/not&amp;gt; operatorN.&amp;quot; Where operator is a prerequisite (see below the prerequisite chapter), from completion of to time of day etc. The | represents the OR. &#039;&#039;Example: &amp;quot;Require completion of Questname Step 3 | completion of Questname Step 7.&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s see an example before beginning the explanation. The following example is made of two steps. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 1&#039;&#039;&#039;&lt;br /&gt;
 P: Short Trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Do you have any work for me to do?&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes I do. Just breathe one time.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 P: Ok, I did it!&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Great, your quest is completed.&lt;br /&gt;
&lt;br /&gt;
== Syntax Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
To create a comment line you must start the line with a &amp;quot;#&amp;quot;. These lines are not evaluated by the engine as things that need to be done. These comment lines show what is going on and what are the intentions of the quest writer. This is important because more than one person are often working on a quest script, or eventually for laterbug fixing it will be easier to find the exact problem without reading the entire quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each step in a quest should be started by a comment like this &amp;quot;#Step 2 - Description of step.&amp;quot;. You can use comments to more that just noting the step number. Any where within the script you can add comments to help your fellow scripters understand the code. We will use comments to explain things within the scripts here.&lt;br /&gt;
&lt;br /&gt;
=== Trigger and Menu ===&lt;br /&gt;
The trigger is for the engine, while the menu is what shows up in the player quest menu. The trigger is defined by a &amp;quot;P:&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
P: use to be what the player typed to trigger the step, but with the menu system are now used as a description of what step the player is choosing, for example P:yeshelp. (slide 3). The only time you must use exact text is when a player types the answer to a question you pose them&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because you are talking to the engine it must be exact a colon after the &amp;quot;P:&amp;quot; and a period at the end of the sentence. This is also true of the Menu in every case in which the player (P) says something to the NPC in question &amp;quot;P: Short Trigger.&amp;quot; comes first, then below comes the &amp;quot;Menu:&amp;quot; line, with exactly the same requirements.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Menu&amp;quot;: Text is what the player sees when they look at the quest menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please remember that the engine does not think, it reacts to the written cues, so the syntax MUST be exact. The first player statement gives the engine the quest name. The Menu allows the player to ask for the quest from the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having the two &amp;quot;P:&amp;quot; and two &amp;quot;Menu:&amp;quot; on the same line informs the engine that the player has two different options. It is standard that the &amp;quot;P:&amp;quot; line is above the &amp;quot;Menu:&amp;quot; line and the &amp;quot;No.&amp;quot; answer comes first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These lines trigger the NPC response. In more elaborate quests the &amp;quot;Menu:&amp;quot; line may have variations on the No. or Yes. response. However remember KISS (Keep It Simple Stupid) is generally a good thing to keep in mind when you are beginning. You can have many options, but remember each &amp;quot;P:&amp;quot; must have a matching &amp;quot;Menu:&amp;quot; and they must be put in the same order&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to include a free textfield, you will have to include a quotation mark after the menu. The &amp;lt;?&amp;gt; has to be followed by &amp;lt;=&amp;gt; and a text. This will produce a printout of the text and the user will be able to enter a free text. E.g. &amp;quot;Menu: ?=What shall Jardet do?&amp;quot; This will result in the text &amp;quot;What shall Jardet do?&amp;quot; being printed, followed by free form input.&lt;br /&gt;
&lt;br /&gt;
 P: *. P: rock pick.&lt;br /&gt;
 Menu: ?=Please tell me your answer.&lt;br /&gt;
 Smith: No, you didn&#039;t get the right answer.&lt;br /&gt;
 Smith: Yes, it&#039;s a rock pick!.&lt;br /&gt;
&lt;br /&gt;
 P: Nothirstyinterst. P: Yesthirstyintrest.&lt;br /&gt;
 Menu: No, sounds like work. Menu: Sure, I can get it for you.&lt;br /&gt;
 Serana Tuvi: Alright. I will see you around then, stranger.&lt;br /&gt;
 Serana Tuvi: Ah, good good. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember the : after the P and Menu are important, as is the . at the end of the line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For triggers used to start quests, never use NPC names into it, because this will confuse the engine, and the trigger will not be recognized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every P: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every Menu: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every NPC: used in one step must be on different lines.&lt;br /&gt;
&lt;br /&gt;
=== NPC Response ===&lt;br /&gt;
Aono Rikas: here you can add a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The line above is interpreted as an answer from the NPC and the engine will extract the name before the colon (:) + space as the NPC involved in this step of the quest. From now on, we will call this a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full name of the NPC is required, just the first name will not work. If it is only one name e.g Harnquist use that, and if your NPC somehow ends up with three names use all of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first step of a quest the NPC statement will end in a question mark and is triggered by the first 2 lines. Responses are linked to each of the Triggers and Menus. So if you have two triggers you need two menu options and two NPC responses. All arranged in the same order.&lt;br /&gt;
&lt;br /&gt;
=== Dialogues ===&lt;br /&gt;
The dialogues are the most important part of the quest for a player to get immersed. So let us talk about how to make the dialogue.&lt;br /&gt;
&lt;br /&gt;
* Every punctuation, exclamation mark and question mark will create a short pause in the dialogue and create a new line.&lt;br /&gt;
* To create actions all you have to do is to use square brackets within the dialogue like this &amp;quot;Blablabla [NPC Name picks his nose] Bla bla blabla&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may use also these commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playerrace can be used in an impersonal and a personal manner in terms of context, consider its usage carefully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$sir which gives you &amp;quot;Sir&amp;quot; or &amp;quot;Madam&amp;quot; or &amp;quot;Gemma&amp;quot; depending on the gender of the player&#039;s character. Again, this can be used to positive and negative effect. Be mindful of the NPCâ€™s tone. (Gemma is the honorific for Kran.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playername clearly not to be used in newbie quests, have NPC establish rapport use this in second quest or even the third time a player works with a given NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Give me a quest..&lt;br /&gt;
&lt;br /&gt;
= A sample quest script =&lt;br /&gt;
&lt;br /&gt;
== The first step ==&lt;br /&gt;
As previously mentioned Step 1 does not exist, it is just the start of the quest, and can not be required by subsequent steps. The Start of the Quest will look something like the example at the beginning (Structure 1).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same example can also be scripted like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 2&#039;&#039;&#039;&lt;br /&gt;
 P: Short trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Initial question, give me a quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes, I do have a quest for you. I need you to give Item of Importance to NPC2 Name.&lt;br /&gt;
 &lt;br /&gt;
 P: Yes P: No.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Yes, I will do that. Menu: No way stupid.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is Yes.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Item of Importance.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is No.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Structure 2 the answers &amp;quot;No&amp;quot; and &amp;quot;Yes&amp;quot; are inverted, like the two &amp;quot;Menu:&amp;quot; commands, so it will give the same result as Structure 1. (Answer No: nothing happens. Answer Yes: the player will get 1Item of Importance and the Quest.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us use a more detailed example. We will make a very simple quest: Aono wants to deliver a bottle of milk to Orchibaly. The player can choose the quest from Aono&#039;s quest menu. Orchibaly will then give the player 2 pies and a receipt to give back to Aono. The first step will be the step that assigns the quest. The P: tells the engine that this line represents something the player will say to the NPC, but what you must pay extra attention to is the &amp;quot;Menu:&amp;quot; This will be what the player will see as an option in the quest menu. If there are several options you will have to create one &amp;quot;P:&amp;quot; and a &amp;quot;Menu:&amp;quot; for each of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here we firstly gives the player the option to ask for the quest. Then Aono describes the nature of the quest and the player can choose yes or no. Right after the &amp;quot;Menu:&amp;quot; line the NPC responsewill be put. In this example Aono will reply: &amp;quot;Well, I will get someone else to do it for me.&amp;quot; if the player says no or &amp;quot;That&#039;s great. Here is the milk. Be sure not to spill it. TellOrchibaly I sent you.&amp;quot;, give the player 1 Milk Bottle and assign the quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Assign Quest&#039;&#039;&#039;&lt;br /&gt;
 # Quest: Delivery for Aono Rikas&lt;br /&gt;
 &lt;br /&gt;
 # Quest Description: Sample Quest.&lt;br /&gt;
 &lt;br /&gt;
 # The rest of the header will not be covered here.&lt;br /&gt;
 &lt;br /&gt;
 # Step 1 Aono Rikas in Hydlaa needs someone to deliver milk to Orchibally Gurpleferd in Ojaveda.&lt;br /&gt;
 &lt;br /&gt;
 P: Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Are there any jobs you need done?&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well, yes. I need some milk delivered to Orchibaly in Ojaveda. Can you do this for me?&lt;br /&gt;
 &lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Menu: No. Menu: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well I will get someone else to do it for me.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: That&#039;s great. Here is the milk. Be sure not to spill it. Tell Orchibaly I sent you.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quest can be automatically assigned or there can be a step at the beginning of the quest to ask the player if he accepts it.&lt;br /&gt;
&lt;br /&gt;
If you want to assign it automatically use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
If you want to ask the player use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here, with the question if you want to help.&lt;br /&gt;
  P: nohelp. P: yeshelp.&lt;br /&gt;
  Menu: I don&#039;t want to. Menu: Yes I will help.&lt;br /&gt;
  NPC: Fine... Go away.&lt;br /&gt;
  NPC: Good great.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The “Assign quest.” command will only trigger after the second NPC: dialogue line is triggered, nothing happens if the first is triggered.&lt;br /&gt;
&lt;br /&gt;
== The next step ==&lt;br /&gt;
To separate the step we use &amp;quot;...&amp;quot; and then a comment on what step it is and what the step is about. If you don&#039;t want this step to be repeatable you will also have to add &amp;quot;NoRepeat&amp;quot; after the &amp;quot;...&amp;quot;. The second step does not need a completion of Step 1, because Step 1 does not exist so to speak. The structure will be more or less the same as for the initial step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us continue our Delivery for Aono Quest. We have assigned the quest and the player has been given 1 Milk Bottle to give to Orchibaly. Now the player must give that milk to Orchibaly. Either by using the give GUI or by using the quest menu. The first thing we have to do here is to set up the give trigger. If the player gives Orchibaly the milk, he will answer &amp;quot;Oh, yes the milk. Please give it to me. Now i need you to deliver these two pies and this receipt back toAono.&amp;quot;, Give the player 2 pies and a Receipt from Orchibaly. The step is then completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example although the player is given two pies no &amp;quot;s&amp;quot; is added to the line. This is important, especially because most writers tend to add a plural automatically to plural items. Remember the engine does not. An item is designated in the singular, the engine always interprets it in the singular regardless of the number included. The numbers are again not spelt out and Arabic numerals used. Remember that each &amp;quot;Player gives&amp;quot;-command must have menu option in the next line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Step 2&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this bottle of milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Thanks, please give it to me. Now deliver two pies and a receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Completing a step&lt;br /&gt;
 &lt;br /&gt;
 At the end of a step remember to insert the line:&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;Complete Delivery for Aono Rikas Step 2.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the use of Capitals, the use of the quest name, the use of the appropriate numeral and the period at the end of the sentence. The line marks the step as complete and allows the player and the quest to move forward.&lt;br /&gt;
&lt;br /&gt;
== Last step ==&lt;br /&gt;
To make sure the player has completed the previous step we start with &amp;quot;Require completion of delivery for Aono step 2.&amp;quot;. Then we move on to the trigger which is the player giving 2 pies and the receipt to Aono. Aono answers &amp;quot;Ah, pie. Thank you. Please accept this for your time.&amp;quot;, gives the player a pie and 100Tria. The step is closed and so is the quest with &amp;quot;Complete Delivery for Aono Rikas.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last Step&#039;&#039;&#039;&lt;br /&gt;
 ...NoRepeat.&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of delivery for Aono step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here are your pies and your receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you use multiple options in the last step of a quest you have to explicitly complete the quest with a command for the first option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last step with multiple options&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest doesn&#039;t complete automatically so make sure you have added a complete line for this response.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2. Complete Harnquist Needs Gold.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest completes automatically because it is the last line in quest so no complete line is required.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you omit the Complete Step and Complete Quest line, the quest will not end properly when choosing &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Branches of a quest (Non exclusive) ==&lt;br /&gt;
Some times you want to have several different outcomes for a quest. Let us use the Delivery quest once again. If the first NPC says that you must NOT give the milk to some one else... specially NPC3. Then you should also add the option for the player to actually give the milk to NPC3 . This will complicate your script a bit, but is not as hard as it might seem. Most of the job is done by placing the right &amp;quot;Require completion of&amp;quot; and &amp;quot;Require no completion of&amp;quot; commands.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us take a look at that Delivery Quest again. Now we want to add an option for the player to give the milk to Reffitia instead. Reffitia will shake the milk until it becomes butter and this will make Orchibaly angry and demand a new bottle of milk. To do that we will have to add a few more steps and we will start from step 2 as step 1 will be the same as above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Third step will be our previous Step 2. And the last step will be the same. Though Aono should mention something like: &amp;quot;Make sure you don&#039;t give that milk toReffitia.&amp;quot; in Step 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: This is a non exclusive branching, meaning that the first branch is available also when executing the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: We will not add an additional step for the player to get milk again from Aono, but the player have to figure out another way to get hold of it (Buy from an NPC).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Branching&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Alternative is to give the milk to refittia&lt;br /&gt;
 &lt;br /&gt;
 Player gives 1 Milk Bottle to Reffitia&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here Reffitia, take this milk.&lt;br /&gt;
 &lt;br /&gt;
 Reffitia Thamal: Ah! Orchibaly&#039;s milk. Here, now you can give the bottle to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy.&lt;br /&gt;
 # The player then have to find another way of getting a bottle of milk (buy from NPC?)&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 5 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Alternative outcome ==&lt;br /&gt;
If we wanted the quest to have a different outcome if the player gives the milk to Reffitia than to Orchibaly we would need to get creative with the require commands. Let us say that if the player gives butter to Orchibaly he will give &amp;quot;bad pies&amp;quot; so when Aono receives them and takes a taste he will be very angry and no reward is given. To do this we will have to add just one more step. Let us start with step 3. Here we will have to change only the NPC response a bit to something like &amp;quot;Milk? This is butter. Have you been shaking the bottle all the way over here? This is completely useless to me, butter I have more than enough of. Any way someMenki came with another bottle just before you. Here takes these pies to Aono . Oh, and don&#039;t forget this receipt.&amp;quot;. Step 4 will be the step where the player gives the bad pies to Aono, this step will complete the quest. Step 5 and 6 are the outcome if the player gives the milk directly toOrchibaly. Notice that Step 5 require a NO completion of Step 4. This is actually not necessary for this script, because the previous the other branch of the quest, ending in step 4 closes the quest it self.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Alternative Outcome&#039;&#039;&#039;&lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy. And receives 2 pies and a receipt&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the &amp;quot;bad&amp;quot; pies and the receipt to Aono. Receives gunk as reward and Quest is completed.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 3&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 2 Pie, 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. [Aono takes a bite at the pie] You have tricked me!&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Gunk.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 # Step 5 - Player gives the milk directly to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Require no completion of Delivery for Aono Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 5.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 6 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Quest Timeout (Passing of time) ==&lt;br /&gt;
If you want to allow a certain part of the quest to wait a certain amount of time before it can be a executed, you can use this script:&amp;lt;blockquote&amp;gt;Run script give_quest_timeout &amp;lt;&amp;lt;&#039;Time until Harnquist is ready&#039;,6&amp;gt;&amp;gt;&amp;lt;/blockquote&amp;gt;this will create a temporary active magic with name &#039;Time until Harnquist is ready&#039; which will last for 6 minutes. &lt;br /&gt;
&lt;br /&gt;
Then in the prerequisite of the step have this:&amp;lt;blockquote&amp;gt;# Step 12.&lt;br /&gt;
&lt;br /&gt;
Require active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: swordnotready.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready yet?&lt;br /&gt;
&lt;br /&gt;
Harnquist: No, not yet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
# Step 13.&lt;br /&gt;
&lt;br /&gt;
Require no active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: about Vresa sword.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready?&lt;br /&gt;
&lt;br /&gt;
Harnquist: Yes, Vresa&#039;s sword is done. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Important commands and expressions used =&lt;br /&gt;
&lt;br /&gt;
== Assign Quest. ==&lt;br /&gt;
This line tells the engine to assign the quest to the player and generally results in the &amp;quot;YOU GOT A QUEST&amp;quot;. and placing the quest in the player&#039;s quest log, under &amp;quot;uncompleted&amp;quot;. Again remember to be exact here, Capitalize the two words and put a &amp;quot;.&amp;quot; at the end. It cannot be emphasized enough that the engine only interprets what it sees and the way it sees it. If you are not precise the quest will NOT happen or in the cases of the next steps move forward.&lt;br /&gt;
&lt;br /&gt;
== ... ==&lt;br /&gt;
The three dots mark the beginning of a new step. Better, the three dots create a new step. So you need a &amp;quot;three dots&amp;quot; line before every &amp;quot;Complete Quest Name Step #&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== NoRepeat. ==&lt;br /&gt;
This line means that the quest step cannot be done over and over. Note that there are three periods &amp;quot;...&amp;quot; a space and &#039;NoRepeat.&#039; is one word not two. Each part of this sentence is required in exactly this form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically &amp;quot;...&amp;quot; tells the engine that some time can pass before the next lines are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NoRepeat allows this quest step to be only done one time. This also applies to actions as seen in later steps. (in reality NoRepeat is a synonym for Require no completion of &amp;quot;this step&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require completion of Quest Name Step #. ==&lt;br /&gt;
This command is like a closed door. To open it and enter in the current step the player needs to complete the step number #. You can also refer to a future step (for example, you&#039;re on step 4 and add &amp;quot;Require completion of Quest Name Step 8.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require no completion of Quest Name Step #. ==&lt;br /&gt;
This command is like an open door. The player is free to continue the quest and entering the current step, UNLESS he completed the step number #. Completing the step number # will close the door. Forever! You can also refer to a future step.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name Step #. ==&lt;br /&gt;
This command completes a step, # being the step number. You can complete one step in another one. But remember to insert one &amp;quot;...&amp;quot; line for every &amp;quot;Complete Quest Name Step #.&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name. ==&lt;br /&gt;
This command will end the quest. After this the quest will be deleted from the uncompleted quest list and appear in the Completed quest list.&lt;br /&gt;
&lt;br /&gt;
== P: ==&lt;br /&gt;
The trigger is actually a ghost from the previous scripting system, but it is still needed (for now). Before the player had to type the exact trigger stated after the &amp;quot;P:&amp;quot;. Now they click the option from &amp;quot;Menu:&amp;quot;. Triggers must be four words or less. Triggers must end with a period, no other punctuation is allowed (question marks especially are known to break aquest on the server).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want multiple phrases to activate the same trigger, you can just separate the phrases by a period; for example: &amp;quot;P: about guards. about hydlaa guards. about hydlaa militia.&amp;quot; In this case the NPC&#039;s response will be fired on any of the three options. This technique can be used also when you have multiple choices: &amp;quot;P: one. two. P: more.&amp;quot;. Both &#039;one&#039; and &#039;two&#039; will trigger the first response, while &#039;more&#039; will trigger the second.&lt;br /&gt;
&lt;br /&gt;
WARNING: Triggers cannot contain any of the following words: a, am, an, and, any, anything, are, do, I, is, isnâ€™t, please, that, the, this, to, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They also may not contain the name of the NPC you&#039;re talking to as that&#039;ll be stripped.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These words just take up space in a trigger as they are dropped by the engine when evaluating player response. To make the best use of your word counts ignore them when writing your triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: If you wanted the player to say &#039;please help Levrus&#039; the trigger would become &#039;help levrus&#039; as please would be an ignored word.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WARNING: If a player needs to write &amp;quot;NPC needs this&amp;quot; syntax it as &amp;quot;NPC wants this&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Menu: ==&lt;br /&gt;
That&#039;s easy. After this command you can add the sentence said by the player in game. This sentence will appear on the screen and could be selected when one talks to the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that for every menu line you need to create a response from the NPC.&lt;br /&gt;
&lt;br /&gt;
== Give ==&lt;br /&gt;
Give is a very useful command. It tells the engine to give the player items. Be it rewards or special items needed for the quest. When you reward a player, you can basically give items and/or experience. The syntax to award 1500 experience points would be: &amp;quot;Give 1500 Exp.&amp;quot; Note that &amp;quot;Exp&amp;quot; is case-sensitive. You can also reward items AND experience, using this syntax: &amp;quot;Give Leather Gloves. Give 1500 Exp.&amp;quot; Remember that you can only have two give commands on the same line, but you can have multiple lines, Remember to keep a clean style, it is prefered to only have one item per line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give more than two items&#039;&#039;&#039;&lt;br /&gt;
 Give 1 Leather Gloves.&lt;br /&gt;
 Give 1500 Exp.&lt;br /&gt;
 Give 1 Apple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also add a number if you need to give more than one item (like you do for experience) example: &amp;quot;Give 5 Iron Ingot.&amp;quot; It is not necessary in the case of one item to include the numeral, however it is good practice to do so as numerals tell the engine how many and should be written as a numeral, a word will NOT work as the engine cannot interpret it as such. Remember that all special items must be declared in the script header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another option you have is to give one item OR another. The following will pop up a window in which the player has to choose just one item:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give the player a choice between items&#039;&#039;&#039;&lt;br /&gt;
 Give Cold or Arrow or Energy.&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; At this time, don&#039;t use the following in an OR option: Tria, hexa, octa, circles, or items without a graphic. Also, for now, do NOT put quantities in front of items that are given using the &amp;quot;OR&amp;quot; parameter. An example of what NOT to do: &amp;quot;Give 1 Cold or 1 Arrow or 1 Energy.&amp;quot; This will lock the server right up. An example of what SHOULD be done: &amp;quot;Give Cold or Arrow or Energy.&amp;quot; (Check this statement if it is correct. --Katu)&lt;br /&gt;
&lt;br /&gt;
== Player gives NPC Name 1 Item ==&lt;br /&gt;
This can be used as a trigger (instead of the &amp;quot;P:&amp;quot;). It tells the engine to trigger the NPC dialogue when one or any fixed amount of a special item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a player have to give multiple items just add them to the original line using a comma:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Player gives item&#039;&#039;&#039;&lt;br /&gt;
 Player gives Harnquist Water Pouch, 1 Pie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Item name rules must be followed at all times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that the item name is &amp;quot;Iron Ingot&amp;quot;, so &amp;quot;Iron Ingots&amp;quot; will not work, even if itâ€™s the correct plural form. Keep all names singular.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, do not use a number (3, 14, etc) in the name of an item. An item called 3 Circles Receipt will probably generate problems when we script &amp;quot;Give 3 Circles Receipt.&amp;quot; It is better named &amp;quot;Three Circles Receipt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Numbers should be spelled out everywhere unless you are referring to the quantity given or dealing with a trigger (give me 5 apples. give me five apples.) as both would be correct in a trigger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Character limit for an item name is 60 characters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do not use an s&#039; in an item name, like &amp;quot;Levrus&#039; Left Shoe,&amp;quot; use &amp;quot;Left Shoe of Levrus&amp;quot; or a similar substitute instead.&lt;br /&gt;
&lt;br /&gt;
== Set variable Require variable ==&lt;br /&gt;
You can set a variable to be later used by the quest or other quests. Variables are set on the character and visible from all quests.&lt;br /&gt;
 Smith: Here is your winch access&lt;br /&gt;
 Setvariable Quest_Winch_Access 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can then require a variable to be set as prerequisite of a quest step.&lt;br /&gt;
 Require variable Quest_Winch_Access.&lt;br /&gt;
 P: access.&lt;br /&gt;
 Menu: I have access&lt;br /&gt;
 Bobaus: Ok, good.&lt;br /&gt;
&lt;br /&gt;
== Require Compendium ==&lt;br /&gt;
You can require the player to have a certain knowledge in the Compendium.&lt;br /&gt;
 Require compendium creature StoneHammer&lt;br /&gt;
 P: comps&lt;br /&gt;
 Menu: I know everything about the StoneHammers!&lt;br /&gt;
 Fighter3: WOW&lt;br /&gt;
 ...&lt;br /&gt;
 Require no compendium creature StoneHammer&lt;br /&gt;
 P: nocomps&lt;br /&gt;
 Menu: Sorry I dont know anything about StoneHammers!&lt;br /&gt;
 Fighter3: Ah, study more!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The syntax is: compendium &amp;lt;creature/plant/mineral&amp;gt; &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rewards at the end of the quest ==&lt;br /&gt;
When completing a quest, the player usually gets experience and money, or some items. In particular for experience and money you should use the following scripts. This allows us to split the rewards on a scale from 1 to 10 and then to tweak the actual values in the engine. The values in brackets indicate the complexity of the quest. The more complex the more rewards the player will get.&lt;br /&gt;
&lt;br /&gt;
 Run script give_quest_money &amp;lt;&amp;lt;3&amp;gt;&amp;gt;.&lt;br /&gt;
 Run script give_quest_exp &amp;lt;&amp;lt;2&amp;gt;&amp;gt;.&lt;br /&gt;
You can also award faction points by using &amp;quot;give_quest_faction&amp;quot; , the number given is multiplied by 5 so if you want +5 point, you need 1 on the second parameter:&lt;br /&gt;
 Run script give_quest_faction &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 1&amp;gt;&amp;gt;. &lt;br /&gt;
We have script also to push the faction point up to a given value, if you are already higher, this script will do nothing.&lt;br /&gt;
 Run script give_quest_faction_level &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
value = 1-&amp;gt; max faction points = 10;&lt;br /&gt;
&lt;br /&gt;
value = 2-&amp;gt; max faction points = 20;&lt;br /&gt;
&lt;br /&gt;
value = 3-&amp;gt; max faction points = 35; &lt;br /&gt;
&lt;br /&gt;
value = 4-&amp;gt; max faction points = 55; &lt;br /&gt;
&lt;br /&gt;
value = 5-&amp;gt; max faction points = 75; &lt;br /&gt;
&lt;br /&gt;
value = 6-&amp;gt; max faction points = 100; &lt;br /&gt;
&lt;br /&gt;
value = 7-&amp;gt; max faction points = 125; &lt;br /&gt;
&lt;br /&gt;
value = 8-&amp;gt; max faction points = 150; &lt;br /&gt;
&lt;br /&gt;
value = 9-&amp;gt; max faction points = 200;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to assign a faction title you can use this script. In the example it will assign the second title.&lt;br /&gt;
 Run script give_quest_faction_title &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
=== The header ===&lt;br /&gt;
The header should contain a lot of information. All the information is commented out by a &amp;quot;#&amp;quot;. The example below is from one of the mount quests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First section is information about the quest itself. Name of the quest, a short description and category. Categories will be discussed in detail later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next sections are for unique items used in the quest, name of the item followed by the description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third section is for recording versions of the script and all naming authors. Also who last edited the quest should be noted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The last section is for additional metadata which will be added to the quest in the database (not part of the db) and will be used by the engine to determine lockouts and prerequisites. Here it locks all players from doing the quest again and locks all other players to take the quest with 60 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lastly we tell the engine that the player have to complete the Ring of Familiar quest before this one. Note that these comments aren&#039;t taken by the engine; it&#039;s the duty of who loads the quest to fill the correct entries with the data found in the header: so it&#039;s just a way to keep all data together on the script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Header&#039;&#039;&#039;&lt;br /&gt;
 # Quest name: Drifting for a Drifter&lt;br /&gt;
 # Quest Description: Taemian wants to sell you a mount&lt;br /&gt;
 # Quest Category: General&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest Items: Item name/Item description&lt;br /&gt;
 # Taemian&#039;s Pouch: - Pouch with all sorts of coins&lt;br /&gt;
 # Green Gem of the Drifter - A magical gem with a green glow&lt;br /&gt;
 # Unsigned Drifter Permit - A permit that still needs to be signed by Datal&lt;br /&gt;
 # Signed Drifter Permit - A permit that has been signed by Datal&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest specific variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Author(s): Ravna, Katu, weltall&lt;br /&gt;
 # Current Version: 1.01&lt;br /&gt;
 # Player lockout: -1&lt;br /&gt;
 # Quest lockout: 60&lt;br /&gt;
 # Prerequisites: &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;completed quest=&amp;quot;Ring of Familiar&amp;quot;/&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 # Variables used: Quest_Variable_Name used to do.....&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Version history and change log&lt;br /&gt;
 # Last edited by: weltall&lt;br /&gt;
 # Version 1.00: Initial draft - 05/01/2010 - Katu.&lt;br /&gt;
 # Version 1.01: Added extra steps - 1/22/2011 - Venalan.&lt;br /&gt;
 # ----------------------&lt;br /&gt;
&lt;br /&gt;
==== Quest Lockouts ====&lt;br /&gt;
Each quest has two different lockout types:&lt;br /&gt;
&lt;br /&gt;
* Player lockout: When this parameter is set, the engine will wait the specified amount of seconds before allowing the same player to redo the same quest. If you want a quest to be available to each player only one time, then set the lockout to -1. Setting it to 600 will have the engine wait 10 minutes before unlocking the quest again.&lt;br /&gt;
* Quest lockout: When this parameter is set, the engine will wait the specified amount of seconds before reactivating the quest for ALL players. This means no one can start the same quest during this period, but the ones that had it already active can complete it.&lt;br /&gt;
&lt;br /&gt;
Usually we want quests to be unique to players, so most have a player lockout -1, except the very simple ones. Try always to think if itâ€™s meaningful for that player to redo it. (For example, Harnquist can require iron ore more than once, but won&#039;t need to teach you how to make a sword more than once.)&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Another more complex version of the prerequisites is the: REQUIRE MIN &amp;lt;number&amp;gt;: this tells the engine that there are specific requirements to be fulfilled before the player is able to get the quest. This script indicated it requires a minimum number of quests to be completed in a given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: require min 2 of Quest1, Quest2, Quest3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To match this prerequisite the player can complete Quest1 and Quest3 or 2 and 3, or all 3. The request is minimum 2 in the given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CATEGORY MIN &amp;lt;number&amp;gt;: quests have an attribute called &amp;quot;category&amp;quot;, we use it to identify the difficulty of quests, but can be used of any other purpose, for example one can say that a group of quests is &amp;quot;Evil&amp;quot; or &amp;quot;Laanx related&amp;quot; or &amp;quot; Newbie&amp;quot;. Just one category is allowed per quest. This prerequisite allows you to specify the category and the minimum number of quests completed in that category.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A sample of the coding used to set prerequisites for a quest (All on one line):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Prerequisites&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;and&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest One&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Two&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Three&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;assigned quest=&amp;quot;Test Quest Four&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Delivery for Aono Riskas&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Gorbiak Disease&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;/and&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This sample requires that the player have completed Test Quests 1 through 3, have Test Quest 4 assigned (not completed) and have NOT completed Fancy Dancing and High-Class Aspirations. To get these arranged correctly can take some practice if one is not familiar with working with booleans, so it is best to include a plain-English comments of what you wish your pre-requisites to be in addition to the one with the &amp;quot;pre&amp;quot; coding statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Checks if the player has a certain item equipped . To be documented better&lt;br /&gt;
&lt;br /&gt;
else if (!strncasecmp(block,&amp;quot;equipped&amp;quot;,8))&lt;br /&gt;
&lt;br /&gt;
=== More Prerequisites ===&lt;br /&gt;
&amp;quot;time of day&amp;quot; // require time of day starthh-endhh (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require not race Klyros. Require race Kran.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require gender female.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;possessed&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require possessed item Ruby Crystal.&lt;br /&gt;
&lt;br /&gt;
Example: Require Possessed amount 3 200-300 item Steel Falchion.&lt;br /&gt;
&lt;br /&gt;
it works also with money, as we handle this specifically. It will convert any currency, and check player total money for it.&lt;br /&gt;
&lt;br /&gt;
Example: Require no possessed amount 500 item Tria.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;skill&amp;quot; //Require skill &amp;lt;buffed&amp;gt; name &amp;lt;skillmin&amp;gt;-&amp;lt;skillmax&amp;gt;. (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;variable&amp;quot; //Require variable name. (working)&lt;br /&gt;
&lt;br /&gt;
=== Untested Prerequisites ===&lt;br /&gt;
Please contact engine in case you want to use any of these prerequisites, because those are untested.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;trait&amp;quot; //require trait name in place&lt;br /&gt;
&lt;br /&gt;
&amp;quot;guild&amp;quot;  //NOTE: the both argument is implicitly defined&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Notes on Creating Quest Files (Rules and Header Information) =&lt;br /&gt;
&lt;br /&gt;
* The quest documents you submit should always be in notepad format: this is to avoid special characters added by Word or other text editors, most notably &amp;quot;smart quotes&amp;quot; which will appear as squares in game. Notepad++ is recommended, HIGHLY recommended.&lt;br /&gt;
* Use only ANSI encoding.&lt;br /&gt;
* The file name when saving the quest should begin with &#039;Quest&#039; , then have the name of the quest. For example: Quest Hinoserri Cannot See.txt&lt;br /&gt;
* Titles of quests should follow some scheme of capitalization. There are many sets of rules, but a quick and easy format is to capitalize the first word and then all other words, except a, an, the, at, by, for, in, of, on, to, up, and, as, but, it, or, and nor.&lt;br /&gt;
* Each quest script begins with the title and a one or two sentence description; this is what the player reads so keep that in mind. The proper way to do this is to &amp;quot;comment out&amp;quot; your description and quest title, this is done by beginning a line with the number sign or pound symbol (#). Also, any quest item created for your quest should have a description written into the quest. Notes on quest items should also be commented out. Lastly, there should also be a &amp;quot;Quest Category&amp;quot; line that must be commented out as well. Approved quest categories are: Alchemy, Black Flame, Chain (don&#039;t use this one unless told), Cooking, Death Realm, Easy, Gugrontid, Magic Ways, Medium, Metal Working, Newbie, Repeatable. This is a work in progress, so if you have any questions ask an associate dev or developer. No quest can have more than one category - pick one and ONLY one. New quest categories must be approved by the associate devs/devs before use.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25753</id>
		<title>Quest scripts syntax</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25753"/>
		<updated>2026-04-21T21:10:23Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* More Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Structure of a quest script =&lt;br /&gt;
Quests are written out in chunks called steps. Each step covering the requirements of the previous one.&lt;br /&gt;
&lt;br /&gt;
= Things to know before you start =&lt;br /&gt;
Quest scripts should written ideally in a text editor and now in MS Word or similar so that no illegal characters make it into the quest dialog which would result in errors when viewed in game.&lt;br /&gt;
&lt;br /&gt;
Quotes are usually the ones which break the scripts and :&lt;br /&gt;
&lt;br /&gt;
• Only &#039; &amp;quot; should be used&lt;br /&gt;
&lt;br /&gt;
• ‘ ’ ” “ … These should not be present in the text at all.&lt;br /&gt;
&lt;br /&gt;
Any line of text in the script which begins with a ‘#’ character is ignored by the server and only acts as a comment by the author so that they can leave explanations as to what is happening, or, give information about the step number.&lt;br /&gt;
&lt;br /&gt;
The start of a ‘step’ is defined by a series of three dots ‘...’ Everything after this text up until the next ‘...’ is included in the step. The only unique case is the first step, this does not need ‘...’ and includes all the text before the first ‘...’&lt;br /&gt;
&lt;br /&gt;
== Important rules concerning steps ==&lt;br /&gt;
&lt;br /&gt;
* Every step in the quest should be explicitly completed or locked correctly. Example: &amp;quot;Complete Quest Name Step #&amp;quot; before the Quest is completed.&lt;br /&gt;
* A step can require the completion of another step by the command: &amp;quot;Requires completion of Quest Name Step #&amp;quot;&lt;br /&gt;
* Step 1 does not exist, step 1 is part of the start script (where you use the command &amp;quot;give me a quest&amp;quot;) and cannot be used as a require completion of step number.&lt;br /&gt;
* You may have multiple Require Completes at the beginning of a step.&lt;br /&gt;
* A step may also require another step NOT to have been completed with the command: &amp;quot;Require no completion of Quest Name Step #&amp;quot;.&lt;br /&gt;
* The Quest name must be exact! It is case sensitive. The same goes for NPC names.&lt;br /&gt;
* Each step should be commented like this: &amp;quot;# Step 2 - A description of actions of this step&amp;quot;. # Marks it as a comment not processed by the engine.&lt;br /&gt;
* You can also check for statements with this syntax: &amp;quot;Require &amp;lt;no/not&amp;gt; operator1 | &amp;lt;no/not&amp;gt; operator2 | ...| &amp;lt;no/not&amp;gt; operatorN.&amp;quot; Where operator is a prerequisite (see below the prerequisite chapter), from completion of to time of day etc. The | represents the OR. &#039;&#039;Example: &amp;quot;Require completion of Questname Step 3 | completion of Questname Step 7.&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s see an example before beginning the explanation. The following example is made of two steps. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 1&#039;&#039;&#039;&lt;br /&gt;
 P: Short Trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Do you have any work for me to do?&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes I do. Just breathe one time.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 P: Ok, I did it!&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Great, your quest is completed.&lt;br /&gt;
&lt;br /&gt;
== Syntax Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
To create a comment line you must start the line with a &amp;quot;#&amp;quot;. These lines are not evaluated by the engine as things that need to be done. These comment lines show what is going on and what are the intentions of the quest writer. This is important because more than one person are often working on a quest script, or eventually for laterbug fixing it will be easier to find the exact problem without reading the entire quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each step in a quest should be started by a comment like this &amp;quot;#Step 2 - Description of step.&amp;quot;. You can use comments to more that just noting the step number. Any where within the script you can add comments to help your fellow scripters understand the code. We will use comments to explain things within the scripts here.&lt;br /&gt;
&lt;br /&gt;
=== Trigger and Menu ===&lt;br /&gt;
The trigger is for the engine, while the menu is what shows up in the player quest menu. The trigger is defined by a &amp;quot;P:&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
P: use to be what the player typed to trigger the step, but with the menu system are now used as a description of what step the player is choosing, for example P:yeshelp. (slide 3). The only time you must use exact text is when a player types the answer to a question you pose them&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because you are talking to the engine it must be exact a colon after the &amp;quot;P:&amp;quot; and a period at the end of the sentence. This is also true of the Menu in every case in which the player (P) says something to the NPC in question &amp;quot;P: Short Trigger.&amp;quot; comes first, then below comes the &amp;quot;Menu:&amp;quot; line, with exactly the same requirements.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Menu&amp;quot;: Text is what the player sees when they look at the quest menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please remember that the engine does not think, it reacts to the written cues, so the syntax MUST be exact. The first player statement gives the engine the quest name. The Menu allows the player to ask for the quest from the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having the two &amp;quot;P:&amp;quot; and two &amp;quot;Menu:&amp;quot; on the same line informs the engine that the player has two different options. It is standard that the &amp;quot;P:&amp;quot; line is above the &amp;quot;Menu:&amp;quot; line and the &amp;quot;No.&amp;quot; answer comes first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These lines trigger the NPC response. In more elaborate quests the &amp;quot;Menu:&amp;quot; line may have variations on the No. or Yes. response. However remember KISS (Keep It Simple Stupid) is generally a good thing to keep in mind when you are beginning. You can have many options, but remember each &amp;quot;P:&amp;quot; must have a matching &amp;quot;Menu:&amp;quot; and they must be put in the same order&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to include a free textfield, you will have to include a quotation mark after the menu. The &amp;lt;?&amp;gt; has to be followed by &amp;lt;=&amp;gt; and a text. This will produce a printout of the text and the user will be able to enter a free text. E.g. &amp;quot;Menu: ?=What shall Jardet do?&amp;quot; This will result in the text &amp;quot;What shall Jardet do?&amp;quot; being printed, followed by free form input.&lt;br /&gt;
&lt;br /&gt;
 P: *. P: rock pick.&lt;br /&gt;
 Menu: ?=Please tell me your answer.&lt;br /&gt;
 Smith: No, you didn&#039;t get the right answer.&lt;br /&gt;
 Smith: Yes, it&#039;s a rock pick!.&lt;br /&gt;
&lt;br /&gt;
 P: Nothirstyinterst. P: Yesthirstyintrest.&lt;br /&gt;
 Menu: No, sounds like work. Menu: Sure, I can get it for you.&lt;br /&gt;
 Serana Tuvi: Alright. I will see you around then, stranger.&lt;br /&gt;
 Serana Tuvi: Ah, good good. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember the : after the P and Menu are important, as is the . at the end of the line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For triggers used to start quests, never use NPC names into it, because this will confuse the engine, and the trigger will not be recognized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every P: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every Menu: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every NPC: used in one step must be on different lines.&lt;br /&gt;
&lt;br /&gt;
=== NPC Response ===&lt;br /&gt;
Aono Rikas: here you can add a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The line above is interpreted as an answer from the NPC and the engine will extract the name before the colon (:) + space as the NPC involved in this step of the quest. From now on, we will call this a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full name of the NPC is required, just the first name will not work. If it is only one name e.g Harnquist use that, and if your NPC somehow ends up with three names use all of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first step of a quest the NPC statement will end in a question mark and is triggered by the first 2 lines. Responses are linked to each of the Triggers and Menus. So if you have two triggers you need two menu options and two NPC responses. All arranged in the same order.&lt;br /&gt;
&lt;br /&gt;
=== Dialogues ===&lt;br /&gt;
The dialogues are the most important part of the quest for a player to get immersed. So let us talk about how to make the dialogue.&lt;br /&gt;
&lt;br /&gt;
* Every punctuation, exclamation mark and question mark will create a short pause in the dialogue and create a new line.&lt;br /&gt;
* To create actions all you have to do is to use square brackets within the dialogue like this &amp;quot;Blablabla [NPC Name picks his nose] Bla bla blabla&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may use also these commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playerrace can be used in an impersonal and a personal manner in terms of context, consider its usage carefully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$sir which gives you &amp;quot;Sir&amp;quot; or &amp;quot;Madam&amp;quot; or &amp;quot;Gemma&amp;quot; depending on the gender of the player&#039;s character. Again, this can be used to positive and negative effect. Be mindful of the NPCâ€™s tone. (Gemma is the honorific for Kran.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playername clearly not to be used in newbie quests, have NPC establish rapport use this in second quest or even the third time a player works with a given NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Give me a quest..&lt;br /&gt;
&lt;br /&gt;
= A sample quest script =&lt;br /&gt;
&lt;br /&gt;
== The first step ==&lt;br /&gt;
As previously mentioned Step 1 does not exist, it is just the start of the quest, and can not be required by subsequent steps. The Start of the Quest will look something like the example at the beginning (Structure 1).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same example can also be scripted like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 2&#039;&#039;&#039;&lt;br /&gt;
 P: Short trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Initial question, give me a quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes, I do have a quest for you. I need you to give Item of Importance to NPC2 Name.&lt;br /&gt;
 &lt;br /&gt;
 P: Yes P: No.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Yes, I will do that. Menu: No way stupid.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is Yes.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Item of Importance.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is No.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Structure 2 the answers &amp;quot;No&amp;quot; and &amp;quot;Yes&amp;quot; are inverted, like the two &amp;quot;Menu:&amp;quot; commands, so it will give the same result as Structure 1. (Answer No: nothing happens. Answer Yes: the player will get 1Item of Importance and the Quest.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us use a more detailed example. We will make a very simple quest: Aono wants to deliver a bottle of milk to Orchibaly. The player can choose the quest from Aono&#039;s quest menu. Orchibaly will then give the player 2 pies and a receipt to give back to Aono. The first step will be the step that assigns the quest. The P: tells the engine that this line represents something the player will say to the NPC, but what you must pay extra attention to is the &amp;quot;Menu:&amp;quot; This will be what the player will see as an option in the quest menu. If there are several options you will have to create one &amp;quot;P:&amp;quot; and a &amp;quot;Menu:&amp;quot; for each of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here we firstly gives the player the option to ask for the quest. Then Aono describes the nature of the quest and the player can choose yes or no. Right after the &amp;quot;Menu:&amp;quot; line the NPC responsewill be put. In this example Aono will reply: &amp;quot;Well, I will get someone else to do it for me.&amp;quot; if the player says no or &amp;quot;That&#039;s great. Here is the milk. Be sure not to spill it. TellOrchibaly I sent you.&amp;quot;, give the player 1 Milk Bottle and assign the quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Assign Quest&#039;&#039;&#039;&lt;br /&gt;
 # Quest: Delivery for Aono Rikas&lt;br /&gt;
 &lt;br /&gt;
 # Quest Description: Sample Quest.&lt;br /&gt;
 &lt;br /&gt;
 # The rest of the header will not be covered here.&lt;br /&gt;
 &lt;br /&gt;
 # Step 1 Aono Rikas in Hydlaa needs someone to deliver milk to Orchibally Gurpleferd in Ojaveda.&lt;br /&gt;
 &lt;br /&gt;
 P: Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Are there any jobs you need done?&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well, yes. I need some milk delivered to Orchibaly in Ojaveda. Can you do this for me?&lt;br /&gt;
 &lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Menu: No. Menu: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well I will get someone else to do it for me.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: That&#039;s great. Here is the milk. Be sure not to spill it. Tell Orchibaly I sent you.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quest can be automatically assigned or there can be a step at the beginning of the quest to ask the player if he accepts it.&lt;br /&gt;
&lt;br /&gt;
If you want to assign it automatically use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
If you want to ask the player use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here, with the question if you want to help.&lt;br /&gt;
  P: nohelp. P: yeshelp.&lt;br /&gt;
  Menu: I don&#039;t want to. Menu: Yes I will help.&lt;br /&gt;
  NPC: Fine... Go away.&lt;br /&gt;
  NPC: Good great.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The “Assign quest.” command will only trigger after the second NPC: dialogue line is triggered, nothing happens if the first is triggered.&lt;br /&gt;
&lt;br /&gt;
== The next step ==&lt;br /&gt;
To separate the step we use &amp;quot;...&amp;quot; and then a comment on what step it is and what the step is about. If you don&#039;t want this step to be repeatable you will also have to add &amp;quot;NoRepeat&amp;quot; after the &amp;quot;...&amp;quot;. The second step does not need a completion of Step 1, because Step 1 does not exist so to speak. The structure will be more or less the same as for the initial step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us continue our Delivery for Aono Quest. We have assigned the quest and the player has been given 1 Milk Bottle to give to Orchibaly. Now the player must give that milk to Orchibaly. Either by using the give GUI or by using the quest menu. The first thing we have to do here is to set up the give trigger. If the player gives Orchibaly the milk, he will answer &amp;quot;Oh, yes the milk. Please give it to me. Now i need you to deliver these two pies and this receipt back toAono.&amp;quot;, Give the player 2 pies and a Receipt from Orchibaly. The step is then completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example although the player is given two pies no &amp;quot;s&amp;quot; is added to the line. This is important, especially because most writers tend to add a plural automatically to plural items. Remember the engine does not. An item is designated in the singular, the engine always interprets it in the singular regardless of the number included. The numbers are again not spelt out and Arabic numerals used. Remember that each &amp;quot;Player gives&amp;quot;-command must have menu option in the next line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Step 2&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this bottle of milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Thanks, please give it to me. Now deliver two pies and a receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Completing a step&lt;br /&gt;
 &lt;br /&gt;
 At the end of a step remember to insert the line:&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;Complete Delivery for Aono Rikas Step 2.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the use of Capitals, the use of the quest name, the use of the appropriate numeral and the period at the end of the sentence. The line marks the step as complete and allows the player and the quest to move forward.&lt;br /&gt;
&lt;br /&gt;
== Last step ==&lt;br /&gt;
To make sure the player has completed the previous step we start with &amp;quot;Require completion of delivery for Aono step 2.&amp;quot;. Then we move on to the trigger which is the player giving 2 pies and the receipt to Aono. Aono answers &amp;quot;Ah, pie. Thank you. Please accept this for your time.&amp;quot;, gives the player a pie and 100Tria. The step is closed and so is the quest with &amp;quot;Complete Delivery for Aono Rikas.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last Step&#039;&#039;&#039;&lt;br /&gt;
 ...NoRepeat.&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of delivery for Aono step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here are your pies and your receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you use multiple options in the last step of a quest you have to explicitly complete the quest with a command for the first option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last step with multiple options&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest doesn&#039;t complete automatically so make sure you have added a complete line for this response.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2. Complete Harnquist Needs Gold.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest completes automatically because it is the last line in quest so no complete line is required.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you omit the Complete Step and Complete Quest line, the quest will not end properly when choosing &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Branches of a quest (Non exclusive) ==&lt;br /&gt;
Some times you want to have several different outcomes for a quest. Let us use the Delivery quest once again. If the first NPC says that you must NOT give the milk to some one else... specially NPC3. Then you should also add the option for the player to actually give the milk to NPC3 . This will complicate your script a bit, but is not as hard as it might seem. Most of the job is done by placing the right &amp;quot;Require completion of&amp;quot; and &amp;quot;Require no completion of&amp;quot; commands.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us take a look at that Delivery Quest again. Now we want to add an option for the player to give the milk to Reffitia instead. Reffitia will shake the milk until it becomes butter and this will make Orchibaly angry and demand a new bottle of milk. To do that we will have to add a few more steps and we will start from step 2 as step 1 will be the same as above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Third step will be our previous Step 2. And the last step will be the same. Though Aono should mention something like: &amp;quot;Make sure you don&#039;t give that milk toReffitia.&amp;quot; in Step 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: This is a non exclusive branching, meaning that the first branch is available also when executing the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: We will not add an additional step for the player to get milk again from Aono, but the player have to figure out another way to get hold of it (Buy from an NPC).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Branching&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Alternative is to give the milk to refittia&lt;br /&gt;
 &lt;br /&gt;
 Player gives 1 Milk Bottle to Reffitia&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here Reffitia, take this milk.&lt;br /&gt;
 &lt;br /&gt;
 Reffitia Thamal: Ah! Orchibaly&#039;s milk. Here, now you can give the bottle to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy.&lt;br /&gt;
 # The player then have to find another way of getting a bottle of milk (buy from NPC?)&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 5 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Alternative outcome ==&lt;br /&gt;
If we wanted the quest to have a different outcome if the player gives the milk to Reffitia than to Orchibaly we would need to get creative with the require commands. Let us say that if the player gives butter to Orchibaly he will give &amp;quot;bad pies&amp;quot; so when Aono receives them and takes a taste he will be very angry and no reward is given. To do this we will have to add just one more step. Let us start with step 3. Here we will have to change only the NPC response a bit to something like &amp;quot;Milk? This is butter. Have you been shaking the bottle all the way over here? This is completely useless to me, butter I have more than enough of. Any way someMenki came with another bottle just before you. Here takes these pies to Aono . Oh, and don&#039;t forget this receipt.&amp;quot;. Step 4 will be the step where the player gives the bad pies to Aono, this step will complete the quest. Step 5 and 6 are the outcome if the player gives the milk directly toOrchibaly. Notice that Step 5 require a NO completion of Step 4. This is actually not necessary for this script, because the previous the other branch of the quest, ending in step 4 closes the quest it self.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Alternative Outcome&#039;&#039;&#039;&lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy. And receives 2 pies and a receipt&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the &amp;quot;bad&amp;quot; pies and the receipt to Aono. Receives gunk as reward and Quest is completed.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 3&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 2 Pie, 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. [Aono takes a bite at the pie] You have tricked me!&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Gunk.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 # Step 5 - Player gives the milk directly to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Require no completion of Delivery for Aono Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 5.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 6 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Quest Timeout (Passing of time) ==&lt;br /&gt;
If you want to allow a certain part of the quest to wait a certain amount of time before it can be a executed, you can use this script:&amp;lt;blockquote&amp;gt;Run script give_quest_timeout &amp;lt;&amp;lt;&#039;Time until Harnquist is ready&#039;,6&amp;gt;&amp;gt;&amp;lt;/blockquote&amp;gt;this will create a temporary active magic with name &#039;Time until Harnquist is ready&#039; which will last for 6 minutes. &lt;br /&gt;
&lt;br /&gt;
Then in the prerequisite of the step have this:&amp;lt;blockquote&amp;gt;# Step 12.&lt;br /&gt;
&lt;br /&gt;
Require active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: swordnotready.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready yet?&lt;br /&gt;
&lt;br /&gt;
Harnquist: No, not yet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
# Step 13.&lt;br /&gt;
&lt;br /&gt;
Require no active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: about Vresa sword.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready?&lt;br /&gt;
&lt;br /&gt;
Harnquist: Yes, Vresa&#039;s sword is done. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Important commands and expressions used =&lt;br /&gt;
&lt;br /&gt;
== Assign Quest. ==&lt;br /&gt;
This line tells the engine to assign the quest to the player and generally results in the &amp;quot;YOU GOT A QUEST&amp;quot;. and placing the quest in the player&#039;s quest log, under &amp;quot;uncompleted&amp;quot;. Again remember to be exact here, Capitalize the two words and put a &amp;quot;.&amp;quot; at the end. It cannot be emphasized enough that the engine only interprets what it sees and the way it sees it. If you are not precise the quest will NOT happen or in the cases of the next steps move forward.&lt;br /&gt;
&lt;br /&gt;
== ... ==&lt;br /&gt;
The three dots mark the beginning of a new step. Better, the three dots create a new step. So you need a &amp;quot;three dots&amp;quot; line before every &amp;quot;Complete Quest Name Step #&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== NoRepeat. ==&lt;br /&gt;
This line means that the quest step cannot be done over and over. Note that there are three periods &amp;quot;...&amp;quot; a space and &#039;NoRepeat.&#039; is one word not two. Each part of this sentence is required in exactly this form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically &amp;quot;...&amp;quot; tells the engine that some time can pass before the next lines are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NoRepeat allows this quest step to be only done one time. This also applies to actions as seen in later steps. (in reality NoRepeat is a synonym for Require no completion of &amp;quot;this step&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require completion of Quest Name Step #. ==&lt;br /&gt;
This command is like a closed door. To open it and enter in the current step the player needs to complete the step number #. You can also refer to a future step (for example, you&#039;re on step 4 and add &amp;quot;Require completion of Quest Name Step 8.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require no completion of Quest Name Step #. ==&lt;br /&gt;
This command is like an open door. The player is free to continue the quest and entering the current step, UNLESS he completed the step number #. Completing the step number # will close the door. Forever! You can also refer to a future step.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name Step #. ==&lt;br /&gt;
This command completes a step, # being the step number. You can complete one step in another one. But remember to insert one &amp;quot;...&amp;quot; line for every &amp;quot;Complete Quest Name Step #.&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name. ==&lt;br /&gt;
This command will end the quest. After this the quest will be deleted from the uncompleted quest list and appear in the Completed quest list.&lt;br /&gt;
&lt;br /&gt;
== P: ==&lt;br /&gt;
The trigger is actually a ghost from the previous scripting system, but it is still needed (for now). Before the player had to type the exact trigger stated after the &amp;quot;P:&amp;quot;. Now they click the option from &amp;quot;Menu:&amp;quot;. Triggers must be four words or less. Triggers must end with a period, no other punctuation is allowed (question marks especially are known to break aquest on the server).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want multiple phrases to activate the same trigger, you can just separate the phrases by a period; for example: &amp;quot;P: about guards. about hydlaa guards. about hydlaa militia.&amp;quot; In this case the NPC&#039;s response will be fired on any of the three options. This technique can be used also when you have multiple choices: &amp;quot;P: one. two. P: more.&amp;quot;. Both &#039;one&#039; and &#039;two&#039; will trigger the first response, while &#039;more&#039; will trigger the second.&lt;br /&gt;
&lt;br /&gt;
WARNING: Triggers cannot contain any of the following words: a, am, an, and, any, anything, are, do, I, is, isnâ€™t, please, that, the, this, to, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They also may not contain the name of the NPC you&#039;re talking to as that&#039;ll be stripped.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These words just take up space in a trigger as they are dropped by the engine when evaluating player response. To make the best use of your word counts ignore them when writing your triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: If you wanted the player to say &#039;please help Levrus&#039; the trigger would become &#039;help levrus&#039; as please would be an ignored word.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WARNING: If a player needs to write &amp;quot;NPC needs this&amp;quot; syntax it as &amp;quot;NPC wants this&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Menu: ==&lt;br /&gt;
That&#039;s easy. After this command you can add the sentence said by the player in game. This sentence will appear on the screen and could be selected when one talks to the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that for every menu line you need to create a response from the NPC.&lt;br /&gt;
&lt;br /&gt;
== Give ==&lt;br /&gt;
Give is a very useful command. It tells the engine to give the player items. Be it rewards or special items needed for the quest. When you reward a player, you can basically give items and/or experience. The syntax to award 1500 experience points would be: &amp;quot;Give 1500 Exp.&amp;quot; Note that &amp;quot;Exp&amp;quot; is case-sensitive. You can also reward items AND experience, using this syntax: &amp;quot;Give Leather Gloves. Give 1500 Exp.&amp;quot; Remember that you can only have two give commands on the same line, but you can have multiple lines, Remember to keep a clean style, it is prefered to only have one item per line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give more than two items&#039;&#039;&#039;&lt;br /&gt;
 Give 1 Leather Gloves.&lt;br /&gt;
 Give 1500 Exp.&lt;br /&gt;
 Give 1 Apple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also add a number if you need to give more than one item (like you do for experience) example: &amp;quot;Give 5 Iron Ingot.&amp;quot; It is not necessary in the case of one item to include the numeral, however it is good practice to do so as numerals tell the engine how many and should be written as a numeral, a word will NOT work as the engine cannot interpret it as such. Remember that all special items must be declared in the script header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another option you have is to give one item OR another. The following will pop up a window in which the player has to choose just one item:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give the player a choice between items&#039;&#039;&#039;&lt;br /&gt;
 Give Cold or Arrow or Energy.&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; At this time, don&#039;t use the following in an OR option: Tria, hexa, octa, circles, or items without a graphic. Also, for now, do NOT put quantities in front of items that are given using the &amp;quot;OR&amp;quot; parameter. An example of what NOT to do: &amp;quot;Give 1 Cold or 1 Arrow or 1 Energy.&amp;quot; This will lock the server right up. An example of what SHOULD be done: &amp;quot;Give Cold or Arrow or Energy.&amp;quot; (Check this statement if it is correct. --Katu)&lt;br /&gt;
&lt;br /&gt;
== Player gives NPC Name 1 Item ==&lt;br /&gt;
This can be used as a trigger (instead of the &amp;quot;P:&amp;quot;). It tells the engine to trigger the NPC dialogue when one or any fixed amount of a special item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a player have to give multiple items just add them to the original line using a comma:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Player gives item&#039;&#039;&#039;&lt;br /&gt;
 Player gives Harnquist Water Pouch, 1 Pie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Item name rules must be followed at all times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that the item name is &amp;quot;Iron Ingot&amp;quot;, so &amp;quot;Iron Ingots&amp;quot; will not work, even if itâ€™s the correct plural form. Keep all names singular.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, do not use a number (3, 14, etc) in the name of an item. An item called 3 Circles Receipt will probably generate problems when we script &amp;quot;Give 3 Circles Receipt.&amp;quot; It is better named &amp;quot;Three Circles Receipt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Numbers should be spelled out everywhere unless you are referring to the quantity given or dealing with a trigger (give me 5 apples. give me five apples.) as both would be correct in a trigger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Character limit for an item name is 60 characters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do not use an s&#039; in an item name, like &amp;quot;Levrus&#039; Left Shoe,&amp;quot; use &amp;quot;Left Shoe of Levrus&amp;quot; or a similar substitute instead.&lt;br /&gt;
&lt;br /&gt;
== Set variable Require variable ==&lt;br /&gt;
You can set a variable to be later used by the quest or other quests. Variables are set on the character and visible from all quests.&lt;br /&gt;
 Smith: Here is your winch access&lt;br /&gt;
 Setvariable Quest_Winch_Access 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can then require a variable to be set as prerequisite of a quest step.&lt;br /&gt;
 Require variable Quest_Winch_Access.&lt;br /&gt;
 P: access.&lt;br /&gt;
 Menu: I have access&lt;br /&gt;
 Bobaus: Ok, good.&lt;br /&gt;
&lt;br /&gt;
== Require Compendium ==&lt;br /&gt;
You can require the player to have a certain knowledge in the Compendium.&lt;br /&gt;
 Require compendium creature StoneHammer&lt;br /&gt;
 P: comps&lt;br /&gt;
 Menu: I know everything about the StoneHammers!&lt;br /&gt;
 Fighter3: WOW&lt;br /&gt;
 ...&lt;br /&gt;
 Require no compendium creature StoneHammer&lt;br /&gt;
 P: nocomps&lt;br /&gt;
 Menu: Sorry I dont know anything about StoneHammers!&lt;br /&gt;
 Fighter3: Ah, study more!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The syntax is: compendium &amp;lt;creature/plant/mineral&amp;gt; &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rewards at the end of the quest ==&lt;br /&gt;
When completing a quest, the player usually gets experience and money, or some items. In particular for experience and money you should use the following scripts. This allows us to split the rewards on a scale from 1 to 10 and then to tweak the actual values in the engine. The values in brackets indicate the complexity of the quest. The more complex the more rewards the player will get.&lt;br /&gt;
&lt;br /&gt;
 Run script give_quest_money &amp;lt;&amp;lt;3&amp;gt;&amp;gt;.&lt;br /&gt;
 Run script give_quest_exp &amp;lt;&amp;lt;2&amp;gt;&amp;gt;.&lt;br /&gt;
You can also award faction points by using &amp;quot;give_quest_faction&amp;quot; , the number given is multiplied by 5 so if you want +5 point, you need 1 on the second parameter:&lt;br /&gt;
 Run script give_quest_faction &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 1&amp;gt;&amp;gt;. &lt;br /&gt;
We have script also to push the faction point up to a given value, if you are already higher, this script will do nothing.&lt;br /&gt;
 Run script give_quest_faction_level &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
value = 1-&amp;gt; max faction points = 10;&lt;br /&gt;
&lt;br /&gt;
value = 2-&amp;gt; max faction points = 20;&lt;br /&gt;
&lt;br /&gt;
value = 3-&amp;gt; max faction points = 35; &lt;br /&gt;
&lt;br /&gt;
value = 4-&amp;gt; max faction points = 55; &lt;br /&gt;
&lt;br /&gt;
value = 5-&amp;gt; max faction points = 75; &lt;br /&gt;
&lt;br /&gt;
value = 6-&amp;gt; max faction points = 100; &lt;br /&gt;
&lt;br /&gt;
value = 7-&amp;gt; max faction points = 125; &lt;br /&gt;
&lt;br /&gt;
value = 8-&amp;gt; max faction points = 150; &lt;br /&gt;
&lt;br /&gt;
value = 9-&amp;gt; max faction points = 200;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to assign a faction title you can use this script. In the example it will assign the second title.&lt;br /&gt;
 Run script give_quest_faction_title &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
=== The header ===&lt;br /&gt;
The header should contain a lot of information. All the information is commented out by a &amp;quot;#&amp;quot;. The example below is from one of the mount quests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First section is information about the quest itself. Name of the quest, a short description and category. Categories will be discussed in detail later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next sections are for unique items used in the quest, name of the item followed by the description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third section is for recording versions of the script and all naming authors. Also who last edited the quest should be noted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The last section is for additional metadata which will be added to the quest in the database (not part of the db) and will be used by the engine to determine lockouts and prerequisites. Here it locks all players from doing the quest again and locks all other players to take the quest with 60 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lastly we tell the engine that the player have to complete the Ring of Familiar quest before this one. Note that these comments aren&#039;t taken by the engine; it&#039;s the duty of who loads the quest to fill the correct entries with the data found in the header: so it&#039;s just a way to keep all data together on the script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Header&#039;&#039;&#039;&lt;br /&gt;
 # Quest name: Drifting for a Drifter&lt;br /&gt;
 # Quest Description: Taemian wants to sell you a mount&lt;br /&gt;
 # Quest Category: General&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest Items: Item name/Item description&lt;br /&gt;
 # Taemian&#039;s Pouch: - Pouch with all sorts of coins&lt;br /&gt;
 # Green Gem of the Drifter - A magical gem with a green glow&lt;br /&gt;
 # Unsigned Drifter Permit - A permit that still needs to be signed by Datal&lt;br /&gt;
 # Signed Drifter Permit - A permit that has been signed by Datal&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest specific variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Author(s): Ravna, Katu, weltall&lt;br /&gt;
 # Current Version: 1.01&lt;br /&gt;
 # Player lockout: -1&lt;br /&gt;
 # Quest lockout: 60&lt;br /&gt;
 # Prerequisites: &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;completed quest=&amp;quot;Ring of Familiar&amp;quot;/&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 # Variables used: Quest_Variable_Name used to do.....&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Version history and change log&lt;br /&gt;
 # Last edited by: weltall&lt;br /&gt;
 # Version 1.00: Initial draft - 05/01/2010 - Katu.&lt;br /&gt;
 # Version 1.01: Added extra steps - 1/22/2011 - Venalan.&lt;br /&gt;
 # ----------------------&lt;br /&gt;
&lt;br /&gt;
==== Quest Lockouts ====&lt;br /&gt;
Each quest has two different lockout types:&lt;br /&gt;
&lt;br /&gt;
* Player lockout: When this parameter is set, the engine will wait the specified amount of seconds before allowing the same player to redo the same quest. If you want a quest to be available to each player only one time, then set the lockout to -1. Setting it to 600 will have the engine wait 10 minutes before unlocking the quest again.&lt;br /&gt;
* Quest lockout: When this parameter is set, the engine will wait the specified amount of seconds before reactivating the quest for ALL players. This means no one can start the same quest during this period, but the ones that had it already active can complete it.&lt;br /&gt;
&lt;br /&gt;
Usually we want quests to be unique to players, so most have a player lockout -1, except the very simple ones. Try always to think if itâ€™s meaningful for that player to redo it. (For example, Harnquist can require iron ore more than once, but won&#039;t need to teach you how to make a sword more than once.)&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Another more complex version of the prerequisites is the: REQUIRE MIN &amp;lt;number&amp;gt;: this tells the engine that there are specific requirements to be fulfilled before the player is able to get the quest. This script indicated it requires a minimum number of quests to be completed in a given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: require min 2 of Quest1, Quest2, Quest3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To match this prerequisite the player can complete Quest1 and Quest3 or 2 and 3, or all 3. The request is minimum 2 in the given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CATEGORY MIN &amp;lt;number&amp;gt;: quests have an attribute called &amp;quot;category&amp;quot;, we use it to identify the difficulty of quests, but can be used of any other purpose, for example one can say that a group of quests is &amp;quot;Evil&amp;quot; or &amp;quot;Laanx related&amp;quot; or &amp;quot; Newbie&amp;quot;. Just one category is allowed per quest. This prerequisite allows you to specify the category and the minimum number of quests completed in that category.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A sample of the coding used to set prerequisites for a quest (All on one line):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Prerequisites&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;and&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest One&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Two&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Three&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;assigned quest=&amp;quot;Test Quest Four&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Delivery for Aono Riskas&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Gorbiak Disease&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;/and&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This sample requires that the player have completed Test Quests 1 through 3, have Test Quest 4 assigned (not completed) and have NOT completed Fancy Dancing and High-Class Aspirations. To get these arranged correctly can take some practice if one is not familiar with working with booleans, so it is best to include a plain-English comments of what you wish your pre-requisites to be in addition to the one with the &amp;quot;pre&amp;quot; coding statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Checks if the player has a certain item equipped . To be documented better&lt;br /&gt;
&lt;br /&gt;
else if (!strncasecmp(block,&amp;quot;equipped&amp;quot;,8))&lt;br /&gt;
&lt;br /&gt;
=== More Prerequisites ===&lt;br /&gt;
&amp;quot;time of day&amp;quot; // require time of day starthh-endhh (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require not race Klyros. Require race Kran.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require gender female.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;possessed&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require possessed item Ruby Crystal.&lt;br /&gt;
&lt;br /&gt;
Example: Require Possessed amount 3 200-300 item Steel Falchion.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;skill&amp;quot; //Require skill &amp;lt;buffed&amp;gt; name &amp;lt;skillmin&amp;gt;-&amp;lt;skillmax&amp;gt;. (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;variable&amp;quot; //Require variable name. (working)&lt;br /&gt;
&lt;br /&gt;
=== Untested Prerequisites ===&lt;br /&gt;
Please contact engine in case you want to use any of these prerequisites, because those are untested.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;trait&amp;quot; //require trait name in place&lt;br /&gt;
&lt;br /&gt;
&amp;quot;guild&amp;quot;  //NOTE: the both argument is implicitly defined&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Notes on Creating Quest Files (Rules and Header Information) =&lt;br /&gt;
&lt;br /&gt;
* The quest documents you submit should always be in notepad format: this is to avoid special characters added by Word or other text editors, most notably &amp;quot;smart quotes&amp;quot; which will appear as squares in game. Notepad++ is recommended, HIGHLY recommended.&lt;br /&gt;
* Use only ANSI encoding.&lt;br /&gt;
* The file name when saving the quest should begin with &#039;Quest&#039; , then have the name of the quest. For example: Quest Hinoserri Cannot See.txt&lt;br /&gt;
* Titles of quests should follow some scheme of capitalization. There are many sets of rules, but a quick and easy format is to capitalize the first word and then all other words, except a, an, the, at, by, for, in, of, on, to, up, and, as, but, it, or, and nor.&lt;br /&gt;
* Each quest script begins with the title and a one or two sentence description; this is what the player reads so keep that in mind. The proper way to do this is to &amp;quot;comment out&amp;quot; your description and quest title, this is done by beginning a line with the number sign or pound symbol (#). Also, any quest item created for your quest should have a description written into the quest. Notes on quest items should also be commented out. Lastly, there should also be a &amp;quot;Quest Category&amp;quot; line that must be commented out as well. Approved quest categories are: Alchemy, Black Flame, Chain (don&#039;t use this one unless told), Cooking, Death Realm, Easy, Gugrontid, Magic Ways, Medium, Metal Working, Newbie, Repeatable. This is a work in progress, so if you have any questions ask an associate dev or developer. No quest can have more than one category - pick one and ONLY one. New quest categories must be approved by the associate devs/devs before use.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25752</id>
		<title>Quest scripts syntax</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25752"/>
		<updated>2026-04-21T20:25:39Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* More Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Structure of a quest script =&lt;br /&gt;
Quests are written out in chunks called steps. Each step covering the requirements of the previous one.&lt;br /&gt;
&lt;br /&gt;
= Things to know before you start =&lt;br /&gt;
Quest scripts should written ideally in a text editor and now in MS Word or similar so that no illegal characters make it into the quest dialog which would result in errors when viewed in game.&lt;br /&gt;
&lt;br /&gt;
Quotes are usually the ones which break the scripts and :&lt;br /&gt;
&lt;br /&gt;
• Only &#039; &amp;quot; should be used&lt;br /&gt;
&lt;br /&gt;
• ‘ ’ ” “ … These should not be present in the text at all.&lt;br /&gt;
&lt;br /&gt;
Any line of text in the script which begins with a ‘#’ character is ignored by the server and only acts as a comment by the author so that they can leave explanations as to what is happening, or, give information about the step number.&lt;br /&gt;
&lt;br /&gt;
The start of a ‘step’ is defined by a series of three dots ‘...’ Everything after this text up until the next ‘...’ is included in the step. The only unique case is the first step, this does not need ‘...’ and includes all the text before the first ‘...’&lt;br /&gt;
&lt;br /&gt;
== Important rules concerning steps ==&lt;br /&gt;
&lt;br /&gt;
* Every step in the quest should be explicitly completed or locked correctly. Example: &amp;quot;Complete Quest Name Step #&amp;quot; before the Quest is completed.&lt;br /&gt;
* A step can require the completion of another step by the command: &amp;quot;Requires completion of Quest Name Step #&amp;quot;&lt;br /&gt;
* Step 1 does not exist, step 1 is part of the start script (where you use the command &amp;quot;give me a quest&amp;quot;) and cannot be used as a require completion of step number.&lt;br /&gt;
* You may have multiple Require Completes at the beginning of a step.&lt;br /&gt;
* A step may also require another step NOT to have been completed with the command: &amp;quot;Require no completion of Quest Name Step #&amp;quot;.&lt;br /&gt;
* The Quest name must be exact! It is case sensitive. The same goes for NPC names.&lt;br /&gt;
* Each step should be commented like this: &amp;quot;# Step 2 - A description of actions of this step&amp;quot;. # Marks it as a comment not processed by the engine.&lt;br /&gt;
* You can also check for statements with this syntax: &amp;quot;Require &amp;lt;no/not&amp;gt; operator1 | &amp;lt;no/not&amp;gt; operator2 | ...| &amp;lt;no/not&amp;gt; operatorN.&amp;quot; Where operator is a prerequisite (see below the prerequisite chapter), from completion of to time of day etc. The | represents the OR. &#039;&#039;Example: &amp;quot;Require completion of Questname Step 3 | completion of Questname Step 7.&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s see an example before beginning the explanation. The following example is made of two steps. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 1&#039;&#039;&#039;&lt;br /&gt;
 P: Short Trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Do you have any work for me to do?&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes I do. Just breathe one time.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 P: Ok, I did it!&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Great, your quest is completed.&lt;br /&gt;
&lt;br /&gt;
== Syntax Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
To create a comment line you must start the line with a &amp;quot;#&amp;quot;. These lines are not evaluated by the engine as things that need to be done. These comment lines show what is going on and what are the intentions of the quest writer. This is important because more than one person are often working on a quest script, or eventually for laterbug fixing it will be easier to find the exact problem without reading the entire quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each step in a quest should be started by a comment like this &amp;quot;#Step 2 - Description of step.&amp;quot;. You can use comments to more that just noting the step number. Any where within the script you can add comments to help your fellow scripters understand the code. We will use comments to explain things within the scripts here.&lt;br /&gt;
&lt;br /&gt;
=== Trigger and Menu ===&lt;br /&gt;
The trigger is for the engine, while the menu is what shows up in the player quest menu. The trigger is defined by a &amp;quot;P:&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
P: use to be what the player typed to trigger the step, but with the menu system are now used as a description of what step the player is choosing, for example P:yeshelp. (slide 3). The only time you must use exact text is when a player types the answer to a question you pose them&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because you are talking to the engine it must be exact a colon after the &amp;quot;P:&amp;quot; and a period at the end of the sentence. This is also true of the Menu in every case in which the player (P) says something to the NPC in question &amp;quot;P: Short Trigger.&amp;quot; comes first, then below comes the &amp;quot;Menu:&amp;quot; line, with exactly the same requirements.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Menu&amp;quot;: Text is what the player sees when they look at the quest menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please remember that the engine does not think, it reacts to the written cues, so the syntax MUST be exact. The first player statement gives the engine the quest name. The Menu allows the player to ask for the quest from the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having the two &amp;quot;P:&amp;quot; and two &amp;quot;Menu:&amp;quot; on the same line informs the engine that the player has two different options. It is standard that the &amp;quot;P:&amp;quot; line is above the &amp;quot;Menu:&amp;quot; line and the &amp;quot;No.&amp;quot; answer comes first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These lines trigger the NPC response. In more elaborate quests the &amp;quot;Menu:&amp;quot; line may have variations on the No. or Yes. response. However remember KISS (Keep It Simple Stupid) is generally a good thing to keep in mind when you are beginning. You can have many options, but remember each &amp;quot;P:&amp;quot; must have a matching &amp;quot;Menu:&amp;quot; and they must be put in the same order&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to include a free textfield, you will have to include a quotation mark after the menu. The &amp;lt;?&amp;gt; has to be followed by &amp;lt;=&amp;gt; and a text. This will produce a printout of the text and the user will be able to enter a free text. E.g. &amp;quot;Menu: ?=What shall Jardet do?&amp;quot; This will result in the text &amp;quot;What shall Jardet do?&amp;quot; being printed, followed by free form input.&lt;br /&gt;
&lt;br /&gt;
 P: *. P: rock pick.&lt;br /&gt;
 Menu: ?=Please tell me your answer.&lt;br /&gt;
 Smith: No, you didn&#039;t get the right answer.&lt;br /&gt;
 Smith: Yes, it&#039;s a rock pick!.&lt;br /&gt;
&lt;br /&gt;
 P: Nothirstyinterst. P: Yesthirstyintrest.&lt;br /&gt;
 Menu: No, sounds like work. Menu: Sure, I can get it for you.&lt;br /&gt;
 Serana Tuvi: Alright. I will see you around then, stranger.&lt;br /&gt;
 Serana Tuvi: Ah, good good. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember the : after the P and Menu are important, as is the . at the end of the line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For triggers used to start quests, never use NPC names into it, because this will confuse the engine, and the trigger will not be recognized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every P: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every Menu: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every NPC: used in one step must be on different lines.&lt;br /&gt;
&lt;br /&gt;
=== NPC Response ===&lt;br /&gt;
Aono Rikas: here you can add a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The line above is interpreted as an answer from the NPC and the engine will extract the name before the colon (:) + space as the NPC involved in this step of the quest. From now on, we will call this a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full name of the NPC is required, just the first name will not work. If it is only one name e.g Harnquist use that, and if your NPC somehow ends up with three names use all of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first step of a quest the NPC statement will end in a question mark and is triggered by the first 2 lines. Responses are linked to each of the Triggers and Menus. So if you have two triggers you need two menu options and two NPC responses. All arranged in the same order.&lt;br /&gt;
&lt;br /&gt;
=== Dialogues ===&lt;br /&gt;
The dialogues are the most important part of the quest for a player to get immersed. So let us talk about how to make the dialogue.&lt;br /&gt;
&lt;br /&gt;
* Every punctuation, exclamation mark and question mark will create a short pause in the dialogue and create a new line.&lt;br /&gt;
* To create actions all you have to do is to use square brackets within the dialogue like this &amp;quot;Blablabla [NPC Name picks his nose] Bla bla blabla&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may use also these commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playerrace can be used in an impersonal and a personal manner in terms of context, consider its usage carefully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$sir which gives you &amp;quot;Sir&amp;quot; or &amp;quot;Madam&amp;quot; or &amp;quot;Gemma&amp;quot; depending on the gender of the player&#039;s character. Again, this can be used to positive and negative effect. Be mindful of the NPCâ€™s tone. (Gemma is the honorific for Kran.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playername clearly not to be used in newbie quests, have NPC establish rapport use this in second quest or even the third time a player works with a given NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Give me a quest..&lt;br /&gt;
&lt;br /&gt;
= A sample quest script =&lt;br /&gt;
&lt;br /&gt;
== The first step ==&lt;br /&gt;
As previously mentioned Step 1 does not exist, it is just the start of the quest, and can not be required by subsequent steps. The Start of the Quest will look something like the example at the beginning (Structure 1).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same example can also be scripted like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 2&#039;&#039;&#039;&lt;br /&gt;
 P: Short trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Initial question, give me a quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes, I do have a quest for you. I need you to give Item of Importance to NPC2 Name.&lt;br /&gt;
 &lt;br /&gt;
 P: Yes P: No.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Yes, I will do that. Menu: No way stupid.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is Yes.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Item of Importance.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is No.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Structure 2 the answers &amp;quot;No&amp;quot; and &amp;quot;Yes&amp;quot; are inverted, like the two &amp;quot;Menu:&amp;quot; commands, so it will give the same result as Structure 1. (Answer No: nothing happens. Answer Yes: the player will get 1Item of Importance and the Quest.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us use a more detailed example. We will make a very simple quest: Aono wants to deliver a bottle of milk to Orchibaly. The player can choose the quest from Aono&#039;s quest menu. Orchibaly will then give the player 2 pies and a receipt to give back to Aono. The first step will be the step that assigns the quest. The P: tells the engine that this line represents something the player will say to the NPC, but what you must pay extra attention to is the &amp;quot;Menu:&amp;quot; This will be what the player will see as an option in the quest menu. If there are several options you will have to create one &amp;quot;P:&amp;quot; and a &amp;quot;Menu:&amp;quot; for each of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here we firstly gives the player the option to ask for the quest. Then Aono describes the nature of the quest and the player can choose yes or no. Right after the &amp;quot;Menu:&amp;quot; line the NPC responsewill be put. In this example Aono will reply: &amp;quot;Well, I will get someone else to do it for me.&amp;quot; if the player says no or &amp;quot;That&#039;s great. Here is the milk. Be sure not to spill it. TellOrchibaly I sent you.&amp;quot;, give the player 1 Milk Bottle and assign the quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Assign Quest&#039;&#039;&#039;&lt;br /&gt;
 # Quest: Delivery for Aono Rikas&lt;br /&gt;
 &lt;br /&gt;
 # Quest Description: Sample Quest.&lt;br /&gt;
 &lt;br /&gt;
 # The rest of the header will not be covered here.&lt;br /&gt;
 &lt;br /&gt;
 # Step 1 Aono Rikas in Hydlaa needs someone to deliver milk to Orchibally Gurpleferd in Ojaveda.&lt;br /&gt;
 &lt;br /&gt;
 P: Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Are there any jobs you need done?&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well, yes. I need some milk delivered to Orchibaly in Ojaveda. Can you do this for me?&lt;br /&gt;
 &lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Menu: No. Menu: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well I will get someone else to do it for me.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: That&#039;s great. Here is the milk. Be sure not to spill it. Tell Orchibaly I sent you.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quest can be automatically assigned or there can be a step at the beginning of the quest to ask the player if he accepts it.&lt;br /&gt;
&lt;br /&gt;
If you want to assign it automatically use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
If you want to ask the player use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here, with the question if you want to help.&lt;br /&gt;
  P: nohelp. P: yeshelp.&lt;br /&gt;
  Menu: I don&#039;t want to. Menu: Yes I will help.&lt;br /&gt;
  NPC: Fine... Go away.&lt;br /&gt;
  NPC: Good great.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The “Assign quest.” command will only trigger after the second NPC: dialogue line is triggered, nothing happens if the first is triggered.&lt;br /&gt;
&lt;br /&gt;
== The next step ==&lt;br /&gt;
To separate the step we use &amp;quot;...&amp;quot; and then a comment on what step it is and what the step is about. If you don&#039;t want this step to be repeatable you will also have to add &amp;quot;NoRepeat&amp;quot; after the &amp;quot;...&amp;quot;. The second step does not need a completion of Step 1, because Step 1 does not exist so to speak. The structure will be more or less the same as for the initial step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us continue our Delivery for Aono Quest. We have assigned the quest and the player has been given 1 Milk Bottle to give to Orchibaly. Now the player must give that milk to Orchibaly. Either by using the give GUI or by using the quest menu. The first thing we have to do here is to set up the give trigger. If the player gives Orchibaly the milk, he will answer &amp;quot;Oh, yes the milk. Please give it to me. Now i need you to deliver these two pies and this receipt back toAono.&amp;quot;, Give the player 2 pies and a Receipt from Orchibaly. The step is then completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example although the player is given two pies no &amp;quot;s&amp;quot; is added to the line. This is important, especially because most writers tend to add a plural automatically to plural items. Remember the engine does not. An item is designated in the singular, the engine always interprets it in the singular regardless of the number included. The numbers are again not spelt out and Arabic numerals used. Remember that each &amp;quot;Player gives&amp;quot;-command must have menu option in the next line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Step 2&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this bottle of milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Thanks, please give it to me. Now deliver two pies and a receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Completing a step&lt;br /&gt;
 &lt;br /&gt;
 At the end of a step remember to insert the line:&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;Complete Delivery for Aono Rikas Step 2.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the use of Capitals, the use of the quest name, the use of the appropriate numeral and the period at the end of the sentence. The line marks the step as complete and allows the player and the quest to move forward.&lt;br /&gt;
&lt;br /&gt;
== Last step ==&lt;br /&gt;
To make sure the player has completed the previous step we start with &amp;quot;Require completion of delivery for Aono step 2.&amp;quot;. Then we move on to the trigger which is the player giving 2 pies and the receipt to Aono. Aono answers &amp;quot;Ah, pie. Thank you. Please accept this for your time.&amp;quot;, gives the player a pie and 100Tria. The step is closed and so is the quest with &amp;quot;Complete Delivery for Aono Rikas.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last Step&#039;&#039;&#039;&lt;br /&gt;
 ...NoRepeat.&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of delivery for Aono step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here are your pies and your receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you use multiple options in the last step of a quest you have to explicitly complete the quest with a command for the first option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last step with multiple options&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest doesn&#039;t complete automatically so make sure you have added a complete line for this response.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2. Complete Harnquist Needs Gold.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest completes automatically because it is the last line in quest so no complete line is required.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you omit the Complete Step and Complete Quest line, the quest will not end properly when choosing &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Branches of a quest (Non exclusive) ==&lt;br /&gt;
Some times you want to have several different outcomes for a quest. Let us use the Delivery quest once again. If the first NPC says that you must NOT give the milk to some one else... specially NPC3. Then you should also add the option for the player to actually give the milk to NPC3 . This will complicate your script a bit, but is not as hard as it might seem. Most of the job is done by placing the right &amp;quot;Require completion of&amp;quot; and &amp;quot;Require no completion of&amp;quot; commands.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us take a look at that Delivery Quest again. Now we want to add an option for the player to give the milk to Reffitia instead. Reffitia will shake the milk until it becomes butter and this will make Orchibaly angry and demand a new bottle of milk. To do that we will have to add a few more steps and we will start from step 2 as step 1 will be the same as above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Third step will be our previous Step 2. And the last step will be the same. Though Aono should mention something like: &amp;quot;Make sure you don&#039;t give that milk toReffitia.&amp;quot; in Step 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: This is a non exclusive branching, meaning that the first branch is available also when executing the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: We will not add an additional step for the player to get milk again from Aono, but the player have to figure out another way to get hold of it (Buy from an NPC).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Branching&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Alternative is to give the milk to refittia&lt;br /&gt;
 &lt;br /&gt;
 Player gives 1 Milk Bottle to Reffitia&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here Reffitia, take this milk.&lt;br /&gt;
 &lt;br /&gt;
 Reffitia Thamal: Ah! Orchibaly&#039;s milk. Here, now you can give the bottle to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy.&lt;br /&gt;
 # The player then have to find another way of getting a bottle of milk (buy from NPC?)&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 5 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Alternative outcome ==&lt;br /&gt;
If we wanted the quest to have a different outcome if the player gives the milk to Reffitia than to Orchibaly we would need to get creative with the require commands. Let us say that if the player gives butter to Orchibaly he will give &amp;quot;bad pies&amp;quot; so when Aono receives them and takes a taste he will be very angry and no reward is given. To do this we will have to add just one more step. Let us start with step 3. Here we will have to change only the NPC response a bit to something like &amp;quot;Milk? This is butter. Have you been shaking the bottle all the way over here? This is completely useless to me, butter I have more than enough of. Any way someMenki came with another bottle just before you. Here takes these pies to Aono . Oh, and don&#039;t forget this receipt.&amp;quot;. Step 4 will be the step where the player gives the bad pies to Aono, this step will complete the quest. Step 5 and 6 are the outcome if the player gives the milk directly toOrchibaly. Notice that Step 5 require a NO completion of Step 4. This is actually not necessary for this script, because the previous the other branch of the quest, ending in step 4 closes the quest it self.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Alternative Outcome&#039;&#039;&#039;&lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy. And receives 2 pies and a receipt&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the &amp;quot;bad&amp;quot; pies and the receipt to Aono. Receives gunk as reward and Quest is completed.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 3&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 2 Pie, 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. [Aono takes a bite at the pie] You have tricked me!&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Gunk.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 # Step 5 - Player gives the milk directly to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Require no completion of Delivery for Aono Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 5.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 6 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Quest Timeout (Passing of time) ==&lt;br /&gt;
If you want to allow a certain part of the quest to wait a certain amount of time before it can be a executed, you can use this script:&amp;lt;blockquote&amp;gt;Run script give_quest_timeout &amp;lt;&amp;lt;&#039;Time until Harnquist is ready&#039;,6&amp;gt;&amp;gt;&amp;lt;/blockquote&amp;gt;this will create a temporary active magic with name &#039;Time until Harnquist is ready&#039; which will last for 6 minutes. &lt;br /&gt;
&lt;br /&gt;
Then in the prerequisite of the step have this:&amp;lt;blockquote&amp;gt;# Step 12.&lt;br /&gt;
&lt;br /&gt;
Require active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: swordnotready.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready yet?&lt;br /&gt;
&lt;br /&gt;
Harnquist: No, not yet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
# Step 13.&lt;br /&gt;
&lt;br /&gt;
Require no active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: about Vresa sword.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready?&lt;br /&gt;
&lt;br /&gt;
Harnquist: Yes, Vresa&#039;s sword is done. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Important commands and expressions used =&lt;br /&gt;
&lt;br /&gt;
== Assign Quest. ==&lt;br /&gt;
This line tells the engine to assign the quest to the player and generally results in the &amp;quot;YOU GOT A QUEST&amp;quot;. and placing the quest in the player&#039;s quest log, under &amp;quot;uncompleted&amp;quot;. Again remember to be exact here, Capitalize the two words and put a &amp;quot;.&amp;quot; at the end. It cannot be emphasized enough that the engine only interprets what it sees and the way it sees it. If you are not precise the quest will NOT happen or in the cases of the next steps move forward.&lt;br /&gt;
&lt;br /&gt;
== ... ==&lt;br /&gt;
The three dots mark the beginning of a new step. Better, the three dots create a new step. So you need a &amp;quot;three dots&amp;quot; line before every &amp;quot;Complete Quest Name Step #&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== NoRepeat. ==&lt;br /&gt;
This line means that the quest step cannot be done over and over. Note that there are three periods &amp;quot;...&amp;quot; a space and &#039;NoRepeat.&#039; is one word not two. Each part of this sentence is required in exactly this form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically &amp;quot;...&amp;quot; tells the engine that some time can pass before the next lines are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NoRepeat allows this quest step to be only done one time. This also applies to actions as seen in later steps. (in reality NoRepeat is a synonym for Require no completion of &amp;quot;this step&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require completion of Quest Name Step #. ==&lt;br /&gt;
This command is like a closed door. To open it and enter in the current step the player needs to complete the step number #. You can also refer to a future step (for example, you&#039;re on step 4 and add &amp;quot;Require completion of Quest Name Step 8.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require no completion of Quest Name Step #. ==&lt;br /&gt;
This command is like an open door. The player is free to continue the quest and entering the current step, UNLESS he completed the step number #. Completing the step number # will close the door. Forever! You can also refer to a future step.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name Step #. ==&lt;br /&gt;
This command completes a step, # being the step number. You can complete one step in another one. But remember to insert one &amp;quot;...&amp;quot; line for every &amp;quot;Complete Quest Name Step #.&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name. ==&lt;br /&gt;
This command will end the quest. After this the quest will be deleted from the uncompleted quest list and appear in the Completed quest list.&lt;br /&gt;
&lt;br /&gt;
== P: ==&lt;br /&gt;
The trigger is actually a ghost from the previous scripting system, but it is still needed (for now). Before the player had to type the exact trigger stated after the &amp;quot;P:&amp;quot;. Now they click the option from &amp;quot;Menu:&amp;quot;. Triggers must be four words or less. Triggers must end with a period, no other punctuation is allowed (question marks especially are known to break aquest on the server).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want multiple phrases to activate the same trigger, you can just separate the phrases by a period; for example: &amp;quot;P: about guards. about hydlaa guards. about hydlaa militia.&amp;quot; In this case the NPC&#039;s response will be fired on any of the three options. This technique can be used also when you have multiple choices: &amp;quot;P: one. two. P: more.&amp;quot;. Both &#039;one&#039; and &#039;two&#039; will trigger the first response, while &#039;more&#039; will trigger the second.&lt;br /&gt;
&lt;br /&gt;
WARNING: Triggers cannot contain any of the following words: a, am, an, and, any, anything, are, do, I, is, isnâ€™t, please, that, the, this, to, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They also may not contain the name of the NPC you&#039;re talking to as that&#039;ll be stripped.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These words just take up space in a trigger as they are dropped by the engine when evaluating player response. To make the best use of your word counts ignore them when writing your triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: If you wanted the player to say &#039;please help Levrus&#039; the trigger would become &#039;help levrus&#039; as please would be an ignored word.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WARNING: If a player needs to write &amp;quot;NPC needs this&amp;quot; syntax it as &amp;quot;NPC wants this&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Menu: ==&lt;br /&gt;
That&#039;s easy. After this command you can add the sentence said by the player in game. This sentence will appear on the screen and could be selected when one talks to the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that for every menu line you need to create a response from the NPC.&lt;br /&gt;
&lt;br /&gt;
== Give ==&lt;br /&gt;
Give is a very useful command. It tells the engine to give the player items. Be it rewards or special items needed for the quest. When you reward a player, you can basically give items and/or experience. The syntax to award 1500 experience points would be: &amp;quot;Give 1500 Exp.&amp;quot; Note that &amp;quot;Exp&amp;quot; is case-sensitive. You can also reward items AND experience, using this syntax: &amp;quot;Give Leather Gloves. Give 1500 Exp.&amp;quot; Remember that you can only have two give commands on the same line, but you can have multiple lines, Remember to keep a clean style, it is prefered to only have one item per line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give more than two items&#039;&#039;&#039;&lt;br /&gt;
 Give 1 Leather Gloves.&lt;br /&gt;
 Give 1500 Exp.&lt;br /&gt;
 Give 1 Apple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also add a number if you need to give more than one item (like you do for experience) example: &amp;quot;Give 5 Iron Ingot.&amp;quot; It is not necessary in the case of one item to include the numeral, however it is good practice to do so as numerals tell the engine how many and should be written as a numeral, a word will NOT work as the engine cannot interpret it as such. Remember that all special items must be declared in the script header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another option you have is to give one item OR another. The following will pop up a window in which the player has to choose just one item:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give the player a choice between items&#039;&#039;&#039;&lt;br /&gt;
 Give Cold or Arrow or Energy.&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; At this time, don&#039;t use the following in an OR option: Tria, hexa, octa, circles, or items without a graphic. Also, for now, do NOT put quantities in front of items that are given using the &amp;quot;OR&amp;quot; parameter. An example of what NOT to do: &amp;quot;Give 1 Cold or 1 Arrow or 1 Energy.&amp;quot; This will lock the server right up. An example of what SHOULD be done: &amp;quot;Give Cold or Arrow or Energy.&amp;quot; (Check this statement if it is correct. --Katu)&lt;br /&gt;
&lt;br /&gt;
== Player gives NPC Name 1 Item ==&lt;br /&gt;
This can be used as a trigger (instead of the &amp;quot;P:&amp;quot;). It tells the engine to trigger the NPC dialogue when one or any fixed amount of a special item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a player have to give multiple items just add them to the original line using a comma:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Player gives item&#039;&#039;&#039;&lt;br /&gt;
 Player gives Harnquist Water Pouch, 1 Pie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Item name rules must be followed at all times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that the item name is &amp;quot;Iron Ingot&amp;quot;, so &amp;quot;Iron Ingots&amp;quot; will not work, even if itâ€™s the correct plural form. Keep all names singular.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, do not use a number (3, 14, etc) in the name of an item. An item called 3 Circles Receipt will probably generate problems when we script &amp;quot;Give 3 Circles Receipt.&amp;quot; It is better named &amp;quot;Three Circles Receipt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Numbers should be spelled out everywhere unless you are referring to the quantity given or dealing with a trigger (give me 5 apples. give me five apples.) as both would be correct in a trigger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Character limit for an item name is 60 characters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do not use an s&#039; in an item name, like &amp;quot;Levrus&#039; Left Shoe,&amp;quot; use &amp;quot;Left Shoe of Levrus&amp;quot; or a similar substitute instead.&lt;br /&gt;
&lt;br /&gt;
== Set variable Require variable ==&lt;br /&gt;
You can set a variable to be later used by the quest or other quests. Variables are set on the character and visible from all quests.&lt;br /&gt;
 Smith: Here is your winch access&lt;br /&gt;
 Setvariable Quest_Winch_Access 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can then require a variable to be set as prerequisite of a quest step.&lt;br /&gt;
 Require variable Quest_Winch_Access.&lt;br /&gt;
 P: access.&lt;br /&gt;
 Menu: I have access&lt;br /&gt;
 Bobaus: Ok, good.&lt;br /&gt;
&lt;br /&gt;
== Require Compendium ==&lt;br /&gt;
You can require the player to have a certain knowledge in the Compendium.&lt;br /&gt;
 Require compendium creature StoneHammer&lt;br /&gt;
 P: comps&lt;br /&gt;
 Menu: I know everything about the StoneHammers!&lt;br /&gt;
 Fighter3: WOW&lt;br /&gt;
 ...&lt;br /&gt;
 Require no compendium creature StoneHammer&lt;br /&gt;
 P: nocomps&lt;br /&gt;
 Menu: Sorry I dont know anything about StoneHammers!&lt;br /&gt;
 Fighter3: Ah, study more!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The syntax is: compendium &amp;lt;creature/plant/mineral&amp;gt; &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rewards at the end of the quest ==&lt;br /&gt;
When completing a quest, the player usually gets experience and money, or some items. In particular for experience and money you should use the following scripts. This allows us to split the rewards on a scale from 1 to 10 and then to tweak the actual values in the engine. The values in brackets indicate the complexity of the quest. The more complex the more rewards the player will get.&lt;br /&gt;
&lt;br /&gt;
 Run script give_quest_money &amp;lt;&amp;lt;3&amp;gt;&amp;gt;.&lt;br /&gt;
 Run script give_quest_exp &amp;lt;&amp;lt;2&amp;gt;&amp;gt;.&lt;br /&gt;
You can also award faction points by using &amp;quot;give_quest_faction&amp;quot; , the number given is multiplied by 5 so if you want +5 point, you need 1 on the second parameter:&lt;br /&gt;
 Run script give_quest_faction &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 1&amp;gt;&amp;gt;. &lt;br /&gt;
We have script also to push the faction point up to a given value, if you are already higher, this script will do nothing.&lt;br /&gt;
 Run script give_quest_faction_level &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
value = 1-&amp;gt; max faction points = 10;&lt;br /&gt;
&lt;br /&gt;
value = 2-&amp;gt; max faction points = 20;&lt;br /&gt;
&lt;br /&gt;
value = 3-&amp;gt; max faction points = 35; &lt;br /&gt;
&lt;br /&gt;
value = 4-&amp;gt; max faction points = 55; &lt;br /&gt;
&lt;br /&gt;
value = 5-&amp;gt; max faction points = 75; &lt;br /&gt;
&lt;br /&gt;
value = 6-&amp;gt; max faction points = 100; &lt;br /&gt;
&lt;br /&gt;
value = 7-&amp;gt; max faction points = 125; &lt;br /&gt;
&lt;br /&gt;
value = 8-&amp;gt; max faction points = 150; &lt;br /&gt;
&lt;br /&gt;
value = 9-&amp;gt; max faction points = 200;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to assign a faction title you can use this script. In the example it will assign the second title.&lt;br /&gt;
 Run script give_quest_faction_title &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
=== The header ===&lt;br /&gt;
The header should contain a lot of information. All the information is commented out by a &amp;quot;#&amp;quot;. The example below is from one of the mount quests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First section is information about the quest itself. Name of the quest, a short description and category. Categories will be discussed in detail later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next sections are for unique items used in the quest, name of the item followed by the description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third section is for recording versions of the script and all naming authors. Also who last edited the quest should be noted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The last section is for additional metadata which will be added to the quest in the database (not part of the db) and will be used by the engine to determine lockouts and prerequisites. Here it locks all players from doing the quest again and locks all other players to take the quest with 60 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lastly we tell the engine that the player have to complete the Ring of Familiar quest before this one. Note that these comments aren&#039;t taken by the engine; it&#039;s the duty of who loads the quest to fill the correct entries with the data found in the header: so it&#039;s just a way to keep all data together on the script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Header&#039;&#039;&#039;&lt;br /&gt;
 # Quest name: Drifting for a Drifter&lt;br /&gt;
 # Quest Description: Taemian wants to sell you a mount&lt;br /&gt;
 # Quest Category: General&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest Items: Item name/Item description&lt;br /&gt;
 # Taemian&#039;s Pouch: - Pouch with all sorts of coins&lt;br /&gt;
 # Green Gem of the Drifter - A magical gem with a green glow&lt;br /&gt;
 # Unsigned Drifter Permit - A permit that still needs to be signed by Datal&lt;br /&gt;
 # Signed Drifter Permit - A permit that has been signed by Datal&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest specific variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Author(s): Ravna, Katu, weltall&lt;br /&gt;
 # Current Version: 1.01&lt;br /&gt;
 # Player lockout: -1&lt;br /&gt;
 # Quest lockout: 60&lt;br /&gt;
 # Prerequisites: &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;completed quest=&amp;quot;Ring of Familiar&amp;quot;/&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 # Variables used: Quest_Variable_Name used to do.....&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Version history and change log&lt;br /&gt;
 # Last edited by: weltall&lt;br /&gt;
 # Version 1.00: Initial draft - 05/01/2010 - Katu.&lt;br /&gt;
 # Version 1.01: Added extra steps - 1/22/2011 - Venalan.&lt;br /&gt;
 # ----------------------&lt;br /&gt;
&lt;br /&gt;
==== Quest Lockouts ====&lt;br /&gt;
Each quest has two different lockout types:&lt;br /&gt;
&lt;br /&gt;
* Player lockout: When this parameter is set, the engine will wait the specified amount of seconds before allowing the same player to redo the same quest. If you want a quest to be available to each player only one time, then set the lockout to -1. Setting it to 600 will have the engine wait 10 minutes before unlocking the quest again.&lt;br /&gt;
* Quest lockout: When this parameter is set, the engine will wait the specified amount of seconds before reactivating the quest for ALL players. This means no one can start the same quest during this period, but the ones that had it already active can complete it.&lt;br /&gt;
&lt;br /&gt;
Usually we want quests to be unique to players, so most have a player lockout -1, except the very simple ones. Try always to think if itâ€™s meaningful for that player to redo it. (For example, Harnquist can require iron ore more than once, but won&#039;t need to teach you how to make a sword more than once.)&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Another more complex version of the prerequisites is the: REQUIRE MIN &amp;lt;number&amp;gt;: this tells the engine that there are specific requirements to be fulfilled before the player is able to get the quest. This script indicated it requires a minimum number of quests to be completed in a given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: require min 2 of Quest1, Quest2, Quest3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To match this prerequisite the player can complete Quest1 and Quest3 or 2 and 3, or all 3. The request is minimum 2 in the given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CATEGORY MIN &amp;lt;number&amp;gt;: quests have an attribute called &amp;quot;category&amp;quot;, we use it to identify the difficulty of quests, but can be used of any other purpose, for example one can say that a group of quests is &amp;quot;Evil&amp;quot; or &amp;quot;Laanx related&amp;quot; or &amp;quot; Newbie&amp;quot;. Just one category is allowed per quest. This prerequisite allows you to specify the category and the minimum number of quests completed in that category.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A sample of the coding used to set prerequisites for a quest (All on one line):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Prerequisites&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;and&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest One&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Two&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Three&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;assigned quest=&amp;quot;Test Quest Four&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Delivery for Aono Riskas&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Gorbiak Disease&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;/and&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This sample requires that the player have completed Test Quests 1 through 3, have Test Quest 4 assigned (not completed) and have NOT completed Fancy Dancing and High-Class Aspirations. To get these arranged correctly can take some practice if one is not familiar with working with booleans, so it is best to include a plain-English comments of what you wish your pre-requisites to be in addition to the one with the &amp;quot;pre&amp;quot; coding statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Checks if the player has a certain item equipped . To be documented better&lt;br /&gt;
&lt;br /&gt;
else if (!strncasecmp(block,&amp;quot;equipped&amp;quot;,8))&lt;br /&gt;
&lt;br /&gt;
=== More Prerequisites ===&lt;br /&gt;
&amp;quot;time of day&amp;quot; // require time of day starthh-endhh (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require not race Klyros. Require race Kran.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require gender female.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;possessed&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require possessed item Ruby Crystal.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;skill&amp;quot; //Require skill &amp;lt;buffed&amp;gt; name &amp;lt;skillmin&amp;gt;-&amp;lt;skillmax&amp;gt;. (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;variable&amp;quot; //Require variable name. (working)&lt;br /&gt;
&lt;br /&gt;
=== Untested Prerequisites ===&lt;br /&gt;
Please contact engine in case you want to use any of these prerequisites, because those are untested.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;trait&amp;quot; //require trait name in place&lt;br /&gt;
&lt;br /&gt;
&amp;quot;guild&amp;quot;  //NOTE: the both argument is implicitly defined&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Notes on Creating Quest Files (Rules and Header Information) =&lt;br /&gt;
&lt;br /&gt;
* The quest documents you submit should always be in notepad format: this is to avoid special characters added by Word or other text editors, most notably &amp;quot;smart quotes&amp;quot; which will appear as squares in game. Notepad++ is recommended, HIGHLY recommended.&lt;br /&gt;
* Use only ANSI encoding.&lt;br /&gt;
* The file name when saving the quest should begin with &#039;Quest&#039; , then have the name of the quest. For example: Quest Hinoserri Cannot See.txt&lt;br /&gt;
* Titles of quests should follow some scheme of capitalization. There are many sets of rules, but a quick and easy format is to capitalize the first word and then all other words, except a, an, the, at, by, for, in, of, on, to, up, and, as, but, it, or, and nor.&lt;br /&gt;
* Each quest script begins with the title and a one or two sentence description; this is what the player reads so keep that in mind. The proper way to do this is to &amp;quot;comment out&amp;quot; your description and quest title, this is done by beginning a line with the number sign or pound symbol (#). Also, any quest item created for your quest should have a description written into the quest. Notes on quest items should also be commented out. Lastly, there should also be a &amp;quot;Quest Category&amp;quot; line that must be commented out as well. Approved quest categories are: Alchemy, Black Flame, Chain (don&#039;t use this one unless told), Cooking, Death Realm, Easy, Gugrontid, Magic Ways, Medium, Metal Working, Newbie, Repeatable. This is a work in progress, so if you have any questions ask an associate dev or developer. No quest can have more than one category - pick one and ONLY one. New quest categories must be approved by the associate devs/devs before use.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Art&amp;diff=25751</id>
		<title>PSUnreal Art</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Art&amp;diff=25751"/>
		<updated>2026-04-20T21:31:31Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Import Assets into Unreal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Standards and Methods ==&lt;br /&gt;
&lt;br /&gt;
[[Naming Conventions]]&lt;br /&gt;
&lt;br /&gt;
[[Triangle count standards]]&lt;br /&gt;
&lt;br /&gt;
[[Character rigging]] - setting up a character in blender to be used with the standard ue4 skeleton&lt;br /&gt;
&lt;br /&gt;
[[Characters and Creatures sockets]]&lt;br /&gt;
&lt;br /&gt;
[[Character sizes]]&lt;br /&gt;
&lt;br /&gt;
[[Character Animations]]&lt;br /&gt;
&lt;br /&gt;
[[City design workflow]]&lt;br /&gt;
&lt;br /&gt;
[[Skybox and Lights setup]]&lt;br /&gt;
&lt;br /&gt;
[[Unreal Materials and Textures]]&lt;br /&gt;
&lt;br /&gt;
[[Optimization with Lightmaps, LOD, and Collisions]]&lt;br /&gt;
&lt;br /&gt;
[[PSUnreal Foliage|Foliage]]&lt;br /&gt;
&lt;br /&gt;
[[Maps editing workflow]]&lt;br /&gt;
&lt;br /&gt;
== Import Assets into Unreal ==&lt;br /&gt;
&lt;br /&gt;
[[Import items]]&lt;br /&gt;
&lt;br /&gt;
[[Import Texture with Alpha from GIMP]]&lt;br /&gt;
&lt;br /&gt;
[[Import a level]]&lt;br /&gt;
&lt;br /&gt;
[[Import a char 3DSMAX]]&lt;br /&gt;
&lt;br /&gt;
[[Import Mixamo Animation]]&lt;br /&gt;
&lt;br /&gt;
[[Import a char Blender]]&lt;br /&gt;
&lt;br /&gt;
[[Mirror an animation in Unreal]]&lt;br /&gt;
&lt;br /&gt;
== Export Assets from Unreal ==&lt;br /&gt;
I had an issue where a texture coudn&#039;t be exported from Unreal. It doesn&#039;t have the &amp;quot;Asset Actions -&amp;gt; Export&amp;quot; menu entry at all.&lt;br /&gt;
&lt;br /&gt;
Just copy the reference from unreal in the second line, and change the output line. Run this in Output Log, then select &amp;quot;Python&amp;quot; on the left dropdown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import unreal&lt;br /&gt;
&lt;br /&gt;
texture = unreal.EditorAssetLibrary.load_asset(&#039;/Game/Test/Character/Textures/Hair1.Hair1&#039;)&lt;br /&gt;
&lt;br /&gt;
exporter = unreal.TextureExporterPNG()&lt;br /&gt;
&lt;br /&gt;
task = unreal.AssetExportTask()&lt;br /&gt;
&lt;br /&gt;
task.set_editor_property(&#039;object&#039;, texture)&lt;br /&gt;
&lt;br /&gt;
task.set_editor_property(&#039;exporter&#039;, exporter)&lt;br /&gt;
&lt;br /&gt;
task.set_editor_property(&#039;filename&#039;, &#039;C:/Output/Hair1.png&#039;)&lt;br /&gt;
&lt;br /&gt;
task.set_editor_property(&#039;replace_identical&#039;, True)&lt;br /&gt;
&lt;br /&gt;
task.set_editor_property(&#039;prompt&#039;, False)&lt;br /&gt;
&lt;br /&gt;
task.set_editor_property(&#039;automated&#039;, True)&lt;br /&gt;
&lt;br /&gt;
unreal.Exporter.run_asset_export_task(task)&lt;br /&gt;
&lt;br /&gt;
== How things work in PSUnreal ==&lt;br /&gt;
&lt;br /&gt;
[[Rain]]&lt;br /&gt;
&lt;br /&gt;
== New Capabilities ==&lt;br /&gt;
&lt;br /&gt;
[[Interactable Actors]]&lt;br /&gt;
&lt;br /&gt;
== Gimp Tips ==&lt;br /&gt;
[[GIMP Custom brushes]]&lt;br /&gt;
&lt;br /&gt;
[[Compendium Maps tokens]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25750</id>
		<title>Quest scripts syntax for AI</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25750"/>
		<updated>2026-04-06T16:27:07Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the syntax to create a quest script.&lt;br /&gt;
&lt;br /&gt;
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
The quest script is divided in steps. Each one being separated with this line:&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
&lt;br /&gt;
This line tells the engine to create a new step. Only the first step does not have the ... line&lt;br /&gt;
&lt;br /&gt;
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:&lt;br /&gt;
&lt;br /&gt;
  # Step 2&lt;br /&gt;
&lt;br /&gt;
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.&lt;br /&gt;
&lt;br /&gt;
Requiments are expressed like this, where we substitute &amp;lt;quest name&amp;gt; with the name of the quest:&lt;br /&gt;
&lt;br /&gt;
  Require completion of &amp;lt;quest name&amp;gt; step 2.&lt;br /&gt;
&lt;br /&gt;
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:&lt;br /&gt;
&lt;br /&gt;
  P: 15002.&lt;br /&gt;
&lt;br /&gt;
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:&lt;br /&gt;
&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
&lt;br /&gt;
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:&lt;br /&gt;
&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
Every step must finish with a line that completes the step, example:&lt;br /&gt;
&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
The first step is a different than the others in this way:&lt;br /&gt;
1) it doesn&#039;t have a Require completion of&lt;br /&gt;
2) instead of the &amp;quot;Complete&amp;quot; step line, it has &amp;quot;Assign Quest.&amp;quot; line, which basically stores the quest in the player log as started.&lt;br /&gt;
&lt;br /&gt;
The second step differs just for the fact it doesn&#039;t have a &amp;quot;Require completion of&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
We also use brackets [] to indicate some visual action from the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword.&lt;br /&gt;
&lt;br /&gt;
All lines except comments should always end with a period or a question/exclamation mark. This is how the engine knows that directive is completed.&lt;br /&gt;
&lt;br /&gt;
We also have the possibility to have multiple questions and answers in the same step, this is done usually when the discussion is about the same topic and doesn&#039;t require a separate QuestNote. In this case the structure is P: , then Menu: , then the npc line. The P must be unique so here we append a letter to the end, example 15005a, 15005b, ... But please note the step number will still be 5. So all Require and Complete will refer to 5, not to 5a or 5b.&lt;br /&gt;
&lt;br /&gt;
When we move to another NPC it&#039;s required to have a separate step.&lt;br /&gt;
&lt;br /&gt;
If the dialogue branches and then we need to merge it again in one step later on, we can use the OR operator that&#039;s a pipe |. This example requires step 3 or step 4 to be completed:&lt;br /&gt;
&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
&lt;br /&gt;
A full example follows. In this example there are two parallel possible answers to the NPC question, and also a longer discussion in one last step:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
  P: 15001.&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
  Assign Quest.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 2&lt;br /&gt;
  P: 15002.&lt;br /&gt;
  Menu: Do you need any help?&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword. Are you interested in it?&lt;br /&gt;
  QuestNote Harnquist asked if we want to help forging a new longsword.&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 3&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15003.&lt;br /&gt;
  Menu: Yes, sure I would like help.&lt;br /&gt;
  Harnquist: Great, then please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I agreed to help, and Harnquist asked for 10 iron ore.&lt;br /&gt;
  Complete Searching the blacksmith Step 3.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 4&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15004.&lt;br /&gt;
  Menu: Yes I want to help, but I can do it tomorrow.&lt;br /&gt;
  Harnquist: Ok, come back tomorrow then and please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I had to ask one more day, and Harnquist asked for 10 iron ore to be delivered tomorrow.&lt;br /&gt;
  Complete Searching the blacksmith Step 4.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 5&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
  P: 15005.&lt;br /&gt;
  Menu: I have the ore you requested.&lt;br /&gt;
  Harnquist: Very good!&lt;br /&gt;
  P: 15005a.&lt;br /&gt;
  Menu: Can you evaluate its quality?&lt;br /&gt;
  Harnquist: Sure I can, let me look. [Harnquist puts on a set of glasses to inspect the ore]&lt;br /&gt;
  QuestNote I brought the ore to Harnquist.&lt;br /&gt;
  Complete Searching the blacksmith Step 5.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25749</id>
		<title>Quest scripts syntax</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax&amp;diff=25749"/>
		<updated>2026-04-06T16:23:32Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Untested Prerequisites */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Structure of a quest script =&lt;br /&gt;
Quests are written out in chunks called steps. Each step covering the requirements of the previous one.&lt;br /&gt;
&lt;br /&gt;
= Things to know before you start =&lt;br /&gt;
Quest scripts should written ideally in a text editor and now in MS Word or similar so that no illegal characters make it into the quest dialog which would result in errors when viewed in game.&lt;br /&gt;
&lt;br /&gt;
Quotes are usually the ones which break the scripts and :&lt;br /&gt;
&lt;br /&gt;
• Only &#039; &amp;quot; should be used&lt;br /&gt;
&lt;br /&gt;
• ‘ ’ ” “ … These should not be present in the text at all.&lt;br /&gt;
&lt;br /&gt;
Any line of text in the script which begins with a ‘#’ character is ignored by the server and only acts as a comment by the author so that they can leave explanations as to what is happening, or, give information about the step number.&lt;br /&gt;
&lt;br /&gt;
The start of a ‘step’ is defined by a series of three dots ‘...’ Everything after this text up until the next ‘...’ is included in the step. The only unique case is the first step, this does not need ‘...’ and includes all the text before the first ‘...’&lt;br /&gt;
&lt;br /&gt;
== Important rules concerning steps ==&lt;br /&gt;
&lt;br /&gt;
* Every step in the quest should be explicitly completed or locked correctly. Example: &amp;quot;Complete Quest Name Step #&amp;quot; before the Quest is completed.&lt;br /&gt;
* A step can require the completion of another step by the command: &amp;quot;Requires completion of Quest Name Step #&amp;quot;&lt;br /&gt;
* Step 1 does not exist, step 1 is part of the start script (where you use the command &amp;quot;give me a quest&amp;quot;) and cannot be used as a require completion of step number.&lt;br /&gt;
* You may have multiple Require Completes at the beginning of a step.&lt;br /&gt;
* A step may also require another step NOT to have been completed with the command: &amp;quot;Require no completion of Quest Name Step #&amp;quot;.&lt;br /&gt;
* The Quest name must be exact! It is case sensitive. The same goes for NPC names.&lt;br /&gt;
* Each step should be commented like this: &amp;quot;# Step 2 - A description of actions of this step&amp;quot;. # Marks it as a comment not processed by the engine.&lt;br /&gt;
* You can also check for statements with this syntax: &amp;quot;Require &amp;lt;no/not&amp;gt; operator1 | &amp;lt;no/not&amp;gt; operator2 | ...| &amp;lt;no/not&amp;gt; operatorN.&amp;quot; Where operator is a prerequisite (see below the prerequisite chapter), from completion of to time of day etc. The | represents the OR. &#039;&#039;Example: &amp;quot;Require completion of Questname Step 3 | completion of Questname Step 7.&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s see an example before beginning the explanation. The following example is made of two steps. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 1&#039;&#039;&#039;&lt;br /&gt;
 P: Short Trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Do you have any work for me to do?&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes I do. Just breathe one time.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 &lt;br /&gt;
 P: Ok, I did it!&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Great, your quest is completed.&lt;br /&gt;
&lt;br /&gt;
== Syntax Basics ==&lt;br /&gt;
&lt;br /&gt;
=== Comments ===&lt;br /&gt;
To create a comment line you must start the line with a &amp;quot;#&amp;quot;. These lines are not evaluated by the engine as things that need to be done. These comment lines show what is going on and what are the intentions of the quest writer. This is important because more than one person are often working on a quest script, or eventually for laterbug fixing it will be easier to find the exact problem without reading the entire quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each step in a quest should be started by a comment like this &amp;quot;#Step 2 - Description of step.&amp;quot;. You can use comments to more that just noting the step number. Any where within the script you can add comments to help your fellow scripters understand the code. We will use comments to explain things within the scripts here.&lt;br /&gt;
&lt;br /&gt;
=== Trigger and Menu ===&lt;br /&gt;
The trigger is for the engine, while the menu is what shows up in the player quest menu. The trigger is defined by a &amp;quot;P:&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
P: use to be what the player typed to trigger the step, but with the menu system are now used as a description of what step the player is choosing, for example P:yeshelp. (slide 3). The only time you must use exact text is when a player types the answer to a question you pose them&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because you are talking to the engine it must be exact a colon after the &amp;quot;P:&amp;quot; and a period at the end of the sentence. This is also true of the Menu in every case in which the player (P) says something to the NPC in question &amp;quot;P: Short Trigger.&amp;quot; comes first, then below comes the &amp;quot;Menu:&amp;quot; line, with exactly the same requirements.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Menu&amp;quot;: Text is what the player sees when they look at the quest menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please remember that the engine does not think, it reacts to the written cues, so the syntax MUST be exact. The first player statement gives the engine the quest name. The Menu allows the player to ask for the quest from the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having the two &amp;quot;P:&amp;quot; and two &amp;quot;Menu:&amp;quot; on the same line informs the engine that the player has two different options. It is standard that the &amp;quot;P:&amp;quot; line is above the &amp;quot;Menu:&amp;quot; line and the &amp;quot;No.&amp;quot; answer comes first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These lines trigger the NPC response. In more elaborate quests the &amp;quot;Menu:&amp;quot; line may have variations on the No. or Yes. response. However remember KISS (Keep It Simple Stupid) is generally a good thing to keep in mind when you are beginning. You can have many options, but remember each &amp;quot;P:&amp;quot; must have a matching &amp;quot;Menu:&amp;quot; and they must be put in the same order&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to include a free textfield, you will have to include a quotation mark after the menu. The &amp;lt;?&amp;gt; has to be followed by &amp;lt;=&amp;gt; and a text. This will produce a printout of the text and the user will be able to enter a free text. E.g. &amp;quot;Menu: ?=What shall Jardet do?&amp;quot; This will result in the text &amp;quot;What shall Jardet do?&amp;quot; being printed, followed by free form input.&lt;br /&gt;
&lt;br /&gt;
 P: *. P: rock pick.&lt;br /&gt;
 Menu: ?=Please tell me your answer.&lt;br /&gt;
 Smith: No, you didn&#039;t get the right answer.&lt;br /&gt;
 Smith: Yes, it&#039;s a rock pick!.&lt;br /&gt;
&lt;br /&gt;
 P: Nothirstyinterst. P: Yesthirstyintrest.&lt;br /&gt;
 Menu: No, sounds like work. Menu: Sure, I can get it for you.&lt;br /&gt;
 Serana Tuvi: Alright. I will see you around then, stranger.&lt;br /&gt;
 Serana Tuvi: Ah, good good. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember the : after the P and Menu are important, as is the . at the end of the line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; For triggers used to start quests, never use NPC names into it, because this will confuse the engine, and the trigger will not be recognized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every P: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every Menu: used in one step must be on the same line&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Every NPC: used in one step must be on different lines.&lt;br /&gt;
&lt;br /&gt;
=== NPC Response ===&lt;br /&gt;
Aono Rikas: here you can add a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The line above is interpreted as an answer from the NPC and the engine will extract the name before the colon (:) + space as the NPC involved in this step of the quest. From now on, we will call this a response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The full name of the NPC is required, just the first name will not work. If it is only one name e.g Harnquist use that, and if your NPC somehow ends up with three names use all of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first step of a quest the NPC statement will end in a question mark and is triggered by the first 2 lines. Responses are linked to each of the Triggers and Menus. So if you have two triggers you need two menu options and two NPC responses. All arranged in the same order.&lt;br /&gt;
&lt;br /&gt;
=== Dialogues ===&lt;br /&gt;
The dialogues are the most important part of the quest for a player to get immersed. So let us talk about how to make the dialogue.&lt;br /&gt;
&lt;br /&gt;
* Every punctuation, exclamation mark and question mark will create a short pause in the dialogue and create a new line.&lt;br /&gt;
* To create actions all you have to do is to use square brackets within the dialogue like this &amp;quot;Blablabla [NPC Name picks his nose] Bla bla blabla&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You may use also these commands:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playerrace can be used in an impersonal and a personal manner in terms of context, consider its usage carefully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$sir which gives you &amp;quot;Sir&amp;quot; or &amp;quot;Madam&amp;quot; or &amp;quot;Gemma&amp;quot; depending on the gender of the player&#039;s character. Again, this can be used to positive and negative effect. Be mindful of the NPCâ€™s tone. (Gemma is the honorific for Kran.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$playername clearly not to be used in newbie quests, have NPC establish rapport use this in second quest or even the third time a player works with a given NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Give me a quest..&lt;br /&gt;
&lt;br /&gt;
= A sample quest script =&lt;br /&gt;
&lt;br /&gt;
== The first step ==&lt;br /&gt;
As previously mentioned Step 1 does not exist, it is just the start of the quest, and can not be required by subsequent steps. The Start of the Quest will look something like the example at the beginning (Structure 1).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same example can also be scripted like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Structure 2&#039;&#039;&#039;&lt;br /&gt;
 P: Short trigger.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Initial question, give me a quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: Yes, I do have a quest for you. I need you to give Item of Importance to NPC2 Name.&lt;br /&gt;
 &lt;br /&gt;
 P: Yes P: No.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Yes, I will do that. Menu: No way stupid.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is Yes.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Item of Importance.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
 &lt;br /&gt;
 NPC Name: This is the response from the NPC if answer is No.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Structure 2 the answers &amp;quot;No&amp;quot; and &amp;quot;Yes&amp;quot; are inverted, like the two &amp;quot;Menu:&amp;quot; commands, so it will give the same result as Structure 1. (Answer No: nothing happens. Answer Yes: the player will get 1Item of Importance and the Quest.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us use a more detailed example. We will make a very simple quest: Aono wants to deliver a bottle of milk to Orchibaly. The player can choose the quest from Aono&#039;s quest menu. Orchibaly will then give the player 2 pies and a receipt to give back to Aono. The first step will be the step that assigns the quest. The P: tells the engine that this line represents something the player will say to the NPC, but what you must pay extra attention to is the &amp;quot;Menu:&amp;quot; This will be what the player will see as an option in the quest menu. If there are several options you will have to create one &amp;quot;P:&amp;quot; and a &amp;quot;Menu:&amp;quot; for each of them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here we firstly gives the player the option to ask for the quest. Then Aono describes the nature of the quest and the player can choose yes or no. Right after the &amp;quot;Menu:&amp;quot; line the NPC responsewill be put. In this example Aono will reply: &amp;quot;Well, I will get someone else to do it for me.&amp;quot; if the player says no or &amp;quot;That&#039;s great. Here is the milk. Be sure not to spill it. TellOrchibaly I sent you.&amp;quot;, give the player 1 Milk Bottle and assign the quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Assign Quest&#039;&#039;&#039;&lt;br /&gt;
 # Quest: Delivery for Aono Rikas&lt;br /&gt;
 &lt;br /&gt;
 # Quest Description: Sample Quest.&lt;br /&gt;
 &lt;br /&gt;
 # The rest of the header will not be covered here.&lt;br /&gt;
 &lt;br /&gt;
 # Step 1 Aono Rikas in Hydlaa needs someone to deliver milk to Orchibally Gurpleferd in Ojaveda.&lt;br /&gt;
 &lt;br /&gt;
 P: Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Are there any jobs you need done?&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well, yes. I need some milk delivered to Orchibaly in Ojaveda. Can you do this for me?&lt;br /&gt;
 &lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Menu: No. Menu: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Well I will get someone else to do it for me.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: That&#039;s great. Here is the milk. Be sure not to spill it. Tell Orchibaly I sent you.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Assign Quest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A quest can be automatically assigned or there can be a step at the beginning of the quest to ask the player if he accepts it.&lt;br /&gt;
&lt;br /&gt;
If you want to assign it automatically use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
If you want to ask the player use this format:&lt;br /&gt;
&lt;br /&gt;
  P: give me a quest. Or any quest trigger.&lt;br /&gt;
  Menu: what the play sees go here.&lt;br /&gt;
  NPC: What the NPC says goes here, with the question if you want to help.&lt;br /&gt;
  P: nohelp. P: yeshelp.&lt;br /&gt;
  Menu: I don&#039;t want to. Menu: Yes I will help.&lt;br /&gt;
  NPC: Fine... Go away.&lt;br /&gt;
  NPC: Good great.&lt;br /&gt;
  Assign quest.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The “Assign quest.” command will only trigger after the second NPC: dialogue line is triggered, nothing happens if the first is triggered.&lt;br /&gt;
&lt;br /&gt;
== The next step ==&lt;br /&gt;
To separate the step we use &amp;quot;...&amp;quot; and then a comment on what step it is and what the step is about. If you don&#039;t want this step to be repeatable you will also have to add &amp;quot;NoRepeat&amp;quot; after the &amp;quot;...&amp;quot;. The second step does not need a completion of Step 1, because Step 1 does not exist so to speak. The structure will be more or less the same as for the initial step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us continue our Delivery for Aono Quest. We have assigned the quest and the player has been given 1 Milk Bottle to give to Orchibaly. Now the player must give that milk to Orchibaly. Either by using the give GUI or by using the quest menu. The first thing we have to do here is to set up the give trigger. If the player gives Orchibaly the milk, he will answer &amp;quot;Oh, yes the milk. Please give it to me. Now i need you to deliver these two pies and this receipt back toAono.&amp;quot;, Give the player 2 pies and a Receipt from Orchibaly. The step is then completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example although the player is given two pies no &amp;quot;s&amp;quot; is added to the line. This is important, especially because most writers tend to add a plural automatically to plural items. Remember the engine does not. An item is designated in the singular, the engine always interprets it in the singular regardless of the number included. The numbers are again not spelt out and Arabic numerals used. Remember that each &amp;quot;Player gives&amp;quot;-command must have menu option in the next line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Step 2&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this bottle of milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Thanks, please give it to me. Now deliver two pies and a receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Completing a step&lt;br /&gt;
 &lt;br /&gt;
 At the end of a step remember to insert the line:&lt;br /&gt;
 &lt;br /&gt;
 &amp;quot;Complete Delivery for Aono Rikas Step 2.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the use of Capitals, the use of the quest name, the use of the appropriate numeral and the period at the end of the sentence. The line marks the step as complete and allows the player and the quest to move forward.&lt;br /&gt;
&lt;br /&gt;
== Last step ==&lt;br /&gt;
To make sure the player has completed the previous step we start with &amp;quot;Require completion of delivery for Aono step 2.&amp;quot;. Then we move on to the trigger which is the player giving 2 pies and the receipt to Aono. Aono answers &amp;quot;Ah, pie. Thank you. Please accept this for your time.&amp;quot;, gives the player a pie and 100Tria. The step is closed and so is the quest with &amp;quot;Complete Delivery for Aono Rikas.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last Step&#039;&#039;&#039;&lt;br /&gt;
 ...NoRepeat.&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of delivery for Aono step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here are your pies and your receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If you use multiple options in the last step of a quest you have to explicitly complete the quest with a command for the first option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Last step with multiple options&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 P: No. P: Yes.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest doesn&#039;t complete automatically so make sure you have added a complete line for this response.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2. Complete Harnquist Needs Gold.&lt;br /&gt;
 &lt;br /&gt;
 Merchant: Quest completes automatically because it is the last line in quest so no complete line is required.&lt;br /&gt;
 &lt;br /&gt;
 Complete Harnquist Needs Gold Step 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you omit the Complete Step and Complete Quest line, the quest will not end properly when choosing &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Branches of a quest (Non exclusive) ==&lt;br /&gt;
Some times you want to have several different outcomes for a quest. Let us use the Delivery quest once again. If the first NPC says that you must NOT give the milk to some one else... specially NPC3. Then you should also add the option for the player to actually give the milk to NPC3 . This will complicate your script a bit, but is not as hard as it might seem. Most of the job is done by placing the right &amp;quot;Require completion of&amp;quot; and &amp;quot;Require no completion of&amp;quot; commands.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us take a look at that Delivery Quest again. Now we want to add an option for the player to give the milk to Reffitia instead. Reffitia will shake the milk until it becomes butter and this will make Orchibaly angry and demand a new bottle of milk. To do that we will have to add a few more steps and we will start from step 2 as step 1 will be the same as above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Third step will be our previous Step 2. And the last step will be the same. Though Aono should mention something like: &amp;quot;Make sure you don&#039;t give that milk toReffitia.&amp;quot; in Step 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: This is a non exclusive branching, meaning that the first branch is available also when executing the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IMPORTANT NOTE: We will not add an additional step for the player to get milk again from Aono, but the player have to figure out another way to get hold of it (Buy from an NPC).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Branching&#039;&#039;&#039;&lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 2 - Alternative is to give the milk to refittia&lt;br /&gt;
 &lt;br /&gt;
 Player gives 1 Milk Bottle to Reffitia&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here Reffitia, take this milk.&lt;br /&gt;
 &lt;br /&gt;
 Reffitia Thamal: Ah! Orchibaly&#039;s milk. Here, now you can give the bottle to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy.&lt;br /&gt;
 # The player then have to find another way of getting a bottle of milk (buy from NPC?)&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the milk to Orchibaly&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 5 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Alternative outcome ==&lt;br /&gt;
If we wanted the quest to have a different outcome if the player gives the milk to Reffitia than to Orchibaly we would need to get creative with the require commands. Let us say that if the player gives butter to Orchibaly he will give &amp;quot;bad pies&amp;quot; so when Aono receives them and takes a taste he will be very angry and no reward is given. To do this we will have to add just one more step. Let us start with step 3. Here we will have to change only the NPC response a bit to something like &amp;quot;Milk? This is butter. Have you been shaking the bottle all the way over here? This is completely useless to me, butter I have more than enough of. Any way someMenki came with another bottle just before you. Here takes these pies to Aono . Oh, and don&#039;t forget this receipt.&amp;quot;. Step 4 will be the step where the player gives the bad pies to Aono, this step will complete the quest. Step 5 and 6 are the outcome if the player gives the milk directly toOrchibaly. Notice that Step 5 require a NO completion of Step 4. This is actually not necessary for this script, because the previous the other branch of the quest, ending in step 4 closes the quest it self.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Alternative Outcome&#039;&#039;&#039;&lt;br /&gt;
 # Step 3 - Player gives bottle of butter to Orchy. And receives 2 pies and a receipt&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 2.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Bottle of Butter.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Um, here is the milk from Aono.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Milk? This is butter. You better get me another bottle of milk, fast!&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pie. Give 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 3.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 4 - Player gives the &amp;quot;bad&amp;quot; pies and the receipt to Aono. Receives gunk as reward and Quest is completed.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 3&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 2 Pie, 1 Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. [Aono takes a bite at the pie] You have tricked me!&lt;br /&gt;
 &lt;br /&gt;
 Give 1 Gunk.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
 &lt;br /&gt;
 ...&lt;br /&gt;
 # Step 5 - Player gives the milk directly to Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Require no completion of Delivery for Aono Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Orchibaly Gurpleferd 1 Milk Bottle.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Aono asked me to give you this milk.&lt;br /&gt;
 &lt;br /&gt;
 Orchibaly Gurpleferd: Oh, yes the milk. Now i need you to deliver these two pies and this receipt back to Aono.&lt;br /&gt;
 &lt;br /&gt;
 Give 2 Pies. Give Receipt from Orchibaly.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas Step 5.&lt;br /&gt;
 &lt;br /&gt;
 ... NoRepeat&lt;br /&gt;
 &lt;br /&gt;
 # Step 6 - Player has now returned to Aono in Hydlaa. Player must now give Aono the 2 Pies and 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Require completion of Delivery for Aono Rikas Step 4.&lt;br /&gt;
 &lt;br /&gt;
 Player gives Aono Rikas 2 Pie, 1 Receipt.&lt;br /&gt;
 &lt;br /&gt;
 Menu: Here take these pies and the receipt.&lt;br /&gt;
 &lt;br /&gt;
 Aono Rikas: Ah, pie. Thank you. Please accept this for your time.&lt;br /&gt;
 &lt;br /&gt;
 Give 100 Tria. Give 1 Pie.&lt;br /&gt;
 &lt;br /&gt;
 Complete Delivery for Aono Rikas.&lt;br /&gt;
&lt;br /&gt;
== Quest Timeout (Passing of time) ==&lt;br /&gt;
If you want to allow a certain part of the quest to wait a certain amount of time before it can be a executed, you can use this script:&amp;lt;blockquote&amp;gt;Run script give_quest_timeout &amp;lt;&amp;lt;&#039;Time until Harnquist is ready&#039;,6&amp;gt;&amp;gt;&amp;lt;/blockquote&amp;gt;this will create a temporary active magic with name &#039;Time until Harnquist is ready&#039; which will last for 6 minutes. &lt;br /&gt;
&lt;br /&gt;
Then in the prerequisite of the step have this:&amp;lt;blockquote&amp;gt;# Step 12.&lt;br /&gt;
&lt;br /&gt;
Require active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: swordnotready.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready yet?&lt;br /&gt;
&lt;br /&gt;
Harnquist: No, not yet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
# Step 13.&lt;br /&gt;
&lt;br /&gt;
Require no active magic Time until Harnquist is ready.&lt;br /&gt;
&lt;br /&gt;
P: about Vresa sword.&lt;br /&gt;
&lt;br /&gt;
Menu: Is Vresa&#039;s sword ready?&lt;br /&gt;
&lt;br /&gt;
Harnquist: Yes, Vresa&#039;s sword is done. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Important commands and expressions used =&lt;br /&gt;
&lt;br /&gt;
== Assign Quest. ==&lt;br /&gt;
This line tells the engine to assign the quest to the player and generally results in the &amp;quot;YOU GOT A QUEST&amp;quot;. and placing the quest in the player&#039;s quest log, under &amp;quot;uncompleted&amp;quot;. Again remember to be exact here, Capitalize the two words and put a &amp;quot;.&amp;quot; at the end. It cannot be emphasized enough that the engine only interprets what it sees and the way it sees it. If you are not precise the quest will NOT happen or in the cases of the next steps move forward.&lt;br /&gt;
&lt;br /&gt;
== ... ==&lt;br /&gt;
The three dots mark the beginning of a new step. Better, the three dots create a new step. So you need a &amp;quot;three dots&amp;quot; line before every &amp;quot;Complete Quest Name Step #&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== NoRepeat. ==&lt;br /&gt;
This line means that the quest step cannot be done over and over. Note that there are three periods &amp;quot;...&amp;quot; a space and &#039;NoRepeat.&#039; is one word not two. Each part of this sentence is required in exactly this form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically &amp;quot;...&amp;quot; tells the engine that some time can pass before the next lines are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NoRepeat allows this quest step to be only done one time. This also applies to actions as seen in later steps. (in reality NoRepeat is a synonym for Require no completion of &amp;quot;this step&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require completion of Quest Name Step #. ==&lt;br /&gt;
This command is like a closed door. To open it and enter in the current step the player needs to complete the step number #. You can also refer to a future step (for example, you&#039;re on step 4 and add &amp;quot;Require completion of Quest Name Step 8.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Require no completion of Quest Name Step #. ==&lt;br /&gt;
This command is like an open door. The player is free to continue the quest and entering the current step, UNLESS he completed the step number #. Completing the step number # will close the door. Forever! You can also refer to a future step.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name Step #. ==&lt;br /&gt;
This command completes a step, # being the step number. You can complete one step in another one. But remember to insert one &amp;quot;...&amp;quot; line for every &amp;quot;Complete Quest Name Step #.&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
== Complete Quest Name. ==&lt;br /&gt;
This command will end the quest. After this the quest will be deleted from the uncompleted quest list and appear in the Completed quest list.&lt;br /&gt;
&lt;br /&gt;
== P: ==&lt;br /&gt;
The trigger is actually a ghost from the previous scripting system, but it is still needed (for now). Before the player had to type the exact trigger stated after the &amp;quot;P:&amp;quot;. Now they click the option from &amp;quot;Menu:&amp;quot;. Triggers must be four words or less. Triggers must end with a period, no other punctuation is allowed (question marks especially are known to break aquest on the server).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want multiple phrases to activate the same trigger, you can just separate the phrases by a period; for example: &amp;quot;P: about guards. about hydlaa guards. about hydlaa militia.&amp;quot; In this case the NPC&#039;s response will be fired on any of the three options. This technique can be used also when you have multiple choices: &amp;quot;P: one. two. P: more.&amp;quot;. Both &#039;one&#039; and &#039;two&#039; will trigger the first response, while &#039;more&#039; will trigger the second.&lt;br /&gt;
&lt;br /&gt;
WARNING: Triggers cannot contain any of the following words: a, am, an, and, any, anything, are, do, I, is, isnâ€™t, please, that, the, this, to, too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They also may not contain the name of the NPC you&#039;re talking to as that&#039;ll be stripped.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These words just take up space in a trigger as they are dropped by the engine when evaluating player response. To make the best use of your word counts ignore them when writing your triggers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: If you wanted the player to say &#039;please help Levrus&#039; the trigger would become &#039;help levrus&#039; as please would be an ignored word.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WARNING: If a player needs to write &amp;quot;NPC needs this&amp;quot; syntax it as &amp;quot;NPC wants this&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Menu: ==&lt;br /&gt;
That&#039;s easy. After this command you can add the sentence said by the player in game. This sentence will appear on the screen and could be selected when one talks to the NPC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that for every menu line you need to create a response from the NPC.&lt;br /&gt;
&lt;br /&gt;
== Give ==&lt;br /&gt;
Give is a very useful command. It tells the engine to give the player items. Be it rewards or special items needed for the quest. When you reward a player, you can basically give items and/or experience. The syntax to award 1500 experience points would be: &amp;quot;Give 1500 Exp.&amp;quot; Note that &amp;quot;Exp&amp;quot; is case-sensitive. You can also reward items AND experience, using this syntax: &amp;quot;Give Leather Gloves. Give 1500 Exp.&amp;quot; Remember that you can only have two give commands on the same line, but you can have multiple lines, Remember to keep a clean style, it is prefered to only have one item per line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give more than two items&#039;&#039;&#039;&lt;br /&gt;
 Give 1 Leather Gloves.&lt;br /&gt;
 Give 1500 Exp.&lt;br /&gt;
 Give 1 Apple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also add a number if you need to give more than one item (like you do for experience) example: &amp;quot;Give 5 Iron Ingot.&amp;quot; It is not necessary in the case of one item to include the numeral, however it is good practice to do so as numerals tell the engine how many and should be written as a numeral, a word will NOT work as the engine cannot interpret it as such. Remember that all special items must be declared in the script header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another option you have is to give one item OR another. The following will pop up a window in which the player has to choose just one item:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Give the player a choice between items&#039;&#039;&#039;&lt;br /&gt;
 Give Cold or Arrow or Energy.&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; At this time, don&#039;t use the following in an OR option: Tria, hexa, octa, circles, or items without a graphic. Also, for now, do NOT put quantities in front of items that are given using the &amp;quot;OR&amp;quot; parameter. An example of what NOT to do: &amp;quot;Give 1 Cold or 1 Arrow or 1 Energy.&amp;quot; This will lock the server right up. An example of what SHOULD be done: &amp;quot;Give Cold or Arrow or Energy.&amp;quot; (Check this statement if it is correct. --Katu)&lt;br /&gt;
&lt;br /&gt;
== Player gives NPC Name 1 Item ==&lt;br /&gt;
This can be used as a trigger (instead of the &amp;quot;P:&amp;quot;). It tells the engine to trigger the NPC dialogue when one or any fixed amount of a special item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a player have to give multiple items just add them to the original line using a comma:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Player gives item&#039;&#039;&#039;&lt;br /&gt;
 Player gives Harnquist Water Pouch, 1 Pie.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; Item name rules must be followed at all times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that the item name is &amp;quot;Iron Ingot&amp;quot;, so &amp;quot;Iron Ingots&amp;quot; will not work, even if itâ€™s the correct plural form. Keep all names singular.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, do not use a number (3, 14, etc) in the name of an item. An item called 3 Circles Receipt will probably generate problems when we script &amp;quot;Give 3 Circles Receipt.&amp;quot; It is better named &amp;quot;Three Circles Receipt.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Numbers should be spelled out everywhere unless you are referring to the quantity given or dealing with a trigger (give me 5 apples. give me five apples.) as both would be correct in a trigger.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Character limit for an item name is 60 characters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do not use an s&#039; in an item name, like &amp;quot;Levrus&#039; Left Shoe,&amp;quot; use &amp;quot;Left Shoe of Levrus&amp;quot; or a similar substitute instead.&lt;br /&gt;
&lt;br /&gt;
== Set variable Require variable ==&lt;br /&gt;
You can set a variable to be later used by the quest or other quests. Variables are set on the character and visible from all quests.&lt;br /&gt;
 Smith: Here is your winch access&lt;br /&gt;
 Setvariable Quest_Winch_Access 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can then require a variable to be set as prerequisite of a quest step.&lt;br /&gt;
 Require variable Quest_Winch_Access.&lt;br /&gt;
 P: access.&lt;br /&gt;
 Menu: I have access&lt;br /&gt;
 Bobaus: Ok, good.&lt;br /&gt;
&lt;br /&gt;
== Require Compendium ==&lt;br /&gt;
You can require the player to have a certain knowledge in the Compendium.&lt;br /&gt;
 Require compendium creature StoneHammer&lt;br /&gt;
 P: comps&lt;br /&gt;
 Menu: I know everything about the StoneHammers!&lt;br /&gt;
 Fighter3: WOW&lt;br /&gt;
 ...&lt;br /&gt;
 Require no compendium creature StoneHammer&lt;br /&gt;
 P: nocomps&lt;br /&gt;
 Menu: Sorry I dont know anything about StoneHammers!&lt;br /&gt;
 Fighter3: Ah, study more!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The syntax is: compendium &amp;lt;creature/plant/mineral&amp;gt; &amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rewards at the end of the quest ==&lt;br /&gt;
When completing a quest, the player usually gets experience and money, or some items. In particular for experience and money you should use the following scripts. This allows us to split the rewards on a scale from 1 to 10 and then to tweak the actual values in the engine. The values in brackets indicate the complexity of the quest. The more complex the more rewards the player will get.&lt;br /&gt;
&lt;br /&gt;
 Run script give_quest_money &amp;lt;&amp;lt;3&amp;gt;&amp;gt;.&lt;br /&gt;
 Run script give_quest_exp &amp;lt;&amp;lt;2&amp;gt;&amp;gt;.&lt;br /&gt;
You can also award faction points by using &amp;quot;give_quest_faction&amp;quot; , the number given is multiplied by 5 so if you want +5 point, you need 1 on the second parameter:&lt;br /&gt;
 Run script give_quest_faction &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 1&amp;gt;&amp;gt;. &lt;br /&gt;
We have script also to push the faction point up to a given value, if you are already higher, this script will do nothing.&lt;br /&gt;
 Run script give_quest_faction_level &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
value = 1-&amp;gt; max faction points = 10;&lt;br /&gt;
&lt;br /&gt;
value = 2-&amp;gt; max faction points = 20;&lt;br /&gt;
&lt;br /&gt;
value = 3-&amp;gt; max faction points = 35; &lt;br /&gt;
&lt;br /&gt;
value = 4-&amp;gt; max faction points = 55; &lt;br /&gt;
&lt;br /&gt;
value = 5-&amp;gt; max faction points = 75; &lt;br /&gt;
&lt;br /&gt;
value = 6-&amp;gt; max faction points = 100; &lt;br /&gt;
&lt;br /&gt;
value = 7-&amp;gt; max faction points = 125; &lt;br /&gt;
&lt;br /&gt;
value = 8-&amp;gt; max faction points = 150; &lt;br /&gt;
&lt;br /&gt;
value = 9-&amp;gt; max faction points = 200;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to assign a faction title you can use this script. In the example it will assign the second title.&lt;br /&gt;
 Run script give_quest_faction_title &amp;lt;&amp;lt;&#039;Essential Trail&#039;, 2&amp;gt;&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
=== The header ===&lt;br /&gt;
The header should contain a lot of information. All the information is commented out by a &amp;quot;#&amp;quot;. The example below is from one of the mount quests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First section is information about the quest itself. Name of the quest, a short description and category. Categories will be discussed in detail later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next sections are for unique items used in the quest, name of the item followed by the description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The third section is for recording versions of the script and all naming authors. Also who last edited the quest should be noted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The last section is for additional metadata which will be added to the quest in the database (not part of the db) and will be used by the engine to determine lockouts and prerequisites. Here it locks all players from doing the quest again and locks all other players to take the quest with 60 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lastly we tell the engine that the player have to complete the Ring of Familiar quest before this one. Note that these comments aren&#039;t taken by the engine; it&#039;s the duty of who loads the quest to fill the correct entries with the data found in the header: so it&#039;s just a way to keep all data together on the script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Header&#039;&#039;&#039;&lt;br /&gt;
 # Quest name: Drifting for a Drifter&lt;br /&gt;
 # Quest Description: Taemian wants to sell you a mount&lt;br /&gt;
 # Quest Category: General&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest Items: Item name/Item description&lt;br /&gt;
 # Taemian&#039;s Pouch: - Pouch with all sorts of coins&lt;br /&gt;
 # Green Gem of the Drifter - A magical gem with a green glow&lt;br /&gt;
 # Unsigned Drifter Permit - A permit that still needs to be signed by Datal&lt;br /&gt;
 # Signed Drifter Permit - A permit that has been signed by Datal&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Quest specific variables used in this quest&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Author(s): Ravna, Katu, weltall&lt;br /&gt;
 # Current Version: 1.01&lt;br /&gt;
 # Player lockout: -1&lt;br /&gt;
 # Quest lockout: 60&lt;br /&gt;
 # Prerequisites: &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;completed quest=&amp;quot;Ring of Familiar&amp;quot;/&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 # Variables used: Quest_Variable_Name used to do.....&lt;br /&gt;
 # ----------------------&lt;br /&gt;
 # Version history and change log&lt;br /&gt;
 # Last edited by: weltall&lt;br /&gt;
 # Version 1.00: Initial draft - 05/01/2010 - Katu.&lt;br /&gt;
 # Version 1.01: Added extra steps - 1/22/2011 - Venalan.&lt;br /&gt;
 # ----------------------&lt;br /&gt;
&lt;br /&gt;
==== Quest Lockouts ====&lt;br /&gt;
Each quest has two different lockout types:&lt;br /&gt;
&lt;br /&gt;
* Player lockout: When this parameter is set, the engine will wait the specified amount of seconds before allowing the same player to redo the same quest. If you want a quest to be available to each player only one time, then set the lockout to -1. Setting it to 600 will have the engine wait 10 minutes before unlocking the quest again.&lt;br /&gt;
* Quest lockout: When this parameter is set, the engine will wait the specified amount of seconds before reactivating the quest for ALL players. This means no one can start the same quest during this period, but the ones that had it already active can complete it.&lt;br /&gt;
&lt;br /&gt;
Usually we want quests to be unique to players, so most have a player lockout -1, except the very simple ones. Try always to think if itâ€™s meaningful for that player to redo it. (For example, Harnquist can require iron ore more than once, but won&#039;t need to teach you how to make a sword more than once.)&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
Another more complex version of the prerequisites is the: REQUIRE MIN &amp;lt;number&amp;gt;: this tells the engine that there are specific requirements to be fulfilled before the player is able to get the quest. This script indicated it requires a minimum number of quests to be completed in a given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example: require min 2 of Quest1, Quest2, Quest3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To match this prerequisite the player can complete Quest1 and Quest3 or 2 and 3, or all 3. The request is minimum 2 in the given list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CATEGORY MIN &amp;lt;number&amp;gt;: quests have an attribute called &amp;quot;category&amp;quot;, we use it to identify the difficulty of quests, but can be used of any other purpose, for example one can say that a group of quests is &amp;quot;Evil&amp;quot; or &amp;quot;Laanx related&amp;quot; or &amp;quot; Newbie&amp;quot;. Just one category is allowed per quest. This prerequisite allows you to specify the category and the minimum number of quests completed in that category.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A sample of the coding used to set prerequisites for a quest (All on one line):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example: Prerequisites&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;pre&amp;gt;&amp;lt;and&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest One&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Two&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;completed quest=&amp;quot;Test Quest Three&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;assigned quest=&amp;quot;Test Quest Four&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Delivery for Aono Riskas&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;not&amp;gt;&amp;lt;completed quest=&amp;quot;Gorbiak Disease&amp;quot;/&amp;gt;&amp;lt;/not&amp;gt;&lt;br /&gt;
 &amp;lt;/and&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This sample requires that the player have completed Test Quests 1 through 3, have Test Quest 4 assigned (not completed) and have NOT completed Fancy Dancing and High-Class Aspirations. To get these arranged correctly can take some practice if one is not familiar with working with booleans, so it is best to include a plain-English comments of what you wish your pre-requisites to be in addition to the one with the &amp;quot;pre&amp;quot; coding statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Checks if the player has a certain item equipped . To be documented better&lt;br /&gt;
&lt;br /&gt;
else if (!strncasecmp(block,&amp;quot;equipped&amp;quot;,8))&lt;br /&gt;
&lt;br /&gt;
=== More Prerequisites ===&lt;br /&gt;
&amp;quot;time of day&amp;quot; // require time of day starthh-endhh (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require not race Klyros. Require race Kran.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
Example: Require gender female.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;possessed&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;skill&amp;quot; //Require skill &amp;lt;buffed&amp;gt; name &amp;lt;skillmin&amp;gt;-&amp;lt;skillmax&amp;gt;. (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;variable&amp;quot; //Require variable name. (working)&lt;br /&gt;
&lt;br /&gt;
=== Untested Prerequisites ===&lt;br /&gt;
Please contact engine in case you want to use any of these prerequisites, because those are untested.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;trait&amp;quot; //require trait name in place&lt;br /&gt;
&lt;br /&gt;
&amp;quot;guild&amp;quot;  //NOTE: the both argument is implicitly defined&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= Notes on Creating Quest Files (Rules and Header Information) =&lt;br /&gt;
&lt;br /&gt;
* The quest documents you submit should always be in notepad format: this is to avoid special characters added by Word or other text editors, most notably &amp;quot;smart quotes&amp;quot; which will appear as squares in game. Notepad++ is recommended, HIGHLY recommended.&lt;br /&gt;
* Use only ANSI encoding.&lt;br /&gt;
* The file name when saving the quest should begin with &#039;Quest&#039; , then have the name of the quest. For example: Quest Hinoserri Cannot See.txt&lt;br /&gt;
* Titles of quests should follow some scheme of capitalization. There are many sets of rules, but a quick and easy format is to capitalize the first word and then all other words, except a, an, the, at, by, for, in, of, on, to, up, and, as, but, it, or, and nor.&lt;br /&gt;
* Each quest script begins with the title and a one or two sentence description; this is what the player reads so keep that in mind. The proper way to do this is to &amp;quot;comment out&amp;quot; your description and quest title, this is done by beginning a line with the number sign or pound symbol (#). Also, any quest item created for your quest should have a description written into the quest. Notes on quest items should also be commented out. Lastly, there should also be a &amp;quot;Quest Category&amp;quot; line that must be commented out as well. Approved quest categories are: Alchemy, Black Flame, Chain (don&#039;t use this one unless told), Cooking, Death Realm, Easy, Gugrontid, Magic Ways, Medium, Metal Working, Newbie, Repeatable. This is a work in progress, so if you have any questions ask an associate dev or developer. No quest can have more than one category - pick one and ONLY one. New quest categories must be approved by the associate devs/devs before use.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25748</id>
		<title>Quest scripts syntax for AI</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25748"/>
		<updated>2026-04-06T16:17:00Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the syntax to create a quest script.&lt;br /&gt;
&lt;br /&gt;
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
The quest script is divided in steps. Each one being separated with this line:&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
&lt;br /&gt;
This line tells the engine to create a new step. Only the first step does not have the ... line&lt;br /&gt;
&lt;br /&gt;
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:&lt;br /&gt;
&lt;br /&gt;
  # Step 2&lt;br /&gt;
&lt;br /&gt;
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.&lt;br /&gt;
&lt;br /&gt;
Requiments are expressed like this, where we substitute &amp;lt;quest name&amp;gt; with the name of the quest:&lt;br /&gt;
&lt;br /&gt;
  Require completion of &amp;lt;quest name&amp;gt; step 2.&lt;br /&gt;
&lt;br /&gt;
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:&lt;br /&gt;
&lt;br /&gt;
  P: 15002.&lt;br /&gt;
&lt;br /&gt;
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:&lt;br /&gt;
&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
&lt;br /&gt;
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:&lt;br /&gt;
&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
Every step must finish with a line that completes the step, example:&lt;br /&gt;
&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
The first step is a different than the others in this way:&lt;br /&gt;
1) it doesn&#039;t have a Require completion of&lt;br /&gt;
2) instead of the &amp;quot;Complete&amp;quot; step line, it has &amp;quot;Assign Quest.&amp;quot; line, which basically stores the quest in the player log as started.&lt;br /&gt;
&lt;br /&gt;
The second step differs just for the fact it doesn&#039;t have a &amp;quot;Require completion of&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
We also use brackets [] to indicate some visual action from the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword.&lt;br /&gt;
&lt;br /&gt;
All lines except comments should always end with a period or a question/exclamation mark. This is how the engine knows that directive is completed.&lt;br /&gt;
&lt;br /&gt;
We also have the possibility to have multiple questions and answers in the same step, this is done usually when the discussion is about the same topic and doesn&#039;t require a separate QuestNote. In this case the structure is P: , then Menu: , then the npc line. The P must be unique so here we append a letter to the end, example 15005a, 15005b, ...&lt;br /&gt;
&lt;br /&gt;
When we move to another NPC it&#039;s required to have a separate step.&lt;br /&gt;
&lt;br /&gt;
If the dialogue branches and then we need to merge it again in one step later on, we can use the OR operator that&#039;s a pipe |. This example requires step 3 or step 4 to be completed:&lt;br /&gt;
&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
&lt;br /&gt;
A full example follows. In this example there are two parallel possible answers to the NPC question, and also a longer discussion in one last step:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
  P: 15001.&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
  Assign Quest.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 2&lt;br /&gt;
  P: 15002.&lt;br /&gt;
  Menu: Do you need any help?&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword. Are you interested in it?&lt;br /&gt;
  QuestNote Harnquist asked if we want to help forging a new longsword.&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 3&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15003.&lt;br /&gt;
  Menu: Yes, sure I would like help.&lt;br /&gt;
  Harnquist: Great, then please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I agreed to help, and Harnquist asked for 10 iron ore.&lt;br /&gt;
  Complete Searching the blacksmith Step 3.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 4&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15004.&lt;br /&gt;
  Menu: Yes I want to help, but I can do it tomorrow.&lt;br /&gt;
  Harnquist: Ok, come back tomorrow then and please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I had to ask one more day, and Harnquist asked for 10 iron ore to be delivered tomorrow.&lt;br /&gt;
  Complete Searching the blacksmith Step 4.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 5&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
  P: 15005.&lt;br /&gt;
  Menu: I have the ore you requested.&lt;br /&gt;
  Harnquist: Very good!&lt;br /&gt;
  P: 15005a.&lt;br /&gt;
  Menu: Can you evaluate its quality?&lt;br /&gt;
  Harnquist: Sure I can, let me look. [Harnquist puts on a set of glasses to inspect the ore]&lt;br /&gt;
  QuestNote I brought the ore to Harnquist.&lt;br /&gt;
  Complete Searching the blacksmith Step 5.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25747</id>
		<title>Quest scripts syntax for AI</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25747"/>
		<updated>2026-04-06T15:59:02Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the syntax to create a quest script.&lt;br /&gt;
&lt;br /&gt;
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
The quest script is divided in steps. Each one being separated with this line:&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
&lt;br /&gt;
This line tells the engine to create a new step. Only the first step does not have the ... line&lt;br /&gt;
&lt;br /&gt;
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:&lt;br /&gt;
&lt;br /&gt;
  # Step 2&lt;br /&gt;
&lt;br /&gt;
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.&lt;br /&gt;
&lt;br /&gt;
Requiments are expressed like this, where we substitute &amp;lt;quest name&amp;gt; with the name of the quest:&lt;br /&gt;
&lt;br /&gt;
  Require completion of &amp;lt;quest name&amp;gt; step 2.&lt;br /&gt;
&lt;br /&gt;
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:&lt;br /&gt;
&lt;br /&gt;
  P: 15002.&lt;br /&gt;
&lt;br /&gt;
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:&lt;br /&gt;
&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
&lt;br /&gt;
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:&lt;br /&gt;
&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
Every step must finish with a line that completes the step, example:&lt;br /&gt;
&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
The first step is a different than the others in this way:&lt;br /&gt;
1) it doesn&#039;t have a Require completion of&lt;br /&gt;
2) instead of the &amp;quot;Complete&amp;quot; step line, it has &amp;quot;Assign Quest.&amp;quot; line, which basically stores the quest in the player log as started.&lt;br /&gt;
&lt;br /&gt;
The second step differs just for the fact it doesn&#039;t have a &amp;quot;Require completion of&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
We also use brackets [] to indicate some visual action from the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword.&lt;br /&gt;
&lt;br /&gt;
All lines except comments should always end with a period or a question/exclamation mark. This is how the engine knows that directive is completed.&lt;br /&gt;
&lt;br /&gt;
We also have the possibility to have multiple questions and answers in the same step, this is done usually when the discussion is about the same topic and doesn&#039;t require a separate QuestNote. In this case the structure is P: , then Menu: , then the npc line. The P must be unique so here we append a letter to the end, example 15005a, 15005b, ...&lt;br /&gt;
&lt;br /&gt;
When we move to another NPC it&#039;s required to have a separate step.&lt;br /&gt;
&lt;br /&gt;
If the dialogue branches and then we need to merge it again in one step later on, we can use the OR operator that&#039;s a pipe |. This example requires step 3 or step 4 to be completed:&lt;br /&gt;
&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
&lt;br /&gt;
A full example follows. In this example there are two parallel possible answers to the NPC question, and also a longer discussion in one last step:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
  P: 15001&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
  Assign Quest.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 2&lt;br /&gt;
  P: 15002.&lt;br /&gt;
  Menu: Do you need any help?&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword. Are you interested in it?&lt;br /&gt;
  QuestNote Harnquist asked if we want to help forging a new longsword.&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 3&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15003.&lt;br /&gt;
  Menu: Yes, sure I would like help.&lt;br /&gt;
  Harnquist: Great, then please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I agreed to help, and Harnquist asked for 10 iron ore.&lt;br /&gt;
  Complete Searching the blacksmith Step 3.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 4&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15004.&lt;br /&gt;
  Menu: Yes I want to help, but I can do it tomorrow.&lt;br /&gt;
  Harnquist: Ok, come back tomorrow then and please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I had to ask one more day, and Harnquist asked for 10 iron ore to be delivered tomorrow.&lt;br /&gt;
  Complete Searching the blacksmith Step 4.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 5&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
  P: 15005.&lt;br /&gt;
  Menu: I have the ore you requested.&lt;br /&gt;
  Harnquist: Very good!&lt;br /&gt;
  P: 15005a.&lt;br /&gt;
  Menu: Can you evaluate its quality?&lt;br /&gt;
  Harnquist: Sure I can, let me look. [Harnquist puts on a set of glasses to inspect the ore]&lt;br /&gt;
  QuestNote I brought the ore to Harnquist.&lt;br /&gt;
  Complete Searching the blacksmith Step 5.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25746</id>
		<title>Quest scripts syntax for AI</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25746"/>
		<updated>2026-04-06T15:32:36Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the syntax to create a quest script.&lt;br /&gt;
&lt;br /&gt;
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
The quest script is divided in steps. Each one being separated with this line:&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
&lt;br /&gt;
This line tells the engine to create a new step. Only the first step does not have the ... line&lt;br /&gt;
&lt;br /&gt;
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:&lt;br /&gt;
&lt;br /&gt;
  # Step 2&lt;br /&gt;
&lt;br /&gt;
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.&lt;br /&gt;
&lt;br /&gt;
Requiments are expressed like this, where we substitute &amp;lt;quest name&amp;gt; with the name of the quest:&lt;br /&gt;
&lt;br /&gt;
  Require completion of &amp;lt;quest name&amp;gt; step 2.&lt;br /&gt;
&lt;br /&gt;
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:&lt;br /&gt;
&lt;br /&gt;
  P: 15002.&lt;br /&gt;
&lt;br /&gt;
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:&lt;br /&gt;
&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
&lt;br /&gt;
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:&lt;br /&gt;
&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
Every step must finish with a line that completes the step, example:&lt;br /&gt;
&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
The first step is a different than the others in this way:&lt;br /&gt;
1) it doesn&#039;t have a Require completion of&lt;br /&gt;
2) instead of the &amp;quot;Complete&amp;quot; step line, it has &amp;quot;Assign Quest.&amp;quot; line, which basically stores the quest in the player log as started.&lt;br /&gt;
&lt;br /&gt;
The second step differs just for the fact it doesn&#039;t have a &amp;quot;Require completion of&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
We also use brackets [] to indicate some visual action from the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword.&lt;br /&gt;
&lt;br /&gt;
All lines except comments should always end with a period or a question/exclamation mark. This is how the engine knows that directive is completed.&lt;br /&gt;
&lt;br /&gt;
We also have the possibility to have multiple questions and answers in the same step, this is done usually when the discussion is about the same topic and doesn&#039;t require a separate QuestNote.&lt;br /&gt;
&lt;br /&gt;
When we move to another NPC it&#039;s required to have a separate step.&lt;br /&gt;
&lt;br /&gt;
If the dialogue branches and then we need to merge it again in one step later on, we can use the OR operator that&#039;s a pipe |. This example requires step 3 or step 4 to be completed:&lt;br /&gt;
&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
&lt;br /&gt;
A full example follows. In this example there are two parallel possible answers to the NPC question, and also a longer discussion in one last step:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
  P: 15001&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
  Assign Quest.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 2&lt;br /&gt;
  P: 15002.&lt;br /&gt;
  Menu: Do you need any help?&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword. Are you interested in it?&lt;br /&gt;
  QuestNote Harnquist asked if we want to help forging a new longsword.&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 3&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15003.&lt;br /&gt;
  Menu: Yes, sure I would like help.&lt;br /&gt;
  Harnquist: Great, then please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I agreed to help, and Harnquist asked for 10 iron ore.&lt;br /&gt;
  Complete Searching the blacksmith Step 3.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 4&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15004.&lt;br /&gt;
  Menu: Yes I want to help, but I can do it tomorrow.&lt;br /&gt;
  Harnquist: Ok, come back tomorrow then and please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I had to ask one more day, and Harnquist asked for 10 iron ore to be delivered tomorrow.&lt;br /&gt;
  Complete Searching the blacksmith Step 4.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 5&lt;br /&gt;
  Require completion of Searching the blacksmith step 3 | completion of Searching the blacksmith step 4.&lt;br /&gt;
  P: 15005.&lt;br /&gt;
  Menu: I have the ore you requested.&lt;br /&gt;
  Harnquist: Very good!&lt;br /&gt;
  QuestNote I brought the ore to Harnquist.&lt;br /&gt;
  Complete Searching the blacksmith Step 5.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25745</id>
		<title>Quest scripts syntax for AI</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25745"/>
		<updated>2026-04-06T15:25:54Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the syntax to create a quest script.&lt;br /&gt;
&lt;br /&gt;
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
The quest script is divided in steps. Each one being separated with this line:&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
&lt;br /&gt;
This line tells the engine to create a new step. Only the first step does not have the ... line&lt;br /&gt;
&lt;br /&gt;
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:&lt;br /&gt;
&lt;br /&gt;
  # Step 2&lt;br /&gt;
&lt;br /&gt;
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.&lt;br /&gt;
&lt;br /&gt;
Requiments are expressed like this, where we substitute &amp;lt;quest name&amp;gt; with the name of the quest:&lt;br /&gt;
&lt;br /&gt;
  Require completion of &amp;lt;quest name&amp;gt; step 2.&lt;br /&gt;
&lt;br /&gt;
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:&lt;br /&gt;
&lt;br /&gt;
  P: 15002.&lt;br /&gt;
&lt;br /&gt;
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:&lt;br /&gt;
&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
&lt;br /&gt;
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:&lt;br /&gt;
&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
Every step must finish with a line that completes the step, example:&lt;br /&gt;
&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
The first step is a different than the others in this way:&lt;br /&gt;
1) it doesn&#039;t have a Require completion of&lt;br /&gt;
2) instead of the &amp;quot;Complete&amp;quot; step line, it has &amp;quot;Assign Quest.&amp;quot; line, which basically stores the quest in the player log as started.&lt;br /&gt;
&lt;br /&gt;
The second step differs just for the fact it doesn&#039;t have a &amp;quot;Require completion of&amp;quot; line.&lt;br /&gt;
&lt;br /&gt;
We also use brackets [] to indicate some visual action from the NPC, example:&lt;br /&gt;
&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword.&lt;br /&gt;
&lt;br /&gt;
All lines except comments should always end with a period or a question/exclamation mark. This is how the engine knows that directive is completed.&lt;br /&gt;
&lt;br /&gt;
A full example follows. In this example there are two parallel possible answers to the NPC question:&lt;br /&gt;
&lt;br /&gt;
  # Quest: Searching the blacksmith&lt;br /&gt;
  # ID: 1500&lt;br /&gt;
&lt;br /&gt;
  P: 15001&lt;br /&gt;
  Menu: Hello, who are you?&lt;br /&gt;
  Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
  QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
  Assign Quest.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 2&lt;br /&gt;
  P: 15002.&lt;br /&gt;
  Menu: Do you need any help?&lt;br /&gt;
  Harnquist: [He seems pleased by your question] Yes I need to forge a new longsword. Are you interested in it?&lt;br /&gt;
  QuestNote Harnquist asked if we want to help forging a new longsword.&lt;br /&gt;
  Complete Searching the blacksmith Step 2.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 3&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15003.&lt;br /&gt;
  Menu: Yes, sure I would like help.&lt;br /&gt;
  Harnquist: Great, then please bring me 10 iron ore.&lt;br /&gt;
  QuestNote I agreed to help, and Harnquist asked for 10 iron ore.&lt;br /&gt;
  Complete Searching the blacksmith Step 3.&lt;br /&gt;
&lt;br /&gt;
  ... NoRepeat&lt;br /&gt;
  # Step 4&lt;br /&gt;
  Require completion of Searching the blacksmith step 2.&lt;br /&gt;
  P: 15004.&lt;br /&gt;
  Menu: No sorry, I cannot do it right now.&lt;br /&gt;
  Harnquist: Ok, come back later then.&lt;br /&gt;
  QuestNote I had to refuse Harnquist offer for now.&lt;br /&gt;
  Complete Searching the blacksmith Step 4.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25744</id>
		<title>Quest scripts syntax for AI</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Quest_scripts_syntax_for_AI&amp;diff=25744"/>
		<updated>2026-04-06T14:54:43Z</updated>

		<summary type="html">&lt;p&gt;Talad: Created page with &amp;quot;This is the syntax to create a quest script.  Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.  The quest script is divided in steps. Each one being separated with this line:  ... NoRepeat  This line tells the engine to create a new step. Only the first step does not have the ... line  Every step starting from the second one, start with a comment stating the step number, this is important for readability. Exam...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the syntax to create a quest script.&lt;br /&gt;
&lt;br /&gt;
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.&lt;br /&gt;
&lt;br /&gt;
The quest script is divided in steps. Each one being separated with this line:&lt;br /&gt;
&lt;br /&gt;
... NoRepeat&lt;br /&gt;
&lt;br /&gt;
This line tells the engine to create a new step. Only the first step does not have the ... line&lt;br /&gt;
&lt;br /&gt;
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:&lt;br /&gt;
&lt;br /&gt;
# Step 2&lt;br /&gt;
&lt;br /&gt;
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.&lt;br /&gt;
&lt;br /&gt;
Requiments are expressed like this, where we substitute &amp;lt;quest name&amp;gt; with the name of the quest:&lt;br /&gt;
&lt;br /&gt;
Require completion of &amp;lt;quest name&amp;gt; step 2.&lt;br /&gt;
&lt;br /&gt;
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:&lt;br /&gt;
&lt;br /&gt;
P: 15002&lt;br /&gt;
&lt;br /&gt;
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:&lt;br /&gt;
&lt;br /&gt;
Menu: Hello, who are you?&lt;br /&gt;
&lt;br /&gt;
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:&lt;br /&gt;
&lt;br /&gt;
Harnquist: I&#039;m the local blacksmith!&lt;br /&gt;
&lt;br /&gt;
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:&lt;br /&gt;
&lt;br /&gt;
QuestNote You met Harnquist the local blacksmith.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Quest name&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Instances&amp;diff=25743</id>
		<title>Instances</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Instances&amp;diff=25743"/>
		<updated>2026-03-07T22:22:29Z</updated>

		<summary type="html">&lt;p&gt;Talad: Created page with &amp;quot;== I&amp;#039;&amp;#039;&amp;#039;nstance 0&amp;#039;&amp;#039;&amp;#039; == This is the default instance where player are placed when created, and where all our NPCs and visible items are.  Loaded by the server always.  == &amp;#039;&amp;#039;&amp;#039;Instance 1&amp;#039;&amp;#039;&amp;#039; == Is reserved to:  * guildhouse locks, which are real item placed on the ground, that connect the door with the actual guildhouse instance * Action location containers, example a forge connected to a 3d mesh in the level, maybe have a container representing the forge in instance 1. The...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== I&#039;&#039;&#039;nstance 0&#039;&#039;&#039; ==&lt;br /&gt;
This is the default instance where player are placed when created, and where all our NPCs and visible items are.&lt;br /&gt;
&lt;br /&gt;
Loaded by the server always.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Instance 1&#039;&#039;&#039; ==&lt;br /&gt;
Is reserved to:&lt;br /&gt;
&lt;br /&gt;
* guildhouse locks, which are real item placed on the ground, that connect the door with the actual guildhouse instance&lt;br /&gt;
* Action location containers, example a forge connected to a 3d mesh in the level, maybe have a container representing the forge in instance 1. The container will not be visible by the player directly, but will be accessed when he click on the action location&lt;br /&gt;
&lt;br /&gt;
Loaded by the server always.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Instances &amp;gt;1 and &amp;lt;first guildhouse&#039;&#039;&#039; ==&lt;br /&gt;
This at the moment is no man&#039;s lands because it&#039;s not loaded by the server at startup, and is not a guildhouse and so not loaded dynamically.&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Guildhouse Instances&#039;&#039;&#039; ==&lt;br /&gt;
Based on the lock item_instances id we determine the instance where the guildhouse is located. Anyway guildhouses have unique coordinates and are neven overlapping. &lt;br /&gt;
&lt;br /&gt;
At the moment the lowest one is &#039;&#039;&#039;1000&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Loaded by the server on demand when the first player enters the guildhouse.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Config&amp;diff=25742</id>
		<title>PSUnreal Config</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Config&amp;diff=25742"/>
		<updated>2026-03-07T22:13:36Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Dynamic elements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Static elements ==&lt;br /&gt;
&lt;br /&gt;
* [[Config Races]]&lt;br /&gt;
&lt;br /&gt;
* [[Config Character Creation]]&lt;br /&gt;
&lt;br /&gt;
* [[How to define Sectors]]&lt;br /&gt;
&lt;br /&gt;
* [[Music and Ambience Sounds]]&lt;br /&gt;
*[[Creatures and Attack sounds]]&lt;br /&gt;
*[[Creatures, Attack Types and Attacks]]&lt;br /&gt;
&lt;br /&gt;
* Lights&lt;br /&gt;
&lt;br /&gt;
* [[HowtoAddASpellToTheDatabase|Howto add a spell to the database.]]&lt;br /&gt;
*[[Combat and chase acceptance range]]&lt;br /&gt;
*[[Factions and Organizations]]&lt;br /&gt;
*[[Weapon Trails]]&lt;br /&gt;
*[[Voiceovers (audio files)]]&lt;br /&gt;
&lt;br /&gt;
== Dynamic elements ==&lt;br /&gt;
&lt;br /&gt;
* [[PSUnreal Proximity Triggers]]&lt;br /&gt;
&lt;br /&gt;
* [[Random Generated events]]&lt;br /&gt;
&lt;br /&gt;
* [[Hunt Locations and Natural Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Levers and Interactable Objects]]&lt;br /&gt;
&lt;br /&gt;
* [[Traps]]&lt;br /&gt;
* [[Instances]]&lt;br /&gt;
*[[Loot]]&lt;br /&gt;
*[[PSUnreal Guildhouses|Guildhouses (action locations)]]&lt;br /&gt;
*[[Setting Items]]&lt;br /&gt;
*[[Add new NPC]]&lt;br /&gt;
*[[Add Waypoints and paths]]&lt;br /&gt;
*[[Minigames]]&lt;br /&gt;
*[[Procedural Dungeon Generation]]&lt;br /&gt;
*[[Reload - Reloading at runtime]]&lt;br /&gt;
*[[PSUnreal Fishing Setup|Fishing Setup]]&lt;br /&gt;
&lt;br /&gt;
== Npcs ==&lt;br /&gt;
&lt;br /&gt;
* Behaviours: Nearly all we have is documented in [[NpcClient Design|this page]] and its sub pages&lt;br /&gt;
* [[KAs (Knowledge Areas) list and structure|Knowledge Areas]] (for dialogues)&lt;br /&gt;
&lt;br /&gt;
== Quests ==&lt;br /&gt;
&lt;br /&gt;
* [[Quest scripts syntax]]&lt;br /&gt;
&lt;br /&gt;
== Mechanisms ==&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25741</id>
		<title>Tribe Design</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25741"/>
		<updated>2026-02-17T21:35:42Z</updated>

		<summary type="html">&lt;p&gt;Talad: Undo revision 25740 by Talad (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Tribe Design =&lt;br /&gt;
&lt;br /&gt;
The tribe design is done using [[Behaviors_and_Reactions|NPC Behaviors]] and [[Tribe_Scripting|Recipes]]. Tribe members are assigned tasks based on what the recipes dictates the tribe to achieve. This system uses a Recipe Manager which takes care of parsing recipes, breaking the initial recipe into subtasks and telling the npcs which action to take.&lt;br /&gt;
&lt;br /&gt;
== Classes ==&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
scale 0.8&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : members&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : deadMembers&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Resource : resources&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Memory : memories&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Asset : assets&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Knowledge : knowledge&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;1..1&amp;quot; RecipeTreeNode : recipes&lt;br /&gt;
RecipeTreeNode *-- Recipe&lt;br /&gt;
RecipeManager &amp;quot;1&amp;quot; *-- &amp;quot;N..1&amp;quot; Recipe : all recipes&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Members &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tribe members (both dead &amp;amp; alive) are kept in an array in the Tribe Class. They are all represented by the NPC class. The tribal class only has methods to attach a tribe member. For spawning new members the server (gemSupervisor &amp;amp; entityManager classes) and the npcclient class are responsable.&lt;br /&gt;
&lt;br /&gt;
Tribe members can have different types. (Discussion needed about tribe types)&lt;br /&gt;
&lt;br /&gt;
Tribe members are being kept in the &#039;tribe_members&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Resources &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A resource is kept in a data structure (&#039;&#039;Tribe::Resource&#039;&#039;) containing it&#039;s name, nick and quantity. The tribe class has methods for adding, modifying, storing and completely deleting resources.&lt;br /&gt;
&lt;br /&gt;
Resources are being kept in the &#039;sc_tribe_resources&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Memories &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A memory is a location of some importance to the tribe. (E.g. a mine, a field, an enemy, etc)&lt;br /&gt;
&lt;br /&gt;
A memory is kept in a data structure (&#039;&#039;Tribe::Memory&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name and a link to an NPC (which is NULL if the memory is public to all tribe members, or != NULL if it&#039;s private to a tribe member). The tribe object has methods to add, store, modify and search memories.&lt;br /&gt;
&lt;br /&gt;
Tribe members also have a memory slot for keeping it&#039;s current task location. (see bufferMemory attribute of NPC class).&lt;br /&gt;
&lt;br /&gt;
Tribe memories are being kept in the &#039;sc_tribe_memories&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Assets &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assets are belongings of the tribe. They can represent buildings, items or spots to be built in the future.&lt;br /&gt;
&lt;br /&gt;
An asset is represented by a data structure (&#039;&#039;Tribe::Asset&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name, it&#039;s quantity (relevant just for items) and it&#039;s type (Building Spot, Building or Item). The tribe class has methods for adding, editing and deleting assets. It also has methods for managing buildings. (e.g. Replace a building spot with the actual building after the workers built it)&lt;br /&gt;
&lt;br /&gt;
Tribe assets are being kept in the &#039;sc_tribe_assets&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Knowledge &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Knowledge represents the information the tribe has gathered and the technologies they can use. (E.g. Ironworks, pottery, horseback riding, alphabet, math, etc)&lt;br /&gt;
&lt;br /&gt;
Technically, they are just strings used as tokens to prove the tribe has acquired knowledge or not.&lt;br /&gt;
&lt;br /&gt;
Knowledge is kept in an array of strings.&lt;br /&gt;
&lt;br /&gt;
Tribe knowledge is being kept in the &#039;sc_tribe_knowledge&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe Tree Node &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This class represents a node of the recipe tree describing the tribe current tasks. Each recipe tree node contains a link to it&#039;s recipe, waiting times, current requirement, current algorithm step and relationship information regarding other recipes. (just as a standard Tree, it may have parents and descendants).&lt;br /&gt;
&lt;br /&gt;
RecipeTreeNodes are not being stored in any database. They are just used during runtime as an AI for tribes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A recipe is a set of requirements and algorithm steps regarding a task that needs to be done. Recipes can vary from simple (Gather a resource) to very complex (Build an entire civilization).&lt;br /&gt;
&lt;br /&gt;
Recipes are being stored in the &#039;tribe_recipes&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
== Sequences ==&lt;br /&gt;
&lt;br /&gt;
=== Advance Sequence ===&lt;br /&gt;
&lt;br /&gt;
Advance sequence is the heart of the Tribe system. The NPCClient will advance the brain 4 times a second. On each loop, this sequence takes care of special cases (e.g.: 0 npcs alive in tribe) and assigns tasks to idle members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
-&amp;gt; NPCClient : Advance&lt;br /&gt;
activate NPCClient&lt;br /&gt;
loop For each tribe&lt;br /&gt;
  NPCClient -&amp;gt; Tribe : Advance&lt;br /&gt;
  activate Tribe&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AdvanceResources&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AddCyclicRecipes&lt;br /&gt;
  loop For each member&lt;br /&gt;
     alt For NPC&#039;s that have the tribe&#039;s idle behavior&lt;br /&gt;
        Tribe -&amp;gt; Tribe : Get highest priority recipe&lt;br /&gt;
        Tribe -&amp;gt; RecipeManager : Apply Recipe&lt;br /&gt;
        activate RecipeManager&lt;br /&gt;
        Tribe &amp;lt;- RecipeManager&lt;br /&gt;
        deactivate RecipeManager&lt;br /&gt;
     end&lt;br /&gt;
  end&lt;br /&gt;
  NPCClient &amp;lt;-- Tribe&lt;br /&gt;
  deactivate Tribe&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;-- NPCClient&lt;br /&gt;
deactivate NPCClient&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up tribes ==&lt;br /&gt;
There are 3 main database tables that need to be populated.&lt;br /&gt;
&lt;br /&gt;
* [[TribesTable|tribes]]&lt;br /&gt;
** Each row represents one tribe, which must have a home position/sector and a radius in which to resurrect dead members.&lt;br /&gt;
** max_size sets the maximum number of members.&lt;br /&gt;
** wealth_resource sets the different types of resource that a tribe can mine in order to grow and/or sustain itself. This needs more work however the most important one is wealth_resource_growth which is the default rate at which a resource will grow without any work per second.&lt;br /&gt;
** reproduction_cost is the amount of resources required to reproduce.&lt;br /&gt;
** tribal_recipe loads the initial recipe that sets tribe traits and loads tribe goals (recipes)&lt;br /&gt;
&lt;br /&gt;
* tribe_members&lt;br /&gt;
** Each row is an association between a PID (on the server side) and a tribe.&lt;br /&gt;
&lt;br /&gt;
* tribe_recipes&lt;br /&gt;
** Each row represents a recipe (name,requirements,algorithm). This table needs to be loaded in order to order tribe members what to do. Not having recipes, or requesting a recipe that does not exist will result in a termination of the npcclient.&lt;br /&gt;
&lt;br /&gt;
Additionally, tables for extra tribe info need to be created:&lt;br /&gt;
*sc_tribe_assets&lt;br /&gt;
*sc_tribe_knowledge&lt;br /&gt;
*sc_tribe_memories&lt;br /&gt;
*sc_tribe_resources&lt;br /&gt;
&lt;br /&gt;
== Tribe day-to-day life ==&lt;br /&gt;
&lt;br /&gt;
Tribe members are normal NPCs. They all expand a base NPCType called &#039;AbstractTribesman&#039;, on which each tribe adds it&#039;s own particularities (e.g. when to go to sleep, what to do when they meet a stranger, etc). Read more on [[NPC Scripting]]. The &#039;AbstractTribesman&#039; contains behaviors that describe generic actions: breeding, gathering, mining, fighting, exploring and working. (trading to be added soon). These generic behaviors use some data buffers to read data from during runtime in order to execute the same behavior on different data. (different mines, different fields, different building places, etc)&lt;br /&gt;
&lt;br /&gt;
Upon parsing recipes, different perceptions are fired on the tribesmen. This process simulates a working society on which a superior entity assigns tasks to the population.&lt;br /&gt;
&lt;br /&gt;
== Tribe death ==&lt;br /&gt;
When all the members die, then a member will be resurrected if there are 10*reproduction_cost resources available.&lt;br /&gt;
&lt;br /&gt;
= Runtime =&lt;br /&gt;
&lt;br /&gt;
==Step #1 (Loading)==&lt;br /&gt;
&lt;br /&gt;
(executed only once, on NPCClient&#039;s startup. No further interrogation on the database should be done)&lt;br /&gt;
&lt;br /&gt;
On NPCClient&#039;s startup everything is loaded into the classes.&lt;br /&gt;
&lt;br /&gt;
1) The Recipe Manager loads all available recipes from mysql:&#039;tribe_recipes&#039; and add those in a flat array &amp;quot;recipes&amp;quot;, one entry per recipe.&lt;br /&gt;
&lt;br /&gt;
2) psNPCManager::LoadTribes() loads from the database all the tribes from mysql:&#039;tribes&#039;&lt;br /&gt;
&lt;br /&gt;
3) For each tribe psNPCManager::LoadTribes() loads all the information regarding the tribe:&lt;br /&gt;
*resources from mysql:&#039;sc_tribe_resources&#039;&lt;br /&gt;
*memories from mysql:&#039;sc_tribe_memories&#039;&lt;br /&gt;
*knowledge from mysql:&#039;sc_tribe_knowledge&#039;&lt;br /&gt;
*assets from mysql:&#039;sc_tribe_assets&#039;&lt;br /&gt;
*basic tribe information from mysql:&#039;tribes&#039; (including the ID of the tribal recipe, more details below)&lt;br /&gt;
*npc&#039;s are loaded by the psNPCClient and assigned to the tribe&lt;br /&gt;
&lt;br /&gt;
4) For each tribe it calls RecipeManager::AddTribe() , which parses the requirements and keeps them in the Recipe Class. (Recipe::requirements&amp;lt;Recipe::Requirement&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
5) Further on, each Tribal Object is linked to the Recipe Manager. (a pointer is sent and loaded into a csArray)&lt;br /&gt;
For each tribe loaded, the Recipe Manager does the following:&lt;br /&gt;
* assembles a data structure named &#039;TribeData&#039;&lt;br /&gt;
* links the tribal recipe belonging to this tribe to &#039;TribeData&#039;&lt;br /&gt;
* parses the information in the tribal recipe and assign the stats to csStrings in &#039;TribeData&#039;&lt;br /&gt;
* computes a tribal npctype having as parent the &#039;AbstractTribesman&#039; npctype. The difference is done by adding reactions to whatever the tribe reacts to. (attacking any player nearby or simply greeting them, sleeping at day or at night, etc)&lt;br /&gt;
&lt;br /&gt;
==Step #2 (RunTime)==&lt;br /&gt;
&lt;br /&gt;
(executed once on startup and each time a recipe is completed)&lt;br /&gt;
&lt;br /&gt;
1) NPCManager is ticking all the tribes with frequency TRIBE_TICK (tribe.h) and calling Advance() on each tribe&lt;br /&gt;
&lt;br /&gt;
2) Each tribe searches for idle members, to assign tasks in Tribe::Advance()&lt;br /&gt;
&lt;br /&gt;
3) updates the waiting time of all the TOP level recipe (the ones listed in mysql:&#039;tribes_recipe.algorithm&#039; as loadRecipe())&lt;br /&gt;
&lt;br /&gt;
4) select the best recipe based on lowest wait time and high priority (where priority is defined level in the recipe tree, the lowest the better)&lt;br /&gt;
&lt;br /&gt;
The Tribal Object selects the top-priority recipe which needs execution and sends it to the Recipe Manager.&lt;br /&gt;
&lt;br /&gt;
The Recipe Manager parses the contents of the recipe:&lt;br /&gt;
It checks for requirements. If requirements are met it proceeds with parsing the algorithm (see step #3). If requirements are not met, it pushes the Recipes which achieves the requirement on top of the tribe&#039;s recipe list.&lt;br /&gt;
Requirement parsing can be done two ways:&lt;br /&gt;
* Distributed Parsing : The parser takes the first requirement and checks it + tries to achieve it. When the same recipe gets parsed again, the parser takes the second requirement (even if the first is still not met) and tries to achieve it. This way, the parser loops through requirements and tries to achieve all in parallel.&lt;br /&gt;
* Concentrated Parsing : The parser tries to achieve the first requirement on each recipe parse until it is met. After that it picks the second requirement and applies the same principle.&lt;br /&gt;
&lt;br /&gt;
5) A new child of the RecipeTree is added as soon as the tribe decides that something can be executed (all requirements met). This is added to &#039;tribalRecipe&#039; variable. Then the algorithm of this recipe is executed (for example percect NPC to go work), and the child is immediately removed from the tree. This mean that while the NPC is working, the tree does not contain that child anymore, so if another NPC becomes available, it will pick the NEXT requirement in line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example of Distributed vs Concentracted Parsing:&lt;br /&gt;
&lt;br /&gt;
E.G.: We want our tribe to gain 150 of Coal, Silver, Gold and Platinum.&lt;br /&gt;
&lt;br /&gt;
Using Distributed Parsing:&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
*Step 2: Assign miner to Silver.&lt;br /&gt;
*Step 3: Assign miner to Gold.&lt;br /&gt;
*Step 4: Assign miner to Platinum.&lt;br /&gt;
*Step 5: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Using Concentrated Parsing: (in this example we consider each step gets the tribe 1 quantity of resource)&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
*Step 150: Assign miner to Coal.&lt;br /&gt;
*Step 151: Assign miner to Silver.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
==Step #3 (Recipe&#039;s Algorithm)==&lt;br /&gt;
&lt;br /&gt;
(executed for each step the algorithm has, each time a recipe needs execution)&lt;br /&gt;
&lt;br /&gt;
The Recipe has an algorithm stored as a csArray&amp;lt;csString&amp;gt;. When an algorithm needs an execution, the Recipe Manager takes each string and parses it. Depending on the rules we set, the Recipe Manager will tell the tribal object which perceptions to fire on their npcs. A complete set of algorithm and requirements functions can be found [[Tribe_Scripting|here]].&lt;br /&gt;
&lt;br /&gt;
(E.g.: If the recipe&#039;s algorithm require us to send 10 workers to build a town hall, the tribal object will be told to fire a &amp;quot;go to work&amp;quot; perception on 10 worker tribesman)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mining tribe ==&lt;br /&gt;
&lt;br /&gt;
The mining tribe is defined in tribes table with:&lt;br /&gt;
* a tribal_recipe value pointing to tribe_recipe table which is defining the brain, aggressivity, growth, ...&lt;br /&gt;
* a set of members inside tribe_members table, each member is flagged with a tag, example &amp;quot;Miner&amp;quot; which then be used in the selection of workers for a specific task&lt;br /&gt;
&lt;br /&gt;
The Brain definition above will point to sc_npctypes table, which will most likely derive from AbstractTribesman&lt;br /&gt;
&lt;br /&gt;
AbstractTribesman will define the reactions/behaviors for example&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the &#039;Explore&#039; behavior, tribe members will move around the map. psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range. This perception will make the NPC find the mine.&lt;br /&gt;
&lt;br /&gt;
After mining from an unknown deposit, the npcclient will receive a psWorkDoneMessage telling it what his npc just mined. This function renames the former &#039;mine&#039; Memory with it&#039;s real deposit name.&lt;br /&gt;
&lt;br /&gt;
Two things need to happen:&lt;br /&gt;
&lt;br /&gt;
1) The tribe sends a member to explore for mining locations, this happens with &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) The tribe sends a members to mine for a KNOWN resource location, this happens with&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important methods:&lt;br /&gt;
* psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range&lt;br /&gt;
* NPCType::FirePerception() is checking if this NPC should automemorize the new locations sensed&lt;br /&gt;
* Tribe::Memorize() where we add the location found to the NPC memory&lt;br /&gt;
&lt;br /&gt;
The mining tribe will send his members to explore in search of resources. This is done with the Behavior &amp;quot;Explore&amp;quot; in the AbstractTribsmen NPC Type stored in sc_npctypes.&lt;br /&gt;
&lt;br /&gt;
== Tribe reaction to attacks ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In RecipeManager::CreateGlobalNPCType() we check the Unity Trait of the tribe: cowards / normal / united&lt;br /&gt;
&lt;br /&gt;
Anything but cowards gets &lt;br /&gt;
 reaction = &amp;quot;&amp;lt;react event=\&amp;quot;attack\&amp;quot; behavior=\&amp;quot;united_attacked\&amp;quot; delta=\&amp;quot;100\&amp;quot; /&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a player attacks a member of a tribe , the line above triggers a behavior on the attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In AbstractTribesman this happens:&lt;br /&gt;
  &amp;lt;behavior name=&amp;quot;united_attacked&amp;quot; decay=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;talk text=&amp;quot;The tribe is under attack!&amp;quot; target=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;locate obj=&amp;quot;tribe:target&amp;quot; range=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;percept event=&amp;quot;tribesman attacked&amp;quot; target=&amp;quot;tribe&amp;quot; range=&amp;quot;30&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;percept event=&amp;quot;fight&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/behavior&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the important piece is target =&amp;quot;tribe&amp;quot; because this trigger a perception in the tribe in Tribe::SendPerception() that scans all the NPCs and sends the given perception = &amp;quot;tribesman attacked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is defined again in AbstractTribesman &lt;br /&gt;
 &amp;lt;react event=&amp;quot;tribesman attacked&amp;quot;       behavior=&amp;quot;normal_attacked&amp;quot; delta=&amp;quot;100&amp;quot;  do_not_interrupt=&amp;quot;Chase&amp;quot;/&amp;gt;&lt;br /&gt;
and this points to a normal attack! Which just asks the npc to fight.&lt;br /&gt;
[[Category:Engine documents]] [[Category:NPCClient Design]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25740</id>
		<title>Tribe Design</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25740"/>
		<updated>2026-02-16T22:53:35Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Tribe reaction to attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Tribe Design =&lt;br /&gt;
&lt;br /&gt;
The tribe design is done using [[Behaviors_and_Reactions|NPC Behaviors]] and [[Tribe_Scripting|Recipes]]. Tribe members are assigned tasks based on what the recipes dictates the tribe to achieve. This system uses a Recipe Manager which takes care of parsing recipes, breaking the initial recipe into subtasks and telling the npcs which action to take.&lt;br /&gt;
&lt;br /&gt;
== Classes ==&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
scale 0.8&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : members&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : deadMembers&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Resource : resources&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Memory : memories&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Asset : assets&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Knowledge : knowledge&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;1..1&amp;quot; RecipeTreeNode : recipes&lt;br /&gt;
RecipeTreeNode *-- Recipe&lt;br /&gt;
RecipeManager &amp;quot;1&amp;quot; *-- &amp;quot;N..1&amp;quot; Recipe : all recipes&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Members &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tribe members (both dead &amp;amp; alive) are kept in an array in the Tribe Class. They are all represented by the NPC class. The tribal class only has methods to attach a tribe member. For spawning new members the server (gemSupervisor &amp;amp; entityManager classes) and the npcclient class are responsable.&lt;br /&gt;
&lt;br /&gt;
Tribe members can have different types. (Discussion needed about tribe types)&lt;br /&gt;
&lt;br /&gt;
Tribe members are being kept in the &#039;tribe_members&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Resources &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A resource is kept in a data structure (&#039;&#039;Tribe::Resource&#039;&#039;) containing it&#039;s name, nick and quantity. The tribe class has methods for adding, modifying, storing and completely deleting resources.&lt;br /&gt;
&lt;br /&gt;
Resources are being kept in the &#039;sc_tribe_resources&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Memories &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A memory is a location of some importance to the tribe. (E.g. a mine, a field, an enemy, etc)&lt;br /&gt;
&lt;br /&gt;
A memory is kept in a data structure (&#039;&#039;Tribe::Memory&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name and a link to an NPC (which is NULL if the memory is public to all tribe members, or != NULL if it&#039;s private to a tribe member). The tribe object has methods to add, store, modify and search memories.&lt;br /&gt;
&lt;br /&gt;
Tribe members also have a memory slot for keeping it&#039;s current task location. (see bufferMemory attribute of NPC class).&lt;br /&gt;
&lt;br /&gt;
Tribe memories are being kept in the &#039;sc_tribe_memories&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Assets &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assets are belongings of the tribe. They can represent buildings, items or spots to be built in the future.&lt;br /&gt;
&lt;br /&gt;
An asset is represented by a data structure (&#039;&#039;Tribe::Asset&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name, it&#039;s quantity (relevant just for items) and it&#039;s type (Building Spot, Building or Item). The tribe class has methods for adding, editing and deleting assets. It also has methods for managing buildings. (e.g. Replace a building spot with the actual building after the workers built it)&lt;br /&gt;
&lt;br /&gt;
Tribe assets are being kept in the &#039;sc_tribe_assets&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Knowledge &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Knowledge represents the information the tribe has gathered and the technologies they can use. (E.g. Ironworks, pottery, horseback riding, alphabet, math, etc)&lt;br /&gt;
&lt;br /&gt;
Technically, they are just strings used as tokens to prove the tribe has acquired knowledge or not.&lt;br /&gt;
&lt;br /&gt;
Knowledge is kept in an array of strings.&lt;br /&gt;
&lt;br /&gt;
Tribe knowledge is being kept in the &#039;sc_tribe_knowledge&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe Tree Node &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This class represents a node of the recipe tree describing the tribe current tasks. Each recipe tree node contains a link to it&#039;s recipe, waiting times, current requirement, current algorithm step and relationship information regarding other recipes. (just as a standard Tree, it may have parents and descendants).&lt;br /&gt;
&lt;br /&gt;
RecipeTreeNodes are not being stored in any database. They are just used during runtime as an AI for tribes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A recipe is a set of requirements and algorithm steps regarding a task that needs to be done. Recipes can vary from simple (Gather a resource) to very complex (Build an entire civilization).&lt;br /&gt;
&lt;br /&gt;
Recipes are being stored in the &#039;tribe_recipes&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
== Sequences ==&lt;br /&gt;
&lt;br /&gt;
=== Advance Sequence ===&lt;br /&gt;
&lt;br /&gt;
Advance sequence is the heart of the Tribe system. The NPCClient will advance the brain 4 times a second. On each loop, this sequence takes care of special cases (e.g.: 0 npcs alive in tribe) and assigns tasks to idle members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
-&amp;gt; NPCClient : Advance&lt;br /&gt;
activate NPCClient&lt;br /&gt;
loop For each tribe&lt;br /&gt;
  NPCClient -&amp;gt; Tribe : Advance&lt;br /&gt;
  activate Tribe&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AdvanceResources&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AddCyclicRecipes&lt;br /&gt;
  loop For each member&lt;br /&gt;
     alt For NPC&#039;s that have the tribe&#039;s idle behavior&lt;br /&gt;
        Tribe -&amp;gt; Tribe : Get highest priority recipe&lt;br /&gt;
        Tribe -&amp;gt; RecipeManager : Apply Recipe&lt;br /&gt;
        activate RecipeManager&lt;br /&gt;
        Tribe &amp;lt;- RecipeManager&lt;br /&gt;
        deactivate RecipeManager&lt;br /&gt;
     end&lt;br /&gt;
  end&lt;br /&gt;
  NPCClient &amp;lt;-- Tribe&lt;br /&gt;
  deactivate Tribe&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;-- NPCClient&lt;br /&gt;
deactivate NPCClient&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up tribes ==&lt;br /&gt;
There are 3 main database tables that need to be populated.&lt;br /&gt;
&lt;br /&gt;
* [[TribesTable|tribes]]&lt;br /&gt;
** Each row represents one tribe, which must have a home position/sector and a radius in which to resurrect dead members.&lt;br /&gt;
** max_size sets the maximum number of members.&lt;br /&gt;
** wealth_resource sets the different types of resource that a tribe can mine in order to grow and/or sustain itself. This needs more work however the most important one is wealth_resource_growth which is the default rate at which a resource will grow without any work per second.&lt;br /&gt;
** reproduction_cost is the amount of resources required to reproduce.&lt;br /&gt;
** tribal_recipe loads the initial recipe that sets tribe traits and loads tribe goals (recipes)&lt;br /&gt;
&lt;br /&gt;
* tribe_members&lt;br /&gt;
** Each row is an association between a PID (on the server side) and a tribe.&lt;br /&gt;
&lt;br /&gt;
* tribe_recipes&lt;br /&gt;
** Each row represents a recipe (name,requirements,algorithm). This table needs to be loaded in order to order tribe members what to do. Not having recipes, or requesting a recipe that does not exist will result in a termination of the npcclient.&lt;br /&gt;
&lt;br /&gt;
Additionally, tables for extra tribe info need to be created:&lt;br /&gt;
*sc_tribe_assets&lt;br /&gt;
*sc_tribe_knowledge&lt;br /&gt;
*sc_tribe_memories&lt;br /&gt;
*sc_tribe_resources&lt;br /&gt;
&lt;br /&gt;
== Tribe day-to-day life ==&lt;br /&gt;
&lt;br /&gt;
Tribe members are normal NPCs. They all expand a base NPCType called &#039;AbstractTribesman&#039;, on which each tribe adds it&#039;s own particularities (e.g. when to go to sleep, what to do when they meet a stranger, etc). Read more on [[NPC Scripting]]. The &#039;AbstractTribesman&#039; contains behaviors that describe generic actions: breeding, gathering, mining, fighting, exploring and working. (trading to be added soon). These generic behaviors use some data buffers to read data from during runtime in order to execute the same behavior on different data. (different mines, different fields, different building places, etc)&lt;br /&gt;
&lt;br /&gt;
Upon parsing recipes, different perceptions are fired on the tribesmen. This process simulates a working society on which a superior entity assigns tasks to the population.&lt;br /&gt;
&lt;br /&gt;
== Tribe death ==&lt;br /&gt;
When all the members die, then a member will be resurrected if there are 10*reproduction_cost resources available.&lt;br /&gt;
&lt;br /&gt;
= Runtime =&lt;br /&gt;
&lt;br /&gt;
==Step #1 (Loading)==&lt;br /&gt;
&lt;br /&gt;
(executed only once, on NPCClient&#039;s startup. No further interrogation on the database should be done)&lt;br /&gt;
&lt;br /&gt;
On NPCClient&#039;s startup everything is loaded into the classes.&lt;br /&gt;
&lt;br /&gt;
1) The Recipe Manager loads all available recipes from mysql:&#039;tribe_recipes&#039; and add those in a flat array &amp;quot;recipes&amp;quot;, one entry per recipe.&lt;br /&gt;
&lt;br /&gt;
2) psNPCManager::LoadTribes() loads from the database all the tribes from mysql:&#039;tribes&#039;&lt;br /&gt;
&lt;br /&gt;
3) For each tribe psNPCManager::LoadTribes() loads all the information regarding the tribe:&lt;br /&gt;
*resources from mysql:&#039;sc_tribe_resources&#039;&lt;br /&gt;
*memories from mysql:&#039;sc_tribe_memories&#039;&lt;br /&gt;
*knowledge from mysql:&#039;sc_tribe_knowledge&#039;&lt;br /&gt;
*assets from mysql:&#039;sc_tribe_assets&#039;&lt;br /&gt;
*basic tribe information from mysql:&#039;tribes&#039; (including the ID of the tribal recipe, more details below)&lt;br /&gt;
*npc&#039;s are loaded by the psNPCClient and assigned to the tribe&lt;br /&gt;
&lt;br /&gt;
4) For each tribe it calls RecipeManager::AddTribe() , which parses the requirements and keeps them in the Recipe Class. (Recipe::requirements&amp;lt;Recipe::Requirement&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
5) Further on, each Tribal Object is linked to the Recipe Manager. (a pointer is sent and loaded into a csArray)&lt;br /&gt;
For each tribe loaded, the Recipe Manager does the following:&lt;br /&gt;
* assembles a data structure named &#039;TribeData&#039;&lt;br /&gt;
* links the tribal recipe belonging to this tribe to &#039;TribeData&#039;&lt;br /&gt;
* parses the information in the tribal recipe and assign the stats to csStrings in &#039;TribeData&#039;&lt;br /&gt;
* computes a tribal npctype having as parent the &#039;AbstractTribesman&#039; npctype. The difference is done by adding reactions to whatever the tribe reacts to. (attacking any player nearby or simply greeting them, sleeping at day or at night, etc)&lt;br /&gt;
&lt;br /&gt;
==Step #2 (RunTime)==&lt;br /&gt;
&lt;br /&gt;
(executed once on startup and each time a recipe is completed)&lt;br /&gt;
&lt;br /&gt;
1) NPCManager is ticking all the tribes with frequency TRIBE_TICK (tribe.h) and calling Advance() on each tribe&lt;br /&gt;
&lt;br /&gt;
2) Each tribe searches for idle members, to assign tasks in Tribe::Advance()&lt;br /&gt;
&lt;br /&gt;
3) updates the waiting time of all the TOP level recipe (the ones listed in mysql:&#039;tribes_recipe.algorithm&#039; as loadRecipe())&lt;br /&gt;
&lt;br /&gt;
4) select the best recipe based on lowest wait time and high priority (where priority is defined level in the recipe tree, the lowest the better)&lt;br /&gt;
&lt;br /&gt;
The Tribal Object selects the top-priority recipe which needs execution and sends it to the Recipe Manager.&lt;br /&gt;
&lt;br /&gt;
The Recipe Manager parses the contents of the recipe:&lt;br /&gt;
It checks for requirements. If requirements are met it proceeds with parsing the algorithm (see step #3). If requirements are not met, it pushes the Recipes which achieves the requirement on top of the tribe&#039;s recipe list.&lt;br /&gt;
Requirement parsing can be done two ways:&lt;br /&gt;
* Distributed Parsing : The parser takes the first requirement and checks it + tries to achieve it. When the same recipe gets parsed again, the parser takes the second requirement (even if the first is still not met) and tries to achieve it. This way, the parser loops through requirements and tries to achieve all in parallel.&lt;br /&gt;
* Concentrated Parsing : The parser tries to achieve the first requirement on each recipe parse until it is met. After that it picks the second requirement and applies the same principle.&lt;br /&gt;
&lt;br /&gt;
5) A new child of the RecipeTree is added as soon as the tribe decides that something can be executed (all requirements met). This is added to &#039;tribalRecipe&#039; variable. Then the algorithm of this recipe is executed (for example percect NPC to go work), and the child is immediately removed from the tree. This mean that while the NPC is working, the tree does not contain that child anymore, so if another NPC becomes available, it will pick the NEXT requirement in line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example of Distributed vs Concentracted Parsing:&lt;br /&gt;
&lt;br /&gt;
E.G.: We want our tribe to gain 150 of Coal, Silver, Gold and Platinum.&lt;br /&gt;
&lt;br /&gt;
Using Distributed Parsing:&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
*Step 2: Assign miner to Silver.&lt;br /&gt;
*Step 3: Assign miner to Gold.&lt;br /&gt;
*Step 4: Assign miner to Platinum.&lt;br /&gt;
*Step 5: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Using Concentrated Parsing: (in this example we consider each step gets the tribe 1 quantity of resource)&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
*Step 150: Assign miner to Coal.&lt;br /&gt;
*Step 151: Assign miner to Silver.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
==Step #3 (Recipe&#039;s Algorithm)==&lt;br /&gt;
&lt;br /&gt;
(executed for each step the algorithm has, each time a recipe needs execution)&lt;br /&gt;
&lt;br /&gt;
The Recipe has an algorithm stored as a csArray&amp;lt;csString&amp;gt;. When an algorithm needs an execution, the Recipe Manager takes each string and parses it. Depending on the rules we set, the Recipe Manager will tell the tribal object which perceptions to fire on their npcs. A complete set of algorithm and requirements functions can be found [[Tribe_Scripting|here]].&lt;br /&gt;
&lt;br /&gt;
(E.g.: If the recipe&#039;s algorithm require us to send 10 workers to build a town hall, the tribal object will be told to fire a &amp;quot;go to work&amp;quot; perception on 10 worker tribesman)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mining tribe ==&lt;br /&gt;
&lt;br /&gt;
The mining tribe is defined in tribes table with:&lt;br /&gt;
* a tribal_recipe value pointing to tribe_recipe table which is defining the brain, aggressivity, growth, ...&lt;br /&gt;
* a set of members inside tribe_members table, each member is flagged with a tag, example &amp;quot;Miner&amp;quot; which then be used in the selection of workers for a specific task&lt;br /&gt;
&lt;br /&gt;
The Brain definition above will point to sc_npctypes table, which will most likely derive from AbstractTribesman&lt;br /&gt;
&lt;br /&gt;
AbstractTribesman will define the reactions/behaviors for example&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the &#039;Explore&#039; behavior, tribe members will move around the map. psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range. This perception will make the NPC find the mine.&lt;br /&gt;
&lt;br /&gt;
After mining from an unknown deposit, the npcclient will receive a psWorkDoneMessage telling it what his npc just mined. This function renames the former &#039;mine&#039; Memory with it&#039;s real deposit name.&lt;br /&gt;
&lt;br /&gt;
Two things need to happen:&lt;br /&gt;
&lt;br /&gt;
1) The tribe sends a member to explore for mining locations, this happens with &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) The tribe sends a members to mine for a KNOWN resource location, this happens with&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important methods:&lt;br /&gt;
* psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range&lt;br /&gt;
* NPCType::FirePerception() is checking if this NPC should automemorize the new locations sensed&lt;br /&gt;
* Tribe::Memorize() where we add the location found to the NPC memory&lt;br /&gt;
&lt;br /&gt;
The mining tribe will send his members to explore in search of resources. This is done with the Behavior &amp;quot;Explore&amp;quot; in the AbstractTribsmen NPC Type stored in sc_npctypes.&lt;br /&gt;
&lt;br /&gt;
== Tribe reaction to attacks ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In RecipeManager::CreateGlobalNPCType() we check the Unity Trait of the tribe: cowards / normal / united&lt;br /&gt;
&lt;br /&gt;
Anything but cowards gets &lt;br /&gt;
 reaction = &amp;quot;&amp;lt;react event=\&amp;quot;attack\&amp;quot; behavior=\&amp;quot;united_attacked\&amp;quot; delta=\&amp;quot;100\&amp;quot; /&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a player attacks a member of a tribe , the line above triggers a behavior on the attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In AbstractTribesman this happens:&lt;br /&gt;
  &amp;lt;behavior name=&amp;quot;united_attacked&amp;quot; decay=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;talk text=&amp;quot;The tribe is under attack!&amp;quot; target=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;locate obj=&amp;quot;tribe:target&amp;quot; range=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;percept event=&amp;quot;tribesman attacked&amp;quot; target=&amp;quot;tribe&amp;quot; range=&amp;quot;30&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;percept event=&amp;quot;fight&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/behavior&amp;gt;&lt;br /&gt;
[[Category:Engine documents]] [[Category:NPCClient Design]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25739</id>
		<title>Tribe Design</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25739"/>
		<updated>2026-02-16T22:53:30Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Tribe reaction to attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Tribe Design =&lt;br /&gt;
&lt;br /&gt;
The tribe design is done using [[Behaviors_and_Reactions|NPC Behaviors]] and [[Tribe_Scripting|Recipes]]. Tribe members are assigned tasks based on what the recipes dictates the tribe to achieve. This system uses a Recipe Manager which takes care of parsing recipes, breaking the initial recipe into subtasks and telling the npcs which action to take.&lt;br /&gt;
&lt;br /&gt;
== Classes ==&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
scale 0.8&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : members&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : deadMembers&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Resource : resources&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Memory : memories&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Asset : assets&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Knowledge : knowledge&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;1..1&amp;quot; RecipeTreeNode : recipes&lt;br /&gt;
RecipeTreeNode *-- Recipe&lt;br /&gt;
RecipeManager &amp;quot;1&amp;quot; *-- &amp;quot;N..1&amp;quot; Recipe : all recipes&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Members &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tribe members (both dead &amp;amp; alive) are kept in an array in the Tribe Class. They are all represented by the NPC class. The tribal class only has methods to attach a tribe member. For spawning new members the server (gemSupervisor &amp;amp; entityManager classes) and the npcclient class are responsable.&lt;br /&gt;
&lt;br /&gt;
Tribe members can have different types. (Discussion needed about tribe types)&lt;br /&gt;
&lt;br /&gt;
Tribe members are being kept in the &#039;tribe_members&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Resources &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A resource is kept in a data structure (&#039;&#039;Tribe::Resource&#039;&#039;) containing it&#039;s name, nick and quantity. The tribe class has methods for adding, modifying, storing and completely deleting resources.&lt;br /&gt;
&lt;br /&gt;
Resources are being kept in the &#039;sc_tribe_resources&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Memories &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A memory is a location of some importance to the tribe. (E.g. a mine, a field, an enemy, etc)&lt;br /&gt;
&lt;br /&gt;
A memory is kept in a data structure (&#039;&#039;Tribe::Memory&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name and a link to an NPC (which is NULL if the memory is public to all tribe members, or != NULL if it&#039;s private to a tribe member). The tribe object has methods to add, store, modify and search memories.&lt;br /&gt;
&lt;br /&gt;
Tribe members also have a memory slot for keeping it&#039;s current task location. (see bufferMemory attribute of NPC class).&lt;br /&gt;
&lt;br /&gt;
Tribe memories are being kept in the &#039;sc_tribe_memories&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Assets &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assets are belongings of the tribe. They can represent buildings, items or spots to be built in the future.&lt;br /&gt;
&lt;br /&gt;
An asset is represented by a data structure (&#039;&#039;Tribe::Asset&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name, it&#039;s quantity (relevant just for items) and it&#039;s type (Building Spot, Building or Item). The tribe class has methods for adding, editing and deleting assets. It also has methods for managing buildings. (e.g. Replace a building spot with the actual building after the workers built it)&lt;br /&gt;
&lt;br /&gt;
Tribe assets are being kept in the &#039;sc_tribe_assets&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Knowledge &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Knowledge represents the information the tribe has gathered and the technologies they can use. (E.g. Ironworks, pottery, horseback riding, alphabet, math, etc)&lt;br /&gt;
&lt;br /&gt;
Technically, they are just strings used as tokens to prove the tribe has acquired knowledge or not.&lt;br /&gt;
&lt;br /&gt;
Knowledge is kept in an array of strings.&lt;br /&gt;
&lt;br /&gt;
Tribe knowledge is being kept in the &#039;sc_tribe_knowledge&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe Tree Node &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This class represents a node of the recipe tree describing the tribe current tasks. Each recipe tree node contains a link to it&#039;s recipe, waiting times, current requirement, current algorithm step and relationship information regarding other recipes. (just as a standard Tree, it may have parents and descendants).&lt;br /&gt;
&lt;br /&gt;
RecipeTreeNodes are not being stored in any database. They are just used during runtime as an AI for tribes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A recipe is a set of requirements and algorithm steps regarding a task that needs to be done. Recipes can vary from simple (Gather a resource) to very complex (Build an entire civilization).&lt;br /&gt;
&lt;br /&gt;
Recipes are being stored in the &#039;tribe_recipes&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
== Sequences ==&lt;br /&gt;
&lt;br /&gt;
=== Advance Sequence ===&lt;br /&gt;
&lt;br /&gt;
Advance sequence is the heart of the Tribe system. The NPCClient will advance the brain 4 times a second. On each loop, this sequence takes care of special cases (e.g.: 0 npcs alive in tribe) and assigns tasks to idle members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
-&amp;gt; NPCClient : Advance&lt;br /&gt;
activate NPCClient&lt;br /&gt;
loop For each tribe&lt;br /&gt;
  NPCClient -&amp;gt; Tribe : Advance&lt;br /&gt;
  activate Tribe&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AdvanceResources&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AddCyclicRecipes&lt;br /&gt;
  loop For each member&lt;br /&gt;
     alt For NPC&#039;s that have the tribe&#039;s idle behavior&lt;br /&gt;
        Tribe -&amp;gt; Tribe : Get highest priority recipe&lt;br /&gt;
        Tribe -&amp;gt; RecipeManager : Apply Recipe&lt;br /&gt;
        activate RecipeManager&lt;br /&gt;
        Tribe &amp;lt;- RecipeManager&lt;br /&gt;
        deactivate RecipeManager&lt;br /&gt;
     end&lt;br /&gt;
  end&lt;br /&gt;
  NPCClient &amp;lt;-- Tribe&lt;br /&gt;
  deactivate Tribe&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;-- NPCClient&lt;br /&gt;
deactivate NPCClient&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up tribes ==&lt;br /&gt;
There are 3 main database tables that need to be populated.&lt;br /&gt;
&lt;br /&gt;
* [[TribesTable|tribes]]&lt;br /&gt;
** Each row represents one tribe, which must have a home position/sector and a radius in which to resurrect dead members.&lt;br /&gt;
** max_size sets the maximum number of members.&lt;br /&gt;
** wealth_resource sets the different types of resource that a tribe can mine in order to grow and/or sustain itself. This needs more work however the most important one is wealth_resource_growth which is the default rate at which a resource will grow without any work per second.&lt;br /&gt;
** reproduction_cost is the amount of resources required to reproduce.&lt;br /&gt;
** tribal_recipe loads the initial recipe that sets tribe traits and loads tribe goals (recipes)&lt;br /&gt;
&lt;br /&gt;
* tribe_members&lt;br /&gt;
** Each row is an association between a PID (on the server side) and a tribe.&lt;br /&gt;
&lt;br /&gt;
* tribe_recipes&lt;br /&gt;
** Each row represents a recipe (name,requirements,algorithm). This table needs to be loaded in order to order tribe members what to do. Not having recipes, or requesting a recipe that does not exist will result in a termination of the npcclient.&lt;br /&gt;
&lt;br /&gt;
Additionally, tables for extra tribe info need to be created:&lt;br /&gt;
*sc_tribe_assets&lt;br /&gt;
*sc_tribe_knowledge&lt;br /&gt;
*sc_tribe_memories&lt;br /&gt;
*sc_tribe_resources&lt;br /&gt;
&lt;br /&gt;
== Tribe day-to-day life ==&lt;br /&gt;
&lt;br /&gt;
Tribe members are normal NPCs. They all expand a base NPCType called &#039;AbstractTribesman&#039;, on which each tribe adds it&#039;s own particularities (e.g. when to go to sleep, what to do when they meet a stranger, etc). Read more on [[NPC Scripting]]. The &#039;AbstractTribesman&#039; contains behaviors that describe generic actions: breeding, gathering, mining, fighting, exploring and working. (trading to be added soon). These generic behaviors use some data buffers to read data from during runtime in order to execute the same behavior on different data. (different mines, different fields, different building places, etc)&lt;br /&gt;
&lt;br /&gt;
Upon parsing recipes, different perceptions are fired on the tribesmen. This process simulates a working society on which a superior entity assigns tasks to the population.&lt;br /&gt;
&lt;br /&gt;
== Tribe death ==&lt;br /&gt;
When all the members die, then a member will be resurrected if there are 10*reproduction_cost resources available.&lt;br /&gt;
&lt;br /&gt;
= Runtime =&lt;br /&gt;
&lt;br /&gt;
==Step #1 (Loading)==&lt;br /&gt;
&lt;br /&gt;
(executed only once, on NPCClient&#039;s startup. No further interrogation on the database should be done)&lt;br /&gt;
&lt;br /&gt;
On NPCClient&#039;s startup everything is loaded into the classes.&lt;br /&gt;
&lt;br /&gt;
1) The Recipe Manager loads all available recipes from mysql:&#039;tribe_recipes&#039; and add those in a flat array &amp;quot;recipes&amp;quot;, one entry per recipe.&lt;br /&gt;
&lt;br /&gt;
2) psNPCManager::LoadTribes() loads from the database all the tribes from mysql:&#039;tribes&#039;&lt;br /&gt;
&lt;br /&gt;
3) For each tribe psNPCManager::LoadTribes() loads all the information regarding the tribe:&lt;br /&gt;
*resources from mysql:&#039;sc_tribe_resources&#039;&lt;br /&gt;
*memories from mysql:&#039;sc_tribe_memories&#039;&lt;br /&gt;
*knowledge from mysql:&#039;sc_tribe_knowledge&#039;&lt;br /&gt;
*assets from mysql:&#039;sc_tribe_assets&#039;&lt;br /&gt;
*basic tribe information from mysql:&#039;tribes&#039; (including the ID of the tribal recipe, more details below)&lt;br /&gt;
*npc&#039;s are loaded by the psNPCClient and assigned to the tribe&lt;br /&gt;
&lt;br /&gt;
4) For each tribe it calls RecipeManager::AddTribe() , which parses the requirements and keeps them in the Recipe Class. (Recipe::requirements&amp;lt;Recipe::Requirement&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
5) Further on, each Tribal Object is linked to the Recipe Manager. (a pointer is sent and loaded into a csArray)&lt;br /&gt;
For each tribe loaded, the Recipe Manager does the following:&lt;br /&gt;
* assembles a data structure named &#039;TribeData&#039;&lt;br /&gt;
* links the tribal recipe belonging to this tribe to &#039;TribeData&#039;&lt;br /&gt;
* parses the information in the tribal recipe and assign the stats to csStrings in &#039;TribeData&#039;&lt;br /&gt;
* computes a tribal npctype having as parent the &#039;AbstractTribesman&#039; npctype. The difference is done by adding reactions to whatever the tribe reacts to. (attacking any player nearby or simply greeting them, sleeping at day or at night, etc)&lt;br /&gt;
&lt;br /&gt;
==Step #2 (RunTime)==&lt;br /&gt;
&lt;br /&gt;
(executed once on startup and each time a recipe is completed)&lt;br /&gt;
&lt;br /&gt;
1) NPCManager is ticking all the tribes with frequency TRIBE_TICK (tribe.h) and calling Advance() on each tribe&lt;br /&gt;
&lt;br /&gt;
2) Each tribe searches for idle members, to assign tasks in Tribe::Advance()&lt;br /&gt;
&lt;br /&gt;
3) updates the waiting time of all the TOP level recipe (the ones listed in mysql:&#039;tribes_recipe.algorithm&#039; as loadRecipe())&lt;br /&gt;
&lt;br /&gt;
4) select the best recipe based on lowest wait time and high priority (where priority is defined level in the recipe tree, the lowest the better)&lt;br /&gt;
&lt;br /&gt;
The Tribal Object selects the top-priority recipe which needs execution and sends it to the Recipe Manager.&lt;br /&gt;
&lt;br /&gt;
The Recipe Manager parses the contents of the recipe:&lt;br /&gt;
It checks for requirements. If requirements are met it proceeds with parsing the algorithm (see step #3). If requirements are not met, it pushes the Recipes which achieves the requirement on top of the tribe&#039;s recipe list.&lt;br /&gt;
Requirement parsing can be done two ways:&lt;br /&gt;
* Distributed Parsing : The parser takes the first requirement and checks it + tries to achieve it. When the same recipe gets parsed again, the parser takes the second requirement (even if the first is still not met) and tries to achieve it. This way, the parser loops through requirements and tries to achieve all in parallel.&lt;br /&gt;
* Concentrated Parsing : The parser tries to achieve the first requirement on each recipe parse until it is met. After that it picks the second requirement and applies the same principle.&lt;br /&gt;
&lt;br /&gt;
5) A new child of the RecipeTree is added as soon as the tribe decides that something can be executed (all requirements met). This is added to &#039;tribalRecipe&#039; variable. Then the algorithm of this recipe is executed (for example percect NPC to go work), and the child is immediately removed from the tree. This mean that while the NPC is working, the tree does not contain that child anymore, so if another NPC becomes available, it will pick the NEXT requirement in line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example of Distributed vs Concentracted Parsing:&lt;br /&gt;
&lt;br /&gt;
E.G.: We want our tribe to gain 150 of Coal, Silver, Gold and Platinum.&lt;br /&gt;
&lt;br /&gt;
Using Distributed Parsing:&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
*Step 2: Assign miner to Silver.&lt;br /&gt;
*Step 3: Assign miner to Gold.&lt;br /&gt;
*Step 4: Assign miner to Platinum.&lt;br /&gt;
*Step 5: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Using Concentrated Parsing: (in this example we consider each step gets the tribe 1 quantity of resource)&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
*Step 150: Assign miner to Coal.&lt;br /&gt;
*Step 151: Assign miner to Silver.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
==Step #3 (Recipe&#039;s Algorithm)==&lt;br /&gt;
&lt;br /&gt;
(executed for each step the algorithm has, each time a recipe needs execution)&lt;br /&gt;
&lt;br /&gt;
The Recipe has an algorithm stored as a csArray&amp;lt;csString&amp;gt;. When an algorithm needs an execution, the Recipe Manager takes each string and parses it. Depending on the rules we set, the Recipe Manager will tell the tribal object which perceptions to fire on their npcs. A complete set of algorithm and requirements functions can be found [[Tribe_Scripting|here]].&lt;br /&gt;
&lt;br /&gt;
(E.g.: If the recipe&#039;s algorithm require us to send 10 workers to build a town hall, the tribal object will be told to fire a &amp;quot;go to work&amp;quot; perception on 10 worker tribesman)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mining tribe ==&lt;br /&gt;
&lt;br /&gt;
The mining tribe is defined in tribes table with:&lt;br /&gt;
* a tribal_recipe value pointing to tribe_recipe table which is defining the brain, aggressivity, growth, ...&lt;br /&gt;
* a set of members inside tribe_members table, each member is flagged with a tag, example &amp;quot;Miner&amp;quot; which then be used in the selection of workers for a specific task&lt;br /&gt;
&lt;br /&gt;
The Brain definition above will point to sc_npctypes table, which will most likely derive from AbstractTribesman&lt;br /&gt;
&lt;br /&gt;
AbstractTribesman will define the reactions/behaviors for example&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the &#039;Explore&#039; behavior, tribe members will move around the map. psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range. This perception will make the NPC find the mine.&lt;br /&gt;
&lt;br /&gt;
After mining from an unknown deposit, the npcclient will receive a psWorkDoneMessage telling it what his npc just mined. This function renames the former &#039;mine&#039; Memory with it&#039;s real deposit name.&lt;br /&gt;
&lt;br /&gt;
Two things need to happen:&lt;br /&gt;
&lt;br /&gt;
1) The tribe sends a member to explore for mining locations, this happens with &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) The tribe sends a members to mine for a KNOWN resource location, this happens with&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important methods:&lt;br /&gt;
* psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range&lt;br /&gt;
* NPCType::FirePerception() is checking if this NPC should automemorize the new locations sensed&lt;br /&gt;
* Tribe::Memorize() where we add the location found to the NPC memory&lt;br /&gt;
&lt;br /&gt;
The mining tribe will send his members to explore in search of resources. This is done with the Behavior &amp;quot;Explore&amp;quot; in the AbstractTribsmen NPC Type stored in sc_npctypes.&lt;br /&gt;
&lt;br /&gt;
== Tribe reaction to attacks ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In RecipeManager::CreateGlobalNPCType() we check the Unity Trait of the tribe: cowards / normal / united&lt;br /&gt;
&lt;br /&gt;
Anything but cowards gets &lt;br /&gt;
 reaction = &amp;quot;&amp;lt;react event=\&amp;quot;attack\&amp;quot; behavior=\&amp;quot;united_attacked\&amp;quot; delta=\&amp;quot;100\&amp;quot; /&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a player attacks a member of a tribe , the line above triggers a behavior on the attack.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In AbstractTribesman this happens:&lt;br /&gt;
  &amp;lt;behavior name=&amp;quot;united_attacked&amp;quot; decay=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;talk text=&amp;quot;The tribe is under attack!&amp;quot; target=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;locate obj=&amp;quot;tribe:target&amp;quot; range=&amp;quot;100&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;percept event=&amp;quot;tribesman attacked&amp;quot; target=&amp;quot;tribe&amp;quot; range=&amp;quot;30&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;percept event=&amp;quot;fight&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/behavior&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the important piece is target =&amp;quot;tribe&amp;quot; because this trigger a perception in the tribe in Tribe::SendPerception() that scans all the NPCs and sends the given perception = &amp;quot;tribesman attacked&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is defined again in AbstractTribesman &lt;br /&gt;
 &amp;lt;react event=&amp;quot;tribesman attacked&amp;quot;       behavior=&amp;quot;normal_attacked&amp;quot; delta=&amp;quot;100&amp;quot;  do_not_interrupt=&amp;quot;Chase&amp;quot;/&amp;gt;&lt;br /&gt;
and this points to a normal attack! Which just asks the npc to fight.&lt;br /&gt;
[[Category:Engine documents]] [[Category:NPCClient Design]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25738</id>
		<title>Tribe Design</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Design&amp;diff=25738"/>
		<updated>2026-02-10T23:23:55Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Tribe Design =&lt;br /&gt;
&lt;br /&gt;
The tribe design is done using [[Behaviors_and_Reactions|NPC Behaviors]] and [[Tribe_Scripting|Recipes]]. Tribe members are assigned tasks based on what the recipes dictates the tribe to achieve. This system uses a Recipe Manager which takes care of parsing recipes, breaking the initial recipe into subtasks and telling the npcs which action to take.&lt;br /&gt;
&lt;br /&gt;
== Classes ==&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
scale 0.8&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : members&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; NPC : deadMembers&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Resource : resources&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Memory : memories&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Asset : assets&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;0..N&amp;quot; Knowledge : knowledge&lt;br /&gt;
Tribe &amp;quot;1&amp;quot; *-- &amp;quot;1..1&amp;quot; RecipeTreeNode : recipes&lt;br /&gt;
RecipeTreeNode *-- Recipe&lt;br /&gt;
RecipeManager &amp;quot;1&amp;quot; *-- &amp;quot;N..1&amp;quot; Recipe : all recipes&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Members &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tribe members (both dead &amp;amp; alive) are kept in an array in the Tribe Class. They are all represented by the NPC class. The tribal class only has methods to attach a tribe member. For spawning new members the server (gemSupervisor &amp;amp; entityManager classes) and the npcclient class are responsable.&lt;br /&gt;
&lt;br /&gt;
Tribe members can have different types. (Discussion needed about tribe types)&lt;br /&gt;
&lt;br /&gt;
Tribe members are being kept in the &#039;tribe_members&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Resources &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A resource is kept in a data structure (&#039;&#039;Tribe::Resource&#039;&#039;) containing it&#039;s name, nick and quantity. The tribe class has methods for adding, modifying, storing and completely deleting resources.&lt;br /&gt;
&lt;br /&gt;
Resources are being kept in the &#039;sc_tribe_resources&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Memories &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A memory is a location of some importance to the tribe. (E.g. a mine, a field, an enemy, etc)&lt;br /&gt;
&lt;br /&gt;
A memory is kept in a data structure (&#039;&#039;Tribe::Memory&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name and a link to an NPC (which is NULL if the memory is public to all tribe members, or != NULL if it&#039;s private to a tribe member). The tribe object has methods to add, store, modify and search memories.&lt;br /&gt;
&lt;br /&gt;
Tribe members also have a memory slot for keeping it&#039;s current task location. (see bufferMemory attribute of NPC class).&lt;br /&gt;
&lt;br /&gt;
Tribe memories are being kept in the &#039;sc_tribe_memories&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Assets &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assets are belongings of the tribe. They can represent buildings, items or spots to be built in the future.&lt;br /&gt;
&lt;br /&gt;
An asset is represented by a data structure (&#039;&#039;Tribe::Asset&#039;&#039;) containing it&#039;s location (sector &amp;amp; coords), it&#039;s name, it&#039;s quantity (relevant just for items) and it&#039;s type (Building Spot, Building or Item). The tribe class has methods for adding, editing and deleting assets. It also has methods for managing buildings. (e.g. Replace a building spot with the actual building after the workers built it)&lt;br /&gt;
&lt;br /&gt;
Tribe assets are being kept in the &#039;sc_tribe_assets&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Knowledge &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Knowledge represents the information the tribe has gathered and the technologies they can use. (E.g. Ironworks, pottery, horseback riding, alphabet, math, etc)&lt;br /&gt;
&lt;br /&gt;
Technically, they are just strings used as tokens to prove the tribe has acquired knowledge or not.&lt;br /&gt;
&lt;br /&gt;
Knowledge is kept in an array of strings.&lt;br /&gt;
&lt;br /&gt;
Tribe knowledge is being kept in the &#039;sc_tribe_knowledge&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe Tree Node &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This class represents a node of the recipe tree describing the tribe current tasks. Each recipe tree node contains a link to it&#039;s recipe, waiting times, current requirement, current algorithm step and relationship information regarding other recipes. (just as a standard Tree, it may have parents and descendants).&lt;br /&gt;
&lt;br /&gt;
RecipeTreeNodes are not being stored in any database. They are just used during runtime as an AI for tribes.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Recipe &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A recipe is a set of requirements and algorithm steps regarding a task that needs to be done. Recipes can vary from simple (Gather a resource) to very complex (Build an entire civilization).&lt;br /&gt;
&lt;br /&gt;
Recipes are being stored in the &#039;tribe_recipes&#039; mysql table.&lt;br /&gt;
&lt;br /&gt;
== Sequences ==&lt;br /&gt;
&lt;br /&gt;
=== Advance Sequence ===&lt;br /&gt;
&lt;br /&gt;
Advance sequence is the heart of the Tribe system. The NPCClient will advance the brain 4 times a second. On each loop, this sequence takes care of special cases (e.g.: 0 npcs alive in tribe) and assigns tasks to idle members.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;uml&amp;gt;&lt;br /&gt;
-&amp;gt; NPCClient : Advance&lt;br /&gt;
activate NPCClient&lt;br /&gt;
loop For each tribe&lt;br /&gt;
  NPCClient -&amp;gt; Tribe : Advance&lt;br /&gt;
  activate Tribe&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AdvanceResources&lt;br /&gt;
  Tribe -&amp;gt; Tribe : AddCyclicRecipes&lt;br /&gt;
  loop For each member&lt;br /&gt;
     alt For NPC&#039;s that have the tribe&#039;s idle behavior&lt;br /&gt;
        Tribe -&amp;gt; Tribe : Get highest priority recipe&lt;br /&gt;
        Tribe -&amp;gt; RecipeManager : Apply Recipe&lt;br /&gt;
        activate RecipeManager&lt;br /&gt;
        Tribe &amp;lt;- RecipeManager&lt;br /&gt;
        deactivate RecipeManager&lt;br /&gt;
     end&lt;br /&gt;
  end&lt;br /&gt;
  NPCClient &amp;lt;-- Tribe&lt;br /&gt;
  deactivate Tribe&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;-- NPCClient&lt;br /&gt;
deactivate NPCClient&lt;br /&gt;
&amp;lt;/uml&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up tribes ==&lt;br /&gt;
There are 3 main database tables that need to be populated.&lt;br /&gt;
&lt;br /&gt;
* [[TribesTable|tribes]]&lt;br /&gt;
** Each row represents one tribe, which must have a home position/sector and a radius in which to resurrect dead members.&lt;br /&gt;
** max_size sets the maximum number of members.&lt;br /&gt;
** wealth_resource sets the different types of resource that a tribe can mine in order to grow and/or sustain itself. This needs more work however the most important one is wealth_resource_growth which is the default rate at which a resource will grow without any work per second.&lt;br /&gt;
** reproduction_cost is the amount of resources required to reproduce.&lt;br /&gt;
** tribal_recipe loads the initial recipe that sets tribe traits and loads tribe goals (recipes)&lt;br /&gt;
&lt;br /&gt;
* tribe_members&lt;br /&gt;
** Each row is an association between a PID (on the server side) and a tribe.&lt;br /&gt;
&lt;br /&gt;
* tribe_recipes&lt;br /&gt;
** Each row represents a recipe (name,requirements,algorithm). This table needs to be loaded in order to order tribe members what to do. Not having recipes, or requesting a recipe that does not exist will result in a termination of the npcclient.&lt;br /&gt;
&lt;br /&gt;
Additionally, tables for extra tribe info need to be created:&lt;br /&gt;
*sc_tribe_assets&lt;br /&gt;
*sc_tribe_knowledge&lt;br /&gt;
*sc_tribe_memories&lt;br /&gt;
*sc_tribe_resources&lt;br /&gt;
&lt;br /&gt;
== Tribe day-to-day life ==&lt;br /&gt;
&lt;br /&gt;
Tribe members are normal NPCs. They all expand a base NPCType called &#039;AbstractTribesman&#039;, on which each tribe adds it&#039;s own particularities (e.g. when to go to sleep, what to do when they meet a stranger, etc). Read more on [[NPC Scripting]]. The &#039;AbstractTribesman&#039; contains behaviors that describe generic actions: breeding, gathering, mining, fighting, exploring and working. (trading to be added soon). These generic behaviors use some data buffers to read data from during runtime in order to execute the same behavior on different data. (different mines, different fields, different building places, etc)&lt;br /&gt;
&lt;br /&gt;
Upon parsing recipes, different perceptions are fired on the tribesmen. This process simulates a working society on which a superior entity assigns tasks to the population.&lt;br /&gt;
&lt;br /&gt;
== Tribe death ==&lt;br /&gt;
When all the members die, then a member will be resurrected if there are 10*reproduction_cost resources available.&lt;br /&gt;
&lt;br /&gt;
= Runtime =&lt;br /&gt;
&lt;br /&gt;
==Step #1 (Loading)==&lt;br /&gt;
&lt;br /&gt;
(executed only once, on NPCClient&#039;s startup. No further interrogation on the database should be done)&lt;br /&gt;
&lt;br /&gt;
On NPCClient&#039;s startup everything is loaded into the classes.&lt;br /&gt;
&lt;br /&gt;
1) The Recipe Manager loads all available recipes from mysql:&#039;tribe_recipes&#039; and add those in a flat array &amp;quot;recipes&amp;quot;, one entry per recipe.&lt;br /&gt;
&lt;br /&gt;
2) psNPCManager::LoadTribes() loads from the database all the tribes from mysql:&#039;tribes&#039;&lt;br /&gt;
&lt;br /&gt;
3) For each tribe psNPCManager::LoadTribes() loads all the information regarding the tribe:&lt;br /&gt;
*resources from mysql:&#039;sc_tribe_resources&#039;&lt;br /&gt;
*memories from mysql:&#039;sc_tribe_memories&#039;&lt;br /&gt;
*knowledge from mysql:&#039;sc_tribe_knowledge&#039;&lt;br /&gt;
*assets from mysql:&#039;sc_tribe_assets&#039;&lt;br /&gt;
*basic tribe information from mysql:&#039;tribes&#039; (including the ID of the tribal recipe, more details below)&lt;br /&gt;
*npc&#039;s are loaded by the psNPCClient and assigned to the tribe&lt;br /&gt;
&lt;br /&gt;
4) For each tribe it calls RecipeManager::AddTribe() , which parses the requirements and keeps them in the Recipe Class. (Recipe::requirements&amp;lt;Recipe::Requirement&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
5) Further on, each Tribal Object is linked to the Recipe Manager. (a pointer is sent and loaded into a csArray)&lt;br /&gt;
For each tribe loaded, the Recipe Manager does the following:&lt;br /&gt;
* assembles a data structure named &#039;TribeData&#039;&lt;br /&gt;
* links the tribal recipe belonging to this tribe to &#039;TribeData&#039;&lt;br /&gt;
* parses the information in the tribal recipe and assign the stats to csStrings in &#039;TribeData&#039;&lt;br /&gt;
* computes a tribal npctype having as parent the &#039;AbstractTribesman&#039; npctype. The difference is done by adding reactions to whatever the tribe reacts to. (attacking any player nearby or simply greeting them, sleeping at day or at night, etc)&lt;br /&gt;
&lt;br /&gt;
==Step #2 (RunTime)==&lt;br /&gt;
&lt;br /&gt;
(executed once on startup and each time a recipe is completed)&lt;br /&gt;
&lt;br /&gt;
1) NPCManager is ticking all the tribes with frequency TRIBE_TICK (tribe.h) and calling Advance() on each tribe&lt;br /&gt;
&lt;br /&gt;
2) Each tribe searches for idle members, to assign tasks in Tribe::Advance()&lt;br /&gt;
&lt;br /&gt;
3) updates the waiting time of all the TOP level recipe (the ones listed in mysql:&#039;tribes_recipe.algorithm&#039; as loadRecipe())&lt;br /&gt;
&lt;br /&gt;
4) select the best recipe based on lowest wait time and high priority (where priority is defined level in the recipe tree, the lowest the better)&lt;br /&gt;
&lt;br /&gt;
The Tribal Object selects the top-priority recipe which needs execution and sends it to the Recipe Manager.&lt;br /&gt;
&lt;br /&gt;
The Recipe Manager parses the contents of the recipe:&lt;br /&gt;
It checks for requirements. If requirements are met it proceeds with parsing the algorithm (see step #3). If requirements are not met, it pushes the Recipes which achieves the requirement on top of the tribe&#039;s recipe list.&lt;br /&gt;
Requirement parsing can be done two ways:&lt;br /&gt;
* Distributed Parsing : The parser takes the first requirement and checks it + tries to achieve it. When the same recipe gets parsed again, the parser takes the second requirement (even if the first is still not met) and tries to achieve it. This way, the parser loops through requirements and tries to achieve all in parallel.&lt;br /&gt;
* Concentrated Parsing : The parser tries to achieve the first requirement on each recipe parse until it is met. After that it picks the second requirement and applies the same principle.&lt;br /&gt;
&lt;br /&gt;
5) A new child of the RecipeTree is added as soon as the tribe decides that something can be executed (all requirements met). This is added to &#039;tribalRecipe&#039; variable. Then the algorithm of this recipe is executed (for example percect NPC to go work), and the child is immediately removed from the tree. This mean that while the NPC is working, the tree does not contain that child anymore, so if another NPC becomes available, it will pick the NEXT requirement in line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example of Distributed vs Concentracted Parsing:&lt;br /&gt;
&lt;br /&gt;
E.G.: We want our tribe to gain 150 of Coal, Silver, Gold and Platinum.&lt;br /&gt;
&lt;br /&gt;
Using Distributed Parsing:&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
*Step 2: Assign miner to Silver.&lt;br /&gt;
*Step 3: Assign miner to Gold.&lt;br /&gt;
*Step 4: Assign miner to Platinum.&lt;br /&gt;
*Step 5: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
Using Concentrated Parsing: (in this example we consider each step gets the tribe 1 quantity of resource)&lt;br /&gt;
*Step 1: Assign miner to Coal.&lt;br /&gt;
...&lt;br /&gt;
*Step 150: Assign miner to Coal.&lt;br /&gt;
*Step 151: Assign miner to Silver.&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
==Step #3 (Recipe&#039;s Algorithm)==&lt;br /&gt;
&lt;br /&gt;
(executed for each step the algorithm has, each time a recipe needs execution)&lt;br /&gt;
&lt;br /&gt;
The Recipe has an algorithm stored as a csArray&amp;lt;csString&amp;gt;. When an algorithm needs an execution, the Recipe Manager takes each string and parses it. Depending on the rules we set, the Recipe Manager will tell the tribal object which perceptions to fire on their npcs. A complete set of algorithm and requirements functions can be found [[Tribe_Scripting|here]].&lt;br /&gt;
&lt;br /&gt;
(E.g.: If the recipe&#039;s algorithm require us to send 10 workers to build a town hall, the tribal object will be told to fire a &amp;quot;go to work&amp;quot; perception on 10 worker tribesman)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mining tribe ==&lt;br /&gt;
&lt;br /&gt;
The mining tribe is defined in tribes table with:&lt;br /&gt;
* a tribal_recipe value pointing to tribe_recipe table which is defining the brain, aggressivity, growth, ...&lt;br /&gt;
* a set of members inside tribe_members table, each member is flagged with a tag, example &amp;quot;Miner&amp;quot; which then be used in the selection of workers for a specific task&lt;br /&gt;
&lt;br /&gt;
The Brain definition above will point to sc_npctypes table, which will most likely derive from AbstractTribesman&lt;br /&gt;
&lt;br /&gt;
AbstractTribesman will define the reactions/behaviors for example&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the &#039;Explore&#039; behavior, tribe members will move around the map. psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range. This perception will make the NPC find the mine.&lt;br /&gt;
&lt;br /&gt;
After mining from an unknown deposit, the npcclient will receive a psWorkDoneMessage telling it what his npc just mined. This function renames the former &#039;mine&#039; Memory with it&#039;s real deposit name.&lt;br /&gt;
&lt;br /&gt;
Two things need to happen:&lt;br /&gt;
&lt;br /&gt;
1) The tribe sends a member to explore for mining locations, this happens with &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:explore&amp;quot;            behavior=&amp;quot;Explore&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) The tribe sends a members to mine for a KNOWN resource location, this happens with&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:mine&amp;quot;               behavior=&amp;quot;MineResource&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important methods:&lt;br /&gt;
* psNPCManager::PerceptProximityLocations() is called every second, triggering a LocationPerception with &amp;quot;location sensed&amp;quot; to all NPC in range&lt;br /&gt;
* NPCType::FirePerception() is checking if this NPC should automemorize the new locations sensed&lt;br /&gt;
* Tribe::Memorize() where we add the location found to the NPC memory&lt;br /&gt;
&lt;br /&gt;
The mining tribe will send his members to explore in search of resources. This is done with the Behavior &amp;quot;Explore&amp;quot; in the AbstractTribsmen NPC Type stored in sc_npctypes.&lt;br /&gt;
&lt;br /&gt;
== Tribe reaction to attacks ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In RecipeManager::CreateGlobalNPCType() we check the Unity Trait of the tribe: cowards / normal / united&lt;br /&gt;
&lt;br /&gt;
Anything but cowards gets &lt;br /&gt;
&lt;br /&gt;
reaction = &amp;quot;&amp;lt;react event=\&amp;quot;attack\&amp;quot; behavior=\&amp;quot;united_attacked\&amp;quot; delta=\&amp;quot;100\&amp;quot; /&amp;gt;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Engine documents]] [[Category:NPCClient Design]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Creatures_and_Attack_sounds&amp;diff=25737</id>
		<title>Creatures and Attack sounds</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Creatures_and_Attack_sounds&amp;diff=25737"/>
		<updated>2026-01-28T23:35:27Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Attack Sound ==&lt;br /&gt;
For humanoid and creatures we consider that they can use melee or use weapons. In the Combat_Montage of our player character, we have the attack animation. In the attack animation segment we have one events (Notify) at the start of type PSAnimNotifyAttackSound &lt;br /&gt;
&lt;br /&gt;
[[File:PSAnimNotify.png]]&lt;br /&gt;
&lt;br /&gt;
If you need to enable the attack sound on a creature, you need to add the PSAnimNotifyAttackSound in the attack Montage (not in the attack sequence).&lt;br /&gt;
In psAttack::Attack() we create a soundID with this rule:&amp;lt;blockquote&amp;gt;&lt;br /&gt;
if the weapon is melee then use the race: &amp;lt;race&amp;gt;-4 (because 4 is the melee skill ID)&lt;br /&gt;
&lt;br /&gt;
otherwise use the weapon skill id: &amp;quot;w-&amp;quot; + &amp;lt;weapon skill&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Stonehammer hitting with a Fist = 0-4&lt;br /&gt;
&lt;br /&gt;
Example: Stonehammer hitting with a sword = w-0&amp;lt;/blockquote&amp;gt;this soundID is then sent to all clients this way: we call BroadcastAttackAnimation() to send it to all players in range, and then we call ReceiveAttackAnimation() on clients BP, this is then calling PlayPSAnimMontage()&lt;br /&gt;
&lt;br /&gt;
Inside PlayPSAnimMontage() we use the soundid&lt;br /&gt;
&lt;br /&gt;
The class used is UPSAnimNotifyAttackSound&lt;br /&gt;
&lt;br /&gt;
== Hit sound ==&lt;br /&gt;
When someone is hit.&lt;br /&gt;
&lt;br /&gt;
in psAttack::AffectTarget() we create a soundID &amp;lt;Weapon Type&amp;gt; + &amp;quot;-&amp;quot; + &amp;lt;Material&amp;gt; + &amp;lt;hit:1 or block:0&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Material is defined in [[Race infoTable]].skin_type (0-flesh, 1-wood, 2-metal, 3-carapace, 4-fur, 5-slime) &lt;br /&gt;
&lt;br /&gt;
Example: fist hitting carapare of a trepor: 4-3-1 &lt;br /&gt;
&lt;br /&gt;
Example: sword getting blocked by flesh: 0-0-0 &lt;br /&gt;
&lt;br /&gt;
this soundID is then sent to all clients this way: we call BroacastCombatResultSound() to send it to all players in range&lt;br /&gt;
&lt;br /&gt;
The hit sounds are decoupled from the hit animation because they need to play regardless.&lt;br /&gt;
&lt;br /&gt;
== Death Sound ==&lt;br /&gt;
If we want to have a sound when the creature dies, we have it in the Death Montage, on the death animation&lt;br /&gt;
&lt;br /&gt;
[[File:Death Sound.png]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Creatures_and_Attack_sounds&amp;diff=25736</id>
		<title>Creatures and Attack sounds</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Creatures_and_Attack_sounds&amp;diff=25736"/>
		<updated>2026-01-28T21:38:08Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Attack Sound */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Attack Sound ==&lt;br /&gt;
For humanoid and creatures we consider that they can use melee or use weapons. In the Combat_Montage of our player character, we have the attack animation. In the attack animation segment we have one events (Notify) at the start of type PSAnimNotifyAttackSound &lt;br /&gt;
&lt;br /&gt;
[[File:PSAnimNotify.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In psAttack::Attack() we create a soundID with this rule:&amp;lt;blockquote&amp;gt;&lt;br /&gt;
if the weapon is melee then use the race: &amp;lt;race&amp;gt;-4 (because 4 is the melee skill ID)&lt;br /&gt;
&lt;br /&gt;
otherwise use the weapon skill id: &amp;quot;w-&amp;quot; + &amp;lt;weapon skill&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Stonehammer hitting with a Fist = 0-4&lt;br /&gt;
&lt;br /&gt;
Example: Stonehammer hitting with a sword = w-0&amp;lt;/blockquote&amp;gt;this soundID is then sent to all clients this way: we call BroadcastAttackAnimation() to send it to all players in range, and then we call ReceiveAttackAnimation() on clients BP, this is then calling PlayPSAnimMontage()&lt;br /&gt;
&lt;br /&gt;
Inside PlayPSAnimMontage() we use the soundid&lt;br /&gt;
&lt;br /&gt;
The class used is UPSAnimNotifyAttackSound&lt;br /&gt;
&lt;br /&gt;
== Hit sound ==&lt;br /&gt;
When someone is hit.&lt;br /&gt;
&lt;br /&gt;
in psAttack::AffectTarget() we create a soundID &amp;lt;Weapon Type&amp;gt; + &amp;quot;-&amp;quot; + &amp;lt;Material&amp;gt; + &amp;lt;hit:1 or block:0&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Material is defined in [[Race infoTable]].skin_type (0-flesh, 1-wood, 2-metal, 3-carapace, 4-fur, 5-slime) &lt;br /&gt;
&lt;br /&gt;
Example: fist hitting carapare of a trepor: 4-3-1 &lt;br /&gt;
&lt;br /&gt;
Example: sword getting blocked by flesh: 0-0-0 &lt;br /&gt;
&lt;br /&gt;
this soundID is then sent to all clients this way: we call BroacastCombatResultSound() to send it to all players in range&lt;br /&gt;
&lt;br /&gt;
The hit sounds are decoupled from the hit animation because they need to play regardless.&lt;br /&gt;
&lt;br /&gt;
== Death Sound ==&lt;br /&gt;
If we want to have a sound when the creature dies, we have it in the Death Montage, on the death animation&lt;br /&gt;
&lt;br /&gt;
[[File:Death Sound.png]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Scripting&amp;diff=25734</id>
		<title>Tribe Scripting</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Scripting&amp;diff=25734"/>
		<updated>2026-01-05T17:09:02Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* SpawnMember */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Recipe Logic =&lt;br /&gt;
&lt;br /&gt;
== Recipes ==&lt;br /&gt;
&#039;&#039;&#039;A recipe database entry&#039;&#039;&#039;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!id&lt;br /&gt;
!name&lt;br /&gt;
!requirements&lt;br /&gt;
!algorithm&lt;br /&gt;
!persistent&lt;br /&gt;
|-&lt;br /&gt;
|used for db storing&lt;br /&gt;
|Name of the recipe&lt;br /&gt;
|requirement string containing all requirements&lt;br /&gt;
|algorithm string containing all algorithm steps&lt;br /&gt;
|If this flag is on, the recipe won&#039;t ever be deleted from the recipe tree. After parsing it, if no other recipe has a higher priority... it will be reparsed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage of Recipes ==&lt;br /&gt;
&lt;br /&gt;
Recipes is used to describe how [[tribes]] react. See [[Tribe Design]] for details.&lt;br /&gt;
&lt;br /&gt;
On initialization, a tribal recipe is first loaded in respect of the information indicated by the &#039;tribal_recipe&#039; field. (see [[TribesTable|tribes.sql]]). The tribal recipe is formed from &#039;Tribe Info&#039; functions. (see below)&lt;br /&gt;
&lt;br /&gt;
Based on those functions the npctype for each tribe is created and initial recipes are loaded.&lt;br /&gt;
&lt;br /&gt;
Further on, each Recipe has two important sections: requirements and algorithm. Each of those two is represented by a long string (the maximum is set in the database to 1000 characters) of functions separated by a semi-colon &#039;;&#039;. Upon parsing the long string is split in respect of the semicolons (;) and the recipe manager analyzes each resulting function.&lt;br /&gt;
&lt;br /&gt;
== Recipe-Tree Nodes ==&lt;br /&gt;
&lt;br /&gt;
Inside a tribe object, recipes are stored as Recipe Tree Nodes. This class was created to facilitate the management of recipes and the way recipes are selected to be parsed.&lt;br /&gt;
&lt;br /&gt;
All recipes are stored as leaves in a tree. This way we can always know their hierarchy and precedence.&lt;br /&gt;
&lt;br /&gt;
Besides the obvious usage as a tree, recipe tree nodes also hold vital data for recipe parsing: last requirement parsed, last algorithm step parsed, remaining waiting time.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s consider an example of a tribe which has some building spots available and the task to build on those spots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having the tree above, it&#039;s easy to select the actions required to complete the task. We first get some more food. After that we get the required members, search for wood and stone, and finally build the buildings.&lt;br /&gt;
&lt;br /&gt;
= Tribe Info =&lt;br /&gt;
&lt;br /&gt;
== Brain ==&lt;br /&gt;
&lt;br /&gt;
Syntax: brain(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x brain eg. behaviour to use for the tribe.&lt;br /&gt;
&lt;br /&gt;
Effect: Override the AbstractTribesman as the brain for the tribe.&lt;br /&gt;
&lt;br /&gt;
For each tribe the server create an tribe_&amp;lt;tribe_id&amp;gt; behavior that inherit from the brain given i the brain command. If no brain entry is given the tribe behaviour will use the AbstractTribesman behaviour. This can be used to create tribes with special behaviours.&lt;br /&gt;
&lt;br /&gt;
== Aggressivity ==&lt;br /&gt;
&lt;br /&gt;
Syntax: aggressivity(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: &lt;br /&gt;
* x in { warlike, neutral, peaceful }&lt;br /&gt;
&lt;br /&gt;
Effect: Decides the way the tribe reacts to other entities around it&#039;s members:&lt;br /&gt;
* Warlike  -- Attack anything on sight.&lt;br /&gt;
* Neutral  -- Attack only if members are attacked.&lt;br /&gt;
* Peaceful -- If tribe members are attack they flee, trying to escape.&lt;br /&gt;
&lt;br /&gt;
Mechanics: Upon parsing this function, an extra reaction is added to the tribal npctype in respect of this function&#039;s argument.&lt;br /&gt;
&lt;br /&gt;
== Growth ==&lt;br /&gt;
Syntax: growth(x)&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* x in ?&lt;br /&gt;
&lt;br /&gt;
Not implemented , at the moment all tribes have &amp;quot;conservatory&amp;quot; as value&lt;br /&gt;
&lt;br /&gt;
== Unity ==&lt;br /&gt;
Syntax: unity(x)&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* x in {*, cowards}&lt;br /&gt;
&lt;br /&gt;
At the moment anything but &amp;quot;cowards&amp;quot; will trigger one member of the tribe to help another member when attacked.&lt;br /&gt;
&lt;br /&gt;
== SleepPeriod ==&lt;br /&gt;
&lt;br /&gt;
Syntax: sleepPeriod(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: x in { diurnal, nocturnal, nosleep }&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|diurnal&lt;br /&gt;
|22:00 - 06:00&lt;br /&gt;
|Sleep during night&lt;br /&gt;
|-&lt;br /&gt;
|nocturnal&lt;br /&gt;
|08:00 - 18:00&lt;br /&gt;
|Sleep during day&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Effect: Makes the tribe members sleep at the given period of day.&lt;br /&gt;
&lt;br /&gt;
Mechanics: Upon parsing this function, an extra reaction is added to the tribal npctype. The reaction should react to timeofday perceptions.&lt;br /&gt;
&lt;br /&gt;
== LoadRecipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadRecipe(x); loadRecipe(x,distributed);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a Recipe Name&lt;br /&gt;
&lt;br /&gt;
Effect: Loads a recipe into the recipe tree. The new recipe&#039;s priority will be the current recipe&#039;s priority + 1.&lt;br /&gt;
&lt;br /&gt;
== LoadCyclicRecipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadCyclicRecipe(x,t);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a Recipe Name&lt;br /&gt;
* &#039;t&#039; is an int, representing the number of ticks (milliseconds) between recipe executions&lt;br /&gt;
&lt;br /&gt;
Effect: Loads a recipe into the recipe tree once every &#039;t&#039; ticks, with highest priority.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Syntax: building(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of buildings needed.&lt;br /&gt;
* &#039;r&#039; is the recipe needed to get the building if not available&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: At the moment, items are &#039;magically&#039; stored inside the tribal object. This object keeps track on items and buildings with the &#039;Asset&#039; structure. &#039;x&#039; can be any string with the condition that the tribe can actually gain the requested asset. Otherwise the requirement will never be met. Upon parsing this requirement, the tribal object checks it&#039;s asset arrays for the building &#039;x&#039; of quantity &#039;y&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tribesman ==&lt;br /&gt;
&lt;br /&gt;
Syntax: tribesman(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is a tribesman type (types are not well-defined at the moment). Keyword &#039;any&#039; is accepted too in order to define any member.&lt;br /&gt;
* y is an int defining the number of tribesmen needed&lt;br /&gt;
*r is the recipe needed to spawn a new member if not enough members are found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a number &#039;y&#039; of tribesman typed &#039;x&#039; regardless if they are busy or doing something else. If &#039;y&#039; members are found, the requirement is considered met.&lt;br /&gt;
&lt;br /&gt;
== TribesmanIdle ==&lt;br /&gt;
&lt;br /&gt;
Syntax: tribesmanidle(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is a tribesman type (types are not well-defined at the moment). Keyword &#039;any&#039; is accepted too in order to define any member.&lt;br /&gt;
* y is an int defining the number of tribesmen needed&lt;br /&gt;
*r is the recipe needed to spawn a new member if not enough members are found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a number &#039;y&#039; of tribesman typed &#039;x&#039; with the current behavior equal to the tribe&#039;s idle behavior. (e.g. &amp;quot;do nothing&amp;quot; behavior) If &#039;y&#039; members are found idle, the requirement is considered met.&lt;br /&gt;
&lt;br /&gt;
== Resource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: resource(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is the resource name &lt;br /&gt;
* y is the resource quantity required&lt;br /&gt;
* r is the recipe needed to get the resource if not available&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a &#039;y&#039; quantity of &#039;x&#039; resource. If this quantity is found then the resource is considered complete. $RESOURCE_AREA, $REPRODUCTION_RESOURCE and $REPRODUCTION_COST are valid variables.&lt;br /&gt;
&lt;br /&gt;
Judging by the way natural resources are defined, any string declared in natural_resources.sql as a resource can be parsed and mined by the tribe. By default, any new mine found by the tribesmen is stored as a memory named &#039;mine&#039;. Upon it&#039;s first mining action done on the &#039;mine&#039; memory, a reward is granted to the npc. When the NPC gets home and gives that to the tribal object, the memory &#039;mine&#039; is renamed after the reward. In conclusion, having a resource named &#039;Space Shuttle&#039; is valid and works.&lt;br /&gt;
&lt;br /&gt;
Note: The resource requirement just checks if enough resources are available. Use &#039;alterResource&#039; function in your recipes in order to actually substract resource from the tribe bank.&lt;br /&gt;
&lt;br /&gt;
== Knowledge ==&lt;br /&gt;
&lt;br /&gt;
Syntax: knowledge(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: &#039;x&#039; can be any string.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: As described in the [[Tribe Design]] document, knowledge are tokens that keep track on technologies developed by the tribe. It&#039;s valid to request any string as long as it would be possible for the tribe to develop the knowledge. Otherwise the requirement will never be met.&lt;br /&gt;
&lt;br /&gt;
== Item ==&lt;br /&gt;
&lt;br /&gt;
Syntax: item(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an item/building name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of items needed.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: At the moment, items are &#039;magically&#039; stored inside the tribal object. This object keeps track on items and buildings with the &#039;Asset&#039; structure. &#039;x&#039; can be any string with the condition that the tribe can actually gain the requested asset. Otherwise the requirement will never be met. Upon parsing this requirement, the tribal object checks it&#039;s asset arrays for the item &#039;x&#039; of quantity &#039;y&#039;.&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: recipe(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a recipe name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of recipes needed.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this requirement, the parser just adds an &#039;y&#039; number of &#039;x&#039; recipes to the recipe tree.&lt;br /&gt;
&lt;br /&gt;
This requirement isn&#039;t quite practical and should be avoided.&lt;br /&gt;
&lt;br /&gt;
== Trader (Not available) ==&lt;br /&gt;
&lt;br /&gt;
Syntax: trader(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an item name&lt;br /&gt;
&lt;br /&gt;
Effect: This requirement should check the traders array for a nearby trader giving item &#039;x&#039;.&lt;br /&gt;
&lt;br /&gt;
== Memory ==&lt;br /&gt;
&lt;br /&gt;
Syntax: memory(m,p,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;m&#039; is a memory name&lt;br /&gt;
* &#039;p&#039; is a probability between 0-100. Setting this to 10 make it 10% probably that the r will be run even if m is found.&lt;br /&gt;
* &#039;r&#039; is a recipe that will be run if the memory isn&#039;t found.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this requirement, the parser checks the memory array for a memory called &#039;m&#039;. If it is found, requirement is considered met. If it isn&#039;t found or the probability for failure has hit it will run the recipe &#039;r&#039;.&lt;br /&gt;
&lt;br /&gt;
= Algorithm Steps =&lt;br /&gt;
&lt;br /&gt;
== AddKnowledge ==&lt;br /&gt;
&lt;br /&gt;
Syntax: addKnowledge(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; can be any string.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Adds the &#039;x&#039; token as a piece of knowledge in the knowledge array.&lt;br /&gt;
&lt;br /&gt;
== AlterResource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: alterResource(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a resource name&lt;br /&gt;
* &#039;y&#039; is an int describing quantity&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this function, the parser modifies the quantity of resources available in the tribe.&lt;br /&gt;
&lt;br /&gt;
Note: The &#039;y&#039; value will be added to the current value in the tribe&#039;s bank. Use negative value to represent costs. (e.g. alterResource(gold,-20); in order to pay for a building)&lt;br /&gt;
&lt;br /&gt;
== Attack ==&lt;br /&gt;
&lt;br /&gt;
Syntax: attack();&lt;br /&gt;
&lt;br /&gt;
Arguments: None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends to previously selected members the &#039;tribe:attack&#039; perception to attack a previously selected location. If the selected location is not an attackable entity they will simply move there and attack whatever is near.&lt;br /&gt;
&lt;br /&gt;
== Gather == &lt;br /&gt;
&lt;br /&gt;
Syntax: gather();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to a previously selected field and fires their &#039;tribe:gather&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== GoWork ==&lt;br /&gt;
&lt;br /&gt;
Syntax: goWork(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an int defining the number of seconds the npcs should work for.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The &#039;goWork&#039; function sends previously selected npcs to a previously selected location, set the npc buffer [Work_Duration] to &#039;x&#039; and send &#039;tribe:work&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== Guard (Not available) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
  guard() function not implemented yet, use percept(selection, tribe:guard) instead.&lt;br /&gt;
&lt;br /&gt;
Syntax: guard();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to guard the selected location. Members will just patrol the area and attack whatever poses a threat.&lt;br /&gt;
&lt;br /&gt;
== LoadLocation ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadLocation(x,y,z,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039;, &#039;y&#039; and &#039;z&#039; are a set of coordinates.&lt;br /&gt;
* &#039;r&#039; is the location name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: add a new memory in the Database, adding a new location named &amp;quot;work&amp;quot; in the coordinates x,y,z.&lt;br /&gt;
&lt;br /&gt;
== LocateMemory ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateMemory(x,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a memory name.&lt;br /&gt;
* &#039;r&#039; is a recipe to load if the memory &#039;x&#039; isn&#039;t found.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It looks in the tribe&#039;s memory array for the memory called &#039;x&#039; and loads it into the previous selected npc&#039;s buffers. It is vital to use it before basic functions like mine,gather,guard,attack that use the npc buffers to execute.&lt;br /&gt;
&lt;br /&gt;
== LocateResource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateResource(x,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a resource name.&lt;br /&gt;
* &#039;r&#039; the recipe to load if no resource &#039;x&#039; is found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function works like the above-mentioned &#039;locateMemory&#039; function. The sole difference is that this function tries to locate resource &#039;x&#039;, and it case it fails it tries to locate memories &#039;mine&#039; or &#039;field&#039;. (which are the standard names of unprospected/undiscovered resource zones). In case nor &#039;mine&#039; or &#039;field&#039; are found, it sends the previous selected npcs to explore for them.&lt;br /&gt;
&lt;br /&gt;
== LocateBuilding ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateBuilding(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This functions locates a building spot on which there is an already constructed building. It searches for building spots in the asset array and set the selected assess in the npc &amp;quot;building_spot&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
NBUFFER[Building] is set to x, and NBUFFER[Work_Duration] is set to the building time of the building.&lt;br /&gt;
&lt;br /&gt;
Example Tribe Script:&lt;br /&gt;
&lt;br /&gt;
  select(Worker,1);locateBuilding(Campfire);goWork(60);&lt;br /&gt;
&lt;br /&gt;
== LocateBuildingSpot ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateBuildingSpot(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This functions locates a building spot previously reserved via &#039;reserveBuildingSpot&#039; function. It searches for building spots in the asset array and set the selected assess in the npc &amp;quot;building_spot&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
NBUFFER[Building] is set to x, and NBUFFER[Work_Duration] is set to the building time of the building.&lt;br /&gt;
&lt;br /&gt;
This function also sets the building spot to INCONSTRUCTION. So a build command should be executed next.&lt;br /&gt;
&lt;br /&gt;
The NPC can use the [[Behavior_Operations#Build Operation|Build Operation]] to build a building at the selected spot.  &lt;br /&gt;
&lt;br /&gt;
Example Tribe Script:&lt;br /&gt;
&lt;br /&gt;
  select(Worker,1);locateBuildingSpot(Campfire);percept(selection,tribe:build)&lt;br /&gt;
&lt;br /&gt;
Example NPC Script:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;behavior name=&amp;quot;DoBuild&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;locate obj=&amp;quot;building_spot&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;navigate /&amp;gt;&lt;br /&gt;
      &amp;lt;wait duration=&amp;quot;$NBUFFER[Work_Duration]&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;build /&amp;gt;&lt;br /&gt;
      &amp;lt;talk text=&amp;quot;Nice work building this $NBUFFER[Building]&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/behavior&amp;gt;&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:build&amp;quot; behavior=&amp;quot;DoBuild&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mate ==&lt;br /&gt;
&lt;br /&gt;
Syntax: mate();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to their home and fires their &#039;tribe:breed&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
Note: By default, the &#039;mate&#039; functions requires no resources and has no checks. Use it in a recipe that checks that enough resources for breeding are available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  select(any,1);&lt;br /&gt;
  setBuffer(selection,Reproduce_Type,$member_type);&lt;br /&gt;
  mate();&lt;br /&gt;
  alterResource($REPRODUCTION_RESOURCE, -$REPRODUCTION_COST);&lt;br /&gt;
&lt;br /&gt;
== Mine ==&lt;br /&gt;
&lt;br /&gt;
Syntax: mine();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to a previously selected mine and fires their &#039;tribe:mine&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== Percept ==&lt;br /&gt;
&lt;br /&gt;
Syntax: percept(t,p);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;t&#039; is either selection or tribe&lt;br /&gt;
* &#039;p&#039; is the perception to send&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends a perception to previously selected members or to the tribe.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  select(any,1);&lt;br /&gt;
  percept(selection,tribe:gather)&lt;br /&gt;
  percept(tribe,tribe:flee)&lt;br /&gt;
&lt;br /&gt;
== ReserveSpot ==&lt;br /&gt;
&lt;br /&gt;
Syntax: reserveSpot(x,y,z,bname);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039;, &#039;y&#039; and &#039;z&#039; are coordinates in the same sector as the tribe&lt;br /&gt;
* &#039;bname&#039; is the building name we want to reserve the spot for&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function is used so the scripter (you) can arrange the future village of the tribe. When creating a tribe, a recipe containing building spots should be wrote in order to pinpoint where building should be constructed in the future.&lt;br /&gt;
&lt;br /&gt;
== Select ==&lt;br /&gt;
&lt;br /&gt;
Syntax: select(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments: &lt;br /&gt;
* &#039;x&#039; is a tribe member type. Types can be crated using the [[Behavior_Operations#Reproduce_Operation|Reproduce Operation]]&lt;br /&gt;
* &#039;y&#039; is an int defining the number of members to be selected.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The &#039;select&#039; function is probably the most important algorithm step. It selects the members passed as arguments and keeps them in a temporary npc array so they can accept orders from the next algorithm steps. It actually works like selecting units and commanding them in a strategy game. After a &#039;select&#039; function, all next algorithm steps apply to selected members only, until another &#039;select&#039; command is issued or the recipe is completed.&lt;br /&gt;
&lt;br /&gt;
  Example:&lt;br /&gt;
     // Will send 3 miners to mine for gold.&lt;br /&gt;
     select(miner,3);&lt;br /&gt;
     locateResource(gold,Explore);&lt;br /&gt;
     mine();&lt;br /&gt;
&lt;br /&gt;
== SetBuffer ==&lt;br /&gt;
&lt;br /&gt;
Syntax: setBuffer(target,name,value);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;target&#039; is either selection or tribe.&lt;br /&gt;
* &#039;name&#039; is the name of the buffer to set.&lt;br /&gt;
* &#039;value&#039; is the new value to set for Buffer.&lt;br /&gt;
&lt;br /&gt;
For selection this resolve to NBUFFER[name] in recipes and $NBUFFER[name] in behaviors.&lt;br /&gt;
For tribes this resolve to TBUFFER[name] in recipes and $TBUFFER[name] in behaviors.&lt;br /&gt;
&lt;br /&gt;
This set the buffers used by [[NPC Variables]] to replace buffers.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
In an algorithm:&lt;br /&gt;
 select(Worker,2);&lt;br /&gt;
 setBuffer(selection,Work_Time,10);&lt;br /&gt;
 percept(tribe:work);&lt;br /&gt;
 &lt;br /&gt;
In a NPC behavior:&lt;br /&gt;
 &amp;lt;wait duration=&amp;quot;$NBUFFER[Work_Time]&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SpawnMember ==&lt;br /&gt;
Syntax: spawnMember(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an integer and the ID of the master NPC to clone and spawn&lt;br /&gt;
* &#039;y&#039; is a string identifying the type of member (example Warrior, Miner, Hunter, ...)&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function spawns a new member of the tribe, without requiring anything else, in contrast with mate() that requires an existing member to spawn another member. This function can be used to create the first member of the tribe.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Consumer Evolve Tribe&amp;quot; recipe with requirements: tribesman(Warrior,1,Consumer Ancestor Spawn);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Consumer Ancestor Spawn&amp;quot; recipe with no requirements and script: spawnMember(42, Warrior);&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: The master NPC ID, should be created in characters table + there must be an entry for this NPC in sc_npc_definitions table, with the AbstractTribesman. This will properly initialize the member of the tribe.&lt;br /&gt;
&lt;br /&gt;
== Wait ==&lt;br /&gt;
&lt;br /&gt;
Syntax: wait(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an float defining number seconds to halt recipe for.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function sets the wait time for a recipe. By default, no recipes with a wait time bigger than 0 are reparsed. As a consequence, applying wait time to a recipe will make the parser halt the current recipe at the current algorithm step and parse other recipes that wait in line. The function will also fire the &#039;tribe:wait&#039; reaction.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server Design]] [[Category:NPCClient Design]] [[Category:NPCClient Scripting]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Scripting&amp;diff=25733</id>
		<title>Tribe Scripting</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Scripting&amp;diff=25733"/>
		<updated>2026-01-04T18:38:18Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* SpawnMember */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Recipe Logic =&lt;br /&gt;
&lt;br /&gt;
== Recipes ==&lt;br /&gt;
&#039;&#039;&#039;A recipe database entry&#039;&#039;&#039;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!id&lt;br /&gt;
!name&lt;br /&gt;
!requirements&lt;br /&gt;
!algorithm&lt;br /&gt;
!persistent&lt;br /&gt;
|-&lt;br /&gt;
|used for db storing&lt;br /&gt;
|Name of the recipe&lt;br /&gt;
|requirement string containing all requirements&lt;br /&gt;
|algorithm string containing all algorithm steps&lt;br /&gt;
|If this flag is on, the recipe won&#039;t ever be deleted from the recipe tree. After parsing it, if no other recipe has a higher priority... it will be reparsed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage of Recipes ==&lt;br /&gt;
&lt;br /&gt;
Recipes is used to describe how [[tribes]] react. See [[Tribe Design]] for details.&lt;br /&gt;
&lt;br /&gt;
On initialization, a tribal recipe is first loaded in respect of the information indicated by the &#039;tribal_recipe&#039; field. (see [[TribesTable|tribes.sql]]). The tribal recipe is formed from &#039;Tribe Info&#039; functions. (see below)&lt;br /&gt;
&lt;br /&gt;
Based on those functions the npctype for each tribe is created and initial recipes are loaded.&lt;br /&gt;
&lt;br /&gt;
Further on, each Recipe has two important sections: requirements and algorithm. Each of those two is represented by a long string (the maximum is set in the database to 1000 characters) of functions separated by a semi-colon &#039;;&#039;. Upon parsing the long string is split in respect of the semicolons (;) and the recipe manager analyzes each resulting function.&lt;br /&gt;
&lt;br /&gt;
== Recipe-Tree Nodes ==&lt;br /&gt;
&lt;br /&gt;
Inside a tribe object, recipes are stored as Recipe Tree Nodes. This class was created to facilitate the management of recipes and the way recipes are selected to be parsed.&lt;br /&gt;
&lt;br /&gt;
All recipes are stored as leaves in a tree. This way we can always know their hierarchy and precedence.&lt;br /&gt;
&lt;br /&gt;
Besides the obvious usage as a tree, recipe tree nodes also hold vital data for recipe parsing: last requirement parsed, last algorithm step parsed, remaining waiting time.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s consider an example of a tribe which has some building spots available and the task to build on those spots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having the tree above, it&#039;s easy to select the actions required to complete the task. We first get some more food. After that we get the required members, search for wood and stone, and finally build the buildings.&lt;br /&gt;
&lt;br /&gt;
= Tribe Info =&lt;br /&gt;
&lt;br /&gt;
== Brain ==&lt;br /&gt;
&lt;br /&gt;
Syntax: brain(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x brain eg. behaviour to use for the tribe.&lt;br /&gt;
&lt;br /&gt;
Effect: Override the AbstractTribesman as the brain for the tribe.&lt;br /&gt;
&lt;br /&gt;
For each tribe the server create an tribe_&amp;lt;tribe_id&amp;gt; behavior that inherit from the brain given i the brain command. If no brain entry is given the tribe behaviour will use the AbstractTribesman behaviour. This can be used to create tribes with special behaviours.&lt;br /&gt;
&lt;br /&gt;
== Aggressivity ==&lt;br /&gt;
&lt;br /&gt;
Syntax: aggressivity(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: &lt;br /&gt;
* x in { warlike, neutral, peaceful }&lt;br /&gt;
&lt;br /&gt;
Effect: Decides the way the tribe reacts to other entities around it&#039;s members:&lt;br /&gt;
* Warlike  -- Attack anything on sight.&lt;br /&gt;
* Neutral  -- Attack only if members are attacked.&lt;br /&gt;
* Peaceful -- If tribe members are attack they flee, trying to escape.&lt;br /&gt;
&lt;br /&gt;
Mechanics: Upon parsing this function, an extra reaction is added to the tribal npctype in respect of this function&#039;s argument.&lt;br /&gt;
&lt;br /&gt;
== Growth ==&lt;br /&gt;
Syntax: growth(x)&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* x in ?&lt;br /&gt;
&lt;br /&gt;
Not implemented , at the moment all tribes have &amp;quot;conservatory&amp;quot; as value&lt;br /&gt;
&lt;br /&gt;
== Unity ==&lt;br /&gt;
Syntax: unity(x)&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* x in {*, cowards}&lt;br /&gt;
&lt;br /&gt;
At the moment anything but &amp;quot;cowards&amp;quot; will trigger one member of the tribe to help another member when attacked.&lt;br /&gt;
&lt;br /&gt;
== SleepPeriod ==&lt;br /&gt;
&lt;br /&gt;
Syntax: sleepPeriod(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: x in { diurnal, nocturnal, nosleep }&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|diurnal&lt;br /&gt;
|22:00 - 06:00&lt;br /&gt;
|Sleep during night&lt;br /&gt;
|-&lt;br /&gt;
|nocturnal&lt;br /&gt;
|08:00 - 18:00&lt;br /&gt;
|Sleep during day&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Effect: Makes the tribe members sleep at the given period of day.&lt;br /&gt;
&lt;br /&gt;
Mechanics: Upon parsing this function, an extra reaction is added to the tribal npctype. The reaction should react to timeofday perceptions.&lt;br /&gt;
&lt;br /&gt;
== LoadRecipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadRecipe(x); loadRecipe(x,distributed);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a Recipe Name&lt;br /&gt;
&lt;br /&gt;
Effect: Loads a recipe into the recipe tree. The new recipe&#039;s priority will be the current recipe&#039;s priority + 1.&lt;br /&gt;
&lt;br /&gt;
== LoadCyclicRecipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadCyclicRecipe(x,t);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a Recipe Name&lt;br /&gt;
* &#039;t&#039; is an int, representing the number of ticks (milliseconds) between recipe executions&lt;br /&gt;
&lt;br /&gt;
Effect: Loads a recipe into the recipe tree once every &#039;t&#039; ticks, with highest priority.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Syntax: building(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of buildings needed.&lt;br /&gt;
* &#039;r&#039; is the recipe needed to get the building if not available&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: At the moment, items are &#039;magically&#039; stored inside the tribal object. This object keeps track on items and buildings with the &#039;Asset&#039; structure. &#039;x&#039; can be any string with the condition that the tribe can actually gain the requested asset. Otherwise the requirement will never be met. Upon parsing this requirement, the tribal object checks it&#039;s asset arrays for the building &#039;x&#039; of quantity &#039;y&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tribesman ==&lt;br /&gt;
&lt;br /&gt;
Syntax: tribesman(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is a tribesman type (types are not well-defined at the moment). Keyword &#039;any&#039; is accepted too in order to define any member.&lt;br /&gt;
* y is an int defining the number of tribesmen needed&lt;br /&gt;
*r is the recipe needed to spawn a new member if not enough members are found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a number &#039;y&#039; of tribesman typed &#039;x&#039; regardless if they are busy or doing something else. If &#039;y&#039; members are found, the requirement is considered met.&lt;br /&gt;
&lt;br /&gt;
== TribesmanIdle ==&lt;br /&gt;
&lt;br /&gt;
Syntax: tribesmanidle(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is a tribesman type (types are not well-defined at the moment). Keyword &#039;any&#039; is accepted too in order to define any member.&lt;br /&gt;
* y is an int defining the number of tribesmen needed&lt;br /&gt;
*r is the recipe needed to spawn a new member if not enough members are found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a number &#039;y&#039; of tribesman typed &#039;x&#039; with the current behavior equal to the tribe&#039;s idle behavior. (e.g. &amp;quot;do nothing&amp;quot; behavior) If &#039;y&#039; members are found idle, the requirement is considered met.&lt;br /&gt;
&lt;br /&gt;
== Resource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: resource(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is the resource name &lt;br /&gt;
* y is the resource quantity required&lt;br /&gt;
* r is the recipe needed to get the resource if not available&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a &#039;y&#039; quantity of &#039;x&#039; resource. If this quantity is found then the resource is considered complete. $RESOURCE_AREA, $REPRODUCTION_RESOURCE and $REPRODUCTION_COST are valid variables.&lt;br /&gt;
&lt;br /&gt;
Judging by the way natural resources are defined, any string declared in natural_resources.sql as a resource can be parsed and mined by the tribe. By default, any new mine found by the tribesmen is stored as a memory named &#039;mine&#039;. Upon it&#039;s first mining action done on the &#039;mine&#039; memory, a reward is granted to the npc. When the NPC gets home and gives that to the tribal object, the memory &#039;mine&#039; is renamed after the reward. In conclusion, having a resource named &#039;Space Shuttle&#039; is valid and works.&lt;br /&gt;
&lt;br /&gt;
Note: The resource requirement just checks if enough resources are available. Use &#039;alterResource&#039; function in your recipes in order to actually substract resource from the tribe bank.&lt;br /&gt;
&lt;br /&gt;
== Knowledge ==&lt;br /&gt;
&lt;br /&gt;
Syntax: knowledge(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: &#039;x&#039; can be any string.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: As described in the [[Tribe Design]] document, knowledge are tokens that keep track on technologies developed by the tribe. It&#039;s valid to request any string as long as it would be possible for the tribe to develop the knowledge. Otherwise the requirement will never be met.&lt;br /&gt;
&lt;br /&gt;
== Item ==&lt;br /&gt;
&lt;br /&gt;
Syntax: item(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an item/building name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of items needed.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: At the moment, items are &#039;magically&#039; stored inside the tribal object. This object keeps track on items and buildings with the &#039;Asset&#039; structure. &#039;x&#039; can be any string with the condition that the tribe can actually gain the requested asset. Otherwise the requirement will never be met. Upon parsing this requirement, the tribal object checks it&#039;s asset arrays for the item &#039;x&#039; of quantity &#039;y&#039;.&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: recipe(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a recipe name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of recipes needed.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this requirement, the parser just adds an &#039;y&#039; number of &#039;x&#039; recipes to the recipe tree.&lt;br /&gt;
&lt;br /&gt;
This requirement isn&#039;t quite practical and should be avoided.&lt;br /&gt;
&lt;br /&gt;
== Trader (Not available) ==&lt;br /&gt;
&lt;br /&gt;
Syntax: trader(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an item name&lt;br /&gt;
&lt;br /&gt;
Effect: This requirement should check the traders array for a nearby trader giving item &#039;x&#039;.&lt;br /&gt;
&lt;br /&gt;
== Memory ==&lt;br /&gt;
&lt;br /&gt;
Syntax: memory(m,p,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;m&#039; is a memory name&lt;br /&gt;
* &#039;p&#039; is a probability between 0-100. Setting this to 10 make it 10% probably that the r will be run even if m is found.&lt;br /&gt;
* &#039;r&#039; is a recipe that will be run if the memory isn&#039;t found.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this requirement, the parser checks the memory array for a memory called &#039;m&#039;. If it is found, requirement is considered met. If it isn&#039;t found or the probability for failure has hit it will run the recipe &#039;r&#039;.&lt;br /&gt;
&lt;br /&gt;
= Algorithm Steps =&lt;br /&gt;
&lt;br /&gt;
== AddKnowledge ==&lt;br /&gt;
&lt;br /&gt;
Syntax: addKnowledge(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; can be any string.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Adds the &#039;x&#039; token as a piece of knowledge in the knowledge array.&lt;br /&gt;
&lt;br /&gt;
== AlterResource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: alterResource(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a resource name&lt;br /&gt;
* &#039;y&#039; is an int describing quantity&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this function, the parser modifies the quantity of resources available in the tribe.&lt;br /&gt;
&lt;br /&gt;
Note: The &#039;y&#039; value will be added to the current value in the tribe&#039;s bank. Use negative value to represent costs. (e.g. alterResource(gold,-20); in order to pay for a building)&lt;br /&gt;
&lt;br /&gt;
== Attack ==&lt;br /&gt;
&lt;br /&gt;
Syntax: attack();&lt;br /&gt;
&lt;br /&gt;
Arguments: None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends to previously selected members the &#039;tribe:attack&#039; perception to attack a previously selected location. If the selected location is not an attackable entity they will simply move there and attack whatever is near.&lt;br /&gt;
&lt;br /&gt;
== Gather == &lt;br /&gt;
&lt;br /&gt;
Syntax: gather();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to a previously selected field and fires their &#039;tribe:gather&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== GoWork ==&lt;br /&gt;
&lt;br /&gt;
Syntax: goWork(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an int defining the number of seconds the npcs should work for.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The &#039;goWork&#039; function sends previously selected npcs to a previously selected location, set the npc buffer [Work_Duration] to &#039;x&#039; and send &#039;tribe:work&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== Guard (Not available) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
  guard() function not implemented yet, use percept(selection, tribe:guard) instead.&lt;br /&gt;
&lt;br /&gt;
Syntax: guard();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to guard the selected location. Members will just patrol the area and attack whatever poses a threat.&lt;br /&gt;
&lt;br /&gt;
== LoadLocation ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadLocation(x,y,z,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039;, &#039;y&#039; and &#039;z&#039; are a set of coordinates.&lt;br /&gt;
* &#039;r&#039; is the location name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: add a new memory in the Database, adding a new location named &amp;quot;work&amp;quot; in the coordinates x,y,z.&lt;br /&gt;
&lt;br /&gt;
== LocateMemory ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateMemory(x,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a memory name.&lt;br /&gt;
* &#039;r&#039; is a recipe to load if the memory &#039;x&#039; isn&#039;t found.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It looks in the tribe&#039;s memory array for the memory called &#039;x&#039; and loads it into the previous selected npc&#039;s buffers. It is vital to use it before basic functions like mine,gather,guard,attack that use the npc buffers to execute.&lt;br /&gt;
&lt;br /&gt;
== LocateResource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateResource(x,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a resource name.&lt;br /&gt;
* &#039;r&#039; the recipe to load if no resource &#039;x&#039; is found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function works like the above-mentioned &#039;locateMemory&#039; function. The sole difference is that this function tries to locate resource &#039;x&#039;, and it case it fails it tries to locate memories &#039;mine&#039; or &#039;field&#039;. (which are the standard names of unprospected/undiscovered resource zones). In case nor &#039;mine&#039; or &#039;field&#039; are found, it sends the previous selected npcs to explore for them.&lt;br /&gt;
&lt;br /&gt;
== LocateBuilding ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateBuilding(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This functions locates a building spot on which there is an already constructed building. It searches for building spots in the asset array and set the selected assess in the npc &amp;quot;building_spot&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
NBUFFER[Building] is set to x, and NBUFFER[Work_Duration] is set to the building time of the building.&lt;br /&gt;
&lt;br /&gt;
Example Tribe Script:&lt;br /&gt;
&lt;br /&gt;
  select(Worker,1);locateBuilding(Campfire);goWork(60);&lt;br /&gt;
&lt;br /&gt;
== LocateBuildingSpot ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateBuildingSpot(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This functions locates a building spot previously reserved via &#039;reserveBuildingSpot&#039; function. It searches for building spots in the asset array and set the selected assess in the npc &amp;quot;building_spot&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
NBUFFER[Building] is set to x, and NBUFFER[Work_Duration] is set to the building time of the building.&lt;br /&gt;
&lt;br /&gt;
This function also sets the building spot to INCONSTRUCTION. So a build command should be executed next.&lt;br /&gt;
&lt;br /&gt;
The NPC can use the [[Behavior_Operations#Build Operation|Build Operation]] to build a building at the selected spot.  &lt;br /&gt;
&lt;br /&gt;
Example Tribe Script:&lt;br /&gt;
&lt;br /&gt;
  select(Worker,1);locateBuildingSpot(Campfire);percept(selection,tribe:build)&lt;br /&gt;
&lt;br /&gt;
Example NPC Script:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;behavior name=&amp;quot;DoBuild&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;locate obj=&amp;quot;building_spot&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;navigate /&amp;gt;&lt;br /&gt;
      &amp;lt;wait duration=&amp;quot;$NBUFFER[Work_Duration]&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;build /&amp;gt;&lt;br /&gt;
      &amp;lt;talk text=&amp;quot;Nice work building this $NBUFFER[Building]&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/behavior&amp;gt;&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:build&amp;quot; behavior=&amp;quot;DoBuild&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mate ==&lt;br /&gt;
&lt;br /&gt;
Syntax: mate();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to their home and fires their &#039;tribe:breed&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
Note: By default, the &#039;mate&#039; functions requires no resources and has no checks. Use it in a recipe that checks that enough resources for breeding are available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  select(any,1);&lt;br /&gt;
  setBuffer(selection,Reproduce_Type,$member_type);&lt;br /&gt;
  mate();&lt;br /&gt;
  alterResource($REPRODUCTION_RESOURCE, -$REPRODUCTION_COST);&lt;br /&gt;
&lt;br /&gt;
== Mine ==&lt;br /&gt;
&lt;br /&gt;
Syntax: mine();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to a previously selected mine and fires their &#039;tribe:mine&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== Percept ==&lt;br /&gt;
&lt;br /&gt;
Syntax: percept(t,p);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;t&#039; is either selection or tribe&lt;br /&gt;
* &#039;p&#039; is the perception to send&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends a perception to previously selected members or to the tribe.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  select(any,1);&lt;br /&gt;
  percept(selection,tribe:gather)&lt;br /&gt;
  percept(tribe,tribe:flee)&lt;br /&gt;
&lt;br /&gt;
== ReserveSpot ==&lt;br /&gt;
&lt;br /&gt;
Syntax: reserveSpot(x,y,z,bname);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039;, &#039;y&#039; and &#039;z&#039; are coordinates in the same sector as the tribe&lt;br /&gt;
* &#039;bname&#039; is the building name we want to reserve the spot for&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function is used so the scripter (you) can arrange the future village of the tribe. When creating a tribe, a recipe containing building spots should be wrote in order to pinpoint where building should be constructed in the future.&lt;br /&gt;
&lt;br /&gt;
== Select ==&lt;br /&gt;
&lt;br /&gt;
Syntax: select(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments: &lt;br /&gt;
* &#039;x&#039; is a tribe member type. Types can be crated using the [[Behavior_Operations#Reproduce_Operation|Reproduce Operation]]&lt;br /&gt;
* &#039;y&#039; is an int defining the number of members to be selected.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The &#039;select&#039; function is probably the most important algorithm step. It selects the members passed as arguments and keeps them in a temporary npc array so they can accept orders from the next algorithm steps. It actually works like selecting units and commanding them in a strategy game. After a &#039;select&#039; function, all next algorithm steps apply to selected members only, until another &#039;select&#039; command is issued or the recipe is completed.&lt;br /&gt;
&lt;br /&gt;
  Example:&lt;br /&gt;
     // Will send 3 miners to mine for gold.&lt;br /&gt;
     select(miner,3);&lt;br /&gt;
     locateResource(gold,Explore);&lt;br /&gt;
     mine();&lt;br /&gt;
&lt;br /&gt;
== SetBuffer ==&lt;br /&gt;
&lt;br /&gt;
Syntax: setBuffer(target,name,value);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;target&#039; is either selection or tribe.&lt;br /&gt;
* &#039;name&#039; is the name of the buffer to set.&lt;br /&gt;
* &#039;value&#039; is the new value to set for Buffer.&lt;br /&gt;
&lt;br /&gt;
For selection this resolve to NBUFFER[name] in recipes and $NBUFFER[name] in behaviors.&lt;br /&gt;
For tribes this resolve to TBUFFER[name] in recipes and $TBUFFER[name] in behaviors.&lt;br /&gt;
&lt;br /&gt;
This set the buffers used by [[NPC Variables]] to replace buffers.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
In an algorithm:&lt;br /&gt;
 select(Worker,2);&lt;br /&gt;
 setBuffer(selection,Work_Time,10);&lt;br /&gt;
 percept(tribe:work);&lt;br /&gt;
 &lt;br /&gt;
In a NPC behavior:&lt;br /&gt;
 &amp;lt;wait duration=&amp;quot;$NBUFFER[Work_Time]&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SpawnMember ==&lt;br /&gt;
Syntax: spawnMember(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an integer and the ID of the master NPC to clone and spawn&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function spawns a new member of the tribe, without requiring anything else, in contrast with mate() that requires an existing member to spawn another member. This function can be used to create the first member of the tribe.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Consumer Evolve Tribe&amp;quot; recipe with requirements: tribesman(number,1,Consumer Ancestor Spawn);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Consumer Ancestor Spawn&amp;quot; recipe with no requirements and script: spawnMember(42);&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: The master NPC ID, should be created in characters table + there must be an entry for this NPC in sc_npc_definitions table, with the AbstractTribesman. This will properly initialize the member of the tribe.&lt;br /&gt;
&lt;br /&gt;
== Wait ==&lt;br /&gt;
&lt;br /&gt;
Syntax: wait(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an float defining number seconds to halt recipe for.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function sets the wait time for a recipe. By default, no recipes with a wait time bigger than 0 are reparsed. As a consequence, applying wait time to a recipe will make the parser halt the current recipe at the current algorithm step and parse other recipes that wait in line. The function will also fire the &#039;tribe:wait&#039; reaction.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server Design]] [[Category:NPCClient Design]] [[Category:NPCClient Scripting]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Scripting&amp;diff=25732</id>
		<title>Tribe Scripting</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Tribe_Scripting&amp;diff=25732"/>
		<updated>2026-01-03T23:16:08Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Algorithm Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Recipe Logic =&lt;br /&gt;
&lt;br /&gt;
== Recipes ==&lt;br /&gt;
&#039;&#039;&#039;A recipe database entry&#039;&#039;&#039;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!id&lt;br /&gt;
!name&lt;br /&gt;
!requirements&lt;br /&gt;
!algorithm&lt;br /&gt;
!persistent&lt;br /&gt;
|-&lt;br /&gt;
|used for db storing&lt;br /&gt;
|Name of the recipe&lt;br /&gt;
|requirement string containing all requirements&lt;br /&gt;
|algorithm string containing all algorithm steps&lt;br /&gt;
|If this flag is on, the recipe won&#039;t ever be deleted from the recipe tree. After parsing it, if no other recipe has a higher priority... it will be reparsed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage of Recipes ==&lt;br /&gt;
&lt;br /&gt;
Recipes is used to describe how [[tribes]] react. See [[Tribe Design]] for details.&lt;br /&gt;
&lt;br /&gt;
On initialization, a tribal recipe is first loaded in respect of the information indicated by the &#039;tribal_recipe&#039; field. (see [[TribesTable|tribes.sql]]). The tribal recipe is formed from &#039;Tribe Info&#039; functions. (see below)&lt;br /&gt;
&lt;br /&gt;
Based on those functions the npctype for each tribe is created and initial recipes are loaded.&lt;br /&gt;
&lt;br /&gt;
Further on, each Recipe has two important sections: requirements and algorithm. Each of those two is represented by a long string (the maximum is set in the database to 1000 characters) of functions separated by a semi-colon &#039;;&#039;. Upon parsing the long string is split in respect of the semicolons (;) and the recipe manager analyzes each resulting function.&lt;br /&gt;
&lt;br /&gt;
== Recipe-Tree Nodes ==&lt;br /&gt;
&lt;br /&gt;
Inside a tribe object, recipes are stored as Recipe Tree Nodes. This class was created to facilitate the management of recipes and the way recipes are selected to be parsed.&lt;br /&gt;
&lt;br /&gt;
All recipes are stored as leaves in a tree. This way we can always know their hierarchy and precedence.&lt;br /&gt;
&lt;br /&gt;
Besides the obvious usage as a tree, recipe tree nodes also hold vital data for recipe parsing: last requirement parsed, last algorithm step parsed, remaining waiting time.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s consider an example of a tribe which has some building spots available and the task to build on those spots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Having the tree above, it&#039;s easy to select the actions required to complete the task. We first get some more food. After that we get the required members, search for wood and stone, and finally build the buildings.&lt;br /&gt;
&lt;br /&gt;
= Tribe Info =&lt;br /&gt;
&lt;br /&gt;
== Brain ==&lt;br /&gt;
&lt;br /&gt;
Syntax: brain(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x brain eg. behaviour to use for the tribe.&lt;br /&gt;
&lt;br /&gt;
Effect: Override the AbstractTribesman as the brain for the tribe.&lt;br /&gt;
&lt;br /&gt;
For each tribe the server create an tribe_&amp;lt;tribe_id&amp;gt; behavior that inherit from the brain given i the brain command. If no brain entry is given the tribe behaviour will use the AbstractTribesman behaviour. This can be used to create tribes with special behaviours.&lt;br /&gt;
&lt;br /&gt;
== Aggressivity ==&lt;br /&gt;
&lt;br /&gt;
Syntax: aggressivity(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: &lt;br /&gt;
* x in { warlike, neutral, peaceful }&lt;br /&gt;
&lt;br /&gt;
Effect: Decides the way the tribe reacts to other entities around it&#039;s members:&lt;br /&gt;
* Warlike  -- Attack anything on sight.&lt;br /&gt;
* Neutral  -- Attack only if members are attacked.&lt;br /&gt;
* Peaceful -- If tribe members are attack they flee, trying to escape.&lt;br /&gt;
&lt;br /&gt;
Mechanics: Upon parsing this function, an extra reaction is added to the tribal npctype in respect of this function&#039;s argument.&lt;br /&gt;
&lt;br /&gt;
== Growth ==&lt;br /&gt;
Syntax: growth(x)&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* x in ?&lt;br /&gt;
&lt;br /&gt;
Not implemented , at the moment all tribes have &amp;quot;conservatory&amp;quot; as value&lt;br /&gt;
&lt;br /&gt;
== Unity ==&lt;br /&gt;
Syntax: unity(x)&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
* x in {*, cowards}&lt;br /&gt;
&lt;br /&gt;
At the moment anything but &amp;quot;cowards&amp;quot; will trigger one member of the tribe to help another member when attacked.&lt;br /&gt;
&lt;br /&gt;
== SleepPeriod ==&lt;br /&gt;
&lt;br /&gt;
Syntax: sleepPeriod(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: x in { diurnal, nocturnal, nosleep }&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|diurnal&lt;br /&gt;
|22:00 - 06:00&lt;br /&gt;
|Sleep during night&lt;br /&gt;
|-&lt;br /&gt;
|nocturnal&lt;br /&gt;
|08:00 - 18:00&lt;br /&gt;
|Sleep during day&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Effect: Makes the tribe members sleep at the given period of day.&lt;br /&gt;
&lt;br /&gt;
Mechanics: Upon parsing this function, an extra reaction is added to the tribal npctype. The reaction should react to timeofday perceptions.&lt;br /&gt;
&lt;br /&gt;
== LoadRecipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadRecipe(x); loadRecipe(x,distributed);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a Recipe Name&lt;br /&gt;
&lt;br /&gt;
Effect: Loads a recipe into the recipe tree. The new recipe&#039;s priority will be the current recipe&#039;s priority + 1.&lt;br /&gt;
&lt;br /&gt;
== LoadCyclicRecipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadCyclicRecipe(x,t);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a Recipe Name&lt;br /&gt;
* &#039;t&#039; is an int, representing the number of ticks (milliseconds) between recipe executions&lt;br /&gt;
&lt;br /&gt;
Effect: Loads a recipe into the recipe tree once every &#039;t&#039; ticks, with highest priority.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Syntax: building(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of buildings needed.&lt;br /&gt;
* &#039;r&#039; is the recipe needed to get the building if not available&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: At the moment, items are &#039;magically&#039; stored inside the tribal object. This object keeps track on items and buildings with the &#039;Asset&#039; structure. &#039;x&#039; can be any string with the condition that the tribe can actually gain the requested asset. Otherwise the requirement will never be met. Upon parsing this requirement, the tribal object checks it&#039;s asset arrays for the building &#039;x&#039; of quantity &#039;y&#039;.&lt;br /&gt;
&lt;br /&gt;
== Tribesman ==&lt;br /&gt;
&lt;br /&gt;
Syntax: tribesman(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is a tribesman type (types are not well-defined at the moment). Keyword &#039;any&#039; is accepted too in order to define any member.&lt;br /&gt;
* y is an int defining the number of tribesmen needed&lt;br /&gt;
*r is the recipe needed to spawn a new member if not enough members are found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a number &#039;y&#039; of tribesman typed &#039;x&#039; regardless if they are busy or doing something else. If &#039;y&#039; members are found, the requirement is considered met.&lt;br /&gt;
&lt;br /&gt;
== TribesmanIdle ==&lt;br /&gt;
&lt;br /&gt;
Syntax: tribesmanidle(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is a tribesman type (types are not well-defined at the moment). Keyword &#039;any&#039; is accepted too in order to define any member.&lt;br /&gt;
* y is an int defining the number of tribesmen needed&lt;br /&gt;
*r is the recipe needed to spawn a new member if not enough members are found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a number &#039;y&#039; of tribesman typed &#039;x&#039; with the current behavior equal to the tribe&#039;s idle behavior. (e.g. &amp;quot;do nothing&amp;quot; behavior) If &#039;y&#039; members are found idle, the requirement is considered met.&lt;br /&gt;
&lt;br /&gt;
== Resource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: resource(x,y,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* x is the resource name &lt;br /&gt;
* y is the resource quantity required&lt;br /&gt;
* r is the recipe needed to get the resource if not available&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The tribal object checks for a &#039;y&#039; quantity of &#039;x&#039; resource. If this quantity is found then the resource is considered complete. $RESOURCE_AREA, $REPRODUCTION_RESOURCE and $REPRODUCTION_COST are valid variables.&lt;br /&gt;
&lt;br /&gt;
Judging by the way natural resources are defined, any string declared in natural_resources.sql as a resource can be parsed and mined by the tribe. By default, any new mine found by the tribesmen is stored as a memory named &#039;mine&#039;. Upon it&#039;s first mining action done on the &#039;mine&#039; memory, a reward is granted to the npc. When the NPC gets home and gives that to the tribal object, the memory &#039;mine&#039; is renamed after the reward. In conclusion, having a resource named &#039;Space Shuttle&#039; is valid and works.&lt;br /&gt;
&lt;br /&gt;
Note: The resource requirement just checks if enough resources are available. Use &#039;alterResource&#039; function in your recipes in order to actually substract resource from the tribe bank.&lt;br /&gt;
&lt;br /&gt;
== Knowledge ==&lt;br /&gt;
&lt;br /&gt;
Syntax: knowledge(x);&lt;br /&gt;
&lt;br /&gt;
Arguments: &#039;x&#039; can be any string.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: As described in the [[Tribe Design]] document, knowledge are tokens that keep track on technologies developed by the tribe. It&#039;s valid to request any string as long as it would be possible for the tribe to develop the knowledge. Otherwise the requirement will never be met.&lt;br /&gt;
&lt;br /&gt;
== Item ==&lt;br /&gt;
&lt;br /&gt;
Syntax: item(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an item/building name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of items needed.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: At the moment, items are &#039;magically&#039; stored inside the tribal object. This object keeps track on items and buildings with the &#039;Asset&#039; structure. &#039;x&#039; can be any string with the condition that the tribe can actually gain the requested asset. Otherwise the requirement will never be met. Upon parsing this requirement, the tribal object checks it&#039;s asset arrays for the item &#039;x&#039; of quantity &#039;y&#039;.&lt;br /&gt;
&lt;br /&gt;
== Recipe ==&lt;br /&gt;
&lt;br /&gt;
Syntax: recipe(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a recipe name.&lt;br /&gt;
* &#039;y&#039; is an int defining the quantity of recipes needed.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this requirement, the parser just adds an &#039;y&#039; number of &#039;x&#039; recipes to the recipe tree.&lt;br /&gt;
&lt;br /&gt;
This requirement isn&#039;t quite practical and should be avoided.&lt;br /&gt;
&lt;br /&gt;
== Trader (Not available) ==&lt;br /&gt;
&lt;br /&gt;
Syntax: trader(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an item name&lt;br /&gt;
&lt;br /&gt;
Effect: This requirement should check the traders array for a nearby trader giving item &#039;x&#039;.&lt;br /&gt;
&lt;br /&gt;
== Memory ==&lt;br /&gt;
&lt;br /&gt;
Syntax: memory(m,p,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;m&#039; is a memory name&lt;br /&gt;
* &#039;p&#039; is a probability between 0-100. Setting this to 10 make it 10% probably that the r will be run even if m is found.&lt;br /&gt;
* &#039;r&#039; is a recipe that will be run if the memory isn&#039;t found.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this requirement, the parser checks the memory array for a memory called &#039;m&#039;. If it is found, requirement is considered met. If it isn&#039;t found or the probability for failure has hit it will run the recipe &#039;r&#039;.&lt;br /&gt;
&lt;br /&gt;
= Algorithm Steps =&lt;br /&gt;
&lt;br /&gt;
== AddKnowledge ==&lt;br /&gt;
&lt;br /&gt;
Syntax: addKnowledge(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; can be any string.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Adds the &#039;x&#039; token as a piece of knowledge in the knowledge array.&lt;br /&gt;
&lt;br /&gt;
== AlterResource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: alterResource(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a resource name&lt;br /&gt;
* &#039;y&#039; is an int describing quantity&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: Upon parsing this function, the parser modifies the quantity of resources available in the tribe.&lt;br /&gt;
&lt;br /&gt;
Note: The &#039;y&#039; value will be added to the current value in the tribe&#039;s bank. Use negative value to represent costs. (e.g. alterResource(gold,-20); in order to pay for a building)&lt;br /&gt;
&lt;br /&gt;
== Attack ==&lt;br /&gt;
&lt;br /&gt;
Syntax: attack();&lt;br /&gt;
&lt;br /&gt;
Arguments: None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends to previously selected members the &#039;tribe:attack&#039; perception to attack a previously selected location. If the selected location is not an attackable entity they will simply move there and attack whatever is near.&lt;br /&gt;
&lt;br /&gt;
== Gather == &lt;br /&gt;
&lt;br /&gt;
Syntax: gather();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to a previously selected field and fires their &#039;tribe:gather&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== GoWork ==&lt;br /&gt;
&lt;br /&gt;
Syntax: goWork(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an int defining the number of seconds the npcs should work for.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The &#039;goWork&#039; function sends previously selected npcs to a previously selected location, set the npc buffer [Work_Duration] to &#039;x&#039; and send &#039;tribe:work&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== Guard (Not available) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
  guard() function not implemented yet, use percept(selection, tribe:guard) instead.&lt;br /&gt;
&lt;br /&gt;
Syntax: guard();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to guard the selected location. Members will just patrol the area and attack whatever poses a threat.&lt;br /&gt;
&lt;br /&gt;
== LoadLocation ==&lt;br /&gt;
&lt;br /&gt;
Syntax: loadLocation(x,y,z,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039;, &#039;y&#039; and &#039;z&#039; are a set of coordinates.&lt;br /&gt;
* &#039;r&#039; is the location name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: add a new memory in the Database, adding a new location named &amp;quot;work&amp;quot; in the coordinates x,y,z.&lt;br /&gt;
&lt;br /&gt;
== LocateMemory ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateMemory(x,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a memory name.&lt;br /&gt;
* &#039;r&#039; is a recipe to load if the memory &#039;x&#039; isn&#039;t found.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It looks in the tribe&#039;s memory array for the memory called &#039;x&#039; and loads it into the previous selected npc&#039;s buffers. It is vital to use it before basic functions like mine,gather,guard,attack that use the npc buffers to execute.&lt;br /&gt;
&lt;br /&gt;
== LocateResource ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateResource(x,r);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a resource name.&lt;br /&gt;
* &#039;r&#039; the recipe to load if no resource &#039;x&#039; is found&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function works like the above-mentioned &#039;locateMemory&#039; function. The sole difference is that this function tries to locate resource &#039;x&#039;, and it case it fails it tries to locate memories &#039;mine&#039; or &#039;field&#039;. (which are the standard names of unprospected/undiscovered resource zones). In case nor &#039;mine&#039; or &#039;field&#039; are found, it sends the previous selected npcs to explore for them.&lt;br /&gt;
&lt;br /&gt;
== LocateBuilding ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateBuilding(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This functions locates a building spot on which there is an already constructed building. It searches for building spots in the asset array and set the selected assess in the npc &amp;quot;building_spot&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
NBUFFER[Building] is set to x, and NBUFFER[Work_Duration] is set to the building time of the building.&lt;br /&gt;
&lt;br /&gt;
Example Tribe Script:&lt;br /&gt;
&lt;br /&gt;
  select(Worker,1);locateBuilding(Campfire);goWork(60);&lt;br /&gt;
&lt;br /&gt;
== LocateBuildingSpot ==&lt;br /&gt;
&lt;br /&gt;
Syntax: locateBuildingSpot(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is a building name.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This functions locates a building spot previously reserved via &#039;reserveBuildingSpot&#039; function. It searches for building spots in the asset array and set the selected assess in the npc &amp;quot;building_spot&amp;quot; variable.&lt;br /&gt;
&lt;br /&gt;
NBUFFER[Building] is set to x, and NBUFFER[Work_Duration] is set to the building time of the building.&lt;br /&gt;
&lt;br /&gt;
This function also sets the building spot to INCONSTRUCTION. So a build command should be executed next.&lt;br /&gt;
&lt;br /&gt;
The NPC can use the [[Behavior_Operations#Build Operation|Build Operation]] to build a building at the selected spot.  &lt;br /&gt;
&lt;br /&gt;
Example Tribe Script:&lt;br /&gt;
&lt;br /&gt;
  select(Worker,1);locateBuildingSpot(Campfire);percept(selection,tribe:build)&lt;br /&gt;
&lt;br /&gt;
Example NPC Script:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;behavior name=&amp;quot;DoBuild&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;locate obj=&amp;quot;building_spot&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;navigate /&amp;gt;&lt;br /&gt;
      &amp;lt;wait duration=&amp;quot;$NBUFFER[Work_Duration]&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;build /&amp;gt;&lt;br /&gt;
      &amp;lt;talk text=&amp;quot;Nice work building this $NBUFFER[Building]&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/behavior&amp;gt;&lt;br /&gt;
  &amp;lt;react event=&amp;quot;tribe:build&amp;quot; behavior=&amp;quot;DoBuild&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mate ==&lt;br /&gt;
&lt;br /&gt;
Syntax: mate();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to their home and fires their &#039;tribe:breed&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
Note: By default, the &#039;mate&#039; functions requires no resources and has no checks. Use it in a recipe that checks that enough resources for breeding are available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  select(any,1);&lt;br /&gt;
  setBuffer(selection,Reproduce_Type,$member_type);&lt;br /&gt;
  mate();&lt;br /&gt;
  alterResource($REPRODUCTION_RESOURCE, -$REPRODUCTION_COST);&lt;br /&gt;
&lt;br /&gt;
== Mine ==&lt;br /&gt;
&lt;br /&gt;
Syntax: mine();&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* None.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends previously selected members to a previously selected mine and fires their &#039;tribe:mine&#039; behavior.&lt;br /&gt;
&lt;br /&gt;
== Percept ==&lt;br /&gt;
&lt;br /&gt;
Syntax: percept(t,p);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;t&#039; is either selection or tribe&lt;br /&gt;
* &#039;p&#039; is the perception to send&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: It sends a perception to previously selected members or to the tribe.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  select(any,1);&lt;br /&gt;
  percept(selection,tribe:gather)&lt;br /&gt;
  percept(tribe,tribe:flee)&lt;br /&gt;
&lt;br /&gt;
== ReserveSpot ==&lt;br /&gt;
&lt;br /&gt;
Syntax: reserveSpot(x,y,z,bname);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039;, &#039;y&#039; and &#039;z&#039; are coordinates in the same sector as the tribe&lt;br /&gt;
* &#039;bname&#039; is the building name we want to reserve the spot for&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function is used so the scripter (you) can arrange the future village of the tribe. When creating a tribe, a recipe containing building spots should be wrote in order to pinpoint where building should be constructed in the future.&lt;br /&gt;
&lt;br /&gt;
== Select ==&lt;br /&gt;
&lt;br /&gt;
Syntax: select(x,y);&lt;br /&gt;
&lt;br /&gt;
Arguments: &lt;br /&gt;
* &#039;x&#039; is a tribe member type. Types can be crated using the [[Behavior_Operations#Reproduce_Operation|Reproduce Operation]]&lt;br /&gt;
* &#039;y&#039; is an int defining the number of members to be selected.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: The &#039;select&#039; function is probably the most important algorithm step. It selects the members passed as arguments and keeps them in a temporary npc array so they can accept orders from the next algorithm steps. It actually works like selecting units and commanding them in a strategy game. After a &#039;select&#039; function, all next algorithm steps apply to selected members only, until another &#039;select&#039; command is issued or the recipe is completed.&lt;br /&gt;
&lt;br /&gt;
  Example:&lt;br /&gt;
     // Will send 3 miners to mine for gold.&lt;br /&gt;
     select(miner,3);&lt;br /&gt;
     locateResource(gold,Explore);&lt;br /&gt;
     mine();&lt;br /&gt;
&lt;br /&gt;
== SetBuffer ==&lt;br /&gt;
&lt;br /&gt;
Syntax: setBuffer(target,name,value);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;target&#039; is either selection or tribe.&lt;br /&gt;
* &#039;name&#039; is the name of the buffer to set.&lt;br /&gt;
* &#039;value&#039; is the new value to set for Buffer.&lt;br /&gt;
&lt;br /&gt;
For selection this resolve to NBUFFER[name] in recipes and $NBUFFER[name] in behaviors.&lt;br /&gt;
For tribes this resolve to TBUFFER[name] in recipes and $TBUFFER[name] in behaviors.&lt;br /&gt;
&lt;br /&gt;
This set the buffers used by [[NPC Variables]] to replace buffers.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
In an algorithm:&lt;br /&gt;
 select(Worker,2);&lt;br /&gt;
 setBuffer(selection,Work_Time,10);&lt;br /&gt;
 percept(tribe:work);&lt;br /&gt;
 &lt;br /&gt;
In a NPC behavior:&lt;br /&gt;
 &amp;lt;wait duration=&amp;quot;$NBUFFER[Work_Time]&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SpawnMember ==&lt;br /&gt;
Syntax: spawnMember(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an integer and the ID of the master NPC to clone and spawn&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function spawns a new member of the tribe, without requiring anything else, in contrast with mate() that requires an existing member to spawn another member. This function can be used to create the first member of the tribe.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Consumer Evolve Tribe&amp;quot; recipe with requirements: tribesman(number,1,Consumer Ancestor Spawn);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Consumer Ancestor Spawn&amp;quot; recipe with no requirements and script: spawnMember(156);&lt;br /&gt;
&lt;br /&gt;
== Wait ==&lt;br /&gt;
&lt;br /&gt;
Syntax: wait(x);&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;x&#039; is an float defining number seconds to halt recipe for.&lt;br /&gt;
&lt;br /&gt;
Effect &amp;amp; Mechanics: This function sets the wait time for a recipe. By default, no recipes with a wait time bigger than 0 are reparsed. As a consequence, applying wait time to a recipe will make the parser halt the current recipe at the current algorithm step and parse other recipes that wait in line. The function will also fire the &#039;tribe:wait&#039; reaction.&lt;br /&gt;
&lt;br /&gt;
[[Category:Server Design]] [[Category:NPCClient Design]] [[Category:NPCClient Scripting]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_GDB_Debug_Hints&amp;diff=25727</id>
		<title>PSUnreal GDB Debug Hints</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_GDB_Debug_Hints&amp;diff=25727"/>
		<updated>2026-01-01T22:37:26Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== psItem ===&lt;br /&gt;
print (TCHAR*)item-&amp;gt;current_stats-&amp;gt;name&lt;br /&gt;
&lt;br /&gt;
=== psCharacter ===&lt;br /&gt;
print (TCHAR*)client-&amp;gt;name&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Jetbrains Rider debug ==&lt;br /&gt;
To have a conditional breakpoint for an FString use this: name==L&amp;quot;Trepor&amp;quot;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Players_Guide/Magic&amp;diff=25726</id>
		<title>Players Guide/Magic</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Players_Guide/Magic&amp;diff=25726"/>
		<updated>2025-12-29T22:37:05Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Enchanted items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The magical energy in [[Yliakum]] is divided into six ways of arcane: [[Players Guide/Magic#Crystal Way | Crystal Way]], [[Players Guide/Magic#Azure Way | Azure Way]], [[Players Guide/Magic#Red Way | Red Way]], [[Players Guide/Magic#Dark Way | Dark Way]], [[Players Guide/Magic#Brown Way | Brown Way]] and [[Players Guide/Magic#Blue Way | Blue Way]]. &lt;br /&gt;
[[Image:Magecasting.jpeg|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
==The Ways of Magic==&lt;br /&gt;
[[Image:Ways.png|left|150px]]&lt;br /&gt;
Each Way has a particular color and a [[Ingame Help#Stats and Skills | mental stat]] associated. The three mental stats linked to magic are: [[Players Guide#Stats and Skills|Charisma]], [[Players Guide#Stats and Skills|Intelligence]] and [[Players Guide#Stats and Skills|Willpower]]. They give bonuses to the casting of spells that pertain to that way.&lt;br /&gt;
&lt;br /&gt;
Each way is composed of a set of spells and each spell can be casted by a wizard thanks to the combination of a set of runes, called [[Players Guide/Magic#The Glyphs | &amp;quot;glyphs&amp;quot;]]. The spells of a particular Way are related to the same energy and the same concepts (Water, Air or Healing, Drain). They produce either a direct damage or a damage over time on the opponent.&lt;br /&gt;
&lt;br /&gt;
The ways are all somewhat linked by relationship of opposition or attraction. A specific way opposes another and is &amp;quot;friendly&amp;quot; with two others (ie. Crystal Way opposes Dark Way and is friendly with Blue and Azure Way). &lt;br /&gt;
Therefor, each spell giving a buff for a given time will provide at least a small way resistance (ie. Casting a Red Way &amp;quot;Strength&amp;quot; spell on yourself will also protect you slightly againt Blue Way).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Crystal Way (CW)===&lt;br /&gt;
Users of this Way, get the pure energy of the [[Azure Sun|Crystal]], more directly than all other Ways. Famous for the ability to heal, and cure the most terrible wounds, people have said that if you reach a great knowledge, you can even bring back a person from death. Nonetheless there are many powerful offensive spells, particularly effective against evil and dark creatures. While warriors and farmers with injured animals are more then happy to see these practitioners around; around most towns people feel the appearance of these practitioners is a bad omen of bad times to come. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:CrystalWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | White || Energy, Life and Light || Buff Self &amp;amp; Allies, Direct Damage, Direct Healing || Charisma || Opposed to: Dark Way&lt;br /&gt;
Friendly with: Blue &amp;amp; Azure Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Dark Way (DW)===&lt;br /&gt;
This Way is one that conquers more myth then any of the others. Its practitioners have a history of being the most innovative of any practitioners of the Ways of Magic, but with all innovation there is both good and bad. It&#039;s well known that many disasters and epidemics were caused by the adepts of this ancient Way. Holding some spells with terrifying effects, things can become even worse if you lose the control of its power. Some spells enable the control of horrific creatures, such as undead, demons and spirits, whilst some enable the caster to control objects and people in a subtle manner at distance. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:DarkWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Black || Entropy, Death and Darkness || Fear &amp;amp; Debuff, Drain, Direct Damage and Damage Over Time || Charisma || Opposed to: Crystal Way&lt;br /&gt;
Friendly with: Brown &amp;amp; Red Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Azure Way (AW)===&lt;br /&gt;
Basically a sneaky and insidious energy, the Azure Way can control the will, the perceptions and the intentions of any intelligent being. It&#039;s power comes from the deep knowledge of the mind and the way to influence it, but it relies also on the mind&#039;s potential to influence the surrounding areas and objects, particularly all that is related to the air element. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:AzureWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Light Blue || Mind, Illusion and Air element ||Charm &amp;amp; Buff NPCs, Paralyzation, Minor Direct Damage and Damage Over Time || Will || Opposed to: Brown Way&lt;br /&gt;
Friendly with: Crystal &amp;amp; Red Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Red Way (RW)===&lt;br /&gt;
The spellcaster is able to invoke the power of Chaos, and to bend to his/her/kra&#039;s will the devastating fury of fire, summoning it for its both damaging and purifying qualities. Spells of the Red Way can also instil courage and strength into companions or other creatures. Most spells in this Way are fire related, and the majority of metal workers have knowledge of it. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:RedWay.png|32px]]&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Red || Strength, Chaos &amp;amp; Fire element||Major Direct Damage, Combat Buffs|| Will || Opposed to: Blue Way&lt;br /&gt;
Friendly with: Azure &amp;amp; Dark Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Blue Way (BlW)===&lt;br /&gt;
Many diseases and poisons would be incurable without the help of the spells of this Way. The offensive and defensive potential of this art reside mainly on the control of the water element, but also of cold and ice that are strictly related to it. Equally inestimable are the divination spells that can provide very useful information on the past, present and future.&lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:BlueWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Blue || Divination, Purification and Water element ||Immobilize, Major Damage Over Time, Healing Over Time, Polymorph|| Intelligence ||Opposed to: Red Way&lt;br /&gt;
Friendly with: Brown &amp;amp; Crystal Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Brown Way (BrW)===&lt;br /&gt;
The glyphs of this Way give to the wizard the ability to cast different protective spells, to summon natural creatures and some monsters and to influence their will. This Way is really close to the element of Earth and can control all that&#039;s related to it. Users can call nature spirits for assistance or mark themselves and allies as friends of nature. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:BrownWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Brown || Nature, Protective magic and Earth element ||Defensive Buff, Summon Monster, Direct Damage, Immobilization, Minor Polymorph|| Intelligence ||Opposed to: Azure Way&lt;br /&gt;
Friendly with: Blue &amp;amp; Dark Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Casting a Spell==&lt;br /&gt;
===The Glyphs===&lt;br /&gt;
At the beginning of [[Players Guide/Yliakum History | Yliakum History]], the [[God|god]] [[Talad]], forged pure magical energy into shapes called &amp;quot;Glyphs&amp;quot;. They form the base of Yliakum magic. &lt;br /&gt;
&lt;br /&gt;
* No spell can be casted without a glyph. &lt;br /&gt;
&lt;br /&gt;
They are found in nature with no real explanation, no one knows exactly why they form but when some type of energy is strongly present in one place a glyph can form. Glyphs patterns appear on very different materials from a leaf to the fur of an animal and usually on any type of rock. &lt;br /&gt;
&lt;br /&gt;
During the centuries many glyphs have been found and studied by the wizards. They discovered that each glyph can create a spell effect and that several glyphs can be combined to obtain greater effects. To simplify casting of spells, the glyphs are associated with a concept (ie. &amp;quot;Weight&amp;quot;) and wizards combine those concepts to form new spells (ie. &amp;quot;Weight&amp;quot; and &amp;quot;Negate&amp;quot; to become very light).&lt;br /&gt;
&lt;br /&gt;
Nowadays, glyphs can be found rendering services to the people of Yliakum or can be bought to mages like [[Levrus Dahrenn]] in the [[Magic Shop | magic shop]] for the more basic of them. The more rare and powerfull glyphs can be obtained by joining a Way Circle (school of magic) and follow its path to the Mastery of a particular Way.&lt;br /&gt;
&lt;br /&gt;
* The glyphs purchased or rewarded will appear in your [[Ingame Help#Inventory Window | Inventory]] and be visible in the Glyphs Window in your [[Ingame Help#Spell Book Window | Spell Book]].&lt;br /&gt;
&lt;br /&gt;
[[File:Glyphs.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
===Purification===&lt;br /&gt;
To use a glyph, the wizard must apply a process of Purification, which take some time. The Purification establish a strong link in between the wizard and his glyph. If he dies, the glyphs will be taken to the [[Death|Death Realm]] with him. A wizard can trade a glyph, but the recipient will need to purify the glyph as well to create a new magic link and be able to use it. &lt;br /&gt;
&lt;br /&gt;
* To purify a glyph, open the Glyph window from your Spell Book. &lt;br /&gt;
* Drag the glyph and drop it on the button called: &#039;&#039;&#039;Purify&#039;&#039;&#039;. &lt;br /&gt;
* When the Purification is done, you will see a message in your Chat Window &amp;gt; System Tab and your glyph will be surrounded of a white aura.&lt;br /&gt;
&lt;br /&gt;
===Researching a Spell===&lt;br /&gt;
[[Image:SpellbookVen.jpg|300px|thumb|left]]&lt;br /&gt;
Once you have one or more glyphs, you can start to research spells.  To be discovred, a spell can ask one glyph or a combinaison of up to 3 glyphs.&lt;br /&gt;
&lt;br /&gt;
Shown on this pic is the glyph window of your Spell Book. The six main boxes will content the glyphs of the six ways of magic. The small row of boxes at the bottom of the window is where you put glyphs in order to combine or purify them.&lt;br /&gt;
* To discover a spell, drag one or several glyphs in the small row of boxes at the bottom of the window and hit the button called: &#039;&#039;&#039;Research&#039;&#039;&#039;.&lt;br /&gt;
* When you effectivly discovred a spell, its name and description will appear.&lt;br /&gt;
* Once discovred, the spell will automatically be added in your Spell Book. You wont have to research it again to cast it.&lt;br /&gt;
&lt;br /&gt;
In this example, the Blue Way glyph &amp;quot;Cold&amp;quot; has been placed in the box and the wizard has discovred the spell called &amp;quot;Freeze&amp;quot;.&lt;br /&gt;
* If you fail to discover a spell it might be for several raison :  the combinaison of glyphs isn&#039;t right; you have not trained that way of magic high enough; or the glyph isn&#039;t purified. &lt;br /&gt;
Researching a spell is dangerous for the wizard. In effect, it ask a lot of mental focus and the strong magical energy at work may wound an unwary magician.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Casting===&lt;br /&gt;
There are two great categories of spells available to the wizards: the enhancing spells that we call &amp;quot;buffs&amp;quot; and the attack spells.&lt;br /&gt;
&lt;br /&gt;
The enhancing spells like &amp;quot;Rock Armor&amp;quot; (Brown Way) are made to be cast on the wizard. They enhance one health or stamina or increase one defensive ability. Some of those spells can be cast on friends, like &amp;quot;Life Infusion&amp;quot; (CW).&lt;br /&gt;
&lt;br /&gt;
The attack spells like &amp;quot;Flame Burst&amp;quot; (RW) are made to defeat enemies. Some are efficient in close range, some in very long range. Those spells can be cast on players too in case of [[General FAQ#Will there be Player vs. Player combat in PlaneShift?|PvP]] (player versus player).&lt;br /&gt;
&lt;br /&gt;
The process to cast a spell is as follow: &lt;br /&gt;
* Select your character or an enemy [[Non-Player Character|NPC]]&lt;br /&gt;
* Open your spell book, select the spell you wish to cast and click &#039;&#039;&#039;Cast Spell&#039;&#039;&#039;. &lt;br /&gt;
There is many ways to make this operation less long. The quickest one is to create a [[Ingame Help#Shortcuts Window|shortcut]] of the spell you plan to use a lot.&lt;br /&gt;
* Once you clicked on the chosen spell, a count down window will appear.  When it is finished, the spell will be cast.&lt;br /&gt;
&lt;br /&gt;
[[Image:magepower.jpeg|left|thumb|400px]] [[Image:Magered.jpg|center|thumb|350px]]&lt;br /&gt;
&lt;br /&gt;
==Magic Mechanism==&lt;br /&gt;
&lt;br /&gt;
===Type of Damage===&lt;br /&gt;
&lt;br /&gt;
Spells and Magical effects can have different type of effects:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Direct Damage&#039;&#039;&#039; (DD): direct damage is applied as soon as the spell has been cast. Red Way offensive spells usually deal direct damage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Damage over Time&#039;&#039;&#039; (DoT): this damage is applied over a period of time. Starting from when the spells has been successfully cast and until the spell duration runs out, the target HPs are constantly reduced. Blue Way offensive spells usually deal damage over time. This type of damage usually deal more damage than an equivalent realm spell, on the other side the duration can allow the target to try to heal itself or dispel the offensive spell.&lt;br /&gt;
&lt;br /&gt;
===Damage and Saving Throws===&lt;br /&gt;
When a spell deals damage may allow the opponent to roll a &#039;&#039;saving throw&#039;&#039; to reduce the amount of damage sustained; this &#039;&#039;saving throw&#039;&#039; is made by the server confronting the caster and the target knowledge of the spell&#039;s magic way (e.g. Crystal Magic) plus a random factor: the higher is the target&#039;s knowledge of the way the higher is the chance to succeed the roll. When a target successfully roll the save the spell damage is usually halved.&lt;br /&gt;
If a spell which deals damage does not allow for a &#039;&#039;saving throw&#039;&#039; roll, that spell will usually deal about 70% less damage than an equivalent spell (same realm and same magic way).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #efe; padding: 4px 4px; width: 1000px&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Fountain.png|40px]] &#039;&#039;&#039;Tip: The higher is your knowledge in a way the higher is your chance to counter or avoid damage and effects of the same way.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Magic Resistance===&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
===Spell Power (KFactor)===&lt;br /&gt;
&#039;&#039;(under construction)&#039;&#039;&lt;br /&gt;
The spell caster can decide to channel more mana into casting by setting the additional spell power, allowing the caster to cast a more powerful spell.&lt;br /&gt;
&lt;br /&gt;
The additional spell power factor is expressed as a percentage value, from 0% to 100%. If you set an additional spell power factor of 50% then you will channel an additional 50% of the base mana requirement for a spell into the spell.&lt;br /&gt;
&lt;br /&gt;
The more you push the additional spell power, the more you must have affinity with the ways and its associated Mental Stat to control the effects. The power level of the spell is raised by the additional spell power, so the spell will be more powerful.&lt;br /&gt;
&lt;br /&gt;
The use of additional spell power has the side-effect that the spell can fizzle or even produce damages to the caster, depending on how much the spell goes out of control.&lt;br /&gt;
&lt;br /&gt;
To set your additional spell power, use the slider in your Status Window.&lt;br /&gt;
&lt;br /&gt;
===Spellcasting Time===&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
=Enchanted items=&lt;br /&gt;
Glyphs can be used in combination with special Enchanters to imbue crystals (ruby, sapphire, emerald and diamond) with magical powers. These crystals held or set on items during their particular crafting stage. Once set the enchanted gem bestow its magical power on the enchanted item.&lt;br /&gt;
Each gem can be enchanted with only one glyph at time, therefore a single item cannot be enchanted with more than a single way.&lt;br /&gt;
&lt;br /&gt;
Please note that the modifiers found in randomly looted weapons are different from the ones you may obtain by crafting with glyphs.&lt;br /&gt;
&lt;br /&gt;
The process is:&lt;br /&gt;
&lt;br /&gt;
1) Get a ruby, sapphire, emerald or diamond crystal&lt;br /&gt;
&lt;br /&gt;
2) Get a glyph you want to use for the enchantment. The glyphs is NOT destroyed in the proces.&lt;br /&gt;
&lt;br /&gt;
3) You need to have one of these two books: &amp;quot;Enchanting Gems of Spirit&amp;quot; or &amp;quot;Enchanting Gems of Power&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4) You need access to a special equipment: &amp;quot;Enchanter of Power&amp;quot; (used with glyphs of Crystal, Brown, Blue Ways) or &amp;quot;Enchanter of Spirit&amp;quot; (used with glyphs of Dark, Red, Azure Ways).&lt;br /&gt;
&lt;br /&gt;
5) Certain glyphs can be put only in certain gems&lt;br /&gt;
&lt;br /&gt;
6) You put the glyph you want to use in your right hand, and the gem into the Enchanter container. Then you &amp;quot;Use&amp;quot; the Enchanter.&lt;br /&gt;
&lt;br /&gt;
7) The result is an enchanted gem, for example Meteor Glyph + Sapphire Crystal with Enchanter of Spirit creates &amp;quot;Flaming Major Sapphire Crystal&amp;quot;. So the item got a Prefix and an Adjective which provide magical properties. The gem has to be identified with a spell to read its properties.&lt;br /&gt;
&lt;br /&gt;
8) You have to craft a weapon where you will set the socket with the gem. For example you arrive up to the &amp;quot;Battle Hammer Assembly&amp;quot;, before making the final hammer. This is true for all crafted weapons, shields, armors and jewelry, as all have the &amp;quot;Assembly&amp;quot; or &amp;quot;Kit&amp;quot; stage before the final item is created.&lt;br /&gt;
&lt;br /&gt;
9) You have to craft a Gem Socket. This can be of three types, of increasing quality and complexity to make: Standard, Superior and Perfect. This will determine the gems you can use with that socket. Standard -&amp;gt; Ruby, Superior -&amp;gt; Emerald and Sapphire, Perfect -&amp;gt; Diamond&lt;br /&gt;
&lt;br /&gt;
10) You can put together the pieces, the gem socket and the kit to create the final enchanted item. This item will take the modifiers (magical properties) of the gem.&lt;br /&gt;
&lt;br /&gt;
===Weapons &amp;amp; Shields===&lt;br /&gt;
Weapons usually &#039;&#039;&#039;empower&#039;&#039;&#039; the weapon&#039;s &#039;&#039;&#039;damage type&#039;&#039;&#039; and add a special ability. The following list associate the damage type with the related magic way:&lt;br /&gt;
* &#039;&#039;Blue Way &amp;amp; Red Way&#039;&#039;: slash damage&lt;br /&gt;
* &#039;&#039;Crystal Way &amp;amp; Dark Way&#039;&#039;: pierce damage&lt;br /&gt;
* &#039;&#039;Azure Way &amp;amp; Brown Way&#039;&#039;: blunt damage&lt;br /&gt;
&lt;br /&gt;
More powerful enchantments can also bestow the weapon the following effects:&lt;br /&gt;
* &#039;&#039;Blue Way&#039;&#039;: deals extra frost damage (Red Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Crystal Way&#039;&#039;: deals extra light damage and gives a Disorientation debuff (Dark Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Azure Way&#039;&#039;: drains Mana (Brown Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Red Way&#039;&#039;: deals extra fire damage (Blue Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Dark Way&#039;&#039;: drains HP (Crystal Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Brown Way&#039;&#039;: drains Strength (Azure Way Magic Resistance protects against this extra damage)&lt;br /&gt;
&lt;br /&gt;
===Armors===&lt;br /&gt;
Enchanted Armors gives &#039;&#039;&#039;Magic Resistance&#039;&#039;&#039; against the way &#039;&#039;&#039;opposed&#039;&#039;&#039; to the enchanted glyph. More powerful glyphs can also give magic resistance against ways friendly toward the opposed way, therefore a single piece of armor can have magic resistance against up to &#039;&#039;&#039;three&#039;&#039;&#039; ways. Like weapons a magic way &#039;&#039;&#039;empower&#039;&#039;&#039; the related &#039;&#039;&#039;protection type&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Jewelry===&lt;br /&gt;
Enchanted Jewels &#039;&#039;&#039;empower skills&#039;&#039;&#039; related to the magic way used to enchant, below there is the list of way related skills:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Azure Way&#039;&#039;&#039;&lt;br /&gt;
* Empathy&lt;br /&gt;
* Set Traps&lt;br /&gt;
* Find Traps&lt;br /&gt;
* Knives &amp;amp; Daggers&lt;br /&gt;
* Light Armor&lt;br /&gt;
&#039;&#039;&#039;Blue Way&#039;&#039;&#039;&lt;br /&gt;
* Pottery&lt;br /&gt;
* Masonry&lt;br /&gt;
* Fishing&lt;br /&gt;
* Heavy Armors&lt;br /&gt;
&#039;&#039;&#039;Brown Way&#039;&#039;&#039;&lt;br /&gt;
* Harvesting&lt;br /&gt;
* Leatherworking&lt;br /&gt;
* Tailoring&lt;br /&gt;
* Light Armor&lt;br /&gt;
&#039;&#039;&#039;Crystal Way&#039;&#039;&#039;&lt;br /&gt;
* Musical Instrument&lt;br /&gt;
* Hide in Shadows&lt;br /&gt;
* Drawing&lt;br /&gt;
* Medium Armor&lt;br /&gt;
&#039;&#039;&#039;Dark Way&#039;&#039;&#039;&lt;br /&gt;
* Pickpockets&lt;br /&gt;
* Repair Armors&lt;br /&gt;
* Backstab&lt;br /&gt;
* Medium Armor&lt;br /&gt;
&#039;&#039;&#039;Red Way&#039;&#039;&#039;&lt;br /&gt;
* Tool Making&lt;br /&gt;
* Blacksmith&lt;br /&gt;
* Jewelry Making&lt;br /&gt;
* Repair Tools&lt;br /&gt;
* Heavy Armor&lt;br /&gt;
&lt;br /&gt;
=In Character References=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;background:#F5DEB3;&amp;quot; | [[image:lexicon.jpg]]&lt;br /&gt;
| style=&amp;quot;background:#F5DEB3;&amp;quot; | In game, a couple of books refer to Magic. They can be found in the famous Hydlaa [[Library|library]] owned by the Ylian [[Jayose]] or in the magic shop of Levrus:  &lt;br /&gt;
* &#039;&#039;History of Magic Vol 1: The Birth&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol 2: The Taming&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.3: The Invasions&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.4: The Heresy&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.5: The Ways&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Go to [[Players_Guide#Game_Basics|Player Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Magic]]&lt;br /&gt;
[[Category:Glyphs]]&lt;br /&gt;
[[Category:Game Guides]]&lt;br /&gt;
[[Category:Players Guide (Old)]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Network_load&amp;diff=25725</id>
		<title>Network load</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Network_load&amp;diff=25725"/>
		<updated>2025-12-20T22:23:19Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== Unreal engine 5.1.1 - PSServer 0.7.41 ===&lt;br /&gt;
5 players online after event with 15&lt;br /&gt;
&lt;br /&gt;
&amp;gt; nload&lt;br /&gt;
&lt;br /&gt;
Incoming:&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Curr: 185.34 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Avg: 184.02 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Min: 152.20 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Max: 355.02 kBit/s&lt;br /&gt;
&lt;br /&gt;
Outgoing:&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Curr: 29.88 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Avg: 34.55 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Min: 26.26 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Max: 60.16 kBit/s&lt;br /&gt;
&lt;br /&gt;
=== Unreal Engine 5.4.3 - PSServer 0.7.48 ===&lt;br /&gt;
Saturday event with 23 players online&lt;br /&gt;
&lt;br /&gt;
&amp;gt; nload&lt;br /&gt;
&lt;br /&gt;
Incoming:&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Curr: 534.70 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Avg: 587.16 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Min: 482.02 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Max: 739.51 kBit/s&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Outgoing:&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Curr: 320.27 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Avg: 395.70 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Min: 237.39 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                     Max: 653.91 kBit/s&lt;br /&gt;
&lt;br /&gt;
=== Unreal Engine 5.4.3 - PSServer 0.7.52 ===&lt;br /&gt;
Saturday event with 22 players online&lt;br /&gt;
&lt;br /&gt;
Incoming:&lt;br /&gt;
&lt;br /&gt;
                                                                                                    Curr: 919.27 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                    Avg: 706.23 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                    Min: 367.48 kBit/s&lt;br /&gt;
&lt;br /&gt;
Max: 2.03 MBit/s&lt;br /&gt;
&lt;br /&gt;
Outgoing:&lt;br /&gt;
&lt;br /&gt;
                                                                                                    Curr: 160.20 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                    Avg: 234.08 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                    Min: 87.16 kBit/s&lt;br /&gt;
&lt;br /&gt;
                                                                                                    Max: 461.51 kBit/s&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Crafting&amp;diff=25724</id>
		<title>Crafting</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Crafting&amp;diff=25724"/>
		<updated>2025-12-03T22:09:53Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Crafting, the art of creating something out of something else, is an ability that [[PlaneShift]] promotes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Crafts==&lt;br /&gt;
A lot of crafts are already available in game. Some are on the verge of being implemented.&lt;br /&gt;
&lt;br /&gt;
====Crafts currently implemented====&lt;br /&gt;
* Alchemy &amp;lt;small&amp;gt;([[Players_Guide/Skills#Alchemy|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Blacksmith &amp;lt;small&amp;gt;([[Players_Guide/Skills#Blacksmith|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
** Armor Making &amp;lt;small&amp;gt;([[Players_Guide/Skills#Armor Making|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
** Blades Making &amp;lt;small&amp;gt;(Player Guide : [[Players_Guide/Skills#Knife Making|Knife]], [[Players_Guide/Skills#Sword Making|Swords]], [[Players_Guide/Skills#Axe Making|Axe]])&amp;lt;/small&amp;gt;&lt;br /&gt;
** Mace Making &amp;lt;small&amp;gt;(Player Guide : [[Players_Guide/Skills#Mace Making|Mace]])&amp;lt;/small&amp;gt;&lt;br /&gt;
** Shield Making &amp;lt;small&amp;gt;([[Players_Guide/Skills#Shield Making|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Bow-making &amp;lt;small&amp;gt;([[Players_Guide/Skills#Bow making|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Brewing &amp;lt;small&amp;gt;([[Players_Guide/Skills#Brewing|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* [[Cooking]]&lt;br /&gt;
** [[Baking]]&lt;br /&gt;
* [[Fishing]]&lt;br /&gt;
* [[Harvesting]]&lt;br /&gt;
* [[Herbal]]&lt;br /&gt;
* Jewelry Making &amp;lt;small&amp;gt;([[Players_Guide/Skills#Jewelry Making|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* [[Leatherworking]]&lt;br /&gt;
* [[Metallurgy]]&lt;br /&gt;
* [[Mining]]&lt;br /&gt;
* Musical Instruments &amp;lt;small&amp;gt;([[Players_Guide/Skills#Musical Instrument|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* [[Repair Armors]]&lt;br /&gt;
* [[Repair Weapons]]&lt;br /&gt;
&lt;br /&gt;
====Crafts not currently implemented====&lt;br /&gt;
* Drawing&lt;br /&gt;
* Gem-cutting &amp;lt;small&amp;gt;([[Players_Guide/Skills#Gem_cutting|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Glass-blowing &amp;lt;small&amp;gt;([[Players_Guide/Skills#Glassblowing|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Masonry &amp;lt;small&amp;gt;([[Players_Guide/Skills#Masonry|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Painting &amp;lt;small&amp;gt;([[Players_Guide/Skills#Painting|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Pottery &amp;lt;small&amp;gt;([[Players_Guide/Skills#Pottery|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Repair Tools&lt;br /&gt;
* Tailoring &amp;lt;small&amp;gt;([[Players_Guide/Skills#Tailoring|Player Guide]])&amp;lt;/small&amp;gt;&lt;br /&gt;
* Tool Making&lt;br /&gt;
&lt;br /&gt;
==How do I...?==&lt;br /&gt;
Check your crafting page above.&lt;br /&gt;
&lt;br /&gt;
See also [[Players Guide/Crafting]]&lt;br /&gt;
&lt;br /&gt;
==Expanding Crafting==&lt;br /&gt;
&lt;br /&gt;
Crafting can be expanded by players and contributors if they get the right knowledge on how to do it. Here you can find a spreadsheet which the developers use to add new crafting processes to the game. If you are interested in adding a new craft, you can populate this excel file and post it here or contact the devs about it. If you want to work with multiple people on it, we suggest you to import this excel file into google docs, and then give access to your team mates.&lt;br /&gt;
&lt;br /&gt;
[http://www.planeshift.it/download/example_crafting_sheet.xls Example Crafting Excel.]&lt;br /&gt;
&lt;br /&gt;
== Extra crafting properties ==&lt;br /&gt;
When you craft an item there is a chance based on the worker skill to get an extra prefix:&lt;br /&gt;
&lt;br /&gt;
- Valuable&lt;br /&gt;
&lt;br /&gt;
- Extravagant&lt;br /&gt;
&lt;br /&gt;
- Priceless&lt;br /&gt;
&lt;br /&gt;
It ranges from 3% to 5%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Crafting|!]]&lt;br /&gt;
[[Category:Yliakum]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Players_Guide/Magic&amp;diff=25723</id>
		<title>Players Guide/Magic</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Players_Guide/Magic&amp;diff=25723"/>
		<updated>2025-11-29T18:10:31Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Enchanted items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The magical energy in [[Yliakum]] is divided into six ways of arcane: [[Players Guide/Magic#Crystal Way | Crystal Way]], [[Players Guide/Magic#Azure Way | Azure Way]], [[Players Guide/Magic#Red Way | Red Way]], [[Players Guide/Magic#Dark Way | Dark Way]], [[Players Guide/Magic#Brown Way | Brown Way]] and [[Players Guide/Magic#Blue Way | Blue Way]]. &lt;br /&gt;
[[Image:Magecasting.jpeg|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
==The Ways of Magic==&lt;br /&gt;
[[Image:Ways.png|left|150px]]&lt;br /&gt;
Each Way has a particular color and a [[Ingame Help#Stats and Skills | mental stat]] associated. The three mental stats linked to magic are: [[Players Guide#Stats and Skills|Charisma]], [[Players Guide#Stats and Skills|Intelligence]] and [[Players Guide#Stats and Skills|Willpower]]. They give bonuses to the casting of spells that pertain to that way.&lt;br /&gt;
&lt;br /&gt;
Each way is composed of a set of spells and each spell can be casted by a wizard thanks to the combination of a set of runes, called [[Players Guide/Magic#The Glyphs | &amp;quot;glyphs&amp;quot;]]. The spells of a particular Way are related to the same energy and the same concepts (Water, Air or Healing, Drain). They produce either a direct damage or a damage over time on the opponent.&lt;br /&gt;
&lt;br /&gt;
The ways are all somewhat linked by relationship of opposition or attraction. A specific way opposes another and is &amp;quot;friendly&amp;quot; with two others (ie. Crystal Way opposes Dark Way and is friendly with Blue and Azure Way). &lt;br /&gt;
Therefor, each spell giving a buff for a given time will provide at least a small way resistance (ie. Casting a Red Way &amp;quot;Strength&amp;quot; spell on yourself will also protect you slightly againt Blue Way).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Crystal Way (CW)===&lt;br /&gt;
Users of this Way, get the pure energy of the [[Azure Sun|Crystal]], more directly than all other Ways. Famous for the ability to heal, and cure the most terrible wounds, people have said that if you reach a great knowledge, you can even bring back a person from death. Nonetheless there are many powerful offensive spells, particularly effective against evil and dark creatures. While warriors and farmers with injured animals are more then happy to see these practitioners around; around most towns people feel the appearance of these practitioners is a bad omen of bad times to come. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:CrystalWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | White || Energy, Life and Light || Buff Self &amp;amp; Allies, Direct Damage, Direct Healing || Charisma || Opposed to: Dark Way&lt;br /&gt;
Friendly with: Blue &amp;amp; Azure Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Dark Way (DW)===&lt;br /&gt;
This Way is one that conquers more myth then any of the others. Its practitioners have a history of being the most innovative of any practitioners of the Ways of Magic, but with all innovation there is both good and bad. It&#039;s well known that many disasters and epidemics were caused by the adepts of this ancient Way. Holding some spells with terrifying effects, things can become even worse if you lose the control of its power. Some spells enable the control of horrific creatures, such as undead, demons and spirits, whilst some enable the caster to control objects and people in a subtle manner at distance. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:DarkWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Black || Entropy, Death and Darkness || Fear &amp;amp; Debuff, Drain, Direct Damage and Damage Over Time || Charisma || Opposed to: Crystal Way&lt;br /&gt;
Friendly with: Brown &amp;amp; Red Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Azure Way (AW)===&lt;br /&gt;
Basically a sneaky and insidious energy, the Azure Way can control the will, the perceptions and the intentions of any intelligent being. It&#039;s power comes from the deep knowledge of the mind and the way to influence it, but it relies also on the mind&#039;s potential to influence the surrounding areas and objects, particularly all that is related to the air element. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:AzureWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Light Blue || Mind, Illusion and Air element ||Charm &amp;amp; Buff NPCs, Paralyzation, Minor Direct Damage and Damage Over Time || Will || Opposed to: Brown Way&lt;br /&gt;
Friendly with: Crystal &amp;amp; Red Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Red Way (RW)===&lt;br /&gt;
The spellcaster is able to invoke the power of Chaos, and to bend to his/her/kra&#039;s will the devastating fury of fire, summoning it for its both damaging and purifying qualities. Spells of the Red Way can also instil courage and strength into companions or other creatures. Most spells in this Way are fire related, and the majority of metal workers have knowledge of it. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:RedWay.png|32px]]&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Red || Strength, Chaos &amp;amp; Fire element||Major Direct Damage, Combat Buffs|| Will || Opposed to: Blue Way&lt;br /&gt;
Friendly with: Azure &amp;amp; Dark Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Blue Way (BlW)===&lt;br /&gt;
Many diseases and poisons would be incurable without the help of the spells of this Way. The offensive and defensive potential of this art reside mainly on the control of the water element, but also of cold and ice that are strictly related to it. Equally inestimable are the divination spells that can provide very useful information on the past, present and future.&lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:BlueWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Blue || Divination, Purification and Water element ||Immobilize, Major Damage Over Time, Healing Over Time, Polymorph|| Intelligence ||Opposed to: Red Way&lt;br /&gt;
Friendly with: Brown &amp;amp; Crystal Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Brown Way (BrW)===&lt;br /&gt;
The glyphs of this Way give to the wizard the ability to cast different protective spells, to summon natural creatures and some monsters and to influence their will. This Way is really close to the element of Earth and can control all that&#039;s related to it. Users can call nature spirits for assistance or mark themselves and allies as friends of nature. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:BrownWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Brown || Nature, Protective magic and Earth element ||Defensive Buff, Summon Monster, Direct Damage, Immobilization, Minor Polymorph|| Intelligence ||Opposed to: Azure Way&lt;br /&gt;
Friendly with: Blue &amp;amp; Dark Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Casting a Spell==&lt;br /&gt;
===The Glyphs===&lt;br /&gt;
At the beginning of [[Players Guide/Yliakum History | Yliakum History]], the [[God|god]] [[Talad]], forged pure magical energy into shapes called &amp;quot;Glyphs&amp;quot;. They form the base of Yliakum magic. &lt;br /&gt;
&lt;br /&gt;
* No spell can be casted without a glyph. &lt;br /&gt;
&lt;br /&gt;
They are found in nature with no real explanation, no one knows exactly why they form but when some type of energy is strongly present in one place a glyph can form. Glyphs patterns appear on very different materials from a leaf to the fur of an animal and usually on any type of rock. &lt;br /&gt;
&lt;br /&gt;
During the centuries many glyphs have been found and studied by the wizards. They discovered that each glyph can create a spell effect and that several glyphs can be combined to obtain greater effects. To simplify casting of spells, the glyphs are associated with a concept (ie. &amp;quot;Weight&amp;quot;) and wizards combine those concepts to form new spells (ie. &amp;quot;Weight&amp;quot; and &amp;quot;Negate&amp;quot; to become very light).&lt;br /&gt;
&lt;br /&gt;
Nowadays, glyphs can be found rendering services to the people of Yliakum or can be bought to mages like [[Levrus Dahrenn]] in the [[Magic Shop | magic shop]] for the more basic of them. The more rare and powerfull glyphs can be obtained by joining a Way Circle (school of magic) and follow its path to the Mastery of a particular Way.&lt;br /&gt;
&lt;br /&gt;
* The glyphs purchased or rewarded will appear in your [[Ingame Help#Inventory Window | Inventory]] and be visible in the Glyphs Window in your [[Ingame Help#Spell Book Window | Spell Book]].&lt;br /&gt;
&lt;br /&gt;
[[File:Glyphs.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
===Purification===&lt;br /&gt;
To use a glyph, the wizard must apply a process of Purification, which take some time. The Purification establish a strong link in between the wizard and his glyph. If he dies, the glyphs will be taken to the [[Death|Death Realm]] with him. A wizard can trade a glyph, but the recipient will need to purify the glyph as well to create a new magic link and be able to use it. &lt;br /&gt;
&lt;br /&gt;
* To purify a glyph, open the Glyph window from your Spell Book. &lt;br /&gt;
* Drag the glyph and drop it on the button called: &#039;&#039;&#039;Purify&#039;&#039;&#039;. &lt;br /&gt;
* When the Purification is done, you will see a message in your Chat Window &amp;gt; System Tab and your glyph will be surrounded of a white aura.&lt;br /&gt;
&lt;br /&gt;
===Researching a Spell===&lt;br /&gt;
[[Image:SpellbookVen.jpg|300px|thumb|left]]&lt;br /&gt;
Once you have one or more glyphs, you can start to research spells.  To be discovred, a spell can ask one glyph or a combinaison of up to 3 glyphs.&lt;br /&gt;
&lt;br /&gt;
Shown on this pic is the glyph window of your Spell Book. The six main boxes will content the glyphs of the six ways of magic. The small row of boxes at the bottom of the window is where you put glyphs in order to combine or purify them.&lt;br /&gt;
* To discover a spell, drag one or several glyphs in the small row of boxes at the bottom of the window and hit the button called: &#039;&#039;&#039;Research&#039;&#039;&#039;.&lt;br /&gt;
* When you effectivly discovred a spell, its name and description will appear.&lt;br /&gt;
* Once discovred, the spell will automatically be added in your Spell Book. You wont have to research it again to cast it.&lt;br /&gt;
&lt;br /&gt;
In this example, the Blue Way glyph &amp;quot;Cold&amp;quot; has been placed in the box and the wizard has discovred the spell called &amp;quot;Freeze&amp;quot;.&lt;br /&gt;
* If you fail to discover a spell it might be for several raison :  the combinaison of glyphs isn&#039;t right; you have not trained that way of magic high enough; or the glyph isn&#039;t purified. &lt;br /&gt;
Researching a spell is dangerous for the wizard. In effect, it ask a lot of mental focus and the strong magical energy at work may wound an unwary magician.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Casting===&lt;br /&gt;
There are two great categories of spells available to the wizards: the enhancing spells that we call &amp;quot;buffs&amp;quot; and the attack spells.&lt;br /&gt;
&lt;br /&gt;
The enhancing spells like &amp;quot;Rock Armor&amp;quot; (Brown Way) are made to be cast on the wizard. They enhance one health or stamina or increase one defensive ability. Some of those spells can be cast on friends, like &amp;quot;Life Infusion&amp;quot; (CW).&lt;br /&gt;
&lt;br /&gt;
The attack spells like &amp;quot;Flame Burst&amp;quot; (RW) are made to defeat enemies. Some are efficient in close range, some in very long range. Those spells can be cast on players too in case of [[General FAQ#Will there be Player vs. Player combat in PlaneShift?|PvP]] (player versus player).&lt;br /&gt;
&lt;br /&gt;
The process to cast a spell is as follow: &lt;br /&gt;
* Select your character or an enemy [[Non-Player Character|NPC]]&lt;br /&gt;
* Open your spell book, select the spell you wish to cast and click &#039;&#039;&#039;Cast Spell&#039;&#039;&#039;. &lt;br /&gt;
There is many ways to make this operation less long. The quickest one is to create a [[Ingame Help#Shortcuts Window|shortcut]] of the spell you plan to use a lot.&lt;br /&gt;
* Once you clicked on the chosen spell, a count down window will appear.  When it is finished, the spell will be cast.&lt;br /&gt;
&lt;br /&gt;
[[Image:magepower.jpeg|left|thumb|400px]] [[Image:Magered.jpg|center|thumb|350px]]&lt;br /&gt;
&lt;br /&gt;
==Magic Mechanism==&lt;br /&gt;
&lt;br /&gt;
===Type of Damage===&lt;br /&gt;
&lt;br /&gt;
Spells and Magical effects can have different type of effects:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Direct Damage&#039;&#039;&#039; (DD): direct damage is applied as soon as the spell has been cast. Red Way offensive spells usually deal direct damage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Damage over Time&#039;&#039;&#039; (DoT): this damage is applied over a period of time. Starting from when the spells has been successfully cast and until the spell duration runs out, the target HPs are constantly reduced. Blue Way offensive spells usually deal damage over time. This type of damage usually deal more damage than an equivalent realm spell, on the other side the duration can allow the target to try to heal itself or dispel the offensive spell.&lt;br /&gt;
&lt;br /&gt;
===Damage and Saving Throws===&lt;br /&gt;
When a spell deals damage may allow the opponent to roll a &#039;&#039;saving throw&#039;&#039; to reduce the amount of damage sustained; this &#039;&#039;saving throw&#039;&#039; is made by the server confronting the caster and the target knowledge of the spell&#039;s magic way (e.g. Crystal Magic) plus a random factor: the higher is the target&#039;s knowledge of the way the higher is the chance to succeed the roll. When a target successfully roll the save the spell damage is usually halved.&lt;br /&gt;
If a spell which deals damage does not allow for a &#039;&#039;saving throw&#039;&#039; roll, that spell will usually deal about 70% less damage than an equivalent spell (same realm and same magic way).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #efe; padding: 4px 4px; width: 1000px&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Fountain.png|40px]] &#039;&#039;&#039;Tip: The higher is your knowledge in a way the higher is your chance to counter or avoid damage and effects of the same way.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Magic Resistance===&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
===Spell Power (KFactor)===&lt;br /&gt;
&#039;&#039;(under construction)&#039;&#039;&lt;br /&gt;
The spell caster can decide to channel more mana into casting by setting the additional spell power, allowing the caster to cast a more powerful spell.&lt;br /&gt;
&lt;br /&gt;
The additional spell power factor is expressed as a percentage value, from 0% to 100%. If you set an additional spell power factor of 50% then you will channel an additional 50% of the base mana requirement for a spell into the spell.&lt;br /&gt;
&lt;br /&gt;
The more you push the additional spell power, the more you must have affinity with the ways and its associated Mental Stat to control the effects. The power level of the spell is raised by the additional spell power, so the spell will be more powerful.&lt;br /&gt;
&lt;br /&gt;
The use of additional spell power has the side-effect that the spell can fizzle or even produce damages to the caster, depending on how much the spell goes out of control.&lt;br /&gt;
&lt;br /&gt;
To set your additional spell power, use the slider in your Status Window.&lt;br /&gt;
&lt;br /&gt;
===Spellcasting Time===&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
=Enchanted items=&lt;br /&gt;
Glyphs can be used in combination with special Enchanters to imbue crystals (ruby, sapphire, emerald and diamond) with magical powers. These crystals held or set on items during their particular crafting stage. Once set the enchanted gem bestow its magical power on the enchanted item.&lt;br /&gt;
Each gem can be enchanted with only one glyph at time, therefore a single item cannot be enchanted with more than a single way.&lt;br /&gt;
&lt;br /&gt;
Please note that the modifiers found in randomly looted weapons are different from the ones you may obtain by crafting with glyphs.&lt;br /&gt;
&lt;br /&gt;
The process is:&lt;br /&gt;
&lt;br /&gt;
1) Get a ruby, sapphire, emerald or diamond crystal&lt;br /&gt;
&lt;br /&gt;
2) Get a glyph you want to use for the enchantment. The glyphs is NOT destroyed in the proces.&lt;br /&gt;
&lt;br /&gt;
3) You need to have one of these two books: &amp;quot;Enchanting Gems of Spirit&amp;quot; or &amp;quot;Enchanting Gems of Power&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4) You need access to a special equipment: &amp;quot;Enchanter of Power&amp;quot; (used with glyphs of Crystal, Brown, Blue Ways) or &amp;quot;Enchanter of Spirit&amp;quot; (used with glyphs of Dark, Red, Azure Ways).&lt;br /&gt;
&lt;br /&gt;
5) Certain glyphs can be put only in certain gems&lt;br /&gt;
&lt;br /&gt;
6) You put the glyph you want to use in your right hand, and the gem into the Enchanter container. Then you &amp;quot;Use&amp;quot; the Enchanter.&lt;br /&gt;
&lt;br /&gt;
7) The result is an enchanted gem, for example Meteor Glyph + Sapphire Crystal with Enchanter of Spirit creates &amp;quot;Flaming Major Sapphire Crystal&amp;quot;. So the item got a Prefix and an Adjective which provide magical properties. The gem has to be identified with a spell to read its properties.&lt;br /&gt;
&lt;br /&gt;
8) You have to craft a weapon where you will set the socket with the gem. For example you arrive up to the &amp;quot;Battle Hammer Assembly&amp;quot;, before making the final hammer. This is true for all crafted weapons, shields, armors and jewelry, as all have the &amp;quot;Assembly&amp;quot; or &amp;quot;Kit&amp;quot; stage before the final item is created.&lt;br /&gt;
&lt;br /&gt;
9) You have to craft a Gem Socket. This can be of three types, of increasing quality and complexity to make: Standard, Superior and Perfect.&lt;br /&gt;
&lt;br /&gt;
10) You can put together the pieces, the gem socket and the kit to create the final enchanted item. This item will take the modifiers (magical properties) of the gem.&lt;br /&gt;
&lt;br /&gt;
===Weapons &amp;amp; Shields===&lt;br /&gt;
Weapons usually &#039;&#039;&#039;empower&#039;&#039;&#039; the weapon&#039;s &#039;&#039;&#039;damage type&#039;&#039;&#039; and add a special ability. The following list associate the damage type with the related magic way:&lt;br /&gt;
* &#039;&#039;Blue Way &amp;amp; Red Way&#039;&#039;: slash damage&lt;br /&gt;
* &#039;&#039;Crystal Way &amp;amp; Dark Way&#039;&#039;: pierce damage&lt;br /&gt;
* &#039;&#039;Azure Way &amp;amp; Brown Way&#039;&#039;: blunt damage&lt;br /&gt;
&lt;br /&gt;
More powerful enchantments can also bestow the weapon the following effects:&lt;br /&gt;
* &#039;&#039;Blue Way&#039;&#039;: deals extra frost damage (Red Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Crystal Way&#039;&#039;: deals extra light damage and gives a Disorientation debuff (Dark Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Azure Way&#039;&#039;: drains Mana (Brown Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Red Way&#039;&#039;: deals extra fire damage (Blue Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Dark Way&#039;&#039;: drains HP (Crystal Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Brown Way&#039;&#039;: drains Strength (Azure Way Magic Resistance protects against this extra damage)&lt;br /&gt;
&lt;br /&gt;
===Armors===&lt;br /&gt;
Enchanted Armors gives &#039;&#039;&#039;Magic Resistance&#039;&#039;&#039; against the way &#039;&#039;&#039;opposed&#039;&#039;&#039; to the enchanted glyph. More powerful glyphs can also give magic resistance against ways friendly toward the opposed way, therefore a single piece of armor can have magic resistance against up to &#039;&#039;&#039;three&#039;&#039;&#039; ways. Like weapons a magic way &#039;&#039;&#039;empower&#039;&#039;&#039; the related &#039;&#039;&#039;protection type&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Jewelry===&lt;br /&gt;
Enchanted Jewels &#039;&#039;&#039;empower skills&#039;&#039;&#039; related to the magic way used to enchant, below there is the list of way related skills:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Azure Way&#039;&#039;&#039;&lt;br /&gt;
* Empathy&lt;br /&gt;
* Set Traps&lt;br /&gt;
* Find Traps&lt;br /&gt;
* Knives &amp;amp; Daggers&lt;br /&gt;
* Light Armor&lt;br /&gt;
&#039;&#039;&#039;Blue Way&#039;&#039;&#039;&lt;br /&gt;
* Pottery&lt;br /&gt;
* Masonry&lt;br /&gt;
* Fishing&lt;br /&gt;
* Heavy Armors&lt;br /&gt;
&#039;&#039;&#039;Brown Way&#039;&#039;&#039;&lt;br /&gt;
* Harvesting&lt;br /&gt;
* Leatherworking&lt;br /&gt;
* Tailoring&lt;br /&gt;
* Light Armor&lt;br /&gt;
&#039;&#039;&#039;Crystal Way&#039;&#039;&#039;&lt;br /&gt;
* Musical Instrument&lt;br /&gt;
* Hide in Shadows&lt;br /&gt;
* Drawing&lt;br /&gt;
* Medium Armor&lt;br /&gt;
&#039;&#039;&#039;Dark Way&#039;&#039;&#039;&lt;br /&gt;
* Pickpockets&lt;br /&gt;
* Repair Armors&lt;br /&gt;
* Backstab&lt;br /&gt;
* Medium Armor&lt;br /&gt;
&#039;&#039;&#039;Red Way&#039;&#039;&#039;&lt;br /&gt;
* Tool Making&lt;br /&gt;
* Blacksmith&lt;br /&gt;
* Jewelry Making&lt;br /&gt;
* Repair Tools&lt;br /&gt;
* Heavy Armor&lt;br /&gt;
&lt;br /&gt;
=In Character References=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;background:#F5DEB3;&amp;quot; | [[image:lexicon.jpg]]&lt;br /&gt;
| style=&amp;quot;background:#F5DEB3;&amp;quot; | In game, a couple of books refer to Magic. They can be found in the famous Hydlaa [[Library|library]] owned by the Ylian [[Jayose]] or in the magic shop of Levrus:  &lt;br /&gt;
* &#039;&#039;History of Magic Vol 1: The Birth&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol 2: The Taming&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.3: The Invasions&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.4: The Heresy&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.5: The Ways&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Go to [[Players_Guide#Game_Basics|Player Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Magic]]&lt;br /&gt;
[[Category:Glyphs]]&lt;br /&gt;
[[Category:Game Guides]]&lt;br /&gt;
[[Category:Players Guide (Old)]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Players_Guide/Magic&amp;diff=25722</id>
		<title>Players Guide/Magic</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Players_Guide/Magic&amp;diff=25722"/>
		<updated>2025-11-29T17:55:07Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Enchanted items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The magical energy in [[Yliakum]] is divided into six ways of arcane: [[Players Guide/Magic#Crystal Way | Crystal Way]], [[Players Guide/Magic#Azure Way | Azure Way]], [[Players Guide/Magic#Red Way | Red Way]], [[Players Guide/Magic#Dark Way | Dark Way]], [[Players Guide/Magic#Brown Way | Brown Way]] and [[Players Guide/Magic#Blue Way | Blue Way]]. &lt;br /&gt;
[[Image:Magecasting.jpeg|thumb|300px]]&lt;br /&gt;
&lt;br /&gt;
==The Ways of Magic==&lt;br /&gt;
[[Image:Ways.png|left|150px]]&lt;br /&gt;
Each Way has a particular color and a [[Ingame Help#Stats and Skills | mental stat]] associated. The three mental stats linked to magic are: [[Players Guide#Stats and Skills|Charisma]], [[Players Guide#Stats and Skills|Intelligence]] and [[Players Guide#Stats and Skills|Willpower]]. They give bonuses to the casting of spells that pertain to that way.&lt;br /&gt;
&lt;br /&gt;
Each way is composed of a set of spells and each spell can be casted by a wizard thanks to the combination of a set of runes, called [[Players Guide/Magic#The Glyphs | &amp;quot;glyphs&amp;quot;]]. The spells of a particular Way are related to the same energy and the same concepts (Water, Air or Healing, Drain). They produce either a direct damage or a damage over time on the opponent.&lt;br /&gt;
&lt;br /&gt;
The ways are all somewhat linked by relationship of opposition or attraction. A specific way opposes another and is &amp;quot;friendly&amp;quot; with two others (ie. Crystal Way opposes Dark Way and is friendly with Blue and Azure Way). &lt;br /&gt;
Therefor, each spell giving a buff for a given time will provide at least a small way resistance (ie. Casting a Red Way &amp;quot;Strength&amp;quot; spell on yourself will also protect you slightly againt Blue Way).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Crystal Way (CW)===&lt;br /&gt;
Users of this Way, get the pure energy of the [[Azure Sun|Crystal]], more directly than all other Ways. Famous for the ability to heal, and cure the most terrible wounds, people have said that if you reach a great knowledge, you can even bring back a person from death. Nonetheless there are many powerful offensive spells, particularly effective against evil and dark creatures. While warriors and farmers with injured animals are more then happy to see these practitioners around; around most towns people feel the appearance of these practitioners is a bad omen of bad times to come. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:CrystalWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | White || Energy, Life and Light || Buff Self &amp;amp; Allies, Direct Damage, Direct Healing || Charisma || Opposed to: Dark Way&lt;br /&gt;
Friendly with: Blue &amp;amp; Azure Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Dark Way (DW)===&lt;br /&gt;
This Way is one that conquers more myth then any of the others. Its practitioners have a history of being the most innovative of any practitioners of the Ways of Magic, but with all innovation there is both good and bad. It&#039;s well known that many disasters and epidemics were caused by the adepts of this ancient Way. Holding some spells with terrifying effects, things can become even worse if you lose the control of its power. Some spells enable the control of horrific creatures, such as undead, demons and spirits, whilst some enable the caster to control objects and people in a subtle manner at distance. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:DarkWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Black || Entropy, Death and Darkness || Fear &amp;amp; Debuff, Drain, Direct Damage and Damage Over Time || Charisma || Opposed to: Crystal Way&lt;br /&gt;
Friendly with: Brown &amp;amp; Red Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Azure Way (AW)===&lt;br /&gt;
Basically a sneaky and insidious energy, the Azure Way can control the will, the perceptions and the intentions of any intelligent being. It&#039;s power comes from the deep knowledge of the mind and the way to influence it, but it relies also on the mind&#039;s potential to influence the surrounding areas and objects, particularly all that is related to the air element. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:AzureWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Light Blue || Mind, Illusion and Air element ||Charm &amp;amp; Buff NPCs, Paralyzation, Minor Direct Damage and Damage Over Time || Will || Opposed to: Brown Way&lt;br /&gt;
Friendly with: Crystal &amp;amp; Red Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Red Way (RW)===&lt;br /&gt;
The spellcaster is able to invoke the power of Chaos, and to bend to his/her/kra&#039;s will the devastating fury of fire, summoning it for its both damaging and purifying qualities. Spells of the Red Way can also instil courage and strength into companions or other creatures. Most spells in this Way are fire related, and the majority of metal workers have knowledge of it. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:RedWay.png|32px]]&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Red || Strength, Chaos &amp;amp; Fire element||Major Direct Damage, Combat Buffs|| Will || Opposed to: Blue Way&lt;br /&gt;
Friendly with: Azure &amp;amp; Dark Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Blue Way (BlW)===&lt;br /&gt;
Many diseases and poisons would be incurable without the help of the spells of this Way. The offensive and defensive potential of this art reside mainly on the control of the water element, but also of cold and ice that are strictly related to it. Equally inestimable are the divination spells that can provide very useful information on the past, present and future.&lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:BlueWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Blue || Divination, Purification and Water element ||Immobilize, Major Damage Over Time, Healing Over Time, Polymorph|| Intelligence ||Opposed to: Red Way&lt;br /&gt;
Friendly with: Brown &amp;amp; Crystal Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
===Brown Way (BrW)===&lt;br /&gt;
The glyphs of this Way give to the wizard the ability to cast different protective spells, to summon natural creatures and some monsters and to influence their will. This Way is really close to the element of Earth and can control all that&#039;s related to it. Users can call nature spirits for assistance or mark themselves and allies as friends of nature. &lt;br /&gt;
{| width=100% {{Prettytable}}&lt;br /&gt;
 !rowspan=&amp;quot;2&amp;quot; width=&amp;quot;40&amp;quot; | [[Image:BrownWay.png|32px]] &lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Glyph Colour&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Focus&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Gameplay&lt;br /&gt;
 !width=&amp;quot;60&amp;quot;|Mental Stat&lt;br /&gt;
 !width=&amp;quot;90&amp;quot;|Relationships &lt;br /&gt;
 |-&lt;br /&gt;
 | Brown || Nature, Protective magic and Earth element ||Defensive Buff, Summon Monster, Direct Damage, Immobilization, Minor Polymorph|| Intelligence ||Opposed to: Azure Way&lt;br /&gt;
Friendly with: Blue &amp;amp; Dark Way&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Casting a Spell==&lt;br /&gt;
===The Glyphs===&lt;br /&gt;
At the beginning of [[Players Guide/Yliakum History | Yliakum History]], the [[God|god]] [[Talad]], forged pure magical energy into shapes called &amp;quot;Glyphs&amp;quot;. They form the base of Yliakum magic. &lt;br /&gt;
&lt;br /&gt;
* No spell can be casted without a glyph. &lt;br /&gt;
&lt;br /&gt;
They are found in nature with no real explanation, no one knows exactly why they form but when some type of energy is strongly present in one place a glyph can form. Glyphs patterns appear on very different materials from a leaf to the fur of an animal and usually on any type of rock. &lt;br /&gt;
&lt;br /&gt;
During the centuries many glyphs have been found and studied by the wizards. They discovered that each glyph can create a spell effect and that several glyphs can be combined to obtain greater effects. To simplify casting of spells, the glyphs are associated with a concept (ie. &amp;quot;Weight&amp;quot;) and wizards combine those concepts to form new spells (ie. &amp;quot;Weight&amp;quot; and &amp;quot;Negate&amp;quot; to become very light).&lt;br /&gt;
&lt;br /&gt;
Nowadays, glyphs can be found rendering services to the people of Yliakum or can be bought to mages like [[Levrus Dahrenn]] in the [[Magic Shop | magic shop]] for the more basic of them. The more rare and powerfull glyphs can be obtained by joining a Way Circle (school of magic) and follow its path to the Mastery of a particular Way.&lt;br /&gt;
&lt;br /&gt;
* The glyphs purchased or rewarded will appear in your [[Ingame Help#Inventory Window | Inventory]] and be visible in the Glyphs Window in your [[Ingame Help#Spell Book Window | Spell Book]].&lt;br /&gt;
&lt;br /&gt;
[[File:Glyphs.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
===Purification===&lt;br /&gt;
To use a glyph, the wizard must apply a process of Purification, which take some time. The Purification establish a strong link in between the wizard and his glyph. If he dies, the glyphs will be taken to the [[Death|Death Realm]] with him. A wizard can trade a glyph, but the recipient will need to purify the glyph as well to create a new magic link and be able to use it. &lt;br /&gt;
&lt;br /&gt;
* To purify a glyph, open the Glyph window from your Spell Book. &lt;br /&gt;
* Drag the glyph and drop it on the button called: &#039;&#039;&#039;Purify&#039;&#039;&#039;. &lt;br /&gt;
* When the Purification is done, you will see a message in your Chat Window &amp;gt; System Tab and your glyph will be surrounded of a white aura.&lt;br /&gt;
&lt;br /&gt;
===Researching a Spell===&lt;br /&gt;
[[Image:SpellbookVen.jpg|300px|thumb|left]]&lt;br /&gt;
Once you have one or more glyphs, you can start to research spells.  To be discovred, a spell can ask one glyph or a combinaison of up to 3 glyphs.&lt;br /&gt;
&lt;br /&gt;
Shown on this pic is the glyph window of your Spell Book. The six main boxes will content the glyphs of the six ways of magic. The small row of boxes at the bottom of the window is where you put glyphs in order to combine or purify them.&lt;br /&gt;
* To discover a spell, drag one or several glyphs in the small row of boxes at the bottom of the window and hit the button called: &#039;&#039;&#039;Research&#039;&#039;&#039;.&lt;br /&gt;
* When you effectivly discovred a spell, its name and description will appear.&lt;br /&gt;
* Once discovred, the spell will automatically be added in your Spell Book. You wont have to research it again to cast it.&lt;br /&gt;
&lt;br /&gt;
In this example, the Blue Way glyph &amp;quot;Cold&amp;quot; has been placed in the box and the wizard has discovred the spell called &amp;quot;Freeze&amp;quot;.&lt;br /&gt;
* If you fail to discover a spell it might be for several raison :  the combinaison of glyphs isn&#039;t right; you have not trained that way of magic high enough; or the glyph isn&#039;t purified. &lt;br /&gt;
Researching a spell is dangerous for the wizard. In effect, it ask a lot of mental focus and the strong magical energy at work may wound an unwary magician.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Casting===&lt;br /&gt;
There are two great categories of spells available to the wizards: the enhancing spells that we call &amp;quot;buffs&amp;quot; and the attack spells.&lt;br /&gt;
&lt;br /&gt;
The enhancing spells like &amp;quot;Rock Armor&amp;quot; (Brown Way) are made to be cast on the wizard. They enhance one health or stamina or increase one defensive ability. Some of those spells can be cast on friends, like &amp;quot;Life Infusion&amp;quot; (CW).&lt;br /&gt;
&lt;br /&gt;
The attack spells like &amp;quot;Flame Burst&amp;quot; (RW) are made to defeat enemies. Some are efficient in close range, some in very long range. Those spells can be cast on players too in case of [[General FAQ#Will there be Player vs. Player combat in PlaneShift?|PvP]] (player versus player).&lt;br /&gt;
&lt;br /&gt;
The process to cast a spell is as follow: &lt;br /&gt;
* Select your character or an enemy [[Non-Player Character|NPC]]&lt;br /&gt;
* Open your spell book, select the spell you wish to cast and click &#039;&#039;&#039;Cast Spell&#039;&#039;&#039;. &lt;br /&gt;
There is many ways to make this operation less long. The quickest one is to create a [[Ingame Help#Shortcuts Window|shortcut]] of the spell you plan to use a lot.&lt;br /&gt;
* Once you clicked on the chosen spell, a count down window will appear.  When it is finished, the spell will be cast.&lt;br /&gt;
&lt;br /&gt;
[[Image:magepower.jpeg|left|thumb|400px]] [[Image:Magered.jpg|center|thumb|350px]]&lt;br /&gt;
&lt;br /&gt;
==Magic Mechanism==&lt;br /&gt;
&lt;br /&gt;
===Type of Damage===&lt;br /&gt;
&lt;br /&gt;
Spells and Magical effects can have different type of effects:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Direct Damage&#039;&#039;&#039; (DD): direct damage is applied as soon as the spell has been cast. Red Way offensive spells usually deal direct damage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Damage over Time&#039;&#039;&#039; (DoT): this damage is applied over a period of time. Starting from when the spells has been successfully cast and until the spell duration runs out, the target HPs are constantly reduced. Blue Way offensive spells usually deal damage over time. This type of damage usually deal more damage than an equivalent realm spell, on the other side the duration can allow the target to try to heal itself or dispel the offensive spell.&lt;br /&gt;
&lt;br /&gt;
===Damage and Saving Throws===&lt;br /&gt;
When a spell deals damage may allow the opponent to roll a &#039;&#039;saving throw&#039;&#039; to reduce the amount of damage sustained; this &#039;&#039;saving throw&#039;&#039; is made by the server confronting the caster and the target knowledge of the spell&#039;s magic way (e.g. Crystal Magic) plus a random factor: the higher is the target&#039;s knowledge of the way the higher is the chance to succeed the roll. When a target successfully roll the save the spell damage is usually halved.&lt;br /&gt;
If a spell which deals damage does not allow for a &#039;&#039;saving throw&#039;&#039; roll, that spell will usually deal about 70% less damage than an equivalent spell (same realm and same magic way).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background: #efe; padding: 4px 4px; width: 1000px&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Fountain.png|40px]] &#039;&#039;&#039;Tip: The higher is your knowledge in a way the higher is your chance to counter or avoid damage and effects of the same way.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Magic Resistance===&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
===Spell Power (KFactor)===&lt;br /&gt;
&#039;&#039;(under construction)&#039;&#039;&lt;br /&gt;
The spell caster can decide to channel more mana into casting by setting the additional spell power, allowing the caster to cast a more powerful spell.&lt;br /&gt;
&lt;br /&gt;
The additional spell power factor is expressed as a percentage value, from 0% to 100%. If you set an additional spell power factor of 50% then you will channel an additional 50% of the base mana requirement for a spell into the spell.&lt;br /&gt;
&lt;br /&gt;
The more you push the additional spell power, the more you must have affinity with the ways and its associated Mental Stat to control the effects. The power level of the spell is raised by the additional spell power, so the spell will be more powerful.&lt;br /&gt;
&lt;br /&gt;
The use of additional spell power has the side-effect that the spell can fizzle or even produce damages to the caster, depending on how much the spell goes out of control.&lt;br /&gt;
&lt;br /&gt;
To set your additional spell power, use the slider in your Status Window.&lt;br /&gt;
&lt;br /&gt;
===Spellcasting Time===&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
=Enchanted items=&lt;br /&gt;
Glyphs can be used in combination with special Enchanters to imbue crystals (ruby, sapphire, emerald and diamond) with magical powers. These crystals held or set on items during their particular crafting stage. Once set the enchanted gem bestow its magical power on the enchanted item.&lt;br /&gt;
Each gem can be enchanted with only one glyph at time, therefore a single item cannot be enchanted with more than a single way.&lt;br /&gt;
&lt;br /&gt;
The process is:&lt;br /&gt;
&lt;br /&gt;
1) Get a ruby, sapphire, emerald or diamond crystal&lt;br /&gt;
&lt;br /&gt;
2) Get a glyph you want to use for the enchantment. The glyphs is NOT destroyed in the proces.&lt;br /&gt;
&lt;br /&gt;
3) You need to have one of these two books: &amp;quot;Enchanting Gems of Spirit&amp;quot; or &amp;quot;Enchanting Gems of Power&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4) You need access to a special equipment: &amp;quot;Enchanter of Power&amp;quot; (used with glyphs of Crystal, Brown, Blue Ways) or &amp;quot;Enchanter of Spirit&amp;quot; (used with glyphs of Dark, Red, Azure Ways).&lt;br /&gt;
&lt;br /&gt;
5) Certain glyphs can be put only in certain gems&lt;br /&gt;
&lt;br /&gt;
6) You put the glyph you want to use in your right hand, and the gem into the Enchanter container. Then you &amp;quot;Use&amp;quot; the Enchanter.&lt;br /&gt;
&lt;br /&gt;
7) The result is an enchanted gem, for example Meteor Glyph + Sapphire Crystal with Enchanter of Spirit creates &amp;quot;Flaming Major Sapphire Crystal&amp;quot;. So the item got a Prefix and an Adjective which provide magical properties. The gem has to be identified with a spell to read its properties.&lt;br /&gt;
&lt;br /&gt;
8) You have to craft a weapon where you will set the socket with the gem. For example you arrive up to the &amp;quot;Battle Hammer Assembly&amp;quot;, before making the final hammer. This is true for all crafted weapons, shields, armors and jewelry, as all have the &amp;quot;Assembly&amp;quot; or &amp;quot;Kit&amp;quot; stage before the final item is created.&lt;br /&gt;
&lt;br /&gt;
9) You have to craft a Gem Socket. This can be of three types, of increasing quality and complexity to make: Standard, Superior and Perfect.&lt;br /&gt;
&lt;br /&gt;
10) You can put together the pieces, the gem socket and the kit to create the final enchanted item. This item will take the modifiers (magical properties) of the gem.&lt;br /&gt;
&lt;br /&gt;
===Weapons &amp;amp; Shields===&lt;br /&gt;
Weapons usually &#039;&#039;&#039;empower&#039;&#039;&#039; the weapon&#039;s &#039;&#039;&#039;damage type&#039;&#039;&#039; and add a special ability. The following list associate the damage type with the related magic way:&lt;br /&gt;
* &#039;&#039;Blue Way &amp;amp; Red Way&#039;&#039;: slash damage&lt;br /&gt;
* &#039;&#039;Crystal Way &amp;amp; Dark Way&#039;&#039;: pierce damage&lt;br /&gt;
* &#039;&#039;Azure Way &amp;amp; Brown Way&#039;&#039;: blunt damage&lt;br /&gt;
&lt;br /&gt;
More powerful enchantments can also bestow the weapon the following effects:&lt;br /&gt;
* &#039;&#039;Blue Way&#039;&#039;: deals extra frost damage (Red Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Crystal Way&#039;&#039;: deals extra light damage and gives a Disorientation debuff (Dark Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Azure Way&#039;&#039;: drains Mana (Brown Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Red Way&#039;&#039;: deals extra fire damage (Blue Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Dark Way&#039;&#039;: drains HP (Crystal Way Magic Resistance protects against this extra damage)&lt;br /&gt;
* &#039;&#039;Brown Way&#039;&#039;: drains Strength (Azure Way Magic Resistance protects against this extra damage)&lt;br /&gt;
&lt;br /&gt;
===Armors===&lt;br /&gt;
Enchanted Armors gives &#039;&#039;&#039;Magic Resistance&#039;&#039;&#039; against the way &#039;&#039;&#039;opposed&#039;&#039;&#039; to the enchanted glyph. More powerful glyphs can also give magic resistance against ways friendly toward the opposed way, therefore a single piece of armor can have magic resistance against up to &#039;&#039;&#039;three&#039;&#039;&#039; ways. Like weapons a magic way &#039;&#039;&#039;empower&#039;&#039;&#039; the related &#039;&#039;&#039;protection type&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Jewelry===&lt;br /&gt;
Enchanted Jewels &#039;&#039;&#039;empower skills&#039;&#039;&#039; related to the magic way used to enchant, below there is the list of way related skills:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Azure Way&#039;&#039;&#039;&lt;br /&gt;
* Empathy&lt;br /&gt;
* Set Traps&lt;br /&gt;
* Find Traps&lt;br /&gt;
* Knives &amp;amp; Daggers&lt;br /&gt;
* Light Armor&lt;br /&gt;
&#039;&#039;&#039;Blue Way&#039;&#039;&#039;&lt;br /&gt;
* Pottery&lt;br /&gt;
* Masonry&lt;br /&gt;
* Fishing&lt;br /&gt;
* Heavy Armors&lt;br /&gt;
&#039;&#039;&#039;Brown Way&#039;&#039;&#039;&lt;br /&gt;
* Harvesting&lt;br /&gt;
* Leatherworking&lt;br /&gt;
* Tailoring&lt;br /&gt;
* Light Armor&lt;br /&gt;
&#039;&#039;&#039;Crystal Way&#039;&#039;&#039;&lt;br /&gt;
* Musical Instrument&lt;br /&gt;
* Hide in Shadows&lt;br /&gt;
* Drawing&lt;br /&gt;
* Medium Armor&lt;br /&gt;
&#039;&#039;&#039;Dark Way&#039;&#039;&#039;&lt;br /&gt;
* Pickpockets&lt;br /&gt;
* Repair Armors&lt;br /&gt;
* Backstab&lt;br /&gt;
* Medium Armor&lt;br /&gt;
&#039;&#039;&#039;Red Way&#039;&#039;&#039;&lt;br /&gt;
* Tool Making&lt;br /&gt;
* Blacksmith&lt;br /&gt;
* Jewelry Making&lt;br /&gt;
* Repair Tools&lt;br /&gt;
* Heavy Armor&lt;br /&gt;
&lt;br /&gt;
=In Character References=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| style=&amp;quot;background:#F5DEB3;&amp;quot; | [[image:lexicon.jpg]]&lt;br /&gt;
| style=&amp;quot;background:#F5DEB3;&amp;quot; | In game, a couple of books refer to Magic. They can be found in the famous Hydlaa [[Library|library]] owned by the Ylian [[Jayose]] or in the magic shop of Levrus:  &lt;br /&gt;
* &#039;&#039;History of Magic Vol 1: The Birth&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol 2: The Taming&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.3: The Invasions&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.4: The Heresy&#039;&#039;&lt;br /&gt;
* &#039;&#039;History of Magic Vol.5: The Ways&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Go to [[Players_Guide#Game_Basics|Player Guide]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Magic]]&lt;br /&gt;
[[Category:Glyphs]]&lt;br /&gt;
[[Category:Game Guides]]&lt;br /&gt;
[[Category:Players Guide (Old)]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Maps_editing_workflow&amp;diff=25721</id>
		<title>Maps editing workflow</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Maps_editing_workflow&amp;diff=25721"/>
		<updated>2025-11-24T21:47:58Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How Landscape is setup ==&lt;br /&gt;
In the outliner we have a Landscape Object. If you click on it, you see the details it&#039;s linked to a MI_Landscape.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MI_Landscape contains all the parameters including the visibility of rocks , grass, etc... &lt;br /&gt;
&lt;br /&gt;
The actual meshes are part of &amp;quot;Landscape Grass Type&amp;quot; a special object that can contain a mesh, its density, culling distance, etc...&lt;br /&gt;
&lt;br /&gt;
M_Landscape has a special node called : &amp;quot;Landscape Grass&amp;quot; of type &amp;quot;Landscape Grass Output&amp;quot;. It the detail panel of this node, there are all the &amp;quot;Landscape Grass Type&amp;quot; linked with a name (which is the name of the layer).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Landscape limits ===&lt;br /&gt;
Vertically our landscape can go from -250 meters up to +250 meters, if you try to go beyond these values you just get flat terrain at the max height and you cant go beyond.&lt;br /&gt;
&lt;br /&gt;
Our maps at the moment have the lowest point to the south of Homestead where it reach -177 meters. Plus we need to consider the Death Ream boundaries, that reach at the moment -199 meters.&lt;br /&gt;
&lt;br /&gt;
We have set the Kill Z value to -185 meters.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
* BuiltData files are storing:&lt;br /&gt;
** lightmap textures (created by Build Lighting only)&lt;br /&gt;
** volumetric light probes / samples (created by Build Lighting only)&lt;br /&gt;
* umap files are storing:&lt;br /&gt;
** navigation paths (created by Build Paths)&lt;br /&gt;
&lt;br /&gt;
=== Map creation flow ===&lt;br /&gt;
You should never upload BuiltData file in SVN. Those will be regenerated when we create the shipping release.&lt;br /&gt;
&lt;br /&gt;
If you want to test locally the full game including lights then you need to:&lt;br /&gt;
&lt;br /&gt;
* Load all the levels and Build Lighting only, this gives the best result on map borders, but I think you can avoid it&lt;br /&gt;
&lt;br /&gt;
OR&lt;br /&gt;
&lt;br /&gt;
* Load Persistent Level + one or more maps you want relit, and Build Lighting only. In this case the single maps will be ok, but the borders between maps will not &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to test locally the full game including NPC movement then you need to:&lt;br /&gt;
&lt;br /&gt;
* Follow Option 1 in [[PSUnreal Navigation Meshes|this page]].&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Skybox_and_Lights_setup&amp;diff=25720</id>
		<title>Skybox and Lights setup</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Skybox_and_Lights_setup&amp;diff=25720"/>
		<updated>2025-11-20T22:17:22Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Elements contributing to day / night cycle ==&lt;br /&gt;
&lt;br /&gt;
* DirectionalLight, actor in the Persistent Level (Yliakum). Casting light globally in a certain direction. &lt;br /&gt;
** Intensity&lt;br /&gt;
** Light Color&lt;br /&gt;
* SkyLight, actor in the Persistent Level. Stores the color of the skybox and influence all items in the game with indirect light based on the skybox color. &lt;br /&gt;
** Intensity&lt;br /&gt;
* bp_sky, actor in the Persistent Level, which contains all the logic for rain/snow/fog/... , clouds, time of the day, the actual skybox which is a static mesh (dome).&lt;br /&gt;
** Light, scalar parameter on the Material applied to the skybox mesh&lt;br /&gt;
* ExponentialHeightFog, actor in the Persistent Level, managing the fog. Careful to change its color at night, or the skydome will stay lit.&lt;br /&gt;
** Light color&lt;br /&gt;
*&amp;quot;PostProcessVolumeWholeGame&amp;quot;, this is applied to the whole game, any level. It has Min Brightness=0.5 and Max Brightness=4. If you want your level in game to look like in the editor you need to be sure in game you have the same min/max settings&lt;br /&gt;
*Exposure, made of Min Brightness=0.5 and Max Brightness=4. Min Brightness changes based on the time of the day. Max Brightness is fixed = 4.&lt;br /&gt;
&lt;br /&gt;
== 5.1.1 Build All Bug ==&lt;br /&gt;
In Unreal engine 5.x if you click on &amp;quot;Build All Levels&amp;quot; it will actually break the relight. The same if you click on &amp;quot;Build Geometry&amp;quot; as all the BP containing lights will disappear from the editor until you relaunch it. This causes the lights in BP not to be recalculated.&lt;br /&gt;
&lt;br /&gt;
The solution is to click on &amp;quot;Built Lighting Only&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Static vs Dynamic lights ==&lt;br /&gt;
&lt;br /&gt;
I tried with many different settings and Lightmass is crashing on our hydlaa level very often. Trying to create a minimal set of objects exposing the crash seems not possible, as when you delete some objects may stop crashing, but then deleting more seems to stop crashing, so looks like the combination of meshes, not one particular mesh.&lt;br /&gt;
&lt;br /&gt;
The crash happen with SkyLight and DirectionalLight set as Stationary and also with SkyLight as Stationary and DirectionalLight set as Moveable.&lt;br /&gt;
&lt;br /&gt;
The crash does NOT happen with &#039;&#039;&#039;SkyLight as Moveable&#039;&#039;&#039; and DirectionalLight set as Stationary. So we tried this setting, the problem is the size of the generated BuiltData files.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Map !! Skylight Moveable, Directional Static !! Both Moveable&lt;br /&gt;
|-&lt;br /&gt;
| Hydlaa plaza || 530Mb || 139Mb&lt;br /&gt;
|-&lt;br /&gt;
| Gugrontid || 372Mb|| 13Mb&lt;br /&gt;
|-&lt;br /&gt;
| Ojaveda|| 92.5Mb || 53Mb&lt;br /&gt;
|-&lt;br /&gt;
| Amdeneir|| 744Mb|| 38Mb&lt;br /&gt;
|}&lt;br /&gt;
Given the sizes above, at the end we decided to keep both &#039;&#039;&#039;SkyLight and DirectionalLight set as Moveable&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== up to 0.7.7 release values ==&lt;br /&gt;
&lt;br /&gt;
At noon:&lt;br /&gt;
* Fog Inscattering Color: (R=0.313989,G=0.467784,B=0.887923,A=1.000000)&lt;br /&gt;
* Skybox Light: 2.0&lt;br /&gt;
* Skylight Intensity: 1.5&lt;br /&gt;
* Skylight Color: (R=0.853051,G=0.958179,B=1.000000,A=1.000000)&lt;br /&gt;
* DirectionalLight Intensity: 4.965001&lt;br /&gt;
&lt;br /&gt;
At night:&lt;br /&gt;
* Fog Inscattering Color: (R=0.023549,G=0.035084,B=0.066594,A=0.075000)&lt;br /&gt;
* Skybox Light: 0.15&lt;br /&gt;
* Skylight Intensity: 0.1125&lt;br /&gt;
* Skylight Color: (R=0.988979,G=0.996863,B=1.000000,A=1.000000)&lt;br /&gt;
* DirectionalLight Intensity: 0.3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== values from 0.7.8 release ==&lt;br /&gt;
&lt;br /&gt;
At noon:&lt;br /&gt;
* Skybox Light: 1.0&lt;br /&gt;
* Skylight Intensity: 1&lt;br /&gt;
* DirectionalLight Intensity: 2&lt;br /&gt;
&lt;br /&gt;
At night:&lt;br /&gt;
* Fog Inscattering Color: 0&lt;br /&gt;
* Skybox Light: 0.04&lt;br /&gt;
* Skylight Intensity: 0.07&lt;br /&gt;
* DirectionalLight Intensity: 0.07&lt;br /&gt;
&lt;br /&gt;
== Rebuild lights - size and timings ==&lt;br /&gt;
Foliage set as static lighting&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Level&lt;br /&gt;
!Skylight Moveable&lt;br /&gt;
!BuiltData size&lt;br /&gt;
!Skylight Stationary&lt;br /&gt;
!BuiltData size&lt;br /&gt;
!Date&lt;br /&gt;
|-&lt;br /&gt;
|Hydlaa_X08_Y04&lt;br /&gt;
|10 minutes&lt;br /&gt;
|132Mb&lt;br /&gt;
|39 minutes&lt;br /&gt;
|1493 Mb&lt;br /&gt;
|19 April 2022&lt;br /&gt;
|-&lt;br /&gt;
|Ojaveda_X11_Y04&lt;br /&gt;
|4 minutes&lt;br /&gt;
|43Mb&lt;br /&gt;
|6 minutes&lt;br /&gt;
|84Mb&lt;br /&gt;
|19 April 2022&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
After changing foliage to moveable&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Level&lt;br /&gt;
!Skylight Moveable&lt;br /&gt;
!BuiltData size&lt;br /&gt;
!Skylight Stationary&lt;br /&gt;
!BuiltData size&lt;br /&gt;
!Date&lt;br /&gt;
|-&lt;br /&gt;
|Hydlaa_X08_Y04&lt;br /&gt;
|?&lt;br /&gt;
|?&lt;br /&gt;
|7 minutes&lt;br /&gt;
|201 Mb&lt;br /&gt;
|24 April 2022&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Changes 0.7.19 release ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Lights update based on Rycer feedback.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[X] Change on the Persistent Level: World Settings -&amp;gt; Volume Lighting Method -&amp;gt; Volumetric Lighmap&lt;br /&gt;
&lt;br /&gt;
[X] Keep the Directional Light as Moveable. Change the skylight to stationary (was moveable). Persistent Level -&amp;gt; skylight&lt;br /&gt;
&lt;br /&gt;
[X] Disable Distance field, since they would be no longer needed with static lighting. Project Settings -&amp;gt; Engine -&amp;gt; Rendering -&amp;gt; Generate Mesh Distance Fields &lt;br /&gt;
&lt;br /&gt;
[X] Keep the landscape lightmap resolution to 1&lt;br /&gt;
&lt;br /&gt;
[X] Trees, go to Foliage mode, and then click on all meshes part of foliage and set Mobility as &amp;quot;moveable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[X] Persistent Level (Yliakum Map file) -&amp;gt; WorldSettings -&amp;gt; Lightmass -&amp;gt; Volumetric Lightmap Details -&amp;gt; 400 (was 200)&lt;br /&gt;
&lt;br /&gt;
[X] Added an Unbound Post Process Volume (PostProcessVolumeWholeGame) with Lens-&amp;gt;Exposure-&amp;gt;min/max Brightness, min=0.5, max=4 . Set with Infinite extent = true&lt;br /&gt;
&lt;br /&gt;
[X] World Settings -&amp;gt; Lightmass -&amp;gt; Num Sky Lighting Bounces to 5 (it was 1)&lt;br /&gt;
&lt;br /&gt;
[X] No Change. Change the static lighting lod to 1 or 2 on landscape only if lightmass crashes&lt;br /&gt;
&lt;br /&gt;
[X] No change. Grass is already dynamic because its placed by the engine&lt;br /&gt;
&lt;br /&gt;
[X] No change. Seems our lightmap resolution is between 32 and 64, overriden by the engine or some of us.&lt;br /&gt;
&lt;br /&gt;
[NO, it was causing too large lightmaps on hydlaa_level] Trees, go to Foliage mode, and then click on all meshes part of foliage and set Mobility as &amp;quot;static&amp;quot; and change Lighting mode to &amp;quot;Force Volumetric&amp;quot;, Keep it as lightmap resolution of 8.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional Notes:&lt;br /&gt;
&lt;br /&gt;
5) Because of a low lightmap resolution, make the point lights (torches and similar) a combination of a static and dynamic light.  One low brightness, high radius static point light (for bounced lighting) and a second light - bright, dynamic with a short radius&lt;br /&gt;
&lt;br /&gt;
6) Careful use of reflection capture. Ideally one per building, some will require more. It would be useful to change their resolution to 64 or even 32 to save memory.&lt;br /&gt;
&lt;br /&gt;
7) Split some underground areas to new streamed sublevels for less streaming hitches, performance optimization and faster loading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changes 0.7.20 release ==&lt;br /&gt;
[X] Change on the Persistent Level: World Settings -&amp;gt; Volume Lighting Method -&amp;gt; Sparse Volume Lighting Samples&lt;br /&gt;
&lt;br /&gt;
== Changes 0.7.40 release ==&lt;br /&gt;
Since long time I was getting this error during relight: &amp;quot;InstancedFoliageActor_0 Large actor receives a pre-shadow and will cause an extreme performance hit unless bCastDynamicShadow is set to false.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I changed Crystal_Light29 from Stationary to Static, and the error went away. We should not have stationary lights impacting landscape.&lt;br /&gt;
&lt;br /&gt;
== 0.7.52 test for full dynamic lights ==&lt;br /&gt;
1) I deleted all the *Builtdata* files (or I was gettting an error on save)&lt;br /&gt;
&lt;br /&gt;
2) Turn on &amp;quot;World Settings&amp;quot;-&amp;gt;&amp;quot;Force No Precomputed Lighting&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3) Build -&amp;gt; &amp;quot;Build LIghting only&amp;quot; (this will basically remove all the lightmaps in case you have any)&lt;br /&gt;
&lt;br /&gt;
4) Resave all.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
</feed>