Difference between revisions of "Combat AI"

From Divinity Engine Wiki
Jump to: navigation, search
(Created page with "<p>General explanation of how it works<br> Skill conditions<br> What is not supported<br> Ai modifiers<br> Override skills</p>")
 
Line 1: Line 1:
<p>General explanation of how it works<br>
+
=Introduction=
Skill conditions<br>
+
Ai 2.0 or, as we'd like to call it, <b>Jane</b> (used to be an abbreviation, but we already forgot about it the next day) no longer uses a script for every single skill to reason about its usage. Almost all logic has been moved to code, and all that's left in script is starting the Ai calculation, stopping the Ai calculation, and executing the action that has been selected by Ai. This script logic can be found in DefaultBehaviour.charScript. The Ai now takes into account the properties of a skill, the statuses that are applied, the weapons that are used, the items nearby, etc. It (attempts) to simulate what's going to happen if it will use a certain skill at a certain target and assign a score to it. The action with the highest score will be executed. All this happens automatically, so a new skill or status can be used by Ai without any extra steps. Of course, there are exceptions, and you'd still like to guide or override the Ai from time to time. That's what this page tries to cover in detail.
What is not supported<br>
+
 
Ai modifiers<br>
+
=Guiding Ai=
Override skills</p>
+
===Skill conditions===
 +
===Archetypes and modifiers===
 +
 
 +
=Overriding Ai=
 +
===Skill overrides===
 +
===Scripting===
 +
 
 +
=Unsupported properties=
 +
===Skills===
 +
===Statuses===
 +
 
 +
=Debugging Ai=

Revision as of 14:07, 11 September 2017

Introduction

Ai 2.0 or, as we'd like to call it, Jane (used to be an abbreviation, but we already forgot about it the next day) no longer uses a script for every single skill to reason about its usage. Almost all logic has been moved to code, and all that's left in script is starting the Ai calculation, stopping the Ai calculation, and executing the action that has been selected by Ai. This script logic can be found in DefaultBehaviour.charScript. The Ai now takes into account the properties of a skill, the statuses that are applied, the weapons that are used, the items nearby, etc. It (attempts) to simulate what's going to happen if it will use a certain skill at a certain target and assign a score to it. The action with the highest score will be executed. All this happens automatically, so a new skill or status can be used by Ai without any extra steps. Of course, there are exceptions, and you'd still like to guide or override the Ai from time to time. That's what this page tries to cover in detail.

Guiding Ai

Skill conditions

Archetypes and modifiers

Overriding Ai

Skill overrides

Scripting

Unsupported properties

Skills

Statuses

Debugging Ai