AI stats: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Destined (talk | contribs)
No edit summary
Destined (talk | contribs)
No edit summary
Line 1: Line 1:
<pre style="color: red">THIS IS STILL A WORK IN PROGRESS
</pre>
== Spawnarg Explanation ==
== Spawnarg Explanation ==
This is a short explanation what the respective spawnarg does. The information is taken from the explanations in the def-files. All stated values are as found in the def-files and are subject to change through map authors. If you want the respective value for a specific AI in a mission, the value of each spawnarg can be looked up in Dark Radiant.
This is a short explanation what the respective spawnarg does. The information is taken from the explanations in the def-files. All stated values are as found in the def-files and are subject to change through map authors. If you want the respective value for a specific AI in a mission, the value of each spawnarg can be looked up in Dark Radiant.
Line 25: Line 22:
|damage
|damage
|Damage definition if it damages things it collides with.
|Damage definition if it damages things it collides with.
|-
|damage_zones
|There are different hit zones for AI that variy the damage recieved from the player.
|-
|damage_scale "zone"
|Factor by which damage in the given zone is multiplied.
|-
|-
|def_melee_set
|def_melee_set
Line 232: Line 235:
|-
|-
|headturn_chance_idle
|headturn_chance_idle
|The chance for random head turning while idle (0.0-1.0)
|The chance for random head turning while idle (0 0-1 0)
|-
|-
|headturn_factor_alerted
|headturn_factor_alerted
Line 367: Line 370:
|damage
|damage
|34
|34
|-
|damage_zone
|head, chest, torso_low, left_arm, right_arm, legs
|-
|damage_scale head
|2
|-
|damage_scale chest
|1.5
|-
|damage_scale torso_low
|1.0
|-
|damage_scale left_arm
|0.3
|-
|damage_scale right_arm
|0.3
|-
|damage_scale legs
|0.4
|-
|-
|def_melee_set
|def_melee_set
Line 387: Line 411:
|-
|-
|headturn_chance_idle
|headturn_chance_idle
|
|0.3
|-
|-
|headturn_factor_alerted
|headturn_factor_alerted
|
|2
|-
|-
|health
|health
|
| variable
|-
|-
|health_critical
|health_critical
|
|15
|-
|-
|is_civilian
|is_civilian
|
|0
|-
|-
|is_mantleable
|is_mantleable
Line 405: Line 429:
|-
|-
|ko_alert_immune
|ko_alert_immune
|
|0
|-
|-
|ko_alert_immune_state
|ko_alert_immune_state
|
|5
|-
|-
|ko_alert_state
|ko_alert_state
|
|4 (as soon as weapon is drawn)
|-
|-
|ko_angle_alert_horiz
|ko_angle_alert_horiz
|
|110
|-
|-
|ko_angle_alert_vert
|ko_angle_alert_vert
|
|180
|-
|-
|ko_angle_horiz
|ko_angle_horiz
|
|360
|-
|-
|ko_angle_vert
|ko_angle_vert
|
|360
|-
|-
|ko_immune
|ko_immune
Line 429: Line 453:
|-
|-
|ko_rotation
|ko_rotation
|
|0 0 0
|-
|-
|ko_spot_offset
|ko_spot_offset
|
|2 -2.5 0
|-
|-
|ko_zone
|ko_zone
Line 438: Line 462:
|-
|-
|melee_damage
|melee_damage
|
|variable
|-
|-
|melee_damage_mod
|melee_damage_mod
|
|0.6 - 1.4
|-
|-
|melee_predicts_proximity
|melee_predicts_proximity
|
|1
|-
|-
|melee_predicted_attack_time
|melee_predicted_attack_time
|
|750
|-
|-
|melee_range
|melee_range
|
|0
|-
|-
|melee_rep_attack_time
|melee_rep_attack_time
|
|10000
|-
|-
|outofreach_projectile_delay_max
|outofreach_projectile_delay_max
|
|7.0
|-
|-
|outofreach_projectile_delay_min
|outofreach_projectile_delay_min
|
|10.0
|-
|-
|outofreach_projectile_enabled
|outofreach_projectile_enabled
|
|1
|-
|-
|pain_threshold
|pain_threshold
|
|1
|-
|-
|pickpocket_alert
|pickpocket_alert
|
|0
|-
|-
|pickpocket_delay_max
|pickpocket_delay_max
|
|25000
|-
|-
|picpocket_delay_min
|picpocket_delay_min
|
|5000
|-
|-
|push_player
|push_player
Line 480: Line 504:
|-
|-
|sneak_attack_alert_state
|sneak_attack_alert_state
|
|2
|-
|-
|sneak_attack_mult
|sneak_attack_mult
|
|2.0
|-
|-
|stamina
|stamina
|
|player only
|-
|-
|team
|team
|
| variable
|-
|-
|unarmed_melee
|unarmed_melee
|
|0
|-
|-
|unarmed_ranged
|unarmed_ranged
|
|0
|-
|-
|}
|}

Revision as of 11:04, 7 February 2017

Spawnarg Explanation

This is a short explanation what the respective spawnarg does. The information is taken from the explanations in the def-files. All stated values are as found in the def-files and are subject to change through map authors. If you want the respective value for a specific AI in a mission, the value of each spawnarg can be looked up in Dark Radiant. For clarity the spawargs were divided into three subgroups: Combat related spawnargs that include spawnargs influencing the fighting capabilities; Interactions that cover interactions between the player and the AI as well as the AI and the world other than combat; AI perception that include spawnargs that influence how the AI perceive their surroundings; and finally other that in my understanding do not fit the other categories.

Combat related
Spawnarg Explanation
armor Type of armor the AI is wearing (may vary depending on hit zone). The damage multipliers are: leather 0.75, chain 0.5, plate 0.
attack_accuracy Maximum angular offset to randomly offset the monster's aim when firing missiles
attack_cone Monster can only throw projectile within this cone relative to his direction.
bleed If set to true, this entity will bleed, e.g. spawn blood particles and decals when hurt.
damage Damage definition if it damages things it collides with.
damage_zones There are different hit zones for AI that variy the damage recieved from the player.
damage_scale "zone" Factor by which damage in the given zone is multiplied.
def_melee_set The defined melee set that describes the fighting skills. The levels are "novice", "trained", and "skilled" and are further modiefied by the difficulty of the game.
health Amount of damage to receive before dying.
health_critical When the health drops below this value, the AI will flee. Set this to 0 for AI that don't wet their pants.
melee_damage Damage dealt with a melee weapon.
melee_damage_mod When the AI hits with a melee weapon, this multiplies the default damage done by the weapon. Is depending on difficulty and is replaced by melee_sets. Ranges from 0.8 to 1.4.
melee_predicts_proximity If true, AI takes the current velocity of itself and its enemy into account to predict whether it will hit the enemy in the future if it starts a melee attack now. All but the stupidest AI should do this.
melee_predicted_attack_time The amount of time in milliseconds that the AI uses to predict whether it will hit its enemy if it starts its attack now. Should roughly correspond to the time it takes before the attack animation is threatening to an enemy in front of them. This baseline can be set on an AI for empty-hand attacks, then may be overwritten by individual weapons if their attack animations are slower/faster than this baseline.
melee_range do melee attack when within 3x this range
melee_rep_attack_time Time it takes for a melee attack to be repeated in milliseconds.
outofreach_projectile_delay_max Maximum period to wait between throwing player-out-of-reach projectiles in seconds
outofreach_projectile_delay_min Minimum period to wait between throwing player-out-of-reach projectiles in seconds
outofreach_projectile_enabled Ability to throw player-out-of-reach projectiles at the player.
pain_threshold How much damage monster has to receive in one blow for it to play a pain animation.
unarmed_melee Set this to 1 when this type of AI doesn't need melee weapons to fight. This is usually true for spiders, undead and such. Humans are wimps and need weapons.
unarmed_ranged Set this to 1 when this type of AI doesn't need weapons for ranged combat. This is usually true for belchers.
Interactions
blind_time The time span in seconds the AI is staying in 'blinded' state when hit by a flashbomb or -mine.
blind_time_fuzziness his is the random portion of 'blind_time'. A value in [blind_time-fuzziness ... blind_time+fuzziness] is chosen.
can_be_flatfooted If set to true, the AI becomes flat-footed in certain combat situations. This means they're unable to run at the player, but can still turn to face the player.
can_drown If true, the AI will drown if it gets under water, either by walking in or by being dropped in unconsciously. Set to '0' to make them breathe under water.
canlighttorches AI ability to switch on torches
canoperatedoors AI ability to handle doors
canoperateelevators AI ability to handle elevators
canoperateswitchlights AI ability to operate light switches
cansearch Whether the AI can conduct a search or not
cansearchcooperatively ability to participate in a coordinated search
flatfooted_time The duration in milliseconds that this AI remains flat footed after a combat action triggers this state.
gas_immune 0 = not immune, 1 = immune to gas
ko_alert_immune If true, the AI is immune to knockouts when alerted at or above the alert state defined in 'ko_alert_state'.
ko_alert_immune_state Alert state number at which immunity behavior changes.
ko_alert_state Alert state number at which knockout behavior changes.
ko_angle_alert_horiz Horizontal knockout cone angle when the AI is alerted at or above 'ko_alert_state'.
ko_angle_alert_vert Vertical knockout cone angle when the AI is alerted at or above 'ko_alert_state'.
ko_angle_horiz Defines a horizontal cone angle extending backwards from the direction AI is looking. Anywhere within this cone and the vertical cone is a valid KO.
ko_angle_vert Defines a vertical cone angle extending backwards from the direction AI is looking. Anywhere within this cone and the horizontal cone is a valid KO.
ko_immune 0 = not immune, 1 = immune to blackjack
ko_rotation A vector of 3 space-delimited angles applied to rotate the AI's blackjack acceptance cone relative to their head joint. For most heads, the angles are: yaw pitch roll.
ko_spot_offset Defines the center of the head for knockout testing purposes. Vector offset from the head attachment joint to the desired head center point. The possible knockout cone extends back from this point.
ko_zone Name of the damage zone that must be hit for a possible knockout. Set this blank (i.e. : 'ko_zone' ) to make the AI immune to KOs from the blackjack.
pickpocket_alert Incremental alert value to be added to an AI's current alert level
pickpocket_delay_max Maximum delay before reacting to a picked pocket in milliseconds
picpocket_delay_min Minimum delay before reacting to a picked pocket in milliseconds
push_player Set this to 1 to let this entity push the player (default is 0).
sneak_attack_alert_state Alert state number at which the AI can no longer be sneak attacked.
sneak_attack_mult Damage multiplier applied to ALL damage when AI is damaged at an alert level below that defined in 'sneak_attack_alert_state'.
AI perception
acuity_aud AI aural acuity (in percent)
acuity_env AI environmental acuity. How sensitive the AI is to things that have changed in its environment.
acuity_other AI generic acuity for scripted events. You can call this alert type on an entity with entity.Alert( <char *type>, <float amount>). This will alert the entity by amount * acuity_other in your script.
acuity_tact AI tactile acuity (in percent)
acuity_vis AI visual acuity (in percent)
alert_aud_thresh Threshold of audibility for the AI. This is in dB of sound pressure level (SPL). The real life value for humans is around 20 (a barely heard whisper). Changing this by even 0.1 has a large effect on sound propagation behavior, because propagated sounds below this volume are not heard at all. NOTE if this is not set, it gets the value from soundprop global settings.
chancenoticeblood Chance to notice the visual stim of blood
chancenoticebrokenitem Chance to notice the visual stim of a broken item
chancenoticedoor Chance to notice the visual stim of an open door that should be closed
chancenoticelight Chance to notice the visual stim of a light that should be on
chancenoticemissingitem Chance to notice the visual stim of a missing item
chancenoticemonster Chance to notice the visual stim of a monster
chancenoticeperson Chance to notice the visual stim of other persons
chancenoticepickedpocket Chance to notice that an object bound to the AI has been stolen
chancenoticerope Chance to notice the visual stim of a rope created by a rope arrow
chancenoticesuspiciousitem Chance to notice the visual stim of suspicious items
chancenoticeundead Chance to notice the visual stim on an undead
chancenoticeweapon Chance to notice the visual stim of suspicious weapons
drunk_acuity_factor If the AI is drunk, their acuities (visual, hearing, tactile) will be reduced by this factor.
fov Full field of view in degrees. Will be used for both horizontal and vertical fov unless vertical is explicitly specified.
fov_rotation A vector of 3 space-delimited angles applied to rotate the AI's field of view relative to their head joint. For most heads, the angles are: yaw pitch roll.
fov_vert Full vertical field of view in degrees. Leave blank or set to -1 to use the same value as the horizontal fov.
headturn_chance_idle The chance for random head turning while idle (0 0-1 0)
headturn_factor_alerted The headturning chance gets multiplied by this amount when the AI is alerted
Other
ignore_alerts ignores alerts; melee trainer only
is_civilian If true, the AI is a civilian. Defaults to 0.
is_mantleable If set to 1, this entity is not mantleable by the player. Defaults to 0.
move_speed The movement speed of AIs is dependent on their animations and animation rate. The animation rate can be changed with the anim_rate_X (X = animation name).
stamina Determines how long the player can run. I have found this only for the player, not for AI.
team Monsters do not actively attack players or monsters with the same team number. For common team numbers see AI Relations (Editing).

