Difference between revisions of "Ai.tbl"

From FreeSpace Wiki
Jump to: navigation, search
(Added $Max Aim Update Delay)
(Patience affecting stalemate detection)
Line 20: Line 20:
 
===Patience===
 
===Patience===
 
*How willing the ship is to wait for an advantage before pursuing goals. Never actually implemented - It does absolutely nothing.
 
*How willing the ship is to wait for an advantage before pursuing goals. Never actually implemented - It does absolutely nothing.
 +
{{Table3611|This value affects how quickly the AI will attempt to "break" a stalemate situation if one is detected. Only applies if ''$Stalemate Time Threshold'' and ''$Stalemate Distance Threshold'' are used. The higher the patience, the longer the ship will wait in "stalemate" before breaking. If patience is 100, the AI will never break.
 +
}}
  
 
==Table Entry==
 
==Table Entry==

Revision as of 16:24, 14 September 2009

Revision information.....

FSO Revision: 5211
Note: Please update the version when the page is updated. If your edit had nothing to do with new code entries then please do not edit the version


  • The AI.tbl file defines the AI classed used in the game. This table is used to define each AI class with four abilities for each of the five difficulty levels.


FS2 Open, 3.6.12: In addition, each AI class can optionally modify certain values from AI Profiles.tbl.


Ability

  • Higher number means better ability

Accuracy

  • How accurately the ship fires its weapons. Value is used to scale the error in the AI aim. With repeated shots, AI aim will improve. Note that the AI is always 100% accurate when aiming for subsystems, according to Retail code.

Evasion

  • How good the ship is at evading. Value defines the frequency of AI course changes while it is evading.

Courage

  • How likely the ship is to chance danger to accomplish goals. Basically the lower the value sooner the AI will start evading when attacked and its less likely to target turrets.

Patience

  • How willing the ship is to wait for an advantage before pursuing goals. Never actually implemented - It does absolutely nothing.
FS2 Open, 3.6.12: This value affects how quickly the AI will attempt to "break" a stalemate situation if one is detected. Only applies if $Stalemate Time Threshold and $Stalemate Distance Threshold are used. The higher the patience, the longer the ship will wait in "stalemate" before breaking. If patience is 100, the AI will never break.

Table Entry

Required Elements

$Name:

  • Defines a name for the AI class that can be used with ships.tbl and also with FRED
  • Syntax: String, name of the AI class

$accuracy:

  • Value from 0.0 to 1.0
  • Syntax: Float list, five comma separated floats, one for each difficulty, very easy, easy, moderate, hard, insane difficulty levels respectively

$evasion:, $courage: and $patience:

  • Value from 0 to 100
  • Syntax: Float list, five comma separated floats, one for each difficulty, very easy, easy, moderate, hard, insane difficulty levels respectively

AI Profiles Multipliers

FS2 Open, 3.6.12: The following values can be inserted as multipliers for their equivalent AI Profiles.tbl values. They are all optional. If not set for an AI class, the values in AI Profiles will be used (unmodified).

Syntax: Float List (Default: 1.0, 1.0, 1.0, 1.0, 1.0)

  • $AI Countermeasure Firing Chance:
  • $AI In Range Time:
  • $AI Always Links Ammo Weapons:
  • $AI Maybe Links Ammo Weapons:
  • $Primary Ammo Burst Multiplier:
  • $AI Always Links Energy Weapons:
  • $AI Maybe Links Energy Weapons:
  • $Predict Position Delay:
  • $AI Shield Manage Delay:
  • $Friendly AI Fire Delay Scale:
  • $Hostile AI Fire Delay Scale:
  • $AI Turn Time Scale:
  • $Glide Attack Percent:
  • $Circle Strafe Percent:
  • $Glide Strafe Percent:
  • $Stalemate Time Threshold:
  • $Stalemate Distance Threshold:
  • $Chance AI Has to Fire Missiles at Player:
  • $Max Aim Update Delay:

AI Profiles Flag Overrides

FS2 Open, 3.6.12: The following flags can be inserted to override their equivalent AI Profiles.tbl flag values. They are all optional. If not set for an AI Class, the AI Profiles value will be used.
  • $big ships can attack beam turrets on untargeted ships:
  • $smart primary weapon selection:
  • $smart secondary weapon selection:
  • $smart shield management:
  • $smart afterburner management:
  • $allow rapid secondary dumbfire:
  • $huge turret weapons ignore bombs:
  • $don't insert random turret fire delay:
  • $prevent turrets targeting too distant bombs:
  • $smart subsystem targeting for turrets:
  • $allow turrets target weapons freely:
  • $allow vertical dodge:

Sample Entry

  #AI Classes
  $Name:         Captain
  $accuracy:     0.5      0.55     0.6      0.65     0.7
  $evasion:      10,      20,      30,      40,      50
  $courage:      10,      20,      30,      40,      50
  $patience:     10,      20,      30,      40,      50
  #End


FS2 Open, 3.6.12: (Sample entry using some optional multipliers and overrides)
  #AI Classes
  $Name:         Captain
  $accuracy:                      0.5      0.55     0.6      0.65     0.7
  $evasion:                       10,      20,      30,      40,      50
  $courage:                       10,      20,      30,      40,      50
  $patience:                      10,      20,      30,      40,      50
  $AI In Range Time:              1.5,     1.4,     1.3,     1.2,     1.1
  $Primary Ammo Burst Multiplier: 0.8,     0.8,     0.8,     0.8,     0.8
  $Glide Attack Percent:          1.0,     1.0,     1.5,     1.5,     1.5
  $allow rapid secondary dumbfire:  NO
  $allow vertical dodge:            YES
  #End