Skip to content

Comments

Generate Foulborn uniques programmatically from ModFoulbornMap#9478

Open
EtherealCarnivore wants to merge 2 commits intoPathOfBuildingCommunity:devfrom
EtherealCarnivore:foulborn-generated-uniques
Open

Generate Foulborn uniques programmatically from ModFoulbornMap#9478
EtherealCarnivore wants to merge 2 commits intoPathOfBuildingCommunity:devfrom
EtherealCarnivore:foulborn-generated-uniques

Conversation

@EtherealCarnivore
Copy link

@EtherealCarnivore EtherealCarnivore commented Feb 21, 2026

Summary

Alternative to #9432. Instead of duplicating every unique as static files (+5768 lines), this generates all ~245 Foulborn items programmatically using the existing ModFoulbornMap.lua data and the established pattern in Generated.lua (same approach as Paradoxica, Watcher's Eye, Forbidden Flame/Flesh, etc.).

  • Each Foulborn unique becomes a separate generated item (e.g., "Foulborn Alpha's Howl")
  • Variants represent different possible Foulborn mutation mods — user picks which mutation via the variant dropdown
  • Base mods are copied from the original unique (using "Current" variant for multi-variant items)
  • Skin of the Lords uses alt variant to allow selecting both keystone and Foulborn mutation
  • Existing item.foulborn detection and threshold counting work without changes

Changes

  • src/Modules/Data.lua — Load foulbornMap before Generated.lua runs (1 line)
  • src/Data/Uniques/Special/Generated.lua — Foulborn generation loop + buildFoulbornSkinOfTheLords() for the tree-dependent case
  • spec/System/TestFoulborn_spec.lua — 9 tests covering generation, parsing, variants, implicits, alt variants

Total: ~370 lines added (vs ~5768 in #9432)

Test plan

  • Docker test suite: 204/204 passing (0 failures)
  • 9 Foulborn-specific tests covering:
    • Item count (245 generated)
    • Raw text structure (base type, variants, requires, implicits)
    • Item parser integration (foulborn flag, baseName, title, variantList)
    • Multi-variant originals (The Formless Flame → Current variant base)
    • Implicit handling (Call of the Brotherhood)
    • No empty base types across all generated items
    • Skin of the Lords alt variant (keystone + mutation dropdowns)
  • Manual GUI testing in PoB (equip items, switch variants, threshold mechanics)

Instead of duplicating every unique as separate entries in a new
Data/Uniques/Foulborn/ directory (+5768 lines), generate Foulborn
items in Generated.lua using the existing ModFoulbornMap data.

Each Foulborn unique becomes a separate generated item where variants
represent different possible Foulborn mutations. This follows the
same pattern used for Paradoxica, Watcher's Eye, and other generated
uniques.

- Load data.foulbornMap in Data.lua before Generated.lua runs
- Parse each original unique's current variant (base, requires,
  implicits, mods) and combine with Foulborn mutation mods
- Generates 244 Foulborn items from the existing map data
- Existing foulborn detection (Item.lua) and counting (CalcSetup.lua)
  work without changes
Skin of the Lords is a tree-dependent generated unique, so it's built
separately in buildFoulbornSkinOfTheLords() called from
buildTreeDependentUniques(). Uses alt variant to give users two
dropdowns: one for keystone selection, one for Foulborn mutation.
@EtherealCarnivore
Copy link
Author

Manual GUI Testing Complete

Tested in PoB on Windows with ~20 items across different categories plus Skin of the Lords:

  • Item browser: Foulborn items appear correctly when searching "Foulborn"
  • Variant dropdown: Switching between Foulborn mutation variants updates the tooltip and calcs
  • Base types: Correct base types for helmets, rings, body armour, etc.
  • Implicits: Ring implicits display correctly (e.g., Foulborn Call of the Brotherhood)
  • Skin of the Lords: Both dropdowns work — keystone selection + Foulborn mutation selection via alt variant
  • Threshold mechanics: Equipping 4+ Foulborn uniques activates threshold bonuses as expected
  • No regressions: Non-Foulborn uniques unaffected

Combined with the automated test suite (204/204 passing, 9 Foulborn-specific tests validating all 245 generated items), this covers both structural correctness and runtime behavior.

@Nightblade Nightblade added the enhancement New feature, calculation, or mod label Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants