Skip to content

Dynamic Loot Pools & Tool Update#4

Draft
google-labs-jules[bot] wants to merge 4 commits into
mainfrom
tarkov-dynamic-loot-16686827516742099758
Draft

Dynamic Loot Pools & Tool Update#4
google-labs-jules[bot] wants to merge 4 commits into
mainfrom
tarkov-dynamic-loot-16686827516742099758

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

This change updates the Tarkov loot system to dynamically generate loot pools from installed addons and registered items, rather than using a hardcoded list.

Key changes:

  1. Shared Inventory (sh_tarkov_inventory.lua): Added GetAllTarkovItems() to expose the local ITEMS table.
  2. Server Loot Bridge (sv_tarkov_loot_bridge.lua):
    • Replaced static LOOT_POOLS with BuildLootPools function.
    • Implemented heuristic logic to categorize items into weapons, ammo, gear, medical, etc.
    • Fixed a syntax error in hook.Add and a variable typo.
    • Added InitPostEntity hook to build pools after items are registered.
  3. Loot Tool (tarkov_loot.lua): Added UI buttons for the new loot categories.

This allows the loot system to automatically adapt to the user's installed content and provides more granular control over loot spawning via the tool gun.


PR created automatically by Jules for task 16686827516742099758 started by @Cautioncrazy

…system

- Expose `GetAllTarkovItems` in `sh_tarkov_inventory.lua` to allow server access to item registry.
- Replace hardcoded `LOOT_POOLS` in `sv_tarkov_loot_bridge.lua` with dynamic generation based on item types (Weapons, Ammo, Gear, Medical, Entities, etc.).
- Fix syntax error in `hook.Add` and typo in `LOO_POOLS` in `sv_tarkov_loot_bridge.lua`.
- Update `tarkov_loot.lua` tool to include buttons for new categories: Ammo, Gear, Entities.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

…system

- Expose `GetAllTarkovItems` in `sh_tarkov_inventory.lua`.
- Replace hardcoded `LOOT_POOLS` in `sv_tarkov_loot_bridge.lua` with dynamic generation logic.
- Fix syntax errors (hook arguments, typos) in `sv_tarkov_loot_bridge.lua`.
- Update `tarkov_loot.lua` tool with buttons for new categories (Ammo, Gear, Entities).
- **Dynamic Loot Pools**: Replace hardcoded loot lists with `BuildLootPools`, which auto-categorizes items (Weapons, Ammo, Gear, Medical, Entities) from registered addons.
- **Tool Gun Update**: Add buttons for new categories (Ammo, Gear, Entities) to `tarkov_loot.lua`.
- **Close with E**: Players can now close an open loot container by pressing 'Use' again (with a 0.5s spam delay).
- **Persistence**: Loot containers now correctly remember if a player has searched them, allowing instant re-opening.
- **Fixes**: Corrected Lua syntax error in `sv_tarkov_loot_bridge.lua` and ensured `GetAllTarkovItems` is exposed.
- **Loot Logic**: Implemented dynamic item categorization (weapons, ammo, gear, etc.) from registered addons.
- **Controls**: Restored `Ctrl+Left Click` for quick-moving items (Equip/Loot/Store).
- **QoL**: Implemented "Press E to Close" with spam prevention delay.
- **Bug Fix**: Fixed individual items acting as loot crates by refining entity class checks.
- **Bug Fix**: Added `Think` hook to auto-close inventory when moving away from the cache.
- **Tool**: Updated Admin Tool with new category buttons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant