Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Scanner Stops Scan Prematurely When Min Level and Rarity Are Set #392

Closed
5 of 8 tasks
juuyokka opened this issue Oct 15, 2022 · 7 comments
Closed
5 of 8 tasks
Labels
bug Something isn't working

Comments

@juuyokka
Copy link

Current Behavior

If you set the minimum artifact level and rarity, it's possible that the scanner stops prematurely. As implemented now, the scanner will stop as soon as it encounters an artifact whose level OR rarity is below the minimum set by the user.

image

In this case, if the minimum rarity is set to 5, the scanner will stop when it reaches an artifact with rarity 4.

Expected Behavior

The scanner continues to scan

Reproducing a Behavior

  1. Set the minimum artifact rarity to 5 and the minimum level to 4.
  2. Ensure that you have 4 star artifact whose level is above 4.
  3. Use the scanner to scan artifacts.

Device OS

Windows 10

Genshin Impact Version

3.1

Inventory Kamera Version

1.3.0

Screen resolution, screen mode, and UI scale

1920x1080 windowed

Additional notes and remarks

The scanner should stop when it encounters an artifact whose level AND rarity is below the minimum set by the user. Any artifacts whose level OR rarity is below should be skipped but should not cause the scan to end. I haven't tested this with weapons but I'd imagine that if the issue is present for artifacts it should be also present for weapons as well.

Evidence

No response

Preflight Checklist

  • I have checked for similar issues in the issue page, and I have not found any similar to mine.
  • I am using the latest version of the scanner.
  • I tried setting the scanning delay to maximum, and it still doesn't work.
  • I have attached the video recording to the bug report.
  • I have attached the error log to the bug report.
  • I am available to later explains the issue.
  • I have disabled all screen filtering software or plugins (i.e. HDR, Image Sharpening) while scanning.
  • I use default in-game keybindings or have configured keybindings for the scanner.
@juuyokka juuyokka added the bug Something isn't working label Oct 15, 2022
@juuyokka
Copy link
Author

It looks like the code causing this behavior is here.

StopScanning = StopScanning || GetRarity(name) < Properties.Settings.Default.MinimumArtifactRarity;
StopScanning = StopScanning || ScanArtifactLevel(level) < Properties.Settings.Default.MinimumArtifactLevel;

Here is the analogous code for weapon scanning.

StopScanning = StopScanning || GetRarity(name) < Properties.Settings.Default.MinimumWeaponRarity;
StopScanning = StopScanning || ScanLevel(level, ref a) < Properties.Settings.Default.MinimumWeaponLevel;

@Cupcak3
Copy link
Collaborator

Cupcak3 commented Nov 3, 2022

This should be fixed in V1.3.1

@NNowakowski
Copy link

NNowakowski commented Nov 3, 2022

The new behaviour is imho worse than what was described here. It's not possible anymore to only use the min rarity filter now to for example stop after it went through all 5+4 star artifacts/weapons as described in #395. The scanner will now scan through all 2000 weapons/artifacts and never stop the scan if you specify rarity 4 level 1/0 which requires minutes of scanning especially on the weapons side and that's with the fast scan method. Before it would correctly stop as soon as it encountered the first 3 star rarity.

From what I can gather from this bug report, this bug was only possible because @juuyokka used the non-default sort of Level instead of the default sort of Rarity.

@Nikolas-VIII
Copy link
Contributor

Also, with the new behavior, the filtered out artifacts do still end up in the json file. So the filters do effectively not work anymore.

@Thaddaios94
Copy link

Thaddaios94 commented Nov 9, 2022

I tried this at the default settings, then also tried lowering the min artifact rarity, both gets the same result. This is the error log I'm getting when scanning artifacts:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at InventoryKamera.ArtifactScraper.ScanArtifacts(Int32 count)
at InventoryKamera.InventoryKamera.GatherData()

@juuyokka
Copy link
Author

juuyokka commented Nov 9, 2022

From what I can gather from this bug report, this bug was only possible because @juuyokka used the non-default sort of Level instead of the default sort of Rarity. @NNowakowski

if (minLevel >= 1)
{
Logger.Debug("Sorting by level to optimize total scan time");
// Check if sorted by level
// If not, sort by level

Level sorting is set automatically by Inventory Kamera when the minimum artifact level is set.

@Cupcak3
Copy link
Collaborator

Cupcak3 commented Nov 21, 2022

This issue should be fixed in v1.3.2

@Cupcak3 Cupcak3 closed this as completed Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants