Skip to content

Deployable crate carry and deploy (ammo + medical) #88

Description

@hummat

Problem

Bots walk past pocketable ammo and medical crates without picking them up. They can only use crates that a human has already deployed — the entire carry-and-deploy flow is player-only.

Darktide's pickup pipeline has three states for these crates:

  1. Pocketable (scripts/settings/pickup/pickups/pocketable/ammo_cache_pocketable_pickup.lua, scripts/settings/pickup/pickups/pocketable/medical_crate_pocketable_pickup.lua) — the map-placed carryable form a player can pick up into their pocket slot
  2. Deployable (scripts/settings/pickup/pickups/deployable/ammo_cache_deployable_pickup.lua, scripts/settings/pickup/pickups/deployable/medical_crate_deployable_pickup.lua) — the interactable station spawned after deploy via spawn_flow_event = "lua_deploy"
  3. Level (scripts/settings/pickup/pickups/level/large_ammunition_crate_pickup.lua) — static map-placed crates (not carryable)

Bots have a full use pipeline for state 2:

  • pickup_component.health_deployable + health_deployable_distance + health_deployable_valid_until (bot_behavior_extension.lua:132-134)
  • _update_health_deployables() (bot_behavior_extension.lua:209, 280)
  • bt_bot_conditions.lua:285 loot_health gate with allowed_to_take_health_pickup
  • Destination priority on the interaction_unit walk path

But zero references in the bot BT to the pocketable state or the deploy action. Bots cannot:

  • Detect a carryable crate on the ground
  • Walk to it, pick it up, stash in pocket
  • Decide when/where to deploy it
  • Fire the use pocketable action to trigger lua_deploy

Why it matters

Solo play consequences:

  • Half the ammo crates on the map are effectively invisible to bots — they'll run dry even with a crate 5 m away
  • Medical crate carry is the main way VT2 bots redistributed healing; in DT bots can't do it at all
  • Humans in solo have to micro-manage crate carrying themselves or accept total waste

Proposed approach

Carry step

Extend _update_health_deployables (or add a parallel _update_carryable_pickups) to scan for pocketable form crates:

  • Detect pocketable group in pickup templates
  • Add carryable_pickup tracking field on pickup_component (pattern matches existing ammo_pickup / health_deployable fields)
  • Set behavior_component.interaction_unit on the closest valid crate when the group needs the resource
  • The interact action and pocket slot insertion are already wired — vanilla humans use the same path

Deploy step

Fire the use pocketable input (same input humans use to deploy) once the bot reaches a good deploy location. Mechanism is trivial once the decision is made.

Deploy-location heuristic (the real work)

This is where the design lives. Candidate signals:

  • Team coherency anchor position
  • Near an objective marker or mission-phase choke
  • When any ally drops below a needs-resource threshold (ammo < 30 %, health < 60 %)
  • On player ping / com-wheel request
  • Mission-end prep points (before boss, before event)

Proposed: deploy when (team has ≥2 allies in coherency AND at least one needs the resource AND no enemies within 15 m) — conservative, avoids wasteful mid-combat deploys.

Post-deploy

Existing pipeline takes over via #39 (healing deferral) and #72 (ammo policy) — nothing new needed on the use side.

Dependency

Requires a shared primitive: bot BT node for picking up pocketable items. This same primitive gates #24's stim usage subsection (see the March 8 audit comment there). Whichever issue ships first should factor this into a reusable module, not a point fix.

Scope split from #24

#24 is about self-use healing resources (medicae station discipline, combat stim timing, giving healing consumables to wounded allies). This issue is about team logistics (carry team resources to good deploy locations, including ammo which has no healing involvement). Different problem shapes, different decision surfaces — but shared pocketable-pickup primitive.

References

  • scripts/extension_systems/behavior/bot_behavior_extension.lua:128-134 — pickup component fields
  • scripts/extension_systems/behavior/bot_behavior_extension.lua:209, 280 — update loop for deployables
  • scripts/extension_systems/behavior/bot_behavior_extension.lua:665, 726-748 — target walk logic for existing pickup types
  • scripts/extension_systems/behavior/utilities/conditions/bt_bot_conditions.lua:245, 285-286 — loot and station conditions
  • scripts/settings/pickup/pickups/pocketable/ — carryable crate templates
  • scripts/settings/pickup/pickups/deployable/ — post-deploy station templates

Complexity

Medium (~3-5 days):

  • Pickup detection + carry state: ~1 day
  • Deploy action wiring: trivial
  • Deploy-location heuristic: 2-3 days (the real design work)
  • Tests + in-game validation: ~0.5 day

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3: backlogNice to have, no timelinearea: bot-behaviorGeneral bot behavior beyond ability activationenhancementNew feature or requestneeds-testingImplemented, awaiting in-game verification

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions