Generate Foulborn uniques programmatically from ModFoulbornMap#9478
Open
EtherealCarnivore wants to merge 5 commits intoPathOfBuildingCommunity:devfrom
Open
Generate Foulborn uniques programmatically from ModFoulbornMap#9478EtherealCarnivore wants to merge 5 commits intoPathOfBuildingCommunity:devfrom
EtherealCarnivore wants to merge 5 commits intoPathOfBuildingCommunity:devfrom
Conversation
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.
Author
Manual GUI Testing CompleteTested in PoB on Windows with ~20 items across different categories plus Skin of the Lords:
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. |
Add cached mod parse results for all Foulborn mutation mods that appear on generated Foulborn unique items.
Export script that dumps ModEquivalencies.dat rows to check if MutatedUnique mod pairings are stored there. If they are, we can automate Foulborn original↔mutation mod pairing instead of maintaining a manual table.
Instead of appending mutation mods as variants to the original's base mods, the new logic properly replaces specific original mods with their Foulborn mutations -- matching the actual in-game behavior. Key changes: - Add ModFoulbornPairs.lua: mutation slot pairing table (239 uniques) extracted from PR PathOfBuildingCommunity#9432's static item data, defining which original mods get removed and what replaces them per mutation slot - Rewrite Generated.lua Foulborn block: for each unique, enumerate all non-empty subsets of mutation slots (2^n - 1 items per unique), remove matched mods and add mutated replacements with "(mutated)" suffix - Add warning system: ConPrintf flags uniques in ModFoulbornMap that lack pairing data in ModFoulbornPairs (22 uniques currently) - Update tests: 14 tests covering item count (437), per-unique counts, mod replacement verification, implicit handling, Skin of the Lords - Remove dumpModEquivalencies.lua (no longer needed) Total: 437 generated Foulborn items with correct replacement semantics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.luadata and the established pattern inGenerated.lua(same approach as Paradoxica, Watcher's Eye, Forbidden Flame/Flesh, etc.).item.foulborndetection and threshold counting work without changesChanges
src/Modules/Data.lua— LoadfoulbornMapbeforeGenerated.luaruns (1 line)src/Data/Uniques/Special/Generated.lua— Foulborn generation loop +buildFoulbornSkinOfTheLords()for the tree-dependent casespec/System/TestFoulborn_spec.lua— 9 tests covering generation, parsing, variants, implicits, alt variantsTotal: ~370 lines added (vs ~5768 in #9432)
Test plan