linus-jansson / btd6farmer

A tool to make autonomous macros in Bloons Td 6. Relies on OCR and template matchmating for navigation. Made in python
https://discord.gg/qyKT6bzqZQ
MIT License
32 stars 11 forks source link

Problems with selecting the correct map #26

Closed jason00-r closed 2 years ago

jason00-r commented 2 years ago

When trying the latest release, as mentioned in #23 , the bot will stop working after selecting the screen.

It doesn't even seem to click anywhere, it just happens after it registers the screen.

Setting up Bot...
Waiting for 5 seconds... Please select the Bloons TD 6 window during this time.
Traceback (most recent call last):
  File "C:\Users\Jason\Downloads\btd6farmer\main.py", line 34, in <module>
    bot.hero_select()
  File "C:\Users\Jason\Downloads\btd6farmer\Bot.py", line 261, in hero_select
    self.log(f"Selecting {self.settings['hero']}")
KeyError: 'hero'
jason00-r commented 2 years ago

Ah, the issue appears to be caused by using a skin with Obyn.

This skin causes the bot to crash, but with the default skin, it will go and select a map and start the game. image

jason00-r commented 2 years ago

actually, it seems to be struggling to select the map now - it tries to play ravine instead of dark castle

jason00-r commented 2 years ago

actually, it seems to be struggling to select the map now - it tries to play ravine instead of dark castle

Edit: This behavior seems random on if it will occur, it mostly happens when I run through powershell window. running with the .bat file, it usually does not happen, but it has happened.

It sometimes takes multiple tries of starting the bot, or me clicking the play button and scrolling through the maps and then starting the bot.

linus-jansson commented 2 years ago

Ah, the issue appears to be caused by using a skin with Obyn.

This skin causes the bot to crash, but with the default skin, it will go and select a map and start the game.

Right now I don't support hero skins but its being worked on in #25

actually, it seems to be struggling to select the map now - it tries to play ravine instead of dark castle

I have noticed this and I bealive that it has to do with the speed that the bot clicks on buttons which im also working on with #25

Working as fast as possible without rushing it to avoid bugs :)

jason00-r commented 2 years ago

Right now I don't support hero skins but its being worked on in #25

That is fine. It is easy enough to swap skins when I want to play. Just as an FYI, before the current release when I was using the skin, it would just go through the process of selecting Obyn (even though he was selected with a skin) and not crash. But if #25 will fix that, then this isn't really relevant.

I have noticed this and I bealive that it has to do with the speed that the bot clicks on buttons which im also working on with #25

Working as fast as possible without rushing it to avoid bugs :)

I appreciate the work you're putting into this

linus-jansson commented 2 years ago

The main issues here should be fixed in PR mentioned above.. As the core components of the new gameplan mechanics are in place, could you test out if you still experience this on the dev branch?

jason00-r commented 2 years ago

The main issues here should be fixed in PR mentioned above.. As the core components of the new gameplan mechanics are in place, could you test out if you still experience this on the dev branch?

Edit: I am dumb and forgot to get the Dev branch and was just using the Main. I will test with Dev this time.

jason00-r commented 2 years ago

Edit: I am dumb and forgot to get the Dev branch and was just using the Main. I will test with Dev this time.

@linus-jansson, I am using the dev branch now, but the bot just hangs after the map loads. It does not place any towers and does not start the game.

.\Run.bat --debug

[path]python main.py --gameplan_path "Instructions/Dark_Castle_Hard_Standard"
Setting up Bot...
Using gameplan located in: C:\[path redacted]\btd6farmer-dev\Instructions\Dark_Castle_Hard_Standard
Waiting for 5 seconds... Please select the Bloons TD 6 window during this time.
selecting map
Game start

image

linus-jansson commented 2 years ago

Could you add --debug inside the run.bat as an argument, I believe that it won't get recognized otherwise.

linus-jansson commented 2 years ago

As it prints "game start" I guess that it has problems with detection of the round as it gets into the ingame loop where it gets stuck..

EDIT: Could also you add a print(current_round) : https://github.com/linus-jansson/btd6farmer/blob/1af71cc28b232134ddf08db33527b228b6b5e58a/Bot.py#L68

If it prints None it has something to do with not being able to get the round

jason00-r commented 2 years ago

Could you add --debug inside the run.bat as an argument, I believe that it won't get recognized otherwise.

Yes. python main.py --gameplan_path "Instructions/Dark_Castle_Hard_Standard" --debug

As it prints "game start" I guess that it has problems with detection of the round as it gets into the ingame loop where it gets stuck..

EDIT: Could also you add a print(current_round) :

