-
Notifications
You must be signed in to change notification settings - Fork 11
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
BAAuto & Ideas #1
Comments
First of all, thank you for trying AAS. I'm actually surprised of how fast that anyone would try this out and write a reply to me because I've just uploaded the code last week and updated English GUI support yesterday. I would appreciate it if you can report any problem of using the script, including bugs, As for BAAuto, I will check that out whether I can implement your ideas in AAS in my spare time. I'm currently struggling on how to combine multiple server support with OCR on specific keyword (e.g. School names in Schedule, student names, shopping, etc.). Please feel free to make any contribution to this project. |
I think the best solution would be directly contacting LmeSzinc, ALAS developer, as they have experience in this matter. Otherwise, my solution for your issue would be like this. Let's consider shop. My approach would be creating a directory named 'shop,' which will contain multiple JSON files. Each JSON file should be named after the respective server, such as 'EN.json,' 'JP.json,' 'CN.json,' etc. These JSON files will contain dictionaries that map item names in English to their corresponding translations in the server's language. For instance: {
"Novice Activity Report": "Translation in Japanese",
"Normal Activity Report": "Translation in Japanese",
...
} You can then easily perform OCR like this: with open(f"{server}.json", "r") as f:
items = json.load(f)
find(items["Normal Activity Report"]) To obtain a JSON file containing the names of all items, you could either perform web scraping using the python libraries BeautifulSoup and requests or search for repositories on GitHub that contain them. For web scraping and if the data is stored as a table, the easiest way would be to use Excel 'get Data from web', export it as csv or .txt file and then convert it to json using python. I have some json files for student names if you need them, however they are stored as a list. Here is a website that displays the shop items in English: |
For student names, If you only want to invite students in the cafe, my approach in BAAuto was as follows: I created a combo box that dynamically displayed student names based on the server language. For instance, if the server was set to CN, the combo box would show Chinese names, and if it was set to EN, it would display English names. Users still had the option to manually enter a student's name if needed. The algorithm I used for this task is quite straightforward:
Here is the source code if you need it. |
Also, for Bounty and Scrimmage, I would recommend using numerical stage designations instead of alphabetical letters, such as '01' instead of 'A.' This is because the positions of the number is always consistent between different languages. To read numbers like AP, stage, area, or sweep counter, use the pponnxcr en OCR model as it is more accurate. |
(My English is not so good but I hope I've made my explanation clear) |
I clearly understand what you mean and you are also more familiar with the ALAS framework than me so I think your solution would be the best. Also to be more specific for finding the button:
This would be the simplest approach, however, my implementation in BAAuto is more reliable but slower. |
Hi, I thought it would be difficult and time consuming for you to implement Mission/Commissions/Event, so I isolated it from BAAuto and now you can use it for AAS. You just need to read MCE\config.json and implement the algorithm. https://github.com/RedDeadDepresso/MCE-Manager This is just a temporary solution, and it would be better if you implement it in AAS GUI later yourself. |
I've implemented functions of interacting with stage list in the latest commits of dev branch, which supports finding specific index number and clicking corresponding enter button. The approach of finding the desired button is originated from the solution you provided. It seems working fine in early test, and I will try implementing Mission in a few days. |
If you intend to implement Shop, Momotalk or Crafting, I have no idea. You can get inspiration from pur1fying's script or https://github.com/baas-pro/baas, which I found recently. I tried to contact its developer to help with AAS but they didn't give any response. |
|
Thank you for your help; you've clarified some of my doubts. Please don't feel obligated to rush and take your time, I'm just offering ideas and guiding you towards resources to assist you. So for step 2,
I think you can reuse this function to check if the student icon is shaded black: def is_obscured(cls, location, template_shape):
"""Check if the template match is obscured by surrounding pixels.
Args:
location (tuple): Location of the template match.
template_shape (tuple): Shape (height, width) of the template.
Returns:
bool: True if obscured, False otherwise.
"""
# Extract the region around the template match
x, y = location
region = cls.color_screen[y:y+template_shape[0], x:x+template_shape[1]]
# Calculate the average darkness level of the region
avg_darkness = numpy.mean(region)
# You can adjust the darkness threshold as needed
darkness_threshold = 100
return avg_darkness < darkness_threshold |
|
I only need to make popup assets but I need some clarification. Can you explain where do you get: |
|
For running AAS GUI from source code, firstly you need to install the requirement. However, some of the auto generated requirements is in incorrect version so the script doesn’t work if directly using that. It’s a pity that I haven’t got time to write a detailed document for running from source code. I guess the script could run under environment that provided by the toolkit (within the installation of Released version), so you may try that out. If that doesn’t work, I will check the correct version of the modules that cause this problem. |
For the lesson, to navigate, I would go to the lesson page and then scroll up and click on the first school. I would then create a list of school names images, iterate through it, and find which one matches the current school name in the top-right corner. After that, I would determine which direction to click (left or right), by checking if the current school index is greater or less than the target school index. I would click as many times as the difference in index between the two. I believe this is the implementation of pur1fying based on my reading of the source code, but I'm not entirely sure. This approach is better because template matching is faster and more reliable than OCR. For the rest, you can implement whatever you prefer. |
I want to suggest for the GUI to create a tree view Farming and Claim Rewards with the same options as BAAuto. Also, would it possible to hide Dashboard Upd since the user cannot modify it? |
Aditionally, I was thinking of a feature called Auto-Event. While playing through the new event story and quest, I noticed that it was mainly about waiting and clicking buttons. Since you have already implemented searching stages, it should be straightforward. The events don't have tile gameplay. I used BAAuto to sweep through many events, and the only thing I had to change was the event banner. This feature is pretty much similar to Continuous Clear in Alas. Now, let's delve into the GUI options:
Here's how it functions:
|
If every thing is working fine with EN, you can open a PR after sufficient tests. |
1 - I've already included the survey popup in the assets but I was thinking that would it not be possible to simply click on the top right corner if an unknown page is found when running login? All login popups have a cross there. 5 - I noticed that aas.py is the script and the GUI is modifying config/config.json. Since this approach is very similar to BAAuto, I could adapt it and provide it as a second GUI, but some options would be hidden from the user and the language would only be English. Also, I'm currently busy right now so it's going to take some time. |
|
Hi, I've been very busy this week, so sorry I couldn't help you with the bounty and scrimmage assets. I'll be busy in the next few weeks too, so you should ask someone else for EN assets. I tried Bounty and Scrimmage and was impressed, it was twice as fast as BAAuto. However, there is a bug in Scrimmage. If you have 21 tickets it tells you invalid tickets. |
Thanks for reporting bug. The latest commit should have solved this issue. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi, I tried AAS, and I'm truly impressed by how you managed to adapt ALAS for Blue Archive.
I've developed a script for Blue Archive myself, called BAAuto. However, it's not very optimised and tends to run slowly.
I believe there are some promising ideas in my script, and I'm more than happy to offer the source code or any other elements for your use. However, please keep in mind that the source code might be messy at times, as I haven't had the chance to refactor it.
You can check out the detailed information I've provided about BAAuto in this GitHub issue, and if you have any questions, I'm more than willing to answer them.
Also, if you can implement my Mission/Commissions/Event idea, I'm open to adapting AAS for EN when I have the time.
The text was updated successfully, but these errors were encountered: