Generate Foulborn uniques programmatically from ModFoulbornMap#9478
Open
EtherealCarnivore wants to merge 2 commits intoPathOfBuildingCommunity:devfrom
Open
Generate Foulborn uniques programmatically from ModFoulbornMap#9478EtherealCarnivore wants to merge 2 commits intoPathOfBuildingCommunity:devfrom
EtherealCarnivore wants to merge 2 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. |
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