hostile ![code/modules/mob/living/simple_animal/hostile/hostile.dm 1](git.png)
Vars | |
aggro_vision_range | If a mob is aggro, we search in this radius. Defaults to 9 to keep in line with original simple mob aggro radius |
---|---|
approaching_target | We should dodge now |
attack_all_objects | if true, equivalent to having a wanted_objects list containing ALL objects. |
attack_same | Set us to TRUE to allow us to attack our own faction |
casingtype | set ONLY it and NULLIFY projectiletype, if we have projectile IN CASING |
check_friendly_fire | Should the ranged mob check for friendlies when shooting |
dodge_prob | Probability that we dodge |
dodging | Are we dodging? |
emote_taunt | List of emotes this mob can do when it taunts |
friends | List of mobs this mob is friendly towards |
in_melee | We should sidestep now |
lose_patience_timeout | 30 seconds by default, so there's no major changes to AI behaviour, beyond actually bailing if stuck forever |
lose_patience_timer_id | id for a timer to call LoseTarget(), used to stop mobs fixating on a target they can't reach |
melee_queue_distance | If target is close enough start preparing to hit them if we have rapid_melee enabled |
minimum_distance | Minimum approach distance, so ranged mobs chase targets down, but still keep their distance set in tiles to the target, set higher to make mobs keep distance |
move_to_delay | delay for the automated movement. |
projectilesound | Sound our projectile makes when fired |
projectiletype | set ONLY it and NULLIFY casingtype var, if we have ONLY projectile |
ranged | Does this mob use ranged attacks? |
ranged_cooldown | What the current cooldown on ranged attacks is, generally world.time + ranged_cooldown_time |
ranged_cooldown_time | How long, in deciseconds, the cooldown of ranged attacks is |
ranged_ignores_vision | if it'll fire ranged attacks even if it lacks vision on its target, only works with environment smash |
ranged_message | Fluff text for ranged mobs |
rapid | How many shots per volley. |
rapid_fire_delay | Time between rapid fire shots |
rapid_melee | Number of melee attacks between each npc pool tick. Spread evenly. |
retreat_distance | If our mob runs from players when they're too close, set in tile distance. By default, mobs do not retreat. |
robust_searching | By default, mobs have a simple searching method, set this to TRUE for the more scrutinous searching (stat_attack, stat_exclusive, etc), should be disabled on most mobs |
search_objects | If we want to consider objects when searching around, set this to 1. If you want to search for objects while also ignoring mobs until hurt, set it to 2. To completely ignore mobs, even when attacked, set it to 3 |
search_objects_regain_time | The delay between being attacked and gaining our old search_objects value back |
search_objects_timer_id | Timer for regaining our old search_objects value after being attacked |
sidestep_per_cycle | How many sidesteps per npcpool cycle when in melee |
stat_attack | Mobs ignore mob/living targets with a stat lower than that of stat_attack. If set to DEAD, then they'll include corpses in their targets, if to HARD_CRIT they'll keep attacking until they kill, and so on. |
stat_exclusive | Mobs with this set to TRUE will exclusively attack things defined by stat_attack, stat_attack DEAD means they will only attack corpses |
target | The current target of our attacks, use GiveTarget and LoseTarget to set this var |
targets_from | all range/attack/etc. calculations should be done from the atom this weakrefs, useful for Vehicles and such. |
taunt_chance | Probability that the mob will taunt |
vision_range | How big of an area to search for targets in, a vision of 9 attempts to find targets as soon as they walk into screen view |
wanted_objects | A typecache of objects types that will be checked against to attack, should we have search_objects enabled |
Procs | |
AICanContinue | AI Status |
ListTargets | HOSTILE MOB TARGETING AND AGGRESSION |
death | END HOSTILE MOB TARGETING AND AGGRESSION |
Var Details
aggro_vision_range ![code/modules/mob/living/simple_animal/hostile/hostile.dm 68](git.png)
If a mob is aggro, we search in this radius. Defaults to 9 to keep in line with original simple mob aggro radius
approaching_target ![code/modules/mob/living/simple_animal/hostile/hostile.dm 18](git.png)
We should dodge now
attack_all_objects ![code/modules/mob/living/simple_animal/hostile/hostile.dm 89](git.png)
if true, equivalent to having a wanted_objects list containing ALL objects.
attack_same ![code/modules/mob/living/simple_animal/hostile/hostile.dm 82](git.png)
Set us to TRUE to allow us to attack our own faction
casingtype ![code/modules/mob/living/simple_animal/hostile/hostile.dm 31](git.png)
set ONLY it and NULLIFY projectiletype, if we have projectile IN CASING
check_friendly_fire ![code/modules/mob/living/simple_animal/hostile/hostile.dm 55](git.png)
Should the ranged mob check for friendlies when shooting
dodge_prob ![code/modules/mob/living/simple_animal/hostile/hostile.dm 22](git.png)
Probability that we dodge
dodging ![code/modules/mob/living/simple_animal/hostile/hostile.dm 16](git.png)
Are we dodging?
emote_taunt ![code/modules/mob/living/simple_animal/hostile/hostile.dm 37](git.png)
List of emotes this mob can do when it taunts
friends ![code/modules/mob/living/simple_animal/hostile/hostile.dm 35](git.png)
List of mobs this mob is friendly towards
in_melee ![code/modules/mob/living/simple_animal/hostile/hostile.dm 20](git.png)
We should sidestep now
lose_patience_timeout ![code/modules/mob/living/simple_animal/hostile/hostile.dm 93](git.png)
30 seconds by default, so there's no major changes to AI behaviour, beyond actually bailing if stuck forever
lose_patience_timer_id ![code/modules/mob/living/simple_animal/hostile/hostile.dm 91](git.png)
id for a timer to call LoseTarget(), used to stop mobs fixating on a target they can't reach
melee_queue_distance ![code/modules/mob/living/simple_animal/hostile/hostile.dm 44](git.png)
If target is close enough start preparing to hit them if we have rapid_melee enabled
minimum_distance ![code/modules/mob/living/simple_animal/hostile/hostile.dm 59](git.png)
Minimum approach distance, so ranged mobs chase targets down, but still keep their distance set in tiles to the target, set higher to make mobs keep distance
move_to_delay ![code/modules/mob/living/simple_animal/hostile/hostile.dm 33](git.png)
delay for the automated movement.
projectilesound ![code/modules/mob/living/simple_animal/hostile/hostile.dm 29](git.png)
Sound our projectile makes when fired
projectiletype ![code/modules/mob/living/simple_animal/hostile/hostile.dm 27](git.png)
set ONLY it and NULLIFY casingtype var, if we have ONLY projectile
ranged ![code/modules/mob/living/simple_animal/hostile/hostile.dm 9](git.png)
Does this mob use ranged attacks?
ranged_cooldown ![code/modules/mob/living/simple_animal/hostile/hostile.dm 49](git.png)
What the current cooldown on ranged attacks is, generally world.time + ranged_cooldown_time
ranged_cooldown_time ![code/modules/mob/living/simple_animal/hostile/hostile.dm 51](git.png)
How long, in deciseconds, the cooldown of ranged attacks is
ranged_ignores_vision ![code/modules/mob/living/simple_animal/hostile/hostile.dm 53](git.png)
if it'll fire ranged attacks even if it lacks vision on its target, only works with environment smash
ranged_message ![code/modules/mob/living/simple_animal/hostile/hostile.dm 47](git.png)
Fluff text for ranged mobs
rapid ![code/modules/mob/living/simple_animal/hostile/hostile.dm 11](git.png)
How many shots per volley.
rapid_fire_delay ![code/modules/mob/living/simple_animal/hostile/hostile.dm 13](git.png)
Time between rapid fire shots
rapid_melee ![code/modules/mob/living/simple_animal/hostile/hostile.dm 42](git.png)
Number of melee attacks between each npc pool tick. Spread evenly.
retreat_distance ![code/modules/mob/living/simple_animal/hostile/hostile.dm 57](git.png)
If our mob runs from players when they're too close, set in tile distance. By default, mobs do not retreat.
robust_searching ![code/modules/mob/living/simple_animal/hostile/hostile.dm 64](git.png)
By default, mobs have a simple searching method, set this to TRUE for the more scrutinous searching (stat_attack, stat_exclusive, etc), should be disabled on most mobs
search_objects ![code/modules/mob/living/simple_animal/hostile/hostile.dm 70](git.png)
If we want to consider objects when searching around, set this to 1. If you want to search for objects while also ignoring mobs until hurt, set it to 2. To completely ignore mobs, even when attacked, set it to 3
search_objects_regain_time ![code/modules/mob/living/simple_animal/hostile/hostile.dm 74](git.png)
The delay between being attacked and gaining our old search_objects value back
search_objects_timer_id ![code/modules/mob/living/simple_animal/hostile/hostile.dm 72](git.png)
Timer for regaining our old search_objects value after being attacked
sidestep_per_cycle ![code/modules/mob/living/simple_animal/hostile/hostile.dm 24](git.png)
How many sidesteps per npcpool cycle when in melee
stat_attack ![code/modules/mob/living/simple_animal/hostile/hostile.dm 78](git.png)
Mobs ignore mob/living targets with a stat lower than that of stat_attack. If set to DEAD, then they'll include corpses in their targets, if to HARD_CRIT they'll keep attacking until they kill, and so on.
stat_exclusive ![code/modules/mob/living/simple_animal/hostile/hostile.dm 80](git.png)
Mobs with this set to TRUE will exclusively attack things defined by stat_attack, stat_attack DEAD means they will only attack corpses
target ![code/modules/mob/living/simple_animal/hostile/hostile.dm 7](git.png)
The current target of our attacks, use GiveTarget and LoseTarget to set this var
targets_from ![code/modules/mob/living/simple_animal/hostile/hostile.dm 87](git.png)
all range/attack/etc. calculations should be done from the atom this weakrefs, useful for Vehicles and such.
taunt_chance ![code/modules/mob/living/simple_animal/hostile/hostile.dm 39](git.png)
Probability that the mob will taunt
vision_range ![code/modules/mob/living/simple_animal/hostile/hostile.dm 66](git.png)
How big of an area to search for targets in, a vision of 9 attempts to find targets as soon as they walk into screen view
wanted_objects ![code/modules/mob/living/simple_animal/hostile/hostile.dm 76](git.png)
A typecache of objects types that will be checked against to attack, should we have search_objects enabled
Proc Details
AICanContinue
AI Status
ListTargets
HOSTILE MOB TARGETING AND AGGRESSION
death
END HOSTILE MOB TARGETING AND AGGRESSION