FGA icon indicating copy to clipboard operation
FGA copied to clipboard

feat: Add NP/Star Conditions, Update Target Dialog, and Skill Priority Drag-Sort on Spam Screen

Open erectorOps opened this issue 3 months ago • 6 comments

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:
      1. Detect Charged state via the right edge color of the gauge
      2. Calculate NP value from the gauge length (values above 100 treated as 100)
  • 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_screen

  • Spam mode dialog
    Shows new condition fields spam_mode_dialog

  • Target selection UI AutoSkillAction (directly reused without modification) target_dialog

  • Cooldown detection (zoomed) Checks whether the mean HSV of the region is within the HSV range skill_ready skill_on_cooldown

  • NP Charged detection (zoomed) Checks whether the mean HSV of the region is within the HSV range np_low np_charged

  • NP Visual bar detection (zoomed) Checks 1×8 pixels per column for HSV range and measures bar length to determine NP value visual_bar_length

  • Critical Star OCR detection & normalized image (zoomed) ocr tesseract

Testing Notes

erectorOps avatar Sep 02 '25 22:09 erectorOps

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.

github-actions[bot] avatar Sep 02 '25 22:09 github-actions[bot]

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.

Vylantze avatar Sep 03 '25 07:09 Vylantze

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.

erectorOps avatar Sep 03 '25 14:09 erectorOps

You could use this instead of using recycle view

https://github.com/Calvin-LL/Reorderable

ArthurKun21 avatar Sep 03 '25 16:09 ArthurKun21

Thanks for the reviews, @ArthurKun21 and Copilot! I’ve applied the suggested fixes and improvements. I really appreciate your insights and guidance.

erectorOps avatar Sep 04 '25 00:09 erectorOps

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).

Vylantze avatar Sep 09 '25 02:09 Vylantze