feat: Add NP/Star Conditions, Update Target Dialog, and Skill Priority Drag-Sort on Spam Screen
feat: Add NP/Star Conditions, Update Target Dialog, and Skill Priority Drag-Sort on Spam Screen
[!NOTE] This PR has not been rebased onto the #2076 PR. It was created from upstream/master and manually includes changes equivalent to #2076. Therefore, merging both this PR and #2076 simultaneously may cause conflicts.
- [ ] Bug Fix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
This PR is currently combined into a single one, but if needed, it can be split into separate PRs by the following categories:
bugfix api-utility data core ui
Related Issue
- Fixed #2072 #903 #1048 #1150
Description
-
Added NP conditions to Servant skill settings in Spam mode
- NP is detected using two methods:
- Detect Charged state via the right edge color of the gauge
- Calculate NP value from the gauge length (values above 100 treated as 100)
- NP is detected using two methods:
-
Added Star conditions
- Detect total critical stars using Tesseract OCR
-
Improved skill cooldown detection
- Detect from the color of the bottom frame of skill icons
- Ignore skills under Eternal Sleep, which do not change bottom frame color
-
Added Repeat Until Used option for Kishinami Hakuno’s “Sparks Route ∞”
- Allows skills to be cast multiple times in the same turn
- Loop stops when conditions no longer match or skill goes on cooldown
-
Replaced skill target selection dialog with AutoSkillAction UI
-
Added DragSort at the bottom to adjust skill priority
- Removed dependency on specific layout in the previous implementation
-
Bug Fixes
- Integrated #2076 changes
- Fixed bug where moving DragSortAdapter elements via slide caused order mismatch
Screenshots
-
Spam screen Skill priority drag-sort at the bottom of the screen
-
Spam mode dialog
Shows new condition fields -
Target selection UI AutoSkillAction (directly reused without modification)
-
Cooldown detection (zoomed) Checks whether the mean HSV of the region is within the HSV range
-
NP Charged detection (zoomed) Checks whether the mean HSV of the region is within the HSV range
-
NP Visual bar detection (zoomed) Checks 1×8 pixels per column for HSV range and measures bar length to determine NP value
-
Critical Star OCR detection & normalized image (zoomed)
Testing Notes
- Star condition OCR works correctly in all languages
- In Simplified Chinese version, 1 may be recognized as 4; does not break logic since only 10 and 50 stars are used
- Cooldown and NP detection verified in all languages
- Tested using LDPlayer screenshots and Python scripts Python script for Cooldown detection Python script for NP detection Python script for Star detection
Build 485
Download the latest APK for testing here
[!NOTE] You need a GitHub account to download the APK.
This URL is valid as long as the artifact has not expired yet.
Well, I'll be damned. NP detection was just what I wanted for my own pull request. Magical.
Also @erectorOps your screenshots are not working.
Also @erectorOps your screenshots are not working.
I see, so attachments uploaded in my own repository can’t be displayed. I’ve re-uploaded it, so it should be viewable now.
You could use this instead of using recycle view
https://github.com/Calvin-LL/Reorderable
Thanks for the reviews, @ArthurKun21 and Copilot! I’ve applied the suggested fixes and improvements. I really appreciate your insights and guidance.
I think after this has been merged, I'll probably make a pull request to make use of this new system in the default command line processing. So that you can do the following:
- Only using Scathach/Skadi skill 3 on its target if the target has < 100% NP bar.
- Automatically skip an already used skill, and not accidentally proc the popup window detection (causing the rest of your commands to break because FGA thinks that you are using popups when it only popped up because the skill was already used).