StarRailCopilot icon indicating copy to clipboard operation
StarRailCopilot copied to clipboard

Currently, this implementation focuses on collecting achievements.

Open kingchenc opened this issue 6 months ago • 5 comments

Like I said on Discord, Im adding this because its such a headache to collect them manually. :D

Currently, this implementation focuses on collecting achievements. The structure is designed to be extensible, allowing for future enhancements such as collecting event rewards or other in-game rewards as needed.

  • Core routine for navigating to achievement areas. -Image-based detection and interaction with claim buttons. Logic to handle scrolling and processing multiple sets of rewards. Ensured screen state is up-to-date for image detection by adding self.device.screenshot() calls after screen-changing actions.

kingchenc avatar May 12 '25 00:05 kingchenc

i update later

kingchenc avatar May 12 '25 01:05 kingchenc

read dev docs first https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/1.-Start using sleep is not allowed, run python -m dev_tools.button_extract and python -m module.config.config_updater to generate assets and gui settings

LmeSzinc avatar May 12 '25 11:05 LmeSzinc

Okay thanks sir, I will stick to not using sleep and those two files for generating assets and GUI settings.

I adding universe rewards too, but I am on holiday now - will update when I am back.

kingchenc avatar May 12 '25 14:05 kingchenc

@LmeSzinc Had a bit of time before holiday, reworked main collector, achievement collector, simulated universe collector and more... check it out.

Still some left for automatic reward collecting, but not yet - if I get more time, I will add more.

kingchenc avatar May 13 '25 02:05 kingchenc

read this also https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/4.4.-State-loop

  1. To write a robust bot you need to imagine every operation have a chance to fail, every clicks may not be responded, every sleep may not lead to the next game page. We use the state loop to ensure everything must success or raise error, which contains retry mechanics and wait mechanics.
  2. Don't use adb_shell(['input', 'keyevent', '111']). SRC has several underlaying device control implementation not just adb, to go back you need to click the back button and confirm it reached the target page. Also, KEYCODE_ESCAPE is vary on game clients. cloud games and some apps would treat as close app.
  3. Coordinates should not be manually written, unless they are arbitary values that don't need to be exact, they should be maintained by assets

LmeSzinc avatar May 18 '25 17:05 LmeSzinc