https://github.com/linus-jansson/btd6farmer/blob/1af71cc28b232134ddf08db33527b228b6b5e58a/Bot.py#L68

If it prints None it has something to do with not being able to get the round

It prints None.

RUNNING IN DEBUG MODE, DEBUG FILES WILL BE GENERATED
Waiting for 5 seconds... Please select the Bloons TD 6 window during this time.
selecting map
Waiting for loading screen..
Waiting for loading screen..
Waiting for loading screen..
Waiting for loading screen..
Waiting for loading screen..
Game start
None
None
None
None
None
linus-jansson commented 2 years ago

Hmm, I wonder why though.. What screen res did you have? It was ultrawide right?

jason00-r commented 2 years ago

Hmm, I wonder why though.. What screen res did you have? It was ultrawide right?

5120x1440 ultrawide. But I have the game set at the max of 2560x1440 and it just has a lot of black on both sides.

linus-jansson commented 2 years ago

My guess is that because the game is only 2560x1440 and you have a 5120x1440 monitor it adds scaling to the position of the round counter and scales it to your monitor resolution, which causes the screenshot to be taken on the blackborder part of the monitor thus failing to see the current round..

Is 2560x1440 the max resolution you can choose in the game? in that case it may be a solution for the issue..

EDIT: Currently working on saving the round image to a file.. Could it be possible for you to try that out with the DEBUG mode to see if my theory is correct?

EDIT2: This is now added..

EDIT3: Added a new way of finding the round area position, may fix the problem..

jason00-r commented 2 years ago

Is 2560x1440 the max resolution you can choose in the game? in that case it may be a solution for the issue..

2560x1440 is the max I can set the game to. image

EDIT: Currently working on saving the round image to a file.. Could it be possible for you to try that out with the DEBUG mode to see if my theory is correct?

EDIT2: This is now added..

EDIT3: Added a new way of finding the round area position, may fix the problem..

I will give the Dev branch a try and report back.

jason00-r commented 2 years ago

I ran it and it seems to be working. On the second game it did say that it couldn't read text 78180, which was during round 78. So it was reading the "/" as a "1". But that did not cause any issues and the game continued on and was won.

