<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.larian.game/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LarIlya</id>
	<title>Divinity Engine Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.larian.game/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LarIlya"/>
	<link rel="alternate" type="text/html" href="https://docs.larian.game/Special:Contributions/LarIlya"/>
	<updated>2026-04-19T21:18:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://docs.larian.game/index.php?title=Voice_Bark_editor&amp;diff=6667</id>
		<title>Voice Bark editor</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Voice_Bark_editor&amp;diff=6667"/>
		<updated>2019-09-17T15:07:59Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The voicebark editor ==&lt;br /&gt;
Voicebarks are a system to play an automated dialog for party members, selected based on their tags. This means that in itself, a voicebark is not a dialogue. Rather, it is a set of rules by which an AD can be selected for the player characters to speak.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:VBEditor.png|1400px]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; When a voicebark is played from a character (typically, with the [[Osiris/API/StartVoiceBark|StartVoiceBark]] Story call or [[Character_and_Item_Script_Triggers,_Calls,_and_Queries|behaviour script]] call), the system selects the first (topmost) AD for which it can find appropriate speakers (having all of the tags in the 'Allow' column and none in the 'Deny column'), and plays that AD with those speakers. Note that, if their companions have tags which are preferred over that character's own, the character from whom the voicebark originates (the 'target character') will not be part of the selected AD. To be considered, speakers need to be:&lt;br /&gt;
* Player characters&lt;br /&gt;
* In the same party as the target character&lt;br /&gt;
* Within 10 meters of the target character&lt;br /&gt;
* Not summons or party followers&lt;br /&gt;
* Not already in a dialog&lt;br /&gt;
* Not a ghost&lt;br /&gt;
* Not charmed&lt;br /&gt;
* Alive&lt;br /&gt;
* Visible and not sneaking&lt;br /&gt;
* On-stage&lt;br /&gt;
No AD is started if the requested Voicebark does not exist, if the target character is not a player or does not exist, or if no set of fitting characters is found. Story will get a [[Osiris/API/VoiceBarkFailed|VoiceBarkFailed]] event. Otherwise, a [[Osiris/API/VoiceBarkStarted|VoiceBarkStarted]] event is sent, along with the usual events that accompany the start of an AD.&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris_Overview&amp;diff=6508</id>
		<title>Osiris Overview</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris_Overview&amp;diff=6508"/>
		<updated>2019-02-04T12:50:16Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: /* Rule Evaluation State */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Osiris is a mostly declarative programming language, similar to [https://en.wikipedia.org/wiki/Prolog Prolog] in some ways. While it is somewhat counter-intuitive at first if you are not used to declarative programming, the language itself is quite simple and only has a few constructs. Its power mainly stems from its access to a very large number of [[:Category:Osiris_APIs|APIs]] (note: work-in-progress; there are 879 Osiris APIs at the time of writing). These APIs allow you to react to things that happen ([[:Category:Osiris_Events|events]]), to obtain information about the current game state ([[:Category:Osiris_Queries|queries]]), and to change the game state ([[:Category:Osiris_Calls|calls]]).&lt;br /&gt;
&lt;br /&gt;
If you are familiar with databases, you can think of an Osiris program as a collection of rules that operate on a single, game-wide database. The rules dynamically add and remove tables and rows in reaction to other database entries getting modified. Additionally, they can also react to game state changes, query the game state, and change the game state. Note that the tables are actually referred to as &amp;quot;databases&amp;quot; in Osiris, so below we will talk about defining databases rather than tables. Adding a row to a table is generally referred to as &amp;quot;defining a fact&amp;quot;, although &amp;quot;defining a database&amp;quot; or &amp;quot;defining a database entry&amp;quot; is also used from time to time.&lt;br /&gt;
&lt;br /&gt;
Here is an example Osiris code fragment:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INIT&lt;br /&gt;
	DB_MyPrefix_Fruit(&amp;quot;Apple&amp;quot;);		// Defines the database DB_MyPrefix_Fruit with one column of type STRING, and adds a fact consisting of the string &amp;quot;Apple&amp;quot; to it.&lt;br /&gt;
	DB_MyPrefix_Fruit(&amp;quot;Pear&amp;quot;);		// Adds another fact to the DB_MyPrefix_Fruit database.&lt;br /&gt;
	DB_MyPrefix_Fruit(&amp;quot;Banana&amp;quot;);		// And one more.&lt;br /&gt;
KB&lt;br /&gt;
	IF					// Osiris rules always start with IF&lt;br /&gt;
	DB_MyPrefix_Fruit(_SomeFruit)		// This rule will fire when any database with the name &amp;quot;DB_MyPrefix_Fruit&amp;quot; gets defined.&lt;br /&gt;
						// The name of the fruit will be stored in (bound to) the _SomeFruit variable.&lt;br /&gt;
	THEN					// &amp;quot;THEN&amp;quot; indicates that the rule conditions have finished, and the rule actions follow.&lt;br /&gt;
	DB_MyPrefix_AtLeastOneFruit(1);		// We define a new database with the name &amp;quot;DB_MyPrefix_AtLeastOneFruit&amp;quot; and type INTEGER,&lt;br /&gt;
						// and add a fact with the integer value 1 to it. Since there are three rows in the&lt;br /&gt;
						// DB_MyPrefix_Fruit database, this action will execute three times. However, as the value&lt;br /&gt;
						// is always the same (1), in the end the DB_MyPrefix_AtLeastOneFruit database will&lt;br /&gt;
						// contain only a single fact, which consists of the value 1.&lt;br /&gt;
&lt;br /&gt;
	IF&lt;br /&gt;
	DB_MyPrefix_Fruit(&amp;quot;Pear&amp;quot;)		// This rule will fire when DB_MyPrefix_Fruit(&amp;quot;Pear&amp;quot;) gets defined.&lt;br /&gt;
	AND					// Osiris rule conditions can only be combined with AND, not with OR. There is&lt;br /&gt;
						// another ways to implement OR-conditions though, explained below (user-defined queries).&lt;br /&gt;
	NOT DB_MyPrefix_Fruit(&amp;quot;Lemon&amp;quot;)		// This rule's actions will only execute if no DB_MyPrefix_Fruit(&amp;quot;Lemon&amp;quot;) entry exists.&lt;br /&gt;
	THEN&lt;br /&gt;
	DB_MyPrefix_PearNoLemon(1);&lt;br /&gt;
&lt;br /&gt;
EXIT&lt;br /&gt;
	NOT DB_MyPrefix_Fruit(&amp;quot;Apple&amp;quot;);		// Remove the &amp;quot;Apple&amp;quot; fact from the DB_MyPrefix_Fruit when the goal completes.&lt;br /&gt;
	NOT DB_MyPrefix_Fruit(&amp;quot;Pear&amp;quot;);		// Removing databases that are no longer used anywhere else after a goal completes&lt;br /&gt;
	NOT DB_MyPrefix_Fruit(&amp;quot;Banana&amp;quot;);	// reduces savegame sizes and speeds up the game.&lt;br /&gt;
&lt;br /&gt;
	NOT DB_MyPrefix_AtLeastOneFruit(1);	// Even if some of these databases would not exist, removing them would not result&lt;br /&gt;
	NOT DB_MyPrefix_AtLeastOneFruit(1);	// in an error. Removing a non-existent database is simply ignored.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you do not type '''INIT''', '''KB''' and '''EXIT''' in the [[Story_editor|story editor]]. These sections are represented by the separate panes that you see when opening a goal for editing.&lt;br /&gt;
&lt;br /&gt;
= Program Structure =&lt;br /&gt;
An Osiris program is called a '''''Story'''''. A story consists of all (story) '''''Goals''''' for the current mod and its dependencies. E.g., the main game mod (DivinityOrigins) depends on the Shared mod, so the story of the main game includes all goals from both mods.&lt;br /&gt;
&lt;br /&gt;
A goal is a plain text file with three sections:&lt;br /&gt;
; INIT : The INIT section contains [[#Actions|actions]] that are executed when the goal [[#Goal_Initialisation_and_Completion|initialises]].&lt;br /&gt;
; KB : The KB section, or knowledge base, contains [[#Rules|rules]] that become active as soon as the goal starts [[#Goal_Initialisation_and_Completion|initialising]]. This means that the rules in the KB section can react to changes made in the INIT section of the same goal. The KB section cannot contain [[#Actions|actions]] outside rule bodies.&lt;br /&gt;
; EXIT : The EXIT section contains [[#Actions|actions]] that are executed when the goal [[#Goal_Initialisation_and_Completion|completes]].&lt;br /&gt;
&lt;br /&gt;
== Types ==&lt;br /&gt;
Osiris supports ten different types:&lt;br /&gt;
; INTEGER : A 32-bit integer number. Examples: -4, 0, 10.&lt;br /&gt;
; INTEGER64 : A 64-bit integer number. Examples: -99999999999, -4, 0, 10, 12345678901.&lt;br /&gt;
; REAL : A single precision floating point number. Examples: -10.0, -0.1, 0.0, 0.5, 100.123.&lt;br /&gt;
; STRING : A character string. Examples: &amp;quot;A&amp;quot;, &amp;quot;ABC&amp;quot;, &amp;quot;_This is a string_&amp;quot;.&lt;br /&gt;
; GUIDSTRING : A [https://en.wikipedia.org/wiki/Guid GUID] that refers to an object, or sometimes [[Modding:_Root_templates|root template]], in the game. This object can be any of the specialised GUID-types below. Examples: 123e4567-e89b-12d3-a456-426655440000, MyObjectName_123e4567-e89b-12d3-a456-426655440000, CHARACTERGUID_MyObjectName_123e4567-e89b-12d3-a456-426655440000. Osiris in fact only uses the GUID itself. Anything before it (as long as it does not contain &amp;quot;-&amp;quot;) gets ignored by the compiler, and is only there to improve the readability of the code. This ensures that if you rename an object in game, its related scripting won't break.&lt;br /&gt;
; CHARACTERGUID : A GUIDSTRING referring to a [[Entity_types|character]] object in the game. Examples: (CHARACTERGUID)123e4567-e89b-12d3-a456-426655440000, (CHARACTERGUID)MyObjectName_123e4567-e89b-12d3-a456-426655440000, (CHARACTERGUID)CHARACTERGUID_MyObjectName_123e4567-e89b-12d3-a456-426655440000&lt;br /&gt;
; ITEMGUID : A GUIDSTRING referring to an [[Entity_types|item]] object in the game. &lt;br /&gt;
; TRIGGERGUID : A GUIDSTRING referring to a [[Entity_types|trigger]] object in the game. &lt;br /&gt;
; SPLINEGUID : A GUIDSTRING referring to a [[Entity_types|spline]] object in the game. &lt;br /&gt;
; LEVELTEMPLATEGUID : A GUIDSTRING referring to a [[Entity_types|level template]] object in the game. &lt;br /&gt;
&lt;br /&gt;
The specialised GUID-types all inherit from GUIDSTRING, and you can cast a GUIDSTRING to any of the specific types by adding ''(ITEMGUID)'' and the like in front of it. Note that while [[Story_editor#Code_editing_helper_functionality|code-completion]] will prepend the object type to the object name in the form of ''ITEMGUID_'', this does ''not'' define or change the type in any way to the Osiris compiler.&lt;br /&gt;
&lt;br /&gt;
{{warning|When you wish to refer to objects/local instances from script or elsewhere, make sure to follow the [[Templates_explanation#Local_instances.2Ftemplates|correct naming convention]].}}&lt;br /&gt;
&lt;br /&gt;
== Databases ==&lt;br /&gt;
Osiris '''''databases''''' consist of a database name, which must start with ''DB_'', and one or more [[#Types|typed]] columns. As there is only one namespace (= all database names defined in all goals from all mods must be unique), it is a good idea to follow the ''DB_'' by a prefix that is unique to your mod or goal. Every entry that gets added to a database is called a '''''fact'''''. The structure of a fact definition is&lt;br /&gt;
 '''DB_'''''Prefix_DatabaseName'''''('''''TypedValue1''[''','''''TypedValue2''..]''');'''&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Type: String&lt;br /&gt;
DB_Overview_StringDB(&amp;quot;SomeString&amp;quot;);&lt;br /&gt;
DB_Overview_StringDB(&amp;quot;AnotherString&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Type: float&lt;br /&gt;
DB_Overview_FloatDB(1.0);&lt;br /&gt;
&lt;br /&gt;
// Type: Integer, String&lt;br /&gt;
DB_Overview_IntegerStringDB(0, &amp;quot;String0&amp;quot;);&lt;br /&gt;
DB_Overview_IntegerStringDB(1, &amp;quot;String1&amp;quot;);&lt;br /&gt;
DB_Overview_IntegerStringDB(1, &amp;quot;String1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Type: GUIDSTRING (not CHARACTERGUID, because no typecast)&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Beast_f25ca124-a4d2-427b-af62-df66df41a978);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_RedPrince_a26a1efb-cdc8-4cf3-a7b2-b2f9544add6f);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Sebille_c8d55eaf-e4eb-466a-8f0d-6a9447b5b24c);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Fane_02a77f1f-872b-49ca-91ab-32098c443beb);&lt;br /&gt;
&lt;br /&gt;
// Type: CHARACTERGUID, String&lt;br /&gt;
DB_Overview_Origins((CHARACTERGUID)CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f, &amp;quot;IFAN&amp;quot;);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Beast_f25ca124-a4d2-427b-af62-df66df41a978, &amp;quot;BEAST&amp;quot;);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Lohse_bb932b13-8ebf-4ab4-aac0-83e6924e4295, &amp;quot;LOHSE&amp;quot;);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_RedPrince_a26a1efb-cdc8-4cf3-a7b2-b2f9544add6f, &amp;quot;RED PRINCE&amp;quot;);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Sebille_c8d55eaf-e4eb-466a-8f0d-6a9447b5b24c, &amp;quot;SEBILLE&amp;quot;);&lt;br /&gt;
DB_Overview_Origins(CHARACTERGUID_S_Player_Fane_02a77f1f-872b-49ca-91ab-32098c443beb, &amp;quot;FANE&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the last example shows it is possible to overload databases: you can have multiple databases with the same name. The only requirement is that they have a different number columns (parameters). Also note that this last example only includes a ''(CHARACTERGUID)'' typecast for the first row. That is sufficient because the compiler uses the first occurrence of a database in story to determine the types. It will then typecast the values in any further occurrences of this database to the type it determined from the first declaration. Since a GUIDSTRING can be typecasted into a CHARACTERGUID, this works fine here. This is an important rule to keep in mind, as it is a frequent source of type errors when you're just starting out.&lt;br /&gt;
&lt;br /&gt;
Removing database facts can be done using the NOT-operator:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NOT DB_Overview_StringDB(&amp;quot;SomeString&amp;quot;);&lt;br /&gt;
NOT DB_Overview_StringDB(&amp;quot;AnotherString&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rules ==&lt;br /&gt;
A '''''Rule''''' consist of one or more [[#Trigger_Conditions|trigger conditions]], a number of optional [[#Extra_Conditions|extra conditions]], and finally one or more [[#Actions|actions]]. A rule is evaluated whenever one of its trigger conditions get becomes fulfilled. If all trigger and extra conditions are fulfilled at that point, the actions of this rule are executed.&lt;br /&gt;
&lt;br /&gt;
The structure of a rule is as follows:&lt;br /&gt;
 '''IF'''&lt;br /&gt;
 ''TriggerCondition''&lt;br /&gt;
 [&lt;br /&gt;
 '''AND'''&lt;br /&gt;
 ''TriggerCondition | ExtraCondition''&lt;br /&gt;
 ]&lt;br /&gt;
 [&lt;br /&gt;
 '''AND'''&lt;br /&gt;
 ''TriggerCondition | ExtraCondition''&lt;br /&gt;
 ..&lt;br /&gt;
 ]&lt;br /&gt;
 '''THEN'''&lt;br /&gt;
 ''Action1''''';'''&lt;br /&gt;
 [&lt;br /&gt;
 ''Action2''''';'''&lt;br /&gt;
 ..&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
You can have multiple rules that check on the same trigger conditions. They will all be executed when the trigger conditions are satisfied.&lt;br /&gt;
&lt;br /&gt;
=== Trigger Conditions ===&lt;br /&gt;
There are two categories of trigger conditions:&lt;br /&gt;
; Osiris Event : The game informs Osiris that a particular [[:Category:Osiris_Events|event]] has occurred. '''Warning''': an event can only be used as the '''''first''''' trigger condition. Putting it at any other place in a rule condition will result in a compilation error.&lt;br /&gt;
; Database : A new database fact has been ''added''. ''Removing'' a database fact can be a trigger condition, but not the first one. Database fact trigger conditions can appear anywhere in a condition.&lt;br /&gt;
&lt;br /&gt;
Note that you can check multiple databases as part of your trigger conditions, and the rule's trigger conditions will be considered as fulfilled as soon as all database checks succeed. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_IsPlayer(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)	// Trigger condition&lt;br /&gt;
AND&lt;br /&gt;
DB_Dead(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)	// Trigger condition&lt;br /&gt;
THEN&lt;br /&gt;
DB_IfanIsDeadAsAPlayer(1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This rule will trigger when ''DB_IsPlayer()'' is defined for Ifan first and then his ''DB_Dead()'', but also if they are defined in the opposite order. Second example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_IsPlayer(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)	// Trigger condition&lt;br /&gt;
AND&lt;br /&gt;
NOT DB_Dead(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)	// Trigger condition&lt;br /&gt;
THEN&lt;br /&gt;
DB_IfanIsAliveAsAPlayer(1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This rule will trigger when ''DB_IsPlayer()'' is defined for Ifan while no ''DB_Dead()'' fact was defined for him. However, it will also trigger if initially both ''DB_IsPlayer()'' and ''DB_Dead()'' were defined for him, and later on the ''DB_Dead()'' fact gets removed.&lt;br /&gt;
&lt;br /&gt;
=== Extra Conditions ===&lt;br /&gt;
Extra conditions are any conditions that are checked as part of a rule, but that are not trigger conditions:&lt;br /&gt;
; Osiris Query : Osiris can [[:Category:Osiris_Queries|query]] the game engine about many aspects of the current game state, or the state of an object.&lt;br /&gt;
; User Query : You can also define [[#Queries|your own queries]] in Osiris. This way you can implement OR-conditions.&lt;br /&gt;
; Comparison: You can use the comparison operators '''==''' (equals), '''!=''' (different), '''&amp;lt;=''', '''&amp;lt;''', '''&amp;gt;''' and '''&amp;gt;=''' as a condition. [[#Types|GUIDSTRING]] and its descendent types can only be compared for (non-)equality, while the other types can also be used with the other comparison operators.&lt;br /&gt;
; Any condition following a [[:Category:Osiris_Events|game engine event]] : Events are sent by the game engine to Osiris whenever specific things happen (a character dies, and item has been picked up, ...). Only when this happens, the extra conditions below that event get checked.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
CharacterDied(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)		// Trigger condition&lt;br /&gt;
AND&lt;br /&gt;
NOT DB_IsPlayer(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)	// Extra condition&lt;br /&gt;
THEN&lt;br /&gt;
DB_IfanDiedAsAPlayer(1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this case, ''DB_IfanDiedAsAPlayer(1)'' will only be defined if the ''CharacterDied'' event arrives while Ifan was not in the ''DB_IsPlayer'' database. If you remove him from that database after he died the rule will not re-evaluated, because only the ''CharacterDied'' event is part of the trigger conditions (and this event will not be sent again if he is already dead).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_IsPlayer(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)		// Trigger condition&lt;br /&gt;
AND&lt;br /&gt;
CharacterIsDead(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f, 0)	// Extra condition&lt;br /&gt;
AND&lt;br /&gt;
DB_Avatars(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)            // Trigger condition (!)&lt;br /&gt;
THEN&lt;br /&gt;
DB_IfanIsAnAvatarPlayerAndNotDead(1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''CharacterIsDead'' is a query that takes two parameters: a CHARACTERGUID and an integer. The integer indicates whether the character is dead (1) or not (0). If all parameters match, the query condition will succeed. This means that the above rule succeeds in case ''CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f'' is not dead at the time he first appears in both the ''DB_IsPlayer'' and ''DB_Avatars'' databases. As mentioned earlier, it does not matter in which order he gets added to these databases. As soon as both facts are defined, the rule triggers and the extra condition(s) will be evaluated. If these extra conditions succeed, the actions in the rules section will be executed.&lt;br /&gt;
&lt;br /&gt;
On the other hand, if both database facts would already be defined and then Ifan gets resurrected (so '''CharacterIsDead(IFan, 0)''' would now succeed if it were called), the rule will not trigger. The reason is that it only get (re)evaluated when all of the trigger conditions become fulfilled (in this case, Ifan gets added to both databases). This also demonstrates the main difference between queries and events:&lt;br /&gt;
* Events are triggered when the game state changes, but you cannot call them yourself.&lt;br /&gt;
* Queries allow you to request information about the game state at any point, but they never get automatically triggered/(re)evaluated.&lt;br /&gt;
&lt;br /&gt;
=== Actions ===&lt;br /&gt;
All statements in the '''INIT''' and '''FINI''' sections must be actions. Additionally, at the end of a [[#Rule|rule]] you must also put at least one action. Every action ends in a semi-colon (''';''').&lt;br /&gt;
&lt;br /&gt;
Actions can make changes to both the Osiris program state and the game state:&lt;br /&gt;
; Osiris Call : Osiris can [[:Category:Osiris_Calls|call]] into the game engine to perform all kinds of changes to the current game state, either globally or specific to certain objects.&lt;br /&gt;
; Procedure : You can group conditions and actions in a [[#Procedures|procedure]] and call that from multiple locations.&lt;br /&gt;
; Database : As shown in the examples above, a new database fact can be added in an action by placing it there, followed by a semi-colon. You can also remove database facts by prepending them with '''NOT'''.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_IsPlayer(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f)		// Trigger condition&lt;br /&gt;
AND&lt;br /&gt;
CharacterIsDead(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f, 1)	// Extra condition&lt;br /&gt;
THEN&lt;br /&gt;
CharacterResurrect(CHARACTERGUID_S_Player_Ifan_ad9a3327-4456-42a7-9bf4-7ad60cc9e54f);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If Ifan is added to the ''DB_IsPlayer'' database while he was already dead, he will be resurrected.&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
All previous examples use concrete values to define and test database contents. However, in many cases you do not know the actual value, or you want a rule to be more general. In this case, you use variables. Like in most declarative programming languages, you do not declare these variables. Their type is defined by their first use, and their lifetime and scope is always limited to a single rule, [[#Procedures|procedure]] or [[#Query|query]].&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_IsPlayer(_Player)&lt;br /&gt;
AND&lt;br /&gt;
CharacterIsDead(_Player, 1)&lt;br /&gt;
THEN&lt;br /&gt;
CharacterResurrect(_Player)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Rather than only resurrecting Ifan in case he is dead when he gets added to the ''DB_IsPlayer'' database, any dead character that gets added to the ''DB_IsPlayer'' database will be resurrected at that point.&lt;br /&gt;
&lt;br /&gt;
More powerful uses of variables are demonstrated in the section on [[#Rule_Matching|Rule Matching]] below.&lt;br /&gt;
&lt;br /&gt;
== Subroutines ==&lt;br /&gt;
&lt;br /&gt;
There are two kinds of user-defined subroutines in Osiris: queries and procedures.&lt;br /&gt;
&lt;br /&gt;
=== Queries ===&lt;br /&gt;
Queries are new compared to DOS1. They are very handy to implement OR-conditions. The format of a query is:&lt;br /&gt;
 '''QRY'''&lt;br /&gt;
 ''QRY_MyPrefix_QueryName'''''(('''''TYPE1''''')'''''_Param1''[''',('''''TYPE2''''')'''''_Param2..'']''')'''&lt;br /&gt;
 [&lt;br /&gt;
 '''AND'''&lt;br /&gt;
 ''ExtraCondition1''&lt;br /&gt;
 ..&lt;br /&gt;
 ]&lt;br /&gt;
 '''THEN'''&lt;br /&gt;
 ''Action1''''';'''&lt;br /&gt;
 [&lt;br /&gt;
 ''Action2''''';'''&lt;br /&gt;
 ..&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
Just like databases, queries can be overloaded with different numbers of parameters. And just like with [[#Rules|rules]], you can define the same query multiple times and every definition of that same query will be executed when it is called. When a user-defined query is called in a rule, it is considered to have succeeded if all conditions of at least one definition of this query succeeded (and hence its actions were executed).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
QRY&lt;br /&gt;
QRY_Overview_CharacterIsIncapacitated((CHARACTERGUID)_Char)&lt;br /&gt;
AND&lt;br /&gt;
HasActiveStatus(_Char,&amp;quot;FROZEN&amp;quot;,1)&lt;br /&gt;
THEN&lt;br /&gt;
DB_NOOP(1);&lt;br /&gt;
&lt;br /&gt;
QRY&lt;br /&gt;
QRY_Overview_CharacterIsIncapacitated(_Char)&lt;br /&gt;
AND&lt;br /&gt;
HasActiveStatus(_Char,&amp;quot;PETRIFIED&amp;quot;,1)&lt;br /&gt;
THEN&lt;br /&gt;
DB_NOOP(1);&lt;br /&gt;
&lt;br /&gt;
QRY&lt;br /&gt;
QRY_Overview_CharacterIsIncapacitated(_Char)&lt;br /&gt;
AND&lt;br /&gt;
HasActiveStatus(_Char,&amp;quot;KNOCKED_DOWN&amp;quot;,1)&lt;br /&gt;
THEN&lt;br /&gt;
DB_NOOP(1);&lt;br /&gt;
&lt;br /&gt;
IF&lt;br /&gt;
CharacterReceivedDamage(_Char)&lt;br /&gt;
AND&lt;br /&gt;
// check whether _Char is FROZEN, PETRIFIED or KNOCKED_DOWN&lt;br /&gt;
QRY_Overview_CharacterIsIncapacitated(_Char)&lt;br /&gt;
THEN&lt;br /&gt;
DB_Overview_CowardAttackingIncapacitatedCharacter(1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our ''QRY_Overview_CharacterIsIncapacitated'' query does not actually need to do anything if its conditions succeed. However, you cannot have condition checks without an action. For this reason, we define a dummy database fact (''DB_NOOP(1)'' by convention) if all rules succeed. So, when our rule calls ''QRY_Overview_CharacterIsIncapacitated(_Char)'', Osiris will evaluate all definitions of this query in the entire story (so not just in the current [[#Program_Structure|goal]]!) and if one of them succeeds, it will consider this query/extra condition to have succeeded.&lt;br /&gt;
&lt;br /&gt;
Just like with databases, only the first encountered definition of a query needs to specify the parameter type(s). It does not hurt to repeat them though. You can also see that parameters use the same syntax as [[#Variables|variables]].&lt;br /&gt;
&lt;br /&gt;
Note that Osiris has a [[Osiris/API/CharacterIsIncapacitated|built-in query]] to check whether a character is incapacitated (which checks more statuses than the ones listed above), so you won't need to implement the above query yourself.&lt;br /&gt;
&lt;br /&gt;
=== Procedures ===&lt;br /&gt;
Procedures are collections of actions that you may want to execute from multiple action blocks. Or, they may be a number of related actions of which some must only be executed under certain conditions. In this sense, they allow you to have extra condition checks in an action block.&lt;br /&gt;
&lt;br /&gt;
The format of a procedure is:&lt;br /&gt;
 '''PROC'''&lt;br /&gt;
 ''PROC_MyPrefix_ProcName'''''(('''''TYPE1''''')'''''_Param1''[''',('''''TYPE2''''')'''''_Param2..'']''')'''&lt;br /&gt;
 [&lt;br /&gt;
 '''AND'''&lt;br /&gt;
 ''ExtraCondition1''&lt;br /&gt;
 ..&lt;br /&gt;
 ]&lt;br /&gt;
 '''THEN'''&lt;br /&gt;
 ''Action1''''';'''&lt;br /&gt;
 [&lt;br /&gt;
 ''Action2''''';'''&lt;br /&gt;
 ..&lt;br /&gt;
 ]&lt;br /&gt;
&lt;br /&gt;
Just like with queries, you can have multiple definitions of the same procedure (even in different [[#Program_Structure|goals]]). When you invoke a procedure, all of those procedures will be executed. Unlike queries, procedures have no result, since statements in an action block do not return anything.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PROC&lt;br /&gt;
PROC_Overview_TeleportAlive((CHARATERGUID)_Char, (GUIDSTRING)_Destination)&lt;br /&gt;
AND&lt;br /&gt;
CharacterIsDead(_Char, 1)&lt;br /&gt;
THEN&lt;br /&gt;
CharacterResurrect(_Char);&lt;br /&gt;
&lt;br /&gt;
PROC&lt;br /&gt;
PROC_Overview_TeleportAlive(_Char, _Destination)&lt;br /&gt;
THEN&lt;br /&gt;
TeleportTo(_Char, _Destination);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This procedure will first check whether the character to be teleported is dead. If so, the character will be resurrected. Next, the character (which is guaranteed to be alive now) is teleported to its destination, which can be a trigger, item, or other character.&lt;br /&gt;
&lt;br /&gt;
This way you can check extra conditions in an actions block, by delegating the checks to a procedure.&lt;br /&gt;
&lt;br /&gt;
= Program Execution =&lt;br /&gt;
Osiris execution is completely event-driven:&lt;br /&gt;
* Rules can only be triggered when an event is thrown, or when a database is defined by the action block of a procedure, user query or rule&lt;br /&gt;
* Procedures and user queries can only be called from action blocks of other procedures, user queries or rules.&lt;br /&gt;
&lt;br /&gt;
This means that there is no ''main'' or other procedure at which an Osiris story (= program) starts executing. Story merely reacts to events thrown by the game engine and actions by the player in the game world. That said, the game engine does throw events such as [[Osiris/API/RegionStarted|RegionStarted]] and [[Osiris/API/GameStarted|GameStarted]] that signify the game may have entered a different phase.&lt;br /&gt;
&lt;br /&gt;
== Goal Initialisation and Completion ==&lt;br /&gt;
As mentioned [[#Program_Structure|earlier]], when a goal initialises its INIT section gets executed and the rules in its KB section become active. Additionally, [[#Queries|QRY]]s and [[#Procedures|PROC]]s defined in this goal's KB become usable by this and other goals. This means that as long as a goal has not been initialised, or after it has been completed, none of its defined procedures and queries will be found/executed anymore by other goals.&lt;br /&gt;
&lt;br /&gt;
Now, when does a goal initialise? Let's have a look at the left pane of the following screenshot of the story editor:&lt;br /&gt;
&lt;br /&gt;
[[File:StoryEditor.png|800px]]&lt;br /&gt;
&lt;br /&gt;
At the top level, you see a goal named ''Start''. Under it, there are two other goals: ''AtaraxianArtifacts'' and ''FTJ_Origins_Ifan''. Top-level goals are initialised as soon as the mod is loaded. In case those three goals were the only ones in a mod, that would mean that only the ''Start'' goal would initialise when the mod gets loaded.&lt;br /&gt;
&lt;br /&gt;
Completing, or finalising a goal happens by placing a '''GoalCompleted;''' action in any action block. At that point,&lt;br /&gt;
* all subgoals of the current goal will be initialised;&lt;br /&gt;
* the EXIT section of the current goal will be executed;&lt;br /&gt;
* none of the rules, queries or procedures in the current goal will be active/available anymore;&lt;br /&gt;
* databases set in the completed goal, even in its init section, will ''remain'' active and available, unless they are deleted by the goal's EXIT code.&lt;br /&gt;
&lt;br /&gt;
However, the action block in which '''GoalCompleted;''' was called will still be executed till the end. This means that you can insert calls after that statement, even to procedures inside subgoals as these have been initialised once the '''GoalCompleted;''' statement has finished executing. Just make sure you do not rely on any databases that may be deleted by the EXIT code of the current goal.&lt;br /&gt;
&lt;br /&gt;
== Rule Order ==&lt;br /&gt;
As mentioned in the [[#Program_Structure|program structure]] section, all goals of a mod and of the mods it depends on are merged into a single story. The question then is: in what order are the merged rules evaluated? This can be very important in case one rule defines databases upon which other rules may depend. For example, the [[Osiris/Shared/DB_DialogNPCs|DB_DialogNPCs]] database is defined by a goal in the Shared mod whenever a [[Osiris/API/DialogStarted|DialogStarted]] event fires. So if you also catch the DialogStarted event in your mod, can you rely on this database existing already or not at that time? In other words, how can you know whether the DialogStarted-rule from the Shared mod executes before or after the one in your mod?&lt;br /&gt;
&lt;br /&gt;
The answer is both simple and possibly a bit unsettling: rules are executed from top to bottom in the single story that contains all goals from all mods that are currently active. Inside this story, all goals are sorted alphabetically on '''''goal name'''''. This sorting disregards both parent/subgoal relations and mod dependencies. So a goal named ''FooBar'' in your mod, even if it is a subgoal located at five levels deep, will always be placed in story before e.g., the ''GLO_Follower'' of the Shared mod.&lt;br /&gt;
&lt;br /&gt;
Note that, as mentioned in the [[#Goal_Initialisation_and_Completion|previous section]], only rules/procedures/queries from active goals will be found. So as long as the FooBar goal from your mod has not be initialised, none of its rules/procedures/queries will execute at all, no matter where they are placed in story.&lt;br /&gt;
&lt;br /&gt;
Returning to the specific case of the [[Osiris/Shared/DB_DialogNPCs|DB_DialogNPCs]] database: these are defined in a goal of the Shared mod with name ''_AAA_FirstGoal''. While it is technically not the very first goal in the story, it does appear before any goal that uses this database. And if you wish to use this database in a mod of your own in a DialogStarted event, make sure that goal's name comes after ''_AAA_FirstGoal'' when sorted alphabetically (the '''_''' character is sorted before any letter or number).&lt;br /&gt;
&lt;br /&gt;
In summary:&lt;br /&gt;
* All event handlers in top-level goals become available when the game starts.&lt;br /&gt;
* Goals are initialised/activated in alphabetical order, so do not depend on PROCs/QRYs/events (including reacting to database facts) from other goals in your goal initialisation code.&lt;br /&gt;
* Completing a goal renders it inactive, but activates all of its subgoals.&lt;br /&gt;
&lt;br /&gt;
== Rule Matching ==&lt;br /&gt;
As explained in the section on [[#Variables|variables]], you can use variables to make rules generic. There are many more powerful uses of variables though, with associated gotchas.&lt;br /&gt;
&lt;br /&gt;
=== Iterating Database Contents ===&lt;br /&gt;
You can use variables to iterate all values in a database. Assuming the ''DB_Overview_Origins'' has been declared [[#Databases|as above]], consider the following rule:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_Overview_KillAllOrigins(1)&lt;br /&gt;
AND&lt;br /&gt;
DB_Overview_Origins(_Origin)&lt;br /&gt;
THEN&lt;br /&gt;
// Cast _Origin to CHARACTERGUID because that's what CharacterDie expects, and because the&lt;br /&gt;
// first DB_Overview_Origins() database fact has been declared without a specific type&lt;br /&gt;
// (hence defaulting to GUIDSTRING)&lt;br /&gt;
CharacterDie((CHARACTERGUID)_Origin, 0, &amp;quot;DoT&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This rule means that as soon as the ''DB_Overview_KillAllOrigins(1)'' fact has been defined, we will iterate over all currently defined ''DB_Overview_Origins'' facts with one column. For each of those facts we will sequentially assign the actual value to the ''_Origin'' variable, and then evaluate the subsequent conditions (if any) for that value. If they succeed, we will perform the actions, again with this value.&lt;br /&gt;
&lt;br /&gt;
=== Looking Up Facts (Associative Arrays) ===&lt;br /&gt;
We can also use this technique to look up facts in a database:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_Overview_KillOriginByName(_Name)&lt;br /&gt;
AND&lt;br /&gt;
DB_Overview_Origins(_Origin, _Name)&lt;br /&gt;
THEN&lt;br /&gt;
// No need for typecast, as the first DB_Overview_Origins() database fact with two columns&lt;br /&gt;
// has been declared as having CHARACTERGUIDs in the first column&lt;br /&gt;
CharacterDie(_Origin, 0, &amp;quot;DoT&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we react to a database fact being set containing the name of the origin we want to kill. We then iterate over all ''DB_Overview_Origins'' facts with two columns, whereby the second column matches the name specified in the newly defined ''DB_Overview_ResurrectOriginByName'' fact. If one or more such entries are found, we will then kill them.&lt;br /&gt;
&lt;br /&gt;
=== Rule Evaluation State ===&lt;br /&gt;
But what if we want to be able to perform the above multiple times for the same origin? Once a database fact has been defined, redefining it again with the same value will not result in any event triggering. After all, the database fact already existed and the event only triggers when a new fact gets added. To solve this, we can simply remove the fact in the rules section:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_Overview_KillOriginByName(_Name)&lt;br /&gt;
AND&lt;br /&gt;
DB_Overview_Origins(_Origin, _Name)&lt;br /&gt;
THEN&lt;br /&gt;
NOT DB_Overview_KillOriginByName(_Name); // added&lt;br /&gt;
CharacterDie(_Origin, 0, &amp;quot;DoT&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You may wonder whether removing the ''DB_Overview_KillOriginByName(_Name)'' will abort further execution of the rule in case there would be multiple ''DB_Overview_Origins'' facts for which ''_Name'' matches. That is not the case. The reason is that the execution of a rule occurs by generating a temporary internal table of the valid possibilities every time a condition is evaluated. Afterwards, Osiris keeps referring to this table.&lt;br /&gt;
&lt;br /&gt;
For example, in the above rule, at the second step Osiris will create an internal table that contains all matching ''DB_Overview_Origins(_Origin, _Name)'' facts for the specified ''_Name''. Then it will start evaluating all subsequent conditions (and actions) using this temporary table, rather than starting at the first condition again every time. The same happens with the second, third, ... condition.&lt;br /&gt;
&lt;br /&gt;
=== Rule Trigger Evaluation ===&lt;br /&gt;
Osiris uses a similar mechanism as the [[#Rule_Evaluation_State|Rule Evaluation State]] at the top-level, when determining which rules to execute. When a [[#Trigger_Conditions|trigger condition]] occurs, Osiris immediately collects all rules in all active goals that match the ''first'' trigger condition. Next, it will start executing these rules one by one with the matched parameter values. This means that even if you ensure that your rule triggers first, removing the first trigger condition or rendering it false will not prevent subsequent rules from executing.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
IF&lt;br /&gt;
DB_Overview_KillOriginByName(_Name)&lt;br /&gt;
AND&lt;br /&gt;
DB_Overview_Origins(_Origin, _Name)&lt;br /&gt;
THEN&lt;br /&gt;
NOT DB_Overview_KillOriginByName(_Name); // added&lt;br /&gt;
CharacterDie(_Origin, 0, &amp;quot;DoT&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
IF&lt;br /&gt;
DB_Overview_KillOriginByName(_Name)&lt;br /&gt;
AND&lt;br /&gt;
DB_Overview_Origins(_Origin, _Name)&lt;br /&gt;
AND&lt;br /&gt;
ObjectGetFlag(_Origin,&amp;quot;Overview_ShouldBeResurrectedAfterDying&amp;quot;)&lt;br /&gt;
THEN&lt;br /&gt;
CharacterResurrect(_Origin);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First of all, keep in mind that rules are executed in the order they appear in story, and fully execute before any rule after them gets executed. This means that we will first kill all origin characters whose name column in the ''DB_Overview_Origins'' database matches the specified name. We will also remove the ''DB_Overview_KillOriginByName(_Name)'' fact. Next the second rule will still execute, because Osiris has already previously determined that this rule gets activated by the triggering event.&lt;br /&gt;
&lt;br /&gt;
Conversely, removing (or adding) ''DB_Overview_Origins()'' facts in the first rule would affect the execution of the second rule. The reason is that only the first trigger gets cached while selecting which rules to evaluate.&lt;br /&gt;
&lt;br /&gt;
== Osiris Frames ==&lt;br /&gt;
The evaluation of Osiris events is separated into frames. Everything that happens in a single frame happens atomically: it is not possible for a player to save in the middle of a frame, nor to abort part of the actions of a frame. Either a frame starts and runs to the finish, or does not start at all. In other words, frames are atomic, non-interruptible blocks of rule evaluations and actions.&lt;br /&gt;
&lt;br /&gt;
Whenever an event will execute a number of rules, as explained in the [[#Rule_Trigger_Evaluation|Rule Trigger Evaluation]] section, all of these rules will be evaluated and their actions executed in the same frame. Furthermore, any procedures or queries called by these rules will also execute in the same frame.&lt;br /&gt;
&lt;br /&gt;
== Frame Delays ==&lt;br /&gt;
While all Osiris API and user-defined procedure calls are guaranteed to execute in the same frame during which the corresponding rule's event was triggered, their effects often will not happen instantaneously. This can be obvious, as for example a [[Osiris/API/CharacterMoveTo|CharacterMoveTo]] operation will probably take at least a few seconds complete. However, there are also a few less obvious cases. The most important one is flag visibility in dialogs.&lt;br /&gt;
&lt;br /&gt;
Take for example the following dialog:&amp;lt;br/&amp;gt;[[File:Dialog-framedelay.png|none|600px]]&lt;br /&gt;
&lt;br /&gt;
The following flags are set/checked in the nodes marked with with the blue squares:&lt;br /&gt;
{|&lt;br /&gt;
!Ask for blackroot&lt;br /&gt;
!Had blackroot&lt;br /&gt;
!Had no blackroot&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Dialog-framedelay-askblackroot.png|none|400px]]&lt;br /&gt;
|[[File:Dialog-framedelay-hadblackroot2.png|none|400px]]&lt;br /&gt;
|[[File:Dialog-framedelay-noblackroot.png|none|400px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is combined with the example Osiris code from [[Osiris/Shared/DB_GiveTemplateFromPlayerDialogEvent|DB_GiveTemplateFromPlayerDialogEvent]]:&lt;br /&gt;
 // if you set the character flag &amp;quot;MYPRE_give_blackroot&amp;quot; on an NPC in this dialog, and this NPC has blackroot in his inventory, then&lt;br /&gt;
 // it will give one blackroot to the first player in that dialog and the flag &amp;quot;MYPRE_had_blackroot&amp;quot; will be set on the NPC.&lt;br /&gt;
 DB_GiveTemplateFromPlayerDialogEvent(&amp;quot;QUEST_Blackroot_843689bf-6498-45ac-98ba-b375bdbbb189&amp;quot;, &amp;quot;MYPRE_give_blackroot&amp;quot;, &amp;quot;MYPRE_had_blackroot&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Assume that frame 1 is when the player clicks to get the blackroot, then the following happens:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; style=&amp;quot;border-collapse:collapse&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!Dialog&lt;br /&gt;
!Osiris&lt;br /&gt;
|-&lt;br /&gt;
!Frame 1&lt;br /&gt;
|&lt;br /&gt;
* The flag '''MYPRE_give_blackroot''' is set on the NPC.&lt;br /&gt;
* The dialog manager loads the following node(s) (&amp;quot;Frame delay node&amp;quot; in our example) and evaluates its (their) flag conditions, if any (none in our example).&lt;br /&gt;
|&lt;br /&gt;
* Osiris gets an [[Osiris/API/ObjectFlagSet|ObjectFlagSet]] event for the '''MYPRE_give_blackroot''' flag that was set on the NPC.&lt;br /&gt;
* In combination with the [[Osiris/Shared/DB_GiveTemplateFromPlayerDialogEvent|DB_GiveTemplateFromPlayerDialogEvent]] definition above, this will result in a check whether the NPC has any instance of the '''QUEST_Blackroot_843689bf-6498-45ac-98ba-b375bdbbb189''' root template in its inventory, and if so transfer one such instance to the first player in the dialog and the set the '''MYPRE_had_blackroot''' flag on the NPC.&lt;br /&gt;
|-&lt;br /&gt;
!Frame 2&lt;br /&gt;
|&lt;br /&gt;
* The frame delay node is shown.&lt;br /&gt;
* The dialog manager loads the following node(s) ('''Had blackroot''' and '''Had no blackroot''' in our example) and evaluates its (their flag conditions) (check whether '''MYPRE_had_blackroot''' is set on NPC in our example).&lt;br /&gt;
|&lt;br /&gt;
* Nothing relevant to the dialog.&lt;br /&gt;
|-&lt;br /&gt;
!Frame 3&lt;br /&gt;
|&lt;br /&gt;
* Depending on whether or not Osiris set the '''MYPRE_had_blackroot''' flag in '''Frame 1''', the '''Had blackroot''' or '''Had no blackroot''' node will be shown.&lt;br /&gt;
* If the '''Had blackroot''' node got selected, the '''MYPRE_give_blackroot''' flag will be cleared again from the NPC.&lt;br /&gt;
|&lt;br /&gt;
* Nothing relevant to the dialog.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we did not add the '''Frame delay node''' between '''Ask blackroot''' and the '''Had (no) Blackroot''', then the dialog manager would check the '''MYPRE_had_blackroot''' flag before Osiris had set it, and hence the check would always fail. If you do not want any actual dialog text in between, you can make the '''Frame delay node''' a completely empty node (without a text block). Such nodes are automatically skipped immediately, but they still occupy a frame.&lt;br /&gt;
[[Category:Osiris]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterReceivedDamage&amp;diff=6444</id>
		<title>Osiris/API/CharacterReceivedDamage</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterReceivedDamage&amp;diff=6444"/>
		<updated>2018-10-23T09:57:13Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* event '''CharacterReceivedDamage'''(''(CHARACTERGUID)'''''_Character''', ''(INTEGER)'''''_Percentage''', ''(GUIDSTRING)'''''_Source''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Thrown when a character receives damage from an attack or an environmental effect such as a surface.&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
* '''_Character''': The character that was damaged.&lt;br /&gt;
* ''(new in DOS2 Patch 5)'' '''_Percentage''': The percentage of vitality/hit points that was removed by this damage event.&lt;br /&gt;
* ''(new in DOS2 Patch 5)'' '''_Source''': The GUID of the character or item that caused the damage. In case the damage is caused by a surface, this will be the creator of said surface (can be NULL if the game cannot determine the party responsible, e.g. if you are damaged by a static fire surface that was painted in the editor).&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* This event is thrown even when '''_Percentage''' is 0.0, i.e., all damage was blocked by armor or '''_Character''' was immune to the damage type.&lt;br /&gt;
* This event is ''not'' thrown if the &amp;quot;damage&amp;quot; healed '''_Character''' (e.g. poison damage to a zombie); in that case, a corresponding HEAL status will be applied to '''_Character''' instead.&lt;br /&gt;
&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/AttackedByObject|AttackedByObject]]&lt;br /&gt;
* [[Osiris/API/CharacterStatusAttempt|CharacterStatusAttempt]]&lt;br /&gt;
* [[Osiris/API/CharacterStatusApplied|CharacterStatusApplied]]&lt;br /&gt;
* [[Osiris/API/CharacterVitalityChanged|CharacterVitalityChanged]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Events|CharacterReceivedDamage]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterVitalityChanged&amp;diff=6443</id>
		<title>Osiris/API/CharacterVitalityChanged</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterVitalityChanged&amp;diff=6443"/>
		<updated>2018-10-23T09:56:50Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * event '''CharacterVitalityChanged'''(''(CHARACTERGUID)'''''_Character''', ''(INTEGER)'''''_Percentage''') ===== Description ===== Thrown when...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* event '''CharacterVitalityChanged'''(''(CHARACTERGUID)'''''_Character''', ''(INTEGER)'''''_Percentage''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Thrown when the character's vitality changes.&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
* '''_Character''': Character whose vitality changes.&lt;br /&gt;
* '''_Percentage''': Percentage of their HP the character has after the change.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
-&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CharacterReceivedDamage|CharacterReceivedDamage]]&lt;br /&gt;
* [[Osiris/API/AttackedByObject|AttackedByObject]]&lt;br /&gt;
* [[Osiris/API/CharacterStatusAttempt|CharacterStatusAttempt]]&lt;br /&gt;
* [[Osiris/API/CharacterStatusApplied|CharacterStatusApplied]]&lt;br /&gt;
 &lt;br /&gt;
[[Category:Osiris Events|CharacterVitalityChanged]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5984</id>
		<title>Osiris/API/GenerateTreasure</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5984"/>
		<updated>2018-07-02T15:22:29Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''GenerateTreasure'''(''(ITEMGUID)'''''_Item''', ''(STRING)'''''_TreasureID''', ''(INTEGER)'''''_Level''', ''(CHARACTERGUID)'''''_Character''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_TreasureID''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Item''''s inventory.&lt;br /&gt;
*If the '''_Level''' is greater than or equal to 0, it will be used to generate treasure.&lt;br /&gt;
*If the '''_Level''' is less than 0, if the item is set (in the sidebar) to ''Use Party Level For Treasure'', the highest level in the '''_Character''' 's party is used.&lt;br /&gt;
*If the '''_Level''' is less than 0, and ''Use Party Level For Treasure'' is false, the item's ''Treasure Level'' setting is used.&lt;br /&gt;
*If the ''Treasure Level'' setting is also less than 0, the level of the nearest character is used.&lt;br /&gt;
*This adds the contents of the treasure to whatever is already inside the item's inventory. If it has a treasure table defined in the sidebar, it will get both. The treasure defined in the sidebar is generated whenever the first of the following occurs:&lt;br /&gt;
**The item is destroyed&lt;br /&gt;
**The item is used (e.g. opened)&lt;br /&gt;
**The item is picked up&lt;br /&gt;
**The item is unlocked&lt;br /&gt;
**The item is moved&lt;br /&gt;
**Something is added to the item's inventory (this can happen if an item is added e.g. through Story).&lt;br /&gt;
===== Notes =====&lt;br /&gt;
*/&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/CharacterGiveReward|CharacterGiveReward]]&lt;br /&gt;
*[[Osiris/API/CharacterGiveQuestReward|CharacterGiveQuestReward]]&lt;br /&gt;
*[[Treasure_Tables|Treasure Table]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|GenerateTreasure]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5983</id>
		<title>Osiris/API/GenerateTreasure</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5983"/>
		<updated>2018-07-02T15:22:10Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''GenerateTreasure'''(''(ITEMGUID)'''''_Item''', ''(STRING)'''''_TreasureID''', ''(INTEGER)'''''_Level''', ''(CHARACTERGUID)'''''_Character''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_TreasureID''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Item''''s inventory.&lt;br /&gt;
*If the '''_Level''' is greater than or equal to 0, it will be used to generate treasure.&lt;br /&gt;
*If the '''_Level''' is less than 0, if the item is set (in the sidebar) to ''Use Party Level For Treasure'', the highest level in the '''_Character''' 's party is used.&lt;br /&gt;
*If the '''_Level''' is less than 0, and ''Use Party Level For Treasure'' is false, the item's ''Treasure Level'' setting is used.&lt;br /&gt;
*If the ''Treasure Level'' setting is also less than 0, the level of the nearest character is used.&lt;br /&gt;
*This adds the contents of the treasure to whatever is already inside the item's inventory. If it has a treasure table defined in the sidebar, it will get both. The treasure defined in the sidebar is generated whenever the first of the following occurs:&lt;br /&gt;
**The item is destroyed&lt;br /&gt;
**The item is used (e.g. opened)&lt;br /&gt;
**The item is picked up&lt;br /&gt;
**The item is unlocked&lt;br /&gt;
**The item is moved&lt;br /&gt;
**Something is added to the item's inventory (e.g. through Story).&lt;br /&gt;
===== Notes =====&lt;br /&gt;
*/&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/CharacterGiveReward|CharacterGiveReward]]&lt;br /&gt;
*[[Osiris/API/CharacterGiveQuestReward|CharacterGiveQuestReward]]&lt;br /&gt;
*[[Treasure_Tables|Treasure Table]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|GenerateTreasure]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/ItemRemove&amp;diff=5927</id>
		<title>Osiris/API/ItemRemove</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/ItemRemove&amp;diff=5927"/>
		<updated>2018-06-15T09:08:03Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * call '''ItemRemove'''(''(ITEMGUID)'''''_Item''') ===== Description ===== * Deletes the '''_Item''' from the game. ===== Notes ===== * Unlike i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''ItemRemove'''(''(ITEMGUID)'''''_Item''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
* Deletes the '''_Item''' from the game.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* Unlike items set offstage, a deleted item is gone permanently.&lt;br /&gt;
* Unlike [[Osiris/API/ItemDestroy|ItemDestroy]], ItemRemove leaves no debris and plays no destroy animation.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/ItemDestroy|ItemDestroy]]&lt;br /&gt;
* [[Osiris/API/ObjectExists|ObjectExists]]&lt;br /&gt;
* [[Osiris/API/ObjectIsCharacter|ObjectIsCharacter]]&lt;br /&gt;
* [[Osiris/API/ObjectIsItem|ObjectIsItem]]&lt;br /&gt;
* [[Osiris/API/SetOnStage|SetOnStage]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|ItemRemove]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=My_first:_Behaviour_Script&amp;diff=5907</id>
		<title>My first: Behaviour Script</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=My_first:_Behaviour_Script&amp;diff=5907"/>
		<updated>2018-05-31T07:25:21Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Redirected page to Scripting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Scripting]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/Shared/DB_DialogMoneyTransfer&amp;diff=5464</id>
		<title>Osiris/Shared/DB DialogMoneyTransfer</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/Shared/DB_DialogMoneyTransfer&amp;diff=5464"/>
		<updated>2018-02-02T08:39:44Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* '''DB_DialogMoneyTransfer'''(''(INTEGER)'''''_MoneyVarIndex''', ''(STRING)'''''_DialogName''', ''(INTEGER)'''''_Amount''')&lt;br /&gt;
* '''DB_DialogMoneyTransfer'''(''(INTEGER)'''''_MoneyVarIndex''', ''(STRING)'''''_DialogName''', ''(INTEGER)'''''_Amount''', ''(INTEGER)'''''_CheckSpeakerIndex''')&lt;br /&gt;
* '''DB_DialogMoneyTransfer'''(''(INTEGER)'''''_MoneyVarIndex''', ''(STRING)'''''_DialogName''', ''(INTEGER)'''''_Amount''', ''(INTEGER) '''''_CheckSpeakerIndex''', ''(INTEGER)'''''_TargetDBIndex''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
This functionality can be used in dialogs both to check whether a participant has a certain amount of gold, and to transfer this gold from one participant to another: &lt;br /&gt;
* '''_MoneyVarIndex''': can be 1-5. Determines which of the '''GEN_CheckMagicPocketGold'''/'''_2'''/../'''_5''' dialog variables gets set, and hence whether you can use the '''GEN_CheckPocketGold'''/'''_2'''/../'''_5''' scrip var to check whether a dialog participant (see '''_CheckSpeakerIndex''') has at least the specified amount of money.&lt;br /&gt;
* '''_DialogName''': the name of the dialog that this DB should influence.&lt;br /&gt;
* '''_Amount''': the amount of money that should be checked and/or transferred.&lt;br /&gt;
* '''_CheckSpeakerIndex''': This sets the speaker dialog variable used by '''GEN_CheckPocketGold'''/'''..''' and hence must refer to a speaker index in the dialog. It determines which speaker will be checked for having a sufficient amount of gold. If unspecified, it defaults to '''2''' (the player in most dialogs that have two speakers).&lt;br /&gt;
* '''_TargetDBIndex''': This only affects money transfers. Money transfers can be performed by setting the '''GEN_TransferNPCPayment'''/'''_2'''/../'''_5''' (= transfer flag) character flag on either a player or an NPC in the dialog (independent of what '''_CheckSpeakerIndex''' is). It will then transfer up to '''_Amount''' gold (depending on how much gold this character had) '''''from''''' that flagged character to another character. This other character is determined by '''_TargetDBIndex''' as follows, with this value defaulting to '''1''' if unspecified:&lt;br /&gt;
** If the character on which the transfer flag is set is a player, the money will go to the NPC matching '''DB_DialogNPCs(_, _, _TargetDBIndex)''' for the current dialog. I.e., if '''_TargetDBIndex''' is '''1''', it will transfer the money to the first NPC in the dialog in this case.&lt;br /&gt;
** If the character on which the transfer flag is set is an NPC, the money will go to the player matching '''DB_DialogPlayers(_, _, _TargetDBIndex)''' for the current dialog. I.e., if '''_TargetDBIndex''' is '''1''', it will transfer the money to the first player in the dialog in this case.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* The reason for the discrepancy between how '''_CheckSpeakerIndex''' and '''_TargetDBIndex''' are interpreted, is due to the fact that Osiris only supports requesting NPC and player speakers separately. Additionally, this also allows using a single '''DB_DialogMoneyTransfer'''() definition to transfer money back and forth between a player and an NPC (if you only need to check in one direction whether the source has in fact enough money).&lt;br /&gt;
* If you wish to make sure a participant has enough gold before transferring, always perform the verification (check '''GEN_CheckMagicPocketGold'''/..) and the transfer (setting '''''GEN_TransferNPCPayment'''''/..) on the same node. Otherwise, the participant could lose gold in between the check and the transfer.&lt;br /&gt;
* Examples&lt;br /&gt;
** '''DB_DialogMoneyTransfer(1,&amp;quot;FTJ_GhettoBoss&amp;quot;,50);'''&lt;br /&gt;
*** When the '''GEN_CheckMagicPocketGold''' script var is checked in the FTJ_GhettoBoss dialog, this will check whether speaker 2 (default, because unspecified; corresponds to the player in this dialog) has at least 50 gold.&lt;br /&gt;
*** When the character flag '''GEN_TransferNPCPayment''' is set on the player in that dialog, up to 50 gold will be transferred from the player to the first NPC in that dialog (_TargetDBIndex defaults to 1). I.e., it will transfer up to 50 gold from the player to Griff. If it is set on Griff, the transfer will go in the other direction.&lt;br /&gt;
** '''DB_DialogMoneyTransfer(2,&amp;quot;ARX_Neighborhood_Street_TraderBaker&amp;quot;,1000,3,2);'''&lt;br /&gt;
*** Here we can check using the '''GEN_CheckMagicPocketGold_2''' script var whether speaker 3 (the player, in this dialog) has at least 1000 gold.&lt;br /&gt;
*** By setting '''GEN_TransferNPCPayment_2''' on the player in that dialog, we can transfer up to thousand gold to the second NPC in this dialog. Setting this flag on an NPC will not do anything, because that would result in an attempt to transfer this money to a second player in this dialog, which does not exist.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* /&lt;br /&gt;
 &lt;br /&gt;
[[Category:Osiris Shared Mod Helpers|DialogMoneyTransfer]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/GetAngleTo&amp;diff=5454</id>
		<title>Osiris/API/GetAngleTo</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/GetAngleTo&amp;diff=5454"/>
		<updated>2018-01-31T21:16:14Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* query '''GetAngleTo'''('''''[in]'''(REAL)'''''_x0''', '''''[in]'''(REAL)'''''_z0''', '''''[in]'''(REAL)'''''_x1''', '''''[in]'''(REAL)'''''_z1''', '''''[out]'''(INTEGER)'''''_Angle''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Returns the angle around the Y-axis between two points in degrees.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* '''Success/Failure''': Always succeeds.&lt;br /&gt;
* '''_Angle''': The angle between ('''_x0''', '''_z0''') and ('''_x1''', '''_z1''') around the Y-axis relative to the X-axis.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* Unlike with [[Osiris/API/GetRotation|GetRotation]], the result of this call is has no offset relative to the  X-axis.&lt;br /&gt;
* Unlike with [[Osiris/API/GetRotation|GetRotation]], this angle increases when rotating in counter-clockwise direction.&lt;br /&gt;
* The returned angle is in the interval [-180, 180].&lt;br /&gt;
&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/GetRotation|GetRotation]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Queries|GetAngleTo]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Dialog_editor&amp;diff=5358</id>
		<title>Dialog editor</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Dialog_editor&amp;diff=5358"/>
		<updated>2018-01-09T08:05:31Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
The Dialogue Designer is a visual tool for creating dialogues in our Divinity games. The tool is easy to use for writers and scripters alike and it is independent of the game we're working on.&lt;br /&gt;
&lt;br /&gt;
= Creating Dialogues =&lt;br /&gt;
The Dialogue Designer can be found in the toolbar of our game editor. Look for the speech bubble.&lt;br /&gt;
&lt;br /&gt;
Click that icon to open an instance of the Dialogue Designer. Every time you click on that icon, you will open a new dialogue editor instance. You will be presented with an empty dialogue when the editor starts:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Empty.png]]&lt;br /&gt;
&lt;br /&gt;
== New Dialogues ==&lt;br /&gt;
From the File menu you can create a new empty dialogue (replaces the currently open dialogue, if any, with an empty one) or a dialogue from a template. For more about Templates see [[#Templates]].&lt;br /&gt;
&lt;br /&gt;
== Copying Dialogues ==&lt;br /&gt;
If you want to create a new dialogue based on an existing dialogue, '''don't just copy the files'''! This will cause problems with voice recording. If you want to copy an existing dialogue you can either:&lt;br /&gt;
# Open up the existing dialogue and use the &amp;quot;save as&amp;quot; function in the File menu to save a new dialogue with the name of your choice. You will then be working in the copied version of the dialogue.&lt;br /&gt;
#:OR&lt;br /&gt;
# Open up two instances of the Dialogue Editor. Open your source dialogue in the first instance and Copy the nodes. Then go to the second Dialogue Editor Instance and paste the nodes. For more about copying nodes see [[#Copying_Nodes|Copying Nodes]].&lt;br /&gt;
&lt;br /&gt;
= Dialog Categories =&lt;br /&gt;
Different kinds of dialogs serve different purposes. You can select the dialog category using the pop-up menu on the top-right of the dialog window.&lt;br /&gt;
&lt;br /&gt;
== Generic NPC Dialog ==&lt;br /&gt;
This is an interactive dialog with player interaction. It can contain any kind of dialog [[#Nodes|node]]. Generally it should include at least one player, as NPCs by themselves cannot progress through such a dialog (unless the dialog only contains [[#Greeting|Greeting]] and [[#Answer|Answer]] nodes, and all [[#Transition Mode|node transitions]] are timed; even then all you will see is a text balloon over the speakers' heads and the only way players can know what they are saying is by clicking on them while they are in the conversation — this could still result in fun &amp;quot;listen in&amp;quot; gameplay mechanics though!).&lt;br /&gt;
&lt;br /&gt;
Starting such a dialog shows the dialog interface for all involved players (if any), which they can use to click through the dialog and select their reactions where allowed. Players cannot exit an interactive dialog, except through [[#EndNode|Leave]] nodes.&lt;br /&gt;
&lt;br /&gt;
== Automated NPC Dialog ==&lt;br /&gt;
This is a non-interactive/automated dialog. An automated dialog can only include [[#Greeting|Greeting]] and [[#Answer|Answer]] nodes. The default [[#Transition Mode|node transition mode]] will show each node a certain amount of time based on its length. An automated dialog can have any combination/absence of NPCs and players.&lt;br /&gt;
&lt;br /&gt;
Starting such a dialog shows the text of the dialog above the speakers' heads. Nobody is pulled into a modal interface like with the [[#Generic_NPC_Dialog|Generic NPC Dialog]].&lt;br /&gt;
&lt;br /&gt;
You '''must''' also check the [[#Automated|Automated]] checkbox in this case.&lt;br /&gt;
&lt;br /&gt;
== Repeated Automated NPC Dialog ==&lt;br /&gt;
This is exactly the same as an [[#Automated_NPC_Dialog|Automated NPC Dialog]], except that it gives a hint to the sound subsystem that this AD is repeated from time to time. It is used for ADs by sellers on market squares and the likes. The effect is that the voice recordings are played at a lower volume, and only a maximum number of times per minute.&lt;br /&gt;
&lt;br /&gt;
If your dialog is not recorded, it will behave the same as a regular Automated NPC Dialog.&lt;br /&gt;
&lt;br /&gt;
You '''must''' also check the [[#Automated|Automated]] checkbox in this case.&lt;br /&gt;
&lt;br /&gt;
== PVP Dialog ==&lt;br /&gt;
&lt;br /&gt;
== Reflection Dialog ==&lt;br /&gt;
&lt;br /&gt;
== Voice bark ==&lt;br /&gt;
A voice bark is an [[#Automated NPC Dialog|Automated NPC Dialog]] intended to be used with a [[Voice_Bark_editor|voicebark]] and functions the same in DOS2.&lt;br /&gt;
&lt;br /&gt;
== Ghost Dialog ==&lt;br /&gt;
This is the same as [[#Generic_NPC_Dialog|Generic NPC Dialog]], except that the main NPC speaker is a ghost. This was added in order to give a hint to the sound subsystem that it should apply a &amp;quot;ghostly ambience&amp;quot; filter to ghost text. However, since dialogs can include both ghosts and non-ghosts, you need to process this per speaker rather than per dialog and hence this setting has no effect.&lt;br /&gt;
&lt;br /&gt;
== Ghost Automated Dialog ==&lt;br /&gt;
The same as a regular [[#Automated_NPC_Dialog|Automated NPC Dialog]], with the same remarks as for [[#Ghost_Dialog|ghost dialogs]].&lt;br /&gt;
&lt;br /&gt;
You '''must''' also check the [[#Automated|Automated]] checkbox in this case.&lt;br /&gt;
&lt;br /&gt;
== Repeated Ghost Automated Dialog ==&lt;br /&gt;
The same as a regular [[#Repeated_Automated_NPC_Dialog|Repeated Automated NPC Dialog]], with the same remarks as for [[#Ghost_Dialog|ghost dialogs]].&lt;br /&gt;
&lt;br /&gt;
You '''must''' also check the [[#Automated|Automated]] checkbox in this case.&lt;br /&gt;
&lt;br /&gt;
== Gameplay Automated Dialog ==&lt;br /&gt;
&lt;br /&gt;
You '''must''' also check the [[#Automated|Automated]] checkbox in this case.&lt;br /&gt;
&lt;br /&gt;
== Companion Dialog ==&lt;br /&gt;
This is the same as a  [[#Generic_NPC_Dialog|Generic NPC Dialog]], but it treats tag checks for the origin companions (IFAN, BEAST, ...) the same as their shapeshifted versions (SHAPESHIFT_IFAN, SHAPESHIFT_BEAST, ...).&lt;br /&gt;
&lt;br /&gt;
== Automated ==&lt;br /&gt;
This checkbox must be checked for all automated dialogs. It is what actually determines whether a dialog is started in interactive or non-interactive mode. The difference between the automated and non-automated categories above are used by different systems (mainly sound).&lt;br /&gt;
&lt;br /&gt;
All dialogs with this checkbox checked treat tag checks for the origin companions (IFAN, BEAST, ...) the same as their shapeshifted versions (SHAPESHIFT_IFAN, SHAPESHIFT_BEAST, ...).&lt;br /&gt;
&lt;br /&gt;
= Nodes =&lt;br /&gt;
The Dialogue Designer represents the logical structure of a dialogue with a node tree. A node is a logical block of text said by an actor in the dialogue. Everything an NPC or a player can say (or ask), is represented by such a node. Nodes form a tree by connecting to other nodes. These connections denote the flow of the dialogue.  For example, if you want an NPC A to say something and another NPC B to reply to that, you have to make a node for NPC A and connect another node for NPC B to that. Nodes can be connected to multiple other nodes, but more about that later.&lt;br /&gt;
&lt;br /&gt;
== Adding Nodes ==&lt;br /&gt;
In your dialogue window, right click the grey area to get the node popup menu:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Nodemenu.png]]&lt;br /&gt;
&lt;br /&gt;
From this menu you can select which type of node you want to add to your dialogue. You'll notice that some of them are greyed out in this pictures. That's because not all node types can be added independently. Some node types require a parent node, before they can be added.&lt;br /&gt;
&lt;br /&gt;
== Connecting Nodes ==&lt;br /&gt;
In the previous section we saw that some nodes need a parent node before they can be added to your dialogue. That's the case for most node types found in a dialogue. The Greeting node is an example of a node that doesn't need a parent, since it's the node where the dialogue will start execution. They form the roots of the dialogue tree and the rest of the dialogue flows from them.&lt;br /&gt;
&lt;br /&gt;
Let's create a greeting node, by selecting “Greeting” from the node popup menu:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Greeting.png]]&lt;br /&gt;
&lt;br /&gt;
You'll see a green box appear in the main panel of your dialogue designer. Every node is represented as a little box like that, each with a unique colour, Notice the little circle at the top right of the greeting node? That's a connector. This is where other nodes will connect to this greeting node. The greeting node only has a single connector (to the right), because it does not accept parent nodes. You can only attach nodes to it, you can't attach a greeting node to another node since it has no connector on the left.&lt;br /&gt;
&lt;br /&gt;
Now lets add an Answer node to this greeting node. Answer nodes are plain text nodes, usually put in dialogues as answers to questions made by a player (hence the name). You can't have an answer without a preceding question or another text node of some kind, That just wouldn't make sense. That's why Answers require a parent node and that explains why they were greyed out when we first opened up the node popup menu.&lt;br /&gt;
&lt;br /&gt;
To add an answer node, we first select the greeting node, by left clicking on it. You'll notice the colour will change to a lighter shade of green. Now you right click to open the node popup menu:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Connect.png]]&lt;br /&gt;
&lt;br /&gt;
You'll notice the previously greyed out options are now available to click. All those greyed out node types require a parent node before they can be used in a dialogue. Now select “Answer” from the menu. You'll see an Answer node appear next to your Greeting node:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Connected.png]]&lt;br /&gt;
&lt;br /&gt;
Notice the line between the two nodes. That's a node connection. It extends from one node connector to another node connector. The Answer node has a node connector on its right side, That means you can attach other nodes to it. It also has a node connector on the left, which means it accepts incoming connections from other nodes.&lt;br /&gt;
&lt;br /&gt;
There is no limit on the number of node connections you can have. A single Greeting node can have multiple nodes attached to it. Just as a single Answer node can have multiple nodes as parents.&lt;br /&gt;
&lt;br /&gt;
== Inserting Nodes ==&lt;br /&gt;
Some times you want to add a node in between a parent and its children. Instead of adding a new node to the parent and then manually connecting (and disconnecting) the parent's child nodes, you can use the node popup menu's “Insert Node” function.&lt;br /&gt;
&lt;br /&gt;
To insert a node, select the parent node and right click it. Then from the node popup menu open the “Insert Node” sub menu and select your desired node type from the list. This list only contains nodes that can be inserted in between 2 nodes. That is, it only contains nodes that accept parents and children.&lt;br /&gt;
Selecting Nodes&lt;br /&gt;
&lt;br /&gt;
If you want to move a node, remove it or change its properties you have to first select it. You can select more than one node, though you can't change node properties if you have more than 1 node selected. The dialogue editor offers several ways to select nodes:&lt;br /&gt;
&lt;br /&gt;
# Select a single node by left-clicking it with the mouse.&lt;br /&gt;
# Add or remove from your node selection by holding the CTRL key and left-clicking another node. If the new node was not selected it gets added to the current node selection. If the new node was already selected it will be removed from the current selection.&lt;br /&gt;
# You can marquee select a (group of) nodes by left-clicking in empty space and dragging over the node(s) you want to select. You'll see a rectangular region extend from where you clicked and following the mouse cursor. When you let go of the left mouse button, any nodes contained in the selection rectangle will be selected.&lt;br /&gt;
# Select a node and all of its children by holding the ALT key and left-clicking a node.&lt;br /&gt;
&lt;br /&gt;
== Copying Nodes ==&lt;br /&gt;
You can copy and paste nodes into your dialogues.&lt;br /&gt;
&lt;br /&gt;
To copy dialog nodes, select the nodes you want to copy and press the CTRL + C key combination on your keyboard. The dialog nodes are now put on the clipboard and can be pasted in either the current dialogue or another instance of the dialogue editor.&lt;br /&gt;
&lt;br /&gt;
To paste your copied dialog nodes, simply go to the destination dialogue editor window and press the CTRL + V key combination on your keyboard. If the pasted nodes had parent and/or child nodes and those nodes are present in the destination dialogue editor, the newly pasted nodes will be connected to those too. &lt;br /&gt;
&lt;br /&gt;
== Removing Nodes ==&lt;br /&gt;
Remove nodes from the dialogue by selecting them and pressing the DELETE key.&lt;br /&gt;
&lt;br /&gt;
== Moving Nodes ==&lt;br /&gt;
To move nodes to a new location in the dialogue tree, select them first. Then left click and drag one of the selected nodes. The group of selected nodes will now follow the mouse cursor as you drag it around. Let go of the left mouse button to place the nodes on the new location. When you drop the nodes, they will snap to a location. You can show the grid by checking the 'Show grid' option in the 'View' menu.&lt;br /&gt;
&lt;br /&gt;
== Collapsing Nodes ==&lt;br /&gt;
You can collapse dialog Nodes in the editor by double-clicking their title bar. That is the top part of a Node where the Logical Name is shown:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_TitleBar.png]]&lt;br /&gt;
&lt;br /&gt;
A collapsed Node only displays the Logical Name and not its contents:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Collapsed.png]]&lt;br /&gt;
&lt;br /&gt;
== Changing Node Properties ==&lt;br /&gt;
Every node type has a number of properties that can be changed from the node properties side bar:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_NodeProperties.png]]&lt;br /&gt;
&lt;br /&gt;
You can only edit the properties of one node at a time. So if you have multiple nodes selected you can not change their properties. Not every node type offers the same node properties. A more in-depth discussion is provided in [[#Node Properties and Node Types|Node Properties and Node Types]].&lt;br /&gt;
&lt;br /&gt;
To copy and paste properties from one node to another, you can right click the property and choose for 'Copy'. If you want a textual representation of a property (eg. for documentation), you can choose 'Copy display string to clipboard'.&lt;br /&gt;
&lt;br /&gt;
You can drag the Node Properties window to dock it somewhere else or move it to a second screen for easier editing.&lt;br /&gt;
&lt;br /&gt;
= Navigating the Dialogue Tree =&lt;br /&gt;
&lt;br /&gt;
As your dialogue grows not all nodes will fit on the screen anymore. When your view doesn't contain all the nodes in the dialogue tree anymore, the dialogue editor will show scrollbars to indicate where there's more nodes outside of the current view. Drag the scrollbars to pan the view. You can also right-click or middle-click the mouse and drag to move the dialogue view in a desired direction.&lt;br /&gt;
&lt;br /&gt;
If you want an overview of the dialogue tree, you can zoom the dialogue view by scrolling the mouse-wheel.&lt;br /&gt;
&lt;br /&gt;
If you want to center the view on a node, select the node and hit the '''HOME''' key on your keyboard.&lt;br /&gt;
&lt;br /&gt;
= Speakers =&lt;br /&gt;
Every dialogue is written for a certain set of characters. These characters are the actors of the dialogue. Every dialogue keeps these actors in a list, called the Speakers. They indicate who says what in the dialogue. This Speaker list has a certain order. For example, say we have a dialogue between Bill and Ted. Bill would be speaker 1 (and be in the first slot) and Ted would be speaker 2 (and be in the second slot). Nodes refers to these slot to see who's saying the text contained in.&lt;br /&gt;
&lt;br /&gt;
In our dialogues players will always be the last Speakers in the list. That's because we can have dialogues where depending on the situation more than 1 player can be active in a dialogue. Since we don't want to disrupt the order of the other Speakers, we add players in the back.&lt;br /&gt;
&lt;br /&gt;
For Question nodes, the Speaker of the node also determines who has to select the question.&lt;br /&gt;
&lt;br /&gt;
== Editing Speakers ==&lt;br /&gt;
At the top right of the Dialogue Designer window you can find the Speaker Editor:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Speakers.png]]&lt;br /&gt;
&lt;br /&gt;
Click the ''Edit'' button to open up the Speaker Editor. The Speaker Editor will open and show the current Speakers assigned to the slots (if any):&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakerEditor.png]]&lt;br /&gt;
&lt;br /&gt;
Click the ''Add'' button to add a Speaker Slot to the current dialogue:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakerAdd.png]]&lt;br /&gt;
&lt;br /&gt;
The slot with the grey background is the currently selected item. This is important if you want to change the order of the slots with the ''Move Up'' and ''Move Down'' buttons.&lt;br /&gt;
&lt;br /&gt;
To select a Speaker Slot, just click it with the left mouse button.&lt;br /&gt;
&lt;br /&gt;
The ''Delete'' button removes the currently selected slot from the list. When the removed slot is still used in the dialog, a messagebox will pop up asking you if you want to replace the speaker by another speaker. All occurrences of the removed speaker (in flags, speaker, animations...) will then be replaced by the selected speaker.&lt;br /&gt;
&lt;br /&gt;
Click the ''Edit'' button next to a slot to start assigning Speakers to that slot:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_AssignSpeaker.png]]&lt;br /&gt;
&lt;br /&gt;
You'll see 2 lists. All the available Speakers in the game and the active Speakers in the selected slot. A slot can have more than 1 speaker assigned to it. This is because some dialogues can be said by several NPCs (think flavour automated dialogues).&lt;br /&gt;
&lt;br /&gt;
To assign a Speaker to the current slot you have to move Speakers from the Available list to the Active List. You can do this in two ways:&lt;br /&gt;
* Double-click a Speaker from the Available Speakers list&lt;br /&gt;
* Select one or more Speakers from the Available Speakers list and click the ''&amp;gt;'' button. Use the ''CTRL'' key on your keyboard to add or remove Speakers to your selection.&lt;br /&gt;
&lt;br /&gt;
To remove Speakers from the current slot, you have to move them from the Active list to the Available Speakers list. You can do this in two ways:&lt;br /&gt;
* Double-click a Speaker from the Active Speakers list&lt;br /&gt;
* Select one or more Speakers from the Active Speakers list and hit the ''&amp;lt;'' button. Use the ''CTRL'' key on your keyboard to add or remove Speakers to your selection.&lt;br /&gt;
&lt;br /&gt;
You can use the ''Filter'' textbox to search for speakers in the list of ''Available Speakers''.&lt;br /&gt;
&lt;br /&gt;
Once you're done, click the ''OK'' button and you'll see your Speakers show up in your selected slot.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakersAssigned.png]]&lt;br /&gt;
&lt;br /&gt;
Click the ''OK'' button in the Speaker Editor to close it and keep your changes. The ''Cancel'' button will close the Speaker Editor without saving your changes.&lt;br /&gt;
&lt;br /&gt;
Once you're done assigning Speakers to your slots, they'll show up in the drop down list in the upper right:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_Speakerdrop.png]]&lt;br /&gt;
&lt;br /&gt;
== The Narrator Speaker ==&lt;br /&gt;
Sometimes you want a node to be spoken by a narrator instead of any of the Speakers inside the dialogue. To handle that case there's a special Narrator Speaker provided. This Speaker can not be found in the Speaker List of the Dialogue and needs to be assigned manually to the Nodes you want to be said by the Narrator:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Narrator.png]]&lt;br /&gt;
&lt;br /&gt;
For more info on ''Assigning Speakers'' see [[#Assigning Speakers to Nodes|Assigning Speakers to Nodes]].&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': this Speaker is not available for every node type. This is because it simply doesn't make sense for all nodes to have support for this. At the moment only Greeting and Answer nodes support the Narrator Speaker.&lt;br /&gt;
&lt;br /&gt;
The Narrator Speaker is there for voice recording reasons and as such can not be used to set or check Flags and/or Tags on!&lt;br /&gt;
&lt;br /&gt;
== Assigning Speakers to Nodes ==&lt;br /&gt;
&lt;br /&gt;
Not all nodes have a Speaker, only nodes that have text inside of them need one. In our case these are the Greeting, Answer and Question nodes. To assign a Speaker to them, select the node and in the properties panel look for the Speaker property:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Speakers.png]]&lt;br /&gt;
&lt;br /&gt;
Selecting the Speaker property in the grid will show a button that opens up a dropdown list with the current Speakers. Select the speaker from the dropdown list to assign it to that Node.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakerNodeDropdown.png]]&lt;br /&gt;
&lt;br /&gt;
By default, Answer and Greeting nodes will select the first Speaker slot as their Speaker. Questions default to the last Speaker Slot. This is in keeping with the fact that players will be added to the back of the Speaker list.&lt;br /&gt;
&lt;br /&gt;
== Addressed To Property ==&lt;br /&gt;
This property indicates who the Speaker of the node is talking to. This is an optional property. If nothing is filled in, the game will select a default value. At the moment this property is only used for localization purposes.&lt;br /&gt;
&lt;br /&gt;
== Speaker Groups ==&lt;br /&gt;
We've already mentioned that a Speaker Slot can contain more than 1 speaker. This is to support generic dialogues that can be said by more than 1 character. For example a generic &amp;quot;Hello&amp;quot; dialogue that's assigned to several citizens in a town. You would then have to assign every citizen as a Speaker in that &amp;quot;Hello&amp;quot; dialogue. Some times you don't know beforehand who's going to be able to say something or the list of speakers is just too long to manually assign them all. That's why the dialogue editor also supports Speaker Groups. Speaker Groups simply group a number of Speakers together so that you can assigned the group to a Speaker Slot instead of each speaker individually.&lt;br /&gt;
&lt;br /&gt;
=== Creating Speaker Groups ===&lt;br /&gt;
Creation and editing of Speaker Groups is done through the Speaker group Editor. This is a tool that's found in the ''Tools'' menu of the dialogue editor:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_ToolsSpeakerGroups.png]]&lt;br /&gt;
&lt;br /&gt;
Click it and the Speaker Group Editor will open.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:SpeakerGroupEditorEmpty.png]]&lt;br /&gt;
&lt;br /&gt;
The Speaker Group Editor will scan the game for all characters and items to see in which groups they are. That way you can see exactly which characters are in which groups or in no groups at all. While it's looking through the characters, you'll see the icon animate in the top right:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakerRefreshing.png]]&lt;br /&gt;
&lt;br /&gt;
While it's refreshing the Speaker list you are free to edit Speaker Groups.&lt;br /&gt;
* To add a Speaker Group click the ''Add'' button. This will create a new Group with a default name. You can change the name in the Speaker Group properties.&lt;br /&gt;
* To remove a Speaker Group, select a Group from the list and click the ''Remove'' button.&lt;br /&gt;
* Filtering is possible for a part of the name or the full uuid.&lt;br /&gt;
&lt;br /&gt;
==== Speaker Group Properties ====&lt;br /&gt;
When you select a Speaker Group from the list the right part of the editor will display an overview of that Speaker Group:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:SpeakerGroupEditor.png]]&lt;br /&gt;
&lt;br /&gt;
This overview shows which Speakers are assigned to the Group, along with a number of properties of the group.&lt;br /&gt;
&lt;br /&gt;
; UUID : Each Speaker Group has a unique identifier. This is used by the game so you don't have to update the Speaker Groups for your characters or items if you decide to rename a group. This is automatically generated for oyu and can not be modified.&lt;br /&gt;
; Name : This is a logical name for your Speaker Group. This is the name that will be shown in the Speaker list in the dialogue editor. As a convention we start Speaker Groups with the &amp;quot;GROUP_&amp;quot; prefix.&lt;br /&gt;
; Description : This is a text field that contains a description for this Speaker Group. Can be useful for voice recording purposes.&lt;br /&gt;
; Mod : This property shows in which game module this Group was defined. Groups that are unique to a certain game should be created in that game's module. Groups that are shared between games should be created in the Shared module.&lt;br /&gt;
; Overwrite speaker : If an override speaker is defined for a group, the speaker of that character will be used for the voice data. The uuid of the character should be filled in here. An override speaker is a speaker that will be used to voice all characters in this group when this group is assigned as speaker in a dialogue node (e.g. the God King voices most voidwoken in the main campaign).&lt;br /&gt;
&lt;br /&gt;
=== Looking for a specific Speaker ===&lt;br /&gt;
The Speaker Group Editor also provides you with an option to look for a certain Speaker. You can do this by pressing the CTRL-F  key combination on your keyboard or by selecting the find option from the Edit menu:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakerFind.png]]&lt;br /&gt;
&lt;br /&gt;
The Find Speaker window will pop up:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakerSearch.png]]&lt;br /&gt;
&lt;br /&gt;
Enter text to search for in the Search For text box. The checkboxes in Search Locations determines where the editor will look for the text:&lt;br /&gt;
; Name : The editor looks in the name of the Speaker for a match&lt;br /&gt;
; UUID : The editor looks in the unique identifier of the Speaker for a match&lt;br /&gt;
&lt;br /&gt;
You can select both locations to search in both the UUID and the Name of Speakers. If you tick the Match Case check box, only Speakers are returned if they contain the text with a matching case.&lt;br /&gt;
&lt;br /&gt;
The results are displayed at the bottom of the screen. It contains 3 columns:&lt;br /&gt;
; Name : Name of the Speaker&lt;br /&gt;
; UUID : Unique identifier of the Speaker&lt;br /&gt;
; Groups : All the Speaker Groups this Speaker is assigned to&lt;br /&gt;
&lt;br /&gt;
{{warning|The editor only looks through the Speakers it has found so far. This means that he might not return all Speakers if the Refreshing icon is still animating!}}&lt;br /&gt;
&lt;br /&gt;
=== Assigning Speakers to Speaker Groups ===&lt;br /&gt;
Speaker Groups are assigned on the individual characters and items themselves. They can belong to more than 1 Speaker Group. To assign a Speaker Group to a character or item, select it in the editor and open up the proeprties panel ('''CTRL-B''' by default).&lt;br /&gt;
&lt;br /&gt;
Look for the ''Speaker Group'' property in the properties pane of the object:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_CharacterProperties.png]]&lt;br /&gt;
&lt;br /&gt;
Select the property and click the button to open up the Speaker Group Assignment Editor:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_SpeakerGroupAssign.png]]&lt;br /&gt;
&lt;br /&gt;
The available Speaker Groups are in the ''Available groups'' list. The currently assigned Speaker Groups are in the ''Assigned Speaker Groups'' list.&lt;br /&gt;
&lt;br /&gt;
The Speaker Group Assignment Editor also lists the Speaker Groups that were set on the Root Template for this object.&lt;br /&gt;
&lt;br /&gt;
To assign this object to certain Speaker Groups, you have to select groups and put them in the '''Assigned Speaker Groups'' list. There are two ways to do this:&lt;br /&gt;
* Double-click a Group from the ''Available groups'' list&lt;br /&gt;
* Select a Group from the ''Available groups'' list and click the ''Assign'' button.&lt;br /&gt;
&lt;br /&gt;
To remove this Object from a certain Speaker Group, you have to remove the Group from the Assigned Speaker Groups list. There's 2 ways to do this:&lt;br /&gt;
* Double-click a Group in the ''Assigned Speaker Groups'' list&lt;br /&gt;
* Select a Group in the ''Assigned Speaker Groups'' list and click the ''Remove'' button.&lt;br /&gt;
&lt;br /&gt;
Click the ''OK'' button to apply your changes and close the Speaker Group Assignment Editor. Click the ''Cancel'' button to close the Speaker Group Assignment Editor without applying your changes.&lt;br /&gt;
&lt;br /&gt;
= Adding Text to Nodes =&lt;br /&gt;
To add text to a node or edit the existing text, double click on the node. This will open the 'Edit Tagged Texts' window.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:EditText.png]]&lt;br /&gt;
&lt;br /&gt;
To add a tagged text, click the add button. This will add a new Tagged text form. The text for the node can be entered in the textbox.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:EditText2.PNG]]&lt;br /&gt;
&lt;br /&gt;
A tagged text can have multiple text blocks. To add a new text block, click the ''Add'' button. This will add an extra textbox. To remove one, click the ''X'' button. One of the text blocks will be randomly chosen when the dialog plays.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:EditText3.PNG]]&lt;br /&gt;
&lt;br /&gt;
To personalize the text, you can add multiple Tagged Text forms and define rules on which one to choose while playing the dialog. This way, you can show a different text depending on whether the players are dwarves or elves.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Edit_Text4.png]]&lt;br /&gt;
&lt;br /&gt;
The tagged texts are checked in the given order (see numbers on top, left to right, top to bottom). The first one that meets the conditions, is chosen. &lt;br /&gt;
The first text block will be shown in the dialog node in the editor.&lt;br /&gt;
&lt;br /&gt;
== Defining Rules ==&lt;br /&gt;
A rule will check if all/any/none... members of the speakergroup or a single speaker have/has the given tag(s). To add a rule, click the ''+'' button, to remove one, click the ''-'' button.&lt;br /&gt;
&lt;br /&gt;
=== Show this when All/Any of the following rules are valid ===&lt;br /&gt;
When choosing ''All'', all of the conditions needs to be met before that tagged text is chosen. When choosing ''Any'', only one condition needs to be met. It doesn't matter which one.&lt;br /&gt;
&lt;br /&gt;
=== Conditions ===&lt;br /&gt;
There are 5 options:&lt;br /&gt;
; Has all : will check if all members of the specified group have the given tag.&lt;br /&gt;
; Has any : will check if there is at least one member in the group who has the given tag.&lt;br /&gt;
; Has none : will check if there are no members in the group with the given tag.&lt;br /&gt;
; And all : will make a subgroup of rules. All rules in the subgroup should be met.&lt;br /&gt;
; And any : will make a subgroup of rules. Only one of the rules in the subgroup has to be met.&lt;br /&gt;
&lt;br /&gt;
=== Speaker ===&lt;br /&gt;
Choose a speaker or speaker group on which the rule should be checked.&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
By clicking on the '...' button, the ''Add Tags'' window can be opened in which you can choose multiple tags.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:AddTags.png]]&lt;br /&gt;
&lt;br /&gt;
On the ''Available Tags'' tab, you can see all the possible tags that can be chosen. The ''Current Tags'' tab shows all the tags that are used in the current node's tagged text block checks. The filter can be used to search for specific tags.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
[[File:RulesComplicated.png]]&lt;br /&gt;
&lt;br /&gt;
In the above example, we have two subgroups: 2 and 2c. 2c is a subgroup in subgroup 2.&lt;br /&gt;
&lt;br /&gt;
The tagged text for this set of rules will be selected when:&lt;br /&gt;
* 1 and 2 are met (because of ''Show this when ALL of the following rules are valid''.&lt;br /&gt;
* 2 is met when any rule in 2 is met (because of the ''And Any of the following rules''). So when 2a, 2b OR 2c is met.&lt;br /&gt;
* 2c is met when all of the rules in 2c are met (because of the ''And All of the following rules''). So when 2c' AND 2c&amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt; are met.&lt;br /&gt;
&lt;br /&gt;
= Node Properties and Node Types =&lt;br /&gt;
In this section we'll cover the Node properties in detail. Not all Node Types will have the same properties, but all Text Nodes (nodes that display text in the dialogue) shared a set of common properties. We'll look at those first.&lt;br /&gt;
&lt;br /&gt;
== Base Text Node Properties ==&lt;br /&gt;
Greeting, Answer and Question nodes are all Text Nodes. As such they all share a number of properties:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:NodeProperties2.png]]&lt;br /&gt;
&lt;br /&gt;
=== Addressed To ===&lt;br /&gt;
In some languages, a sentence being said to a man is different than the same sentence being said to a woman.&lt;br /&gt;
&lt;br /&gt;
English: You are beautiful&lt;br /&gt;
&lt;br /&gt;
French: Tu es beau (to a man) vs Tu es belle (to a woman)&lt;br /&gt;
&lt;br /&gt;
To be able to choose the right version, we need to know to whom the sentence is addressed. This information is stored in the ''Addressed To'' property.&lt;br /&gt;
&lt;br /&gt;
If no ''Addressed To'' speaker is specified, it will be addressed to the first speaker (that is not the ''Speaker'' of the node). If a ''Look At'' value is set for this node, the speaker of that property is taken.&lt;br /&gt;
&lt;br /&gt;
=== EndNode ===&lt;br /&gt;
Checking this checkbox (and thus setting it to True), means that the dialogue will stop executing after this node has been shown. You'll see that the Node turns red to indicate it is an End Node now. You also can't connect nodes to an End Node.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_EndNode.png]]&lt;br /&gt;
&lt;br /&gt;
=== Exclusive ===&lt;br /&gt;
Normally a dialog selects a node to display out of the list of valid nodes at the point of execution. Out of all those valid nodes it selects a random node. When the dialog encounters one or more valid Exclusive nodes in that list, it stops considering all non-exclusive nodes. This means that the dialog will select a random node from the group of valid Exclusive nodes. This can be used to alter the flow of a dialog in case a certain condition is set and the dialog shouldn't take the normal path. For more info check [[#Controlling Dialogue Flow|Controlling Dialogue Flow]].&lt;br /&gt;
&lt;br /&gt;
=== Logical Name ===&lt;br /&gt;
This is a human-readable name that's useful to provide context for a dialog node. Can be useful for making the use of a node clear and for voice recordings. The logical name is displayed at the top of a node in the dialog overview.&lt;br /&gt;
&lt;br /&gt;
=== Optional ===&lt;br /&gt;
Optional nodes function as normal nodes unless the dialog doesn't encounter any valid nodes when looking for a node to show. If the dialog doesn't encounter any valid nodes, but it has a list of optional nodes, it'll select a random node out of the optional nodes and skip it. The selected optional Node will not be shown then, but the dialog will progress as if that Node was shown. Note that the nodes are '''skipped''', that means '''none''' of the actions of the nodes are performed (so no flags are set). For more info see [[#Controlling Dialogue Flow|Controlling Dialogue Flow]].&lt;br /&gt;
&lt;br /&gt;
=== Shown Once ===&lt;br /&gt;
When ''Shown Once'' is checked the node will only be shown once during a dialog instance. The node will be shown again when the dialog starts again.&lt;br /&gt;
&lt;br /&gt;
=== Speaker ===&lt;br /&gt;
Who says the text in this Node? For Question Nodes this also decides who has to click the question. Clicking this property allows you to chose a value from a dropdown list containing all the Speaker Slots defined in this dialogue.&lt;br /&gt;
&lt;br /&gt;
=== Stub ===&lt;br /&gt;
Indicates that this node is a work in progress (not used in practice).&lt;br /&gt;
&lt;br /&gt;
=== Tags ===&lt;br /&gt;
The ''tags'' property can be used to assign multiple tags to a dialog node. The '''SFX_ONLY''' tag can be used on dialog nodes that don't need to be voiced.&lt;br /&gt;
&lt;br /&gt;
=== Texts in this Node ===&lt;br /&gt;
List of all the texts contained in this node. More about the texts and how to create them in [[#Adding Text to Nodes|Adding Text to Nodes]].&lt;br /&gt;
&lt;br /&gt;
=== UUID ===&lt;br /&gt;
Unique identifier of this node. This is generated for you and can't be changed.&lt;br /&gt;
&lt;br /&gt;
=== Transition Mode ===&lt;br /&gt;
Indicates how the dialog progresses when it encounters this Node. It has 2 possible settings.&lt;br /&gt;
&lt;br /&gt;
==== Wait for input ====&lt;br /&gt;
This is the default setting. The dialog will display the node and then wait for a user to click ''continue'' (or ''end'' in the case of an End Node)&lt;br /&gt;
&lt;br /&gt;
==== Wait X seconds ====&lt;br /&gt;
The dialog will show the node and then wait X seconds before it shows the next node in the dialogue tree. X is a number that you can fill in when you select this transition mode:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_TransitionMode.png]]&lt;br /&gt;
&lt;br /&gt;
=== Flags to Check ===&lt;br /&gt;
Which flags is this Node checking? More about flags in [[#Controlling Dialogue Flow|Controlling Dialogue Flow]].&lt;br /&gt;
&lt;br /&gt;
=== Flags to Set ===&lt;br /&gt;
Which flags is this Node setting? More about Flags in [[#Controlling Dialogue Flow|Controlling Dialogue Flow]] and [[#Flags to Set property|Flags to Set property]].&lt;br /&gt;
&lt;br /&gt;
=== Node Context ===&lt;br /&gt;
What's the context for this Node? Use this to clarify a Node or for voice recording purposes, or as comments for yourself or others about this node (never shown to players).&lt;br /&gt;
&lt;br /&gt;
== Text Nodes ==&lt;br /&gt;
&lt;br /&gt;
=== Greeting ===&lt;br /&gt;
[[File:Dialog_Greeting.png]]&lt;br /&gt;
&lt;br /&gt;
These nodes indicate where a dialogue starts executing. They form the roots of the dialogue tree.&lt;br /&gt;
&lt;br /&gt;
=== Question ===&lt;br /&gt;
[[File:Question.png]]&lt;br /&gt;
&lt;br /&gt;
These Nodes are used to ask questions to other Speakers in the dialogue. When a dialogue encounters these nodes it'll present a list with all valid Question nodes to the Speaker that owns the Nodes.&lt;br /&gt;
&lt;br /&gt;
{{warning|You cannot have a mix of valid ''Answer Nodes'' and ''Question Nodes'' as children of a single Node. When that happens the game will warn you and ignore the ''Answer Nodes''.}}&lt;br /&gt;
&lt;br /&gt;
=== Answer ===&lt;br /&gt;
[[File:Dialog_Answer.png]]&lt;br /&gt;
&lt;br /&gt;
These nodes are simple text entries. Most commonly used as replies to player Questions.&lt;br /&gt;
&lt;br /&gt;
=== Logic Nodes ===&lt;br /&gt;
The Nodes in this section do not contain any text themselves and only exist to change the flow or to simplify the structure of a dialogue. As a result these Nodes do '''not''' have the base Text Node properties, but have their own (small) set of properties.&lt;br /&gt;
&lt;br /&gt;
==== Jump Nodes ====&lt;br /&gt;
Jump Nodes are Nodes that reference other Nodes. They are a way to re-use nodes or as a means to keep dialogue structure cleaner by cutting down on the number of child connections needed. A Jump Node is constructed by pointing it to another node in the dialogue.&lt;br /&gt;
&lt;br /&gt;
===== Properties =====&lt;br /&gt;
; Jump To : This indicates which Node(s) a Jump node references. This Property can have 2 values:&lt;br /&gt;
:; Start of Node : This Jump node references the pointed to Node. This is as if the pointed to Node and its children are inserted at the point of the Jump Node.&lt;br /&gt;
:: {{warning|The pointed-to Node still needs to be valid before it can be shown (flag checks need to pass).}}&lt;br /&gt;
:; End of Node : This Jump Node references the children of the pointed-to Node. This is as if the parent Node of this Jump Node has all children of the pointed-to Node connected to it.&lt;br /&gt;
:: {{warning|The pointed-to Node does '''not''' need to be valid. The children of the pointed-to Node are still validated though.}}&lt;br /&gt;
; Target Node UUID : The UUID of the Node this Jump Node is pointing to. You can not change this. To see which Node this is, double click the Jump Node and the editor will center the view and select the pointed-to Node.&lt;br /&gt;
; UUID: The unique identifier of this Node. You can not change this.&lt;br /&gt;
&lt;br /&gt;
===== Creating Jump Nodes =====&lt;br /&gt;
# Select a Node that accepts children and select Jump Node from the Node Context menu.&lt;br /&gt;
#:[[File:Dialog_JumpNode.png]]&lt;br /&gt;
# Your cursor will now change into a targetting cross.&lt;br /&gt;
# Select a node in the dialog to create a reference to that Node. &lt;br /&gt;
#:[[File:Dialog_JumpCreated.png]]&lt;br /&gt;
&lt;br /&gt;
If you want to cancel the creation of a ''Jump Node'', you can press the '''ESCAPE''' key.&lt;br /&gt;
&lt;br /&gt;
Once your Node has been created you can set the ''Jump To''-property to change which node(s) it references.&lt;br /&gt;
&lt;br /&gt;
== DOS specific Nodes ==&lt;br /&gt;
The Nodes in this section are not part of the Dialogue framework. they are Nodes that were created specifically for Divinity: Original Sin. These may or may not be available in other games.&lt;br /&gt;
&lt;br /&gt;
=== Pop Nodes ===&lt;br /&gt;
[[File:Dialog_Pop.png]]&lt;br /&gt;
&lt;br /&gt;
Pop Nodes are Nodes that were introduced to support the old Keyword dialogues. They function much like a ''Jump Node'' that always points to the End of a Node.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
; Exclusive : Functions the same as the ''Exclusive'' property of Text Nodes. See [[#Exclusive|Exclusive Property]].&lt;br /&gt;
; Pop Count : How many levels the Node should go back. This a number that starts from 0. See [[#Pop Levels]] for more information.&lt;br /&gt;
; UUID : The unique identifier of this Node.&lt;br /&gt;
&lt;br /&gt;
==== Pop Levels ====&lt;br /&gt;
Every time a list of Quesiton Nodes is presented, a ''pop level'' is created. This is a point in the dialogue that Pop Nodes can refer to, to present a list of Questions to the player.&lt;br /&gt;
&lt;br /&gt;
The Pop Node then functions as a Jump Node that jumps back to the end of the Parent Node of the specified level of Question Nodes. To see how many levels to jump back to, you have to go back X+1 Question Nodes in the dialogue tree, starting from the Pop Node. X is the value you filled in for the Pop Count property. You can see which node a Pop Node it's targetting by double clicking the Pop Node. If the Pop Node can't Jump back to the specified pop level you'll get an error message in the editor when double clicking the Pop Node.&lt;br /&gt;
&lt;br /&gt;
=== Dual Dialog Node ===&lt;br /&gt;
[[File:Dialog_DualDialog.png]]&lt;br /&gt;
&lt;br /&gt;
Dual Dialog Nodes are Nodes that pause the current dialogue and ask the Game Scripting to start a certain sub-dialog. These sub-dialogs are typically decission dialogues between 1 or more players. When the sub dialogue ends, the current dialogue resumes again.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
; Dual Dialog Name : This is the name (without file extension) of the sub dialog to start. Double clicking the Dual Dialog content, tries to open or switch to a dialog editor for the pointed-to sub dialog.&lt;br /&gt;
; Exclusive : Functions the same as the Exclusive property of Text Nodes. See [[#Exclusive|Exclusive Property]].&lt;br /&gt;
; Logical Name : Functions the same as the Logical Name property of Text Nodes. See [[#Logical Name|Logical Name Property]].&lt;br /&gt;
; Optional : Functions the same as the Optional property of Text Nodes. See [[#Optional|Optional Property]].&lt;br /&gt;
; Shown Once : Functions the same as the Shown Once property of Text Nodes. See [[#Shown Once|Shown Once Property]].&lt;br /&gt;
; UUID : The unique identifier of this Node.&lt;br /&gt;
&lt;br /&gt;
=== Persuasion Nodes ===&lt;br /&gt;
&lt;br /&gt;
== Game specific Node Properties ==&lt;br /&gt;
In addition to the built-in Node Properties, a game can also add custom properties to Nodes. These Properties are on the Advanced tab of the properties sidebar:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_GameProperties.png]]&lt;br /&gt;
&lt;br /&gt;
=== DOS Node Properties ===&lt;br /&gt;
Divinity Original Sin has a couple of Node options that are unique to this game. These are all applied to the Text Nodes (Greeting, Question, Answer).&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:GameNodeProperties.PNG]]&lt;br /&gt;
&lt;br /&gt;
==== Sound ====&lt;br /&gt;
; Sound Event : This is the id of an additional sound that is started when the node is started (eg. evil music when an evil answer is chosen).&lt;br /&gt;
; Instruments : This is the id of a sound for a specific instrument. Depending on the instrument the player choose, the sound for the given instrument will be played. If there is a sound event set, the instrument sound will not be played.&lt;br /&gt;
&lt;br /&gt;
==== Animation ====&lt;br /&gt;
; Emotional Expression : This determines which animation the Speaker of this Node will play. Can also be used as a hint to the voice actors. '''If an animation for the Speaker of this Node is set as well, the emotional expression will not be played'''.&lt;br /&gt;
; Look At : You can define per dialog Node what Speaker a certain Speaker needs to face when the Node starts. This is done by defining Look-At entries. You can add an entry by clicking the Add button. This will add an empty Look-At entry:&lt;br /&gt;
:[[File:GameNodePropertiesAddLookat.png]]&lt;br /&gt;
:&lt;br /&gt;
:Pressing the Add button again will add more empty Look-At entries to this node.  &lt;br /&gt;
:The two dropdown boxes control which Speaker looks at which Speaker. The first one is the NPC that's going to face a certain Speaker. The second one is the target Speaker. '''You can only select Speakers that :were assigned to this dialog!'''&lt;br /&gt;
:&lt;br /&gt;
:You can delete a Look-At entry again by clicking the Delete button:&lt;br /&gt;
:[[File:GameNodePropertiesDeleteLookat.png]]&lt;br /&gt;
:To copy paste the look at property to another node in the dialog, click the 'Copy' button, select another node and click the 'Paste' buttons.&lt;br /&gt;
; Animations : For each speaker, an animation can be set that will be performed during that dialognode.  To add an animation, click the add button.&lt;br /&gt;
:[[File:GameNodePropertiesAddAnimation.png]]&lt;br /&gt;
:Choose one of the speakers and fill in the name of an animation. &lt;br /&gt;
:Copy-pasting and deleting an animation can be done the same way as for 'Look at'.&lt;br /&gt;
:&lt;br /&gt;
:If an animation for the speaker of the selected node AND an 'Emotional expression' (which is also for the speaker of the selected node) is set, only the animation will be played.&lt;br /&gt;
&lt;br /&gt;
==== Game ====&lt;br /&gt;
; Camera Target : The camera is, by default, following the speaker in a dialog. Choose another speaker from the list to target the camera on another player during the dialog node.&lt;br /&gt;
; Extra node time : If a node needs to be shown longer than normal, that extra time can be set in the ''Extra node time'' property. This time will be added to the default node time (based on the amount of words), the length of the voice data or the ''Wait time'' set for nodes with the ''Wait for x seconds'' node transition mode.&lt;br /&gt;
&lt;br /&gt;
= Controlling Dialogue Flow =&lt;br /&gt;
All the Nodes in a dialogue form a tree by connecting with their parents and children. The game then walks through the dialogue tree to figure out which Nodes to show to players and when. It does this by starting at the roots of the tree, selecting a root to show and from that root working itself through the branches towards the leaves that are connected to it. The [[#Greeting|Greeting Nodes]] form the roots of the tree, so this is where all dialogues will start. The leaves are the End Nodes in a dialogue, and this is where execution of a dialogue stops.&lt;br /&gt;
&lt;br /&gt;
== Node validation ==&lt;br /&gt;
When a dialogue starts, the game looks through all of the roots of that dialogue and validates them. Validating a node means checking all the conditions that are put on the Node. Only Nodes that pass this test are considered for display. The game performs a similar test for the non-root Nodes that are connected to a root: only the valid nodes are considered for display.&lt;br /&gt;
&lt;br /&gt;
Validating a Node is a process that results in a boolean value. You can think of a boolean value as a truth value, something that is either '''true''' or '''false'''. So validating a node results in 2 possible truths: the node is either valid ('''true''') or invalid ('''false''').&lt;br /&gt;
&lt;br /&gt;
=== Node Conditions ===&lt;br /&gt;
While a game can have custom validation requirements on a Node, most of the conditions are put on Nodes through the [[#Flags to Check|Flags to Check]] property of Nodes. A Flag is also a boolean value. It can either be set ('''true''') or not set ('''false'''). By default, Flags start out as being not set and are thus considered to be '''false'''.&lt;br /&gt;
&lt;br /&gt;
The ''Flags to Check'' property is a list of flags that need to have a certain value (set or not set) if a Node is to be considered valid. Each entry of this list compares the boolean value of the specified Flag with a desired boolean value. If the boolean value of the Flag matches the desired boolean value, the games considers that entry to be '''true'''. If the two boolean values don't match it considers that entry to be '''false'''. The games calculates if a Node is valid or not, by combining all of the boolean values of the entries of that list. We'll see how we can combine boolean values in the next section.&lt;br /&gt;
&lt;br /&gt;
==== Boolean Logic ====&lt;br /&gt;
Boolean Logic describes how we can combine two boolean values to come up with a new boolean value that's the combination of the two input values. We call the way we combine the 2 input values an operator. It's something that operates on 2 input values to produce a new output value. There's several operators you can use to combine boolean values, but we'll stick to the ones used by the dialogue system in this section.&lt;br /&gt;
&lt;br /&gt;
===== The AND operator =====&lt;br /&gt;
The AND operator is used to enforce that the two input values passed to it are '''true'''. '''If and only if''' the two input values are '''true''' will the AND-operator return '''true''' as well. As soon as one (or both) of the inputs are '''false''' it will return '''false''' as well.&lt;br /&gt;
&lt;br /&gt;
To summarize:&lt;br /&gt;
* '''true''' AND '''true''' gives us '''true'''&lt;br /&gt;
* '''false''' AND '''true''' gives us '''false'''&lt;br /&gt;
* '''true''' AND '''false''' gives us '''false'''&lt;br /&gt;
* '''false''' AND '''false''' gives us '''false'''&lt;br /&gt;
&lt;br /&gt;
===== The OR operator =====&lt;br /&gt;
The OR-operator is more lenient than the AND operator. It returns '''true''' as soon as any of the two input values is '''true'''. That means it will only return '''false''' if both input values are '''false''' too.&lt;br /&gt;
&lt;br /&gt;
To summarize:&lt;br /&gt;
* '''true''' OR '''true''' gives us '''true'''&lt;br /&gt;
* '''false''' OR '''true''' gives us '''true'''&lt;br /&gt;
* '''true''' OR '''false''' gives us '''true'''&lt;br /&gt;
* '''false''' OR '''false''' gives us '''false'''&lt;br /&gt;
&lt;br /&gt;
===== The NOT operator =====&lt;br /&gt;
The NOT operator simply returns the inverse of whatever you put into it. That means that NOT '''true''' will result in '''false'''. Similarly NOT false will result in true.&lt;br /&gt;
&lt;br /&gt;
To summarize:&lt;br /&gt;
* NOT '''true''' gives us '''false'''&lt;br /&gt;
* NOT '''false''' gives us '''true'''&lt;br /&gt;
&lt;br /&gt;
==== Validating a Node ====&lt;br /&gt;
Now that we know how to combine boolean values, we can look at how the game checks the [[#Flags to Check]] property of Node. Like we already mentioned, this property is a list of Flags that need to be set ('''true''') or not set ('''false''') before this Node is considered valid (and thus, considered for display). It compares the boolean values of the flags with the desired boolean value and considers an entry true if they match. If they don't match it considers the entry '''false'''. The game then combines all of these boolean values using the AND operator. This means that a Node is only valid if that list only contains '''true''' values. As soon as that list of entries contains a '''false''', the node is considered invalid.&lt;br /&gt;
&lt;br /&gt;
==== Adding Flag Checks ====&lt;br /&gt;
To add a Flag check to a Node, select the Flags to Check property of the Node in the properties sidebar and click the edit button:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_AddNodeCheck.png]]&lt;br /&gt;
&lt;br /&gt;
You'll get the Flag Editor screen:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_FlagCategories.png]]&lt;br /&gt;
&lt;br /&gt;
Select the Flag Category you want to add a Flag to from the Flag Categories list. You will then be presented with an overview of this Flag Category:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_AddingFlags.png]]&lt;br /&gt;
&lt;br /&gt;
The top list box shows all available Flags of the selected type. This is a list of all the Flags used in the whole dialogue or a list of all defined Tags (see [[Tag_editor]] to define Tags) in the case of the Tags Flag type.&lt;br /&gt;
&lt;br /&gt;
The bottom list box, the ''Active flags'' list box, shows the Flags that are active on the currently selected Node.&lt;br /&gt;
&lt;br /&gt;
Type the name of  the Flag you want to add in the ''Custom flag'' text field and click the Add button to add a new Flag. The new Flag will be automatically added to the Active flags list.&lt;br /&gt;
&lt;br /&gt;
To remove a Flag from the currently selected Node, move the Flag from the ''Active flags'' list to the top list box. You can do this by double clicking the Flag in the ''Active flags'' list box or by selecting it in the ''Active flags'' list and clicking the up arrow button.&lt;br /&gt;
&lt;br /&gt;
To add an already defined Flag to the currently selected Node move it from the top list box to the ''Active flags'' list. You can do this by double clicking the Flag in the top list or by selecting it in the top list and clicking the down arrow button.&lt;br /&gt;
&lt;br /&gt;
Hit the ''OK'' button when you're done adding flags and apply your changes. Or hit the ''Cancel'' button to discard your changes and close the Flag Editor.&lt;br /&gt;
&lt;br /&gt;
==== Practical Examples ====&lt;br /&gt;
Let's say we have a node that we want to show if a certain local flag (called ''localFlag'') hasn't been set and if a certain global flag (called ''globalFlag'') is set. More concrete this means that this node is valid if:&lt;br /&gt;
* ''localFlag'''s value has to be false.&lt;br /&gt;
*: AND&lt;br /&gt;
* ''globalFlag'''s value has to be true.&lt;br /&gt;
This translates into the following Flags to Check property:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_NodeChecks.png]]&lt;br /&gt;
&lt;br /&gt;
As you can see, a checked checkbox indicates that we want a desired value of '''true'''. An unchecked checkbox indicates that we want a desired value of '''false'''.&lt;br /&gt;
&lt;br /&gt;
When validating this Node the game performs these steps:&lt;br /&gt;
# build a list of all Flag checks: we have 2. Checking if ''localFlag'' is not set and checking if ''globalFlag'' has been set.&lt;br /&gt;
# Compares the value of ''localFlag'' with the desired value of '''false''' and puts the result in a list.&lt;br /&gt;
# Compares the value of ''globalFlag'' with the desired value of '''true''' and puts the result in a list.&lt;br /&gt;
# Goes over the list created in step 2 and 3 and combines the boolean values with the AND operator&lt;br /&gt;
&lt;br /&gt;
Let's see how this work with the concrete case where ''localFlag'' is not set and ''globalFlag'' is set:&lt;br /&gt;
# build a list of all Flag checks: we have 2. Checking if ''localFlag'' is not set and checking if ''globalFlag'' has been set.&lt;br /&gt;
# ''localFlag'' is not set, so has a value of '''false'''. This equals our desired value of '''false'''. So we put '''true''' in the list&lt;br /&gt;
# ''globalFlag'' is set, so has a value of '''true'''. This equals our desired value of '''true'''. So we put '''true''' in the list&lt;br /&gt;
# We go over the result list and combine our results with the AND operator:&lt;br /&gt;
# '''true''' AND '''true''' gives us '''true'''&lt;br /&gt;
&lt;br /&gt;
We ended up with a result of '''true''', so this Node is considered valid.&lt;br /&gt;
&lt;br /&gt;
Let's change our Flags to Check property to the following:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_NodeChecks2.png]]&lt;br /&gt;
&lt;br /&gt;
And let's again use the case where ''localFlag'' is not set and ''globalFlag'' is set:&lt;br /&gt;
# build a list of all Flag checks: we have 2. Checking if ''localFlag'' is set and checking if ''globalFlag'' has not been set.&lt;br /&gt;
# ''localFlag'' is not set, so has a value of '''false'''. This does not equal our desired value of '''true'''. So we put '''false''' in the list&lt;br /&gt;
# ''globalFlag'' is set, so has a value of '''true'''. This does not equal our desired value of '''false'''. So we put '''false''' in the list&lt;br /&gt;
# We go over the result list and combine our results with the AND operator:&lt;br /&gt;
# '''false''' AND '''false''' gives us '''false'''&lt;br /&gt;
&lt;br /&gt;
This means our Node is invalid.&lt;br /&gt;
&lt;br /&gt;
Now let's look at an example with more than 2 entries in our check list:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_NodeChecks3.png]]&lt;br /&gt;
&lt;br /&gt;
Let's assume that ''localFlag'' is set, ''otherLocalFlag'' is set and ''globalFlag'' is not set:&lt;br /&gt;
&lt;br /&gt;
# build a list of all Flag checks: we have 3. Checking if ''localFlag'' is set, checking of ''otherLocalFlag'' has not been set and checking if ''globalFlag'' has not been set.&lt;br /&gt;
# ''localFlag'' is set, so has a value of ''''''true''''''. This equals our desired value of ''''''true''''''. So we put ''''''true'''''' in the list&lt;br /&gt;
# ''otherLocalFlag'' is set, so has a value of ''''''true''''''. This does not equals our desired value of ''''''false''''''. So we put ''''''false'''''' in the list.&lt;br /&gt;
# ''globalFlag'' is not set, so has a value of ''''''false''''''. This equals our desired value of ''''''false''''''. So we put ''''''true'''''' in the list&lt;br /&gt;
# We go over the result list and combine our results with the AND operator:&lt;br /&gt;
# ''''''true'''''' AND ''''''false'''''' AND ''''''true''''''&lt;br /&gt;
# We combine from left to right:&lt;br /&gt;
# (''''''true'''''' AND ''''''false'''''') AND ''''''true'''''' &lt;br /&gt;
# which turns into:&lt;br /&gt;
# ''''''false'''''' AND ''''''true''''''&lt;br /&gt;
# which gives us: ''''''false''''''&lt;br /&gt;
&lt;br /&gt;
This Node is considered invalid for the flag values given in the example.&lt;br /&gt;
&lt;br /&gt;
==== Visual Cue ====&lt;br /&gt;
When a Text Node is checking Flags a little square is shown on the '''left''' of the Node. Hovering over this squares shows which Flags are being checked by that Node:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_FlagsToCheckHover.png]]&lt;br /&gt;
&lt;br /&gt;
The pop-up shows the type of the Flag that's being set and what value it's being set to in brackets. A value of '''True''' means we're checking if the flag is set. A value of '''False''' means we're checking if the flag is not set.&lt;br /&gt;
&lt;br /&gt;
=== Node Selection ===&lt;br /&gt;
So the dialogue now has a list of Nodes that can be potentially shown (either the roots of the dialogue or the branches and leaves flowing from those roots). It will then select a Node from this list to determine the next Node to show to players. It does this using the following process:&lt;br /&gt;
&lt;br /&gt;
# Collect all nodes that should be considered for display. This is all Root Nodes when the dialogue starts or all children of the previously shown Node&lt;br /&gt;
# Validate all Nodes in this list:&lt;br /&gt;
##If an Optional Node and the Node is not valid: Keep in a list of Optional Nodes.&lt;br /&gt;
##If an Optional Node and the Node is valid: Keep in a list of Valid Nodes.&lt;br /&gt;
##if an Exclusive Node and the Node is valid: add to a list of Exclusive Nodes&lt;br /&gt;
##if a normal (not exclusive and not optional) Node and the Node is Valid: add to a list of Valid Nodes&lt;br /&gt;
# Now select a Node to show from our lists:&lt;br /&gt;
##if we have Nodes in our Exclusive Nodes list: select a '''random''' Node from this list.&lt;br /&gt;
##'''ELSE'''&lt;br /&gt;
##if we have Nodes in our Valid Nodes list: select a '''random''' Node from this list&lt;br /&gt;
##'''ELSE'''&lt;br /&gt;
##if we have Nodes in our Optional Nodes list: select a '''random''' Node from this list&lt;br /&gt;
&lt;br /&gt;
After a Node has been selected for display, the game will execute the [[#Node_Actions|Actions]] attached to that Node.&lt;br /&gt;
&lt;br /&gt;
{{warning| For '''Greeting'''' Nodes, the size of the Exclusive Nodes list is limited to 1. This effectively means that the game will pick the first valid Exclusive Greeting Node to use as a starting point of the dialog. This can be used to simplify starting conditions of your dialogs by separating specific flows using Exclusive Greeting Nodes place at the top of your dialog.}}&lt;br /&gt;
&lt;br /&gt;
=== Node Actions ===&lt;br /&gt;
Some Nodes can have actions assigned to them that execute when the Node is selected for display. A game could add game specific actions to a Node, but the base Text Nodes (Greeting, Question, Answer) already come with a built-in action to set or un-set Flags.&lt;br /&gt;
&lt;br /&gt;
==== Flags to Set property ====&lt;br /&gt;
''Flags to Set'' is a property that indicates which flags to set or un-set when this Node is selected as the next Node in a dialogue.&lt;br /&gt;
&lt;br /&gt;
===== Adding and Removing Flags to Set =====&lt;br /&gt;
It's very similar in function to the ''Flags To Check'' property:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_FlagsToSet.png]]&lt;br /&gt;
&lt;br /&gt;
Clicking the ''edit'' button when the property is selected will open up the same Flag Editor as seen in [[#Adding_Flag_Checks|Adding Flag Checks]].&lt;br /&gt;
&lt;br /&gt;
Setting a Flag is done by checking the checkbox in front of the Flag's name.&lt;br /&gt;
&lt;br /&gt;
Un-setting a Flag is done by unchecking the checkbox in front of the Flag's name.&lt;br /&gt;
&lt;br /&gt;
==== Visual Cue ====&lt;br /&gt;
When a Text Node is setting Flags a little square is shown on the '''right''' of the Node. Hovering over this squares shows which Flags are being set by that Node:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Dialog_FlagsToSetHover.png]]&lt;br /&gt;
&lt;br /&gt;
The pop-up shows the type of the Flag that's being set and what value it's being set to in brackets. A value of '''True''' means the flag is being set. A value of '''False''' means the flag is being un-set.&lt;br /&gt;
&lt;br /&gt;
== Types of Flags ==&lt;br /&gt;
&lt;br /&gt;
There are several types of Flags available in the dialogue editor. Each type of Flag is handled differently, so it's important to know when to use a certain type of flag.&lt;br /&gt;
&lt;br /&gt;
=== Local Flags ===&lt;br /&gt;
Local Flags are the simplest type of Flag and is the only built-in Flag type in the dialogue system. Local Flags are flags that can be set or unset and that are local to the context of the dialogue they're used in. That means that other dialogues or game scripts can not reference these Flags. The state of Local Flags is saved and is not reset between instances of dialogues. this means: if a dialogue sets a local flag, the next time you start the dialogue again the flag will still be set.&lt;br /&gt;
&lt;br /&gt;
'''Important''': Since those flags are local to a Dialogue, this means that if you assign a dialogue to multiple characters they all refer to the same Local Flags! If talking to one character sets a Local Flag, it will be set when talking to another character with the same dialogue!&lt;br /&gt;
&lt;br /&gt;
=== Tag Flags ===&lt;br /&gt;
Tag flags check/set tags on speakers. Tags can also be checked/set from script, and can be statically assigned to characters and items using the [[Sidebar|sidebar]].&lt;br /&gt;
&lt;br /&gt;
=== Script Flags ===&lt;br /&gt;
Script flags can only be checked. There is a script coupled to each Script flag. The script itself can be found under Tools &amp;gt; Edit script flags. See the [[#Script_Flag_Editor|Script Flag Editor]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Global Flags ===&lt;br /&gt;
Global Flags are simple Flags that can be accessed by scripts or other dialogues. They are not tied to any item, character or dialog.&lt;br /&gt;
&lt;br /&gt;
=== Character Flags (DOS specific) ===&lt;br /&gt;
A Character Flag is a Flag that's tied to a specific character (or item). They are often used to indicate that a certain character knows or did something. They can be used in scripts and other dialogues.&lt;br /&gt;
&lt;br /&gt;
Character Flags can be set and unset but they always take a Speaker as a parameter. The Flags will then be set and unset for the character that's currently in the specified Speaker Slot.&lt;br /&gt;
&lt;br /&gt;
=== User Flags (DOS specific) ===&lt;br /&gt;
A User in DOS is a (human) player in the game. Every User controls a number of characters in the game. Similarly every playable character is assigned to a specific User. The User Flag is a shortcut for (un)setting a Character Flag on every character that's currently controlled by a specific User.&lt;br /&gt;
&lt;br /&gt;
User Flags, like Character Flags, take a Speaker as a parameter. The User Flag will then take the User that controls the character in the specified Speaker Slot and set a Character Flag for every character currently controlled by that Speaker. Checking if a certain User Flag is set, means going over the User's characters and checking if any of them have the Character Flag set. To clarify: as soon as a single character has the Character Flag set, the User Flag will be considered set.&lt;br /&gt;
&lt;br /&gt;
=== Party Flags (DOS specific) ===&lt;br /&gt;
A party in DOS consists out of several characters. Those characters can be assigned to different Users. A Party Flag is a shortcut for (un)setting a Character Flag on all characters in a certain party.&lt;br /&gt;
&lt;br /&gt;
Party Flags also take a Speaker as parameter. The Party Flag will then take the party of the character in that Speaker Slot and (un)set the Character Flag on all characters currently belonging to that party. Checking if a Party Flag is set, means going over the party's characters and checking if any of them have the Character Flag set. To Clarify: as soon as a single character in the party has the Character Flag set the Party Flag will be considered set.&lt;br /&gt;
&lt;br /&gt;
== Script Flag Editor ==&lt;br /&gt;
Adding, changing or removing a script flag can be done in the 'Edit script flags' window (Tools &amp;gt; Edit script flags).&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:EditScriptFlags.png]]&lt;br /&gt;
&lt;br /&gt;
A script flag has a uuid, a (unique) name, a description, the mod in which the script flag is defined and the filepath and the script itself. Script flags are saved in the dialogs folder under 'ScriptFlags'.&lt;br /&gt;
&lt;br /&gt;
The script itself consists of different conditions and a check at the end to define which combination of conditions should be true. Only the conditions mentioned below are supported at this time.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
Script flags have the following syntax:&lt;br /&gt;
 CONDITION x&lt;br /&gt;
 [&lt;br /&gt;
 CONDITION y&lt;br /&gt;
 CONDITION z&lt;br /&gt;
 ]&lt;br /&gt;
 CHECK &amp;quot;&amp;lt;check string&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Where the CONDITIONs between square brackets are a list of CONDITIONS. You can have as many conditions as you want, but you need at least 1. &lt;br /&gt;
Each CONDITION will be a script call that takes a number of parameters and produces a value that's either '''true''' or '''false'''. &lt;br /&gt;
The &amp;quot;check string&amp;quot; that is used in the CHECK statement then defines a way to combine all of these returned values and produce a single '''true''' or '''false''' value. This value will be the value of the Script Flag. So if your CHECK string produces a '''false''' the Script Flag will be considered not set. Any Dialog Node that then checks for this flag to be '''true''' will be considered not valid. &lt;br /&gt;
&lt;br /&gt;
Let's look at the &amp;quot;check string&amp;quot; in a bit more detail. Every CONDITION you list in the Script section of a Script Flag gets a number. These numbers start from 1. So the first CONDITION will get 1, the second one gets 2 and so on. The &amp;quot;check string&amp;quot; refers to return values of CONDITIONs by using these numbers. The first CONDITION's return value, for example, is referred to as c1. The second CONDITION's return value is c2 and so on. All these return values are then combined following the [[#Boolean_Logic|Boolean Logic]] we outlined before. The Boolean operators supported by the Script Flags are:&lt;br /&gt;
* | = OR&lt;br /&gt;
* &amp;amp; = AND&lt;br /&gt;
* ! = NOT&lt;br /&gt;
&lt;br /&gt;
So for example:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| '''CHECK &amp;quot;c1&amp;amp;c2&amp;quot;''' || Combine the return values of the first 2 CONDITIONs and combine them with the AND operator&lt;br /&gt;
|-&lt;br /&gt;
| '''CHECK &amp;quot;!c1&amp;amp;c2&amp;quot;''' || Use the NOT operator on the result of the first CONDITION and combine it with the result of the second CONDITION using the AND operator&lt;br /&gt;
|-&lt;br /&gt;
| '''CHECK &amp;quot;c1|c2&amp;quot;''' || Combine the return values of the first 2 CONDITIONS and combine them with the OR operator&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The second example uses the NOT operator '''only''' on the first CONDITION's result. What if we wanted to apply the NOT operator on the result of combining the return values of the first 2 CONDITIONs? We can use parentheses to group certain CONDITIONs and apply operators to that whole group:&lt;br /&gt;
&lt;br /&gt;
'''CHECK &amp;quot;c1&amp;amp;!(c2&amp;amp;c3)&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
This &amp;quot;check string&amp;quot; will combine the result of the first CONDITION with the '''inverse''' of the combination of the second and third CONDITION (combined using the AND operator here). Using parentheses combined with the boolean operators available gives you a lot of flexibility in creating complex conditions for Dialog Nodes.&lt;br /&gt;
&lt;br /&gt;
=== Available Conditions ===&lt;br /&gt;
&lt;br /&gt;
==== IsGlobalFlag ====&lt;br /&gt;
 CONDITION IsGlobalFlag(FlagName, Bool)&lt;br /&gt;
&lt;br /&gt;
Check if global flag has certain value&lt;br /&gt;
&lt;br /&gt;
==== IsLocalFlag ====&lt;br /&gt;
 CONDITION IsLocalFlag(FlagName, Bool)&lt;br /&gt;
&lt;br /&gt;
Check if local flag has certain value&lt;br /&gt;
&lt;br /&gt;
==== IsSpeakerFlag ====&lt;br /&gt;
 CONDITION IsSpeakerFlag(SpeakerIndex, FlagName, Bool)&lt;br /&gt;
&lt;br /&gt;
Check if speaker's character flag has certain value. If that speaker is not present, the result will always be '''false'''.&lt;br /&gt;
&lt;br /&gt;
==== IsUserFlag ====&lt;br /&gt;
 CONDITION IsPartyFlag(SpeakerIndex, FlagName, Bool)&lt;br /&gt;
&lt;br /&gt;
Check if speaker's user flag has certain value. If that speaker is not present, the result will always be '''false'''.&lt;br /&gt;
&lt;br /&gt;
==== IsSpeakerPresent ====&lt;br /&gt;
 CONDITION IsSpeakerPresent(SpeakerIndex, Bool)&lt;br /&gt;
&lt;br /&gt;
Check if a character at that speaker index is present in the dialog. E.g., you can have a dialog with 3 speakers, but pass NULL as the third speaker when starting it. In this case, this test will return '''false''' for the third speaker.&lt;br /&gt;
&lt;br /&gt;
==== IsMagicPocketsGold ====&lt;br /&gt;
 CONDITION IsMagicPocketsGold(SpeakerIndex, CompareOp, CompareValue)&lt;br /&gt;
&lt;br /&gt;
Check amount of gold in magic pockets (= per-user) for condition. CompareOp is one of &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, ==. Can also be used on NPCs.&lt;br /&gt;
&lt;br /&gt;
{{warning|CompareValue MUST be DialogVariable (starts with %).}}&lt;br /&gt;
&lt;br /&gt;
==== HasItemTemplate ====&lt;br /&gt;
 CONDITION HasItemTemplate(SpeakerIndex, Template, CompareOp, CompareValue)&lt;br /&gt;
&lt;br /&gt;
Check amount items with specified root template in speaker's inventory for condition. CompareOp is one of &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, ==. Can also be used on NPCs.&lt;br /&gt;
&lt;br /&gt;
{{warning|CompareValue MUST be DialogVariable (starts with %).}}&lt;br /&gt;
&lt;br /&gt;
==== HasItemTemplateInMagicPockets ====&lt;br /&gt;
 CONDITION HasItemTemplateInMagicPockets(SpeakerIndex, Template, CompareOp, CompareValue, MoveAndReport)&lt;br /&gt;
&lt;br /&gt;
Check amount of items with specified root template in magic pockets (= per-user) for condition. CompareOp is one of &amp;lt;, &amp;gt;, &amp;lt;=, &amp;gt;=, ==. If MoveAndReport is '''true''', template items are moved from other characters to this speaker's inventory.&lt;br /&gt;
&lt;br /&gt;
{{warning|CompareValue MUST be DialogVariable (starts with %).}}&lt;br /&gt;
&lt;br /&gt;
==== HasTalent ====&lt;br /&gt;
 CONDITION HasTalent(SpeakerIndex, TalentID)&lt;br /&gt;
&lt;br /&gt;
Check speaker has talent. TalentID is string.&lt;br /&gt;
&lt;br /&gt;
==== PartyMemberWithTalentInRange ====&lt;br /&gt;
 CONDITION PartyMemberWithTalentInRange(SpeakerIndex, TalentID, Range)&lt;br /&gt;
&lt;br /&gt;
Check speaker's party members in a range to have talent. TalentID is string.&lt;br /&gt;
&lt;br /&gt;
==== HasAbility ====&lt;br /&gt;
 CONDITION HasAbility(SpeakerIndex, AbilityID, Level)&lt;br /&gt;
&lt;br /&gt;
Check speaker has ability no lower then of certain level. AbilityID is string.&lt;br /&gt;
&lt;br /&gt;
==== IsTagged ====&lt;br /&gt;
 CONDITION IsTagged(SpeakerIndex, Tag)&lt;br /&gt;
&lt;br /&gt;
Check whether speaker has the specified tag.&lt;br /&gt;
&lt;br /&gt;
== Dialog Variable Editor ==&lt;br /&gt;
=== Overview ===&lt;br /&gt;
Each parameter of a Script Flag condition (FlagName, GroupName...) can be a Dialog Variable. A Dialog Variable starts with a % sign. While checking the flag, the variable is replaced by a default value or by a value set through script. All dialog variables are saved in the dialog folder under 'DialogVariables'.&lt;br /&gt;
&lt;br /&gt;
Variables have to be defined through the 'Dialog variables' (Tools &amp;gt; Edit dialog variables) window.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:EditDialogVariables.png]]&lt;br /&gt;
&lt;br /&gt;
 A variable has a uuid, a (unique) name, a description, a type, a default value, the mod in which the variable is declared and the filepath. The different types are&lt;br /&gt;
* Int&lt;br /&gt;
* Float&lt;br /&gt;
* String&lt;br /&gt;
* FixedString&lt;br /&gt;
&lt;br /&gt;
When you are writing a script and you use dialog variables that are not yet created, you will get a warning while saving. You can create the variable afterwards, but it is best to open the script and save it again afterwards. If the name of the variable is changed afterwards, the name in the script will be changed as well.&lt;br /&gt;
&lt;br /&gt;
An overview of all the dialog variables in the current dialog (the dialog variables used in the scripts of the scriptflags set in the current dialog) can be found under Tools &amp;gt; Current dialog nodes.&lt;br /&gt;
&lt;br /&gt;
=== Using Dialog Variables from Script ===&lt;br /&gt;
Dialog Variables can be set through Osiris script. To be able to do this there's a call supplied for every data type:&lt;br /&gt;
 call DialogSetVariableString((STRING)_Dialog, (STRING)_Variable, (STRING)_Value) &lt;br /&gt;
 call DialogSetVariableInt((STRING)_Dialog, (STRING)_Variable, (INTEGER)_Value)&lt;br /&gt;
 call DialogSetVariableFloat((STRING)_Dialog, (STRING)_Variable, (REAL)_Value) &lt;br /&gt;
 call DialogSetVariableFixedString((STRING)_Dialog, (STRING)_Variable, (STRING)_Value)&lt;br /&gt;
 call DialogSetVariableTranslatedString((STRING)_Dialog, (STRING)_Variable, (STRING)_StringHandleValue, (STRING)_ReferenceStringValue)&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
* '''_Dialog''' is the name of the dialog (without extension)&lt;br /&gt;
* '''_Variable''' is of the form &amp;lt;variable name&amp;gt;_&amp;lt;uuid&amp;gt;&lt;br /&gt;
* '''_Value''' is the actual value of this parameter for the dialog '''_Dialog'''.&lt;br /&gt;
* '''_StringHandleValue''' and '''_ReferenceStringValue''' can be obtained via the '''CharacterGetDisplayName''' and '''OtemTemplateGetDisplayString''' Osiris APIs&lt;br /&gt;
&lt;br /&gt;
If the data type of the _Value that you're passing doesn't match the data type of the variable you will get an assert and no value will be stored.&lt;br /&gt;
&lt;br /&gt;
=== Using Dialog Variables in Dialog Text ===&lt;br /&gt;
You can use use the values of dialog variables directly in the text of you dialog. To do so, copy the '''Name_UUID''' field of the dialog variable and place it your node text between square brackets. E.g.&lt;br /&gt;
 *Give [GEN_CheckMagicPocketGold_6057ad05-9492-4630-9f0a-be548b134c54] gold pieces*&lt;br /&gt;
&lt;br /&gt;
= Searching Through Dialogues =&lt;br /&gt;
&lt;br /&gt;
== Searching in an individual Dialogue ==&lt;br /&gt;
The Dialogue Editor comes with a powerful Find tool that you can use to find back several pieces of information. You can access it from the ''Edit'' menu in the editor or by pressing the '''ctrl-f''' key combination.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:DialogFindMenu.png]]&lt;br /&gt;
&lt;br /&gt;
When you open the Find window, you'll get an interface similar to the [[#Looking_for_a_specific_Speaker|Speaker Find]] option:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:DialogSearch.png]]&lt;br /&gt;
&lt;br /&gt;
Type what you're looking for into the '''Search for''' textbox. Clicking the '''Find''' button to start looking through the current Dialogue. The Dialogue Editor will then look for the text in the locations you specified in [[#Search_Locations|Search Locations]] using the options you specified in [[#Search_Options|Search Options]]. The results and the number of results will be displayed at the bottom of the Find window. Double clicking a result line will select and center the Dialoge Editor on the Dialog Node where the result was found.&lt;br /&gt;
&lt;br /&gt;
=== Search Locations ===&lt;br /&gt;
The Search Locations determine where the Dialogue Editor will look for your search string. You can specify multiple locations at the same time.&lt;br /&gt;
&lt;br /&gt;
==== Logical Name ====&lt;br /&gt;
Look in the Logical Name property of the Dialogue Nodes.&lt;br /&gt;
&lt;br /&gt;
==== UUID ====&lt;br /&gt;
The UUID is the unique identifier of a Dialogue Node. Every Node comes with one and no two nodes will share the same UUID. The game will report any potential errors in Dialogue structure using this UUID.&lt;br /&gt;
&lt;br /&gt;
==== Text ====&lt;br /&gt;
Look in the text assigned to nodes&lt;br /&gt;
&lt;br /&gt;
==== Flags ====&lt;br /&gt;
Look in the Flags that are being Set and Checked on the Dialogue Nodes.&lt;br /&gt;
&lt;br /&gt;
==== Tags ====&lt;br /&gt;
Look at the Tags being checked and set on Dialogue Nodes as well as the Tags being checked in the Text Blocks of Dialogue Nodes.&lt;br /&gt;
&lt;br /&gt;
=== Search Options ===&lt;br /&gt;
These can be used to refine your search results.&lt;br /&gt;
&lt;br /&gt;
==== Match Case ====&lt;br /&gt;
Only returns results that have the same case as the search string.&lt;br /&gt;
&lt;br /&gt;
== Searching through files ==&lt;br /&gt;
To search in files, you can open the 'Find in files' window through the edit menu (Edit &amp;gt; Find in files) or by pressing the '''ctrl-shift-f''' key combination. All search locations and options available in the 'Find Dialog Nodes' are available in the 'Find in Files' form as well.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:FindInFiles.png]]&lt;br /&gt;
&lt;br /&gt;
Before you start searching, define the folder in which you want to search. If you want to search in subfolders of that folder as well, check the 'Search in subfolders'.&lt;br /&gt;
&lt;br /&gt;
= Testing Dialogues =&lt;br /&gt;
To test a dialogue, open the dialogue in the dialogue editor and click the 'Play' button. This will open the 'Play window'. This will simulate the dialogue in game. It is possible to open the player without loading a level, however, dialogplayers, voices... can be more specific when a level is loaded.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:PlayWindow.png]]&lt;br /&gt;
&lt;br /&gt;
To start, click the 'Play' button. The start node is chosen and the possible options are shown in the 'dialogue' tab. To review the history of the dialogue, click the 'History' tab.&lt;br /&gt;
&lt;br /&gt;
== Advanced play == &lt;br /&gt;
You can start playing your dialogs in the editor with certain dialog flags already set. This could be helpful to check what dialogs look like after completing a quest for an NPC, for a specific player eg. &lt;br /&gt;
&lt;br /&gt;
In this window you can select a set of dialog flags and tags to set on the speakers.&lt;br /&gt;
&lt;br /&gt;
To do so, open the 'Advanced play' (File &amp;gt; Play advanced). This option is not available when the dialog player is playing.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:AdvancedPlay.png]]&lt;br /&gt;
&lt;br /&gt;
On the left, you can see a list of available sets. The flags and tags set in the selected set are visible at the right.&lt;br /&gt;
To create a new set, click the Create button. This will open the 'Create Flag set' window.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:CreateFlagSetWindow.png]]&lt;br /&gt;
&lt;br /&gt;
Flags can be assigned to the left by double clicking on the flag or using the up and down arrows to move a flag from 'Available flags' to 'Assigned flags'. This way, you can make a node valid when playing the dialog in the dialog player.&lt;br /&gt;
&lt;br /&gt;
The following node for example checks if the speaker 'Magister' doesn't have the Character flag 'TUT_ShakeCamera' and has the Character flag 'TUT_CollaringPriest_Kill'. By setting those flags in the 'Create Flag set' window, that node becomes a valid node.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:FlagsToCheck.png]]&lt;br /&gt;
&lt;br /&gt;
You can do the same for tags. Following text is only chosen when speaker 2 has the tag 'RED PRINCE'. By assigning the tag 'RED PRINCE' in the 'Create flag set' window, this text will be valid when playing the dialog in the dialogplayer.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:TaggedText.png]]&lt;br /&gt;
&lt;br /&gt;
= Templates =&lt;br /&gt;
&lt;br /&gt;
== Using a template ==&lt;br /&gt;
If a certain combination of nodes is used multiple times, you can convert it to a template. A new dialog can be created from a template (File &amp;gt; New &amp;gt; From Template), but you can add a template to an existing dialog as well (''right-click in the grey area'' &amp;gt; Insert Template...).&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:InsertTemplate.png]]&lt;br /&gt;
&lt;br /&gt;
A template can have different parameters. Before inserting the template, you need to fill in a value for each parameter. Those parameters can be custom flags (see [[#Adding_Flag_Checks|Adding Flag Checks]]) or tags.&lt;br /&gt;
&lt;br /&gt;
== Creating a template ==&lt;br /&gt;
To create a template, create a dialog as described previously. Save it as a template (File &amp;gt; Save &amp;gt; Save as template). Select all flags and tags that you want to turn into parameters and give those a proper name.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:CreateDialogTemplate.png]]&lt;br /&gt;
&lt;br /&gt;
Provide a template name and path. If you don't want the text of the nodes to be exported as well, uncheck the 'Export Text' checkbox.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:CreateDialogTemplate2.png]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/TriggerRegisterForPlayers&amp;diff=5357</id>
		<title>Osiris/API/TriggerRegisterForPlayers</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/TriggerRegisterForPlayers&amp;diff=5357"/>
		<updated>2018-01-08T16:15:15Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''TriggerRegisterForPlayers'''(''(TRIGGERGUID)'''''_Trigger''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Registers the '''_Trigger''' for all current player characters, to that that whenever one of them enters or leaves the '''_Trigger''', a [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] resp. [[Osiris/API/CharacterLeftTrigger|CharacterLeftTrigger]] event will be thrown for this trigger/character combination.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* None&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* [[Triggers#Event_Trigger|Event]] triggers are automatically registered for all characters by the engine and can not be unregistered.&lt;br /&gt;
* [[Osiris/Shared/ProcTriggerRegisterForPlayers|ProcTriggerRegisterForPlayers]] ensures that the '''_Trigger''' is also registerd for characters who become players at a later point (i.e. characters recruited into the party). Use this procedure rather than the '''TriggerRegisterForPlayers''' call directly.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]]&lt;br /&gt;
* [[Osiris/API/CharacterLeftTrigger|CharacterLeftTrigger]]&lt;br /&gt;
* [[Osiris/API/TriggerRegisterForCharacter|TriggerRegisterForCharacter]]&lt;br /&gt;
* [[Osiris/API/TriggerUnregisterForCharacter|TriggerUnregisterForCharacter]]&lt;br /&gt;
* [[Osiris/API/TriggerUnregisterForPlayers|TriggerUnregisterForPlayers]]&lt;br /&gt;
* [[Osiris/API/TriggerLaunchIterator|TriggerLaunchIterator]]&lt;br /&gt;
* Helper [[Osiris/Shared/DB_InRegion|DB_InRegion]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|TriggerRegisterForPlayers]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/Shared/ProcTriggerRegisterForPlayers&amp;diff=5356</id>
		<title>Osiris/Shared/ProcTriggerRegisterForPlayers</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/Shared/ProcTriggerRegisterForPlayers&amp;diff=5356"/>
		<updated>2018-01-08T16:12:32Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * PROC '''ProcTriggerRegisterForPlayers'''(''(TRIGGERGUID)'''''_Trigger''') ===== Description ===== This procedure registers the '''_Trigger'''...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* PROC '''ProcTriggerRegisterForPlayers'''(''(TRIGGERGUID)'''''_Trigger''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
This procedure registers the '''_Trigger''' for all players, so that they throw [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] events. Unlike [[Osiris/API/TriggerRegisterForPlayers|TriggerRegisterForPlayers]], it also registers the trigger for characters that later become players. It also allows registering of triggers in other levels.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* /&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* This is almost always preferable to using [[Osiris/API/TriggerRegisterForPlayers|TriggerRegisterForPlayers]].&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* /&lt;br /&gt;
 &lt;br /&gt;
[[Category:Osiris Shared Mod Helpers|ProcTriggerRegisterForPlayers]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/Shared/ProcOneShotTriggerEntered&amp;diff=5355</id>
		<title>Osiris/Shared/ProcOneShotTriggerEntered</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/Shared/ProcOneShotTriggerEntered&amp;diff=5355"/>
		<updated>2018-01-08T16:05:40Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Osiris/Shared/DB_OneShotPlayerTrigger]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Shared Mod Helpers|ProcOneShotTriggerEntered]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/Shared/DB_OneShotPlayerTrigger&amp;diff=5354</id>
		<title>Osiris/Shared/DB OneShotPlayerTrigger</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/Shared/DB_OneShotPlayerTrigger&amp;diff=5354"/>
		<updated>2018-01-08T16:05:18Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* '''DB OneShotPlayerTrigger'''(''(TRIGGERGUID)'''''_Trigger''')&lt;br /&gt;
* '''ProcOneShotTriggerEntered'''(''(CHARACTERGUID)'''''_Player''',''(TRIGGERGUID)'''''_Trigger''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Adding a trigger to the database [[Osiris/Shared/ProcTriggerRegisterForPlayers|registers]] the '''_Trigger''' for all players and ensures the trigger only fires once, calling the [[Osiris/Shared/ProcOneShotTriggerEntered|ProcOneShotTriggerEntered]] procedure when this happens, with the entering '''_Player''' and the '''_Trigger''' as parameters.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* Simply unregistering the trigger when it is first triggered is not safe: if the party teleports somewhere together, multiple events may be thrown simultaneously.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/Shared/ProcTriggerRegisterForPlayers|ProcTriggerRegisterForPlayers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Shared Mod Helpers|DB OneShotPlayerTrigger]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/Shared/ProcOneShotTriggerEntered&amp;diff=5353</id>
		<title>Osiris/Shared/ProcOneShotTriggerEntered</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/Shared/ProcOneShotTriggerEntered&amp;diff=5353"/>
		<updated>2018-01-08T16:04:41Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Redirected page to Osiris/Shared/DB OneShotPlayerTrigger&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Osiris/Shared/DB_OneShotPlayerTrigger]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/Shared/ProcOneShotTriggerEntered&amp;diff=5352</id>
		<title>Osiris/Shared/ProcOneShotTriggerEntered</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/Shared/ProcOneShotTriggerEntered&amp;diff=5352"/>
		<updated>2018-01-08T16:04:27Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Redirected page to DB OneShotPlayerTrigger&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[DB_OneShotPlayerTrigger]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/Shared/DB_OneShotPlayerTrigger&amp;diff=5351</id>
		<title>Osiris/Shared/DB OneShotPlayerTrigger</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/Shared/DB_OneShotPlayerTrigger&amp;diff=5351"/>
		<updated>2018-01-08T16:04:01Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * '''DB OneShotPlayerTrigger'''(''(TRIGGERGUID)'''''_Trigger''') * '''ProcOneShotTriggerEntered'''(''(CHARACTERGUID)'''''_Player''',''(TRIGGERGU...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* '''DB OneShotPlayerTrigger'''(''(TRIGGERGUID)'''''_Trigger''')&lt;br /&gt;
* '''ProcOneShotTriggerEntered'''(''(CHARACTERGUID)'''''_Player''',''(TRIGGERGUID)'''''_Trigger''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Adding a trigger to the database [[Osiris/Shared/ProcTriggerRegisterForPlayers|registers]] the '''_Trigger''' for all players and ensures the trigger only fires once, calling the [[Osiris/Shared/ProcOneShotTriggerEntered|ProcOneShotTriggerEntered]] procedure when this happens, with the entering '''_Player''' and the '''_Trigger''' as parameters.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* Simply unregistering the trigger when it is first triggered is not safe: if the party teleports somewhere together, multiple events may be thrown simultaneously.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/Shared/ProcTriggerRegisterForPlayers|ProcTriggerRegisterForPlayers]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGiveReward&amp;diff=5350</id>
		<title>Osiris/API/CharacterGiveReward</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGiveReward&amp;diff=5350"/>
		<updated>2018-01-08T14:47:01Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterGiveReward'''(''(CHARACTERGUID)'''''_Player''', ''(STRING)'''''_Treasure''', ''(INTEGER)'''''_Identified''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_Treasure''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Player''''s inventory. The level used for the treasure generation is always that of the '''_Player'''. If '''_Identified''' is 1, the items generated will all be identified. If '''_Identified''' is 0, they will not be.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* Unlike [[Osiris/API/GenerateTreasure|GenerateTreasure]], the level will be that of the '''_Player''', not that of the highest member of their party.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/GenerateTreasure|GenerateTreasure]]&lt;br /&gt;
*[[Osiris/API/CharacterGiveQuestReward|CharacterGiveQuestReward]]&lt;br /&gt;
*[[Treasure_Tables|Treasure Tables]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|CharacterGiveReward]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5349</id>
		<title>Osiris/API/GenerateTreasure</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5349"/>
		<updated>2018-01-08T14:42:10Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''GenerateTreasure'''(''(ITEMGUID)'''''_Item''', ''(STRING)'''''_TreasureID''', ''(INTEGER)'''''_Level''', ''(CHARACTERGUID)'''''_Character''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_TreasureID''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Item''''s inventory.&lt;br /&gt;
*If the '''_Level''' is greater than or equal to 0, it will be used to generate treasure.&lt;br /&gt;
*If the '''_Level''' is less than 0, if the item is set (in the sidebar) to ''Use Party Level For Treasure'', the highest level in the '''_Character''' 's party is used.&lt;br /&gt;
*If the '''_Level''' is less than 0, and ''Use Party Level For Treasure'' is false, the item's ''Treasure Level'' setting is used.&lt;br /&gt;
*If the ''Treasure Level'' setting is also less than 0, the level of the nearest character is used.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
*/&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/CharacterGiveReward|CharacterGiveReward]]&lt;br /&gt;
*[[Osiris/API/CharacterGiveQuestReward|CharacterGiveQuestReward]]&lt;br /&gt;
*[[Treasure_Tables|Treasure Table]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|GenerateTreasure]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGiveQuestReward&amp;diff=5348</id>
		<title>Osiris/API/CharacterGiveQuestReward</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGiveQuestReward&amp;diff=5348"/>
		<updated>2018-01-08T14:41:49Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * call '''CharacterGiveQuestReward'''(''(CHARACTERGUID)'''''_Player''', ''(STRING)'''''_Quest''', ''(STRING)'''''_RewardState''') ===== Descript...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterGiveQuestReward'''(''(CHARACTERGUID)'''''_Player''', ''(STRING)'''''_Quest''', ''(STRING)'''''_RewardState''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Gives the '''_Player''' character (if they are a player) the reward under the '''_RewardState''' state of the '''_Quest''' supplied. The ''RewardTreasureTables'' field is used for the static part of the treasure (i.e. what the player always gets). The player can also select an amount of items given ''RewardTreasureOptionalCount'' from those generated by the treasure table under ''RewardOptionalTreasureTables''. The level used for the generation of both table is given by ''RewardTreasureLevel''.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* The items are always identified.&lt;br /&gt;
* The treasure is not affected by the player's level, only that specified in the journal.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/CharacterGiveReward|CharacterGiveReward]]&lt;br /&gt;
*[[Osiris/API/GenerateTreasure|GenerateTreasure]]&lt;br /&gt;
*[[Treasure_Tables|Treasure Tables]]&lt;br /&gt;
*[[Journal_editor|Journal editor]], where the rewards are defined.&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|CharacterGiveQuestReward]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5347</id>
		<title>Osiris/API/GenerateTreasure</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5347"/>
		<updated>2018-01-08T14:07:08Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''GenerateTreasure'''(''(ITEMGUID)'''''_Item''', ''(STRING)'''''_TreasureID''', ''(INTEGER)'''''_Level''', ''(CHARACTERGUID)'''''_Character''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_TreasureID''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Item''''s inventory.&lt;br /&gt;
*If the '''_Level''' is greater than or equal to 0, it will be used to generate treasure.&lt;br /&gt;
*If the '''_Level''' is less than 0, if the item is set (in the sidebar) to ''Use Party Level For Treasure'', the highest level in the '''_Character''' 's party is used.&lt;br /&gt;
*If the '''_Level''' is less than 0, and ''Use Party Level For Treasure'' is false, the item's ''Treasure Level'' setting is used.&lt;br /&gt;
*If the ''Treasure Level'' setting is also less than 0, the level of the nearest character is used.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
*/&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/CharacterGiveReward|CharacterGiveReward]]&lt;br /&gt;
*[[Treasure_Tables|Treasure Table]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|GenerateTreasure]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGiveReward&amp;diff=5346</id>
		<title>Osiris/API/CharacterGiveReward</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGiveReward&amp;diff=5346"/>
		<updated>2018-01-08T14:07:05Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * call '''CharacterGiveReward'''(''(CHARACTERGUID)'''''_Player''', ''(STRING)'''''_Treasure''', ''(INTEGER)'''''_Identified''') ===== Descriptio...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterGiveReward'''(''(CHARACTERGUID)'''''_Player''', ''(STRING)'''''_Treasure''', ''(INTEGER)'''''_Identified''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_Treasure''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Player''''s inventory. The level used for the treasure generation is always that of the '''_Player'''. If '''_Identified''' is 1, the items generated will all be identified. If '''_Identified''' is 0, they will not be.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* Unlike [[Osiris/API/GenerateTreasure|GenerateTreasure]], the level will be that of the '''_Player''', not that of the highest member of their party.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/GenerateTreasure|GenerateTreasure]]&lt;br /&gt;
*[[Treasure_Tables|Treasure Tables]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|GenerateTreasure]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5345</id>
		<title>Osiris/API/GenerateTreasure</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5345"/>
		<updated>2018-01-08T11:31:39Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''GenerateTreasure'''(''(ITEMGUID)'''''_Item''', ''(STRING)'''''_TreasureID''', ''(INTEGER)'''''_Level''', ''(CHARACTERGUID)'''''_Character''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_TreasureID''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Item''''s inventory.&lt;br /&gt;
*If the '''_Level''' is greater than or equal to 0, it will be used to generate treasure.&lt;br /&gt;
*If the '''_Level''' is less than 0, if the item is set (in the sidebar) to ''Use Party Level For Treasure'', the highest level in the '''_Character''' 's party is used.&lt;br /&gt;
*If the '''_Level''' is less than 0, and ''Use Party Level For Treasure'' is false, the item's ''Treasure Level'' setting is used.&lt;br /&gt;
*If the ''Treasure Level'' setting is also less than 0, the level of the nearest character is used.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
*/&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Treasure_Tables|Treasure Table]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|GenerateTreasure]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5344</id>
		<title>Osiris/API/GenerateTreasure</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/GenerateTreasure&amp;diff=5344"/>
		<updated>2018-01-08T11:31:04Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * call '''GenerateTreasure'''(''(ITEMGUID)'''''_Item''', ''(STRING)'''''_TreasureID''', ''(INTEGER)'''''_Level''', ''(CHARACTERGUID)'''''_Charac...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''GenerateTreasure'''(''(ITEMGUID)'''''_Item''', ''(STRING)'''''_TreasureID''', ''(INTEGER)'''''_Level''', ''(CHARACTERGUID)'''''_Character''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Generates treasure from the '''_TreasureID''' [[Treasure_Tables|treasure table]] and puts the item(s) generated in the '''_Item''''s inventory.&lt;br /&gt;
*If the '''_Level''' is greater than or equal to 0, it will be used to generate treasure.&lt;br /&gt;
*If the '''_Level''' is less than 0, if the item is set (in the sidebar) to ''Use Party Level For Treasure'', the highest level in the '''_Character''' 's party is used.&lt;br /&gt;
*If the '''_Level''' is less than 0, and ''Use Party Level For Treasure'' is false, the item's ''Treasure Level'' setting is used.&lt;br /&gt;
*If the ''Treasure Level'' setting is also less than 0, the level of the nearest character is used.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
*/&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Treasure_Tables|Treasure Table]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|AddToParty]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5343</id>
		<title>Osiris/API/StartVoiceBark</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5343"/>
		<updated>2018-01-07T23:20:33Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''StartVoiceBark'''(''(STRING)'''''_Bark''', ''(CHARACTERGUID)'''''_Source''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Starts a [[Voice_Bark_editor|Voicebark]] named '''_Bark''' on the '''_Source''' character, selecting an automatic dialogue based on that character's nearby party members.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* See the [[Voice_Bark_editor|Voicebark editor]] for the specifics on how the voicebark selects the AD that will be played.&lt;br /&gt;
* In addition to the regular events for starting an automated dialogue, a [[Osiris/API/VoiceBarkStarted|VoiceBarkStarted]] will be sent if the voicebark succeeds in selecting a fitting dialogue, and [[Osiris/API/VoiceBarkFailed|VoiceBarkFailed]] otherwise.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/VoiceBarkStarted|VoiceBarkStarted]]&lt;br /&gt;
* [[Osiris/API/VoiceBarkFailed|VoiceBarkFailed]]&lt;br /&gt;
* [[Voice_Bark_editor|Voicebark]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|StartVoiceBark]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5329</id>
		<title>Osiris/API/StartVoiceBark</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5329"/>
		<updated>2018-01-05T11:33:07Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''StartVoiceBark'''(''(STRING)'''''_Bark''', ''(CHARACTERGUID)'''''_Source''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Starts a [[Voice_Bark_editor|Voicebark]] named '''_Bark''' on the '''_Source''' character, selecting an automatic dialogue based on that character's nearby party members.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* See the Voicebark editor for the specific on how the voicebark selects the AD that will be played.&lt;br /&gt;
* In addition to the regular for starting a dialogue, a [[Osiris/API/VoicebarkStarted|VoicebarkStarted]] will be sent if the voicebark succeeds in selecting a fitting dialogue, and [[Osiris/API/VoicebarkFailed|VoicebarkFailed]] otherwise.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/VoicebarkStarted|VoicebarkStarted]]&lt;br /&gt;
* [[Osiris/API/VoiceBarkFailed|VoiceBarkFailed]]&lt;br /&gt;
* [[Voice_Bark_editor|Voicebark]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|StartVoiceBark]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/VoiceBarkFailed&amp;diff=5328</id>
		<title>Osiris/API/VoiceBarkFailed</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/VoiceBarkFailed&amp;diff=5328"/>
		<updated>2018-01-05T11:32:48Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* event '''VoiceBarkFailed'''(''(STRING)'''''_Bark''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
* Thrown when a [[Voice_Bark_editor|Voicebark]] fails to find characters and an AD for the voicebark called '''_Bark'''.&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
* '''_Bark''': Name of the voicebark.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
-&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/StartVoiceBark|StartVoiceBark]]&lt;br /&gt;
* [[Osiris/API/VoicebarkStarted|VoiceBarkStarted]]&lt;br /&gt;
* [[Voice_Bark_editor|Voice_Bark_editor]] on general Voicebark logic.&lt;br /&gt;
 &lt;br /&gt;
[[Category:Osiris Events|VoiceBarkFailed]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/VoiceBarkFailed&amp;diff=5327</id>
		<title>Osiris/API/VoiceBarkFailed</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/VoiceBarkFailed&amp;diff=5327"/>
		<updated>2018-01-05T11:32:38Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * event '''VoiceBarkFailed'''(''(STRING)'''''_Bark''') ===== Description ===== * Thrown when a Voicebark fails to find cha...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* event '''VoiceBarkFailed'''(''(STRING)'''''_Bark''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
* Thrown when a [[Voice_Bark_editor|Voicebark]] fails to find characters and an AD for the voicebark called '''_Bark'''.&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
* '''_Bark''': Name of the voicebark.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
-&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/StartVoiceBark|StartVoiceBark]]&lt;br /&gt;
* [[Osiris/API/VoiceBarkStarted|VoiceBarkStarted]]&lt;br /&gt;
* [[Voice_Bark_editor|Voice_Bark_editor]] on general Voicebark logic.&lt;br /&gt;
 &lt;br /&gt;
[[Category:Osiris Events|VoiceBarkFailed]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/VoiceBarkStarted&amp;diff=5326</id>
		<title>Osiris/API/VoiceBarkStarted</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/VoiceBarkStarted&amp;diff=5326"/>
		<updated>2018-01-05T11:31:48Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * event '''VoicebarkStarted'''(''(STRING)'''''_Bark''', ''(INTEGER)'''''_ID''') ===== Description ===== * Thrown when a Voice_Bark_editor|Voic...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* event '''VoicebarkStarted'''(''(STRING)'''''_Bark''', ''(INTEGER)'''''_ID''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
* Thrown when a [[Voice_Bark_editor|Voicebark]] succeeds in finding characters and an AD for the voicebark called '''_Bark'''.&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
* '''_Bark''': Name of the voicebark.&lt;br /&gt;
* '''_ID''': Identifier of the dialogue started by the voicebark.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
-&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/StartVoiceBark|StartVoiceBark]]&lt;br /&gt;
* [[Osiris/API/VoiceBarkFailed|VoiceBarkFailed]]&lt;br /&gt;
* [[Voice_Bark_editor|Voice_Bark_editor]] on general Voicebark logic.&lt;br /&gt;
 &lt;br /&gt;
[[Category:Osiris Events|VoicebarkStarted]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5325</id>
		<title>Osiris/API/StartVoiceBark</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5325"/>
		<updated>2018-01-05T11:22:29Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''StartVoiceBark'''(''(STRING)'''''_Bark''', ''(CHARACTERGUID)'''''_Source''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Starts a [[Voice_Bark_editor|Voicebark]] named '''_Bark''' on the '''_Source''' character, selecting an automatic dialogue based on that character's nearby party members.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* See the Voicebark editor for the specific on how the voicebark selects the AD that will be played.&lt;br /&gt;
* In addition to the regular for starting a dialogue, a [[Osiris/API/VoicebarkStarted|VoicebarkStarted]] will be sent if the voicebark succeeds in selecting a fitting dialogue, and [[Osiris/API/VoicebarkFailed|VoicebarkFailed]] otherwise.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/VoicebarkStarted|VoicebarkStarted]]&lt;br /&gt;
* [[Osiris/API/VoicebarkFailed|VoicebarkFailed]]&lt;br /&gt;
* [[Voice_Bark_editor|Voicebark]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|StartVoiceBark]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5323</id>
		<title>Osiris/API/StartVoiceBark</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/StartVoiceBark&amp;diff=5323"/>
		<updated>2018-01-05T11:21:24Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * call '''StartVoiceBark'''(''(STRING)'''''_Bark''', ''(CHARACTERGUID)'''''_Source''') ===== Description ===== Starts a Voice_Bark_editor|Voic...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''StartVoiceBark'''(''(STRING)'''''_Bark''', ''(CHARACTERGUID)'''''_Source''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Starts a [[Voice_Bark_editor|Voicebark]] named '''_Bark''' on the '''_Source''' character, selecting an automatic dialogue based on that character's nearby party members.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* See the Voicebark editor for the specific on how the voicebark selects the AD that will be played.&lt;br /&gt;
* In addition to the regular for starting a dialogue, a [[Osiris/API/VoicebarkStarted|VoicebarkStarted]] will be sent if the voicebark succeeds in selecting a fitting dialogue, and [[Osiris/API/VoicebarkFailed|VoicebarkFailed]] otherwise.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/VoicebarkStarted|VoicebarkStarted]]&lt;br /&gt;
* [[Osiris/API/VoicebarkFailed|VoicebarkFailed]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|StartVoiceBark]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Editors&amp;diff=5322</id>
		<title>Editors</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Editors&amp;diff=5322"/>
		<updated>2018-01-05T11:09:25Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:AllSparkEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[AllSpark effect editor]] (Work in Progress)&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:AlignmentEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Alignment editor]] (Coming Soon)&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:MaterialEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Material editor]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:DialogEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Dialog editor]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:JournalEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Journal editor]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:ScriptEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Script editor]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:StatsEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Stats editor]] (Work In Progress)&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:StoryEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Story editor]] (Work In Progress)&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:TagEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Tag editor]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:TextureAtlasEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Texture atlas editor]] (Coming Soon)&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:TranslatedStringKeyEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Translated string key editor]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:VoiceBarkEditor_Icon.png|32px]] &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;[[Voice_Bark_editor]]&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Voice_Bark_editor&amp;diff=5320</id>
		<title>Voice Bark editor</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Voice_Bark_editor&amp;diff=5320"/>
		<updated>2018-01-05T11:05:53Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: LarIlya moved page Community: Voice Bark editor to Voice Bark editor: It's a Larian guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The voicebark editor ==&lt;br /&gt;
Voicebarks are a system to play an automated dialog for party members, selected based on their tags. This means that in itself, a voicebark is not a dialogue. Rather, it is a set of rules by which an AD can be selected for the player characters to speak.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:VBEditor.png|1400px]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; When a voicebark is played from a character (typically, with the [[Osiris/API/StartVoiceBark|StartVoiceBark]] Story call or [[Character_and_Item_Script_Triggers,_Calls,_and_Queries|behaviour script]] call), the system selects the first (topmost) AD for which it can find appropriate speakers, and plays that AD with those speakers. Note that, if their companions have tags which are preferred over that character's own, the character from whom the voicebark originates (the 'target character') will not be part of the selected AD. To be considered, speakers need to be:&lt;br /&gt;
* Player characters&lt;br /&gt;
* In the same party as the target character&lt;br /&gt;
* Within 10 meters of the target character&lt;br /&gt;
* Not summons or party followers&lt;br /&gt;
* Not already in a dialog&lt;br /&gt;
* Not a ghost&lt;br /&gt;
* Not charmed&lt;br /&gt;
* Alive&lt;br /&gt;
* Visible and not sneaking&lt;br /&gt;
* On-stage&lt;br /&gt;
No AD is started if the requested Voicebark does not exist, if the target character is not a player or does not exist, or if no set of fitting characters is found. Story will get a [[Osiris/API/VoiceBarkFailed|VoiceBarkFailed]] event. Otherwise, a [[Osiris/API/VoiceBarkStarted|VoiceBarkStarted]] event is sent, along with the usual events that accompany the start of an AD.&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Voice_Bark_editor&amp;diff=5319</id>
		<title>Voice Bark editor</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Voice_Bark_editor&amp;diff=5319"/>
		<updated>2018-01-05T11:04:56Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;== The voicebark editor == Voicebarks are a system to play an automated dialog for party members, selected based on their tags. This means that in itself, a voicebark is not a...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The voicebark editor ==&lt;br /&gt;
Voicebarks are a system to play an automated dialog for party members, selected based on their tags. This means that in itself, a voicebark is not a dialogue. Rather, it is a set of rules by which an AD can be selected for the player characters to speak.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:VBEditor.png|1400px]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; When a voicebark is played from a character (typically, with the [[Osiris/API/StartVoiceBark|StartVoiceBark]] Story call or [[Character_and_Item_Script_Triggers,_Calls,_and_Queries|behaviour script]] call), the system selects the first (topmost) AD for which it can find appropriate speakers, and plays that AD with those speakers. Note that, if their companions have tags which are preferred over that character's own, the character from whom the voicebark originates (the 'target character') will not be part of the selected AD. To be considered, speakers need to be:&lt;br /&gt;
* Player characters&lt;br /&gt;
* In the same party as the target character&lt;br /&gt;
* Within 10 meters of the target character&lt;br /&gt;
* Not summons or party followers&lt;br /&gt;
* Not already in a dialog&lt;br /&gt;
* Not a ghost&lt;br /&gt;
* Not charmed&lt;br /&gt;
* Alive&lt;br /&gt;
* Visible and not sneaking&lt;br /&gt;
* On-stage&lt;br /&gt;
No AD is started if the requested Voicebark does not exist, if the target character is not a player or does not exist, or if no set of fitting characters is found. Story will get a [[Osiris/API/VoiceBarkFailed|VoiceBarkFailed]] event. Otherwise, a [[Osiris/API/VoiceBarkStarted|VoiceBarkStarted]] event is sent, along with the usual events that accompany the start of an AD.&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=File:VBEditor.png&amp;diff=5318</id>
		<title>File:VBEditor.png</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=File:VBEditor.png&amp;diff=5318"/>
		<updated>2018-01-05T10:27:02Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Schematic of the voicebark editor's fields.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Schematic of the voicebark editor's fields.&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Treasure_Tables&amp;diff=5310</id>
		<title>Treasure Tables</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Treasure_Tables&amp;diff=5310"/>
		<updated>2017-12-22T17:13:39Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
The D:OS 2 treasure system is constructed around '''Treasure Tables''', which are sets of objects (or categories of objects), defined by their stats entries, and the probability to drop these objects. Treasure tables can be nested, so that using one table, you select randomly from several tables. This system is used both for rewards from e.g. killed enemies, and to generate the treasure vendors have for sale.&lt;br /&gt;
&lt;br /&gt;
== Treasure Table Columns ==&lt;br /&gt;
=== Name ===&lt;br /&gt;
This column contains the unique ID of the treasure entry that we will use in Glasses in the “Treasure” and “TradeTreasure” fields (for character properties) and the “Inventory” field (for containers). We will also use it to reference other treasure entries. If the name of a table starts with &amp;quot;ST_&amp;quot;, it is intended to be used as a subtable to other treasure tables.&lt;br /&gt;
=== MinLevelDiff and MaxLevelDiff ===&lt;br /&gt;
Each treasure container has a level. This defines the items the treasure will look for. Most items can drop between level 1 and 30 so this is usually not necessary. However, when filled in, it can make a treasure look for and drop items that are lower or higher than its level. For example, if a Treasure Table has “MinLevelDiff = -4” and “MaxLevelDiff = 3”, and a player of Level 10 rolls this table, then items of Levels 6-13 are eligible for drop.&lt;br /&gt;
=== IgnoreLevelDiff ===&lt;br /&gt;
A treasure table will always try to choose items that are appropriate for the level of its container. Filling in Yes here disables this behaviour, so that the treasure table drops items irrelevant of the level at which they were intended to be dropped.&lt;br /&gt;
=== UseTreasureGroups ===&lt;br /&gt;
Treasure groups are a system of global balancing of the categories that drop. There is a TreasureGroups table in the Stats editor that you'll need to take a look at for this. There are currently three treasure groups - skillbooks, armour types, and weapon types. In the case of skillbooks, the goal is to make sure that an equal amount of skillbooks of all ability schools are dropped with treasure. As you will see in the TreasureGroups table, all skillbooks types have a weight of 1. This means that the treasure system will do its best to make sure that all skillbook types will drop once before re-starting the cycle. So, if you begin a game and use the console to generate some ST_Skillbook tables, you'll get a skillbook of each ability school once. The same thing happens for armour types and weapon types. The treasure group system is opt-in. In the “UseTreasureGroups” column, you need to set the flag to 1 in order to include your table within the system.&lt;br /&gt;
=== StartLevel &amp;amp; EndLevel ===&lt;br /&gt;
These fields allow you to disable and enable specific entries in the treasure table depending on level. Specifically, if the container's level is below '''StartLevel''' or above '''EndLevel''', that entry will be excluded.&lt;br /&gt;
=== DropCount ===&lt;br /&gt;
This entry tells the system how many items to choose from the ObjectCategory entry on the same line, and all lines below it with empty '''DropCount''' entries. This is a list of possibilities separated by a semicolon. The possibilities are formed as x,y where x is the amount of items that should be picked and y is the chance. &lt;br /&gt;
* A negative integer like “-N” means that the Treasure Table uses exactly N instances of the ObjectCategory. This is known as a forced drop, and will ignore level restrictions to get N items if necessary.&lt;br /&gt;
* A string of non-negative integers like “n_1,p_1;n_2,p_2;...;n_k,p_k” means that the ObjectCategory can be used n_1, n_2, ...  or n_k times. Here, the number n_i will be used with probability p_i/(p_1+p_2+...+p_k). For example, “4,1;5,1;6,2” for “T_ST_ArmorMagic” means that the Treasure Table “ST_ArmorMagic” will be used 4 times with a probability of 1/4, 5 times with a probability of 1/4 and 6 times with a probability of 2/4. The probabilities are decreased when they are successfully rolled. In the example above, if the table rolls 4, then DropCount becomes 4,0;5,1;6,2 for the next roll, meaning that 4 has probability 0, 5 has 1/3 and 6 has 2/3. When all probabilities are zero, they are reset to default values. This way we safeguard against situations where a table with DropCount 0,98;1,2 will drop 1 item five times in a row due to sheer randomness.&lt;br /&gt;
=== ObjectCategory ===&lt;br /&gt;
This column defines what is actually dropped by the table. This can be one of several things:&lt;br /&gt;
# A reference to a '''single Item entry''' by its Stats entry. For this, we use the IDs of items from other stat tables: Object, Weapon, Armor, Potion. To use it, we need to prefix it with “I_”, e.g. for “POTION_Minor_Healing_Potion” it will be “I_POTION_Minor_Healing_Potion”.&lt;br /&gt;
# A reference to '''another entry from the Treasure Table'''. This reference copies the contents of that entry to the current entry. To use it, we need to prefix the reference with “T_” (e.g. for “WarriorTrader” it will be “T_WarriorTrader”).&lt;br /&gt;
# A reference to an '''object category''' from the Object, Weapon, Armor, or Potion tables (the “ObjectCategory” column there). The probability that a particular item drops from the chosen category is determined by the item’s Priority, which is also set within those tables. Priorities act as weights in their category: for example if Weapon file has 3 stat entries with ObjectCategory Dagger, and first two have Priority 1, while third has Priority 3, then first two have 1/5 chance to drop while the third item has 3/5 chance to drop. Unlike Dropcounts, Priorities do not change during the game in any way.&lt;br /&gt;
=== Frequency ===&lt;br /&gt;
A Frequency entry determines the chance of an ObjectCategory being selected in its group (i.e. among all of the '''ObjectCategory''' entries using the same '''DropCount''' entry.&lt;br /&gt;
=== Item Rarities from Common to Divine ===&lt;br /&gt;
Item rarity represents the probability of adding a rarity modifier to an item, which is a measure of how good, rare, and 'special' it is for its level. They work similarly to frequencies and are also counted and saved.&amp;lt;br /&amp;gt;&lt;br /&gt;
If ObjectCategory entry is a table (starts with “T_”), then the corresponding Item Rarity will override the rarity of the table. To prevent override, simply leave all rarity counters empty.&lt;br /&gt;
=== Comment ===&lt;br /&gt;
A field to leave comments on the purpose &amp;amp; correct use of a table.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
'''Example 1'''&lt;br /&gt;
Below are a few examples to demonstrate the use of the treasure tables:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! MinLevelDiff !! MaxLevelDiff !! StartLevel !! EndLevel !! DropCount !! ObjectCategory !! Frequency&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 10,1 || Ingredient || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 0,3;1,1;2,1 || Sword || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || -1 || Dagger || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 0,1;1,1;2,1;3,1;4,1 || Painting || 3&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || || Precious || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || || T_ST_Dogs || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 0,1 || Food || 1&lt;br /&gt;
|}&lt;br /&gt;
On the initial roll, the above table:&lt;br /&gt;
* Will always spawn 10 items of the Ingredient category (x,y is 10,1: amount is 10, chance is 1 out of 1 because that’s the only possibility)&lt;br /&gt;
* Has 3 out of 5 chance to drop nothing (0,3 and total chance is 3+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop 1 item of the Sword category (1,1 and total chance is 3+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop 2 item of the Sword category (2,1 and total chance is 3+1+1)&lt;br /&gt;
* Will be forced to spawn something of the Dagger category, ignoring level restrictions if necessary.&lt;br /&gt;
* Has 1 out of 5 chance to drop nothing (0,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop something from Smurf OR Bear OR T_ST_Dogs (1,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop two things from Smurf OR Bear OR T_ST_Dogs (2,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop three things from Smurf OR Bear OR T_ST_Dogs (3,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop four things from Smurf OR Bear OR T_ST_Dogs (4,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
* In the last case, the subtable ST_Dogs will go over its own possibilities if it is selected. If the subtable ST_Dogs itself has a DropCount entry that says 5,1, and it gets selected once, it will drop 5 items.&lt;br /&gt;
* Will ''never'' drop any Food.&lt;br /&gt;
* The tables has a greater chance of dropping Paintings than it does of dropping something Precious or something from the ST_Dogs table. It will actually be chosen 3 out of 5 times, because is '''Frequency''' is 3 and the total of '''Frequencies''' for its entire group (i.e. the Painting, Precious and T_ST_Dogs entries) is 3+1+1=5.&lt;br /&gt;
After the initial roll, the selected DropCounts will be removed. If the table drops 2 Swords this time, it won't do so again until it has dropped 1 Sword once and no Swords thrice.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Example 2'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DropCount !! ObjectCategory !! Frequency !! Common !! Uncommon !! Rare !! Epic !! Legendary&lt;br /&gt;
|-&lt;br /&gt;
| 5,1 || T_ST_WeaponNormal || 1 || 3 || 1 || 1 ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 3,1 || T_ST_WeaponNormal || 1 || 2 || || || || 1&lt;br /&gt;
|-&lt;br /&gt;
| 2,1 || T_ST_RingAmuletBeltNormal || 1 || || || 1 || 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 1,1 || Trader Gold || 1 || || || || ||&lt;br /&gt;
|}&lt;br /&gt;
The above table will:&lt;br /&gt;
* Roll on the ST_WeaponNormal table five times. The resulting items have a 3/5 chance to be Common, 1/5 chance to be Uncommon, and a 1/5 chance to be Epic.&lt;br /&gt;
* Roll on the ST_ArmorNormal table three times. The resulting items have a 2/3 chance to be Common, and 1/3 chance to be Epic.&lt;br /&gt;
* Roll on the ST_RingAmuletBeltNormal table twice times. The resulting items have a 1/2 chance to be Rare, and a 1/2 chance to be Epic.&lt;br /&gt;
* Create 1 object of the Trader Gold category.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example 3'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! MinLevelDiff !! MaxLevelDiff !! IgnoreLevelDiff !! UseTreasureGroups !! StartLevel !! EndLevel !! DropCount || ObjectCategory&lt;br /&gt;
|-&lt;br /&gt;
| Animals_Owl || || || || || 1 || 12 || 1,1 || I_Loot_Feather_A&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 1 || 12 || 1,1 || I_Loot_Essence_Air_A&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 13 || || 1,1 || I_Loot_Feather_A_Fancy&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 13 || || 1,1 || I_Loot_Essence_Air_Step2_A&lt;br /&gt;
|}&lt;br /&gt;
Looking at this table, we can see that the following will happen if a character kills an owl:&lt;br /&gt;
* If they are level 1 to 12, they will get 1 Feather, provided Loot_Feather_A is not restricted from dropping at their level.&lt;br /&gt;
* If they are level 1 to 12, they will get 1 Air Essence, provided Loot_Essence_Air_A is not restricted from dropping at their level.&lt;br /&gt;
* If they are level 13 or above, they will get 1 Fancy Feather, provided Loot_Feather_A_Fancy is not restricted from dropping at their level.&lt;br /&gt;
* If they are level 13 or above, they will get 1 Step 2 Air Essence (i.e. a higher-tier Air Essence), provided Loot_Essence_Air_Step2_A is not restricted from dropping at their level.&lt;br /&gt;
== On Well-Balanced Treasure ==&lt;br /&gt;
There are a few practices that will ensure a more even spread of your treasure:&lt;br /&gt;
* Avoid using large numbers for Frequency and DropCount. If you have a dropcount of 0,50;1,50, then on average the player has a 1/2 chance of getting something, but they may have to wait until the 51st time they search a container with that treasure table until they actually do. In fact, they may even find something 50 times in a row, then nothing 100 times in a row (with the Dropcount resetting halfway through), then something 50 times in a row again. If the Dropcount is 0,1;1,1 they won't have to wait more than 2 tries between finding something.&lt;br /&gt;
* Try to use existing subtables to take advantage of the fact the game keeps track of the DropCount within them. Three separate tables, each of which drops Diamonds and Eyeballs independently, may wind up each dropping an Eyeball, whereas if they use one shared Eyeball/Diamond subtable, the player will get a balanced amount of Diamonds and Eyeballs between them.&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Stats_Editor&amp;diff=5309</id>
		<title>Stats Editor</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Stats_Editor&amp;diff=5309"/>
		<updated>2017-12-22T16:22:58Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can create or modify skills and stats for weapons, armor, objects, characters, and statuses with the Stats editor.&lt;br /&gt;
&lt;br /&gt;
* [[skill_creation|Skill Creation]].&lt;br /&gt;
* [[Treasure_Tables]].&lt;br /&gt;
* [https://docs.larian.game/Community:_Stats_editor Community guides/tutorials] related to the stats editor.&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Treasure_Tables&amp;diff=5308</id>
		<title>Treasure Tables</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Treasure_Tables&amp;diff=5308"/>
		<updated>2017-12-22T16:22:34Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;== Description == The D:OS 2 treasure system is constructed around '''Treasure Tables''', which are sets of objects (or categories of objects), defined by their stats entries,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
The D:OS 2 treasure system is constructed around '''Treasure Tables''', which are sets of objects (or categories of objects), defined by their stats entries, and the probability to drop these objects. Treasure tables can be nested, so that using one table, you select randomly from several tables. This system is used both for rewards from e.g. killed enemies, and to generate the treasure vendors have for sale.&lt;br /&gt;
&lt;br /&gt;
== Treasure Table Columns ==&lt;br /&gt;
=== Name ===&lt;br /&gt;
This column contains the unique ID of the treasure entry that we will use in Glasses in the “Treasure” and “TradeTreasure” fields (for character properties) and the “Inventory” field (for containers). We will also use it to reference other treasure entries. If the name of a table starts with &amp;quot;ST_&amp;quot;, it is intended to be used as a subtable to other treasure tables.&lt;br /&gt;
=== MinLevelDiff and MaxLevelDiff ===&lt;br /&gt;
Each treasure container has a level. This defines the items the treasure will look for. Most items can drop between level 1 and 30 so this is usually not necessary. However, when filled in, it can make a treasure look for and drop items that are lower or higher than its level. For example, if a Treasure Table has “MinLevelDiff = -4” and “MaxLevelDiff = 3”, and a player of Level 10 rolls this table, then items of Levels 6-13 are eligible for drop.&lt;br /&gt;
=== IgnoreLevelDiff ===&lt;br /&gt;
A treasure table will always try to choose items that are appropriate for the level of its container. Filling in Yes here disables this behaviour, so that the treasure table drops items irrelevant of the level at which they were intended to be dropped.&lt;br /&gt;
=== UseTreasureGroups ===&lt;br /&gt;
Treasure groups are a system of global balancing of the categories that drop. There is a TreasureGroups table in the Stats editor that you'll need to take a look at for this. There are currently three treasure groups - skillbooks, armour types, and weapon types. In the case of skillbooks, the goal is to make sure that an equal amount of skillbooks of all ability schools are dropped with treasure. As you will see in the TreasureGroups table, all skillbooks types have a weight of 1. This means that the treasure system will do its best to make sure that all skillbook types will drop once before re-starting the cycle. So, if you begin a game and use the console to generate some ST_Skillbook tables, you'll get a skillbook of each ability school once. The same thing happens for armour types and weapon types. The treasure group system is opt-in. In the “UseTreasureGroups” column, you need to set the flag to 1 in order to include your table within the system.&lt;br /&gt;
=== StartLevel &amp;amp; EndLevel ===&lt;br /&gt;
These fields allow you to disable and enable specific entries in the treasure table depending on level. Specifically, if the container's level is below '''StartLevel''' or above '''EndLevel''', that entry will be excluded.&lt;br /&gt;
=== DropCount ===&lt;br /&gt;
This entry tells the system how many items to choose from the ObjectCategory entry on the same line, and all lines below it with empty '''DropCount''' entries. This is a list of possibilities separated by a semicolon. The possibilities are formed as x,y where x is the amount of items that should be picked and y is the chance. &lt;br /&gt;
* A negative integer like “-N” means that the Treasure Table uses exactly N instances of the ObjectCategory. This is known as a forced drop, and will ignore level restrictions to get N items if necessary.&lt;br /&gt;
* A string of non-negative integers like “n_1,p_1;n_2,p_2;...;n_k,p_k” means that the ObjectCategory can be used n_1, n_2, ...  or n_k times. Here, the number n_i will be used with probability p_i/(p_1+p_2+...+p_k). For example, “4,1;5,1;6,2” for “T_ST_ArmorMagic” means that the Treasure Table “ST_ArmorMagic” will be used 4 times with a probability of 1/4, 5 times with a probability of 1/4 and 6 times with a probability of 2/4. The probabilities are decreased when they are successfully rolled. In the example above, if the table rolls 4, then DropCount becomes 4,0;5,1;6,2 for the next roll, meaning that 4 has probability 0, 5 has 1/3 and 6 has 2/3. When all probabilities are zero, they are reset to default values. This way we safeguard against situations where a table with DropCount 0,98;1,2 will drop 1 item five times in a row due to sheer randomness.&lt;br /&gt;
=== ObjectCategory ===&lt;br /&gt;
This column defines what is actually dropped by the table. This can be one of several things:&lt;br /&gt;
# A reference to a '''single Item entry''' by its Stats entry. For this, we use the IDs of items from other stat tables: Object, Weapon, Armor, Potion. To use it, we need to prefix it with “I_”, e.g. for “POTION_Minor_Healing_Potion” it will be “I_POTION_Minor_Healing_Potion”.&lt;br /&gt;
# A reference to '''another entry from the Treasure Table'''. This reference copies the contents of that entry to the current entry. To use it, we need to prefix the reference with “T_” (e.g. for “WarriorTrader” it will be “T_WarriorTrader”).&lt;br /&gt;
# A reference to an '''object category''' from the Object, Weapon, Armor, or Potion tables (the “ObjectCategory” column there). The probability that a particular item drops from the chosen category is determined by the item’s Priority, which is also set within those tables. Priorities act as weights in their category: for example if Weapon file has 3 stat entries with ObjectCategory Dagger, and first two have Priority 1, while third has Priority 3, then first two have 1/5 chance to drop while the third item has 3/5 chance to drop. Unlike Dropcounts, Priorities do not change during the game in any way.&lt;br /&gt;
=== Frequency ===&lt;br /&gt;
A Frequency entry determines the chance of an ObjectCategory being selected in its group (i.e. among all of the '''ObjectCategory''' entries using the same '''DropCount''' entry.&lt;br /&gt;
=== Item Rarities from Common to Divine ===&lt;br /&gt;
Item rarity represents the probability of adding a rarity modifier to an item, which is a measure of how good, rare, and 'special' it is for its level. They work similarly to frequencies and are also counted and saved.&amp;lt;br /&amp;gt;&lt;br /&gt;
If ObjectCategory entry is a table (starts with “T_”), then the corresponding Item Rarity will override the rarity of the table. To prevent override, simply leave all rarity counters empty.&lt;br /&gt;
=== Comment ===&lt;br /&gt;
A field to leave comments on the purpose &amp;amp; correct use of a table.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
'''Example 1'''&lt;br /&gt;
Below are a few examples to demonstrate the use of the treasure tables:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! MinLevelDiff !! MaxLevelDiff !! StartLevel !! EndLevel !! DropCount !! ObjectCategory !! Frequency&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 10,1 || Ingredient || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 0,3;1,1;2,1 || Sword || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || -1 || Dagger || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 0,1;1,1;2,1;3,1;4,1 || Painting || 3&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || || Precious || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || || T_ST_Dogs || 1&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 0,1 || Food || 1&lt;br /&gt;
|}&lt;br /&gt;
On the initial roll, the above table:&lt;br /&gt;
* Will always spawn 10 items of the Ingredient category (x,y is 10,1: amount is 10, chance is 1 out of 1 because that’s the only possibility)&lt;br /&gt;
* Has 3 out of 5 chance to drop nothing (0,3 and total chance is 3+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop 1 item of the Sword category (1,1 and total chance is 3+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop 2 item of the Sword category (2,1 and total chance is 3+1+1)&lt;br /&gt;
* Will be forced to spawn something of the Dagger category, ignoring level restrictions if necessary.&lt;br /&gt;
* Has 1 out of 5 chance to drop nothing (0,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop something from Smurf OR Bear OR T_ST_Dogs (1,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop two things from Smurf OR Bear OR T_ST_Dogs (2,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop three things from Smurf OR Bear OR T_ST_Dogs (3,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
:Has 1 out of 5 chance to drop four things from Smurf OR Bear OR T_ST_Dogs (4,1 and total chance is 1+1+1+1+1)&lt;br /&gt;
* In the last case, the subtable ST_Dogs will go over its own possibilities if it is selected. If the subtable ST_Dogs itself has a DropCount entry that says 5,1, and it gets selected once, it will drop 5 items.&lt;br /&gt;
* Will ''never'' drop any Food.&lt;br /&gt;
* The tables has a greater chance of dropping Paintings than it does of dropping something Precious or something from the ST_Dogs table. It will actually be chosen 3 out of 5 times, because is '''Frequency''' is 3 and the total of '''Frequencies''' for its entire group (i.e. the Painting, Precious and T_ST_Dogs entries) is 3+1+1=5.&lt;br /&gt;
After the initial roll, the selected DropCounts will be removed. If the table drops 2 Swords this time, it won't do so again until it has dropped 1 Sword once and no Swords thrice.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Example 2'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DropCount !! ObjectCategory !! Frequency !! Common !! Uncommon !! Rare !! Epic !! Legendary&lt;br /&gt;
|-&lt;br /&gt;
| 5,1 || T_ST_WeaponNormal || 1 || 3 || 1 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 3,1 || T_ST_WeaponNormal || 1 || 2 || || || || 1&lt;br /&gt;
|-&lt;br /&gt;
| 2,1 || T_ST_RingAmuletBeltNormal || 1 || || || 1 || 1 || &lt;br /&gt;
|-&lt;br /&gt;
| 1,1 || Trader Gold || 1 || || || || ||&lt;br /&gt;
|}&lt;br /&gt;
The above table will:&lt;br /&gt;
* Roll on the ST_WeaponNormal table five times. The resulting items have a 3/5 chance to be Common, 1/5 chance to be Uncommon, and a 1/5 chance to be Epic.&lt;br /&gt;
* Roll on the ST_ArmorNormal table three times. The resulting items have a 2/3 chance to be Common, and 1/3 chance to be Epic.&lt;br /&gt;
* Roll on the ST_RingAmuletBeltNormal table twice times. The resulting items have a 1/2 chance to be Rare, and a 1/2 chance to be Epic.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example 3'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! MinLevelDiff !! MaxLevelDiff !! IgnoreLevelDiff !! UseTreasureGroups !! StartLevel !! EndLevel !! DropCount || ObjectCategory&lt;br /&gt;
|-&lt;br /&gt;
| Animals_Owl || || || || || 1 || 12 || 1,1 || I_Loot_Feather_A&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 1 || 12 || 1,1 || I_Loot_Essence_Air_A&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 13 || || 1,1 || I_Loot_Feather_A_Fancy&lt;br /&gt;
|-&lt;br /&gt;
| || || || || || 13 || || 1,1 || I_Loot_Essence_Air_Step2_A&lt;br /&gt;
|}&lt;br /&gt;
Looking at this table, we can see that the following will happen if a character kills an owl:&lt;br /&gt;
* If they are level 1 to 12, they will get 1 Feather, provided Loot_Feather_A is not restricted from dropping at their level.&lt;br /&gt;
* If they are level 1 to 12, they will get 1 Air Essence, provided Loot_Essence_Air_A is not restricted from dropping at their level.&lt;br /&gt;
* If they are level 13 or above, they will get 1 Fancy Feather, provided Loot_Feather_A_Fancy is not restricted from dropping at their level.&lt;br /&gt;
* If they are level 13 or above, they will get 1 Step 2 Air Essence (i.e. a higher-tier Air Essence), provided Loot_Essence_Air_Step2_A is not restricted from dropping at their level.&lt;br /&gt;
== On Well-Balanced Treasure ==&lt;br /&gt;
There are a few practices that will ensure a more even spread of your treasure:&lt;br /&gt;
* Avoid using large numbers for Frequency and DropCount. If you have a dropcount of 0,50;1,50, then on average the player has a 1/2 chance of getting something, but they may have to wait until the 51st time they search a container with that treasure table until they actually do. In fact, they may even find something 50 times in a row, then nothing 100 times in a row (with the Dropcount resetting halfway through), then something 50 times in a row again. If the Dropcount is 0,1;1,1 they won't have to wait more than 2 tries between finding something.&lt;br /&gt;
* Try to use existing subtables to take advantage of the fact the game keeps track of the DropCount within them. Three separate tables, each of which drops Diamonds and Eyeballs independently, may wind up each dropping an Eyeball, whereas if they use one shared Eyeball/Diamond subtable, the player will get a balanced amount of Diamonds and Eyeballs between them.&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/JumpToTurn&amp;diff=5306</id>
		<title>Osiris/API/JumpToTurn</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/JumpToTurn&amp;diff=5306"/>
		<updated>2017-12-21T14:44:17Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''JumpToTurn'''(''(GUIDSTRING)'''''_Target''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Switches the current combat turn to '''_Target''', so that it can act immediately.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* '''_Target''' must be in a combat.&lt;br /&gt;
* '''_Target''''s combat information needs to have been fully initialised before this API can be used. See [[Osiris/API/ObjectReadyInCombat|ObjectReadyInCombat]] for more information.&lt;br /&gt;
* The turn of the character currently active in combat is terminated when this call is used.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CombatStarted|CombatStarted]]&lt;br /&gt;
* [[Osiris/API/ObjectReadyInCombat|ObjectReadyInCombat]]&lt;br /&gt;
* [[Osiris/API/ObjectTurnStarted|ObjectTurnStarted]]&lt;br /&gt;
* [[Osiris/API/ObjectTurnEnded|ObjectTurnEnded]]&lt;br /&gt;
* Helper [[Osiris/Shared/DB_CombatCharacters|DB_CombatCharacters]]&lt;br /&gt;
  &lt;br /&gt;
[[Category:Osiris Calls|JumpToTurn]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedShield&amp;diff=5305</id>
		<title>Osiris/API/CharacterGetEquippedShield</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedShield&amp;diff=5305"/>
		<updated>2017-12-21T14:36:48Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * query '''CharacterGetEquippedShield'''('''''[in]'''(CHARACTERGUID)'''''_Character''',''''' [out]'''''(''GUIDSTRING'')'''_ItemGUID''') ===== De...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* query '''CharacterGetEquippedShield'''('''''[in]'''(CHARACTERGUID)'''''_Character''',''''' [out]'''''(''GUIDSTRING'')'''_ItemGUID''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Returns in '''_ItemGUID''' the weapon wielded by '''_Character''' in their left hand.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* '''Success/Failure''': Fails if '''_Character''' does not exist, or if the character has no item in their left hand.&lt;br /&gt;
* '''_ItemGuid''': The weapon equipped by '''_Character''' in their off (left) hand.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* This is equivalent to [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]] for the '''Shield''' slot.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterUnequipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterEquipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedWeapon|CharacterGetEquippedWeapon]]&lt;br /&gt;
  &lt;br /&gt;
[[Category:Osiris Queries|CharacterGetEquippedShield]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedWeapon&amp;diff=5304</id>
		<title>Osiris/API/CharacterGetEquippedWeapon</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedWeapon&amp;diff=5304"/>
		<updated>2017-12-21T14:36:13Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* query '''CharacterGetEquippedWeapon'''('''''[in]'''(CHARACTERGUID)'''''_Character''',''''' [out]'''''(''GUIDSTRING'')'''_ItemGUID''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Returns in '''_ItemGUID''' the weapon wielded by '''_Character''' in their right hand.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* '''Success/Failure''': Fails if '''_Character''' does not exist, or if the character is not wielding a weapon in their right hand.&lt;br /&gt;
* '''_ItemGuid''': The weapon equipped by '''_Character''' in their main (right) hand.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* This is equivalent to [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]] for the '''Weapon''' slot.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterUnequipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterEquipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedShield|CharacterGetEquippedShield]]&lt;br /&gt;
  &lt;br /&gt;
[[Category:Osiris Queries|CharacterGetEquippedWeapon]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedWeapon&amp;diff=5303</id>
		<title>Osiris/API/CharacterGetEquippedWeapon</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedWeapon&amp;diff=5303"/>
		<updated>2017-12-21T14:35:18Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* query '''CharacterGetEquippedWeapon'''('''''[in]'''(CHARACTERGUID)'''''_Character''',''''' [out]'''''(''GUIDSTRING'')'''_ItemGUID''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Returns in '''_ItemGUID''' the item equipped by '''_Character''' in slot '''_Slotname''', if any.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* '''Success/Failure''': Fails if '''_Character''' does not exist, or if the character is not wielding a weapon in their right hand.&lt;br /&gt;
* '''_ItemGuid''': The weapon equipped by '''_Character''' in their main (right) hand.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* This is equivalent to [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]] for the '''Weapon''' slot.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterUnequipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterEquipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedShield|CharacterGetEquippedShield]]&lt;br /&gt;
  &lt;br /&gt;
[[Category:Osiris Queries|CharacterGetEquippedWeapon]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedWeapon&amp;diff=5302</id>
		<title>Osiris/API/CharacterGetEquippedWeapon</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedWeapon&amp;diff=5302"/>
		<updated>2017-12-21T14:35:01Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * query '''CharacterGetEquippedWeapon'''('''''[in]'''(CHARACTERGUID)'''''_Character''',''''' [out]'''''(''GUIDSTRING'')'''_ItemGUID''') ===== De...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* query '''CharacterGetEquippedWeapon'''('''''[in]'''(CHARACTERGUID)'''''_Character''',''''' [out]'''''(''GUIDSTRING'')'''_ItemGUID''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Returns in '''_ItemGUID''' the item equipped by '''_Character''' in slot '''_Slotname''', if any.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* '''Success/Failure''': Fails if '''_Character''' does not exist, or if no item is equipped in '''_Slotname'''.&lt;br /&gt;
* '''_ItemGuid''': The weapon equipped by '''_Character''' in their main (right) hand.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* This is equivalent to [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]] for the '''Weapon''' slot.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterUnequipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterEquipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedShield|CharacterGetEquippedShield]]&lt;br /&gt;
  &lt;br /&gt;
[[Category:Osiris Queries|CharacterGetEquippedWeapon]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterUnequipItem&amp;diff=5301</id>
		<title>Osiris/API/CharacterUnequipItem</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterUnequipItem&amp;diff=5301"/>
		<updated>2017-12-21T14:25:09Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * call '''CharacterUnequipItem'''(''(CHARACTERGUID)'''''_Character''', ''(ITEMGUID)'''''Item''') ===== Description ===== Makes the '''_Character...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterUnequipItem'''(''(CHARACTERGUID)'''''_Character''', ''(ITEMGUID)'''''Item''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Makes the '''_Character''' unequip '''_Item''', if the '''_Character''' has it equipped.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* /&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/CharacterEquipItem|CharacterEquipItem]]&lt;br /&gt;
*[[Osiris/API/CharacterGetEquippedWeapon|CharacterGetEquippedWeapon]]&lt;br /&gt;
*[[Osiris/API/CharacterGetEquippedShield|CharacterGetEquippedShield]]&lt;br /&gt;
*[[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|CharacterUnequipItem]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterEquipItem&amp;diff=5300</id>
		<title>Osiris/API/CharacterEquipItem</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterEquipItem&amp;diff=5300"/>
		<updated>2017-12-21T14:23:52Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: Created page with &amp;quot;===== Full Definition(s) ===== * call '''CharacterEquipItem'''(''(CHARACTERGUID)'''''_Character''', ''(ITEMGUID)'''''Item''') ===== Description ===== Makes the '''_Character''...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterEquipItem'''(''(CHARACTERGUID)'''''_Character''', ''(ITEMGUID)'''''Item''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Makes the '''_Character''' equip '''_Item''', if the '''_Character''' meets the prerequisites for equipping it.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* /&lt;br /&gt;
===== See Also =====&lt;br /&gt;
*[[Osiris/API/CharacterUnequipItem|CharacterUnequipItem]]&lt;br /&gt;
*[[Osiris/API/CharacterGetEquippedWeapon|CharacterGetEquippedWeapon]]&lt;br /&gt;
*[[Osiris/API/CharacterGetEquippedShield|CharacterGetEquippedShield]]&lt;br /&gt;
*[[Osiris/API/CharacterGetEquippedItem|CharacterGetEquippedItem]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|CharacterEquipItem]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedItem&amp;diff=5299</id>
		<title>Osiris/API/CharacterGetEquippedItem</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterGetEquippedItem&amp;diff=5299"/>
		<updated>2017-12-21T14:23:31Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* query '''CharacterGetEquippedItem'''('''''[in]'''(CHARACTERGUID)'''''_Character''',''''' [in]'''(STRING)'''''_Slotname''',''''' [out]'''''(''GUIDSTRING'')'''_ItemGUID''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Returns in '''_ItemGUID''' the item equipped by '''_Character''' in slot '''_Slotname''', if any.&lt;br /&gt;
===== Return Values =====&lt;br /&gt;
* '''Success/Failure''': Fails if '''_Character''' does not exist, or if no item is equipped in '''_Slotname'''.&lt;br /&gt;
* '''_ItemGuid''': The item equipped by '''_Character''' in '''_Slotname'''.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* The valid values for '''_Slotname''' are: '''Helmet''', '''Amulet''', '''Breast''', '''Belt''', '''Gloves''', '''Leggings''', '''Boots''', '''Weapon''', '''Shield''', '''Ring''', '''Ring2'''.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterUnequipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterUnequipItem|CharacterEquipItem]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedWeapon|CharacterGetEquippedWeapon]]&lt;br /&gt;
* [[Osiris/API/CharacterGetEquippedShield|CharacterGetEquippedShield]]&lt;br /&gt;
  &lt;br /&gt;
[[Category:Osiris Queries|CharacterGetEquippedItem]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterMoveToPosition&amp;diff=5298</id>
		<title>Osiris/API/CharacterMoveToPosition</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterMoveToPosition&amp;diff=5298"/>
		<updated>2017-12-21T14:17:32Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterMoveToPosition'''(''(CHARACTERGUID)'''''_Character''', ''(REAL)'''''_X''', ''(REAL)'''''_Y''', ''(REAL)'''''_Z''',''(INTEGER)'''''_Running''', ''(STRING)'''''_Event''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Makes the character walk (if '''_Running''' is '''0''') or run (if '''_Running''' is '''1''') to ('''_X''', '''_Y''', '''_Z'''). Once the character arrives there, the [[Osiris/API/StoryEvent|event]] '''_Event''' will be sent to '''_Character'''. If the '''_Character''' is in combat, they will move out of turn and ignoring remaining AP. If the destination is blocked, the call will fallback to a teleport to the destination or the nearest available position.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* In practice, the '''_Y''' coordinate will be ignored and the character will snap to the floor at the destination location. If the destination location is not valid on the [[AI_grid|AI grid]], the game will find a nearby valid location on the AI grid and move the character there.&lt;br /&gt;
* '''_Character''' will not participate in combats while it is moving.&lt;br /&gt;
* If a player starts a conversation with '''_Character''', '''_Character''' will not stop and just keep moving.&lt;br /&gt;
* Use '''ProcCharacterMoveTo''' to avoid the problems mentioned above and several others, except for not participating in combat.&lt;br /&gt;
* Use '''ProcStateManagerCharacterMoveTo''' if you also want the character to join combats it encounters on its way.&lt;br /&gt;
* Use '''[[Osiris/API/CharacterLookFromTrigger|CharacterLookFromTrigger]]''' or '''[[Osiris/API/CharacterLookAt|CharacterLookAt]]''' if the character needs to look in a specific direction upon arrival.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/StoryEvent|StoryEvent]]&lt;br /&gt;
* [[Osiris/API/CharacterMoveTo|CharacterMoveTo]]&lt;br /&gt;
* [[Osiris/API/TeleportTo|TeleportTo]]&lt;br /&gt;
* [[Osiris/API/TeleportTo|TeleportToPosition]]&lt;br /&gt;
* Helper [[Osiris/Shared/ProcCharacterMoveTo|ProcCharacterMoveTo]]&lt;br /&gt;
* Helper [[Osiris/Shared/ProcStateManagerCharacterMoveTo|ProcStateManagerCharacterMoveTo]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|CharacterMoveToPosition]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterMoveToPosition&amp;diff=5297</id>
		<title>Osiris/API/CharacterMoveToPosition</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterMoveToPosition&amp;diff=5297"/>
		<updated>2017-12-21T14:16:21Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterMoveToPosition'''(''(CHARACTERGUID)'''''_Character''', ''(REAL)'''''_X''', ''(REAL)'''''_Y''', ''(REAL)'''''_Z''',''(INTEGER)'''''_Running''', ''(STRING)'''''_Event''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Makes the character walk (if '''_Running''' is '''0''') or run (if '''_Running''' is '''1''') to ('''_X''', '''_Y''', '''_Z'''). Once the character arrives there, the [[Osiris/API/StoryEvent|event]] '''_Event''' will be sent to '''_Character'''. If the '''_Character''' is in combat, they will move out of turn and ignoring remaining AP. If the destination is blocked, the call will fallback to a teleport to the destination or the nearest available position.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* In practice, the '''_Y''' coordinate will be ignored and the character will snap to the floor at the destination location. If the destination location is not valid on the [[AI_grid|AI grid]], the game will find a nearby valid location on the AI grid and move the character there.&lt;br /&gt;
* '''_Character''' will not participate in combats while it is moving.&lt;br /&gt;
* If a player starts a conversation with '''_Character''', '''_Character''' will not stop and just keep moving.&lt;br /&gt;
* Use '''ProcCharacterMoveTo''' to avoid the problems mentioned above and several others, except for not participating in combat.&lt;br /&gt;
* Use '''ProcStateManagerCharacterMoveTo''' if you also want the character to join combats it encounters on its way.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/StoryEvent|StoryEvent]]&lt;br /&gt;
* [[Osiris/API/CharacterMoveTo|CharacterMoveTo]]&lt;br /&gt;
* [[Osiris/API/TeleportTo|TeleportTo]]&lt;br /&gt;
* [[Osiris/API/TeleportTo|TeleportToPosition]]&lt;br /&gt;
* Helper [[Osiris/Shared/ProcCharacterMoveTo|ProcCharacterMoveTo]]&lt;br /&gt;
* Helper [[Osiris/Shared/ProcStateManagerCharacterMoveTo|ProcStateManagerCharacterMoveTo]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|CharacterMoveToPosition]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
	<entry>
		<id>https://docs.larian.game/index.php?title=Osiris/API/CharacterMoveTo&amp;diff=5296</id>
		<title>Osiris/API/CharacterMoveTo</title>
		<link rel="alternate" type="text/html" href="https://docs.larian.game/index.php?title=Osiris/API/CharacterMoveTo&amp;diff=5296"/>
		<updated>2017-12-21T14:14:26Z</updated>

		<summary type="html">&lt;p&gt;LarIlya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Full Definition(s) =====&lt;br /&gt;
* call '''CharacterMoveTo'''(''(CHARACTERGUID)'''''_Character''', ''(GUIDSTRING)'''''_Target''', ''(INTEGER)'''''_Running''', ''(STRING)'''''_Event''', ''(INTEGER)'''''_IncreaseSpeed''')&lt;br /&gt;
===== Description =====&lt;br /&gt;
Causes '''_Character''' to start moving to '''_Target''', either walking or running depending on whether '''_Running''' is '''0''' or '''1'''. Once '''_Character''' has arrived at its destination, the event '''_Event''' will be raised for '''_Character'''. If '''_IncreaseSpeed''' is '''1''', '''_Character''' will starting moving increasingly faster the longer it has been moving.&lt;br /&gt;
===== Notes =====&lt;br /&gt;
* If '''_Target''' is unreachable, '''_Character''' may teleport there.&lt;br /&gt;
* '''_Character''' will not participate in combats while it is moving.&lt;br /&gt;
* If a player starts a conversation with '''_Character''', '''_Character''' will not stop and just keep moving.&lt;br /&gt;
* Use '''ProcCharacterMoveTo''' to avoid the problems mentioned above and several others, except for not participating in combat.&lt;br /&gt;
* Use '''ProcStateManagerCharacterMoveTo''' if you also want the character to join combats it encounters on its way.&lt;br /&gt;
* Use '''[[Osiris/API/CharacterLookFromTrigger|CharacterLookFromTrigger]]''' or '''[[Osiris/API/CharacterLookAt|CharacterLookAt]]''' if the character needs to look in a specific direction upon arrival.&lt;br /&gt;
===== See Also =====&lt;br /&gt;
* [[Osiris/API/StoryEvent|StoryEvent]]&lt;br /&gt;
* [[Osiris/API/CharacterMoveToPosition|CharacterMoveToPosition]]&lt;br /&gt;
* [[Osiris/API/CharacterLookFromTrigger|CharacterLookFromTrigger]]&lt;br /&gt;
* Helper [[Osiris/Shared/ProcCharacterMoveTo|ProcCharacterMoveTo]]&lt;br /&gt;
* Helper [[Osiris/Shared/ProcStateManagerCharacterMoveTo|ProcStateManagerCharacterMoveTo]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Osiris Calls|CharacterMoveTo]]&lt;/div&gt;</summary>
		<author><name>LarIlya</name></author>
	</entry>
</feed>