Post by nonukez on Apr 18, 2019 19:32:46 GMT
Hello everyone,
tl;dr - I've created a bot for the B2/D2 maps in the Ink-Stained Steel Sakura Event for Azur Lane, which is happening right now.
Make sure you use a device with 1280x720 resolution (or use Nox, which was used to make this bot).
Start the bot at the map screen, with your Boss Fleet (the fleet that'll fight the boss) as the first, and your Farm Fleet (that'll fight ships until the boss appears) as the second.
This bot will have the Farm Fleet fight until the boss appears, at which point the Boss Fleet will fight the boss. This will not clear all the ships on the map (which is a waste of oil).
See this poorly-made, disgustingly real-time and laggy video below to see it in action. The 1-hour length is from 5 runs of B2.
Download Link
end tl;dr
Some notes about this bot:
"First" and "Second" in terms of Boss Fleet and Farm Fleet do not only apply to the fleet selection screen. What I mean by this is that your Boss Fleet cannot be "Fleet 4" and your Farm Fleet be "Fleet 1", and simply select it in order.
Your Boss Fleet has to be Fleet 1 and Farm Fleet has to be Fleet 2, 3 or 4. Or your Boss Fleet can be Fleet 2, and your Farm Fleet be Fleet 3 or 4, and so on; just make sure the Boss Fleet is before the Farm Fleet. Even if you select your Boss Fleet in the first slot and your Farm Fleet as the second slot, the game will automatically order it based on the "order" of the fleets. Let me know if you have any questions; I explained it pretty poorly.
As a warning, this bot's movements are very predictable. The movements are hard-coded to compensate for the event maps' limited movement mechanic. This means that *IF* there is a bot-detecting system that Azur Lane uses, it'll be pretty obvious that no human would play the way this bot does. However, I have used a similar system for the previous event, and that bot has done about ~200 runs. This bot has done about ~100 runs already (while fixing various edge cases during the runs), and I have not yet been banned.
Talking about the actual logic of the bot (for programmers and enthusiasts!):
The limited movement poses two main issues: actually moving towards the ships on the map, and getting the Boss Fleet to the boss. Moving the Farm Fleet towards ships on the map is easy: you can store the location of the ship you want to click, your Farm Fleet's location, and build a path based on distance while storing the intermediate movements in a stack. Then when the battle is over, you can reverse the movements to get back to where you started.
The main issue that I do have a smart solution for is getting the Boss Fleet to the boss. The Boss Fleet wants to fight as little as possible; it is a waste of oil. So, we want the Boss Fleet to avoid ships while getting to the boss. Unfortunately, the ships on the map are generated randomly, and the particular path to the boss from the starting point has some ships obscured by the map. So, we cannot simply detect a ship is there and avoid it (without using a separate detection), nor can we guarantee a hard-coded path will avoid fights (sometimes there are up to 3 ships along the path, which the Boss Fleet would have to fight).
This bot uses a very primitive method to avoid all the pitfalls, but dramatically increases the time it takes to clear a map. Automation was the main goal, which at least this achieved.
By having the Farm Fleet "guide" the Boss Fleet to the one location where the boss spawns, this minimizes the fighting that the Boss Fleet has to do. Unfortunately, the Sirens (the enemies on the map that moves around) can still attack the Boss Fleet; this is at most 1 additional fight for the Boss Fleet. The guiding logic ensures that the Boss Fleet is always right beside the Farm Fleet. Once the Boss Fleet is at the correct location, then the Farm Fleet starts seeking out ships to fight until it has fought enough for the boss to spawn. The Farm Fleet still requires a set path due to another reason, but ships that are in range of its movement will be attacked even when it's off the path.
In the future, I will try to make a bot for every event, on the map that is the most lucrative to get the most rewards. I will also try to release it much sooner, so that people can have more time!
Let me know if there are any issues, as I'm almost certain there's a bug somewhere in this spaghetti code mess. This is also the first bot I've made that I released, so there may be issues in different setups; let me know, I'll try to work them out.
Download Link
tl;dr - I've created a bot for the B2/D2 maps in the Ink-Stained Steel Sakura Event for Azur Lane, which is happening right now.
Make sure you use a device with 1280x720 resolution (or use Nox, which was used to make this bot).
Start the bot at the map screen, with your Boss Fleet (the fleet that'll fight the boss) as the first, and your Farm Fleet (that'll fight ships until the boss appears) as the second.
This bot will have the Farm Fleet fight until the boss appears, at which point the Boss Fleet will fight the boss. This will not clear all the ships on the map (which is a waste of oil).
See this poorly-made, disgustingly real-time and laggy video below to see it in action. The 1-hour length is from 5 runs of B2.
Download Link
end tl;dr
Some notes about this bot:
"First" and "Second" in terms of Boss Fleet and Farm Fleet do not only apply to the fleet selection screen. What I mean by this is that your Boss Fleet cannot be "Fleet 4" and your Farm Fleet be "Fleet 1", and simply select it in order.
Your Boss Fleet has to be Fleet 1 and Farm Fleet has to be Fleet 2, 3 or 4. Or your Boss Fleet can be Fleet 2, and your Farm Fleet be Fleet 3 or 4, and so on; just make sure the Boss Fleet is before the Farm Fleet. Even if you select your Boss Fleet in the first slot and your Farm Fleet as the second slot, the game will automatically order it based on the "order" of the fleets. Let me know if you have any questions; I explained it pretty poorly.
As a warning, this bot's movements are very predictable. The movements are hard-coded to compensate for the event maps' limited movement mechanic. This means that *IF* there is a bot-detecting system that Azur Lane uses, it'll be pretty obvious that no human would play the way this bot does. However, I have used a similar system for the previous event, and that bot has done about ~200 runs. This bot has done about ~100 runs already (while fixing various edge cases during the runs), and I have not yet been banned.
Talking about the actual logic of the bot (for programmers and enthusiasts!):
The limited movement poses two main issues: actually moving towards the ships on the map, and getting the Boss Fleet to the boss. Moving the Farm Fleet towards ships on the map is easy: you can store the location of the ship you want to click, your Farm Fleet's location, and build a path based on distance while storing the intermediate movements in a stack. Then when the battle is over, you can reverse the movements to get back to where you started.
The main issue that I do have a smart solution for is getting the Boss Fleet to the boss. The Boss Fleet wants to fight as little as possible; it is a waste of oil. So, we want the Boss Fleet to avoid ships while getting to the boss. Unfortunately, the ships on the map are generated randomly, and the particular path to the boss from the starting point has some ships obscured by the map. So, we cannot simply detect a ship is there and avoid it (without using a separate detection), nor can we guarantee a hard-coded path will avoid fights (sometimes there are up to 3 ships along the path, which the Boss Fleet would have to fight).
This bot uses a very primitive method to avoid all the pitfalls, but dramatically increases the time it takes to clear a map. Automation was the main goal, which at least this achieved.
By having the Farm Fleet "guide" the Boss Fleet to the one location where the boss spawns, this minimizes the fighting that the Boss Fleet has to do. Unfortunately, the Sirens (the enemies on the map that moves around) can still attack the Boss Fleet; this is at most 1 additional fight for the Boss Fleet. The guiding logic ensures that the Boss Fleet is always right beside the Farm Fleet. Once the Boss Fleet is at the correct location, then the Farm Fleet starts seeking out ships to fight until it has fought enough for the boss to spawn. The Farm Fleet still requires a set path due to another reason, but ships that are in range of its movement will be attacked even when it's off the path.
In the future, I will try to make a bot for every event, on the map that is the most lucrative to get the most rewards. I will also try to release it much sooner, so that people can have more time!
Let me know if there are any issues, as I'm almost certain there's a bug somewhere in this spaghetti code mess. This is also the first bot I've made that I released, so there may be issues in different setups; let me know, I'll try to work them out.
Download Link