Andrewthe13th / Inventory_Kamera

Scans Genshin Impact characters, artifacts, and weapons from the game window into a JSON file.
MIT License
699 stars 122 forks source link

Decimal values are rounded during the scan #503

Closed dymm2000 closed 9 months ago

dymm2000 commented 10 months ago

Current Behavior

As described in title. Previous version worked well.

Expected Behavior

The scanner continues to scan

Reproducing a Behavior

Scan

Device OS

Windows 10

Genshin Impact Version

4.4

Inventory Kamera Version

1.3.13

Screen resolution, screen mode, and UI scale

1280x720

Additional notes and remarks

No response

Evidence

1

Preflight Checklist

kylelamse commented 10 months ago

Same problem here. I was going crazy wondering why each decimal point was cut off.

pv42 commented 10 months ago

Might be related to the regular expression change in 5ba2fcedcc62c298ba416af047b8e63fc4e4b752 : InventoryKamera/scraping/ArtifactScraper.cs:451

-    Regex re = new Regex(@"([\w]+\W*)(\d+.*\d+)");
+    Regex re = new Regex(@"^(.*?)(\d+)");
BlueSpaceCanary commented 10 months ago

Might be related to the regular expression change in 5ba2fce : InventoryKamera/scraping/ArtifactScraper.cs:451

-    Regex re = new Regex(@"([\w]+\W*)(\d+.*\d+)");
+    Regex re = new Regex(@"^(.*?)(\d+)");

Yeah, comparing the two matching against the string 15.7, the old regex matches the whole string but the new regex only matches the characters before the decimal place.

kylelamse commented 10 months ago

Reverting that line doesn't seem to fix the problem when testing it locally

Rettilaa commented 10 months ago

image Same Issue, numbers after decimal are ignored

exliko commented 10 months ago

up, I have the same problem

BlueSpaceCanary commented 9 months ago

Reverting that line doesn't seem to fix the problem when testing it locally

Reverting both that and the deletion a little further down fixed it for me in a local build

Cupcak3 commented 9 months ago

This is fixed in the latest release