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

Hold lotto spin button QoL for faster rolls #1936

Open
1 task done
sby1ce opened this issue Dec 20, 2024 · 15 comments · May be fixed by #1934
Open
1 task done

Hold lotto spin button QoL for faster rolls #1936

sby1ce opened this issue Dec 20, 2024 · 15 comments · May be fixed by #1934
Labels
alpha feature It is already on alpha enhancement New feature or request

Comments

@sby1ce
Copy link

sby1ce commented Dec 20, 2024

Preparation

  • No one has asked for this feature before in other issues (even the closed ones)

Describe the feature

It's now faster to spin lotto boxes using the new QoL feature on JP that by holding the button instead of tapping it.

I can submit a PR for this feature.

@sby1ce sby1ce added the enhancement New feature or request label Dec 20, 2024
@ArthurKun21
Copy link
Collaborator

I've actually did some work on this already. But I'm still doing some adjustments

@ArthurKun21 ArthurKun21 linked a pull request Dec 21, 2024 that will close this issue
4 tasks
@ArthurKun21
Copy link
Collaborator

ArthurKun21 commented Dec 21, 2024

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12443287887/artifacts/2351435676

Not exactly the best implementation, but hey it kinda works

@ArthurKun21 ArthurKun21 added the alpha feature It is already on alpha label Dec 21, 2024
@sby1ce
Copy link
Author

sby1ce commented Dec 21, 2024

It seems that if the long press stops as the box runs out, it gets stuck on this box reset notification screen.
HD-Player_qsHzf37lvI

It eventually clicks and continues but at the same time the clicks will most likely press the roll button and the script will have to wait for the box to slowly open until the button reappears to long press it again.

The long press can also stop just as a box starts to open and it seems that the game doesn't recognize a long press if it happens with too little delay from the previous long press.

Adding more delay between long presses looks like the way to fix both issues.

@sby1ce
Copy link
Author

sby1ce commented Dec 21, 2024

Also may I ask here to increase max gold ember count from 600, since JP inventory size is 900 now :)

@ArthurKun21
Copy link
Collaborator

I'm going to add button clicks after every long press just in case.

397925200-62e62d6b-cdaa-4edf-a9d0-2e9d88a4d2c9

And I did a 100 boxes for testing already and just encountered this once iirc, during the initial 1 ~ 10 boxes.

@ArthurKun21
Copy link
Collaborator

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445088485/artifacts/2351729946

@sby1ce
Copy link
Author

sby1ce commented Dec 21, 2024

It seems that if the long press ends and the roll button is available to press, these button clicks start opening the box but not skip the slowly appearing prizes. It happens pretty consistently too.

The game also sometimes just ignores the long press so everything gets stuck until it ends

@ArthurKun21
Copy link
Collaborator

hmm yea this is kinda a problem with the current long press for lottery. Sorry I don't have answer right now, might get back to this after lotto ends.

In the mean time, you can try adjusting the long press(secs) duration.

@sby1ce
Copy link
Author

sby1ce commented Dec 21, 2024

When I hacked together a solution on my own, simply adding a delay after the long press seemed to solve this.

private fun spin() {
    locations.lottery.spinClick.longPress(20)
    3.seconds.wait()

@ArthurKun21
Copy link
Collaborator

okay, I'll try it then. Just wait for the build

@ArthurKun21
Copy link
Collaborator

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445317491/artifacts/2351763896

@sby1ce
Copy link
Author

sby1ce commented Dec 21, 2024

Thanks, works nicely now

@ArthurKun21
Copy link
Collaborator

if anyone will check this. This is the working build btw

https://github.com/Fate-Grand-Automata/FGA/actions/runs/12445555911/artifacts/2351800801

@vybze
Copy link
Collaborator

vybze commented Dec 24, 2024

Stopping fga doesn't stop the long press until the time set runs out

@ArthurKun21
Copy link
Collaborator

it is on Android and Accessibility Service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha feature It is already on alpha enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants