Skip to content

Weapon/enemy-aware ADS vs hip-fire #41

Description

@hummat

Problem

Vanilla bot ADS behavior is entirely static: ranged_gestalt is set once at spawn from the bot profile (always killshot for all vanilla profiles) and never changes. The bot either ADS's or doesn't based on ally proximity/aid checks — with zero awareness of weapon type or enemy type.

This means:

  • A bot with a shotgun ADS's the same as a bot with a lasgun (unnecessary aim delay for close-range weapons)
  • A bot shooting a distant sniper behaves identically to one mag-dumping a charging Plague Ogryn (no fire cadence adaptation)
  • Only two gestalt_behaviors exist in bot_actions.lua: killshot (wants_aim = true) and none (no ADS). No intermediate modes.

Current flow

bot_behavior_extension._init_blackboard_components()
  → behavior_component.ranged_gestalt = gestalts.ranged   (static, from profile)

bt_bot_shoot_action._should_aim()
  → if ally needs aid → no ADS
  → if ally > 8m → no ADS
  → else → gestalt_behavior.wants_aim   (killshot=true, none=false)

Our #35 fix injected killshot as default for T5/T6 profiles that lack bot_gestalts, so those bots can ADS now — but it's still the same static gestalt for all weapons and enemies.

Desired behavior

Weapon-aware gestalt

Dynamically set ranged_gestalt based on the equipped ranged weapon family:

  • Sniper/lasgun/revolver: killshot (ADS for precision)
  • Shotgun/flamer/stubber: none or a new suppressive gestalt (hip-fire, no aim delay)
  • Plasma/bolter: could go either way depending on range

This could piggyback on the weapon template's existing metadata or use a lookup table keyed by weapon family.

Enemy-aware fire behavior (stretch)

Adapt fire cadence or ADS decision based on target:

  • High-priority ranged target (sniper, gunner) at distance → ADS, single shots
  • Charging melee elite/horde → hip-fire, sustained fire
  • Monster → sustained fire regardless of gestalt

This is more complex and may overlap with #22 (utility-based scoring).

Implementation notes

  • behavior_component.ranged_gestalt is a writable blackboard field — can be swapped dynamically in a hook_safe on bt_bot_shoot_action.enter or in a per-tick hook
  • Would need a weapon family → gestalt mapping table
  • New gestalt_behaviors entries (e.g. suppressive) would need to be added to bot_actions.lua shoot action data
  • Partially overlaps with Player weapon ranged attack_meta_data injection (plasma gun silent fire fix) #31 (ranged attack_meta_data injection) — both are about per-weapon ranged behavior
  • VT2 Bot Improvements did not address this (gestalts were static there too)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: laterPlanned but not urgentarea: bot-behaviorGeneral bot behavior beyond ability activationenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions