diff --git a/README.md b/README.md index f4c9815f..d072f6fd 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ We implemented some of the following features. - Looping of Lotto to Gift Box for much easier management. - Long Press on Lotto for faster opening of boxes. - Find Appends on Support -- NP Level Detection +- NP Level Detection(Finally reliable thanks to PaddleOCR) - Auto Send of Friend Request after clearing a quest. - Auto on/off toggle of Teapots. - Stop script upon reaching certain bond level. @@ -66,7 +66,7 @@ We implemented some of the following features. ### Improved Support Selection - Support Appends -- NP Level Detection +- NP Level Detection(a bit more reliable with PaddleOCR) - Support for Grand Servant system ![Improved Support Selection](https://github.com/user-attachments/assets/00ec91c8-6d8e-4670-b9e1-ba6e66674f58) @@ -75,7 +75,7 @@ We implemented some of the following features. Current things being worked on -1. [ ] Migration from hilt to kotlin-inject/metro +1. [X] Migration from hilt to kotlin-inject/metro 2. [ ] Migrate Battle Configs from prefs to FGA folder. diff --git a/docs/assets/scripts/CE EXP Bomb Dialog.png b/docs/assets/scripts/CE EXP Bomb Dialog.png new file mode 100644 index 00000000..54e98c84 Binary files /dev/null and b/docs/assets/scripts/CE EXP Bomb Dialog.png differ diff --git a/docs/assets/scripts/CE EXP Bomb.png b/docs/assets/scripts/CE EXP Bomb.png new file mode 100644 index 00000000..34fdc2b3 Binary files /dev/null and b/docs/assets/scripts/CE EXP Bomb.png differ diff --git a/docs/assets/scripts/Friend Point Gacha To CE EXP Bomb.png b/docs/assets/scripts/Friend Point Gacha To CE EXP Bomb.png new file mode 100644 index 00000000..9cafdaa3 Binary files /dev/null and b/docs/assets/scripts/Friend Point Gacha To CE EXP Bomb.png differ diff --git a/docs/assets/scripts/Friend Point Gacha.png b/docs/assets/scripts/Friend Point Gacha.png new file mode 100644 index 00000000..93a3c840 Binary files /dev/null and b/docs/assets/scripts/Friend Point Gacha.png differ diff --git a/docs/assets/scripts/Gift Box.png b/docs/assets/scripts/Gift Box.png new file mode 100644 index 00000000..c17549e7 Binary files /dev/null and b/docs/assets/scripts/Gift Box.png differ diff --git a/docs/assets/scripts/Level Append Dialog.png b/docs/assets/scripts/Level Append Dialog.png new file mode 100644 index 00000000..571a0941 Binary files /dev/null and b/docs/assets/scripts/Level Append Dialog.png differ diff --git a/docs/assets/scripts/Level Append Extended Dialog.png b/docs/assets/scripts/Level Append Extended Dialog.png new file mode 100644 index 00000000..5ba85922 Binary files /dev/null and b/docs/assets/scripts/Level Append Extended Dialog.png differ diff --git a/docs/assets/scripts/Level Append Extended.png b/docs/assets/scripts/Level Append Extended.png new file mode 100644 index 00000000..b3c2355a Binary files /dev/null and b/docs/assets/scripts/Level Append Extended.png differ diff --git a/docs/assets/scripts/Level Append Old.png b/docs/assets/scripts/Level Append Old.png new file mode 100644 index 00000000..e4b45b9d Binary files /dev/null and b/docs/assets/scripts/Level Append Old.png differ diff --git a/docs/assets/scripts/Level CE Dialog.png b/docs/assets/scripts/Level CE Dialog.png new file mode 100644 index 00000000..8c0d02cf Binary files /dev/null and b/docs/assets/scripts/Level CE Dialog.png differ diff --git a/docs/assets/scripts/Level CE.png b/docs/assets/scripts/Level CE.png new file mode 100644 index 00000000..15a2d020 Binary files /dev/null and b/docs/assets/scripts/Level CE.png differ diff --git a/docs/assets/scripts/Level Servant Dialog.png b/docs/assets/scripts/Level Servant Dialog.png new file mode 100644 index 00000000..6dec1599 Binary files /dev/null and b/docs/assets/scripts/Level Servant Dialog.png differ diff --git a/docs/assets/scripts/Level Servant with auto.png b/docs/assets/scripts/Level Servant with auto.png new file mode 100644 index 00000000..08084d91 Binary files /dev/null and b/docs/assets/scripts/Level Servant with auto.png differ diff --git a/docs/assets/scripts/Level Servant.png b/docs/assets/scripts/Level Servant.png new file mode 100644 index 00000000..6a323629 Binary files /dev/null and b/docs/assets/scripts/Level Servant.png differ diff --git a/docs/assets/scripts/Level Skill Dialog.png b/docs/assets/scripts/Level Skill Dialog.png new file mode 100644 index 00000000..24024616 Binary files /dev/null and b/docs/assets/scripts/Level Skill Dialog.png differ diff --git a/docs/assets/scripts/Level Skill Limited Dialog.png b/docs/assets/scripts/Level Skill Limited Dialog.png new file mode 100644 index 00000000..45b71f2d Binary files /dev/null and b/docs/assets/scripts/Level Skill Limited Dialog.png differ diff --git a/docs/assets/scripts/Level Skill Limited.png b/docs/assets/scripts/Level Skill Limited.png new file mode 100644 index 00000000..00da23ce Binary files /dev/null and b/docs/assets/scripts/Level Skill Limited.png differ diff --git a/docs/assets/scripts/Level Skill.png b/docs/assets/scripts/Level Skill.png new file mode 100644 index 00000000..632f0840 Binary files /dev/null and b/docs/assets/scripts/Level Skill.png differ diff --git a/docs/assets/scripts/Lottery.png b/docs/assets/scripts/Lottery.png new file mode 100644 index 00000000..21efc93f Binary files /dev/null and b/docs/assets/scripts/Lottery.png differ diff --git a/docs/other-scripts/friend-point-gacha.md b/docs/other-scripts/friend-point-gacha.md index 3622a3a9..0b6a28c5 100644 --- a/docs/other-scripts/friend-point-gacha.md +++ b/docs/other-scripts/friend-point-gacha.md @@ -1,3 +1,113 @@ -# Auto Friend Point Gacha +# Friend Point Gacha -Currently work-in-progress. +Automatically performs Friend Point (FP) summons in the Friend Point gacha screen. + +## Overview + +The Friend Point Gacha script continuously triggers 10x summons using Friend Points. It handles inventory management and can redirect to selling or CE enhancement when the inventory becomes full. + +## How to Start + +1. Navigate to the **Friend Point Summon** screen in the game +2. The script will automatically detect the FP summon screen when you see: + - The "Friend Summon" banner on the initial summon screen + - The continue summon button after your first summon + +## Workflow + +```text +┌─────────────────────────────────────────┐ +│ Start FP Gacha Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Check for Daily Free Summon Banner │ +│ (First time only) │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Perform Initial 10x Summon │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Main Summon Loop │◄──────┐ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Check Current State │ │ + └─────────────┬───────────┘ │ + │ │ + ┌────────────┼────────────┐ │ + │ │ │ │ + ▼ ▼ ▼ │ + ┌─────────┐ ┌──────────┐ ┌─────────┐ │ + │Inventory│ │ Summon │ │ Out of │ │ + │ Full │ │ Continue │ │ FP │ │ + └────┬────┘ └────┬─────┘ └────┬────┘ │ + │ │ │ │ + ▼ │ ▼ │ + Handle Full │ Exit Script │ + Inventory │ │ + │ └────────────────────┘ + ▼ + ┌─────────────────────────────────────┐ + │ Redirect to CE Bomb or Sell Menu │ + └─────────────────────────────────────┘ +``` + +## Key Features + +### Summon Limit + +- **Optional FP limit**: Set a maximum number of summons to perform +- Once the limit is reached, the script can either stop or redirect to the sell menu + +![FP Limit](<../assets/scripts/Friend Point Gacha.png>) + +### Inventory Full Handling + +When the inventory becomes full, the script can: + +1. **Redirect to CE Enhancement** - Create CE bombs with the summoned CEs +2. **Redirect to Sell Menu** - Sell unwanted cards +3. **Stop the script** - Exit with an inventory full notification + +![FP to CE EXP Bomb](<../assets/scripts/Friend Point Gacha To CE EXP Bomb.png>) + +### Connection Retry + +- Automatically handles connection issues +- Retries when network errors occur + +## Settings + +| Setting | Description | +|---------|-------------| +| Limit FP | Enable/disable summon limit | +| FP Limit Count | Maximum number of summons before stopping | +| Redirect to Sell | Navigate to sell menu when limit reached or inventory full | +| Create CE Bomb | Redirect to CE enhancement when inventory is full | + +## Exit Reasons + +The script will stop and notify you when any of these conditions occur: + +| Exit Reason | Description | +|-------------|-------------| +| **Inventory Full** | Your inventory is full and no redirect option is enabled | +| **Run Out of Friend Points** | No more Friend Points available for summoning | +| **Summon Limit Reached** | The configured summon limit has been reached | +| **Reached Sell Banner** | Successfully navigated to the sell menu | +| **Unable to Verify CE Enhancement Menu** | Failed to navigate to CE enhancement after inventory full | +| **Sell Banner Not Visible** | Expected to see sell menu but could not detect it | + +## Tips for Best Results + +1. **Clear inventory space** before starting for longer runs +2. **Enable redirect options** to maximize summoning efficiency +3. **Set appropriate limits** if you want controlled summon sessions +4. **Ensure stable connection** for uninterrupted summoning diff --git a/docs/other-scripts/gift-box.md b/docs/other-scripts/gift-box.md index eec48679..0d385eb7 100644 --- a/docs/other-scripts/gift-box.md +++ b/docs/other-scripts/gift-box.md @@ -1,3 +1,176 @@ -# Auto Gift Box +# Auto Gift Box (Present Box) -Currently work-in-progress. +Automatically collects embers from the gift box (present box) with intelligent filtering. + +## Overview + +The Gift Box script automatically selects and collects gold embers from your present box. It uses OCR to read stack sizes and filter based on your preferences, ensuring you only collect what you need. + +## How to Start + +1. Navigate to the **Present Box** screen in the game +2. The script will automatically detect the gift box screen when: + - Gold XP cards (embers) are visible in the list + - Silver XP cards are visible + - 5-star gold XP cards are visible +3. Make sure the gift box has items to collect + +## Workflow + +```text +┌─────────────────────────────────────────┐ +│ Start Gift Box Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Locate Ember Pattern Position │ +│ (Gold, Silver, or 5-Star XP) │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Selection Iteration │◄──────┐ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Scan Visible Items │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ For Each Checkbox: │ │ + │ • Check if ember type │ │ + │ • Read stack count │ │ + │ • Apply size filter │ │ + │ • Select if valid │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Scroll Down List │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Check End of List │ │ + └─────────────┬───────────┘ │ + │ │ + ┌────────────┴────────────┐ │ + │ End │ More │ + ▼ └──────┘ +┌─────────────────────────────────────────┐ +│ Receive Selected Items │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Check if Can Select More Items │ +└─────────────────────┬───────────────────┘ + │ + ▼ + Exit or Return to Lottery +``` + +## Key Features + +### Intelligent Ember Detection + +- Identifies gold 4-star embers +- Identifies silver 3-star embers +- Identifies gold 5-star embers +- Uses OCR to read stack sizes (e.g., "x50") + +### Stack Size Filtering + +- Only selects stacks within your configured maximum size +- Prevents selecting large stacks you want to keep + +### Gold Ember Counting + +- Tracks total gold embers selected +- Stops when reaching your configured limit + +### Server-Specific Adjustments + +- Adjusts detection regions based on game server +- Supports JP, EN, KR, TW, and CN servers + +## Settings + +| Setting | Description | +|---------|-------------| +| Max Gold Ember Stack Size | Maximum stack size to select (larger stacks skipped) | +| Max Gold Ember Total Count | Maximum total gold embers to collect | +| Loop Into Lottery After Present Box | Return to lottery after collection (when called from lottery) | + +![Gift Box Dialog](<../assets/scripts/Gift Box.png>) + +## Exit Reasons + +The script will stop and notify you when any of these conditions occur: + +| Exit Reason | Description | +|-------------|-------------| +| **No Embers Found** | Could not locate any embers in the gift box | +| **Cannot Select Any More** | Reached selection limit or no more valid items | +| **Return to Lottery** | Successfully collected embers and returning to lottery script | + +## Selection Algorithm + +For each item in the gift box: + +```text +┌─────────────────────────────────────────┐ +│ Is Item Checkbox Visible? │ +└─────────────────────┬───────────────────┘ + │ Yes + ▼ +┌─────────────────────────────────────────┐ +│ Check Icon Region for Ember Type │ +│ • Gold 4★ XP? │ +│ • Silver 3★ XP? │ +│ • Gold 5★ XP? │ +└─────────────────────┬───────────────────┘ + │ Ember Found + ▼ +┌─────────────────────────────────────────┐ +│ Read Stack Count Using OCR │ +│ (Extract number from "x50" etc.) │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Is Stack Size ≤ Max Stack Size? │ +└─────────────────────┬───────────────────┘ + │ Yes + ▼ +┌─────────────────────────────────────────┐ +│ Select Item and Add to Count │ +└─────────────────────────────────────────┘ +``` + +## Usage with Lottery + +When the lottery script detects a full present box, it can automatically invoke the Gift Box script: + +1. **Lottery detects present box full** +2. **Navigates to gift box** +3. **Gift Box script collects embers** +4. **Returns to lottery** (if enabled) +5. **Continues spinning** + +## Tips for Best Results + +1. **Set appropriate stack size limits** to skip large stacks you want to keep +2. **Configure gold ember limits** to avoid excessive collection +3. **Clear non-ember items manually** if they're blocking embers +4. **Ensure embers are visible** at the start of the gift box list + +## Technical Notes + +- Maximum 99 items can be selected per batch +- Uses 3 consecutive null checks to detect end of list +- Scrolls through the list to find all valid items +- Handles connection retries automatically diff --git a/docs/other-scripts/lottery.md b/docs/other-scripts/lottery.md index ae49a0bd..76e21abc 100644 --- a/docs/other-scripts/lottery.md +++ b/docs/other-scripts/lottery.md @@ -1,54 +1,158 @@ # Auto Lottery -This is the script that helps you automate the rolling of lottery. - -## How to get started - -1. Go to the Lottery Screen. - - ![Lottery Screen](../assets/other-scripts/lottery.png) - -2. Click the Play button in order to setup the lottery configuration. - - ![Lottery Configuration](../assets/other-scripts/lottery-configuration.png) - -3. Click the "Ok" button to start the script. - -## Lottery in JP - -Lottery in JP server have implemented the long press option. This significantly improves the user experience by allowing for quicker rolling of the lottery. - -We have implemented such feature to the app to help users. - -![Lottery JP Long press option](../assets/other-scripts/lottery-jp-long-press.png) - -## Lottery Options - -1. If you want to receive embers when the gift box is full, enable the "Receive Embers" option. - - This will show the options also found on [Gift Box](gift-box.md) that is needed for receiving embers. - - ![Receive Embers](../assets/other-scripts/lottery-receive-embers.png) - -2. If you want to loop back to rolling the lottery, enable the "Return to lottery" option. - - ![Return to Lottery](../assets/other-scripts/lottery-return-to-lottery.png) - -3. If both the Gift Box and Servant inventory are full, and want to redirect to "sell" screen - - enable the "Move to sell after Gift Box" option. - - ![Move to Sell](../assets/other-scripts/lottery-move-to-sell.png) - -## Exit scenarios - -The script ends when - -1. The user manually stopped the script. -2. User didn't configure to receive embers. - - ![Lottery Full](../assets/other-scripts/lottery-full.png) - -3. Enabled to receive embers but found no embers. -4. Both the Gift Box and Servant inventory are full, and the user didn't configure to sell. -5. Both the Gift Box and Servant inventory are full, and the user configure to sell and have reached the sell screen. +Automatically spins lottery boxes during event lotteries to collect rewards efficiently. + +## Overview + +The Lottery script continuously opens lottery boxes during Fate/Grand Order events. It handles present box overflow and can redirect to collect embers or sell items when the present box becomes full. + +## How to Start + +1. Navigate to the **Event Lottery** screen in the game +2. The script will automatically detect the lottery screen when: + - The lottery cost indicator is visible (JP/EN servers) + - The lottery box finished indicator is visible +3. Make sure you have lottery currency (event items) to spend + +## Workflow + +```text +┌─────────────────────────────────────────┐ +│ Start Lottery Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Initialize Spin Settings │ +│ (Click count, long press duration) │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Main Spin Loop │◄──────┐ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Check Current State │ │ + └─────────────┬───────────┘ │ + │ │ + ┌─────────────────┼─────────────────┐ │ + │ │ │ │ + ▼ ▼ ▼ │ +┌─────────┐ ┌───────────┐ ┌─────────┐ +│Present │ │ Lottery │ │ Keep │ +│Box Full │ │ Done │ │Spinning │ +└────┬────┘ └─────┬─────┘ └────┬────┘ + │ │ │ │ + ▼ ▼ │ │ +Handle Full Verify Done │ │ +Present Box (Double check) └────┘ + │ │ + ▼ ▼ +┌─────────────┐ Exit with +│Collect or │ "Out of Currency" +│Sell Embers │ +└─────────────┘ +``` + +## Key Features + +### Server-Specific Spinning + +- **JP Servers**: Uses long press spinning for faster lottery spins +- **Other Servers**: Uses rapid click spinning (configurable click count) + +### Present Box Full Handling + +When the present box becomes full, the script can: + +1. **Collect Embers from Gift Box** - Opens gift box to receive gold embers +2. **Redirect to Sell Menu** - After collecting embers, redirect to sell excess items +3. **Stop the script** - Exit with a present box full notification + +### Lottery Completion Detection + +- Double-checks when lottery appears done to avoid false positives +- Verifies by attempting spins and checking if the "done" indicator persists + +## Settings + +| Setting | Description | +|---------|-------------| +| Receive Embers When Gift Box Full | Enable automatic ember collection | +| Loop Into Lottery After Present Box | Return to lottery after collecting embers | +| Move to Sell After Present Box | Navigate to sell menu after collecting | +| Max Gold Ember Total Count | Limit on gold embers to collect per session | + +![Lottery](../assets/other-scripts/lottery.png) + +![Lottery Dialog](../assets/scripts/Lottery.png) + +## Spin Configuration + +| Setting | Description | +|---------|-------------| +| Lotto Spin Count | Number of clicks per spin cycle (non-JP) | +| Lotto Long Press Duration | Duration of long press for spinning (JP) | + +## Exit Reasons + +The script will stop and notify you when any of these conditions occur: + +| Exit Reason | Description | +|-------------|-------------| +| **Ran Out of Currency** | No more lottery currency to spend | +| **Present Box Full** | Present box is full and auto-collect is disabled | +| **No Embers Found** | Could not find embers in the gift box | +| **Cannot Select Any More** | Reached the limit of selectable items | +| **Present Box Full and Cannot Select Anymore** | Box is full and reached selection limit | +| **Reached Sell Banner** | Successfully navigated to the sell menu | +| **Unable to Verify Sell** | Could not verify navigation to sell menu | +| **Aborted** | Script was manually stopped by user | + +![Lottery Full](../assets/other-scripts/lottery-full.png) + +## Tips for Best Results + +1. **Clear your present box** before starting for longer uninterrupted runs +2. **Set ember collection limits** to avoid unnecessary inventory management +3. **Enable auto-collect** to maximize lottery efficiency during events +4. **Ensure stable connection** as lotteries involve many rapid actions +5. **JP users**: The long press feature allows faster spinning + +## Present Box Integration + +When present box becomes full during lottery: + +```text +┌─────────────────────────────────────────┐ +│ Present Box Full Detected │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Is "Receive Embers" enabled? │ +└─────────────────────┬───────────────────┘ + │ + ┌────────────┴────────────┐ + │ Yes │ No + ▼ ▼ +┌─────────────────┐ ┌─────────────────┐ +│ Navigate to │ │ Exit: Present │ +│ Gift Box │ │ Box Full │ +└────────┬────────┘ └─────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Collect Gold Embers (AutoGiftBox) │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Is "Loop Into Lottery" enabled? │ +└─────────────────────┬───────────────────┘ + │ + ▼ + Return to Lottery or Exit +``` diff --git a/docs/other-scripts/support-image-maker.md b/docs/other-scripts/support-image-maker.md index 85f16856..6a80ecb5 100644 --- a/docs/other-scripts/support-image-maker.md +++ b/docs/other-scripts/support-image-maker.md @@ -1,3 +1,154 @@ # Support Image Maker -Currently work-in-progress. +Automatically extracts support servant, CE, and friend images from the support selection screen for use in support preferences. + +## Overview + +The Support Image Maker script captures images of support servants, Craft Essences (CEs), and friend names from the support selection screen. These images are used to configure support preferences for automated farming - allowing FGA to select specific servants or CEs during battle setup. + +## How to Start + +1. Navigate to the **Support Selection** screen in the game (either from quest start or friend list) +2. Ensure the support entries you want to capture are visible on screen +3. Start the Support Image Maker script +4. The script will extract images from up to 2 visible support entries + +## Workflow + +```text +┌─────────────────────────────────────────┐ +│ Start Support Image Maker Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Clean Temporary Extract Folder │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Detect Support Screen Type │ +│ (Support Selection vs Friend List) │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Find Support Entry Bounds on Screen │ +│ (Up to 2 entries) │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ For Each Support Entry │ + └─────────────┬───────────┘ + │ + ┌────────────┴────────────┐ + │ │ + ▼ ▼ + ┌─────────────┐ ┌─────────────┐ + │ Normal │ │ Grand │ + │ Servant │ │ Servant │ + └──────┬──────┘ └──────┬──────┘ + │ │ + ▼ ▼ + ┌─────────────┐ ┌─────────────┐ + │ Extract: │ │ Extract: │ + │ - Servant │ │ - Servant │ + │ - CE │ │ - CE Slot 1 │ + │ - Friend │ │ - Friend │ + └──────┬──────┘ └──────┬──────┘ + │ │ + └────────────┬───────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Save Images to Temporary Directory │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Open Image Review Screen │ +│ (Name and save images) │ +└─────────────────────────────────────────┘ +``` + +## Image Types + +The script extracts three types of images from each support entry: + +### Servant Image + +- Captures the servant portrait from the support card +- Used to identify specific servants during support selection +- Recommended naming: `[Servant Name]/[Ascension]` (e.g., `Waver/Final`) + +### CE Image + +- Captures the Craft Essence equipped on the support servant +- For Grand Servants: Extracts from CE Slot 1 position +- Used to select supports with specific CEs (e.g., event bonus CEs) + +### Friend Image + +- Captures the friend/master name from the support card +- Used to prioritize specific friends on your support list +- Position differs between support selection and friend list screens + +## Grand Servant Handling + +Grand Servants have a different support card layout with multiple CE slots. The script: + +1. Detects the Grand CE logo on the support card +2. Adjusts extraction coordinates for the Grand layout +3. Extracts CE from Slot 1 (top CE slot) +4. Uses Grand-specific friend name region + +## After Extraction + +Once the script completes, you'll see the **Support Image Review** screen: + +1. **Preview extracted images** - See all captured servant, CE, and friend images +2. **Enable/disable images** - Check the checkbox for images you want to save +3. **Name your images** - Enter descriptive names for organization: + - Servant images: Enter servant name and ascension/costume + - CE images: Enter CE name + - Friend images: Enter friend's master name +4. **Save** - Images are saved to your support image directory + +### Naming Tips + +- Use descriptive names for easy identification later +- For servants, include ascension or costume info +- Avoid special characters: `< > " | : * ? \ /` +- Names can include subdirectories using `/` (e.g., `Waver/Bond CE`) + +## Exit Reasons + +| Exit Reason | Description | +|-------------|-------------| +| **Success** | Images extracted successfully. Review screen will open. | +| **Not Found** | No support entries found on screen. Make sure you're on the support selection screen with visible entries. | + +## Tips for Best Results + +1. **Scroll to desired supports** - Position the servants you want to capture before starting +2. **Use clear support cards** - Avoid partially visible entries at screen edges +3. **Maximum 2 entries** - The script captures up to 2 support entries per run +4. **Re-run as needed** - Run the script multiple times to capture different supports +5. **Consistent naming** - Use consistent naming conventions for easier management + +## Settings + +This script has no configurable settings. It automatically: + +- Detects screen type (support selection vs friend list) +- Handles both normal and Grand servant layouts +- Saves to the app's support image temporary directory + +## Related Features + +After creating support images, use them in: + +- **Battle Script** → Support Selection settings +- Configure preferred servants, CEs, and friends for automated farming + diff --git a/docs/scripts/auto-ce-exp-bomb.md b/docs/scripts/auto-ce-exp-bomb.md new file mode 100644 index 00000000..5e0a45f9 --- /dev/null +++ b/docs/scripts/auto-ce-exp-bomb.md @@ -0,0 +1,209 @@ +# Auto CE EXP Bomb + +Automatically creates CE Bombs by continuously selecting and leveling Craft Essences. + +## Overview + +The CE Bomb script continuously creates leveled Craft Essences by automatically selecting target CEs and feeding them fodder CEs. Unlike Level CE mode, this mode will keep running until you stop it or run out of fodder, creating multiple "CE Bombs" that can later be used to level your important CEs. + +## What is a CE Bomb? + +A CE Bomb is a leveled CE that stores a large amount of CE experience. By feeding low-rarity CEs into another low-rarity CE (like a 1★), you can concentrate experience efficiently. These "bombs" can then be fed to your important CEs for massive experience gains. + +## How to Start + +1. Navigate to **Enhancement → Craft Essence** in the game +2. **Do NOT select any CE** - leave the enhancement slot empty +3. The script will automatically detect CE Bomb mode when: + - The CE Enhancement banner is visible + - The enhancement slot shows "Empty Enhance" state +4. Start the script + +> **Important**: The enhancement slot must be empty. If a CE is already selected, the script will run in Level CE mode instead. + +## Workflow + +```text +┌─────────────────────────────────────────┐ +│ Start CE Bomb Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Verify Enhancement Slot is Empty │ +│ (CE Bomb mode activated) │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ CE Bomb Loop │◄──────┐ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Select Target CE │ │ + │ from CE List │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Check if CE is Locked │ │ + │ (Auto-lock if needed) │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Configure Filters │ │ + │ for Fodder CEs │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Select Fodder CEs │ │ + │ (Drag to select) │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Perform Enhancement │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Is Current CE Maxed? │ │ + └─────────────┬───────────┘ │ + │ │ + ┌────────────┴────────────┐ │ + │ Yes │ No │ + ▼ └──────┤ + ┌─────────────────────────┐ │ + │ Clear Slot, Pick New │───────┘ + │ Target CE │ + └─────────────────────────┘ + + Loop continues until: + • No more fodder CEs available + • No more target CEs available + • User stops the script +``` + +## Key Features + +### Continuous Target Selection + +- Automatically picks new target CEs when current one is maxed +- Filters target CEs based on your configured rarity +- Resets filters and position for each new target + +### Auto-Lock Protection + +- Automatically locks each target CE when selected +- Prevents target from being accidentally used as fodder +- Requires Android 8.0+ for long-press functionality + +### Filter Automation + +- Configures rarity filters for target CE selection +- Configures separate rarity filters for fodder CE selection +- Handles different CE types based on settings + +### Position Management + +- Scrolls to top of CE list for consistent selection +- Tracks which rows/columns have been exhausted +- Skips empty positions to save time + +## Settings + +| Setting | Description | +|---------|-------------| +| Target CE Rarity | Rarity of CEs to use as bomb base | +| Fodder CE Rarity | Which CE rarities to use as fodder | +| Skip Auto-Lock Target CE | Don't automatically lock target CEs | +| Skip Automatic Display Change | Don't auto-adjust display size | +| Skip CE Filter Detection | Don't auto-configure filters | +| Skip Sort Detection | Don't auto-configure sort options | +| CE Display Change Area | Which corner to tap to change display | + +![CE EXP Bomb Screen](<../assets/scripts/CE EXP Bomb.png>) + +![CE EXP Bomb Dialog](<../assets/scripts/CE EXP Bomb Dialog.png>) + +## Exit Reasons + +The script will stop and notify you when any of these conditions occur: + +| Exit Reason | Description | +|-------------|-------------| +| **No Suitable Fodder CE Found** | No more fodder CEs available that match your filter criteria | +| **No Suitable Target CE Found** | No more target CEs available to use as bomb base | + +## Differences from Level CE Mode + +| Feature | CE Bomb | Level CE | +|---------|---------|----------| +| Target CE | Auto-selected | Pre-selected by user | +| Starting state | Empty slot | CE in slot | +| Stop condition | Out of fodder/targets | Target CE maxed | +| Purpose | Mass produce leveled CEs | Level one specific CE | +| Continuous | Yes (loops) | No (single CE) | + +## Recommended CE Bomb Strategy + +### Using 1★ CEs as Bombs + +1. Set **Target CE Rarity** to 1★ +2. Set **Fodder CE Rarity** to 1★ and 2★ (optionally 3★) +3. Set Fodder filter to only Normal-type CEs +4. Let the script create multiple leveled 1★ MLB CEs +5. Use these 1★ bombs to level your important 4★ or 5★ CEs + +### Experience Efficiency + +```text +┌─────────────────────────────────────────┐ +│ CE Experience Flow │ +└─────────────────────────────────────────┘ + + 1★ CEs ──┐ + ├──► 1★ MLB CE (Bomb) ──► Your 5★ CE + 2★ CEs ──┘ + +• Less QP cost than feeding all CEs directly +• More efficient inventory management +• Maximizes CE experience transfer +``` + +## Tips for Best Results + +1. **Start with empty enhancement slot** to enable CE Bomb mode +2. **Use appropriate target rarity** (1★ CEs are common for bombs) +3. **Have plenty of fodder CEs** before starting long runs +4. **Monitor your QP** as enhancement costs add up +5. **Check locked CEs periodically** - all bombs will be locked + +## Integration with FP Gacha + +CE Bomb mode can be triggered automatically from the Friend Point Gacha script: + +```text +FP Gacha ──► Inventory Full ──► CE Bomb Mode + │ + ▼ + Create CE Bombs from + summoned fodder CEs +``` + +This creates an efficient loop: + +1. Summon FP gacha for fodder +2. When inventory full, create CE bombs +3. Return to summoning with cleared inventory + +## Technical Notes + +- Uses 7 columns × 4 rows grid for target CE selection +- Uses 7 columns × 3 rows grid for fodder CE selection +- Resets skip lists when selecting new target CE +- First run for each target includes initial setup (display, filters, sort) +- Subsequent fodder selections skip initial setup for speed diff --git a/docs/scripts/auto-level-append.md b/docs/scripts/auto-level-append.md index d2078921..39f8ba6d 100644 --- a/docs/scripts/auto-level-append.md +++ b/docs/scripts/auto-level-append.md @@ -1,24 +1,254 @@ # Auto Level Append -This is a script that lets you automate the leveling of your append skills. Unlike the "Auto Level Skills", it does not have the capability to read the level text on screen due to technical limitations and instead requires configuration from user on how many level up they must perform for the certain append skill. +Automatically unlocks and upgrades servant append skills. -## How to get started +## Overview -1. Go to the Append Skills screen. -2. Select the servant you want to level up its append skills. -3. Click the play button to start the script. -4. Setup the configuration options as desired. +The Level Append script automatically manages your servant's append skills - both unlocking them (using servant coins) and upgrading their levels (using materials and QP). It supports all append skills and provides detailed status reporting. -## Exit scenarios +## What are Append Skills? -- Ran out of materials. +Append Skills are additional passive skills that can be unlocked using Servant Coins. Once unlocked, they can be leveled up using materials and QP, similar to regular skills. Each servant has 3 append skills (5 on JP servers after the [9th anniversary](https://fategrandorder.fandom.com/wiki/Fate/Grand_Order_%EF%BD%9E9th_Anniversary%EF%BD%9E#[VI])). - When one of the skills you are currently leveling up cannot proceed to due to lack of materials, the script will stop leveling up that skill and move on to the next one. +## Technical Difficulties -- Ran out of QP +Unlike regular skills, append skills' screen have their level text unable to be read via OCR. Therefore, the script relies on counting upgrade attempts to track levels. - The script will stop leveling up skills when you run out of QP. You can resume the script once you have enough QP to continue. +## How to Start -- Reached the target level +1. Navigate to **Enhancement → Append Skill** in the game +2. **Select the servant** whose append skills you want to manage +3. The script will automatically detect append enhancement mode when: + - The "Append" banner is visible in the enhancement menu +4. **Configure which appends to unlock/upgrade** in settings +5. Start the script - When the script has leveled up all the skills to the target level, it will stop automatically. +> **Important**: You must select a servant before starting. The script will exit if no servant is selected. + +![Level Append](<../assets/scripts/Level Append Old.png>) + +Other servers with 3 appends + +![Level Append Extended](<../assets/scripts/Level Append Extended.png>) + +JP version with 5 appends + +## Workflow + +```text +┌─────────────────────────────────────────┐ +│ Start Level Append Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Verify Servant is Selected │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ For Each Append (1-3) │ + │ (1-5 on JP servers) │ + └─────────────┬───────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Check Configuration: │ + │ • Unlock needed? │ + │ • Upgrades needed? │ + └─────────────┬───────────┘ + │ + ┌────────────┴────────────┐ + │ Action needed │ No + ▼ ▼ +┌─────────────────────┐ ┌─────────────────────┐ +│ Click Append Icon │ │ Mark as Not Selected│ +└─────────┬───────────┘ │ Move to Next │ + │ └─────────────────────┘ + ▼ + ┌─────────────────────────┐ + │ Need to Unlock First? │ + └─────────────┬───────────┘ + │ + ┌────────────┴────────────┐ + │ Yes │ No + ▼ │ +┌─────────────────────┐ │ +│ Perform Unlock │ │ +│ (Uses Servant Coins)│ │ +└─────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐│ + │ Upgrade Loop ││◄─────┐ + └─────────────┬───────────┘│ │ + │◄───────────┘ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Upgrades Remaining? │ │ + └─────────────┬───────────┘ │ + │ │ + ┌────────────┴────────────┐ │ + │ Yes │ No │ + ▼ ▼ │ + Click Enhance Move to │ + Button Next Append │ + │ │ + ▼ │ + Confirm Upgrade ───────────────────┘ +``` + +## Key Features + +### Unlock + Upgrade Workflow + +- Can unlock append skills using servant coins +- Can upgrade unlocked append skills +- Handles both operations in sequence + +### Server-Aware Configuration + +- JP servers: Supports 5 append skills (after the 9th anniversary) +- Other servers: Supports 3 append skills + +### Resource Monitoring + +- Detects insufficient QP +- Detects insufficient materials +- Detects insufficient servant coins for unlock +- Reports specific issues for each append + +### Comprehensive Exit State + +- Reports unlock status for each append +- Reports number of upgrades performed +- Reports exit reason for each append + +## Settings + +| Setting | Description | +|---------|-------------| +| Should Unlock Append One | Enable unlocking of append 1 | +| Should Unlock Append Two | Enable unlocking of append 2 | +| Should Unlock Append Three | Enable unlocking of append 3 | +| Should Unlock Append Four | Enable unlocking of append 4 (JP only) | +| Should Unlock Append Five | Enable unlocking of append 5 (JP only) | +| Upgrade Append One | Number of levels to upgrade append 1 | +| Upgrade Append Two | Number of levels to upgrade append 2 | +| Upgrade Append Three | Number of levels to upgrade append 3 | +| Upgrade Append Four | Number of levels to upgrade append 4 (JP only) | +| Upgrade Append Five | Number of levels to upgrade append 5 (JP only) | + +> **Note**: The app automatically detects which appends are locked/unlocked. + +![Level Append Dialog](<../assets/scripts/Level Append Dialog.png>) + +![Level Append Extended Dialog](<../assets/scripts/Level Append Extended Dialog.png>) + +## Exit Reasons + +### Overall Script Exit + +| Exit Reason | Description | +|-------------|-------------| +| **Done** | All configured appends have been processed | +| **No Servant Selected** | No servant was selected | +| **Ran Out of QP** | Insufficient QP to continue | +| **Abort** | Script was manually stopped | +| **Unexpected** | An unexpected error occurred | + +### Individual Append Exit + +Each append can exit with one of these reasons: + +| Append Exit Reason | Description | +|--------------------|-------------| +| **Success** | Append successfully upgraded to target | +| **Unlock Success** | Append unlocked (no upgrades configured) | +| **Not Selected** | Append was not configured for upgrade | +| **Ran Out of QP** | Insufficient QP | +| **Ran Out of Mats** | Insufficient materials | +| **Exit Early (QP)** | Skipped due to previous QP shortage | +| **Unable to Unlock** | Could not unlock (insufficient coins or error) | +| **Unable to Upgrade Further** | Could not continue upgrading | +| **Lag** | Timeout waiting for UI response | + +## Exit State Summary + +After the script completes, you receive a detailed summary: + +```text +┌─────────────────────────────────────────┐ +│ Append Exit State Summary │ +├─────────────────────────────────────────┤ +│ Append 1: │ +│ • Upgrade Level Target: X │ +│ • Should Unlock: Yes/No │ +│ • Upgrades Performed: Y │ +│ • Exit Reason: Success / Out of X │ +├─────────────────────────────────────────┤ +│ Append 2: (same format) │ +├─────────────────────────────────────────┤ +│ Append 3: (same format) │ +├─────────────────────────────────────────┤ +│ Append 4: (JP only) │ +├─────────────────────────────────────────┤ +│ Append 5: (JP only) │ +└─────────────────────────────────────────┘ +``` + +## Unlock Workflow Detail + +```text +┌─────────────────────────────────────────┐ +│ Unlock Append Skill │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Click Enhance Button (2 retries) │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Wait for OK Button to Appear │ +└─────────────────────┬───────────────────┘ + │ + ┌────────────┴────────────┐ + │ OK Visible │ Not Visible + ▼ ▼ +┌─────────────────────┐ ┌─────────────────────┐ +│ Click OK to Confirm │ │ Exit: Unable to │ +│ Unlock │ │ Unlock │ +└─────────┬───────────┘ └─────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Wait for Append Banner to Disappear │ +│ (Animation completion) │ +└─────────────────────────────────────────┘ +``` + +## QP Cascade Effect + +If an append runs out of QP, subsequent appends will be marked accordingly: + +```text +Append 1: Out of QP ──► Append 2: Exit Early (QP) ──► Append 3: Exit Early (QP) +``` + +## Tips for Best Results + +1. **Check servant coin balance** before attempting unlocks +2. **Verify materials** for planned upgrade levels +3. **Ensure adequate QP** for all operations +4. **Configure all appends** you want to process in one run +5. **Check locked status** - the app detects this automatically + +## Technical Notes + +- Uses 2 retries for unlock and upgrade initiation +- Waits up to 20 iterations (3 seconds each) for banner animations +- Handles connection issues automatically +- JP servers have 5 append skills; other servers have 3 +- Unlock requires servant coins; upgrades require materials + QP diff --git a/docs/scripts/auto-level-ce.md b/docs/scripts/auto-level-ce.md index 26566e5c..7ced438b 100644 --- a/docs/scripts/auto-level-ce.md +++ b/docs/scripts/auto-level-ce.md @@ -1,24 +1,153 @@ # Auto Level CE -The auto level CE script have two modes. +Automatically enhances a selected Craft Essence (CE) to increase its level. -1. **Auto Level CE**: This mode will automatically level up your Craft Essence (CE) up until the target CE is maxed or you run out of fodder CEs. +## Overview -2. **Auto CE Bomb**: This mode automatically levels either 1★ or 2★ Craft Essences (CEs) depending on the configuration. Unlike "Auto Level CE" mode, it does not stop when the current target CE reaches max level; instead it selects a new CE and perform the leveling process again. It only stops when you run out of fodder CEs or you perform manual stopping intervention. +The Level CE script enhances a single target Craft Essence by feeding it fodder CEs. Unlike CE Bomb mode, this mode is designed to level a specific CE you've already selected and will stop when that CE reaches its maximum level. -## How to get started +## How to Start -The two modes have different scenarios to get started. +1. Navigate to **Enhancement → Craft Essence** in the game +2. **Select the CE you want to level** (tap on it so it appears in the enhancement slot) +3. The script will automatically detect you're in CE enhancement mode when: + - The CE Enhancement banner is visible + - A CE is already selected (not empty) +4. Start the script -### Auto Level CE Setup +> **Important**: You must select a target CE before starting. The script distinguishes between Level CE mode and CE Bomb mode based on whether a CE is already selected. -1. Go to the Craft Essence screen. -2. Select the Craft Essence you want to level up. -3. Click the play button to start the script. -4. Setup the configuration options as desired. +## Workflow -### Auto CE Bomb Setup +```text +┌─────────────────────────────────────────┐ +│ Start Level CE Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Verify Target CE is Selected │ +│ (Not empty enhancement slot) │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Main Enhancement Loop │◄──────┐ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Check if CE is Locked │ │ + │ (Auto-lock if needed) │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Open Fodder Selection │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Configure Filters │ │ + │ (Display, Sort, etc.) │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Select Fodder CEs │ │ + │ (Drag to select) │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Confirm Enhancement │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Is Target CE Max? │ │ + └─────────────┬───────────┘ │ + │ │ + ┌────────────┴────────────┐ │ + │ Yes │ No │ + ▼ └──────┘ +┌─────────────────────────────────────────┐ +│ Exit: Target CE Max Level │ +└─────────────────────────────────────────┘ +``` -1. Go to the Craft Essence screen. -2. Click the play button to start the script. -3. Setup the configuration options as desired. +## Key Features + +### Auto-Lock Target CE + +- Automatically locks the target CE to prevent accidental use as fodder +- Can be disabled in settings +- Requires Android 8.0+ for long-press functionality + +### Smart Display Adjustment + +- Automatically sets CE display to small size for better visibility +- Can detect and click the correct corner for display toggle +- Configurable based on your screen layout + +### Filter Configuration + +- Automatically sets appropriate filters for fodder CEs +- Filters by rarity (based on your settings) +- Configures sort options for optimal fodder selection + +### Smart Sort Features + +- Enables smart sort for efficient CE organization +- Enables select sort for easier multi-selection +- Sorts by level to use lowest-level CEs first + +## Settings + +| Setting | Description | +|---------|-------------| +| Target CE Rarity | Rarity of the CE you're leveling | +| Fodder CE Rarity | Which CE rarities to use as fodder | +| Skip Auto-Lock Target CE | Don't automatically lock the target CE | +| Skip Automatic Display Change | Don't auto-adjust display size | +| Skip CE Filter Detection | Don't auto-configure filters | +| Skip Sort Detection | Don't auto-configure sort options | +| CE Display Change Area | Which corner to tap to change display | + +![Level CE](<../assets/scripts/Level CE.png>) + +![Level CE Dialog](<../assets/scripts/Level CE Dialog.png>) + +## Exit Reasons + +The script will stop and notify you when any of these conditions occur: + +| Exit Reason | Description | +|-------------|-------------| +| **Target CE Max Level** | The target CE has reached its maximum level | +| **No Suitable Fodder CE Found** | No fodder CEs available that match your filter criteria | +| **No Suitable Target CE Found** | Could not identify a valid target CE | + +## Differences from CE Bomb Mode + +| Feature | Level CE | CE Bomb | +|---------|----------|---------| +| Target CE | Pre-selected by user | Auto-selected from list | +| Stop condition | Target CE max level | No more fodder available | +| Purpose | Level specific CE | Create multiple leveled CEs | +| Starting state | CE already in slot | Empty enhancement slot | + +## Tips for Best Results + +1. **Select your target CE first** before starting the script +2. **Use appropriate fodder rarities** to maximize enhancement value +3. **Enable auto-lock** to protect your target CE +4. **Configure display area** based on your screen layout +5. **Ensure sufficient QP** for enhancement costs + +## Technical Notes + +- Uses 7 columns × 4 rows grid for target CE selection +- Uses 7 columns × 3 rows grid for fodder CE selection +- Skips rows/columns where CEs have been exhausted +- Handles connection retries automatically diff --git a/docs/scripts/auto-level-servant.md b/docs/scripts/auto-level-servant.md index 3e2396cd..38843aa8 100644 --- a/docs/scripts/auto-level-servant.md +++ b/docs/scripts/auto-level-servant.md @@ -1,9 +1,196 @@ # Auto Level Servant -This script automates the leveling and ascension of servants. It's particularly useful for players who want to level their servants to 120. +Automatically enhances a servant's level using embers. -## How to get started +## Overview -1. Go to the Servant leveling screen. -2. Select the servant you want to level up. -3. Click the play button to start the script. +The Level Servant script automatically feeds embers to your selected servant to increase their level. It can optionally handle ascension and even palingenesis (grailing) when the servant reaches maximum level for their current stage. + +## How to Start + +1. Navigate to **Enhancement → Servant** in the game +2. **Select the servant you want to level** +3. The script will automatically detect servant enhancement mode when: + - The "Auto Select" button is visible + - Or the servant ascension/grail banner is visible +4. Start the script + +> **Important**: You must select a servant before starting. The script will exit if no servant is selected. + +![Level Servant](<../assets/scripts/Level Servant.png>) + +![Level Servant with auto select](<../assets/scripts/Level Servant with auto.png>) + +## Workflow + +```text +┌─────────────────────────────────────────┐ +│ Start Level Servant Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Verify Servant is Selected │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Main Enhancement Loop │◄──────┐ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Is Auto Select Visible?│ │ + └─────────────┬───────────┘ │ + │ Yes │ + ▼ │ + ┌─────────────────────────┐ │ + │ Click Auto Select │ │ + │ (Embers selected) │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Confirm Ember Use │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Click Enhance Button │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Confirm Enhancement │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Check for Max Level │ │ + └─────────────┬───────────┘ │ + │ │ + ┌────────────┴────────────┐ │ + │ Max Level │ No │ + ▼ └───────┘ + Handle Max Level + (Ascension/Grail/Exit) +``` + +## Key Features + +### Auto Select Enhancement + +- Uses the game's auto select feature to pick embers +- Automatically optimizes ember selection + +### JP Server Auto-Fill (2025+) + +- For JP servers, supports the auto-fill feature +- Automatically toggles auto-fill ON for faster enhancement +- Handles the new refund window after leveling + +### Max Level Handling + +When the servant reaches max level, the script can: + +1. **Redirect to Ascension** - Navigate to ascension menu and perform ascension +2. **Redirect to Grail Menu** - Navigate to palingenesis menu +3. **Exit** - Stop the script at max level + +### Ascension Automation + +- Can automatically perform ascension when enabled +- Returns to enhancement menu after ascension +- Handles the 3rd ascension dialog properly + +### Grail Automation + +- There's no plan to support automatic grailing +- After Grailing servant, you can run the script again to continue leveling + +### Temporary Servant Support + +- Detects temporary (story support) servants +- Handles the additional confirmation dialog + +## Settings + +| Setting | Description | +|---------|-------------| +| Should Redirect Ascension | Navigate to ascension menu at max level | +| Should Perform Ascension | Automatically perform the ascension | +| Should Redirect Grail | Navigate to grail menu at max level | + +![Level Servant Dialog](<../assets/scripts/Level Servant Dialog.png>) + +## Exit Reasons + +The script will stop and notify you when any of these conditions occur: + +| Exit Reason | Description | +|-------------|-------------| +| **No Servant Selected** | No servant was selected in the enhancement slot | +| **No Embers or QP Left** | Ran out of embers to use or insufficient QP | +| **Max Level Achieved** | Servant reached maximum level (no redirect enabled) | +| **Redirect Ascension** | Navigated to ascension menu (ascension not enabled) | +| **Unable to Perform Ascension** | Could not complete the ascension process | +| **Redirect Grail** | Navigated to grail/palingenesis menu | +| **Perform Grail** | Currently in grail menu | +| **Abort** | Script was manually stopped by user | +| **Unexpected** | An unexpected error occurred | + +## Workflow with Ascension + +```text +┌─────────────────────────────────────────┐ +│ Servant Reaches Max Level │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Is "Redirect to Ascension" Enabled? │ +└─────────────────────┬───────────────────┘ + │ + ┌────────────┴────────────┐ + │ Yes │ No + ▼ ▼ +┌─────────────────────┐ ┌─────────────────────┐ +│ Navigate to │ │ Check for Grail │ +│ Ascension Menu │ │ Redirect │ +└─────────┬───────────┘ └─────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Is "Perform Ascension" Enabled? │ +└─────────────────────┬───────────────────┘ + │ + ┌────────────┴────────────┐ + │ Yes │ No + ▼ ▼ +┌─────────────────────┐ ┌─────────────────────┐ +│ Click Enhance │ │ Exit: Redirect │ +│ Confirm Ascension │ │ Ascension │ +└─────────┬───────────┘ └─────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Return to Enhancement Menu │ +│ Continue Leveling │ +└─────────────────────────────────────────┘ +``` + +## Tips for Best Results + +1. **Select your servant** before starting the script +2. **Have sufficient embers** of the appropriate class +3. **Ensure adequate QP** for enhancement costs +4. **Configure ascension settings** based on your needs +5. **For JP users**: Auto-fill will speed up the process significantly + +## Technical Notes + +- Maximum 5 retries for confirmation dialogs +- Handles connection issues automatically +- Detects "Low QP" minimum ember selection dialog +- Supports both regular and temporary servants +- Debug mode may interfere with redirect detection diff --git a/docs/scripts/auto-level-skills.md b/docs/scripts/auto-level-skills.md index 6e1091ce..0e258103 100644 --- a/docs/scripts/auto-level-skills.md +++ b/docs/scripts/auto-level-skills.md @@ -1,24 +1,195 @@ # Auto Level Skills -This is a script that lets you automate the leveling of your skills. By tapping and reading the skill level programmatically, you can level up your skills with just initial setup. +Automatically upgrades servant skills to your desired level. -## How to get started +## Overview -1. Go to Skills screen. -2. Select servant you want to level up its skills. -3. Click the play button to start the script. -4. Setup the target level you want to reach. +The Level Skill script automatically enhances your servant's skills by repeatedly clicking the upgrade button until they reach the target level. It supports upgrading all three skills with individual target levels and provides detailed exit state information. -## Exit scenarios +## How to Start -- Ran out of materials. +1. Navigate to **Enhancement → Skill** in the game +2. **Select the servant** whose skills you want to upgrade +3. The script will automatically detect skill enhancement mode when: + - The "Skills" banner is visible in the enhancement menu +4. **Configure which skills to upgrade** and their target levels in settings +5. Start the script - When one of the skills you are currently leveling up cannot proceed to due to lack of materials, the script will stop leveling up that skill and move on to the next one. +> **Important**: You must select a servant before starting. The script will exit if no servant is selected. -- Ran out of QP - - The script will stop leveling up skills when you run out of QP. You can resume the script once you have enough QP to continue. +## Workflow -- Reached the target level +```text +┌─────────────────────────────────────────┐ +│ Start Level Skill Script │ +└─────────────────────┬───────────────────┘ + │ + ▼ +┌─────────────────────────────────────────┐ +│ Verify Servant is Selected │ +└─────────────────────┬───────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ For Each Skill (1-3) │ + └─────────────┬───────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Should Upgrade This │ + │ Skill? (Check setting) │ + └─────────────┬───────────┘ + │ + ┌────────────┴────────────┐ + │ Yes │ No + ▼ ▼ +┌─────────────────────┐ ┌─────────────────────┐ +│ Click Skill Icon │ │ Skip to Next Skill │ +└─────────┬───────────┘ └─────────────────────┘ + │ + ▼ + ┌─────────────────────────┐ + │ Skill Upgrade Loop │◄──────┐ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Read Current Level │ │ + │ (Using OCR) │ │ + └─────────────┬───────────┘ │ + │ │ + ▼ │ + ┌─────────────────────────┐ │ + │ Target Level Reached? │ │ + └─────────────┬───────────┘ │ + │ │ + ┌────────────┴────────────┐ │ + │ Yes │ No │ + ▼ ▼ │ + Move to Click Enhance│ + Next Skill Button │ + │ │ + ▼ │ + ┌─────────────────┐ │ + │ Confirm Upgrade │ │ + └────────┬────────┘ │ + └──────────┘ +``` - When the script has leveled up all the skills to the target level, it will stop automatically. +## Key Features + +### Individual Skill Configuration + +- Configure each skill (1, 2, 3) independently +- Set specific target levels for each skill +- Enable/disable upgrade for each skill + +### OCR Level Detection + +- Uses optical character recognition to read current skill level +- Accurately tracks progress during enhancement +- Detects when target level is reached + +### Resource Monitoring + +- Detects insufficient QP (currency) +- Detects insufficient materials +- Stops and reports which resource ran out + +### Comprehensive Exit State + +- Reports starting level for each skill +- Reports ending level for each skill +- Reports why each skill stopped (target met, out of mats, etc.) + +## Settings + +| Setting | Description | +|---------|-------------| +| Should Upgrade Skill One | Enable/disable skill 1 upgrade | +| Should Upgrade Skill Two | Enable/disable skill 2 upgrade | +| Should Upgrade Skill Three | Enable/disable skill 3 upgrade | +| Skill One Upgrade Value | Number of levels to upgrade skill 1 | +| Skill Two Upgrade Value | Number of levels to upgrade skill 2 | +| Skill Three Upgrade Value | Number of levels to upgrade skill 3 | + +> **Note**: Target level = Minimum (starting) level + Upgrade value + +![Level Skill](<../assets/scripts/Level Skill.png>) + +![Level Skill Dialog](<../assets/scripts/Level Skill Dialog.png>) + +![Level Skill with unavailable slots](<../assets/scripts/Level Skill Limited.png>) + +![Level Skill with unavailable slots Dialog](<../assets/scripts/Level Skill Limited Dialog.png>) + +## Exit Reasons + +### Overall Script Exit + +| Exit Reason | Description | +|-------------|-------------| +| **Done** | All configured skills have been processed | +| **No Servant Selected** | No servant was selected in the enhancement slot | +| **Ran Out of QP** | Insufficient QP to continue upgrades | +| **Abort** | Script was manually stopped by user | +| **Unexpected** | An unexpected error occurred | + +### Individual Skill Exit + +Each skill can exit with one of these reasons: + +| Skill Exit Reason | Description | +|-------------------|-------------| +| **Target Level Met** | Skill reached the configured target level | +| **Out of Mats** | Insufficient materials for this skill | +| **Out of QP** | Insufficient QP for upgrade | +| **Exit Early (QP)** | Skipped because previous skill ran out of QP | +| **No Skill Upgrade Error** | Upgrade value was 0 | + +## Exit State Summary + +After the script completes, you receive a detailed summary: + +```text +┌─────────────────────────────────────────┐ +│ Exit State Summary │ +├─────────────────────────────────────────┤ +│ Skill 1: │ +│ • Checked: Yes/No │ +│ • Available: Yes/No │ +│ • Starting Level: X │ +│ • Ending Level: Y │ +│ • Target Level: Z │ +│ • Exit Reason: Target Met / Out of X │ +├─────────────────────────────────────────┤ +│ Skill 2: (same format) │ +├─────────────────────────────────────────┤ +│ Skill 3: (same format) │ +└─────────────────────────────────────────┘ +``` + +## QP Cascade Effect + +If a skill runs out of QP, subsequent skills will be marked with "Exit Early (QP)": + +```text +Skill 1: Out of QP ──► Skill 2: Exit Early (QP) ──► Skill 3: Exit Early (QP) +``` + +This prevents unnecessary attempts when QP is already depleted. + +## Tips for Best Results + +1. **Check your materials** before starting to ensure all skills can be upgraded +2. **Have sufficient QP** for all planned upgrades +3. **Set realistic targets** based on your available resources +4. **Note skill availability** - Skills 2 and 3 may be locked on newer servants +5. **Configure all three skills** if you want to upgrade multiple in one run + +## Technical Notes + +- Skills 2 and 3 availability is checked before attempting upgrade +- Temporary servants are handled with additional confirmation +- Uses regex pattern matching for level detection: `(\d+)(?:/1|/10)?` +- Connection retries are handled automatically