Giter VIP home page Giter VIP logo

fga's Introduction

Fate/Grand Automata

CI

Discord Banner 2

Auto-battle app for FGO (Android 7 or later, no need for root on phones).

Download from our website

This is a Kotlin port of FGO-Lua as an Android app with UI for configuration and without a time-limit on use.
It doesn't tamper with the game in anyway and works by looking at the screen and tapping things just like a normal user would do.
It's not made to do the story for you, but to automate the mundane farming.

Having Trouble? See the Troubleshooting Guide first.

Video Guide by @reconman

Watch the video guide

How to Use?

  1. Install from the link given above and launch the app.
  2. Click on Start Service and give all the permissions it asks for.
  3. Open FGO. Now, you can see a button with play icon on it floating on screen.
  4. Go to the node you want to farm.
  5. Press Play to start. The same button can be pressed to pause/stop later.

Check the Troubleshooting Guide first if you face any problems.

How to make/use images of Servant/CE/Friend?

See the wiki page for Support Image Maker.

What about other scripts like Lottery and Friend Gacha?

When you click on the PLAY button, the app detects which script can be run on the current screen and presents it to you.

How does it work?

This is a native Android app written in Kotlin. We use OpenCV for image recognition, Media Projection for taking screenshots and Accessibility Service for clicking/swiping.

Contributing

If you want to contribute, read the Contribution Guide.

Acknowledgements

Like the project? Want to support us?

Buy Me a Coffee at ko-fi.com

Code/doc contributions are surely welcome!

Translations should be edited via https://poeditor.com/join/project/67PXOyBGI0

fga's People

Contributors

arthurkun21 avatar binga288 avatar dependabot[bot] avatar echoscrip avatar endo613 avatar fa-gray avatar item4 avatar jcdeoferio avatar kobata avatar lineeee217 avatar mathewsachin avatar metlee avatar minhducsun2002 avatar patwakeem avatar potchy avatar reconman avatar renovate-bot avatar renovate[bot] avatar scathachskadi avatar shineburst avatar squaresmile avatar the3dsandwich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fga's Issues

No easy way to use friend support selection mode

From what I can tell, the friend support selection mode also works by loading an image, but the SupportImageMaker does not create images of the friend name, so there's no way to use that mode without figuring out how to crop an image yourself.

Allow different card priorities on different waves.

On the node that I am currently farming, I want to blitz through wave 1, so I have the card priority set to the default BAQ. On wave 2 however I want to prioritise quick cards (even resisted quick cards) because I know that I can kill the wave with an NP and I want extra stars for wave 3.

Run AccessibilityService in different process

Right now, if you kill the MainActivity by swiping the app from task list, then the process is killed.
The AccessibilityService running in the same process also gets killed.
But, the switch in the Accessibility settings still shows it as ON.
Next time you launch the app, you have to go to Accessibility settings, turn OFF the service and then turn it ON again.

The tradeoff with this bad experience is that it is simple to implement.
A static instance of the AccessibilityService can be used for communication.

This problem can be solved if we run the AccessibilityService in a different process.
But, communication with it will be a challenging task here. Messenger IPC looks the most promising here. There is also the problem with SharedPreferences not working across processes.


I tried implementing this, but multiple processes were not working well.

I'm dropping this for now.

Script clicking too fast after order change

MAKE SURE YOU TESTED THE LATEST RELEASE.

See 'SAMSUNG.md' first, if you're a Samsung user.
Ignore notch is already activated

Describe the bug
So im grinding apocrypha raid, after order change the script is programmed to use second waver first skill, but because the order change is not finished yet , it click the first skill too soon and open the second servant info.

Screenshots
If applicable, add screenshots to help explain your problem.
If an error occurred, you can find the message by expanding the app's notification.
It is recommended that you atleast add one screenshot of FGO running on your device.

i think the description is enough. if need something for ss tell me.

Device Info (please fill atleast 'Device model'):

  • Device model: [Samsung s9+]
  • Screen size: [2220*1080]
  • Android Version: [Android 10]
  • RAM: [6 GB]

App stops itself on wave 2 or 3