Human AIs

Human AIs are somewhat special as the spawnargs are defined by the entity definition as well as the definition of the head. This leads to a great number of combinations and is the reason that heads are discussed here as well as the various human classes. In order to make this article as clear as possible, in the first table the base values for human AIs are stated. In the class specific tables only changes to these base values are listed.

Base Values

This table lists all base values for human AIs in alphabetical order.

Humanoid AIs
Spawnarg Base Value
acuity_aud 100
acuity_env 100
acuity_other 100
acuity_tact 100
acuity_vis 100
alert_aud_thresh 18.8
armor variable
attack_accuracy 2.3
attack_cone 70
bleed 1
blind_time 8
blind_time_fuzziness 4
can_be_flatfooted 1
can_drown 1
canlighttorches 1
canoperatedoors 1
canoperateelevators 1
canoperateswitchlights 1
cansearch 1
cansearchcooperatively 1
chancenoticeblood 1.0
chancenoticebrokenitem 1.0
chancenoticedoor 1.0
chancenoticelight 0.9
chancenoticemissingitem 1.0
chancenoticemonster 1.0
chancenoticeperson 1.0
chancenoticepickedpocket 0.5
chancenoticerope 1.0
chancenoticesuspiciousitem 1.0
chancenoticeundead 1.0
chancenoticeweapon 1.0
damage 34
damage_zone head, chest, torso_low, left_arm, right_arm, legs
damage_scale head 2
damage_scale chest 1.5
damage_scale torso_low 1.0
damage_scale left_arm 0.3
damage_scale right_arm 0.3
damage_scale legs 0.4
def_melee_set variable
drunk_acuity_factor 0.5
fov 150
fov_rotation 0 -20 0
fov_vert 120
gas_immune 0
headturn_chance_idle 0.3
headturn_factor_alerted 2
health variable
health_critical 15
is_civilian 0
is_mantleable 0
ko_alert_immune 0
ko_alert_immune_state 5
ko_alert_state 4 (as soon as weapon is drawn)
ko_angle_alert_horiz 110
ko_angle_alert_vert 180
ko_angle_horiz 360
ko_angle_vert 360
ko_immune 0
ko_rotation 0 0 0
ko_spot_offset 2 -2.5 0
ko_zone head
melee_damage variable
melee_damage_mod 0.6 - 1.4
melee_predicts_proximity 1
melee_predicted_attack_time 750
melee_range 0
melee_rep_attack_time 10000
outofreach_projectile_delay_max 7.0
outofreach_projectile_delay_min 10.0
outofreach_projectile_enabled 1
pain_threshold 1
pickpocket_alert 0
pickpocket_delay_max 25000
picpocket_delay_min 5000
push_player
sneak_attack_alert_state 2
sneak_attack_mult 2.0
stamina player only
team variable
unarmed_melee 0
unarmed_ranged 0

Heads

The heads mainly influence the cones of the field of vision and the ko volume. Please note that even though many AIs wear helmets, only the one with neck protecting elite helmets (see Heads Available for AI) are in general immune to being knocked out.

Heads
Spawnarg

Builders

Guards

Mages

Moors

Pagans

Thieves

Townsfolk

Non-human AIs

Monster

Steambots

Undead