<?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-04-05T19:07:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<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>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Optimization_with_Lightmaps,_LOD,_and_Collisions&amp;diff=25719</id>
		<title>Optimization with Lightmaps, LOD, and Collisions</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Optimization_with_Lightmaps,_LOD,_and_Collisions&amp;diff=25719"/>
		<updated>2025-11-14T09:43:37Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Lightmap Density ==&lt;br /&gt;
To check lightmap density, click the Lit menu, then &amp;quot;Optimization Viewmode&amp;quot; then &amp;quot;Lightmap density&amp;quot; , or alt+0. &lt;br /&gt;
&lt;br /&gt;
This view mode uses a color scale and grid texture to simplify balancing lightmap resolutions, and also identify mapping errors. In this layout, blue is too low res, green is optimal, and red is too high res. Occasionally errors will create purple when there is overlap or sever distortion.&lt;br /&gt;
&lt;br /&gt;
In the case of correct mapping but incorrect scale, lightmap resolution should be changed from the default 64 to a size that shifts the color to green, done under &amp;quot;General Settings&amp;quot; -&amp;gt; &amp;quot;Light Map Resolution&amp;quot; in the the mesh details panel.&lt;br /&gt;
&lt;br /&gt;
Please note you can change this setting at runtime and you see the color changing in the viewport, without the need to rebuild lights.&lt;br /&gt;
&lt;br /&gt;
== Lightmap generation ==&lt;br /&gt;
If you use &amp;quot;Generate Lightmap UVs&amp;quot; setting, then Unreal will read the &amp;quot;Source Lightmap Index&amp;quot; (usually 0) where your base color UV are stored, and will generate a new lightmap UV to be stored in &amp;quot;Destination Lightmap index&amp;quot; (usually 1). &lt;br /&gt;
&lt;br /&gt;
You still have to be sure that your &amp;quot;Light Map Coordinate Index&amp;quot; is pointing to the proper destination Index (example 1). This is the one used to generate the lightmap texture.&lt;br /&gt;
&lt;br /&gt;
If you want to import custom UV lightmap, then you need to uncheck &amp;quot;Generate Lightmap UVs&amp;quot; setting and add a new UV layer in Blender to represent your lightmap UV. You can generate it in Blender using Data-&amp;gt;UV Maps -&amp;gt; Add a new one, then use &amp;quot;Unwrap&amp;quot; -&amp;gt; &amp;quot;Smart UV Project&amp;quot;. This will not create any overlapping UVs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Official documentation is here:&lt;br /&gt;
&lt;br /&gt;
https://dev.epicgames.com/documentation/en-us/unreal-engine/understanding-lightmapping-in-unreal-engine&lt;br /&gt;
&lt;br /&gt;
== Others notes ==&lt;br /&gt;
For the purple errors, the mesh needs a lightmap unwrapped in blender, typically because it already has multiple internal UV maps and can&#039;t properly autogenerate to a new channel. To fix this, first make sure the correct channel is assigned, by looking at the mesh uv channels and determining if there is a proper lightmap channel already. These typically show every face mapped individually and quite small in a large array.&lt;br /&gt;
&lt;br /&gt;
If there is no proper lightmap, open the mesh in blender and use unwrap lightmap uvs, making sure to unwrap to a new channel and not over the main texture channel. Once done, reimport without autogeneration of lightmaps on, and select the new channel for lightmap baking.&lt;br /&gt;
&lt;br /&gt;
For LOD, or level of detail, unreal engine has a good auto LOD generator that can be used bot for distance meshes and higher quality collision meshes where appropriate. First, set the asset to the correct LOD group, which will auto generate the LODs. Then, check the new LODs and test them at their set distances to make sure the swap is clean between them, and that the generation process didn&#039;t distort the profile too much. If it did, play with the reduction settings by changing the percent decrease slider until you have the right balance. &lt;br /&gt;
&lt;br /&gt;
Additionally, these new lower LOD models can be applied as a complex collision mesh, which for certain assets like buildings gives a better performance than using LOD0 as a complex collision mesh, but offers higher fidelity for things like columns that auto convex collision doesn&#039;t work well for.&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=25718</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=25718"/>
		<updated>2025-11-04T21:22:54Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* 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;
=== 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;
&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;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;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&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;
= 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=Random_Generated_events&amp;diff=24978</id>
		<title>Random Generated events</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Random_Generated_events&amp;diff=24978"/>
		<updated>2025-08-20T14:20:34Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* All Tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A new capability has been added to PSUnreal about generating random events in the game.&lt;br /&gt;
&lt;br /&gt;
==== Event location ====&lt;br /&gt;
An event is defined to happen in an &amp;quot;area type&amp;quot;, it can be for example &amp;quot;forest&amp;quot; or &amp;quot;tavern&amp;quot; or specific location. There is relationiship beween [[Random eventsTable|random_events]].area and [[Random event locsTable|random_event_locs]].event_areatype.&lt;br /&gt;
&lt;br /&gt;
If you want the event to happen in a specific path network waypoint, you can specify a [[Random eventsTable|random_events]].area with this syntax: wp:&amp;lt;waypoint1|waypoint2|...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Event Probability ====&lt;br /&gt;
In addition there is also [[Random event locsTable|random_event_locs]].event_probability which is a % of chance of that event happening.&lt;br /&gt;
&lt;br /&gt;
Database structure:&lt;br /&gt;
* [[Random eventsTable|random_events]] table&lt;br /&gt;
&lt;br /&gt;
Scripting:&lt;br /&gt;
* Prerequisites (random_events.prerequisite)&lt;br /&gt;
** The same syntax of quest prerequisites can be used with the following additions:&lt;br /&gt;
*** &amp;lt;skillsinrange name=&amp;quot;Sword&amp;quot; min=&amp;quot;10&amp;quot; max=&amp;quot;20&amp;quot; range=&amp;quot;10&amp;quot;&amp;gt; (works as skill but checks all the players in range and sum up their skills). If the name is empty it sums up the total skills of all players in range.&lt;br /&gt;
* Script for the event (random_events.script)&lt;br /&gt;
&lt;br /&gt;
==== Race and traits ====&lt;br /&gt;
Race and traits are numerical as defined in the database. Maybe in the future we make it text. Check [[Races and Traits IDs|here]] for the list.&lt;br /&gt;
&lt;br /&gt;
==== Options: ====&lt;br /&gt;
&lt;br /&gt;
* You can specify a name and lastname in the &amp;lt;spawnnpc&amp;gt; tag, if omitted the NPC will have a random name and lastname.&lt;br /&gt;
* You can have a description, useful if you are specifying the name and the race of the NPC. If not specified it will empty.&lt;br /&gt;
* You can specify certain traits, if missing, the server will randomize by choosing the ones available for the given race.&lt;br /&gt;
&#039;&#039;&#039;Inventory:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The valid locations for inventory items are: &amp;quot;righthand,lefthand,helm,rightfinger,leftfinger,neck,back,arms,gloves,boots,legs,belt,bracers,torso,mind&amp;quot; . For bothhands we need TO CHECK it.&lt;br /&gt;
&lt;br /&gt;
==== Example: ====&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 	&amp;lt;spawnnpc id=&amp;quot;1&amp;quot; name=&amp;quot;Erisal&amp;quot; lastname=&amp;quot;Baloe&amp;quot; race=&amp;quot;0|1|2|3|5|6|7|9|10|11&amp;quot; invulnerable=&amp;quot;yes&amp;quot; hp=&amp;quot;400&amp;quot; mana=&amp;quot;400&amp;quot; loot_category=&amp;quot;22&amp;quot; locx=&amp;quot;1&amp;quot; locy=&amp;quot;1&amp;quot; locz=&amp;quot;0&amp;quot; description=&amp;quot;A young dermorian girl, with a nice smile.&amp;quot; traits=&amp;quot;42|363|380&amp;quot;&amp;gt;&lt;br /&gt;
 	  &amp;lt;inventory&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Small Battle Axe&amp;quot; location=&amp;quot;righthand&amp;quot;/&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Falchion&amp;quot; location=&amp;quot;bulk1&amp;quot; quantity=&amp;quot;65&amp;quot;/&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Chainmail Legs Armor&amp;quot; location=&amp;quot;legs&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/inventory&amp;gt;&lt;br /&gt;
 	  &amp;lt;skills&amp;gt;&lt;br /&gt;
 		 &amp;lt;skill name=&amp;quot;Sword&amp;quot; value=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/skills&amp;gt;&lt;br /&gt;
 	  &amp;lt;stats str=&amp;quot;80&amp;quot; agi=&amp;quot;70&amp;quot; end=&amp;quot;60&amp;quot; int=&amp;quot;75&amp;quot; wil=&amp;quot;55&amp;quot; cha=&amp;quot;90&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;kas&amp;gt;&lt;br /&gt;
 		 &amp;lt;ka name=&amp;quot;Merchant&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/kas&amp;gt;&lt;br /&gt;
 	  &amp;lt;specifickas&amp;gt;&lt;br /&gt;
 		 &amp;lt;trigger trigger=&amp;quot;greetings&amp;quot; response1=&amp;quot;Hello&amp;quot; response2=&amp;quot;How are you?&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/specifickas&amp;gt;&lt;br /&gt;
 	  &amp;lt;merchant&amp;gt;&lt;br /&gt;
 		&amp;lt;category name=&amp;quot;Weapons&amp;quot;/&amp;gt;&lt;br /&gt;
 		&amp;lt;category name=&amp;quot;Armor&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/merchant&amp;gt;&lt;br /&gt;
 	  &amp;lt;trainer&amp;gt;&lt;br /&gt;
 		&amp;lt;skill name=&amp;quot;Strength&amp;quot; min_rank=&amp;quot;0&amp;quot; max_rank=&amp;quot;20&amp;quot; min_faction=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/trainer&amp;gt;&lt;br /&gt;
 	  &amp;lt;factions&amp;gt;&lt;br /&gt;
 		&amp;lt;faction name=&amp;quot;orcs&amp;quot; value=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/factions&amp;gt;&lt;br /&gt;
 	  &amp;lt;variables&amp;gt;&lt;br /&gt;
 		&amp;lt;variable name=&amp;quot;scale&amp;quot; value=&amp;quot;1.5&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/variables&amp;gt;&lt;br /&gt;
           &amp;lt;npctype name=&amp;quot;performer&amp;quot; parent=&amp;quot;Fighter&amp;quot; &amp;gt;&lt;br /&gt;
 		  &amp;lt;behavior name=&amp;quot;start_show&amp;quot; completion_decay=&amp;quot;0&amp;quot; growth=&amp;quot;0&amp;quot; initial=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;emote cmd=&amp;quot;/bow&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;talk text=&amp;quot;Welcome to my show&amp;quot; target=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;busy/&amp;gt;&lt;br /&gt;
 		  &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 		  &amp;lt;behavior name=&amp;quot;show&amp;quot; completion_decay=&amp;quot;0&amp;quot; growth=&amp;quot;0&amp;quot; initial=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
 		    &amp;lt;emote cmd=&amp;quot;/greet&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;wait duration=&amp;quot;30&amp;quot; anim=&amp;quot;play&amp;quot; /&amp;gt;&lt;br /&gt;
 		   &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 		   &amp;lt;behavior name=&amp;quot;showidle&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;idle /&amp;gt;&lt;br /&gt;
 		   &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 	   &amp;lt;/npctype&amp;gt;&lt;br /&gt;
 	&amp;lt;/spawnnpc&amp;gt;&lt;br /&gt;
 	&amp;lt;spawnitem id=&amp;quot;2&amp;quot; name=&amp;quot;Long Bow&amp;quot; pickup=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;
 	   &amp;lt;location x=&amp;quot;1&amp;quot; y=&amp;quot;1&amp;quot; z=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;/spawnitem&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;start_show&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;show&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;showidle&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;70&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     &amp;lt;destroynpc id=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;destroyitem id=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;schedulenext/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== All Tags ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;time&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Defines a timed step of the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; → number of seconds after the event start when this block of actions should be executed.&lt;br /&gt;
