AI Files



AI Files General

AI files stand for "Artificial Intelligence" and mean what they stand for. These files actually determine the behavour of the things in the game (like, enemies, pedestrians, droids, smaller machines like AT-ST). In these files, it is definded how "tough" an opponent shoots, if he can open doors; if he wanders around or not.

There are 3 types of AI files for 3 difficulty levels. If a level is played on Easy, JK automatically uses files with the ".AI0" extension. On Hard, the ".AI2" files are used. On Medium (and if there are no extra AI0 & AI2 files), the .AI files are used.

The AI files do not influence the outward appearence of an enemy, nor they define which weapons a character has . They only specify the character of the character (and his weapons).

AI files consist of 2 parts. The first defines the character's basic properties like how far it can see or from how high a height he can jump down. The second one defines the "Instincts" of a character. This one is a list of certain instincts which all have specific arguments.


AI Files Header

An AI file header is normally preceeded by a commented passage which describes whom this specific AI belongs to and who wrote it. You can create comments by putting the "#" character at the beginning of a line.

Here is the example of how an AI header looks like. The only line used by JK is the last one.

# Jedi Knight AI File
#
# GONK.AI
#
# Droid AI
# Flee only when damaged
# All difficulty levels
#
# [CR]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved

alignment=0.0, rank=0.5, fov=210, maxstep=0.0, sightdist=6.0, heardist=0.5

The last line is needed by JK. It determines the properties of the character. The properties are following each other, separated by a comma. In MotS, there is a further property: accuracy.

alignment Character's side. -1 means enemy, 0 means neutral, 1 means friend.
rank Specifies the rank of a character. Officers have higher rank as troopers.
fov the angle of front sight. 1 means can only look straight forward. 360 means full view around (like a Mon Calamari)
maxstep From what height in JKU can the person jump down
sightdist How far can he detect you by sight
heardist How far can he hear you walking/changing weapons etc
accuracy unknown. Only used in MotS.

AI Files Instincts

The header is followed by a list of the character's instincts. Instincts are the abilities of the character and also the specifications of his special behaviour like shooting, roaming or opening doors. Most instincts need a number of arguments which are numbers separated by commas. There are also instincts without arguments. The list of the instincts you will find in the menu to the left.