Hi,

I'm trying to farm with this app; it seems to stop itself on wave 2 or 3 consistently; I end up having to tab to the app and hit "toggle" to get the play/stop button to show up again. The button disappears when I have more than 4 skills used in a row. I deactivated battery optimization per dontkillmyapp.com instructions, and I'm not sure what else I can do. I'm running a Samsun S8 with WQHD+ resolution

Thanks!

Changing the click for targetables skills

I am currently farming Siegfried raid. I choose Chiron, Ishtar and Gil as my prefered support servants in autoskill. I set up my autoskill so I can use Chiron third skill and target himself when the script get him as my support. But Gil and Ishtar thirds skill aren't targetable so when they're in combat with my autoskill setup the script click a bit too low and it popup the servant info which break the rest of the autoskill setup (can't click on skills nor attack button).
If the click was I bit higher the servant info wouldn't popup even if I trigger a non-targetable skill in my targetable skill setup.

To sum up:

I think the script click around here if I want to target Chiron with his targetable third skill : https://puu.sh/FCFU4/a7b34268b0.jpg

If I the script choose another of my prefered servant (Gil or Ishtar) when it tries trigger the third skill it also click in the abovementionned area which popup the servant info and break the rest of the command setup : https://puu.sh/FCFUg/d22e897619.jpg

If the click for targetable skills was around here : https://puu.sh/FCFTT/f55b80bbc8.jpg

it would still target if it's a targetable skill and wouldn't popup the servant info if it isn't a targetable skill.

Device Info (please fill atleast 'Device model'):

Device model: Honor 8X
Screen size: 2340 x 1080
Android Version: Android 8.1.0
RAM: 4 GB

Tends to Stop in Subsequent Repetitions

Hello again!

When running the script, still farming the 40ap QP node it runs the first full quest flawlessly. It'll refill, pick the node again, pick support again and start the quest without fail. It then will fail any time after the first skill activates. I've had it fail as early as the first repetition (so 2nd quest) after activating the first skill. I've also had it not fail for about 5 runs on the high end. Stopping the script by tapping play and restarting it in between runs doesn't seem to help.

When "failing" the application will stop executing commands, the play button will disappear and the app will say the "Accessibility Service Running" message like on first start up. I then have to tab over to the automata app and toggle the application off and on again, then it functions as above before failing again.

Failing to Select Support Properly

On the support selection screen the app fails to scroll or even pick a given support when the preferred is on screen. It just does nothing. Phone info Samsung Galaxy s20 Ultra 5G. FGO Running in full screen mode (aka blue bars on the side).

Option to use daemon

With the other fgo script, Media Projection does not work at all and same thing is happening with this one, i need daemon to even used the scripts in the first place with my nox setup. Pleases give us an option to just enable/auto enable, so the script can run instead of it doing nothing at all and making others confused on what's wrong with the app.

Make the play/stop button a bit bigger

I have trouble getting the button to activate sometimes. A little bigger, or option to adjust the size per user's preference, would be nice. No rush though, it's a little thing.

FGO became lag or freeze when selecting servant skill when this app is running

I was yet unable to complete even one run with this app. When the app selects the servant skill, the FGO became freeze and only became normal after over 10 seconds. I had not encountered this problem while using AnkuLua.

To make sure, I tried a run with AnkuLua. It runs smoothly and successfully completed a run.
After that, I closed AnkuLua and run Automata. The lag or freeze usually happens at wave 2 when selecting skill.

Device details

Device: Xiaomi Mi A2 Lite
Android: Android 9
RAM: 4GB
Server: JP

Use file selectors instead of Strings for PreferredServants and PreferredCEs

Right now you have to type in the file paths with the Android keyboard, typos are dangerous.

It would be a great feature if a list of files in the support folder are shown when you want to edit the Servant or CE values.

You should be able to select multiple Servants or CE files at the same time and there should be some way to mark CEs as MLB.

Btw, when I saw the speed of your support selection script, I was like this:

Script occasionally clicks on Party creation help button on Party selection screen

Describe the bug
On FGO NA, instead of starting the battle, occasionally, the script causes FGO to show the Party creation help screen. This should be happening due to the help button moving to the right due to the See Event Bonus Details button and the BoostItem code clicking on it.

Currently, we have 4 values for Boost item:

  1. Disabled
  2. Item 1
  3. Item 2
  4. Item 3

This can be solved by adding a new value None which should work like the current disabled, meaning that we don't want to use the available boost items.
Disabled should be changed to not run the boost item code at all.

Screenshots
party

Device Info (please fill atleast 'Device model'):

  • Device model: Xiaomi Redmi 4
  • Screen size: 1280x720
  • Android Version: Android 7.1
  • RAM: 3GB

Support selection issues on JP

Tried running it for the first time after setup and I keep crashing on the support select screen, regardless if I have it set to select first or preferred using the default skadi, merlin, waver selected.
Says "attempt to read from field 'long.org.opencv.core.Mat.nativeobj' on a null object reference".

Just to mention some background; this is with the JP version and "Japanese" selected on the game version within the app. Android 10 on Galaxy 9s+

AutoSupport scrolls too far

On my device, the AutoSupport script scrolls too far when no Event Bonus filters are set.

The script will scroll 2 1/2 entries, so it goes from this:

To this:

The amount of scrolling should be reduced, so the 3rd entry is fully shown once.

Replace card priority String with a drag and drop Listview

In the Ankulua script, there are 2 options for card priority, simple and advanced mode.

Simple only offers setting the priority of Buster, Quick, and Arts. Advanced offers setting the priority of Weak Buster, Normal Buster, Resistant Buster, ...

I think the App should make it possible to set the priority using a Listview where the entries can be dragged and dropped. The higher up they are, the higher the priority.

I have already found a few projects for Listviews with drag and drop functionality, for example https://help.syncfusion.com/xamarin/listview/item-drag-and-drop

Btw, I personally always use "WB, WA, WQ, B, A, Q, RB, RA, RQ". We could use that as default priority.

App says no preferred servant or CE is configured when no Autoskill configurations are set

Even if i put the app to choose the first servant it doesn't choose it so i can't start battles automaticly. Also, even if I choose the servant I have to tap the start button because the app doesn't do it.
phone’s model number: SM-A520F
Android version: 7.0
NA
Support Setings:
Ascension settings: ON
Spiritron Costume settings: OFF
Message Display: ON
No blacklisted users

Set up pipeline for the master branch

When anything is committed or merged to the branch, a pipeline should be triggered which builds the current APK from that master branch.

At a later date we could also automate releases, Azure supports publishing to Github.

I've spent quite some time today finding out how to get Azure Pipelines to work with the project. https://dev.azure.com/reconman/Fate-Grand-Automata/_build/results?buildId=2&view=artifacts&type=publishedArtifacts

I would suggest us chatting privately because it involves many steps. I have Discord and Skype accounts.

Introduce a wait multiplier for slow devices

The original Ankulua script has problems on some devices or emulators because it doesn't wait long enough.

Users should be able to influence the wait time, otherwise they have to build their own versions of the APK.

For this purpose, something like a wait multiplier should be introduced, which is used in every AutomataApi.Wait() call. The actual waiting time will then be waitTime * waitMultiplier.

A value of < 1 should also be allowed for JP and for future NA versions with the new Unity engine.

Stuck in support list on version 0.10.1

MAKE SURE YOU TESTED THE LATEST RELEASE.

See 'SAMSUNG.md' first, if you're a Samsung user.

Describe the bug
A clear and concise description of what the bug is.
Include steps to reproduce the error if required

After updating to version 0.10.1 the app is not able to select a support servant and keeps looping through the support list until timeout

Screenshots
If applicable, add screenshots to help explain your problem.
If an error occurred, you can find the message by expanding the app's notification.
It is recommended that you atleast add one screenshot of FGO running on your device.

https://imgur.com/a/C2KB1OH

Device Info (please fill atleast 'Device model'):

  • Device model: Xiaomi Poco phone F1
  • Screen size: 2246x1080
  • Android Version: Android 10
  • RAM: 6GB

Support selection is not done from top to bottom but is random

When selecting a preferred Servant or CE, a random matching one is chosen instead of the one at the top of the current screen.

So if there are 2 Merlins with Chaldea Lunchtime on the screen at the same time, a random one gets picked.

This is counterintuitive, even if it saves performance.

If the card priority is not set, it will be BAQ, regardless of weak or resistant

After having to reset my app a few times during debugging, I noticed that the app would pick buster cards, even if they were not weak.

The only explanation for that is that the default value for the card priority is BAQ instead of wB wA wQ and so on.

A small thing that will probably be fixed in the course of this bugfix: if the user has never opened the card priority menu, the text below it with the card priority String will be empty.

Wrong support selected.

This happened with both older versions and the newest one.

Describe the bug
Very rarely, a tamamo with mona lisa is selected instead of the preferred Merlin with a mona lisa. I have nothing set as the defaults (Both Servant and CE are set as any) and merlin and mlb mona lisa selected for the specific autoskill that I am using. This is also not always selecting tamamos with monalisas. I have watched it scroll past them before no problem. It is also very uncommon. I think it has been 4 or 5 times out of maybe 70-100 runs with merlin. I don't have a recording of it happening, since screen recording software seems to conflict with this app, but it happened once when I had just looked at my phone, so there shouldn't have been any notifications or popups that might have caused interference.

It happens so infrequently it is kind of hard to test. It's not too big of a deal either, but figured I should submit a report anyway. Thanks for working on this

Device Info (please fill atleast 'Device model'):

  • Device model: Google Pixel XL
  • Android Version: 10

Stuck in a start quest loop

MAKE SURE YOU TESTED THE LATEST RELEASE.

See 'SAMSUNG.md' first, if you're a Samsung user.

Describe the bug
Script keeps pressing the screen at the start quest location no matter what screen is visible. Just catches the first support on the list, then changes party around rather than starting quest. If you start script after selecting support, it keeps clicking that same spot.
Tried clearing app cache, restarting device, switching to manual support selection. Started second time using ver 10, still occurring with ver 10.1

Screenshots
Screenshot_20200422-151717_Video Player

Screenshot_20200422-122913_XRecorder
Screenshot_20200422-123101_XRecorder

Device Info (please fill atleast 'Device model'):

  • Device model: samsung galaxy tab a 2017, SM-T380
  • Screen size: [e.g. 1280x720] (not sure where to find this)
  • Android Version: 9
  • RAM: 2GB

Story Skip does not work reliably

Having Story Skip enabled, the app will often not skip the story.

The probable cause is that the Story Skip image is transparent and that the current app does not support masking.

Using Support Image Maker from Friend List

Refreshing to find the right Servant or CE on the support selection screen is really a hassle.
Making images from Friend List would be much easier.

I'll be working on this soon.

Support class selector

Right now the app scrolls through the class you are seeing in the moment of the execution.

I suggest to include an option on the settings to indicate which class is the support to go directly to the desired column to scroll.

Denying root permissions crashes the app

Here are the steps to reproduce the issue on Nox:

  1. Enable root mode
  2. Start the Service
  3. Deny the SU permission
  4. Try stopping the Service

Then the app will crash.

Make the play button movable like in Ankulua

When I have started the service and want to change a setting in the app, the play button will hover over the button for switching the keyboard from ABC to special characters.

I have to stop the service to make the play button disappear.

There should be a way to drag and drop the play button like in Ankulua.

OpenCV Assertion Failed

I'm on an s10 plus, and I'm getting the attached error when trying to activate the script from within the FGO app itself when I hit play. I can hit play in other apps but when switching to FGO it does nothing.

Other info:
using auto AP, skill, preferred support (mona lisa), EN server.
Screenshot_20200419-225023_One UI Home

Porting the app to Windows

If we're able to run the app on Windows, we'll be able to use any version of Android on an emulator to play the game.

Due to the way the app is written, we can pretty much share all the code which is not in the Android project.
I already am experienced with writing Windows apps, so I hope this won't be much difficult.
But, don't hope too much on this or expect it to happen soon.
I'll only start working on this once the Android version becomes more stable.

Selected Autoskill Config will show old values after renaming or deleting the configuration

If you select an Autoskill Config and then rename it, its old name will be shown. (see grey text under Selected Autoskill Config)

If you press the play button while it's in this state, it will run the renamed Autoskill configuration without any problems.

If you however delete the configuration, it will pick a random configuration when you press play and if you click on Selected Autoskill Config, nothing will be shown as selected.

Quest closeouts fail with bond level up screen

MAKE SURE YOU TESTED THE LATEST RELEASE.

See 'SAMSUNG.md' first, if you're a Samsung user.

Describe the bug
Game takes too long to load the bond level up screen(s) after battle completion, so the rapid taps for clearing the various pop-ups begin too early and miss clearing the material drops to fully exit the quest. Then the app just sits there waiting for manual clearing the screen before resuming the script with the next battle.

[Enhancement] Option to delete and rename CE/support Servant image from App

Sometimes event already passed and the rerun is already done, it will help to remove some steps if we can remove unused ce/servant image to save memory from app, can be a little trash bin icon per item (with confirmation) on the selection menu.

EDIT: rename function is good too, to rename image from support maker

Thanks mathew for this good app, really looking forward how this app will grow in the future.

Lessen time between skill selection and target selection

Phone: Samsung Galaxy S9, no notch

Is there a reason for the lag between selecting a skill and then the target for the skill? It seems to sit on the "Select Target" window for about two seconds even though the script tells it exactly what to do. Or is it because it doesn't know it's a targetable skill so it's the usual lag between button presses? In that case, it seems like you could parse it so if there's a target after a skill to do the target immediately?

Sorry if this is a known issue or I'm completely off base.

Screenshots/Clicks/Scroll using Root

We'll add support for taking screenshots and doing clicks and scrolls using root.
This will allow the app to run on Android 5 phones and emulators.

FGO JP should work with root by default.
You can use MagiskHide with FGO NA till the engine update arrives.

Don't expect immediate availability. We'd need some time to implement and test this.

And, please don't ask for daemon support, AFAIK that's AnkuLua specific thing. We don't want to spend time on implementing something like that since it doesn't work on Android 8+ anyway.

Make autoGameArea configurable

Some devices have weird notch logic like the Samsung Galaxy A50 in this example:

The widths are as follows:
notch: 77px
left blue bar: 133px
right blue bar: 172px
right white bar: 39px

Seems like FGO treats the notch and the white bar as usable area. On my device, FGO does not use the notch area, so the blue bars on the left and right are the same size.

The app will only work for this device if you can set autoGameArea to false.

Using MC skills still skips any subsequent actions.

MAKE SURE YOU TESTED THE LATEST RELEASE.

See 'SAMSUNG.md' first, if you're a Samsung user.

Describe the bug
I just did a couple of runs with the new v11.4 update and the problem still exists for me. Also it's not just limited to the Order Change for me, using any MC skill causes a delay big enough that any subsequent actions get clicked even before the animations are completely over. Could you create an optional apk with increased wait times by 5-10 seconds for all MC skills? I think that should fix it for me.

Screenshots
Dunno if screenshot is required for this.

Device Info (please fill atleast 'Device model'):

  • Device model: [Samsung A9 Pro]
  • Screen size: [1920x1080]
  • Android Version: [Android 8.0.0]
  • RAM: [4 GB]

Weird clicking behavior when script changes targets.

MAKE SURE YOU TESTED THE LATEST RELEASE.

See 'SAMSUNG.md' first, if you're a Samsung user.

Whenever I use the change target command in my autoskill it changes the target successfully but them it spams a bunch of clicks on the top right corner of the screen. It doesn't really mess up with anything but I don't think that's supposed to happen.

Screenshots
https://i.imgur.com/Vre98sL.pnge.

The random clicks happen at the top right blue corner.

Device Info (please fill atleast 'Device model'):

  • Device model: Samsung A9 Pro
  • Screen size: 1920 x 1080
  • Android Version: Android 8.0.0
  • RAM: 4 GB

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.