* &#039;&#039;&#039;Children:&#039;&#039;&#039; can contain&lt;br /&gt;
** &amp;lt;code&amp;gt;spawnnpc&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;spawnitem&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;trigger&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;destroynpc&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;destroyitem&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;schedulenext&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;message&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;sound&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;spawnnpc&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Spawns a new NPC into the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; handled in &amp;lt;code&amp;gt;psRandomEventsNPC::LoadXML()&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; numeric identifier for this NPC within the event. Must be non-zero.&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → optional first name. If empty, a random name will be generated.&lt;br /&gt;
* &amp;lt;code&amp;gt;lastname&amp;lt;/code&amp;gt; → optional last name.&lt;br /&gt;
* &amp;lt;code&amp;gt;race&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; one or more race IDs (separated by &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;). All races must exist in the database.&lt;br /&gt;
* &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; → optional text description of the NPC.&lt;br /&gt;
* &amp;lt;code&amp;gt;invulnerable&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;no&amp;quot;&amp;lt;/code&amp;gt;. Determines if the NPC can be damaged.&lt;br /&gt;
* &amp;lt;code&amp;gt;HP&amp;lt;/code&amp;gt; → starting hit points.&lt;br /&gt;
* &amp;lt;code&amp;gt;Mana&amp;lt;/code&amp;gt; → starting mana points.&lt;br /&gt;
* &amp;lt;code&amp;gt;loot_category&amp;lt;/code&amp;gt; → numeric loot category ID used for drop tables.&lt;br /&gt;
* &amp;lt;code&amp;gt;locx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;locy&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;locz&amp;lt;/code&amp;gt; → spawn location coordinates.&lt;br /&gt;
* &amp;lt;code&amp;gt;rot&amp;lt;/code&amp;gt; → rotation (facing direction) in degrees.&lt;br /&gt;
* &amp;lt;code&amp;gt;traits&amp;lt;/code&amp;gt; → optional set of trait IDs, separated by &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;. Only valid if a single race is defined.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Child Tags:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;inventory&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;item&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (item):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → item name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;location&amp;lt;/code&amp;gt; → inventory slot name (must exist in slot hash).&lt;br /&gt;
*** &amp;lt;code&amp;gt;quantity&amp;lt;/code&amp;gt; → number of items.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;skills&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;skill&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (skill):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → skill name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; → starting value.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;kas&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;ka&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (ka):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → knowledge area name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;priority&amp;lt;/code&amp;gt; → priority number.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;specifickas&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;trigger&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (trigger):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;trigger&amp;lt;/code&amp;gt; → text that activates the response.&lt;br /&gt;
*** &amp;lt;code&amp;gt;response1..5&amp;lt;/code&amp;gt; → one or more response lines. &amp;lt;code&amp;gt;response1&amp;lt;/code&amp;gt; must be present.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;merchant&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;category&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (category):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → merchant category name (e.g., &amp;lt;code&amp;gt;&amp;quot;Weapons - Shortsword&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;trainer&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;skill&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (skill):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → skill name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;min_rank&amp;lt;/code&amp;gt; → minimum rank the trainer teaches.&lt;br /&gt;
*** &amp;lt;code&amp;gt;max_rank&amp;lt;/code&amp;gt; → maximum rank.&lt;br /&gt;
*** &amp;lt;code&amp;gt;min_faction&amp;lt;/code&amp;gt; → minimum faction value required.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;factions&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;faction&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (faction):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → faction name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; → starting standing with that faction.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;variables&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;variable&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (variable):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → variable key.&lt;br /&gt;
*** &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; → variable value (string or number).&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;npctype&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Defines NPC brain/type using external &amp;lt;code&amp;gt;NPCType&amp;lt;/code&amp;gt;. Attributes/structure depend on &amp;lt;code&amp;gt;NPCType::Load()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;spawnitem&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Spawns a new item into the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; handled in &amp;lt;code&amp;gt;psRandomEventsItem::LoadXML()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; numeric identifier for this item within the event. Must be non-zero.&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; item name (must exist in database).&lt;br /&gt;
* &amp;lt;code&amp;gt;pickup&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;no&amp;quot;&amp;lt;/code&amp;gt;. Determines if the item can be picked up by players.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Child Tags:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;location&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; → world coordinates where the item should spawn. (Values are multiplied by 100 internally to convert to centimeters.)&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;trigger&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Sends a behavior trigger to a spawned NPC.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;behavior&amp;lt;/code&amp;gt; → name of the behavior to trigger (e.g., &amp;lt;code&amp;gt;&amp;quot;start_show&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
** &amp;lt;code&amp;gt;npc&amp;lt;/code&amp;gt; → the numeric ID of the NPC that should execute this behavior.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;destroynpc&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Removes an NPC from the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → numeric ID of the NPC to destroy.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;destroyitem&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Removes an item from the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → numeric ID of the item to destroy.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;schedulenext&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Marks that after this timed step, the next event in the sequence should be scheduled automatically.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; none.&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;message&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Sends a message to the client visible on screen and in the chat&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt; → the text to display&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;sound&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
* Plays a sound to the client visible on screen and in the chat&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;sound&amp;lt;/code&amp;gt; → the sound to play&lt;br /&gt;
** &amp;lt;code&amp;gt;location&amp;lt;/code&amp;gt; → can be &amp;quot;player&amp;quot; or &amp;quot;event&amp;quot;. If &amp;quot;player&amp;quot; the sound will be centered on the player, if &amp;quot;event&amp;quot; it will be at the starting location of the event &lt;br /&gt;
** &amp;lt;code&amp;gt;attenuation&amp;lt;/code&amp;gt; → If the sound should use 3d spatial attenuation or not&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Random_Generated_events&amp;diff=24977</id>
		<title>Random Generated events</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Random_Generated_events&amp;diff=24977"/>
		<updated>2025-08-20T13:44:18Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* All Tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A new capability has been added to PSUnreal about generating random events in the game.&lt;br /&gt;
&lt;br /&gt;
==== Event location ====&lt;br /&gt;
An event is defined to happen in an &amp;quot;area type&amp;quot;, it can be for example &amp;quot;forest&amp;quot; or &amp;quot;tavern&amp;quot; or specific location. There is relationiship beween [[Random eventsTable|random_events]].area and [[Random event locsTable|random_event_locs]].event_areatype.&lt;br /&gt;
&lt;br /&gt;
If you want the event to happen in a specific path network waypoint, you can specify a [[Random eventsTable|random_events]].area with this syntax: wp:&amp;lt;waypoint1|waypoint2|...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Event Probability ====&lt;br /&gt;
In addition there is also [[Random event locsTable|random_event_locs]].event_probability which is a % of chance of that event happening.&lt;br /&gt;
&lt;br /&gt;
Database structure:&lt;br /&gt;
* [[Random eventsTable|random_events]] table&lt;br /&gt;
&lt;br /&gt;
Scripting:&lt;br /&gt;
* Prerequisites (random_events.prerequisite)&lt;br /&gt;
** The same syntax of quest prerequisites can be used with the following additions:&lt;br /&gt;
*** &amp;lt;skillsinrange name=&amp;quot;Sword&amp;quot; min=&amp;quot;10&amp;quot; max=&amp;quot;20&amp;quot; range=&amp;quot;10&amp;quot;&amp;gt; (works as skill but checks all the players in range and sum up their skills). If the name is empty it sums up the total skills of all players in range.&lt;br /&gt;
* Script for the event (random_events.script)&lt;br /&gt;
&lt;br /&gt;
==== Race and traits ====&lt;br /&gt;
Race and traits are numerical as defined in the database. Maybe in the future we make it text. Check [[Races and Traits IDs|here]] for the list.&lt;br /&gt;
&lt;br /&gt;
==== Options: ====&lt;br /&gt;
&lt;br /&gt;
* You can specify a name and lastname in the &amp;lt;spawnnpc&amp;gt; tag, if omitted the NPC will have a random name and lastname.&lt;br /&gt;
* You can have a description, useful if you are specifying the name and the race of the NPC. If not specified it will empty.&lt;br /&gt;
* You can specify certain traits, if missing, the server will randomize by choosing the ones available for the given race.&lt;br /&gt;
&#039;&#039;&#039;Inventory:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The valid locations for inventory items are: &amp;quot;righthand,lefthand,helm,rightfinger,leftfinger,neck,back,arms,gloves,boots,legs,belt,bracers,torso,mind&amp;quot; . For bothhands we need TO CHECK it.&lt;br /&gt;
&lt;br /&gt;
==== Example: ====&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 	&amp;lt;spawnnpc id=&amp;quot;1&amp;quot; name=&amp;quot;Erisal&amp;quot; lastname=&amp;quot;Baloe&amp;quot; race=&amp;quot;0|1|2|3|5|6|7|9|10|11&amp;quot; invulnerable=&amp;quot;yes&amp;quot; hp=&amp;quot;400&amp;quot; mana=&amp;quot;400&amp;quot; loot_category=&amp;quot;22&amp;quot; locx=&amp;quot;1&amp;quot; locy=&amp;quot;1&amp;quot; locz=&amp;quot;0&amp;quot; description=&amp;quot;A young dermorian girl, with a nice smile.&amp;quot; traits=&amp;quot;42|363|380&amp;quot;&amp;gt;&lt;br /&gt;
 	  &amp;lt;inventory&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Small Battle Axe&amp;quot; location=&amp;quot;righthand&amp;quot;/&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Falchion&amp;quot; location=&amp;quot;bulk1&amp;quot; quantity=&amp;quot;65&amp;quot;/&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Chainmail Legs Armor&amp;quot; location=&amp;quot;legs&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/inventory&amp;gt;&lt;br /&gt;
 	  &amp;lt;skills&amp;gt;&lt;br /&gt;
 		 &amp;lt;skill name=&amp;quot;Sword&amp;quot; value=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/skills&amp;gt;&lt;br /&gt;
 	  &amp;lt;stats str=&amp;quot;80&amp;quot; agi=&amp;quot;70&amp;quot; end=&amp;quot;60&amp;quot; int=&amp;quot;75&amp;quot; wil=&amp;quot;55&amp;quot; cha=&amp;quot;90&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;kas&amp;gt;&lt;br /&gt;
 		 &amp;lt;ka name=&amp;quot;Merchant&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/kas&amp;gt;&lt;br /&gt;
 	  &amp;lt;specifickas&amp;gt;&lt;br /&gt;
 		 &amp;lt;trigger trigger=&amp;quot;greetings&amp;quot; response1=&amp;quot;Hello&amp;quot; response2=&amp;quot;How are you?&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/specifickas&amp;gt;&lt;br /&gt;
 	  &amp;lt;merchant&amp;gt;&lt;br /&gt;
 		&amp;lt;category name=&amp;quot;Weapons&amp;quot;/&amp;gt;&lt;br /&gt;
 		&amp;lt;category name=&amp;quot;Armor&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/merchant&amp;gt;&lt;br /&gt;
 	  &amp;lt;trainer&amp;gt;&lt;br /&gt;
 		&amp;lt;skill name=&amp;quot;Strength&amp;quot; min_rank=&amp;quot;0&amp;quot; max_rank=&amp;quot;20&amp;quot; min_faction=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/trainer&amp;gt;&lt;br /&gt;
 	  &amp;lt;factions&amp;gt;&lt;br /&gt;
 		&amp;lt;faction name=&amp;quot;orcs&amp;quot; value=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/factions&amp;gt;&lt;br /&gt;
 	  &amp;lt;variables&amp;gt;&lt;br /&gt;
 		&amp;lt;variable name=&amp;quot;scale&amp;quot; value=&amp;quot;1.5&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/variables&amp;gt;&lt;br /&gt;
           &amp;lt;npctype name=&amp;quot;performer&amp;quot; parent=&amp;quot;Fighter&amp;quot; &amp;gt;&lt;br /&gt;
 		  &amp;lt;behavior name=&amp;quot;start_show&amp;quot; completion_decay=&amp;quot;0&amp;quot; growth=&amp;quot;0&amp;quot; initial=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;emote cmd=&amp;quot;/bow&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;talk text=&amp;quot;Welcome to my show&amp;quot; target=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;busy/&amp;gt;&lt;br /&gt;
 		  &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 		  &amp;lt;behavior name=&amp;quot;show&amp;quot; completion_decay=&amp;quot;0&amp;quot; growth=&amp;quot;0&amp;quot; initial=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
 		    &amp;lt;emote cmd=&amp;quot;/greet&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;wait duration=&amp;quot;30&amp;quot; anim=&amp;quot;play&amp;quot; /&amp;gt;&lt;br /&gt;
 		   &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 		   &amp;lt;behavior name=&amp;quot;showidle&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;idle /&amp;gt;&lt;br /&gt;
 		   &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 	   &amp;lt;/npctype&amp;gt;&lt;br /&gt;
 	&amp;lt;/spawnnpc&amp;gt;&lt;br /&gt;
 	&amp;lt;spawnitem id=&amp;quot;2&amp;quot; name=&amp;quot;Long Bow&amp;quot; pickup=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;
 	   &amp;lt;location x=&amp;quot;1&amp;quot; y=&amp;quot;1&amp;quot; z=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;/spawnitem&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;start_show&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;show&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;showidle&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;70&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     &amp;lt;destroynpc id=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;destroyitem id=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;schedulenext/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== All Tags ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;time&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Defines a timed step of the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; → number of seconds after the event start when this block of actions should be executed.&lt;br /&gt;
* &#039;&#039;&#039;Children:&#039;&#039;&#039; can contain &amp;lt;code&amp;gt;spawnnpc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;spawnitem&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trigger&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;destroynpc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;destroyitem&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;schedulenext&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;spawnnpc&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Spawns a new NPC into the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; handled in &amp;lt;code&amp;gt;psRandomEventsNPC::LoadXML()&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; numeric identifier for this NPC within the event. Must be non-zero.&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → optional first name. If empty, a random name will be generated.&lt;br /&gt;
* &amp;lt;code&amp;gt;lastname&amp;lt;/code&amp;gt; → optional last name.&lt;br /&gt;
* &amp;lt;code&amp;gt;race&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; one or more race IDs (separated by &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;). All races must exist in the database.&lt;br /&gt;
* &amp;lt;code&amp;gt;description&amp;lt;/code&amp;gt; → optional text description of the NPC.&lt;br /&gt;
* &amp;lt;code&amp;gt;invulnerable&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;no&amp;quot;&amp;lt;/code&amp;gt;. Determines if the NPC can be damaged.&lt;br /&gt;
* &amp;lt;code&amp;gt;HP&amp;lt;/code&amp;gt; → starting hit points.&lt;br /&gt;
* &amp;lt;code&amp;gt;Mana&amp;lt;/code&amp;gt; → starting mana points.&lt;br /&gt;
* &amp;lt;code&amp;gt;loot_category&amp;lt;/code&amp;gt; → numeric loot category ID used for drop tables.&lt;br /&gt;
* &amp;lt;code&amp;gt;locx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;locy&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;locz&amp;lt;/code&amp;gt; → spawn location coordinates.&lt;br /&gt;
* &amp;lt;code&amp;gt;rot&amp;lt;/code&amp;gt; → rotation (facing direction) in degrees.&lt;br /&gt;
* &amp;lt;code&amp;gt;traits&amp;lt;/code&amp;gt; → optional set of trait IDs, separated by &amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;. Only valid if a single race is defined.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Child Tags:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;inventory&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;item&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (item):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → item name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;location&amp;lt;/code&amp;gt; → inventory slot name (must exist in slot hash).&lt;br /&gt;
*** &amp;lt;code&amp;gt;quantity&amp;lt;/code&amp;gt; → number of items.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;skills&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;skill&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (skill):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → skill name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; → starting value.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;kas&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;ka&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (ka):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → knowledge area name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;priority&amp;lt;/code&amp;gt; → priority number.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;specifickas&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;trigger&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (trigger):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;trigger&amp;lt;/code&amp;gt; → text that activates the response.&lt;br /&gt;
*** &amp;lt;code&amp;gt;response1..5&amp;lt;/code&amp;gt; → one or more response lines. &amp;lt;code&amp;gt;response1&amp;lt;/code&amp;gt; must be present.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;merchant&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;category&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (category):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → merchant category name (e.g., &amp;lt;code&amp;gt;&amp;quot;Weapons - Shortsword&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;trainer&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;skill&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (skill):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → skill name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;min_rank&amp;lt;/code&amp;gt; → minimum rank the trainer teaches.&lt;br /&gt;
*** &amp;lt;code&amp;gt;max_rank&amp;lt;/code&amp;gt; → maximum rank.&lt;br /&gt;
*** &amp;lt;code&amp;gt;min_faction&amp;lt;/code&amp;gt; → minimum faction value required.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;factions&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;faction&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (faction):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → faction name (must exist).&lt;br /&gt;
*** &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; → starting standing with that faction.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;variables&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Contains &amp;lt;code&amp;gt;&amp;lt;variable&amp;gt;&amp;lt;/code&amp;gt; entries.&lt;br /&gt;
** &#039;&#039;&#039;Attributes (variable):&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → variable key.&lt;br /&gt;
*** &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; → variable value (string or number).&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;npctype&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Defines NPC brain/type using external &amp;lt;code&amp;gt;NPCType&amp;lt;/code&amp;gt;. Attributes/structure depend on &amp;lt;code&amp;gt;NPCType::Load()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;spawnitem&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Spawns a new item into the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; handled in &amp;lt;code&amp;gt;psRandomEventsItem::LoadXML()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; numeric identifier for this item within the event. Must be non-zero.&lt;br /&gt;
* &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; → &#039;&#039;&#039;(required)&#039;&#039;&#039; item name (must exist in database).&lt;br /&gt;
* &amp;lt;code&amp;gt;pickup&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;no&amp;quot;&amp;lt;/code&amp;gt;. Determines if the item can be picked up by players.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Child Tags:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;location&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
** &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
*** &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;z&amp;lt;/code&amp;gt; → world coordinates where the item should spawn. (Values are multiplied by 100 internally to convert to centimeters.)&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;trigger&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Sends a behavior trigger to a spawned NPC.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;behavior&amp;lt;/code&amp;gt; → name of the behavior to trigger (e.g., &amp;lt;code&amp;gt;&amp;quot;start_show&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
** &amp;lt;code&amp;gt;npc&amp;lt;/code&amp;gt; → the numeric ID of the NPC that should execute this behavior.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;destroynpc&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Removes an NPC from the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → numeric ID of the NPC to destroy.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;destroyitem&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Removes an item from the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → numeric ID of the item to destroy.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;schedulenext&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Marks that after this timed step, the next event in the sequence should be scheduled automatically.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; none.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Random_Generated_events&amp;diff=24976</id>
		<title>Random Generated events</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Random_Generated_events&amp;diff=24976"/>
		<updated>2025-08-20T13:37:43Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Example: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A new capability has been added to PSUnreal about generating random events in the game.&lt;br /&gt;
&lt;br /&gt;
==== Event location ====&lt;br /&gt;
An event is defined to happen in an &amp;quot;area type&amp;quot;, it can be for example &amp;quot;forest&amp;quot; or &amp;quot;tavern&amp;quot; or specific location. There is relationiship beween [[Random eventsTable|random_events]].area and [[Random event locsTable|random_event_locs]].event_areatype.&lt;br /&gt;
&lt;br /&gt;
If you want the event to happen in a specific path network waypoint, you can specify a [[Random eventsTable|random_events]].area with this syntax: wp:&amp;lt;waypoint1|waypoint2|...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Event Probability ====&lt;br /&gt;
In addition there is also [[Random event locsTable|random_event_locs]].event_probability which is a % of chance of that event happening.&lt;br /&gt;
&lt;br /&gt;
Database structure:&lt;br /&gt;
* [[Random eventsTable|random_events]] table&lt;br /&gt;
&lt;br /&gt;
Scripting:&lt;br /&gt;
* Prerequisites (random_events.prerequisite)&lt;br /&gt;
** The same syntax of quest prerequisites can be used with the following additions:&lt;br /&gt;
*** &amp;lt;skillsinrange name=&amp;quot;Sword&amp;quot; min=&amp;quot;10&amp;quot; max=&amp;quot;20&amp;quot; range=&amp;quot;10&amp;quot;&amp;gt; (works as skill but checks all the players in range and sum up their skills). If the name is empty it sums up the total skills of all players in range.&lt;br /&gt;
* Script for the event (random_events.script)&lt;br /&gt;
&lt;br /&gt;
==== Race and traits ====&lt;br /&gt;
Race and traits are numerical as defined in the database. Maybe in the future we make it text. Check [[Races and Traits IDs|here]] for the list.&lt;br /&gt;
&lt;br /&gt;
==== Options: ====&lt;br /&gt;
&lt;br /&gt;
* You can specify a name and lastname in the &amp;lt;spawnnpc&amp;gt; tag, if omitted the NPC will have a random name and lastname.&lt;br /&gt;
* You can have a description, useful if you are specifying the name and the race of the NPC. If not specified it will empty.&lt;br /&gt;
* You can specify certain traits, if missing, the server will randomize by choosing the ones available for the given race.&lt;br /&gt;
&#039;&#039;&#039;Inventory:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The valid locations for inventory items are: &amp;quot;righthand,lefthand,helm,rightfinger,leftfinger,neck,back,arms,gloves,boots,legs,belt,bracers,torso,mind&amp;quot; . For bothhands we need TO CHECK it.&lt;br /&gt;
&lt;br /&gt;
==== Example: ====&lt;br /&gt;
    &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 	&amp;lt;spawnnpc id=&amp;quot;1&amp;quot; name=&amp;quot;Erisal&amp;quot; lastname=&amp;quot;Baloe&amp;quot; race=&amp;quot;0|1|2|3|5|6|7|9|10|11&amp;quot; invulnerable=&amp;quot;yes&amp;quot; hp=&amp;quot;400&amp;quot; mana=&amp;quot;400&amp;quot; loot_category=&amp;quot;22&amp;quot; locx=&amp;quot;1&amp;quot; locy=&amp;quot;1&amp;quot; locz=&amp;quot;0&amp;quot; description=&amp;quot;A young dermorian girl, with a nice smile.&amp;quot; traits=&amp;quot;42|363|380&amp;quot;&amp;gt;&lt;br /&gt;
 	  &amp;lt;inventory&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Small Battle Axe&amp;quot; location=&amp;quot;righthand&amp;quot;/&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Falchion&amp;quot; location=&amp;quot;bulk1&amp;quot; quantity=&amp;quot;65&amp;quot;/&amp;gt;&lt;br /&gt;
 		 &amp;lt;item name=&amp;quot;Chainmail Legs Armor&amp;quot; location=&amp;quot;legs&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/inventory&amp;gt;&lt;br /&gt;
 	  &amp;lt;skills&amp;gt;&lt;br /&gt;
 		 &amp;lt;skill name=&amp;quot;Sword&amp;quot; value=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/skills&amp;gt;&lt;br /&gt;
 	  &amp;lt;stats str=&amp;quot;80&amp;quot; agi=&amp;quot;70&amp;quot; end=&amp;quot;60&amp;quot; int=&amp;quot;75&amp;quot; wil=&amp;quot;55&amp;quot; cha=&amp;quot;90&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;kas&amp;gt;&lt;br /&gt;
 		 &amp;lt;ka name=&amp;quot;Merchant&amp;quot; priority=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/kas&amp;gt;&lt;br /&gt;
 	  &amp;lt;specifickas&amp;gt;&lt;br /&gt;
 		 &amp;lt;trigger trigger=&amp;quot;greetings&amp;quot; response1=&amp;quot;Hello&amp;quot; response2=&amp;quot;How are you?&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/specifickas&amp;gt;&lt;br /&gt;
 	  &amp;lt;merchant&amp;gt;&lt;br /&gt;
 		&amp;lt;category name=&amp;quot;Weapons&amp;quot;/&amp;gt;&lt;br /&gt;
 		&amp;lt;category name=&amp;quot;Armor&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/merchant&amp;gt;&lt;br /&gt;
 	  &amp;lt;trainer&amp;gt;&lt;br /&gt;
 		&amp;lt;skill name=&amp;quot;Strength&amp;quot; min_rank=&amp;quot;0&amp;quot; max_rank=&amp;quot;20&amp;quot; min_faction=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/trainer&amp;gt;&lt;br /&gt;
 	  &amp;lt;factions&amp;gt;&lt;br /&gt;
 		&amp;lt;faction name=&amp;quot;orcs&amp;quot; value=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/factions&amp;gt;&lt;br /&gt;
 	  &amp;lt;variables&amp;gt;&lt;br /&gt;
 		&amp;lt;variable name=&amp;quot;scale&amp;quot; value=&amp;quot;1.5&amp;quot;/&amp;gt;&lt;br /&gt;
 	  &amp;lt;/variables&amp;gt;&lt;br /&gt;
           &amp;lt;npctype name=&amp;quot;performer&amp;quot; parent=&amp;quot;Fighter&amp;quot; &amp;gt;&lt;br /&gt;
 		  &amp;lt;behavior name=&amp;quot;start_show&amp;quot; completion_decay=&amp;quot;0&amp;quot; growth=&amp;quot;0&amp;quot; initial=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;emote cmd=&amp;quot;/bow&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;talk text=&amp;quot;Welcome to my show&amp;quot; target=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;busy/&amp;gt;&lt;br /&gt;
 		  &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 		  &amp;lt;behavior name=&amp;quot;show&amp;quot; completion_decay=&amp;quot;0&amp;quot; growth=&amp;quot;0&amp;quot; initial=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
 		    &amp;lt;emote cmd=&amp;quot;/greet&amp;quot; /&amp;gt;&lt;br /&gt;
 			&amp;lt;wait duration=&amp;quot;30&amp;quot; anim=&amp;quot;play&amp;quot; /&amp;gt;&lt;br /&gt;
 		   &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 		   &amp;lt;behavior name=&amp;quot;showidle&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;idle /&amp;gt;&lt;br /&gt;
 		   &amp;lt;/behavior&amp;gt;&lt;br /&gt;
 	   &amp;lt;/npctype&amp;gt;&lt;br /&gt;
 	&amp;lt;/spawnnpc&amp;gt;&lt;br /&gt;
 	&amp;lt;spawnitem id=&amp;quot;2&amp;quot; name=&amp;quot;Long Bow&amp;quot; pickup=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;
 	   &amp;lt;location x=&amp;quot;1&amp;quot; y=&amp;quot;1&amp;quot; z=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;/spawnitem&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;30&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;start_show&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;45&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;show&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;60&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
      &amp;lt;trigger behavior=&amp;quot;showidle&amp;quot; npc=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;time seconds=&amp;quot;70&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     &amp;lt;destroynpc id=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;destroyitem id=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
 	&amp;lt;schedulenext/&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== All Tags ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;time&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Defines a timed step of the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; → number of seconds after the event start when this block of actions should be executed.&lt;br /&gt;
* &#039;&#039;&#039;Children:&#039;&#039;&#039; can contain &amp;lt;code&amp;gt;spawnnpc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;spawnitem&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trigger&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;destroynpc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;destroyitem&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;schedulenext&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;spawnnpc&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Spawns a new NPC into the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; handled in &amp;lt;code&amp;gt;psRandomEventsNPC::LoadXML()&amp;lt;/code&amp;gt; (not shown here), but likely includes things like NPC type, position, ID, etc.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;spawnitem&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Spawns a new item into the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; handled in &amp;lt;code&amp;gt;psRandomEventsItem::LoadXML()&amp;lt;/code&amp;gt; (not shown here), but likely includes item type, position, ID, etc.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;trigger&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Sends a behavior trigger to a spawned NPC.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;behavior&amp;lt;/code&amp;gt; → name of the behavior to trigger (e.g., &amp;lt;code&amp;gt;&amp;quot;start_show&amp;quot;&amp;lt;/code&amp;gt;).&lt;br /&gt;
** &amp;lt;code&amp;gt;npc&amp;lt;/code&amp;gt; → the numeric ID of the NPC that should execute this behavior.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;destroynpc&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Removes an NPC from the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → numeric ID of the NPC to destroy.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;destroyitem&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Removes an item from the event.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039;&lt;br /&gt;
** &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; → numeric ID of the item to destroy.&lt;br /&gt;
&lt;br /&gt;
----&#039;&#039;&#039;&amp;lt;code&amp;gt;&amp;lt;schedulenext&amp;gt;&amp;lt;/code&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Marks that after this timed step, the next event in the sequence should be scheduled automatically.&lt;br /&gt;
* &#039;&#039;&#039;Attributes:&#039;&#039;&#039; none.&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=24975</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=24975"/>
		<updated>2025-08-02T18:02:22Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Trigger and Menu */&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;completed 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;
This sample requires that the player have completed Test Quests 1 through 4 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;
=== 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;
&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;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;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&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;
= 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=24974</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=24974"/>
		<updated>2025-08-02T18:02:18Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Trigger and Menu */&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;
Multi trigger:&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;completed 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;
This sample requires that the player have completed Test Quests 1 through 4 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;
=== 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;
&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;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;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&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;
= 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=24973</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=24973"/>
		<updated>2025-08-02T17:21:29Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Rewards at the end of the quest */&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;
&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;completed 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;
This sample requires that the player have completed Test Quests 1 through 4 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;
=== 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;
&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;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;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&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;
= 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=24972</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=24972"/>
		<updated>2025-08-02T17:19:28Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Rewards at the end of the quest */&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;
&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;, 20&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;completed 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;
This sample requires that the player have completed Test Quests 1 through 4 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;
=== 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;
&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;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;active magic&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;known spell&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;race&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;gender&amp;quot; (working)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;married&amp;quot;&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;
= 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=ProgressionEvents&amp;diff=24971</id>
		<title>ProgressionEvents</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=ProgressionEvents&amp;diff=24971"/>
		<updated>2025-07-17T16:17:45Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Progression Events Objects and Variables==&lt;br /&gt;
Be sure to read also [[ProgressionEvents Objects and Variables|this page]] as it describes which objects are scriptable inside a progression event and which variables you can access.&lt;br /&gt;
&lt;br /&gt;
== ActionOp ==&lt;br /&gt;
ActionOp activate any inactive entrance and create a key for it.&lt;br /&gt;
&lt;br /&gt;
Activates any inactive entrance action location of the specified entrance type and places into players inventory a key for the lock instance ID defined in that action location entrance.&lt;br /&gt;
&lt;br /&gt;
- Syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action sector=&amp;quot;%s&amp;quot; stat=&amp;quot;%s&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sector = &amp;quot;%s&amp;quot; sector string to qualify search for inactive entrances&lt;br /&gt;
&lt;br /&gt;
stat = &amp;quot;%s&amp;quot; name of item type for new key to the lock of the entrance&lt;br /&gt;
&lt;br /&gt;
- Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action sector=&amp;quot;guildlaw&amp;quot; stat=&amp;quot;Small Key&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This quest script activates any inactive action location for sector guildlaw and gives a &amp;quot;Small Key&amp;quot; item.&lt;br /&gt;
&lt;br /&gt;
== AnimalAffinityOp ==&lt;br /&gt;
&amp;lt;animal-affinity aim=&amp;quot;Actor&amp;quot; name=&amp;quot;reptile&amp;quot; value=&amp;quot;2&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is primarily used for character creation, as these effects are permanent.  There is no way to buff this currently.&lt;br /&gt;
&lt;br /&gt;
==AnimationOp==&lt;br /&gt;
This is a run once animation command. The animation name is not validated, only client knows if it has the animation.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;animation aim=&amp;quot;Target&amp;quot; name=&amp;quot;animationX&amp;quot; /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Target&#039;&#039;&#039; = the operation&#039;s target&lt;br /&gt;
&#039;&#039;&#039;value&#039;&#039;&#039; = the animation name, these can be: attack, craft, craft_hammer, ...&lt;br /&gt;
&lt;br /&gt;
== CancelOp ==&lt;br /&gt;
A way to cancel active spells.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cancel type=&amp;quot;all&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spell type=&amp;quot;buff&amp;quot; name=&amp;quot;Defensive Wind&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;spell type=&amp;quot;buff&amp;quot; name=&amp;quot;Flame Spire&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cancel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three types:&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;all&amp;quot;     ... cancels all listed spells.&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;ordered&amp;quot; ... cancels the first listed spell that&#039;s actually active.&lt;br /&gt;
&lt;br /&gt;
- &amp;quot;random&amp;quot;  ... cancels a random spell from the list (one which is active).&lt;br /&gt;
&lt;br /&gt;
== CodexEntryOp ==&lt;br /&gt;
Adds one map to the Compendium for this player.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;codex aim=&amp;quot;Actor&amp;quot; type=&amp;quot;map/npc&amp;quot; id=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CreateFamiliarOp==&lt;br /&gt;
Create familiar for actor.&lt;br /&gt;
&lt;br /&gt;
Syntax: &amp;lt;create-familiar aim=&amp;quot;Actor&amp;quot; masterId=&amp;quot;masterId&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Create a familiar near actor and send message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;create-familiar aim=&amp;quot;Actor&amp;quot; masterId=&amp;quot;1001&amp;quot;/&amp;gt;&amp;lt;msg text=&amp;quot;Your new familiar appears nearby.&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==CreateNPCOp==&lt;br /&gt;
Create an NPC at given location, temporary or permanent. Used for Summon Pet Pedestal with beast master.&lt;br /&gt;
&lt;br /&gt;
Syntax: &amp;lt;create-npc aim=&amp;quot;Actor&amp;quot; raceID=&amp;quot;raceId&amp;quot; lifeInSeconds=&amp;quot;30&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lifeInSeconds is how long the NPC will stay alive, if 0 it&#039;s permanent.&lt;br /&gt;
&lt;br /&gt;
==DestroyOp==&lt;br /&gt;
The object that is going to be destroyed must be defined in the supplied MathEnvironment.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;destroy aim=&amp;quot;SomeObjectName&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SomeObjectName needs to be replaced by the object name that is used to register the object in the MathEnvironment. So the name identifies the object to be destroyed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==ExperienceOp==&lt;br /&gt;
Adjust the experience of the target.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;exp type=&amp;quot;allocate_last&amp;quot; value=&amp;quot;#&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;allocate_type&#039;&#039;&#039; = &amp;quot;allocate_last&amp;quot; means allocate damage last otherwise damage is allocated&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;value&#039;&#039;&#039; = &amp;quot;#&amp;quot; amount of experience to give single player or share with others&lt;br /&gt;
&lt;br /&gt;
==FactionOp==&lt;br /&gt;
Example: &amp;lt;faction aim=&amp;quot;Actor&amp;quot; name=&amp;quot;Klyros&amp;quot; value=&amp;quot;5&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds 5 to actor&#039;s Klyros faction.&lt;br /&gt;
&lt;br /&gt;
==FactionTitleOp==&lt;br /&gt;
Example: &amp;lt;factiontitle aim=&amp;quot;Actor&amp;quot; name=&amp;quot;Applied Knowledge&amp;quot; value=&amp;quot;5&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This adds the title number 5 for the faction Applied Knowledge to the actor.&lt;br /&gt;
&lt;br /&gt;
==ForceOp==&lt;br /&gt;
Example: &amp;lt;force name=&amp;quot;SomeName&amp;quot; source=&amp;quot;SomeSource&amp;quot; target=&amp;quot;&amp;quot;/\&amp;gt;&lt;br /&gt;
&lt;br /&gt;
applies a force in an area, centered on the given actor.&lt;br /&gt;
&lt;br /&gt;
This is NOT WORKING properly atm. It was a test for AoE effects.&lt;br /&gt;
&lt;br /&gt;
==FxOp==&lt;br /&gt;
The effect is either created at the target (attached) or in front of it (unattached).&lt;br /&gt;
  &lt;br /&gt;
If the effect is not attached:&lt;br /&gt;
 &amp;lt;fx type=&amp;quot;unattached&amp;quot; name=&amp;quot;SomeName&amp;quot; source=&amp;quot;SomeSource&amp;quot; target=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  or if the effect is attached:&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;fx name=&amp;quot;SomeName&amp;quot; source=&amp;quot;SomeSource&amp;quot; target=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 scale=&amp;quot;value&amp;quot; is optional and gives the scaling factor for the effect.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;fx source=&amp;quot;Caster&amp;quot; target=&amp;quot;Target&amp;quot; name=&amp;quot;summon_missile&amp;quot; type=&amp;quot;unattached&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== HPOp ==&lt;br /&gt;
direct HP damage. Unlike other vitals, &amp;lt;hp&amp;gt; can specify an optional attacker who will be recorded in the target&#039;s damage history.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hp attacker=&amp;quot;Caster&amp;quot; aim=&amp;quot;Target&amp;quot; value=&amp;quot;-5*Power&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hp aim=&amp;quot;Target&amp;quot; value=&amp;quot;15&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HPRateAOp==&lt;br /&gt;
Change the HP statistics of a character in Applied mode.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;hp-rate value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;value&#039;&#039;&#039; = &amp;quot;...&amp;quot; a mathscript defined value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
Increase the Actor HP rate by 10 points:&lt;br /&gt;
  &amp;lt;hp-rate value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IfOp==&lt;br /&gt;
This operation allow to asses a condition and execute other operations if the result return true or false. It&#039;s a classic if/then/else operation.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;if t=&amp;quot;...&amp;quot;&amp;gt; &lt;br /&gt;
    &amp;lt;then&amp;gt;...&amp;lt;/then&amp;gt; &lt;br /&gt;
    &amp;lt;else&amp;gt;...&amp;lt;/else&amp;gt;&lt;br /&gt;
  &amp;lt;/if&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;t&#039;&#039;&#039; = &amp;quot;...&amp;quot; a mathscript condition to verify.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
Check if &#039;Water Barrier&#039; spell is active on the target and send a message based on that:&lt;br /&gt;
  &amp;lt;if t=&amp;quot;Target:ActiveSpellCount(&#039;Water Barrier&#039;) &amp;amp;lt; 1&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;then&amp;gt;&lt;br /&gt;
      &amp;lt;msg aim=&amp;quot;Target&amp;quot; text=&amp;quot;${Target} is not under Water Barrier spell.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/then&amp;gt;&lt;br /&gt;
    &amp;lt;else&amp;gt;&lt;br /&gt;
      &amp;lt;msg aim=&amp;quot;Target&amp;quot; text=&amp;quot;${Target} is under Water Barrier spell.&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/else&amp;gt;&lt;br /&gt;
  &amp;lt;/if&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ItemOp==&lt;br /&gt;
Creates an item in the player inventory&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;item aim=&amp;quot;Actor&amp;quot; name=&amp;quot;Tria&amp;quot; location=&amp;quot;inventory&amp;quot; count=&amp;quot;23&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;item aim=&amp;quot;Actor&amp;quot; name=&amp;quot;Ruby Crystal&amp;quot; location=&amp;quot;inventory&amp;quot; count=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==KeyOp==&lt;br /&gt;
There are two functions of this script.  The make function will create a new master key for the specified lock.  The modify function will change existing key to work with lock.&lt;br /&gt;
&lt;br /&gt;
== LetOp ==&lt;br /&gt;
This operation allow to setup one or more variable which can be used inside the let operation block.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;let vars=&amp;quot;...&amp;quot;/&amp;gt; or &amp;lt;let vars=&amp;quot;...&amp;quot;&amp;gt;...&amp;lt;/let&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;vars&#039;&#039;&#039; = &amp;quot;...&amp;quot; define a mathscript environment.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
Setup Roll (random 0-100), Will and Power variables:&lt;br /&gt;
  &amp;lt;let vars=&amp;quot;Roll=rnd(100);Will=Target:GetSkillValue(51); Power=0.8^(0.1*Will)*Roll;&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;/let&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==LootSetOp==&lt;br /&gt;
Based on the a loot rule ID, generates all the items needed and add those into the player inventory or drops to the ground&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;loot aim=&amp;quot;Actor&amp;quot; lootid=&amp;quot;&amp;lt;lootid1,lootid2,lootid3&amp;gt;&amp;quot; location=&amp;quot;inventory|ground&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
lootid corresponds to an entry into [[Loot rulesTable|loot_rules]] table. Can be a single ID, or a series of IDs comma-separated. If there are multiple IDs, the loot will randomize and pick one.&lt;br /&gt;
&lt;br /&gt;
==MechanismMsgOp==&lt;br /&gt;
activate a mechanism:&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;mechanism aim=&amp;quot;Target&amp;quot; mesh=&amp;quot;Mesh&amp;quot; move=&amp;quot;Move&amp;quot; rot=&amp;quot;Rot&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MinigameOp ==&lt;br /&gt;
MinigameOp - starts a new minigame&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;minigame aim=&amp;quot;Target&amp;quot; name=&amp;quot;Dice&amp;quot; itemloc=&amp;quot;righthand&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
itemloc points to the NPC slot where we search for a minigame item to start the game.&lt;br /&gt;
&lt;br /&gt;
== MsgOp ==&lt;br /&gt;
Used to send a system message to the user client. Variables ($variable_name) con be used inside the text.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;msg aim=&amp;quot;...&amp;quot;  text=&amp;quot;...&amp;quot; type=&amp;quot;ok|error&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;aim&#039;&#039;&#039; = &amp;quot;...&amp;quot; the operation&#039;s target, depending on the environment can be &#039;&#039;Actor&#039;&#039; or &#039;&#039;Target&#039;&#039;, inside a spell script &#039;&#039;Caster&#039;&#039; is a valid target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;text&#039;&#039;&#039; = &amp;quot;...&amp;quot; the text to display.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;type&#039;&#039;&#039; = &amp;quot;ok|error&amp;quot; the type field is optional and tell the server if the message is an ordinary message or if an error or confirmation message to display on screen. Without this option the message is diplayed in the system message chat tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
Raise the Actor&#039;s strength by 10 points and send a message to the user:&lt;br /&gt;
  &amp;lt;str aim=&amp;quot;Actor&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;msg aim=&amp;quot;Actor&amp;quot; text=&amp;quot;$Actor&#039;s strength has been increased by 10 points.&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NPCCmdOp==&lt;br /&gt;
NPCCmdOp - one-time npc command sending:&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;npccmd aim=&amp;quot;Caster&amp;quot; cmd=&amp;quot;spam spam spam spam...!&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SkillOp ==&lt;br /&gt;
Used to affect a character skill (Alchemy, Melee, Herbal, ...).&lt;br /&gt;
This is used to change a character&#039;s skill live in game.&lt;br /&gt;
[[ProgressionEvents#SkillAOp|SkillAOp]] are buffable (see ApplicativeScript).&lt;br /&gt;
&lt;br /&gt;
Used to affect  in Applied Mode.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;skill aim=&amp;quot;...&amp;quot;  value=&amp;quot;...&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;aim&#039;&#039;&#039; = &amp;quot;...&amp;quot; the operation&#039;s target, depending on the environment can be &#039;&#039;Actor&#039;&#039; or &#039;&#039;Target&#039;&#039;, inside a spell script &#039;&#039;Caster&#039;&#039; is a valid target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;value&#039;&#039;&#039; = &amp;quot;...&amp;quot; a mathscript defined value.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;lt;skill aim=&amp;quot;Actor&amp;quot; name=&amp;quot;Red Way&amp;quot; value=&amp;quot;-10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;skill aim=&amp;quot;Actor&amp;quot; name=&amp;quot;Brown Way&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SkillAOp ==&lt;br /&gt;
Used to affect a character skill (Alchemy, Melee, Herbal, ...) in Applied Mode.&lt;br /&gt;
&lt;br /&gt;
This command works like a [[ProgressionEvents#SkillOp|Skill Operation]]. No aim or Target needs to be declared.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;lt;skill name=&amp;quot;Red Way&amp;quot; value=&amp;quot;-10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;skill name=&amp;quot;Brown Way&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SleepOp==&lt;br /&gt;
make the player sleep&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;sleep aim=&amp;quot;Target&amp;quot; quality=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== StatsOp==&lt;br /&gt;
Used to affect a character stat (agility, intelligence, ...).&lt;br /&gt;
This is used to change a character&#039;s stats live in game.&lt;br /&gt;
[[ProgressionEvents#StatsAOp|StatsAOp]] are buffable (see ApplicativeScript).&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;agi aim=&amp;quot;...&amp;quot;  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;end aim=&amp;quot;...&amp;quot;  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;str aim=&amp;quot;...&amp;quot;  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;cha aim=&amp;quot;...&amp;quot;  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;int aim=&amp;quot;...&amp;quot;  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;wil aim=&amp;quot;...&amp;quot;  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
&#039;&#039;&#039;aim&#039;&#039;&#039; = &amp;quot;...&amp;quot; the operation&#039;s target, depending on the environment can be &#039;&#039;Actor&#039;&#039; or &#039;&#039;Target&#039;&#039;, inside a spell script &#039;&#039;Caster&#039;&#039; is a valid target.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;value&#039;&#039;&#039; = &amp;quot;...&amp;quot; a mathscript defined value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
Reduce Actor&#039;s physical stats by 10% and raise mental stats by 10 points:&lt;br /&gt;
  &amp;lt;str aim=&amp;quot;Actor&amp;quot; value=&amp;quot;-0.1*Actor:GetSkillValue(50)&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;agi aim=&amp;quot;Actor&amp;quot; value=&amp;quot;-0.1*Actor:GetSkillValue(46)&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;end aim=&amp;quot;Actor&amp;quot; value=&amp;quot;-0.1*Actor:GetSkillValue(48)&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;cha aim=&amp;quot;Actor&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;int aim=&amp;quot;Actor&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;wil aim=&amp;quot;Actor&amp;quot; value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==StatsAOp==&lt;br /&gt;
Used to affect a character stat (agility, intelligence, ...) in Applied Mode.&lt;br /&gt;
&lt;br /&gt;
This command works like a [[ProgressionEvents#StatsOp|Stats Operation]]. No aim or Target needs to be declared.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
  &amp;lt;str value=&amp;quot;-0.1*Actor:GetSkillValue(50)&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;agi value=&amp;quot;-0.1*Actor:GetSkillValue(46)&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;end value=&amp;quot;-0.1*Actor:GetSkillValue(48)&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;cha value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;int value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;wil value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TeleportOp==&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;teleport aim=&amp;quot;Target&amp;quot; sector=&amp;quot;bdroad2&amp;quot; x=&amp;quot;-178.17&amp;quot; y=&amp;quot;48.19&amp;quot; z=&amp;quot;551.82&amp;quot; instance=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TeleportDungeonOp ==&lt;br /&gt;
Is a teleport operation for a named procedural dungeon. It finds dungeon position by name asking DungeonSpawnManager&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;teleportdungeon aim=&amp;quot;Actor&amp;quot; name=&amp;quot;dungeon1&amp;quot; background=&amp;quot;&amp;quot; delay=&amp;quot;1&amp;quot; x1=&amp;quot;0&amp;quot; y1=&amp;quot;0&amp;quot; x2=&amp;quot;0&amp;quot; y2=&amp;quot;0&amp;quot; widget=&amp;quot;warp&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TraitOp ==&lt;br /&gt;
Used to create a change in character traits.&lt;br /&gt;
This is used to change a character&#039;s appearance live in game.&lt;br /&gt;
It takes the trait ID number and sends a broadcast out to all the players in range about the change.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;trait value=&amp;quot;#&amp;quot;/&amp;gt;&lt;br /&gt;
  value = &amp;quot;#&amp;quot; index id key into traits table&lt;br /&gt;
Examples:&lt;br /&gt;
You apply trait 100 (grey hair) to actor and send message:&lt;br /&gt;
  &amp;lt;trait value=&amp;quot;100&amp;quot; /&amp;gt;&amp;lt;msg aim=&amp;quot;actor&amp;quot; text=&amp;quot;You drop the liquid on your hair.&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TutorialMsgOp==&lt;br /&gt;
TutorialMsgOp activates a tutorial window on the client with the specified message. The message is taken from tips table in the database.&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;tutorialmsg aim=&amp;quot;Target&amp;quot; num=&amp;quot;TutorialTipID&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==VariableSetOp ==&lt;br /&gt;
This is permanent. Note that if the variable is set already it will be overwritten.&lt;br /&gt;
&lt;br /&gt;
Example: \&amp;lt;variable aim=&amp;quot;Actor&amp;quot; name=&amp;quot;LOVEDBYKLYROS&amp;quot; value=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the variable LOVEDBYKLYROS and sets it&#039;s value to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==VariableUnSetOp==&lt;br /&gt;
Example: &amp;lt;variable aim=&amp;quot;Actor&amp;quot; name=&amp;quot;LOVEDBYKLYROS&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
unset the variable LOVEDBYKLYROS&lt;br /&gt;
==VitalOp==&lt;br /&gt;
imperative mana &amp;amp; stamina, but not HP&lt;br /&gt;
&lt;br /&gt;
Example: &amp;lt;mana aim=&amp;quot;Caster&amp;quot; value=&amp;quot;-5&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==VitalAOp==&lt;br /&gt;
Change the vital statistics (HP, Mana, ... but not Hit Points) of a character in Applied mode.&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
  &amp;lt;mana-rate     value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;pstamina-rate value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;mstamina-rate value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;hp-max        value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;mana-max      value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;pstamina-max  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
  &amp;lt;mstamina-max  value=&amp;quot;...&amp;quot;/&amp;gt; or&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;value&#039;&#039;&#039; = &amp;quot;...&amp;quot; a mathscript defined value.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
Increase the Actor vitals by 10 points:&lt;br /&gt;
  &amp;lt;mana-rate     value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pstamina-rate value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;mstamina-rate value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;hp-max        value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;mana-max      value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;pstamina-max  value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;mstamina-max  value=&amp;quot;10&amp;quot;/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [[Category:Engine documents]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Config_Races&amp;diff=24970</id>
		<title>Config Races</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Config_Races&amp;diff=24970"/>
		<updated>2025-06-27T20:12:19Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Add new race */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Add new race ==&lt;br /&gt;
&lt;br /&gt;
Adding a new entry in [[Race infoTable]]&lt;br /&gt;
&lt;br /&gt;
Adding a new entry in [[Race spawnsTable|Race spawnTable]]&lt;br /&gt;
&lt;br /&gt;
Add special loot in [[Loot rulesTable|Loot rules Table]] and [[Loot rule detailsTable|Loot rules details Table]]&lt;br /&gt;
&lt;br /&gt;
== Configure a race ==&lt;br /&gt;
&lt;br /&gt;
Change the base mesh:&lt;br /&gt;
* [[Race infoTable|race_info]].cstr_mesh (example &amp;quot;ylianm&amp;quot;) has to match with the Content/Blueprints or Content/Blueprints/Npcs where we search an actor BP with name &amp;lt;mesh&amp;gt;Character, (example &amp;quot;ylianmCharacter&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Change the texture variation:&lt;br /&gt;
* The [[Race infoTable|race_info]].cstr_base_texture (example &amp;quot;Trepor3&amp;quot;) needs an entry in DataTable&#039;/Game/data/dt_textures.dt_textures&#039; pointing to the actual MaterialInstance in Unreal&lt;br /&gt;
&lt;br /&gt;
Change starting stats:&lt;br /&gt;
* The [[Race infoTable|race_info]].start_* fields contain the values used&lt;br /&gt;
&lt;br /&gt;
Change the regeneration for mental and physical stamina:&lt;br /&gt;
* The [[Race infoTable|race_info]].base_* fields contain the values used&lt;br /&gt;
&lt;br /&gt;
Change Default Armor and Weapons:&lt;br /&gt;
* NOTE: Should be used only for monsters, used if no other armor or weapon is worn/wielded&lt;br /&gt;
* [[Race infoTable|race_info]].armor_id and weapon_id are pointing to a valid [[ItemStatsTable|item_stats]].id item&lt;br /&gt;
&lt;br /&gt;
Change Scale of the character:&lt;br /&gt;
* [[Race infoTable|race_info]].scale field contain the value used&lt;br /&gt;
&lt;br /&gt;
Change the Speed of the character:&lt;br /&gt;
* The [[Race infoTable|race_info]].speed_* fields contain the values used for the different stances&lt;br /&gt;
&lt;br /&gt;
Change the type of skin to react in combat:&lt;br /&gt;
* The [[Race infoTable|race_info]].skin_type. Used to determine sound when hitting this creature&lt;br /&gt;
&lt;br /&gt;
Change the max height of step allowed:&lt;br /&gt;
* UEEditor-&amp;gt;CharacterBP-&amp;gt;CharacterMovement-&amp;gt;Walking-&amp;gt;Max Step Height&lt;br /&gt;
&lt;br /&gt;
Change the character bounding box:&lt;br /&gt;
* UEEditor-&amp;gt;CharacterBP-&amp;gt; Change the size of the Capsule component. used for all collisions&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Foliage&amp;diff=24969</id>
		<title>PSUnreal Foliage</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PSUnreal_Foliage&amp;diff=24969"/>
		<updated>2025-06-26T21:38:10Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== Lights settings ===&lt;br /&gt;
Set all foliage to Moveable&lt;br /&gt;
&lt;br /&gt;
=== Culling settings ===&lt;br /&gt;
Depending on the size of the foliage we have standard culling distances&lt;br /&gt;
&lt;br /&gt;
Flowers and small plants: 50 meters&lt;br /&gt;
&lt;br /&gt;
Bushes: 100 meters&lt;br /&gt;
&lt;br /&gt;
Trees: 500 meters (for now, let&#039;s see how much they pop)&lt;br /&gt;
&lt;br /&gt;
=== Procedural Foliage Volume ===&lt;br /&gt;
To work it needs the Collision setting to be set as &amp;quot;OverlapAllDynamic&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
But then it needs to be set as &amp;quot;NoCollision&amp;quot; or in game we will have issues on dropping items.&lt;br /&gt;
&lt;br /&gt;
WARNING: When you generate foliage a new instanced foliage object is created, and it&#039;s created at 0 0 0 by default. This increases the Level Boundaries by much and causes the level to be loaded by streaming levels based on the wrong boundaries. The way to fix it is to:&lt;br /&gt;
&lt;br /&gt;
* Open the single sublevel, not the whole persistent level&lt;br /&gt;
* Go in foliage mode&lt;br /&gt;
* select all foliage with the lasso tool&lt;br /&gt;
* go in Select mode&lt;br /&gt;
* select the InstanceFoliage object and move it within the boundaries of the level&lt;br /&gt;
* Go in foliage mode&lt;br /&gt;
* All foliage is still selected, and you just move it by a bit (any amount), then press CTRL-Z. Incredibly enough the CTR-Z set the position of the foliage where is should have been!&lt;br /&gt;
* Reopen the persistent level and load in the sublevel you modified, you will see the request to save as it&#039;s modified, save it.&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift2D&amp;diff=24968</id>
		<title>PlaneShift2D</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift2D&amp;diff=24968"/>
		<updated>2025-06-11T11:23:06Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* 1998 - Stopped */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==1992 - The inception==&lt;br /&gt;
&lt;br /&gt;
Back in 1992, [[Luca Pancallo]] was playing to a lot of text MUDs (Multi User Dungeon) games trying to conciliate the love for computer games RPGs (like the stunning Eye of the Beholder) and the new power of the internet. MUDs were a good start and usually nice to play, but he felt those were all lacking a lot for background, roleplay and generally consistency that could bring the realism of the virtual world to new heights. (I remember a fantasy text MUD with microwave ovens attacking you :) ). In addition he really wanted to add some graphics to this kind of game to have a more immersive experience. From this need PlaneShift 2D was born.&lt;br /&gt;
&lt;br /&gt;
The basic idea was to get the server technology used by MUDs (mainly LPC language) and add on top of it a graphical interface, plus adding a great background with well thought races and places.&lt;br /&gt;
&lt;br /&gt;
Luca started to download all kinds of MUD engines and to modify them to his needs, studying them to see which one could be the best to use for PlaneShift.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==1994 - The first team==&lt;br /&gt;
&lt;br /&gt;
[[Image:PS2D-1.jpg|right|thumb|400px|Client main page]]&lt;br /&gt;
Apart from programmers at least 2 people were needed, 1 talented artist and 1 storyteller.&lt;br /&gt;
&lt;br /&gt;
For the 3D artist there was no doubts, an old friend of high-school (Stefano Oggeri) was the perfect guy, rpg-lover and 3d gfx addicted. At that time he was working mainly with POVRay and the first versions of 3dstudio. But the final results were already quite stunning. He joined immediately the project.&lt;br /&gt;
&lt;br /&gt;
For setting, Luca found Mauro Zanetti, an active rpg gamer and organizer of many fantasy related events in our country (Italy). They met inside an pen and paper rpg club, and Luca proposed him to join. He was eager to help and in few weeks he joined the project.&lt;br /&gt;
&lt;br /&gt;
Searching amongst friends of friends, Luca found Danilo Moretti, a talented 2D artist that joined the project as concept artists, creating all races and many nice views of Yliakum.&lt;br /&gt;
&lt;br /&gt;
The first team was born and really made of talented people. Stefano started to create amazing pictures of the world and Mauro wrote the basics of the underground world, detailing the races and the places you can still find today in PlaneShift 3D.&lt;br /&gt;
&lt;br /&gt;
The programming side was handled by Luca, adding new functions on top of an already existing LPC engine, and building a C++ graphical interface to support the user interaction with the world.&lt;br /&gt;
&lt;br /&gt;
The main idea was to have a 3d rendered (still) image for each of the locations and a minimap guiding you in the world. Plus a list of NPCs and other players that were in the same location.&lt;br /&gt;
&lt;br /&gt;
Below [now on the right,] there is a pic of the client&#039;s main page. On the top left there were the button to access the other screens, on the left the minimap, created automatically. At the center the screen that will visualize the various places visited, on the right, a list of characters present in the same location. On the bottom all text written by player and received by server.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==1996 - The first official public exposure==&lt;br /&gt;
&lt;br /&gt;
[[Image:PS2D-3.jpg|right|thumb|400px|The working client main page]]&lt;br /&gt;
When the client was &amp;quot;nearly&amp;quot; working, we started to see if someone was interested in it. The first contact was with Galactica, a big internet and content provider. They were amazed by our idea, and we managed to participate with them to the most important computer expo in Italy (SMAU &#039;96).&lt;br /&gt;
&lt;br /&gt;
We were very excited about the expo, and we worked around the clock the week before the event, to have a working client with good and playable content.&lt;br /&gt;
&lt;br /&gt;
On the expo we had a main server machine and few clients were visitors could connect and play. For the expo the interfaces ready were the main screen and the inventory screen (see on the right)&lt;br /&gt;
&lt;br /&gt;
You can see how the art of the characters is basically the same as today!&lt;br /&gt;
[[File:Ps2d 3.jpg|thumb|401x401px|Inventory]]&lt;br /&gt;
  	&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
 &lt;br /&gt;
==1997 - Another expo!==&lt;br /&gt;
&lt;br /&gt;
[[Image:PS2D-4.jpg|right|thumb|400px|The skills screen]]&lt;br /&gt;
Given the great public response for the client, we decided to go commercial, searching a contract. We found a company interested in the deal, one of the biggest communication companies in Italy. They decided to invest in our project, and we asked them to be present at the same computer expo in 1997.&lt;br /&gt;
&lt;br /&gt;
Meanwhile we managed to add new screens and features to the game, like the skills one:&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;
&lt;br /&gt;
If you search on the web you can probably still find the old web page somewhere. Anyway we provide one here for your nostalgic enjoyment. The web site was completely in italian (try to read it with some web translator). The page is around 1998, one of the last seen online for the PlaneShift 2D project.&lt;br /&gt;
[[File:Old Mud Page banner.png|none|thumb|400x400px]]&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==1998 - Stopped==&lt;br /&gt;
&lt;br /&gt;
Around 1998 we were trying to finalize the commercial contract for the game, but a major problem hit the company we were speaking to. Basically all the top and middle level management of the entertainment section was changed and the new ones were so busy in reshaping the company that really didn&#039;t care about PlaneShift. We tried to wait a few months to see if something would change, but nothing happened. The hit was big, also because many of us were in the right age to plan their future, and so each took a different direction, no more related to PlaneShift. The project was stopped completely, no one single line of code written after that date.&lt;br /&gt;
&lt;br /&gt;
The pain on each of us was big, everyone saw that was the way to go, the game of the future, the place to invest money and efforts. But none of us was rich or crazy enough to start a company for it.&lt;br /&gt;
&lt;br /&gt;
  	 &lt;br /&gt;
==2000 - Something new, something old==&lt;br /&gt;
&lt;br /&gt;
PlaneShift never left the heart of Luca, that after some distractions, decided to restart the PlaneShift project, with a stronger organization, an internet wide team, and no more commercial tricks. Graphical 2D MUDs were spreading, but still not very exciting, PS 2D was still a lot better in comparison. 3D games were the major new wave of entertainment on the internet, and this was immediately taken as the new direction of the project.&lt;br /&gt;
&lt;br /&gt;
All the ideas and background created for the old project could be reused and the will to create a realistic virtual world were people could have fun and create their &amp;quot;other&amp;quot; living was even stronger than before. The new gfx hardware could provide a great new level of impersonation and the vision for the new game was ready.&lt;br /&gt;
&lt;br /&gt;
PlaneShift 3D was born!&lt;br /&gt;
&lt;br /&gt;
The rest is part of present history, and you can read it in the ps news web pages.&lt;br /&gt;
&lt;br /&gt;
Why we wrote this? Well, basically to let you know a bit more of our roots, that surely still affects today our beliefs and our development spirit.&lt;br /&gt;
&lt;br /&gt;
Hope you enjoyed it! Let&#039;s make PlaneShift the game it deserves to be!&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Old_Mud_Page_banner.png&amp;diff=24967</id>
		<title>File:Old Mud Page banner.png</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Old_Mud_Page_banner.png&amp;diff=24967"/>
		<updated>2025-06-11T11:22:01Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The old page of PlaneShift 2D Mud&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Ps2d_3.jpg&amp;diff=24966</id>
		<title>File:Ps2d 3.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Ps2d_3.jpg&amp;diff=24966"/>
		<updated>2025-06-11T11:17:13Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ps 2d inventory&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift&amp;diff=24965</id>
		<title>PlaneShift</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift&amp;diff=24965"/>
		<updated>2025-06-11T11:12:20Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Azure Spirit (0.6) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PlaneShift is a Massively Multiplayer Online Role Playing Game immersed in a 3D virtual fantasy world which is FULLY FREE to play. There are no limitations in skills, ranks, abilities, items you can gain with your free account; no time limits; no locked premium content or additional constraints. Servers and bandwidth are donated by sponsors. The developers, Atomic Blue, are a group of RPG enthusiasts whose efforts and contributions are voluntary, not paid.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At the present state of development, PlaneShift is not a complete game, but it has all the systems needed for enjoyable play, including combat, magic, crafting, quests and detailed settings. A downloadable client program allows you to to immerse your character in vibrant 3D surroundings. Today you can explore the virtual world, interact with other players or with server controlled creatures, fight monsters, cast spells, solve quests and puzzles, improve your character, gain magical items, craft new items and more. The game is still under heavy development, so you may easily find bugs, glitches and missing features. Our model is to keep the game open for the public, so you can give feedback on the features you want us to develop and help shape the future of the game. We are working to create an interactive world with politics and an economy, and improve the artificial intelligence of server-controlled non-player-characters that bring our world to life!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our virtual domain is persistent, and this means you can connect to it at any hour of the day and you will always find players and NPCs wandering our realms. Your character and progress is stored on the server, so you never have to worry about saving the game. A player can start from humble beginnings and advance to greatness in whatever path they may choose.&lt;br /&gt;
&lt;br /&gt;
Remember that PlaneShift is a Role Playing Game - be sure to read our Roleplay guidelines! We think the RPG part of the MMORPG definition has a meaning!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PlaneShift is Open Source for the client and server code, so anyone can contribute to its development! If you want to help, see how to join our team [http://www.planeshift.it/Join%20Us here], or consider making a [http://www.planeshift.it/Donate donation].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Idea and previous history==&lt;br /&gt;
The history of PlaneShift before it became 3D is described in [[PlaneShift2D]].&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
&lt;br /&gt;
===[[Atomic Blue]] (0.1)===&lt;br /&gt;
The very first PlaneShift version.&lt;br /&gt;
&lt;br /&gt;
2 May 2002&lt;br /&gt;
&lt;br /&gt;
===[[Molecular Blue]] (0.2)===&lt;br /&gt;
The second version of PlaneShift.&lt;br /&gt;
&lt;br /&gt;
7 March 2003&lt;br /&gt;
&lt;br /&gt;
===[[Crystal Blue]] (0.3)===&lt;br /&gt;
Tria is now the new currency. Ojaveda is born and the first Dsar, Akkaio, is added as home of all Enkidukai. Over the course of development the first craftings are introduced.&lt;br /&gt;
&lt;br /&gt;
24 December 2004&lt;br /&gt;
&lt;br /&gt;
===[[Steel Blue]] (0.4)===&lt;br /&gt;
Gugrontid the home town of Kran was added.&lt;br /&gt;
&lt;br /&gt;
3 March 2008&lt;br /&gt;
&lt;br /&gt;
===[[Arcane Chrysalis]] (0.5)===&lt;br /&gt;
late 2009&lt;br /&gt;
&lt;br /&gt;
===[[Azure Spirit]] (0.6)===&lt;br /&gt;
Last PSLegacy version. Male [[Nolthrir]] model and 11 new [[Ingame_Help#Magic.2C_Glyphs_and_Spells|spells]] were added; a new map, a new creature and many platinum-steel weapons ([[crafting]]) are now available; many [[NPC]] behaviours were updated (so newly created characters will not be attacked by relatively weak, but aggressive, NPCs able to kill them).&lt;br /&gt;
&lt;br /&gt;
November 2013&lt;br /&gt;
&lt;br /&gt;
=== PSunreal (0.7) ===&lt;br /&gt;
Current version of the game redone with Unreal Engine.&lt;br /&gt;
&lt;br /&gt;
Internal only: May 10th 2020&lt;br /&gt;
&lt;br /&gt;
Distributed to limited users: November 25th 2020&lt;br /&gt;
&lt;br /&gt;
==Game features==&lt;br /&gt;
The following list represents some of the features of the final product. Please remember that today PlaneShift is still under heavy development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 10 playable races with unique traits!&lt;br /&gt;
* Unlimited professions through a skill system&lt;br /&gt;
* Original magic system with six Ways of magic&lt;br /&gt;
* Hundreds of spells&lt;br /&gt;
* Numerous huge worlds to explore&lt;br /&gt;
* A great number of quests to test your wit and skill&lt;br /&gt;
* Monsters and NPCs with good AI that produce game events&lt;br /&gt;
* A world that evolves with or without player interaction&lt;br /&gt;
* Own your guild house&lt;br /&gt;
* Politics and economy&lt;br /&gt;
* ... and much much more!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History|!]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift&amp;diff=24964</id>
		<title>PlaneShift</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift&amp;diff=24964"/>
		<updated>2025-06-10T19:05:24Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Arcane Chrysalis (0.5) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PlaneShift is a Massively Multiplayer Online Role Playing Game immersed in a 3D virtual fantasy world which is FULLY FREE to play. There are no limitations in skills, ranks, abilities, items you can gain with your free account; no time limits; no locked premium content or additional constraints. Servers and bandwidth are donated by sponsors. The developers, Atomic Blue, are a group of RPG enthusiasts whose efforts and contributions are voluntary, not paid.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At the present state of development, PlaneShift is not a complete game, but it has all the systems needed for enjoyable play, including combat, magic, crafting, quests and detailed settings. A downloadable client program allows you to to immerse your character in vibrant 3D surroundings. Today you can explore the virtual world, interact with other players or with server controlled creatures, fight monsters, cast spells, solve quests and puzzles, improve your character, gain magical items, craft new items and more. The game is still under heavy development, so you may easily find bugs, glitches and missing features. Our model is to keep the game open for the public, so you can give feedback on the features you want us to develop and help shape the future of the game. We are working to create an interactive world with politics and an economy, and improve the artificial intelligence of server-controlled non-player-characters that bring our world to life!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our virtual domain is persistent, and this means you can connect to it at any hour of the day and you will always find players and NPCs wandering our realms. Your character and progress is stored on the server, so you never have to worry about saving the game. A player can start from humble beginnings and advance to greatness in whatever path they may choose.&lt;br /&gt;
&lt;br /&gt;
Remember that PlaneShift is a Role Playing Game - be sure to read our Roleplay guidelines! We think the RPG part of the MMORPG definition has a meaning!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PlaneShift is Open Source for the client and server code, so anyone can contribute to its development! If you want to help, see how to join our team [http://www.planeshift.it/Join%20Us here], or consider making a [http://www.planeshift.it/Donate donation].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Idea and previous history==&lt;br /&gt;
The history of PlaneShift before it became 3D is described in [[PlaneShift2D]].&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
&lt;br /&gt;
===[[Atomic Blue]] (0.1)===&lt;br /&gt;
The very first PlaneShift version.&lt;br /&gt;
&lt;br /&gt;
2 May 2002&lt;br /&gt;
&lt;br /&gt;
===[[Molecular Blue]] (0.2)===&lt;br /&gt;
The second version of PlaneShift.&lt;br /&gt;
&lt;br /&gt;
7 March 2003&lt;br /&gt;
&lt;br /&gt;
===[[Crystal Blue]] (0.3)===&lt;br /&gt;
Tria is now the new currency. Ojaveda is born and the first Dsar, Akkaio, is added as home of all Enkidukai. Over the course of development the first craftings are introduced.&lt;br /&gt;
&lt;br /&gt;
24 December 2004&lt;br /&gt;
&lt;br /&gt;
===[[Steel Blue]] (0.4)===&lt;br /&gt;
Gugrontid the home town of Kran was added.&lt;br /&gt;
&lt;br /&gt;
3 March 2008&lt;br /&gt;
&lt;br /&gt;
===[[Arcane Chrysalis]] (0.5)===&lt;br /&gt;
late 2009&lt;br /&gt;
&lt;br /&gt;
===[[Azure Spirit]] (0.6)===&lt;br /&gt;
Last PSLegacy version. Male [[Nolthrir]] model and 11 new [[Ingame_Help#Magic.2C_Glyphs_and_Spells|spells]] were added; a new map, a new creature and many platinum-steel weapons ([[crafting]]) are now available; many [[NPC]] behaviours were updated (so newly created characters will not be attacked by relatively weak, but aggressive, NPCs able to kill them).&lt;br /&gt;
&lt;br /&gt;
=== PSunreal (0.7) ===&lt;br /&gt;
Current version of the game redone with Unreal Engine.&lt;br /&gt;
&lt;br /&gt;
==Game features==&lt;br /&gt;
The following list represents some of the features of the final product. Please remember that today PlaneShift is still under heavy development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 10 playable races with unique traits!&lt;br /&gt;
* Unlimited professions through a skill system&lt;br /&gt;
* Original magic system with six Ways of magic&lt;br /&gt;
* Hundreds of spells&lt;br /&gt;
* Numerous huge worlds to explore&lt;br /&gt;
* A great number of quests to test your wit and skill&lt;br /&gt;
* Monsters and NPCs with good AI that produce game events&lt;br /&gt;
* A world that evolves with or without player interaction&lt;br /&gt;
* Own your guild house&lt;br /&gt;
* Politics and economy&lt;br /&gt;
* ... and much much more!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History|!]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Arcane_Chrysalis&amp;diff=24963</id>
		<title>Arcane Chrysalis</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Arcane_Chrysalis&amp;diff=24963"/>
		<updated>2025-06-10T19:04:04Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Chrysalis splashfinal 1024.jpg|none|thumb]]&lt;br /&gt;
The fifth version of [[PlaneShift]], &#039;&#039;&#039;Arcane Chrysalis&#039;&#039;&#039;, was released in late 2009. &amp;lt;br&amp;gt;&lt;br /&gt;
=Changelog=&lt;br /&gt;
==New Features==&lt;br /&gt;
*Support for single-player minigames.&lt;br /&gt;
*Minigames now report feedback to the watchers when moves are made.&lt;br /&gt;
*Minigames can now have various boards (White, Black: Plain, Checked)&lt;br /&gt;
*You can now change the colour of Text, Lines and Curves in Sketches.&lt;br /&gt;
*You now enter a special NPC Camera Mode when talking to NPCs.&lt;br /&gt;
*New /drop command. You can drop items, money and specify &amp;quot;all&amp;quot; to drop all items of the same kind.&lt;br /&gt;
*You can specify &amp;quot;noguard&amp;quot; to /drop commands to drop items unguarded.&lt;br /&gt;
*You can use /guard on/off on items to guard/unguard them.&lt;br /&gt;
*You may now need a certain skill (and rank) for picking up items.&lt;br /&gt;
*You can now optionally be notified on guildmember login/out.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Art==&lt;br /&gt;
*New additions to the Winch map.&lt;br /&gt;
*A new leather armour for Nolthrir females.&lt;br /&gt;
*A new relighted version of the Akkaio map, because of some problems players had with the road to Ojaveda.&lt;br /&gt;
*New icons for the Sketch Window.&lt;br /&gt;
*A better rotating wheel in the sewers.&lt;br /&gt;
*Fixed many spell effects to work on all supported operating systems.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Settings==&lt;br /&gt;
*Huge number of Settings related bugs closed. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Changes That Have Been Made==&lt;br /&gt;
====Engine====&lt;br /&gt;
*PlaneShift now uses the latest version of the 1.4 branch of the [[CrystalSpace|Crystal Space]] 3D Engine.&lt;br /&gt;
*Renamed the updater function CheckIntegrity to --repair.&lt;br /&gt;
*Improved server threading.&lt;br /&gt;
*Various other work.&lt;br /&gt;
====Commands====&lt;br /&gt;
*/show_gm -&amp;gt; /show gm&lt;br /&gt;
*/show_active_magic -&amp;gt; /show activemagic&lt;br /&gt;
*/petition_manage &amp;gt; /managepetitions&lt;br /&gt;
*/advisor_list -&amp;gt; /advisor list&lt;br /&gt;
*/advisormode -&amp;gt; /advisor on/off&lt;br /&gt;
*/list_advice_requests -&amp;gt; /advisor requests&lt;br /&gt;
*/advisormode listsessions -&amp;gt; /advisor sessions&lt;br /&gt;
*/advisor -&amp;gt; /help&lt;br /&gt;
*/petition_list -&amp;gt; /show petition&lt;br /&gt;
*/target_context -&amp;gt; /targetcontext&lt;br /&gt;
*/who will now filter for more than one word (&amp;quot;/who game master&amp;quot;)&lt;br /&gt;
====Chat====&lt;br /&gt;
*All chat types, except chat going to the Main and System tabs, have brackets like [Guild] or [Tell] in the chat logs.&lt;br /&gt;
*Option to display those brackets in-game as well.&lt;br /&gt;
*Options to mix text colours, so for example the colour of whatever chat action you&#039;re using is mixed with your own default &amp;quot;my chat&amp;quot; colour.&lt;br /&gt;
*The colour of your own sent chat is configurable.&lt;br /&gt;
*Configurable NPC chat colour.&lt;br /&gt;
*&amp;quot;X tells group: y&amp;quot; -&amp;gt; &amp;quot;X says: y&amp;quot;&lt;br /&gt;
*&amp;quot;Guildchat from x: y&amp;quot; -&amp;gt; &amp;quot;X says: y&amp;quot;&lt;br /&gt;
*&amp;quot;Auction from X: y&amp;quot; -&amp;gt; &amp;quot;X auctions: y&amp;quot;&lt;br /&gt;
*The usage of /me, /my and the usage of those actions within other actions (like /shout or /auction) is now consistent through chatbubbles, chatwindow and logs.&lt;br /&gt;
====GMs and Devs====&lt;br /&gt;
GMs vs. Items:&lt;br /&gt;
*GMs can now use /modify to change the transient(disappears after some time when dropped) flag of an item.&lt;br /&gt;
*You can now make items unpickable using /modify.&lt;br /&gt;
*Added /target_name for GM1 and higher to report the names of all targeted items.&lt;br /&gt;
*Using the :area: syntax on a command pops up a window asking if you want to continue.&lt;br /&gt;
*&amp;lt;nowiki&amp;gt;:Area: (apply command to all entities within area) syntax now available for GM2 and up.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*If you want to pickup non-pickable items with :area:, specify pickupall.&lt;br /&gt;
*GMs can now use /unstackable to (dis)allow stacking of items.&lt;br /&gt;
*GMs can now teleport items though instances.&lt;br /&gt;
*GM2 and up can become guardians of all items, whether guarded or not.&lt;br /&gt;
GMs vs. Players:&lt;br /&gt;
*/setskill now shows to the GM and the player what skills where changed and from what value to what value.&lt;br /&gt;
*With /setskill you can use the addition &amp;quot;-1&amp;quot; to get the base skills of a player.&lt;br /&gt;
*GMs can now use /quest on offline players.&lt;br /&gt;
*GMs can now unassign themselves from petitions.&lt;br /&gt;
*GMs can now enable or disable quests with /disablequest.&lt;br /&gt;
*/marriageinfo now also works on offline players.&lt;br /&gt;
*You can now teleport players to another instance by adding &amp;quot;there&amp;quot; to the teleport command.&lt;br /&gt;
*If you give a stack to a player with /giveitem, it will show the amount given.&lt;br /&gt;
*You can now award unlimited experience instead of max 100 PP as before.&lt;br /&gt;
GMs vs. NPCs:&lt;br /&gt;
*You can now teleport to an NPC by only specifying the first name.&lt;br /&gt;
*You can now use /killnpc with PIDs again.&lt;br /&gt;
*NPCs can now be teleported while NPCclient is active again.&lt;br /&gt;
*Devs can use /updaterespawn again to change the spawning location of NPCs and across instances.&lt;br /&gt;
GMs vs. Various Stuff:&lt;br /&gt;
*GM3 can now morph themselves, but not others.&lt;br /&gt;
*When you morph yourself, your description will also be updated to reflect the race.&lt;br /&gt;
*Many admin commands standardized to work with the default command syntaxes which can be found in help.xml&lt;br /&gt;
====Various====&lt;br /&gt;
*Removing a player from a guild now shows who removed the player.&lt;br /&gt;
*You can now access the Bag window by using a key, default &amp;quot;v&amp;quot;.&lt;br /&gt;
*Dying in the Death Realm will no longer reset mana to 100%.&lt;br /&gt;
*Made the modding of various windows easier.&lt;br /&gt;
*Locking of chests now more secure.&lt;br /&gt;
*You can use the # symbol in shortcuts to make comments.&lt;br /&gt;
*You can no longer select a gender as Kran.&lt;br /&gt;
*You will no longer be able to hit NPCs like rats &amp;quot;on the helm&amp;quot;.&lt;br /&gt;
*Now bad words filtering is also applied to advice sessions.&lt;br /&gt;
*Instead of /add_ignore and /remove_ignore you now have the plain /ignore command, which toggles ignore status.&lt;br /&gt;
*If you add &amp;quot;add&amp;quot; or &amp;quot;remove&amp;quot; to the /ignore command, it will force that operation. Same behaviour for /buddy.&lt;br /&gt;
*Specifying no name will open up the ignore window.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==Bugs That Have Been Fixed==&lt;br /&gt;
*Characters&#039; hair will have colour again!&lt;br /&gt;
*Now you won&#039;t get invalid pets anymore if you created one when NPCclient was offline.&lt;br /&gt;
*Opening crates/chests does not crash the server anymore.&lt;br /&gt;
*Mana is now properly calculated when under the death penalty.&lt;br /&gt;
*Stamina no longer drops when standing still.&lt;br /&gt;
*Casting spells while running no longer increases stamina.&lt;br /&gt;
*Fixed a bug where weapons would degrade a lot if you repaired them.&lt;br /&gt;
*Fixed the annoying &amp;quot;Map not found!&amp;quot; bug.&lt;br /&gt;
*NPCs will no longer keep rotating/sliding after they&#039;ve been killed.&lt;br /&gt;
*Fixed a bug where players could end up in instance 0 after a relog even if they were in another before.&lt;br /&gt;
*Fixed a bug where your new position in the world wasn&#039;t saved after teleporting or being teleported.&lt;br /&gt;
*Fixed a bug where you wouldn&#039;t be able to trade after you challenged someone who then logged off.&lt;br /&gt;
*Fixed players crashing out of the game due to GMs morphing with active effects (like magic).&lt;br /&gt;
*Fixed a bug where you couldn&#039;t add items to a container even if the guardian was far away.&lt;br /&gt;
*Fixed an exploit where you could regenerate stamina while crafting.&lt;br /&gt;
*Fixed a bug where an NPC wouldn&#039;t respond to certain questions.&lt;br /&gt;
*Fixed garbled movement after using /loot.&lt;br /&gt;
*Your tells will not appear in the chatbubble of the person you&#039;re sending them to anymore.&lt;br /&gt;
*Fixed bogus &amp;lt;nowiki&amp;gt;* *&amp;lt;/nowiki&amp;gt; being added to /me actions used in /shout or /auction.&lt;br /&gt;
*Fixed the frames-per-second cap to actually work. This has some side-effects though, see new bugs Wink&lt;br /&gt;
*Many other bugs fixed Smiley&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Further Arcane Chrysalis Releases=&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=36923.0 Release 0.5.2] (2010)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=37453.0 Release 0.5.4] (2010)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=38839.0 Release 0.5.5] (2010)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=39183.0 Release 0.5.6] (2011)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=39581.0 Release 0.5.7] (2011)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=40481.0 Release 0.5.8] (2011)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=40781.0 Release 0.5.9] (2012)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=40869.0 Release 0.5.9.1] (2012)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=41069.0 Release 0.5.9.2] (2012)&lt;br /&gt;
*[http://www.hydlaaplaza.com/smf/index.php?topic=41180.0 Release 0.5.9.4] (2013)&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Chrysalis_splashfinal_1024.jpg&amp;diff=24962</id>
		<title>File:Chrysalis splashfinal 1024.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Chrysalis_splashfinal_1024.jpg&amp;diff=24962"/>
		<updated>2025-06-10T19:03:08Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Crystal_Blue&amp;diff=24961</id>
		<title>Crystal Blue</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Crystal_Blue&amp;diff=24961"/>
		<updated>2025-06-10T17:54:54Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Crystal Blue&#039;&#039;&#039; Is the code name for the third major release of [[PlaneShift]].&lt;br /&gt;
[[File:Cbsplash.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Screenshots ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cb1.jpg|North hydlaa path&lt;br /&gt;
Image:Cb2.jpg|Hydlaa Overview&lt;br /&gt;
Image:Cb3.jpg|Paths&lt;br /&gt;
Image:Cb4.jpg|Magic Shop&lt;br /&gt;
Image:shot_combat.jpg|Combat&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
==0.3.004==&lt;br /&gt;
{{Calendar|24|December|2004}}&lt;br /&gt;
* new [[CrystalSpace]] (3D graphics) engine&lt;br /&gt;
* using skeletal models and animations&lt;br /&gt;
* introducing magic&lt;br /&gt;
* introducing combat&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.005==&lt;br /&gt;
{{Calendar|~30|December|2004}}&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.006==&lt;br /&gt;
{{Calendar|22|January|2005}}&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.007==&lt;br /&gt;
{{Calendar|10|February|2005}}&lt;br /&gt;
&lt;br /&gt;
* Klyros model added.&lt;br /&gt;
* Added a set of items including food and loot items.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.010==&lt;br /&gt;
{{Calendar|18|May|2005}}&lt;br /&gt;
===Major User-Visible Features===&lt;br /&gt;
*New area of East Hydlaa is available (Jayose has been relocated). New NPCs will be added there soon.&lt;br /&gt;
*Character traits - current only 1 new elf skin. You can now customize the face of your char (dermorian only). Now that the feature is in place, we will add more faces for other chars as well.&lt;br /&gt;
*New crafting system - shields only at the moment&lt;br /&gt;
*New complete GUI skinning system&lt;br /&gt;
*One additional skin available thanks to Cherppow. (to change it, you can rename planeshift/art/skin/elves.zip into planeshift/art/skin/default.zip)&lt;br /&gt;
*New loading screens&lt;br /&gt;
*Added duel points and advisor points to skill window info displayed.&lt;br /&gt;
*Added some new button art to look better.&lt;br /&gt;
*Added duel-point penalty for spamming duel invites.&lt;br /&gt;
*Added command to see /duel_points&lt;br /&gt;
*You don&#039;t get skill practise for attacking other players now.&lt;br /&gt;
*Train icon added in the interaction menu with trainers&lt;br /&gt;
*Added /changeguildname&lt;br /&gt;
*German manual&lt;br /&gt;
*Message window will now no longer jump to the end when a message is added.&lt;br /&gt;
*/quit now prompts before quitting&lt;br /&gt;
*Added link to login page that shows where to register a new account.&lt;br /&gt;
*License of the package changed from PlaneShift Team to Atomic Blue.&lt;br /&gt;
&lt;br /&gt;
===Major User-Visible Fixes===&lt;br /&gt;
*A number of bug fixed on Hydlaa level.&lt;br /&gt;
*Updated/fixed some spell effects&lt;br /&gt;
*Fixed that you could freely PK players that were just joining the game&lt;br /&gt;
*Fixed that if you opened a window during autorun, you could run forever regardless of stamina.&lt;br /&gt;
*Fixed that when you died, you could still turn your remains with mouselook.&lt;br /&gt;
*When a character is attacked, its stance resets to &amp;quot;full defense&amp;quot;.&lt;br /&gt;
*Fixed that tab completition was sometimes changing chat command to /tell from e.g. /say.&lt;br /&gt;
*Fixed that when negative HP rates lowered HP to zero, the character was not killed.&lt;br /&gt;
*Fixed that vitals were not adjusted when they were at maximum value.&lt;br /&gt;
*This means that negative rates (e.g. spells) were not always applied.&lt;br /&gt;
&lt;br /&gt;
===Known bugs===&lt;br /&gt;
*Flickering of a rectangle region near the connection between hydlaa plaza and the new East Hydlaa map&lt;br /&gt;
*Pssetup may crash on some systems&lt;br /&gt;
*Chat sometimes doesn&#039;t scroll down to follow new text&lt;br /&gt;
*Using the &amp;quot;load all levels&amp;quot; option will give you some wrong textures here and there (example laanx temple).&lt;br /&gt;
&lt;br /&gt;
===Update===&lt;br /&gt;
{{Calendar|3|June|2005}}&lt;br /&gt;
* Laanx temple has been expanded adding a new room in the upper level.&lt;br /&gt;
* The sewers have been lit up a bit, and many torches have been added and fixed.&lt;br /&gt;
* Jayose library has been expanded, with new shelves types and more space to walk.&lt;br /&gt;
* We added few new faces variations for the Ynnwn male characters. You can see those new faces in the char creation.&lt;br /&gt;
* The game now supports the feature to add a description to any static object (like trees, statues, roads, stones, furniture, etc...). We just started using it, but you can right click on the book in the new room of laanx temple to get its description. We plan to add many descriptions to give more deepness to the background.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.011==&lt;br /&gt;
{{Calendar|4|August|2005}}&lt;br /&gt;
&lt;br /&gt;
* Unique treasure generation.&lt;br /&gt;
* Fine-tuning of the progression rules.&lt;br /&gt;
* New quest system.&lt;br /&gt;
* Visual fixes on Hydlaa level, and some additions to the magic shop.&lt;br /&gt;
* WIPE: all characters deleted.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.012==&lt;br /&gt;
{{Calendar|24|October|2005}}&lt;br /&gt;
===Features===&lt;br /&gt;
*Pets (familiars) added. New /pet command controls them.&lt;br /&gt;
*Frame rate limit added to Options. Frame rate limit is 62.5fps by default.&lt;br /&gt;
*Hair color for new characters can be changed. Existing characters will have to buy and use dye when it becomes available.&lt;br /&gt;
*Skills window has been reworked into categories. The category tab will blink if there is a skill available from the trainer.&lt;br /&gt;
*Gave GMs the ability to award XP for completing GM-created events.&lt;br /&gt;
*Right-click quick chat pop-up menu has been disabled.&lt;br /&gt;
*If you /use with an argument it wil assume you are trying to consume.&lt;br /&gt;
*/equip defaults to 1 item being used&lt;br /&gt;
*Support added for chained quests&lt;br /&gt;
*Some fixes so guild notes are actually usable:&lt;br /&gt;
** The gui now sends the targeted person&#039;s charcter id instead of your own, so it is possible to send notes.&lt;br /&gt;
** Private notes are only viewable by that character, and can be sent by any member of the guild. They are appended, not the best formatting, but it works for now.&lt;br /&gt;
*Creating a guild now has a confirmation dialog that explains the requirements.&lt;br /&gt;
*Re-wrote invite spam-blocker:&lt;br /&gt;
** Now only triggered on declines, so as to not block legitimate invites.&lt;br /&gt;
** Penalties now increase with each decline:&lt;br /&gt;
**# 1 min lockout&lt;br /&gt;
**# 5 min + warning&lt;br /&gt;
**# 10 min + 10 advisor point fine + 10 duel point fine, if duel spam + death&lt;br /&gt;
**# 30 point fine(s) + death + kick from server&lt;br /&gt;
** Penalties expire with gameplay time, and can be lowered by getting an accept from a player with no penalties and a enough advisor points.&lt;br /&gt;
** Penalty level is saved to the player&#039;s account entry in the database, so repeat offenders can&#039;t escape it. (relog resets to 3rd level)&lt;br /&gt;
*Enhancements to the looting system:&lt;br /&gt;
** Roll for loot enforcement: If a player in a group attempts to take instead of roll for any loot, the roll winner will be prompted to allow the action.&lt;br /&gt;
** Range restriction for rolling: Only group members within 30 meters (10 times normal loot range) can win a roll for loot.&lt;br /&gt;
*Implemented discard quest feature.&lt;br /&gt;
*/my command added&lt;br /&gt;
*Updater improved to be more efficient&lt;br /&gt;
*Add $target to shortcuts. Inserts the name of the player or object currently targeted into a command to replace each $target.&lt;br /&gt;
*Made it so if a spell -can- be cast on you (say, Life Infusion), and you have no target, it casts on yourself&lt;br /&gt;
*Improved NPC fighting behaviour so it&#039;s not cancelled by the server when the NPC leaves the range.&lt;br /&gt;
*Improved NPC navigation - they should hug walls less now.&lt;br /&gt;
*Add new icon to NPC right-click interact menu to chat to the NPC. Switches cursor to the chat window.&lt;br /&gt;
*Exiting the death realm now spawns you at your racial spawn point.&lt;br /&gt;
*/marriage command added&lt;br /&gt;
&lt;br /&gt;
===Bug Fixes===&lt;br /&gt;
*Various inventory and exchange bugs fixed where items could be lost.&lt;br /&gt;
*Fixed a bug where lacking a 0th shortcut would make the shortcut window have errors.&lt;br /&gt;
*Negative values for stats/skills at character creation are now checked for.&lt;br /&gt;
*Message versioning to prevent player stats jumping around due to out of order UDP&lt;br /&gt;
*It is now possible to strafe and rotate&lt;br /&gt;
*Name labels are updated when name is changed&lt;br /&gt;
*Guild labels are updated when guild is changed&lt;br /&gt;
*Fixed fall damage&lt;br /&gt;
*Fixed that new looted items were not accessible until inventory was opened.&lt;br /&gt;
*Re-enabled mouse run&lt;br /&gt;
*Fixed that it was possible to cast healing spells on a target with 100% HP.&lt;br /&gt;
*Add /die command to commit suicide. If used in a duel, you automatically yield.&lt;br /&gt;
*Fixed bug where trying to deequip while dead creates ghost item&lt;br /&gt;
*Fix for recent problem of users being unable to zone.&lt;br /&gt;
*Fix for bug that prevents the casting of a spell after it was interrupted.&lt;br /&gt;
*Training exploit fixed&lt;br /&gt;
*Fixed bug &amp;quot;During a guild war one guild yielded and the other 2 guild didn&#039;t get the Karma Points&amp;quot;.&lt;br /&gt;
*Fixed: complains at you if you try to cast Defensive Wind while targetting an enemy...saying it only can be cast on you. Made it cast such spells on you, regardless of what&#039;s targeted.&lt;br /&gt;
*Fixed bug that &amp;quot;Married to: xyz&amp;quot; was added again and again to your char desc when you edit it.&lt;br /&gt;
*Fixed bug that the character was not removed from his guild when it&#039;s deleted and you keep seeing it in the guild until the server is restarted.&lt;br /&gt;
*Fixed bug that players can start trading with other players without their permission and can annoy them in between fights etc.&lt;br /&gt;
*Various sound and music fixes&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.013==&lt;br /&gt;
{{Calendar|25|February|2006}}&lt;br /&gt;
===New Features===&lt;br /&gt;
*New mental and physical stamina system&lt;br /&gt;
*Many improvements to the GM system&lt;br /&gt;
*Multi-part and multi-path quests&lt;br /&gt;
*Many quest system improvements&lt;br /&gt;
*Added money to mini inventory window. (trades, etc)&lt;br /&gt;
*Some improvements to the GUI; simplified info window&lt;br /&gt;
*Added the ability for NPCs to use more animations&lt;br /&gt;
*Added more sound effects for actions&lt;br /&gt;
*Client now supports visible clothing/armor changes&lt;br /&gt;
*Client now supports customizable hair styles&lt;br /&gt;
*Updated in-game help to list all commands&lt;br /&gt;
*Right-click (by default) can now be used in all containers/inventories to view the item or a container&#039;s contents.&lt;br /&gt;
*Added font scaling option (set via setup)&lt;br /&gt;
*NPC dialogue now uses Wordnet, which will allow for more realistic communication&lt;br /&gt;
*Added snow support. Added rain support to Mac client.&lt;br /&gt;
*Labels will only show when in range to identify an object. (also helps performance by not drawing for far off objects) Dead objects now have red.&lt;br /&gt;
*New ban system which should keep greifers from just creating new accounts&lt;br /&gt;
*New mesh generation system to allow for more foliage in maps, some test one added to hydlaa and ojaroad&lt;br /&gt;
*New updater system, which doesn&#039;t download the repository unless it needs to. This will help the bandwidth of our servers and those with slower connections.&lt;br /&gt;
*Client can now automaticaly notify players when new updates are available, at the character selection screen.&lt;br /&gt;
*Many fixes for the crafting system. We are close to have it working for real.&lt;br /&gt;
&lt;br /&gt;
===Fixes===&lt;br /&gt;
*Fixes for /dequip command in shortcuts&lt;br /&gt;
*Various crash fixes (too many to list)&lt;br /&gt;
*Many performance fixes.&lt;br /&gt;
*Fixed weather and fog glitches/crashes&lt;br /&gt;
*Fixed exploit where people could logout mid-battle&lt;br /&gt;
*Temporarly removed advisor points scoring system to stop competitions. Advisor points are now on account, not on char.&lt;br /&gt;
*Many fixes to the sound system. Sounds should be much better, and play when they&#039;re supposed to. Switched to new renderer, which is more stable.&lt;br /&gt;
*Issues with skill window tabs&lt;br /&gt;
*Issues with using weapons with stat/skill requirements&lt;br /&gt;
*Could &amp;quot;complete&amp;quot; an empty trade&lt;br /&gt;
*Fixes to entity labels. Added command &amp;quot;/repaintlabels force&amp;quot; as a tool to repaint more severe problems if they still happen.&lt;br /&gt;
*Fixed darkness bug&lt;br /&gt;
*New map lighting system in CS, which should clear up a few lighting issues. All maps relighted&lt;br /&gt;
*Fixed various bugs in NPCclient making NPCs act strangely&lt;br /&gt;
*Made pets unattackable&lt;br /&gt;
*Fixes for character creation system&lt;br /&gt;
*Fixed bugs with stamina not working at certain times&lt;br /&gt;
*Many fixes related to items, inventories, and containers. Items shouldn&#039;t dissapear anymore, and weights should be handled without errors.&lt;br /&gt;
*Better working configuration of keys and mouse buttons&lt;br /&gt;
*Fixed many, many, memory leaks in both PS and CS. The client should be able to run without having to be restarted very often and should be more efficient in using memory.&lt;br /&gt;
*Disabled invites while dueling, to prevent using them as a distraction to cheat&lt;br /&gt;
*Changing weapons mid battle will make you skip a turn, to prevent some exploits&lt;br /&gt;
*Fixed chat history to not loose current line by accident&lt;br /&gt;
*Fixed bug where sound effects would try to load when sound was off&lt;br /&gt;
*/who will only show up to 30 players based on the given filter, to fix issues with showing too many&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.014==&lt;br /&gt;
{{Calendar|9|April|2006}}&lt;br /&gt;
===New Features===&lt;br /&gt;
*New items, new armor skins.&lt;br /&gt;
*Support for armors that require a different armor model (think spiky armor)&lt;br /&gt;
*More GM system improvements (ex: GMs are now invisible by default)&lt;br /&gt;
*Weather system improvements (ex: can now fade in all spiffy-like)&lt;br /&gt;
*New tutorial system. Will now give help the first time you do new things.&lt;br /&gt;
*New proximity-based NPC dialogue system. NPCs can now be made to talk to you automatically when you move close to them.&lt;br /&gt;
*NPCs can now talk publicly, instead of only in /tells.&lt;br /&gt;
*Added &amp;quot;/screenshot nogui&amp;quot; feature to take clean shots, ignoring onscreen stuff.&lt;br /&gt;
*Glyphs now need to be repurified for new owners.&lt;br /&gt;
*Will now send notification on training from mining/crafting/etc.&lt;br /&gt;
*New options window in the updater to make setup easier&lt;br /&gt;
*Additions to the pet system&lt;br /&gt;
*Elves GUI set to default, just to show it to the ones that never tried it.&lt;br /&gt;
&lt;br /&gt;
===Fixes===&lt;br /&gt;
*Fixes to the marriage system&lt;br /&gt;
*Fixed crash loading into a bad location&lt;br /&gt;
*Fixed an exploit where weakness could be used on someone to make them drop items&lt;br /&gt;
*Crafting system fixes; it should be ready soon&lt;br /&gt;
*Fixed bug where NPCs could spawn without full health&lt;br /&gt;
*Weather system fixes&lt;br /&gt;
*Fixed pet cloning bugs&lt;br /&gt;
*Fixes to name label alignments&lt;br /&gt;
*Updater self-updating is now back on&lt;br /&gt;
*Fixed a rare bug giving a 1 HP max&lt;br /&gt;
*Fixed tooltips not disappearing correctly&lt;br /&gt;
*Fixed an exploit in the pet name changing that could crash the server&lt;br /&gt;
*Turned spam-protection on for trade invites&lt;br /&gt;
*Fixed a bug cutting off long names in the buddy list&lt;br /&gt;
*Fixed a few updater bugs/crashes&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.014b==&lt;br /&gt;
{{Calendar|13|April|2006}}&lt;br /&gt;
*Fixed darkness in sewers&lt;br /&gt;
*Added more items to Harnquist smith shop and to Levrus alchemy laboratory for future crafting usage.&lt;br /&gt;
*Fixed few player textures (stonebm)&lt;br /&gt;
*New updater version&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.015==&lt;br /&gt;
{{Calendar|4|July|2006}}&lt;br /&gt;
&lt;br /&gt;
===New features===&lt;br /&gt;
* More crafting system implementations, this will allow to create weapons and shields in game.&lt;br /&gt;
* Weapons and armors now decay with use and can be repaired. Crafted items have a better quality, so they decay slower.&lt;br /&gt;
* New scripting operations to add support for new spells like transmutation and invisibility (the spells are not yet in, but the engine now supports those)&lt;br /&gt;
* Multiple engine and art optimizations. We moved our format to a binary one to have better loading times, previously most of the time needed for loading was spent in parsing our XML levels. Now we have DDS textures, binary XML maps, and ptmalloc in CS. Maps load signifigantly faster and the package is smaller even with all the new content.&lt;br /&gt;
* New control and movement systems:&lt;br /&gt;
** Fixes many bugs, including the main collision detection issue.&lt;br /&gt;
** New stamina system which takes into account terrain steepness&lt;br /&gt;
** Now shows strafe animation (for the races that have it so far)&lt;br /&gt;
** Added sneak mode to creep around slowly (not all races have anim yet)&lt;br /&gt;
* Finally fixed the handness of characters. All characters correctly attack with right hand.&lt;br /&gt;
&lt;br /&gt;
===New content===&lt;br /&gt;
* New &amp;quot;Bronze Doors&amp;quot; region&lt;br /&gt;
* Four new outdoor terrain maps (one based on the old Oja Road)&lt;br /&gt;
* World has been rearranged to move Akkaio from its temporary location to East of Hydlaa&lt;br /&gt;
* New armor textures:&lt;br /&gt;
** Each race should have a full set for leather armor now&lt;br /&gt;
** Added chainmail textures and items&lt;br /&gt;
* Initial support for plate armor&lt;br /&gt;
* New trait customizations for some races, including new skins for enkis&lt;br /&gt;
* New pet species and new animal affinity system&lt;br /&gt;
* NPCs support more scripting. Capable of being set to pickup items.&lt;br /&gt;
* Optional &amp;quot;lossless&amp;quot; parameter for /screenshot to save as PNG&lt;br /&gt;
* Added font size option to the config windows for certain windows&lt;br /&gt;
* New sound emitter generator used to add many of the insect sounds in the maps&lt;br /&gt;
&lt;br /&gt;
===Notable fixes and improvements===&lt;br /&gt;
* Improved caching system on server&lt;br /&gt;
* Fixes for action locations&lt;br /&gt;
* More work on tutorial system&lt;br /&gt;
* Multiple fixes and improvements in sounds system&lt;br /&gt;
* Fixes and improvements for NPC pathfinding&lt;br /&gt;
* Improved entity loading in client to prevent freezing&lt;br /&gt;
* Fixed backwards left/right hand issues&lt;br /&gt;
* Some GM system improvements&lt;br /&gt;
* Added clear button to the shortcut editing window&lt;br /&gt;
* Optimized networking messages to lower total traffic by as much as 1/3, by size&lt;br /&gt;
* /report command is now working and works retroactively to include recent messages&lt;br /&gt;
&lt;br /&gt;
===Other bugfixes===&lt;br /&gt;
* Fixed display bug when resizing buddy window&lt;br /&gt;
* Fixed display bug when selecting quest notes&lt;br /&gt;
* Fixed crash on pet dismiss with stat window&lt;br /&gt;
* Fixed bug in pssetup where the skin sample wasn&#039;t loaded&lt;br /&gt;
* Fixed bug where auto-full-defense couldn&#039;t fight back when stance was changed&lt;br /&gt;
* Fixed bug where failed transform message was not being displayed&lt;br /&gt;
* Fixed bug where managing a secret guild could make guild labels shown&lt;br /&gt;
* Fixed bugs where equip/dequip effects would persist or stack&lt;br /&gt;
* Fixed bug where camera mode would reset when going to the options&lt;br /&gt;
* Fixed bug where the option to show/hide guild labels required a restart&lt;br /&gt;
* Fixed bug where players could add money to containers that can&#039;t remove them&lt;br /&gt;
* Fixed bug where loading errors could start an infinte loop, instead of stopping&lt;br /&gt;
* Fixed crash in pssetup if no map is selected in relight&lt;br /&gt;
* Fixed bug where morphing would show equipment wrong on morphee&#039;s client&lt;br /&gt;
* Fixed bug where long generated names would make next name fall off the left&lt;br /&gt;
* Fixed bug causing duplicate entries in new character descriptions&lt;br /&gt;
* Fixed bug where you couldn&#039;t attack in PvP unless groupped with their last attacker&lt;br /&gt;
* Fixed bug where stance button could stay highlighted if not allowed to attack&lt;br /&gt;
* Fixed possible crash on new character upload&lt;br /&gt;
* Fixed bug where the skill window could popup after closing&lt;br /&gt;
* Fixed display bugs when a window is near the control bar&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.016==&lt;br /&gt;
{{Calendar|14|September|2006}}&lt;br /&gt;
===Design and content===&lt;br /&gt;
*Chat window updated, specific NPC tab, all visibile/audible messages moved to Main Tab, all detailed combat moved to system tab, combat details now only shown to user and group.&lt;br /&gt;
*Added support for character helms. Added base set of helms, but few races still missing.&lt;br /&gt;
*Mini-games system added, with ability to display a board, change pieces, configurable layouts.&lt;br /&gt;
*Method of calculation cast success now set as a formula.&lt;br /&gt;
*New animations added to complete the base set, few races still missing.&lt;br /&gt;
*Added support for monsters variations&lt;br /&gt;
*Added base armor for races. Kran has now a natural armor, monsters have various natural armors based on their race.&lt;br /&gt;
*Item quality is now averaged on stacking.&lt;br /&gt;
*Item resistance for crafted items set as 0.5&lt;br /&gt;
&lt;br /&gt;
===Bug Fixes===&lt;br /&gt;
*Errors about unresolved item containers.&lt;br /&gt;
*Many fixes and improvements to crafting.&lt;br /&gt;
*Fixed crash if people tried to trade items while repairing them.&lt;br /&gt;
*Pathing of NPC fixed.&lt;br /&gt;
*Fixed stances of NPCs after respawn.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.017==&lt;br /&gt;
{{Calendar|22|November|2006}}&lt;br /&gt;
===Engine===&lt;br /&gt;
*Improvements to minigames&lt;br /&gt;
*Improvements to NPCs AI, they are now able to explore, search and identify resources, finally harvest.&lt;br /&gt;
*Fixed crafted item quality&lt;br /&gt;
*Partial rewrite of crafting functionalities, will be easier to manage/expand for us&lt;br /&gt;
*Fixed few bugs on NPC movement&lt;br /&gt;
*Upgraded the cal3d animation engine to version 0.11&lt;br /&gt;
*Upgraded the [[CrystalSpace]] 3d rendering engine to 1.0&lt;br /&gt;
*Usage of the new particle system&lt;br /&gt;
*Fixed char selection screen to display equipped items&lt;br /&gt;
*Added button to Glyph window for spell research&lt;br /&gt;
*Added capability to manage area spells&lt;br /&gt;
*Added Active magic window&lt;br /&gt;
*Containers can now hold glyphs without disrupting casting&lt;br /&gt;
&lt;br /&gt;
===Art===&lt;br /&gt;
*Added new animations for female ynnwn&lt;br /&gt;
*Added new monsters variations&lt;br /&gt;
*Added helms for all races (except ynnwn male)&lt;br /&gt;
*Added new Kran animations&lt;br /&gt;
*Upgraded particle effects for the new system (still to tweak) &lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.018==&lt;br /&gt;
{{Calendar|7|February|2007}}&lt;br /&gt;
* New area south of hydlaa, called the winch.&lt;br /&gt;
* Hair styles support added. For now just the female ynnwn has different hair styles, but more will be added later&lt;br /&gt;
* New animations for some characters, like ynnwn male.&lt;br /&gt;
* New items and icons shipped into the client&lt;br /&gt;
* Lot of new quests loaded&lt;br /&gt;
* New faction system, you can see a first implementation in your skills window, under factions.&lt;br /&gt;
* GMs can register official events on the server, players participating to events can access events tab in quests window.&lt;br /&gt;
* Added new map function, to display/create maps&lt;br /&gt;
* First implementation of locks and keys (not fully usable yet)&lt;br /&gt;
* Many bug fixes and improvements &lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.019==&lt;br /&gt;
{{Calendar|11|July|2007}}&lt;br /&gt;
===Content===&lt;br /&gt;
* Reached mark of 100 quests.&lt;br /&gt;
* Complete review of quests, all of them are working in game now&lt;br /&gt;
* Greatly improved dictionary of NPCs, and common responses&lt;br /&gt;
* Added new creatures: derghir, tloke, kikiri&lt;br /&gt;
* Made available variations of many creatures&lt;br /&gt;
* Added dermorian female player character model&lt;br /&gt;
* Added 4 Kran skins&lt;br /&gt;
* Improved dermorian male character&lt;br /&gt;
* Added plate armor for many chars&lt;br /&gt;
* Added new skins for enkidukai clans&lt;br /&gt;
* Added spell casting effects&lt;br /&gt;
* Added lot of new items, like bludgeoning weapons, amulets, rings, plants&lt;br /&gt;
* Added missing animations to player characters&lt;br /&gt;
&lt;br /&gt;
===Engine===&lt;br /&gt;
* Shadows are now present under characters and objects!&lt;br /&gt;
* Chat bubbles are used on players and NPCs during dialogs&lt;br /&gt;
* Completely remade how inventory works server-side for more robust management&lt;br /&gt;
* Enabled generation of random loot, you will see lot of new items!&lt;br /&gt;
* Improved NPC movement and AI&lt;br /&gt;
* Improvement to guild management (we will reveal more in the next weeks)&lt;br /&gt;
* Improvements to sketches, you can now edit your own sketches&lt;br /&gt;
* Improvements to books, you can now edit your own books&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.020==&lt;br /&gt;
{{Calendar|14|October|2007}}&lt;br /&gt;
===New Features===&lt;br /&gt;
*Duels aren’t deadly anymore. You will knock a player down and then you will receive a message asking if you want to kill the player or not.&lt;br /&gt;
*Banking: Players will now be able to open a personal bank account. Guildleaders will also be able to open a guild bank account and set permission who can access the account. Not enabled yet in-game.&lt;br /&gt;
*New characters will now enter a tutorial-world when they login.&lt;br /&gt;
*The Death Realm is now cursed! Not enabled yet in-game.&lt;br /&gt;
*Authors are now able to name their books.&lt;br /&gt;
*Only the author of a book or sketch can now edit it. This ONLY applies to books and sketches bought AFTER the .20 release!&lt;br /&gt;
*Equipping helmets will now remove the hair mesh.&lt;br /&gt;
*Various fonts were changed to ones with a better (GPL) license.&lt;br /&gt;
*Work started on taxing.&lt;br /&gt;
&lt;br /&gt;
===Art===&lt;br /&gt;
*Various maps now use the new &amp;quot;Lighter2&amp;quot; lightmap system for creating light and shadows.&lt;br /&gt;
*Various maps now use a newer 3d format (genmeshes instead of thingmeshes).&lt;br /&gt;
*More icons and meshes for items have been added.&lt;br /&gt;
*A tutorial area has been added for new players. The tutorial has to be completed by new players before moving to the game world.&lt;br /&gt;
*The tavern has been expanded.&lt;br /&gt;
&lt;br /&gt;
===Changes===&lt;br /&gt;
====GUI====&lt;br /&gt;
*Mouserun has been enabled by default to aid new players. It can be turned off by un-assigning the &amp;quot;LeftClick&amp;quot; in Options-&amp;gt;Controls-&amp;gt;Keys-&amp;gt;Camera-&amp;gt;MouseRun.&lt;br /&gt;
*The order of the main menu icons has been changed to make it more intuitive. Obviously this will need getting used to for long-time players.&lt;br /&gt;
*Many changes and updates to the Planeshift Advanced Windowing System, this is the code backend of the graphical user interface.&lt;br /&gt;
*The book writing window now looks better.&lt;br /&gt;
*Chatbubbles are prettier.&lt;br /&gt;
*The last used spell is now highlighted in the spells window.&lt;br /&gt;
*When your name is mentioned the specific tab will now flash in way recognizable from the normal way.&lt;br /&gt;
*The tutorial window now looks better.&lt;br /&gt;
*Equipped items won’t show up in Buy/Sell window anymore.&lt;br /&gt;
*You can now have up to 200 shortcuts.&lt;br /&gt;
*You’re now prompted for a password when you try to delete your character.&lt;br /&gt;
*Various fixes to the graphical user interface.&lt;br /&gt;
*The item description window now shows item sizes.&lt;br /&gt;
*The total amount of trias is now displayed in the skillwindow.&lt;br /&gt;
*The guild invitation window always stays on top now.&lt;br /&gt;
*Several improvements for weather and especially fog.&lt;br /&gt;
*Fog now reduces your viewing distance, so it is actually &amp;quot;thick&amp;quot; now.&lt;br /&gt;
&lt;br /&gt;
====Sound====&lt;br /&gt;
*Changes to most environment sounds, for fading and distance values.&lt;br /&gt;
*New sound setups for the Winch and the Bronze Doors.&lt;br /&gt;
*A new sound for the &amp;quot;DRCitadel&amp;quot; in the Death Realm.&lt;br /&gt;
&lt;br /&gt;
====Movement and Combat====&lt;br /&gt;
*You will get the “too tired” message at 10% stamina now.&lt;br /&gt;
*Stamina now regenerates faster when sitting.&lt;br /&gt;
*Natural armour is now counted as a bonus to normal armour, instead of something that is replaced when you equip bought armour.&lt;br /&gt;
*Now you cannot use “/attack 1” anymore but you should use “/attack bloody” instead.&lt;br /&gt;
*You won’t be able to lure NPCs anymore by just pressing the attack button.&lt;br /&gt;
*A toggle key for running/walking can be used when you have autorun enabled(r), you must enabled it under Options first.&lt;br /&gt;
*Passing a region border no longer stops you from running.&lt;br /&gt;
&lt;br /&gt;
===Engine===&lt;br /&gt;
*Planeshift now uses version 1.2 of The Crystal Space 3D engine and the Crystal Entity Layer environment.&lt;br /&gt;
*Meshes, textures and materials are now deleted when they aren’t needed anymore, this improves memory usage.&lt;br /&gt;
*The client now loads less models and textures during startup causing it to launch much faster, they are loaded on-demand now.&lt;br /&gt;
*Many changes and fixes to map loading and unloading, making it better and faster.&lt;br /&gt;
*Some optimizations in network code to make the server faster.&lt;br /&gt;
&lt;br /&gt;
===Various===&lt;br /&gt;
*You can now trade while sitting.&lt;br /&gt;
*Players can now stack items together regardless of quality and creator.&lt;br /&gt;
*An error message on /unstick now displays how long you have to wait until you can use /unstick again.&lt;br /&gt;
*The /pos command for showing your position now shows your instance too.&lt;br /&gt;
*Advisors can now see who other advisors are.&lt;br /&gt;
*The timeout for advisor sessions has been doubled.&lt;br /&gt;
&lt;br /&gt;
===Fixed Bugs===&lt;br /&gt;
*You can now type in the auction tab again instead of having to use /auction.&lt;br /&gt;
*Several server crashes.&lt;br /&gt;
*Several fixes to make sure players won’t get stuck in instances anymore.&lt;br /&gt;
*Players can now loot when killing mobs with a Damage Over Time spell.&lt;br /&gt;
*Various fixes to the marriage system.&lt;br /&gt;
*The command “z” to sit now always works, sometimes you had to press it twice.&lt;br /&gt;
*Fixes to movement code so you should get stuck less often.&lt;br /&gt;
*Some fixes to the /unstick command&lt;br /&gt;
*Many changes and fixes to the locking and unlocking of doors.&lt;br /&gt;
*It is not possible anymore to fish for gold.&lt;br /&gt;
*Sometimes you had to press “r” twice to enable autorun, this is now made more elegant.&lt;br /&gt;
*The preview of skins now works in pssetup.&lt;br /&gt;
*Advisor messages now actually display the right information.&lt;br /&gt;
*The FPS cap and the distance cap now actually work.&lt;br /&gt;
*You can now close the sketch window with the red cross.&lt;br /&gt;
*If you use quotes (&amp;quot;&amp;quot;) in a sketch, the entire sketch isn&#039;t wiped anymore.&lt;br /&gt;
&lt;br /&gt;
===Know Issues===&lt;br /&gt;
*After a partial stack within the furnace is moved, only the amount that you moved will be melted. The rest can be lost.&lt;br /&gt;
*After all art and engine related changes, users may experience more lag than usual at times. You can fix this by decreasing Distance under &amp;quot;Options--&amp;gt;Graphics--&amp;gt;Details&amp;quot;.&lt;br /&gt;
*When moving to a new map, the progress bar of the loading screen will not show the progress correctly.&lt;br /&gt;
*Some issues with guildhouses access rights.&lt;br /&gt;
*When mouserun is enabled, sometimes clicking on the GUI or on an NPC will cause your character to move too.&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Crystal_Blue&amp;diff=24960</id>
		<title>Crystal Blue</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Crystal_Blue&amp;diff=24960"/>
		<updated>2025-06-10T17:51:46Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Crystal Blue&#039;&#039;&#039; Is the code name for the third major release of [[PlaneShift]].&lt;br /&gt;
[[File:Cbsplash.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
==0.3.004==&lt;br /&gt;
{{Calendar|24|December|2004}}&lt;br /&gt;
* new [[CrystalSpace]] (3D graphics) engine&lt;br /&gt;
* using skeletal models and animations&lt;br /&gt;
* introducing magic&lt;br /&gt;
* introducing combat&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.005==&lt;br /&gt;
{{Calendar|~30|December|2004}}&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.006==&lt;br /&gt;
{{Calendar|22|January|2005}}&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.007==&lt;br /&gt;
{{Calendar|10|February|2005}}&lt;br /&gt;
&lt;br /&gt;
* Klyros model added.&lt;br /&gt;
* Added a set of items including food and loot items.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.010==&lt;br /&gt;
{{Calendar|18|May|2005}}&lt;br /&gt;
===Major User-Visible Features===&lt;br /&gt;
*New area of East Hydlaa is available (Jayose has been relocated). New NPCs will be added there soon.&lt;br /&gt;
*Character traits - current only 1 new elf skin. You can now customize the face of your char (dermorian only). Now that the feature is in place, we will add more faces for other chars as well.&lt;br /&gt;
*New crafting system - shields only at the moment&lt;br /&gt;
*New complete GUI skinning system&lt;br /&gt;
*One additional skin available thanks to Cherppow. (to change it, you can rename planeshift/art/skin/elves.zip into planeshift/art/skin/default.zip)&lt;br /&gt;
*New loading screens&lt;br /&gt;
*Added duel points and advisor points to skill window info displayed.&lt;br /&gt;
*Added some new button art to look better.&lt;br /&gt;
*Added duel-point penalty for spamming duel invites.&lt;br /&gt;
*Added command to see /duel_points&lt;br /&gt;
*You don&#039;t get skill practise for attacking other players now.&lt;br /&gt;
*Train icon added in the interaction menu with trainers&lt;br /&gt;
*Added /changeguildname&lt;br /&gt;
*German manual&lt;br /&gt;
*Message window will now no longer jump to the end when a message is added.&lt;br /&gt;
*/quit now prompts before quitting&lt;br /&gt;
*Added link to login page that shows where to register a new account.&lt;br /&gt;
*License of the package changed from PlaneShift Team to Atomic Blue.&lt;br /&gt;
&lt;br /&gt;
===Major User-Visible Fixes===&lt;br /&gt;
*A number of bug fixed on Hydlaa level.&lt;br /&gt;
*Updated/fixed some spell effects&lt;br /&gt;
*Fixed that you could freely PK players that were just joining the game&lt;br /&gt;
*Fixed that if you opened a window during autorun, you could run forever regardless of stamina.&lt;br /&gt;
*Fixed that when you died, you could still turn your remains with mouselook.&lt;br /&gt;
*When a character is attacked, its stance resets to &amp;quot;full defense&amp;quot;.&lt;br /&gt;
*Fixed that tab completition was sometimes changing chat command to /tell from e.g. /say.&lt;br /&gt;
*Fixed that when negative HP rates lowered HP to zero, the character was not killed.&lt;br /&gt;
*Fixed that vitals were not adjusted when they were at maximum value.&lt;br /&gt;
*This means that negative rates (e.g. spells) were not always applied.&lt;br /&gt;
&lt;br /&gt;
===Known bugs===&lt;br /&gt;
*Flickering of a rectangle region near the connection between hydlaa plaza and the new East Hydlaa map&lt;br /&gt;
*Pssetup may crash on some systems&lt;br /&gt;
*Chat sometimes doesn&#039;t scroll down to follow new text&lt;br /&gt;
*Using the &amp;quot;load all levels&amp;quot; option will give you some wrong textures here and there (example laanx temple).&lt;br /&gt;
&lt;br /&gt;
===Update===&lt;br /&gt;
{{Calendar|3|June|2005}}&lt;br /&gt;
* Laanx temple has been expanded adding a new room in the upper level.&lt;br /&gt;
* The sewers have been lit up a bit, and many torches have been added and fixed.&lt;br /&gt;
* Jayose library has been expanded, with new shelves types and more space to walk.&lt;br /&gt;
* We added few new faces variations for the Ynnwn male characters. You can see those new faces in the char creation.&lt;br /&gt;
* The game now supports the feature to add a description to any static object (like trees, statues, roads, stones, furniture, etc...). We just started using it, but you can right click on the book in the new room of laanx temple to get its description. We plan to add many descriptions to give more deepness to the background.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.011==&lt;br /&gt;
{{Calendar|4|August|2005}}&lt;br /&gt;
&lt;br /&gt;
* Unique treasure generation.&lt;br /&gt;
* Fine-tuning of the progression rules.&lt;br /&gt;
* New quest system.&lt;br /&gt;
* Visual fixes on Hydlaa level, and some additions to the magic shop.&lt;br /&gt;
* WIPE: all characters deleted.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.012==&lt;br /&gt;
{{Calendar|24|October|2005}}&lt;br /&gt;
===Features===&lt;br /&gt;
*Pets (familiars) added. New /pet command controls them.&lt;br /&gt;
*Frame rate limit added to Options. Frame rate limit is 62.5fps by default.&lt;br /&gt;
*Hair color for new characters can be changed. Existing characters will have to buy and use dye when it becomes available.&lt;br /&gt;
*Skills window has been reworked into categories. The category tab will blink if there is a skill available from the trainer.&lt;br /&gt;
*Gave GMs the ability to award XP for completing GM-created events.&lt;br /&gt;
*Right-click quick chat pop-up menu has been disabled.&lt;br /&gt;
*If you /use with an argument it wil assume you are trying to consume.&lt;br /&gt;
*/equip defaults to 1 item being used&lt;br /&gt;
*Support added for chained quests&lt;br /&gt;
*Some fixes so guild notes are actually usable:&lt;br /&gt;
** The gui now sends the targeted person&#039;s charcter id instead of your own, so it is possible to send notes.&lt;br /&gt;
** Private notes are only viewable by that character, and can be sent by any member of the guild. They are appended, not the best formatting, but it works for now.&lt;br /&gt;
*Creating a guild now has a confirmation dialog that explains the requirements.&lt;br /&gt;
*Re-wrote invite spam-blocker:&lt;br /&gt;
** Now only triggered on declines, so as to not block legitimate invites.&lt;br /&gt;
** Penalties now increase with each decline:&lt;br /&gt;
**# 1 min lockout&lt;br /&gt;
**# 5 min + warning&lt;br /&gt;
**# 10 min + 10 advisor point fine + 10 duel point fine, if duel spam + death&lt;br /&gt;
**# 30 point fine(s) + death + kick from server&lt;br /&gt;
** Penalties expire with gameplay time, and can be lowered by getting an accept from a player with no penalties and a enough advisor points.&lt;br /&gt;
** Penalty level is saved to the player&#039;s account entry in the database, so repeat offenders can&#039;t escape it. (relog resets to 3rd level)&lt;br /&gt;
*Enhancements to the looting system:&lt;br /&gt;
** Roll for loot enforcement: If a player in a group attempts to take instead of roll for any loot, the roll winner will be prompted to allow the action.&lt;br /&gt;
** Range restriction for rolling: Only group members within 30 meters (10 times normal loot range) can win a roll for loot.&lt;br /&gt;
*Implemented discard quest feature.&lt;br /&gt;
*/my command added&lt;br /&gt;
*Updater improved to be more efficient&lt;br /&gt;
*Add $target to shortcuts. Inserts the name of the player or object currently targeted into a command to replace each $target.&lt;br /&gt;
*Made it so if a spell -can- be cast on you (say, Life Infusion), and you have no target, it casts on yourself&lt;br /&gt;
*Improved NPC fighting behaviour so it&#039;s not cancelled by the server when the NPC leaves the range.&lt;br /&gt;
*Improved NPC navigation - they should hug walls less now.&lt;br /&gt;
*Add new icon to NPC right-click interact menu to chat to the NPC. Switches cursor to the chat window.&lt;br /&gt;
*Exiting the death realm now spawns you at your racial spawn point.&lt;br /&gt;
*/marriage command added&lt;br /&gt;
&lt;br /&gt;
===Bug Fixes===&lt;br /&gt;
*Various inventory and exchange bugs fixed where items could be lost.&lt;br /&gt;
*Fixed a bug where lacking a 0th shortcut would make the shortcut window have errors.&lt;br /&gt;
*Negative values for stats/skills at character creation are now checked for.&lt;br /&gt;
*Message versioning to prevent player stats jumping around due to out of order UDP&lt;br /&gt;
*It is now possible to strafe and rotate&lt;br /&gt;
*Name labels are updated when name is changed&lt;br /&gt;
*Guild labels are updated when guild is changed&lt;br /&gt;
*Fixed fall damage&lt;br /&gt;
*Fixed that new looted items were not accessible until inventory was opened.&lt;br /&gt;
*Re-enabled mouse run&lt;br /&gt;
*Fixed that it was possible to cast healing spells on a target with 100% HP.&lt;br /&gt;
*Add /die command to commit suicide. If used in a duel, you automatically yield.&lt;br /&gt;
*Fixed bug where trying to deequip while dead creates ghost item&lt;br /&gt;
*Fix for recent problem of users being unable to zone.&lt;br /&gt;
*Fix for bug that prevents the casting of a spell after it was interrupted.&lt;br /&gt;
*Training exploit fixed&lt;br /&gt;
*Fixed bug &amp;quot;During a guild war one guild yielded and the other 2 guild didn&#039;t get the Karma Points&amp;quot;.&lt;br /&gt;
*Fixed: complains at you if you try to cast Defensive Wind while targetting an enemy...saying it only can be cast on you. Made it cast such spells on you, regardless of what&#039;s targeted.&lt;br /&gt;
*Fixed bug that &amp;quot;Married to: xyz&amp;quot; was added again and again to your char desc when you edit it.&lt;br /&gt;
*Fixed bug that the character was not removed from his guild when it&#039;s deleted and you keep seeing it in the guild until the server is restarted.&lt;br /&gt;
*Fixed bug that players can start trading with other players without their permission and can annoy them in between fights etc.&lt;br /&gt;
*Various sound and music fixes&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.013==&lt;br /&gt;
{{Calendar|25|February|2006}}&lt;br /&gt;
===New Features===&lt;br /&gt;
*New mental and physical stamina system&lt;br /&gt;
*Many improvements to the GM system&lt;br /&gt;
*Multi-part and multi-path quests&lt;br /&gt;
*Many quest system improvements&lt;br /&gt;
*Added money to mini inventory window. (trades, etc)&lt;br /&gt;
*Some improvements to the GUI; simplified info window&lt;br /&gt;
*Added the ability for NPCs to use more animations&lt;br /&gt;
*Added more sound effects for actions&lt;br /&gt;
*Client now supports visible clothing/armor changes&lt;br /&gt;
*Client now supports customizable hair styles&lt;br /&gt;
*Updated in-game help to list all commands&lt;br /&gt;
*Right-click (by default) can now be used in all containers/inventories to view the item or a container&#039;s contents.&lt;br /&gt;
*Added font scaling option (set via setup)&lt;br /&gt;
*NPC dialogue now uses Wordnet, which will allow for more realistic communication&lt;br /&gt;
*Added snow support. Added rain support to Mac client.&lt;br /&gt;
*Labels will only show when in range to identify an object. (also helps performance by not drawing for far off objects) Dead objects now have red.&lt;br /&gt;
*New ban system which should keep greifers from just creating new accounts&lt;br /&gt;
*New mesh generation system to allow for more foliage in maps, some test one added to hydlaa and ojaroad&lt;br /&gt;
*New updater system, which doesn&#039;t download the repository unless it needs to. This will help the bandwidth of our servers and those with slower connections.&lt;br /&gt;
*Client can now automaticaly notify players when new updates are available, at the character selection screen.&lt;br /&gt;
*Many fixes for the crafting system. We are close to have it working for real.&lt;br /&gt;
&lt;br /&gt;
===Fixes===&lt;br /&gt;
*Fixes for /dequip command in shortcuts&lt;br /&gt;
*Various crash fixes (too many to list)&lt;br /&gt;
*Many performance fixes.&lt;br /&gt;
*Fixed weather and fog glitches/crashes&lt;br /&gt;
*Fixed exploit where people could logout mid-battle&lt;br /&gt;
*Temporarly removed advisor points scoring system to stop competitions. Advisor points are now on account, not on char.&lt;br /&gt;
*Many fixes to the sound system. Sounds should be much better, and play when they&#039;re supposed to. Switched to new renderer, which is more stable.&lt;br /&gt;
*Issues with skill window tabs&lt;br /&gt;
*Issues with using weapons with stat/skill requirements&lt;br /&gt;
*Could &amp;quot;complete&amp;quot; an empty trade&lt;br /&gt;
*Fixes to entity labels. Added command &amp;quot;/repaintlabels force&amp;quot; as a tool to repaint more severe problems if they still happen.&lt;br /&gt;
*Fixed darkness bug&lt;br /&gt;
*New map lighting system in CS, which should clear up a few lighting issues. All maps relighted&lt;br /&gt;
*Fixed various bugs in NPCclient making NPCs act strangely&lt;br /&gt;
*Made pets unattackable&lt;br /&gt;
*Fixes for character creation system&lt;br /&gt;
*Fixed bugs with stamina not working at certain times&lt;br /&gt;
*Many fixes related to items, inventories, and containers. Items shouldn&#039;t dissapear anymore, and weights should be handled without errors.&lt;br /&gt;
*Better working configuration of keys and mouse buttons&lt;br /&gt;
*Fixed many, many, memory leaks in both PS and CS. The client should be able to run without having to be restarted very often and should be more efficient in using memory.&lt;br /&gt;
*Disabled invites while dueling, to prevent using them as a distraction to cheat&lt;br /&gt;
*Changing weapons mid battle will make you skip a turn, to prevent some exploits&lt;br /&gt;
*Fixed chat history to not loose current line by accident&lt;br /&gt;
*Fixed bug where sound effects would try to load when sound was off&lt;br /&gt;
*/who will only show up to 30 players based on the given filter, to fix issues with showing too many&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.014==&lt;br /&gt;
{{Calendar|9|April|2006}}&lt;br /&gt;
===New Features===&lt;br /&gt;
*New items, new armor skins.&lt;br /&gt;
*Support for armors that require a different armor model (think spiky armor)&lt;br /&gt;
*More GM system improvements (ex: GMs are now invisible by default)&lt;br /&gt;
*Weather system improvements (ex: can now fade in all spiffy-like)&lt;br /&gt;
*New tutorial system. Will now give help the first time you do new things.&lt;br /&gt;
*New proximity-based NPC dialogue system. NPCs can now be made to talk to you automatically when you move close to them.&lt;br /&gt;
*NPCs can now talk publicly, instead of only in /tells.&lt;br /&gt;
*Added &amp;quot;/screenshot nogui&amp;quot; feature to take clean shots, ignoring onscreen stuff.&lt;br /&gt;
*Glyphs now need to be repurified for new owners.&lt;br /&gt;
*Will now send notification on training from mining/crafting/etc.&lt;br /&gt;
*New options window in the updater to make setup easier&lt;br /&gt;
*Additions to the pet system&lt;br /&gt;
*Elves GUI set to default, just to show it to the ones that never tried it.&lt;br /&gt;
&lt;br /&gt;
===Fixes===&lt;br /&gt;
*Fixes to the marriage system&lt;br /&gt;
*Fixed crash loading into a bad location&lt;br /&gt;
*Fixed an exploit where weakness could be used on someone to make them drop items&lt;br /&gt;
*Crafting system fixes; it should be ready soon&lt;br /&gt;
*Fixed bug where NPCs could spawn without full health&lt;br /&gt;
*Weather system fixes&lt;br /&gt;
*Fixed pet cloning bugs&lt;br /&gt;
*Fixes to name label alignments&lt;br /&gt;
*Updater self-updating is now back on&lt;br /&gt;
*Fixed a rare bug giving a 1 HP max&lt;br /&gt;
*Fixed tooltips not disappearing correctly&lt;br /&gt;
*Fixed an exploit in the pet name changing that could crash the server&lt;br /&gt;
*Turned spam-protection on for trade invites&lt;br /&gt;
*Fixed a bug cutting off long names in the buddy list&lt;br /&gt;
*Fixed a few updater bugs/crashes&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.014b==&lt;br /&gt;
{{Calendar|13|April|2006}}&lt;br /&gt;
*Fixed darkness in sewers&lt;br /&gt;
*Added more items to Harnquist smith shop and to Levrus alchemy laboratory for future crafting usage.&lt;br /&gt;
*Fixed few player textures (stonebm)&lt;br /&gt;
*New updater version&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.015==&lt;br /&gt;
{{Calendar|4|July|2006}}&lt;br /&gt;
&lt;br /&gt;
===New features===&lt;br /&gt;
* More crafting system implementations, this will allow to create weapons and shields in game.&lt;br /&gt;
* Weapons and armors now decay with use and can be repaired. Crafted items have a better quality, so they decay slower.&lt;br /&gt;
* New scripting operations to add support for new spells like transmutation and invisibility (the spells are not yet in, but the engine now supports those)&lt;br /&gt;
* Multiple engine and art optimizations. We moved our format to a binary one to have better loading times, previously most of the time needed for loading was spent in parsing our XML levels. Now we have DDS textures, binary XML maps, and ptmalloc in CS. Maps load signifigantly faster and the package is smaller even with all the new content.&lt;br /&gt;
* New control and movement systems:&lt;br /&gt;
** Fixes many bugs, including the main collision detection issue.&lt;br /&gt;
** New stamina system which takes into account terrain steepness&lt;br /&gt;
** Now shows strafe animation (for the races that have it so far)&lt;br /&gt;
** Added sneak mode to creep around slowly (not all races have anim yet)&lt;br /&gt;
* Finally fixed the handness of characters. All characters correctly attack with right hand.&lt;br /&gt;
&lt;br /&gt;
===New content===&lt;br /&gt;
* New &amp;quot;Bronze Doors&amp;quot; region&lt;br /&gt;
* Four new outdoor terrain maps (one based on the old Oja Road)&lt;br /&gt;
* World has been rearranged to move Akkaio from its temporary location to East of Hydlaa&lt;br /&gt;
* New armor textures:&lt;br /&gt;
** Each race should have a full set for leather armor now&lt;br /&gt;
** Added chainmail textures and items&lt;br /&gt;
* Initial support for plate armor&lt;br /&gt;
* New trait customizations for some races, including new skins for enkis&lt;br /&gt;
* New pet species and new animal affinity system&lt;br /&gt;
* NPCs support more scripting. Capable of being set to pickup items.&lt;br /&gt;
* Optional &amp;quot;lossless&amp;quot; parameter for /screenshot to save as PNG&lt;br /&gt;
* Added font size option to the config windows for certain windows&lt;br /&gt;
* New sound emitter generator used to add many of the insect sounds in the maps&lt;br /&gt;
&lt;br /&gt;
===Notable fixes and improvements===&lt;br /&gt;
* Improved caching system on server&lt;br /&gt;
* Fixes for action locations&lt;br /&gt;
* More work on tutorial system&lt;br /&gt;
* Multiple fixes and improvements in sounds system&lt;br /&gt;
* Fixes and improvements for NPC pathfinding&lt;br /&gt;
* Improved entity loading in client to prevent freezing&lt;br /&gt;
* Fixed backwards left/right hand issues&lt;br /&gt;
* Some GM system improvements&lt;br /&gt;
* Added clear button to the shortcut editing window&lt;br /&gt;
* Optimized networking messages to lower total traffic by as much as 1/3, by size&lt;br /&gt;
* /report command is now working and works retroactively to include recent messages&lt;br /&gt;
&lt;br /&gt;
===Other bugfixes===&lt;br /&gt;
* Fixed display bug when resizing buddy window&lt;br /&gt;
* Fixed display bug when selecting quest notes&lt;br /&gt;
* Fixed crash on pet dismiss with stat window&lt;br /&gt;
* Fixed bug in pssetup where the skin sample wasn&#039;t loaded&lt;br /&gt;
* Fixed bug where auto-full-defense couldn&#039;t fight back when stance was changed&lt;br /&gt;
* Fixed bug where failed transform message was not being displayed&lt;br /&gt;
* Fixed bug where managing a secret guild could make guild labels shown&lt;br /&gt;
* Fixed bugs where equip/dequip effects would persist or stack&lt;br /&gt;
* Fixed bug where camera mode would reset when going to the options&lt;br /&gt;
* Fixed bug where the option to show/hide guild labels required a restart&lt;br /&gt;
* Fixed bug where players could add money to containers that can&#039;t remove them&lt;br /&gt;
* Fixed bug where loading errors could start an infinte loop, instead of stopping&lt;br /&gt;
* Fixed crash in pssetup if no map is selected in relight&lt;br /&gt;
* Fixed bug where morphing would show equipment wrong on morphee&#039;s client&lt;br /&gt;
* Fixed bug where long generated names would make next name fall off the left&lt;br /&gt;
* Fixed bug causing duplicate entries in new character descriptions&lt;br /&gt;
* Fixed bug where you couldn&#039;t attack in PvP unless groupped with their last attacker&lt;br /&gt;
* Fixed bug where stance button could stay highlighted if not allowed to attack&lt;br /&gt;
* Fixed possible crash on new character upload&lt;br /&gt;
* Fixed bug where the skill window could popup after closing&lt;br /&gt;
* Fixed display bugs when a window is near the control bar&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.016==&lt;br /&gt;
{{Calendar|14|September|2006}}&lt;br /&gt;
===Design and content===&lt;br /&gt;
*Chat window updated, specific NPC tab, all visibile/audible messages moved to Main Tab, all detailed combat moved to system tab, combat details now only shown to user and group.&lt;br /&gt;
*Added support for character helms. Added base set of helms, but few races still missing.&lt;br /&gt;
*Mini-games system added, with ability to display a board, change pieces, configurable layouts.&lt;br /&gt;
*Method of calculation cast success now set as a formula.&lt;br /&gt;
*New animations added to complete the base set, few races still missing.&lt;br /&gt;
*Added support for monsters variations&lt;br /&gt;
*Added base armor for races. Kran has now a natural armor, monsters have various natural armors based on their race.&lt;br /&gt;
*Item quality is now averaged on stacking.&lt;br /&gt;
*Item resistance for crafted items set as 0.5&lt;br /&gt;
&lt;br /&gt;
===Bug Fixes===&lt;br /&gt;
*Errors about unresolved item containers.&lt;br /&gt;
*Many fixes and improvements to crafting.&lt;br /&gt;
*Fixed crash if people tried to trade items while repairing them.&lt;br /&gt;
*Pathing of NPC fixed.&lt;br /&gt;
*Fixed stances of NPCs after respawn.&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.017==&lt;br /&gt;
{{Calendar|22|November|2006}}&lt;br /&gt;
===Engine===&lt;br /&gt;
*Improvements to minigames&lt;br /&gt;
*Improvements to NPCs AI, they are now able to explore, search and identify resources, finally harvest.&lt;br /&gt;
*Fixed crafted item quality&lt;br /&gt;
*Partial rewrite of crafting functionalities, will be easier to manage/expand for us&lt;br /&gt;
*Fixed few bugs on NPC movement&lt;br /&gt;
*Upgraded the cal3d animation engine to version 0.11&lt;br /&gt;
*Upgraded the [[CrystalSpace]] 3d rendering engine to 1.0&lt;br /&gt;
*Usage of the new particle system&lt;br /&gt;
*Fixed char selection screen to display equipped items&lt;br /&gt;
*Added button to Glyph window for spell research&lt;br /&gt;
*Added capability to manage area spells&lt;br /&gt;
*Added Active magic window&lt;br /&gt;
*Containers can now hold glyphs without disrupting casting&lt;br /&gt;
&lt;br /&gt;
===Art===&lt;br /&gt;
*Added new animations for female ynnwn&lt;br /&gt;
*Added new monsters variations&lt;br /&gt;
*Added helms for all races (except ynnwn male)&lt;br /&gt;
*Added new Kran animations&lt;br /&gt;
*Upgraded particle effects for the new system (still to tweak) &lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.018==&lt;br /&gt;
{{Calendar|7|February|2007}}&lt;br /&gt;
* New area south of hydlaa, called the winch.&lt;br /&gt;
* Hair styles support added. For now just the female ynnwn has different hair styles, but more will be added later&lt;br /&gt;
* New animations for some characters, like ynnwn male.&lt;br /&gt;
* New items and icons shipped into the client&lt;br /&gt;
* Lot of new quests loaded&lt;br /&gt;
* New faction system, you can see a first implementation in your skills window, under factions.&lt;br /&gt;
* GMs can register official events on the server, players participating to events can access events tab in quests window.&lt;br /&gt;
* Added new map function, to display/create maps&lt;br /&gt;
* First implementation of locks and keys (not fully usable yet)&lt;br /&gt;
* Many bug fixes and improvements &lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.019==&lt;br /&gt;
{{Calendar|11|July|2007}}&lt;br /&gt;
===Content===&lt;br /&gt;
* Reached mark of 100 quests.&lt;br /&gt;
* Complete review of quests, all of them are working in game now&lt;br /&gt;
* Greatly improved dictionary of NPCs, and common responses&lt;br /&gt;
* Added new creatures: derghir, tloke, kikiri&lt;br /&gt;
* Made available variations of many creatures&lt;br /&gt;
* Added dermorian female player character model&lt;br /&gt;
* Added 4 Kran skins&lt;br /&gt;
* Improved dermorian male character&lt;br /&gt;
* Added plate armor for many chars&lt;br /&gt;
* Added new skins for enkidukai clans&lt;br /&gt;
* Added spell casting effects&lt;br /&gt;
* Added lot of new items, like bludgeoning weapons, amulets, rings, plants&lt;br /&gt;
* Added missing animations to player characters&lt;br /&gt;
&lt;br /&gt;
===Engine===&lt;br /&gt;
* Shadows are now present under characters and objects!&lt;br /&gt;
* Chat bubbles are used on players and NPCs during dialogs&lt;br /&gt;
* Completely remade how inventory works server-side for more robust management&lt;br /&gt;
* Enabled generation of random loot, you will see lot of new items!&lt;br /&gt;
* Improved NPC movement and AI&lt;br /&gt;
* Improvement to guild management (we will reveal more in the next weeks)&lt;br /&gt;
* Improvements to sketches, you can now edit your own sketches&lt;br /&gt;
* Improvements to books, you can now edit your own books&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.3.020==&lt;br /&gt;
{{Calendar|14|October|2007}}&lt;br /&gt;
===New Features===&lt;br /&gt;
*Duels aren’t deadly anymore. You will knock a player down and then you will receive a message asking if you want to kill the player or not.&lt;br /&gt;
*Banking: Players will now be able to open a personal bank account. Guildleaders will also be able to open a guild bank account and set permission who can access the account. Not enabled yet in-game.&lt;br /&gt;
*New characters will now enter a tutorial-world when they login.&lt;br /&gt;
*The Death Realm is now cursed! Not enabled yet in-game.&lt;br /&gt;
*Authors are now able to name their books.&lt;br /&gt;
*Only the author of a book or sketch can now edit it. This ONLY applies to books and sketches bought AFTER the .20 release!&lt;br /&gt;
*Equipping helmets will now remove the hair mesh.&lt;br /&gt;
*Various fonts were changed to ones with a better (GPL) license.&lt;br /&gt;
*Work started on taxing.&lt;br /&gt;
&lt;br /&gt;
===Art===&lt;br /&gt;
*Various maps now use the new &amp;quot;Lighter2&amp;quot; lightmap system for creating light and shadows.&lt;br /&gt;
*Various maps now use a newer 3d format (genmeshes instead of thingmeshes).&lt;br /&gt;
*More icons and meshes for items have been added.&lt;br /&gt;
*A tutorial area has been added for new players. The tutorial has to be completed by new players before moving to the game world.&lt;br /&gt;
*The tavern has been expanded.&lt;br /&gt;
&lt;br /&gt;
===Changes===&lt;br /&gt;
====GUI====&lt;br /&gt;
*Mouserun has been enabled by default to aid new players. It can be turned off by un-assigning the &amp;quot;LeftClick&amp;quot; in Options-&amp;gt;Controls-&amp;gt;Keys-&amp;gt;Camera-&amp;gt;MouseRun.&lt;br /&gt;
*The order of the main menu icons has been changed to make it more intuitive. Obviously this will need getting used to for long-time players.&lt;br /&gt;
*Many changes and updates to the Planeshift Advanced Windowing System, this is the code backend of the graphical user interface.&lt;br /&gt;
*The book writing window now looks better.&lt;br /&gt;
*Chatbubbles are prettier.&lt;br /&gt;
*The last used spell is now highlighted in the spells window.&lt;br /&gt;
*When your name is mentioned the specific tab will now flash in way recognizable from the normal way.&lt;br /&gt;
*The tutorial window now looks better.&lt;br /&gt;
*Equipped items won’t show up in Buy/Sell window anymore.&lt;br /&gt;
*You can now have up to 200 shortcuts.&lt;br /&gt;
*You’re now prompted for a password when you try to delete your character.&lt;br /&gt;
*Various fixes to the graphical user interface.&lt;br /&gt;
*The item description window now shows item sizes.&lt;br /&gt;
*The total amount of trias is now displayed in the skillwindow.&lt;br /&gt;
*The guild invitation window always stays on top now.&lt;br /&gt;
*Several improvements for weather and especially fog.&lt;br /&gt;
*Fog now reduces your viewing distance, so it is actually &amp;quot;thick&amp;quot; now.&lt;br /&gt;
&lt;br /&gt;
====Sound====&lt;br /&gt;
*Changes to most environment sounds, for fading and distance values.&lt;br /&gt;
*New sound setups for the Winch and the Bronze Doors.&lt;br /&gt;
*A new sound for the &amp;quot;DRCitadel&amp;quot; in the Death Realm.&lt;br /&gt;
&lt;br /&gt;
====Movement and Combat====&lt;br /&gt;
*You will get the “too tired” message at 10% stamina now.&lt;br /&gt;
*Stamina now regenerates faster when sitting.&lt;br /&gt;
*Natural armour is now counted as a bonus to normal armour, instead of something that is replaced when you equip bought armour.&lt;br /&gt;
*Now you cannot use “/attack 1” anymore but you should use “/attack bloody” instead.&lt;br /&gt;
*You won’t be able to lure NPCs anymore by just pressing the attack button.&lt;br /&gt;
*A toggle key for running/walking can be used when you have autorun enabled(r), you must enabled it under Options first.&lt;br /&gt;
*Passing a region border no longer stops you from running.&lt;br /&gt;
&lt;br /&gt;
===Engine===&lt;br /&gt;
*Planeshift now uses version 1.2 of The Crystal Space 3D engine and the Crystal Entity Layer environment.&lt;br /&gt;
*Meshes, textures and materials are now deleted when they aren’t needed anymore, this improves memory usage.&lt;br /&gt;
*The client now loads less models and textures during startup causing it to launch much faster, they are loaded on-demand now.&lt;br /&gt;
*Many changes and fixes to map loading and unloading, making it better and faster.&lt;br /&gt;
*Some optimizations in network code to make the server faster.&lt;br /&gt;
&lt;br /&gt;
===Various===&lt;br /&gt;
*You can now trade while sitting.&lt;br /&gt;
*Players can now stack items together regardless of quality and creator.&lt;br /&gt;
*An error message on /unstick now displays how long you have to wait until you can use /unstick again.&lt;br /&gt;
*The /pos command for showing your position now shows your instance too.&lt;br /&gt;
*Advisors can now see who other advisors are.&lt;br /&gt;
*The timeout for advisor sessions has been doubled.&lt;br /&gt;
&lt;br /&gt;
===Fixed Bugs===&lt;br /&gt;
*You can now type in the auction tab again instead of having to use /auction.&lt;br /&gt;
*Several server crashes.&lt;br /&gt;
*Several fixes to make sure players won’t get stuck in instances anymore.&lt;br /&gt;
*Players can now loot when killing mobs with a Damage Over Time spell.&lt;br /&gt;
*Various fixes to the marriage system.&lt;br /&gt;
*The command “z” to sit now always works, sometimes you had to press it twice.&lt;br /&gt;
*Fixes to movement code so you should get stuck less often.&lt;br /&gt;
*Some fixes to the /unstick command&lt;br /&gt;
*Many changes and fixes to the locking and unlocking of doors.&lt;br /&gt;
*It is not possible anymore to fish for gold.&lt;br /&gt;
*Sometimes you had to press “r” twice to enable autorun, this is now made more elegant.&lt;br /&gt;
*The preview of skins now works in pssetup.&lt;br /&gt;
*Advisor messages now actually display the right information.&lt;br /&gt;
*The FPS cap and the distance cap now actually work.&lt;br /&gt;
*You can now close the sketch window with the red cross.&lt;br /&gt;
*If you use quotes (&amp;quot;&amp;quot;) in a sketch, the entire sketch isn&#039;t wiped anymore.&lt;br /&gt;
&lt;br /&gt;
===Know Issues===&lt;br /&gt;
*After a partial stack within the furnace is moved, only the amount that you moved will be melted. The rest can be lost.&lt;br /&gt;
*After all art and engine related changes, users may experience more lag than usual at times. You can fix this by decreasing Distance under &amp;quot;Options--&amp;gt;Graphics--&amp;gt;Details&amp;quot;.&lt;br /&gt;
*When moving to a new map, the progress bar of the loading screen will not show the progress correctly.&lt;br /&gt;
*Some issues with guildhouses access rights.&lt;br /&gt;
*When mouserun is enabled, sometimes clicking on the GUI or on an NPC will cause your character to move too.&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=Molecular_Blue&amp;diff=24959</id>
		<title>Molecular Blue</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=Molecular_Blue&amp;diff=24959"/>
		<updated>2025-06-10T17:49:45Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Molecular Blue&#039;&#039;&#039; is the code name that was given ex post to the second major releases of [[PlaneShift]].&lt;br /&gt;
&lt;br /&gt;
The first numbered release documented in the news [http://www.planeshift.it/news_2003.html] was&lt;br /&gt;
0.2.007 the previous releases are dealt with here as 0.2.000+.&lt;br /&gt;
[[File:Mbsplash.jpg|none|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Screenshots==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:PSMB-1.jpg|View over Hydlaa&lt;br /&gt;
Image:PSMB-2.jpg|At Jayose&#039;s&lt;br /&gt;
Image:PSMB-3.jpg|Players at the Laanx well&lt;br /&gt;
Image:PSMB-4.jpg|The Laanx caves&lt;br /&gt;
Image:PSMB-5.jpg|North gate&lt;br /&gt;
Image:PSMB-6.jpg|Tavern&lt;br /&gt;
Image:PSMB-7.jpg|Jayose and a customer&lt;br /&gt;
Image:PSMB-8.jpg|Laanx temple&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==0.2.000+==&lt;br /&gt;
{{Calendar|7|March|2003}}&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.2.007==&lt;br /&gt;
{{Calendar|14|March|2003}}&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
==0.2.010==&lt;br /&gt;
{{Calendar|14|April|2003}}&lt;br /&gt;
&lt;br /&gt;
{{ClearBreak}}&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Mbsplash.jpg&amp;diff=24958</id>
		<title>File:Mbsplash.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Mbsplash.jpg&amp;diff=24958"/>
		<updated>2025-06-10T17:48:13Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Shot_combat.jpg&amp;diff=24957</id>
		<title>File:Shot combat.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Shot_combat.jpg&amp;diff=24957"/>
		<updated>2025-06-10T17:47:48Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb4.jpg&amp;diff=24956</id>
		<title>File:Cb4.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb4.jpg&amp;diff=24956"/>
		<updated>2025-06-10T17:47:40Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb3.jpg&amp;diff=24955</id>
		<title>File:Cb3.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb3.jpg&amp;diff=24955"/>
		<updated>2025-06-10T17:47:31Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb2.jpg&amp;diff=24954</id>
		<title>File:Cb2.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb2.jpg&amp;diff=24954"/>
		<updated>2025-06-10T17:47:22Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb1.jpg&amp;diff=24953</id>
		<title>File:Cb1.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Cb1.jpg&amp;diff=24953"/>
		<updated>2025-06-10T17:47:14Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=File:Cbsplash.jpg&amp;diff=24952</id>
		<title>File:Cbsplash.jpg</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=File:Cbsplash.jpg&amp;diff=24952"/>
		<updated>2025-06-10T17:47:02Z</updated>

		<summary type="html">&lt;p&gt;Talad: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift&amp;diff=24951</id>
		<title>PlaneShift</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PlaneShift&amp;diff=24951"/>
		<updated>2025-06-10T17:46:11Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PlaneShift is a Massively Multiplayer Online Role Playing Game immersed in a 3D virtual fantasy world which is FULLY FREE to play. There are no limitations in skills, ranks, abilities, items you can gain with your free account; no time limits; no locked premium content or additional constraints. Servers and bandwidth are donated by sponsors. The developers, Atomic Blue, are a group of RPG enthusiasts whose efforts and contributions are voluntary, not paid.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
At the present state of development, PlaneShift is not a complete game, but it has all the systems needed for enjoyable play, including combat, magic, crafting, quests and detailed settings. A downloadable client program allows you to to immerse your character in vibrant 3D surroundings. Today you can explore the virtual world, interact with other players or with server controlled creatures, fight monsters, cast spells, solve quests and puzzles, improve your character, gain magical items, craft new items and more. The game is still under heavy development, so you may easily find bugs, glitches and missing features. Our model is to keep the game open for the public, so you can give feedback on the features you want us to develop and help shape the future of the game. We are working to create an interactive world with politics and an economy, and improve the artificial intelligence of server-controlled non-player-characters that bring our world to life!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our virtual domain is persistent, and this means you can connect to it at any hour of the day and you will always find players and NPCs wandering our realms. Your character and progress is stored on the server, so you never have to worry about saving the game. A player can start from humble beginnings and advance to greatness in whatever path they may choose.&lt;br /&gt;
&lt;br /&gt;
Remember that PlaneShift is a Role Playing Game - be sure to read our Roleplay guidelines! We think the RPG part of the MMORPG definition has a meaning!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PlaneShift is Open Source for the client and server code, so anyone can contribute to its development! If you want to help, see how to join our team [http://www.planeshift.it/Join%20Us here], or consider making a [http://www.planeshift.it/Donate donation].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Idea and previous history==&lt;br /&gt;
The history of PlaneShift before it became 3D is described in [[PlaneShift2D]].&lt;br /&gt;
&lt;br /&gt;
==Versions==&lt;br /&gt;
&lt;br /&gt;
===[[Atomic Blue]] (0.1)===&lt;br /&gt;
The very first PlaneShift version.&lt;br /&gt;
&lt;br /&gt;
2 May 2002&lt;br /&gt;
&lt;br /&gt;
===[[Molecular Blue]] (0.2)===&lt;br /&gt;
The second version of PlaneShift.&lt;br /&gt;
&lt;br /&gt;
7 March 2003&lt;br /&gt;
&lt;br /&gt;
===[[Crystal Blue]] (0.3)===&lt;br /&gt;
Tria is now the new currency. Ojaveda is born and the first Dsar, Akkaio, is added as home of all Enkidukai. Over the course of development the first craftings are introduced.&lt;br /&gt;
&lt;br /&gt;
24 December 2004&lt;br /&gt;
&lt;br /&gt;
===[[Steel Blue]] (0.4)===&lt;br /&gt;
Gugrontid the home town of Kran was added.&lt;br /&gt;
&lt;br /&gt;
3 March 2008&lt;br /&gt;
&lt;br /&gt;
===[[Arcane Chrysalis]] (0.5)===&lt;br /&gt;
&lt;br /&gt;
===[[Azure Spirit]] (0.6)===&lt;br /&gt;
Current version. Male [[Nolthrir]] model and 11 new [[Ingame_Help#Magic.2C_Glyphs_and_Spells|spells]] were added; a new map, a new creature and many platinum-steel weapons ([[crafting]]) are now available; many [[NPC]] behaviours were updated (so newly created characters will not be attacked by relatively weak, but aggressive, NPCs able to kill them).&lt;br /&gt;
&lt;br /&gt;
==Game features==&lt;br /&gt;
The following list represents some of the features of the final product. Please remember that today PlaneShift is still under heavy development.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 10 playable races with unique traits!&lt;br /&gt;
* Unlimited professions through a skill system&lt;br /&gt;
* Original magic system with six Ways of magic&lt;br /&gt;
* Hundreds of spells&lt;br /&gt;
* Numerous huge worlds to explore&lt;br /&gt;
* A great number of quests to test your wit and skill&lt;br /&gt;
* Monsters and NPCs with good AI that produce game events&lt;br /&gt;
* A world that evolves with or without player interaction&lt;br /&gt;
* Own your guild house&lt;br /&gt;
* Politics and economy&lt;br /&gt;
* ... and much much more!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:PS History|!]]&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
	<entry>
		<id>https://planeshift.top-ix.org//pswiki/index.php?title=PS_Voiceovers&amp;diff=24950</id>
		<title>PS Voiceovers</title>
		<link rel="alternate" type="text/html" href="https://planeshift.top-ix.org//pswiki/index.php?title=PS_Voiceovers&amp;diff=24950"/>
		<updated>2025-06-04T19:30:20Z</updated>

		<summary type="html">&lt;p&gt;Talad: /* Dryken entity (second try): */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== &#039;&#039;&#039;Introduction&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The current PlaneShift release allows Non Player Character voices. The NPCs can greet and speak with players using real voices.&lt;br /&gt;
&lt;br /&gt;
We want as first step to have greetings of all NPCs in game voiced.&lt;br /&gt;
&lt;br /&gt;
We may or may not use accents depending on availability of voice donors, anyway some accents can be made up, and that’s ok.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accents by race:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
NOTE: a voiceover is better than no voiceover. So the list below is what we would like to have, but we can still use just your voice for any character.&lt;br /&gt;
&lt;br /&gt;
* Ylian: American English/Southern&lt;br /&gt;
* Nolthrir: Spanish (fallback italian)&lt;br /&gt;
* Dermorian: French ([https://accent.gmu.edu/browse_language.php?function=detail&amp;amp;speakerid=1729 male sample] [https://accent.gmu.edu/browse_language.php?function=detail&amp;amp;speakerid=2536 female sample])&lt;br /&gt;
* Stonebreaker/Hammerwielder: Scottish/Irish (fallback german)&lt;br /&gt;
* Diaboli: Eastern European ([http://accent.gmu.edu/browse_language.php?function=detail&amp;amp;speakerid=299 male sample] [http://accent.gmu.edu/browse_language.php?function=detail&amp;amp;speakerid=305 female sample]) (fallback german or scottish/irish)&lt;br /&gt;
* Kran: American English but run through a metallic filter (fallback american english)&lt;br /&gt;
* Klyros: Italian&lt;br /&gt;
* Enkidukai: Arabic / Asian&lt;br /&gt;
* Lemur: British English&lt;br /&gt;
&lt;br /&gt;
Should we use indian, chinese or japanese? Those are pretty recognizeable.&lt;br /&gt;
&lt;br /&gt;
For instructions on how to record a voiceover please [http://planeshift.ezpcusa.com/voice/ click here].&lt;br /&gt;
&lt;br /&gt;
== How to make an accent? ==&lt;br /&gt;
&lt;br /&gt;
Well, it&#039;s better if you are from the specific country, but some accents can be faked.&lt;br /&gt;
&lt;br /&gt;
[http://accent.gmu.edu/browse_language.php Here is a great resource] of accents all over the world. We should select the best clips and add it to the list above.&lt;br /&gt;
&lt;br /&gt;
Also if you think you have an accent record it!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to pronounce special names and locations ==&lt;br /&gt;
&lt;br /&gt;
Here is a short clip on how I (Luca) pronounce the names of races and few places. If you do a voiceover will be good to use those.&lt;br /&gt;
&lt;br /&gt;
[http://www.planeshift.it/download/prospects/ps_spelling_names.mp3 Names pronunciation]&lt;br /&gt;
&lt;br /&gt;
== Tutorial voiceover ==&lt;br /&gt;
&lt;br /&gt;
The tutorial has been improved with some small but important changes, and we need to re-record the voices to follow the new text for the following NPCs.&lt;br /&gt;
&lt;br /&gt;
Please read the transcripts and submit your samples.&lt;br /&gt;
&lt;br /&gt;
Abelia: Ynnwn female ( [[full Abelia transcript]] ) DONE! by VideoSymphony&lt;br /&gt;
&lt;br /&gt;
Naeve: Hammerwielder female ( [[full Naeve transcript]] ) DONE! by PS player&lt;br /&gt;
&lt;br /&gt;
Ibhaar: Ynnwn male ( [[full Ibhaar transcript]] ) DONE! by VideoSymphony&lt;br /&gt;
&lt;br /&gt;
Orphia: Dermorian female ( [[full Orphia transcript]] ) DONE! edited old voice&lt;br /&gt;
&lt;br /&gt;
Xargon: Klyros male ( [[full Xargon transcript]] ) DONE! by PS devs&lt;br /&gt;
&lt;br /&gt;
Xenak: Klyros male ( [[full Xenak transcript]] ) DONE! by PS devs&lt;br /&gt;
&lt;br /&gt;
Please sign up and discuss about it [http://www.hydlaaplaza.com/smf/index.php?topic=38600.0 here].&lt;br /&gt;
&lt;br /&gt;
To submit a sample of your voice, please use [http://planeshift.ezpcusa.com/voice/ this page]. We will contact you soon!&lt;br /&gt;
&lt;br /&gt;
== Greetings/Goodbye ==&lt;br /&gt;
&lt;br /&gt;
We want to have the greetings and goodbyes recorded for all our NPCs.&lt;br /&gt;
&lt;br /&gt;
To find out the phrases they use do the following:&lt;br /&gt;
* install the game!&lt;br /&gt;
* log in game and choose one NPC&lt;br /&gt;
* click on him, then go to the chat windows, and select the NPC tab, and type &amp;quot;Hi&amp;quot;. he will answer with some text.&lt;br /&gt;
* Retype &amp;quot;Hi&amp;quot; few times and he will probably answer with different phrases (usually there are 1-3).&lt;br /&gt;
* Record the audio for the phrases you got.&lt;br /&gt;
* accents as above. upload as above.&lt;br /&gt;
* Edit this page and type in the NPC name you recorded, so others will know that&#039;s done already.&lt;br /&gt;
* Do the same with &amp;quot;goodbye&amp;quot;, most NPC miss the &amp;quot;goodbye&amp;quot;, so you will most likely get a standard answer taken from the general response database.&lt;br /&gt;
&lt;br /&gt;
== Notes for Audacity ==&lt;br /&gt;
&lt;br /&gt;
=== Robot voice: ===&lt;br /&gt;
&lt;br /&gt;
* Delay: delay level per echo -10 , delay time 0.01 , pitch/tempo, pitch change 0, Number of echoes 30, allow duration YES.&lt;br /&gt;
* Ctrl+R (10 times)&lt;br /&gt;
* Normalize, normalize peak to -1.0 dB&lt;br /&gt;
* Pitch -&amp;gt; -26 Percent change&lt;br /&gt;
* Reverb -&amp;gt; Room size 20%, Pre delay 15, Reverb 50%, Damping 50%, Tone Low 68, Tone High 100, Wet Gain -2, Dry Gain -1, Stereo Width 83%&lt;br /&gt;
&lt;br /&gt;
=== Dryken entity: ===&lt;br /&gt;
&lt;br /&gt;
* Pitch -&amp;gt; -20%&lt;br /&gt;
* PaulStretch -&amp;gt; 2.0, 0.2&lt;br /&gt;
* Change Tempo -&amp;gt; +50 percent change&lt;br /&gt;
* Bass and Treble -&amp;gt; Bass: +12 Treble: -5&lt;br /&gt;
* Reverb -&amp;gt; Room size 42%, Pre delay 80, Reverb 60%, Damping 50%, Tone Low 74, Tone High 77, Wet Gain -2, Dry Gain -3, Stereo Width 50%&lt;br /&gt;
&lt;br /&gt;
=== Dryken entity (second try): ===&lt;br /&gt;
&lt;br /&gt;
*Pitch -&amp;gt; -20%&lt;br /&gt;
* Tremolo -&amp;gt; Triangle, start: 10, wet:50, frequency: 45&lt;br /&gt;
&lt;br /&gt;
=== Kran voice: ===&lt;br /&gt;
&lt;br /&gt;
*Pitch -&amp;gt; -3 semitones&lt;br /&gt;
*Volume -2db&lt;br /&gt;
* Duplicate track, on second track:&lt;br /&gt;
** Tremolo -&amp;gt; Triangle, start: 10, wet:90, frequency: 35&lt;br /&gt;
** Effect-&amp;gt;Invert&lt;br /&gt;
** Volume -6db&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Others:&lt;br /&gt;
&lt;br /&gt;
Tremolo -&amp;gt; Sine , 53, 94, 40&lt;br /&gt;
&lt;br /&gt;
== Tests on AI voice generation (May 2025) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Service&lt;br /&gt;
!Custom voice design through prompt&lt;br /&gt;
!Supports all our accents&lt;br /&gt;
!Emotions&lt;br /&gt;
!Sounds&lt;br /&gt;
!Age&lt;br /&gt;
!voice type&lt;br /&gt;
!Save Voice for later use&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Resemble AI&#039;&#039;&#039;&lt;br /&gt;
|YES&lt;br /&gt;
|Indian good, scottish good, spanish bad, italian mixed (one voice very cartoonish &amp;quot;but a now&amp;quot;) other bad, french bad, british good, german ok, japanese the best. South american good, ukrainian good.&lt;br /&gt;
|excited good, scared good&lt;br /&gt;
|(hums) +(murmurs) +&lt;br /&gt;
(sighs)&lt;br /&gt;
(sobs) +&lt;br /&gt;
(grunts)&lt;br /&gt;
(whinces) +&lt;br /&gt;
(moans) -&lt;br /&gt;
(babbles) +&lt;br /&gt;
|Young so so, Old ok&lt;br /&gt;
|Raspy so so&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|ElevenLabs&lt;br /&gt;
|YES&lt;br /&gt;
|Indian so so , scottish so so, spanish bad, italian bad, french zero, british bad, german zero, japanese zero, chinese zero, south american zero, ukrainian zero.&lt;br /&gt;
|excited good, sad good, scared zero.&lt;br /&gt;
|&lt;br /&gt;
|Young good, Old good&lt;br /&gt;
|Raspy so so&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|Hume AI&lt;br /&gt;
|YES&lt;br /&gt;
|tried ukraine, france, spanish, german, all basically zero.&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|YES&lt;br /&gt;
|-&lt;br /&gt;
|Replica Studios&lt;br /&gt;
|Partially, starts from prompt, but then seems to just mix existing voices&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|PlayHT&lt;br /&gt;
|NO, only predefined&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Murf.ai&lt;br /&gt;
|NO, only predefined&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Lovo.ai&lt;br /&gt;
|NO, only predefined&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|minimax.io/audio&lt;br /&gt;
|NO, only predefined&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Talad</name></author>
	</entry>
</feed>