Fix rounding of scaled mods being incorrect in some cases#8862
Merged
LocalIdentity merged 2 commits intoPathOfBuildingCommunity:devfrom Jul 21, 2025
Merged
Fix rounding of scaled mods being incorrect in some cases#8862LocalIdentity merged 2 commits intoPathOfBuildingCommunity:devfrom
LocalIdentity merged 2 commits intoPathOfBuildingCommunity:devfrom
Conversation
Wires77
commented
Jul 18, 2025
| end | ||
|
|
||
| function ModListClass:MergeMod(mod) | ||
| if mod.type == "BASE" or mod.type == "INC" then |
Member
Author
There was a problem hiding this comment.
I felt this was safe because the only places we merge mods are places that don't even have MORE modifiers, let alone multiple. If we end up being able to scale an item that has 2+ more multipliers of the same type though, we should revisit this to make sure it's accurate
Wires77
commented
Jul 18, 2025
Comment on lines
+1059
to
+1064
| local scaledList = new("ModList") | ||
| scaledList:ScaleAddList(combinedList, scale) | ||
| for _, mod in ipairs(scaledList) do | ||
| combinedList:MergeMod(mod) | ||
| end | ||
| env.itemModDB:AddList(combinedList) |
Member
Author
There was a problem hiding this comment.
I duplicated this logic for the gloves even though it's not technically necessary. We should have this logic for all item scaling too for future proofing, most likely
LocalIdentity
approved these changes
Jul 21, 2025
LocalIdentity
pushed a commit
to PathOfBuildingCommunity/PathOfBuilding-PoE2
that referenced
this pull request
Aug 29, 2025
LocalIdentity
added a commit
to PathOfBuildingCommunity/PathOfBuilding-PoE2
that referenced
this pull request
Aug 29, 2025
PathOfBuildingCommunity/PathOfBuilding#8862 PathOfBuildingCommunity/PathOfBuilding#8772 PathOfBuildingCommunity/PathOfBuilding#8754 PathOfBuildingCommunity/PathOfBuilding#8739 Co-authored-by: LocalIdentity <localidentity2@gmail.com>
Paliak
added a commit
to Paliak/PathOfBuilding
that referenced
this pull request
Aug 31, 2025
Mostlikely caused PathOfBuildingCommunity#8862
Paliak
added a commit
to Paliak/PathOfBuilding
that referenced
this pull request
Aug 31, 2025
Most likely caused by PathOfBuildingCommunity#8862
Tonkat
pushed a commit
to Tonkat/PathOfBuilding-PoE2
that referenced
this pull request
Sep 1, 2025
PathOfBuildingCommunity/PathOfBuilding#8862 PathOfBuildingCommunity/PathOfBuilding#8772 PathOfBuildingCommunity/PathOfBuilding#8754 PathOfBuildingCommunity/PathOfBuilding#8739 Co-authored-by: LocalIdentity <localidentity2@gmail.com>
github-actions bot
pushed a commit
to PathOfBuildingCommunity/PathOfBuilding-PoE2
that referenced
this pull request
Dec 15, 2025
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.
Fixes #8860 .
Description of the problem being solved:
The way scaling mods on items seems to work in game is that the mod is scaled, rounded towards 0, then added to the existing mod. i.e. mod + truncate(mod * scale) vs. truncate(mod * (1 + scale))
This is really only seen when the scalar is below 1, which only happens for Runegraft of the Bound (that I could tell)
Steps taken to verify a working solution:
Note that I only fixed this for Runegraft of the Bound, because this seems to only apply for scaling item effects. I also tested Mistress of Sacrifice with 25% Bone Offering and it gave 12% block in game. That doesn't match our formula above, so I didn't change the
ScaleAddModitself.Link to a build that showcases this PR:
Before screenshot:
After screenshot: