Skip to content

Conversation

@QuickStick123
Copy link
Contributor

@QuickStick123 QuickStick123 commented Apr 15, 2025

Fixes #992

Description of the problem being solved:

As there are now multiple runes of different types it becomes harder to guess the runes used on the item.

This PR aims to solve this issue by generating a minimal combination of runes that meets the stats present on the item. This means it will always generate a set of runes that add to the total if it can, otherwise it won't. This does however mean some runes combinations won't be accurately reflexed as they are ingame e.g.
image
Will get imported as
image
But I think this is a minor issue as it should be right in most cases of people using the runes. But will sometimes get it wrong mostly with runes values that linear combinations of others e.g. if some uses 2 lesser +20 life runes it will always be importer as a single greater +40 life rune.

This approach uses a greedy base, and then performs search on top of it this should avoid efficiencies potentially lost due to inefficiencies, avoid searching duplicate combinations and is constrained as better searches are found. This was made using ChatGPT as a base them modifying it to suit the runes as well as a few optimisations and changes.

Before screenshot:

433126833-1f6c73dd-ef82-4b28-b71f-27eb61a03130 433126839-70f077a5-680c-4dcc-ae31-337ae4134302 433126842-1b96938a-9221-4cf0-97ec-033d6c48d0fb

After screenshot:

image
image
image

@QuickStick123 QuickStick123 marked this pull request as draft April 15, 2025 09:29
@QuickStick123 QuickStick123 marked this pull request as ready for review April 15, 2025 09:58
@QuickStick123 QuickStick123 added the enhancement New feature, calculation, or mod label Apr 15, 2025
@Wires77
Copy link
Member

Wires77 commented Apr 16, 2025

I don't have runes to test with in the latest patch, does this work properly when importing via the API still?

@QuickStick123 QuickStick123 changed the title Add proper support for importing lesser and greater runes Add proper support for pasting items with lesser and greater runes Apr 16, 2025
…fortunately removes the 1 rune type check as I am not confident in it always producing a minimal number of runes. Cause if it doesn't then problems could arise of then not having enough rune slots to find the other runes on the item.
@LocalIdentity LocalIdentity merged commit ecdafa0 into PathOfBuildingCommunity:dev Apr 16, 2025
2 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PoB2 displays the wrong runes when pasting an item with multiple different socketed runes

3 participants