Game start
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SUBMARINE', 'LOCATION': [1454, 578]}}
Scaling: [1454, 578] -> (2734.0, 578.0)
Tower placed: SUBMARINE
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SUBMARINE', 'LOCATION': [1454, 578]}}
Current round 3
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'DART', 'LOCATION': [773, 658]}}
Scaling: [773, 658] -> (2053.0, 658.0)
Tower placed: DART
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'DART', 'LOCATION': [773, 658]}}
Current round 3
{'INSTRUCTION_TYPE': 'START', 'ARGUMENTS': {'FAST_FORWARD': True}}
First Round Started
executed instruction:
{'INSTRUCTION_TYPE': 'START', 'ARGUMENTS': {'FAST_FORWARD': True}}
Current round 3
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [773, 658], 'TARGET': ['LAST', 'STRONG'], 'TYPE': 'REGULAR', 'DELAY': 3}}
Scaling: [773, 658] -> (2053.0, 658.0)
executed instruction:
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [773, 658], 'TARGET': ['LAST', 'STRONG'], 'TYPE': 'REGULAR', 'DELAY': 3}}
Current round 3
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'DART', 'LOCATION': [785, 814]}}
Scaling: [785, 814] -> (2065.0, 814.0)
Tower placed: DART
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'DART', 'LOCATION': [785, 814]}}
Current round 4
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [785, 814], 'TARGET': 'STRONG', 'TYPE': 'REGULAR'}}
Scaling: [785, 814] -> (2065.0, 814.0)
executed instruction:
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [785, 814], 'TARGET': 'STRONG', 'TYPE': 'REGULAR'}}
Current round 4
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SUBMARINE', 'LOCATION': [1452, 922]}}
Scaling: [1452, 922] -> (2732.0, 921.9999999999999)
Tower placed: SUBMARINE
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SUBMARINE', 'LOCATION': [1452, 922]}}
Current round 9
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'HERO', 'LOCATION': [1345, 598]}}
Scaling: [1345, 598] -> (2625.0, 598.0)
Tower placed: HERO
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'HERO', 'LOCATION': [1345, 598]}}
Current round 12
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [1452, 922] -> (2732.0, 921.9999999999999)
Tower upgraded at position: [1452, 922] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 14
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [1, 0, 0]}}
Scaling: [1452, 922] -> (2732.0, 921.9999999999999)
Tower upgraded at position: [1452, 922] with the upgrade path: [1, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [1, 0, 0]}}
Current round 15
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [1, 0, 0]}}
Scaling: [1452, 922] -> (2732.0, 921.9999999999999)
Tower upgraded at position: [1452, 922] with the upgrade path: [1, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [1, 0, 0]}}
Current round 17
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [1452, 922] -> (2732.0, 921.9999999999999)
Tower upgraded at position: [1452, 922] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 21
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [773, 658], 'UPGRADE_PATH': [0, 0, 2]}}
Scaling: [773, 658] -> (2053.0, 658.0)
Tower upgraded at position: [773, 658] with the upgrade path: [0, 0, 2]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [773, 658], 'UPGRADE_PATH': [0, 0, 2]}}
Current round 22
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'ALCHEMIST', 'LOCATION': [1353, 901]}}
Scaling: [1353, 901] -> (2633.0, 901.0)
Tower placed: ALCHEMIST
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'ALCHEMIST', 'LOCATION': [1353, 901]}}
Current round 24
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [1353, 901], 'TARGET': 'STRONG', 'TYPE': 'REGULAR'}}
Scaling: [1353, 901] -> (2633.0, 901.0)
executed instruction:
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [1353, 901], 'TARGET': 'STRONG', 'TYPE': 'REGULAR'}}
Current round 24
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [1452, 922] -> (2732.0, 921.9999999999999)
Tower upgraded at position: [1452, 922] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1452, 922], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 28
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1353, 901], 'UPGRADE_PATH': [2, 0, 0]}}
Scaling: [1353, 901] -> (2633.0, 901.0)
Tower upgraded at position: [1353, 901] with the upgrade path: [2, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1353, 901], 'UPGRADE_PATH': [2, 0, 0]}}
Current round 29
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1353, 901], 'UPGRADE_PATH': [1, 0, 0]}}
Scaling: [1353, 901] -> (2633.0, 901.0)
Tower upgraded at position: [1353, 901] with the upgrade path: [1, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1353, 901], 'UPGRADE_PATH': [1, 0, 0]}}
Current round 33
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1454, 578], 'UPGRADE_PATH': [2, 0, 1]}}
Scaling: [1454, 578] -> (2734.0, 578.0)
Tower upgraded at position: [1454, 578] with the upgrade path: [2, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1454, 578], 'UPGRADE_PATH': [2, 0, 1]}}
Current round 35
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1454, 578], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [1454, 578] -> (2734.0, 578.0)
Tower upgraded at position: [1454, 578] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1454, 578], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 36
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1454, 578], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [1454, 578] -> (2734.0, 578.0)
Tower upgraded at position: [1454, 578] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1454, 578], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 38
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SUPER', 'LOCATION': [1216, 579]}}
Scaling: [1216, 579] -> (2496.0, 579.0)
Tower placed: SUPER
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SUPER', 'LOCATION': [1216, 579]}}
Current round 39
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'VILLAGE', 'LOCATION': [1144, 358]}}
Scaling: [1144, 358] -> (2424.0, 358.0)
Tower placed: VILLAGE
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'VILLAGE', 'LOCATION': [1144, 358]}}
Current round 41
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1144, 358], 'UPGRADE_PATH': [0, 0, 2]}}
Scaling: [1144, 358] -> (2424.0, 358.0)
Tower upgraded at position: [1144, 358] with the upgrade path: [0, 0, 2]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1144, 358], 'UPGRADE_PATH': [0, 0, 2]}}
Current round 41
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'VILLAGE', 'LOCATION': [1007, 430]}}
Scaling: [1007, 430] -> (2287.0, 430.0)
Tower placed: VILLAGE
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'VILLAGE', 'LOCATION': [1007, 430]}}
Current round 42
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1007, 430], 'UPGRADE_PATH': [0, 0, 2]}}
Scaling: [1007, 430] -> (2287.0, 430.0)
Tower upgraded at position: [1007, 430] with the upgrade path: [0, 0, 2]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1007, 430], 'UPGRADE_PATH': [0, 0, 2]}}
Current round 42
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [1216, 579] -> (2496.0, 579.0)
Tower upgraded at position: [1216, 579] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 45
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [1216, 579] -> (2496.0, 579.0)
Tower upgraded at position: [1216, 579] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 46
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [1, 0, 0]}}
Scaling: [1216, 579] -> (2496.0, 579.0)
Tower upgraded at position: [1216, 579] with the upgrade path: [1, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [1, 0, 0]}}
Current round 47
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [1, 0, 0]}}
Scaling: [1216, 579] -> (2496.0, 579.0)
Tower upgraded at position: [1216, 579] with the upgrade path: [1, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [1, 0, 0]}}
Current round 49
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'ALCHEMIST', 'LOCATION': [1154, 468]}}
Scaling: [1154, 468] -> (2434.0, 468.0)
Tower placed: ALCHEMIST
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'ALCHEMIST', 'LOCATION': [1154, 468]}}
Current round 49
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1154, 468], 'UPGRADE_PATH': [4, 2, 0]}}
Scaling: [1154, 468] -> (2434.0, 468.0)
Tower upgraded at position: [1154, 468] with the upgrade path: [4, 2, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1154, 468], 'UPGRADE_PATH': [4, 2, 0]}}
Current round 50
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1144, 358], 'UPGRADE_PATH': [2, 0, 0]}}
Scaling: [1144, 358] -> (2424.0, 358.0)
Tower upgraded at position: [1144, 358] with the upgrade path: [2, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1144, 358], 'UPGRADE_PATH': [2, 0, 0]}}
Current round 50
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [1, 0, 0]}}
Scaling: [1216, 579] -> (2496.0, 579.0)
Tower upgraded at position: [1216, 579] with the upgrade path: [1, 0, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [1216, 579], 'UPGRADE_PATH': [1, 0, 0]}}
Current round 61
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SPIKE', 'LOCATION': [2027, 684]}}
Scaling: [2027, 684] -> (3307.0, 684.0)
Tower placed: SPIKE
executed instruction:
{'INSTRUCTION_TYPE': 'PLACE_TOWER', 'ARGUMENTS': {'MONKEY': 'SPIKE', 'LOCATION': [2027, 684]}}
Current round 62
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 0, 3]}}
Scaling: [2027, 684] -> (3307.0, 684.0)
Tower upgraded at position: [2027, 684] with the upgrade path: [0, 0, 3]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 0, 3]}}
Current round 63
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [2027, 684], 'TARGET': 'CLOSE', 'TYPE': 'REGULAR'}}
Scaling: [2027, 684] -> (3307.0, 684.0)
executed instruction:
{'INSTRUCTION_TYPE': 'CHANGE_TARGET', 'ARGUMENTS': {'LOCATION': [2027, 684], 'TARGET': 'CLOSE', 'TYPE': 'REGULAR'}}
Current round 63
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [2027, 684] -> (3307.0, 684.0)
Tower upgraded at position: [2027, 684] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 65
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 0, 1]}}
Scaling: [2027, 684] -> (3307.0, 684.0)
Tower upgraded at position: [2027, 684] with the upgrade path: [0, 0, 1]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 0, 1]}}
Current round 80
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 2, 0]}}
Scaling: [2027, 684] -> (3307.0, 684.0)
Tower upgraded at position: [2027, 684] with the upgrade path: [0, 2, 0]
executed instruction:
{'INSTRUCTION_TYPE': 'UPGRADE_TOWER', 'ARGUMENTS': {'LOCATION': [2027, 684], 'UPGRADE_PATH': [0, 2, 0]}}
Current round 80
Victory detected; exiting level
Scaling: [1283, 1215] -> (2563.0, 1215.0)
Scaling: [939, 1124] -> (2219.0, 1124.0)
Waiting for loading screen..
linus-jansson commented 2 years ago

