Combat AI

From Divinity Engine Wiki
Revision as of 13:07, 11 September 2017 by Rimevan (talk | contribs)
Jump to: navigation, search

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