module

PF2E Autoloot

Endorsements
0
Installs
0.34%
Comments
0
Latest version2.5.1
Minimum Core
Compatible Core
Last updated1 month ago
Created11 months ago
Authors
Languages English
Español
French
Polish
Systems Pf2e
Sf2e
Project source Project URL

PF2e Autoloot

A lightweight Foundry VTT module for Pathfinder 2e that automatically populates loot containers as you open or reroll them. It uses smart budgets based on party level, rarity-weighted selection, and configurable rules per container type. (Heavely based on BG3 loot system).

Features

  • Detects container type by name: Barrel / Crate / Chest / Pouch / Stash.

  • Configurable chance to be empty per type.

  • Budget scales with average party level and a tunable budgetFraction.

  • Rarity-weighted selection (customizable weight map).

  • Quantity-aware picking that tries to fit budget and favors stacks for consumables/ammo.

  • Unique item registry to avoid duplicating the same unique across rolls.

  • Optional KCTG compendium integration for flavor items.

  • “Roll Loot” button on loot sheets; auto-generation on open (toggleable).

How loot is calculated

  1. Determine container type by name (Five tiers Barrel/Crate/Chest/Pouch/Stash).

  2. Apply chance of being empty (config).

  3. Calculate average party level and gp budget = TotalValue(level) * budgetFraction.
    Based on the PF2e Loot table

  4. Filter candidates according to rules and cache.

  5. Choose X types (according to count-*), weighted by rarity.

  6. For each item chosen:

    • Read price in gp (supports { gp, sp, cp, pp }).

    • Choose quantity in 1 to maxStack without exceeding the remaining budget.

    • Create items and set flags to not roll again for the container.

Installation

  1. Install via Foundry’s Add-on Modules using this repo’s manifest URL.

  2. Enable PF2e Autoloot in your world.

  3. (Optional) Point the module to your preferred equipment and KCTG compendia in settings.

Usage

  • Create/open a loot actor named like a target type (e.g.,  “Chest”, “Crate”, “Barrel”, “Pouch”, “Stash”).

  • Open the sheet to auto-generate loot, or click Roll Loot to reroll.

  • Adjust budgets, rarity weights, stack caps, and empty chances in Module Settings.

Notable Settings

  • Name patterns per type (regex), e.g. (Chest|Cofre).

  • Empty chance per type.

  • Count range per type (count-*).

  • Budget fraction (portion of PF2e treasure by level).

  • Rarity weights JSON.

  • Max stack and Favor quantity toggle.

  • Level offsets for crates/chests/stashes.

Compatibility

  • System: Pathfinder 2e or Starfinder 2e for Foundry VTT.

  • Works with PF2e equipment SRD compendium; optionally mixes in KCTG items for ambience.

Credits

  • Inspired by BG3-style loot pacing.

  • Budgeting guided by the official PF2e Treasure by Level table.

  • Thanks to the PF2e & Foundry communities for the amazing ecosystem.

Subscribe
Notify of
0 Comments
0
Would love your thoughts, please comment.x
()
x