May just be a faulty read.. Could you send the saved screenshot to see the positioning of the taken image? Should be located in the DEBUG folder

jason00-r commented 2 years ago

May just be a faulty read.. Could you send the saved screenshot to see the positioning of the taken image? Should be located in the DEBUG folder

Here you go

get_current_round_failed

Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
Found text '77180' does not match regex requirements
Saved screenshot of what was found
linus-jansson commented 2 years ago

Thank you! I guess that it was just a faulty read in that case, positioning looks ok to me..

As to the issues with selecting map and hero. Did you experience any of these bugs still?

jason00-r commented 2 years ago

Thank you! I guess that it was just a faulty read in that case, positioning looks ok to me..

As to the issues with selecting map and hero. Did you experience any of these bugs still?

The map seems to be selected correctly every time, both when starting the bot and after a game is finished and it selects the map another time.

Hero selection seems okay. Not sure if you added skin support yet - it looks like Obyn with a skin does not break the bot, but it will still try to select Obyn even though he is already selected. Then it continues on normally after that.

linus-jansson commented 2 years ago

Im closing this issue for now as it can be considerd fixed.. Please open a new issue if you find any other problems :)

jason00-r commented 2 years ago

Im closing this issue for now as it can be considerd fixed.. Please open a new issue if you find any other problems :)

I have been running the dev branch on and off for the last 2 days as well, no issues so far.

linus-jansson commented 2 years ago

Glad to hear it!

Will continue working it in a couple of days.. been a bit busy the last days due to work