AI.TXT File Format

The file consists of a description of combat parameters for the player and all NPC classes in the game. Descriptions are separated from one another with an empty line. Each description consists of the (unique) name of the class and settings. Below is a list of parameters in alphabetical order. "string" means that the value should be text; "N" indicates a numeric value; and "mixed" can be either.

[Class Name]

This option must be specified first. For example, [Enclave Patrol], [Fighting Mantis] or [Arroyo Villager]. The player is the class named Player AI. Every party member must have the following classes: [PARTY NAME AGGRESSIVE] [PARTY NAME BERSERK] [PARTY NAME COWARD] [PARTY NAME CUSTOM] [PARTY NAME DEFENSIVE] Here NAME is the name of a member of the team, such as: DOC, LENNY, etc. GORIS

aggression = N

The chance of aggressive behavior by the NPC in combat. Measured as a percentage. Valid values are: 0-100.

area_attack_mode = string

Conditions for burst-fire. Existing values: no_pref always sometimes be_sure be_careful be_absolutely_sure

attack_end = N 

attack_start = N

Combat taunts said when attacking. At the beginning of the attack, a random number between the two values is chosen. Then the appropriate line number from master.dat/text/english/game/combatai.msg is displayed.

attack_who = string

Who the NPC should attack. Existing values: whomever_attacking_me strongest weakest whomever closest

best_weapon = string

Preferred weapon types. This option does not exist for all NPCs. Available values: no_pref never (Deathclaw) random unarmed ranged_over_melee melee_over_ranged unarmed_over_thrown (Spore Plant) Incidentally, the opposite of the last setting (thrown_over_unarmed) is never specified, and may not exist.

body_type = string

Defines the block of messages that critters say in response to being hit. The blocks are from master.dat/data/AIBDYMSG.TXT, which in turn refers to lines in combatai.msg. Existing values (examples of critters that use them in parens): None Primitive Wimpy Person (Whimpy, Coward ...) Punk (SF) Berserk Person (Kamakazi. ..) Tough Person (Bounty Hunter, Caravan Driver ...) Boxer Normal Person Robot Junkie (Crazy Addict) Elron (Habologisty) Ghoul Kaga Raider (Khan) Raider (Non-Khan) Gangster (Mobsters) Shi Super Mutant (Master Army) Goris Miron Marcus Lenny Cassidy Robo Brain (Hum / Cyb) Sulik

called_freq = N

Sets the likelihood of an event, which is calculated as 1/N. I.e. the event happen 1 times of the N. Cannot be zero. The meaning of the parameter is not known.

chance = N

The likelihood of any message. Measured as a percentage. Valid values are: 0-100.

chem_primary_desire = N

Preference for drug use. PIDs of items, or -1 if there is no preference. If you want to specify multiple types of drugs, they are listed separated by commas. (eg 284,81,103)

chem_use = string

NPC drug use in combat. Existing values: clean sometimes stims_when_hurt_little stims_when_hurt_lots anytime always

color = N

Perhaps the font color used for combat taunts. It is 58 for all critter types.

disposition = mixed

Determines NPC behavior during a battle. Existing values: -1 none coward defensive aggressive berserk

distance = string

The distance between the NPC and its enemy, managing battle tactics. Existing values: random (listed only for Mobsters and Tough Khan) charge on_your_own stay stay_close snipe

font = N

Perhaps, the font used for combat taunts. Value in the US version of the game is 101. In other versions 102, 103, and 104 are used.

general_type = string

Defines the block of combat taunts that the critter periodically shouts during a battle (attack, retreat, miss). The blocks are in master.dat/data/AIGENMSG.TXT, and refer to lines in combatai.msg. Existing values: Badger Berserk Person Bounty Hunter Boxer Cassidy Chip Crazed Robot Cyberdog Dragon (The) Elron Guards Gangster Ghoul Goris Guard (Normal) Guard (Tough) Junkie Kaga (1) Lenny Lo Pan Marcus Myron None Normal Person OZ - 7 OZ - 9 Primitive Raider Raider Captain Raider Mercs Rat God Robot Ryan Shi Guards Sulik Super Mutant (Master Army) The Brain Tough Person Wimpy Person

hit_eyes_end = N 

hit_eyes_start = N

hit_groin_end = N 

hit_groin_start = N

hit_head_end = N 

hit_head_start = N

hit_left_arm_end = N 

hit_left_arm_start = N

hit_left_leg_end = N 

hit_left_leg_start = N

hit_right_arm_end = N 

hit_right_arm_start = N

hit_right_leg_end = N 

hit_right_leg_start = N

hit_torso_end = N 

hit_torso_start = N

NPC messages when hit in the eyes, groin, head, left arm, left leg, right arm, right leg and torso, respectively. For details, see the description of attack_end.

hurt_too_much = string

Indicates the condition in which the NPC starts running away. Multiple conditions are separated by commas. crippled blind crippled_arms

max_dist = N

The maximum distance from the player where the NPC is hostile. Measured in hexes.

min_hp = N

The minimum number of hit points, at which the NPC starts running away.

min_to_hit = N

to_hit is a parameter in the game engine. If to_hit = 10, that means that the maximum amount of damage is increased by 10. I.e. if the weapon's normal damage is 1-3, after this it will be 1-13. How does is done is unknown.

miss_end = N 

miss_start = N

NPC combat taunts when missing a target. For details, see the description of attack_end.

move_end = N 

move_start = N

Combat taunts used when moving to attack (i.e., when not yet in range of the enemy, but already hostile) For details, see description of attack_end.

outline_color = N

Maybe the color used for target highlighting. For all NPC classes, it is 55.

packet_num = N

Number of the AI package. Never change it! If the new AI package you indicate packet_num, which already exists, then when you click on the AI button in the mapper (in critter properties), it closes the window. When you create a new AI package, the value of packet_num must be consecutive. In AI.txt there are 187 values for packet_num, from 0 to 186 inclusive. If you want to add a new package, it should have packet_num 187, the next added package 188, and so on. If packet_num is not followed consecutively, for example, 188 immediately after 186, the mapper will close.

run_away_mode = string

Condition when the NPC will run away. Existing values: none coward finger_hurts bleeding not_feeling_good tourniquet never

run_end = N 

run_start = N

Combat taunts used when running away. For details, see the description of attack_end.

secondary_freq = N

Similar to called_freq. Sets the probability of an event, which is calculated as 1/N. I.e. the event will happen 1 times out of N. Cannot be zero. The meaning of the parameter is not known.

[| Original document] at TeamX.ru (in Russian)