Skip to content

Preserve main skill selection across character reimports - #10203

Open
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/10199-preserve-main-skill-reimport
Open

mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/10199-preserve-main-skill-reimport

Conversation

@mcagnion

@mcagnion mcagnion commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

After a character reimport with "Delete skills" ticked, the build's main skill can switch to an unrelated skill. This happens when the reimport changes the main socket group, for example a support gem added or removed: the group no longer matches its saved key, so mainSocketGroup keeps its old index. If the group order also changed, that index now points at another group. Calculations then use the wrong skill; one visible effect is DPS-based item sorting that looks alphabetical (item sorting itself is unchanged here).

When the exact match fails, the previous main group is now found by its source skill, preferring its previous equipment slot, and its selected active effect is restored, including effects granted by supports. Groups that still match exactly are restored as before. If the source skill is gone, the existing main-group guess is used. If several changed groups in the same slot hold the same source skill, the first one is selected.

Steps taken to verify a working solution:

  • Regression tests for a changed support, reordered groups, the same skill in another slot, and removal of the previous main skill.
  • Regression test for a support-granted active skill (Prismatic Burst Support).
  • Not reproduced in the app: that needs a character whose main socket group changes between two imports.

Found while investigating #10199; the case reported there is not fixed by this PR.

@mcagnion
mcagnion force-pushed the bugfix/10199-preserve-main-skill-reimport branch 2 times, most recently from 9068e35 to 5d5ad59 Compare August 12, 2026 22:02
Keep exact state matching for unchanged groups. When a group's gems change, relocate it by source skill and preferred slot, then restore the selected active effect after its skill list is rebuilt. Use the existing group guess only when the source skill disappears.

Addresses issue 10199.
@mcagnion
mcagnion force-pushed the bugfix/10199-preserve-main-skill-reimport branch from 5d5ad59 to e6cf234 Compare August 22, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant