Skip to content

Add support for Renaming, Copying, and Deleting Loadouts#9528

Open
Peechey wants to merge 10 commits intoPathOfBuildingCommunity:devfrom
Peechey:feature/rename-copy-delete-loadouts
Open

Add support for Renaming, Copying, and Deleting Loadouts#9528
Peechey wants to merge 10 commits intoPathOfBuildingCommunity:devfrom
Peechey:feature/rename-copy-delete-loadouts

Conversation

@Peechey
Copy link
Contributor

@Peechey Peechey commented Mar 5, 2026

Description of the problem being solved:

Initial impl for Renaming, Copying, and Deleting Loadouts. Also allows creating a New Loadout from current active sets. There are a lot of changes from over a year of off and on dev so I don't remember everything and I'm gonna comb through it over the next days. Getting eyes on for optimizations, improvements, testing, and other questions about dumb things I'm probably doing.

There is commented code I need to remove, unused variables likely, and more comments to add.

Concerns/Questions for Maintainers

  • Build.lua 324 ish. I'm reusing the copy and kind of delete functions from the SetListControls of each respective type. So I'm basically making headless ListControls every single time we click anything in the Loadouts dropdown. I don't know if that's okay or a performance tank or overall bad but it's there. Maybe I can update it to only create those for when we need them aka when it's one of the functions? This has been updated to only init the ListControls during Copy and Delete.

  • Speaking of Build.lua the Loadout logic is starting to really grow, is there a way to move this to its own file and load it in to Build instead for clarity?

  • The DeleteByIndex functions I made for each ListControl is only because I want one popup confirmation for all 4 deletes and not trigger 4 separate confirmations if I were to call the OnSelDelete of each ListControl. However these are identical functions inside of the popup wrapper, is there a way to reuse OnSelDelete and bypass the confirmation?

Test Cases

For every test, I'm using an exact match Loadout and an identifier Loadout. Double the loadouts, double the fun. I also found a pob with a ton of loadouts that I'm maniacally butchering.

New Loadout

  • Create a new Tree other than Default, verify 2 loadouts exist, Default and newTree -> load newTree -> click New Loadout with existing sets named Loadout 1 -> Expect newTree loadout to disappear and only Default and Loadout 1 to exist as there is no newTree item, skill, config

  • Copy Default loadout 3 times for Loadout 1, Loadout 2, Loadout 3 -> manually change Tree to Loadout 1, Item to Loadout 2, Skill to Loadout 3, and Config to Default -> click New Loadout with existing sets renamed Loadout 4 -> expect new Loadout 4 to exist in the list and the other Loadouts unchanged

Rename Loadout

  • Rename Loadout Default to Loadout 1-> verify only one loadout named Loadout 1 and all sets match the title
  • Create two loadouts, Default and Loadout 1, reorder Tree and Item/Config/Skill Sets so the 2nd loadout's sets are now index 1 -> Rename Loadout 1 to Loadout 2 -> Verify Loadout 1 affected and not Default

Copy Loadout

  • Copy Default loadout, given name Loadout 1 -> verify both Default and Loadout 1 exist and are correctly linked
  • Same as rename, reorder sets among 2+ loadouts -> Copy Loadout 1 to Loadout 2 -> expect Default and Loadout 2
  • From example build, copy Act 1 loadout to Act 1 Copy and verify all sets were perfectly copied, items, skills, etc.
  • From example build copy ???c budget loadout to ???c budget Copy and verify all sets

Delete Loadout

  • Same as rename, reorder sets among 2+ loadouts -> Delete Loadout 1 -> expect Default only to exist
  • Delete Default when it's the only loadout -> verify nothing explodes
  • Delete Act 1 Copy and ???c budget Copy from previous tests :D and make sure the correct loadout was deleted

Misc

  • One tricky scenario involved fresh build -> copy default -> copy default -> rename copy or delete and it was grabbing the wrong Loadout/not the selected Loadout in the dropdown. So I've thrown a lot of combinations together of reordering sets, deleting loadouts, renaming loadouts, making New Loadouts with Existing, and copying loadouts to make sure there isn't some weird behavior after a set number exist
  • With the example build, New Loadout with Existing of multiple different sets and verify the correct sets were copied over
  • Verify EditControls are auto-focused on popup for New Loadout, Rename Loadout, and Copy Loadout
https://pobb.in/T47GaMiKN7pX

After screenshot:

image image image image

Delete has a confirmation
image

image

@Peechey Peechey added wip Unfinished and commited for discussion enhancement New feature, calculation, or mod pob2 Label for features that should be ported over to PoB-PoE2 labels Mar 5, 2026
@Peechey Peechey changed the title [WIP] Add support for Renaming, Copying, and Deleting Loadouts Add support for Renaming, Copying, and Deleting Loadouts Mar 6, 2026
@Peechey Peechey removed the wip Unfinished and commited for discussion label Mar 6, 2026
@Peechey Peechey force-pushed the feature/rename-copy-delete-loadouts branch from 612aa6e to 0e38589 Compare March 6, 2026 13:57
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 pob2 Label for features that should be ported over to PoB-PoE2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant