PathOfBuildingCommunity / PathOfBuilding

Offline build planner for Path of Exile.
https://pathofbuilding.community
Other
4k stars 2.08k forks source link

Copy/Pasting items from the game results in massively bloated stats. #2684

Open ghost opened 3 years ago

ghost commented 3 years ago

For instance a rare body armor with +93 to maximum life ends up with +9395 to maximum life when pasted into PoB. So obviously the various calculations (total life, dps etc) get messed up.

Using 2.3.0. The issue was there even before that version, however.

example

QuickStick123 commented 3 years ago

I can't seem to replicate this (2.3.0) could you try to provide more information and maybe a Pastebin link to a build it occurs on.

zao commented 3 years ago

I could reproduce it when copying an item with Ctrl-Alt-C in PoE, as that leverages the new functionality in 3.14 to copy advanced mod descriptions. It seems to be picking up the value range for the stats, the appended digits is approximately the average of its range.

image

Ctrl-C:

Item Class: Boots
Rarity: Rare
Corpse Hoof
Wyrmscale Boots
--------
Armour: 92
Evasion Rating: 108 (augmented)
--------
Requirements:
Level: 51
Str: 48
Dex: 48
--------
Sockets: R-R-B-R 
--------
Item Level: 58
--------
6% increased Movement Speed if you haven't been Hit Recently (enchant)
--------
+12 to Dexterity
+16 to Evasion Rating
+99 to maximum Life
+28% to Lightning Resistance
30% increased Movement Speed
+26% to Fire Resistance (crafted)

Ctrl-Alt-C:

Item Class: Boots
Rarity: Rare
Corpse Hoof
Wyrmscale Boots
--------
Armour: 92
Evasion Rating: 108 (augmented)
--------
Requirements:
Level: 51
Str: 48
Dex: 48
--------
Sockets: R-R-B-R 
--------
Item Level: 58
--------
6% increased Movement Speed if you haven't been Hit Recently
(Recently refers to the past 4 seconds) (enchant)
--------
{ Prefix Modifier "Virile" (Tier: 2) — Life }
+79(70-79) to maximum Life
{ Prefix Modifier "Cheetah's" (Tier: 2) — Speed }
30% increased Movement Speed
{ Prefix Modifier "Flea's" (Tier: 2) — Life, Defences }
+16(14-20) to Evasion Rating
+20(18-23) to maximum Life
{ Suffix Modifier "of the Mongoose" (Tier: 9) — Attribute }
+12(8-12) to Dexterity
{ Suffix Modifier "of the Thunderhead" (Tier: 5) — Elemental, Lightning, Resistance }
+28(24-29)% to Lightning Resistance
{ Master Crafted Suffix Modifier "of Craft" (Rank: 2) — Elemental, Fire, Resistance }
+26(21-28)% to Fire Resistance (crafted)
ghost commented 3 years ago

I could reproduce it when copying an item with Ctrl-Alt-C in PoE, as that leverages the new functionality in 3.14 to copy advanced mod descriptions. It seems to be picking up the value range for the stats, the appended digits is approximately the average of its range.

Ah. I figured it out. The reason this was happening for me even when using Ctrl-C was that I rebound 'Highlight items and objects' to Ctrl at some point. Basically when I was doing Ctrl-C, I was tapping into the new 3.14 Ctrl-Alt-C functionality inadvertently.

Can probably safely close this issue. Sorry for the confusion!

zao commented 3 years ago

Good that you've found the root cause, until advanced mod descriptions are implemented in PoB it's probably best to ensure that your copy shortcut doesn't include advanced mod descriptions.

For anyone curious, the reason it's sneakily evaluating as a range is that the parenthesis are detected as a range at: https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/793399fc30ff0a59edab7f970781094c484d50ff/src/Classes/Item.lua#L415-L416 Getting a default range spec of 0.5 at: https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/793399fc30ff0a59edab7f970781094c484d50ff/src/Classes/Item.lua#L460 Finally having the range spec applied in BuildModList at: https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/793399fc30ff0a59edab7f970781094c484d50ff/src/Classes/Item.lua#L1091-L1106

Gnomiro commented 3 years ago

Having similar problems as I also use ctrl for advanced modifications. Is there currently any work on this? A relatively easy workaround would could probably be based on the {}-brackets which are, as far as I know, only used in advanced mod descriptions. If any of them are present the ()-brackets could be skipped or interpreted differently.

If no one is working on it I maybe will have a look at it later this week.

Wires77 commented 3 years ago

Having similar problems as I also use ctrl for advanced modifications. Is there currently any work on this? A relatively easy workaround would could probably be based on the {}-brackets which are, as far as I know, only used in advanced mod descriptions. If any of them are present the ()-brackets could be skipped or interpreted differently.

If no one is working on it I maybe will have a look at it later this week.

Unfortunately, PoB also uses curly brackets internally to give lines a special designation. I do want to support advanced mod descriptions, and it's probably not worth excluding them unless we're adding support for them at the same time.

SnosMe commented 3 years ago

It looks like PoB always places additional info on same line

{crafted}Allocates Adder's Touch
{tags:resource,life}{range:0.5}Regenerate (1.2-1.6)% of Life per second

while the text from game has one { in the beginning of line and one } at the end, so you can clearly distinguish between them.

{ Suffix Modifier "of the Mongoose" (Tier: 9) — Attribute }
+12(8-12) to Dexterity