18,700
edits
(clarified <HurtSoundConstants>) |
(clarified <AIConstants>, caught big oops with "friendly" timers) |
||
Line 277: | Line 277: | ||
|} | |} | ||
If the AI is in an alerted state, has not been hurt within the last <Timer> ticks, and the damage being done is at least <PercentageThreshold>, the chance of playing a pain sound is <BasePercentage> + (damage done * (<MaxPercentage> - <BasePercentage>)) / <PercentageThreshold> | If the AI is in an alerted state, has not been hurt within the last <Timer> ticks, and the damage being done is at least <PercentageThreshold>, the chance of playing a pain sound is <BasePercentage> + (damage done * (<MaxPercentage> - <BasePercentage>)) / <PercentageThreshold>. If the AI is alerted and has already received damage within the last <Timer> ticks, they will not play a hurt sound. If the AI is ''not'' in an alerted state, they will always play a hurt sound. | ||
==<AIConstants>== | ==<AIConstants>== | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!width=150px| XML tag | !width=150px| XML tag | ||
!width=120px| | !width=120px| Content type | ||
! | ! Description | ||
|- | |- | ||
|valign=top| <Flags> | |valign=top| <Flags> | ||
Line 291: | Line 291: | ||
: EnableMeleeFireDodge | : EnableMeleeFireDodge | ||
: ShootDodge (requires EnableMeleeFireDodge; AI tries to face shooter and shoot back while dodging) | : ShootDodge (requires EnableMeleeFireDodge; AI tries to face shooter and shoot back while dodging) | ||
: RunAwayDodge (requires EnableMeleeFireDodge; overrides ShootDodge; | : RunAwayDodge (requires EnableMeleeFireDodge; overrides ShootDodge; firing spread/projectile dodge enabled for weapons; AI isn't shooting, it just tends to run away, not facing shooter) | ||
: NotUsed | : NotUsed | ||
|- | |- | ||
Line 300: | Line 300: | ||
| <DazedMinFrames> | | <DazedMinFrames> | ||
| int16 | | int16 | ||
| | | Minimum number of frames for which AI remains in fallen position when it is knocked down | ||
|- | |- | ||
| <DazedMaxFrames> | | <DazedMaxFrames> | ||
| int16 | | int16 | ||
| | | Maximum number of frames for which AI remains in fallen position when it is knocked down | ||
|- | |- | ||
| <DodgeReactFrames> | | <DodgeReactFrames> | ||
| uint32 | | uint32 | ||
| | | Number of frames after which AI realizes that it is inside a firing spread and starts dodging | ||
|- | |- | ||
|valign=top| <DodgeTimeScale> | |valign=top| <DodgeTimeScale> | ||
|valign=top| float | |valign=top| float | ||
| | | Minimum firing spread dodge amount; similar to the maneuver variable, it tells the AI how long it should continue dodging/hiding in response to being inside a firing spread (so setting this very high means that once the enemy starts dodging/hiding, it will continue even after the firing spread disappears) | ||
|- | |- | ||
| <DodgeWeightScale> | | <DodgeWeightScale> | ||
| float | | float | ||
| | | Dampens dodging of firing spread/projectile; the higher it is, the lower priority the AI gives to dodging | ||
|- | |- | ||
| <Targeting> | | <Targeting> | ||
| | | | ||
| | | See [[#<Targeting>|HERE]] | ||
|- | |- | ||
| <WeaponSkills> | | <WeaponSkills> | ||
| | | | ||
| | | See [[#<WeaponSkills>|HERE]] | ||
|- | |- | ||
| <DeadMakeSureDelay> | | <DeadMakeSureDelay> | ||
| int32 | | int32 | ||
| | | Always 90; how long AI will continue shooting a dead body to make sure it's dead | ||
|- | |- | ||
| <InvestigateBodyDelay> | | <InvestigateBodyDelay> | ||
| int32 | | int32 | ||
| | | Always 240; how long AI will stand over dead body before returning to last job | ||
|- | |- | ||
| <LostContactDelay> | | <LostContactDelay> | ||
| int32 | | int32 | ||
| | | Always 180; how long after losing sight of target until AI engages pursuit mode | ||
|- | |- | ||
| <DeadTauntChance> | | <DeadTauntChance> | ||
| int32 | | int32 | ||
| | | Chance of AI taunting a dead body | ||
|- | |- | ||
| <GoForGunChance> | | <GoForGunChance> | ||
| int32 | | int32 | ||
| | | Chance of AI running to some weapon to pick it up; can be checked in Dev Mode with the '''debug_gun_behavior''' command | ||
|- | |- | ||
| <RunPickupChance> | | <RunPickupChance> | ||
| int32 | | int32 | ||
| | | Chance of AI performing a running weapon pickup (including acrobatics moves, slides) instead of the normal "stop and pick up"; this is calculated ''after'' the engine decides that the AI will go for a gun | ||
|- | |- | ||
| <CombatId> | | <CombatId> | ||
| int16 | | int16 | ||
| [[XML:BINA/OBJC/CMBT| | | [[XML:BINA/OBJC/CMBT|Combat profile ID]] | ||
|- | |- | ||
| <MeleeId> | | <MeleeId> | ||
| int16 | | int16 | ||
| [[XML:BINA/OBJC/MELE| | | [[XML:BINA/OBJC/MELE|Melee profile ID]] | ||
|- | |- | ||
| <SoundConstants> | | <SoundConstants> | ||
| | | | ||
| | | See [[XML:SNDD#Step_1:_Preparing_the_TRAM|HERE]] | ||
|- | |- | ||
|valign=top| <HostileThreatDefiniteTimer> | |valign=top| <HostileThreatDefiniteTimer> | ||
|valign=top| int32 | |valign=top| int32 | ||
| | | How long an AI will know exactly where its enemy is even if it can't see him with its central vision field, and attempt to attack him | ||
|- | |- | ||
|valign=top| <HostileThreatStrongTimer> | |valign=top| <HostileThreatStrongTimer> | ||
|valign=top| int32 | |valign=top| int32 | ||
| | | How long an AI will remain strongly convinced that there is an enemy, but will investigate his presence rather than attempt to attack him | ||
|- | |- | ||
|valign=top| <HostileThreatWeakTimer> | |valign=top| <HostileThreatWeakTimer> | ||
|valign=top| int32 | |valign=top| int32 | ||
| | | How long an AI will remain weakly convinced of an enemy's presence, looking around aimlessly to find him (Glance pursuit mode) | ||
|- | |- | ||
|valign=top| <FriendlyThreatDefiniteTimer> | |valign=top| <FriendlyThreatDefiniteTimer> | ||
|valign=top| int32 | |valign=top| int32 | ||
| | | This field is mislabeled, as it is actually the decay time for dropping back from high alert to medium alert and does not concern friendly AIs | ||
|- | |- | ||
|valign=top| <FriendlyThreatStrongTimer> | |valign=top| <FriendlyThreatStrongTimer> | ||
|valign=top| int32 | |valign=top| int32 | ||
| | | This field is mislabeled, as it is actually the decay time for dropping back from medium alert to low alert and does not concern friendly AIs | ||
|- | |- | ||
|valign=top| <FriendlyThreatWeakTimer> | |valign=top| <FriendlyThreatWeakTimer> | ||
|valign=top| int32 | |valign=top| int32 | ||
| | | This field is mislabeled, as it is actually the decay time for dropping back from low alert to no alert status and does not concern friendly AIs | ||
|- | |- | ||
| <EarshotRadius> | | <EarshotRadius> | ||
| float | | float | ||
| | | Hearing radius; defines the size of the sound-detection sphere around an AI | ||
|} | |} | ||
You can observe the running of the various timers above by using the '''ai2_report_verbose''' command in the dev console (beware, this command causes random crashes). | |||
===<Targeting>=== | ===<Targeting>=== |