Difference between revisions of "Ai.tbl"
m |
(Adding "$ai can slow down when attacking big ships:".) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{TableVersionGit|2016-08-09|7265711}} |
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. | 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. | ||
Line 117: | Line 117: | ||
{{Table3613| | {{Table3613| | ||
* $all ships manage shields: | * $all ships manage shields: | ||
+ | }} | ||
+ | {{Table38| | ||
+ | * $ai can slow down when attacking big ships: | ||
}} | }} | ||
Revision as of 20:39, 6 September 2016
Revision information.....
- FSO Git Commit: Date: 2016-08-09 SHA: 7265711
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.
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:
- 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.
- 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:
- How good the ship is at evading. Value defines the frequency of AI course changes while it is evading.
- 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
$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.
- 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
$Patience:
- How willing the ship is to wait for an advantage before pursuing goals. Never actually implemented - It does absolutely nothing.
- 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
Optional Elements
Other AI Class Attributes
IMPORTANT NOTE: If the following attributes are NOT specified, the code uses the index of the AI class instead. Use these if you want finer-grained control over the AI classes and/or you don't want the order of the AI classes to affect their behavior. If these are not specified, the behaviors described will be determined by the order of the AI class relative to the others in the file. Furthermore, having a different number of AI classes than retail can result in strange behavior if these are NOT set. It is recommended that if you make heavy use of custom AI classes, you specify all of these and set $Autoscale by AI Class Index to NO.
$Afterburner Use Factor:
- Affects how probably it is that the AI will use afterburners in "maybe" situations. A value of 1 means always, 2 means half the time, 3 a third of the time, etc.
- Syntax: Int list, five comma separated integers, one for each difficulty.
$Shockwave Evade Chances Per Second:
- Controls how likely it is for a ship to try to start evading a shockwave. The higher the number, the more "chances per second" the ship has to evade.
- Syntax: Float list, five comma separated float, one for each difficulty.
$Get Away Chance:
- How likely the AI is to use a "get away" maneuver instead of simply making evasive turns. "Get away" usually involves the AI flying straight away, usually on afterburner, and making small jinking motions (instead of large evasive turns). Higher values result in more "jousting" fights.
- Range: between 0.0 (never) and 1.0 (always)
- Syntax: Float list, five comma separated float, one for each difficulty.
$Secondary Range Multiplier:
- Multiplier which affects from how far away the AI will begin firing secondary weapons. Capped by the actual maximum range of the weapon. Penalty for firing in nebula still applies above and beyond this.
- Range: between 0.0 (point blank/never fires) and 1.0 (fires from maximum range).
- Syntax: Float list, five comma separated float, one for each difficulty.
$Autoscale by AI Class Index:
- If set to YES (default), a number of miscellaneous AI probabilities are affected by the order of the AI class in the file (for example, the chance to fire countermeasures). Classes near the beginning of the file are generally weaker than classes at the end. If set to NO, this flag will turn off that auto scaling behavior (so that the order of the AI class does not affect AI behavior).
- Note that even if this is set to NO, the other options above will still be controlled by AI class index (so if you want complete independence, you need to set all of the options listed in the "Other AI Class Attributes" category).
- Default: YES
- Syntax: Boolean flag (YES/NO)
AI Profiles Overrides
Syntax is the same as their AI Profiles counterparts.
- $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:
- $Turret Max Aim Update Delay:
AI Profiles Flag Overrides
- $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:
- $No extra collision avoidance vs player:
- $all ships manage shields:
- $ai can slow down when attacking big ships:
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
#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 $Get Away Chance: 0.40, 0.45, 0.50, 0.55, 0.6 $Autoscale by AI Class Index: NO $AI In Range Time: 2, 1.6, 1.2, 0.8, 0.4 $Primary Ammo Burst Multiplier: 0.6, 0.65, 0.7, 0.75, 0.8 $Glide Attack Percent: 30, 40, 50, 60, 70 $allow rapid secondary dumbfire: NO $allow vertical dodge: YES #End