RavingSmurfGB / Py_AutoBloons

A Python script that will auto run on Dark Castle
3 stars 5 forks source link

Upgrades not working #2

Closed F0X3Z closed 2 years ago

F0X3Z commented 2 years ago

Hi! I have an issue, the bot fails to do the 00X upgrades My resolution is 2560x1440 both in windows and in BTD6 fullscreen. I have two monitors.

Basically this is what the bot does: Places Obyn Places Sub Upgrades Sub to 100 Fails to upgrade sub only clicks on the sub and then again to "unclick it" Fails the upgrade again Upgrades Sub to 200 Places Ninja Upgrades Ninja to 100 Upgrades Ninja to 200 Fails upgrade on Ninja Upgrades Ninja to 300 Fails upgrade on Sub dead

Config: XP_Monkey: Logging: True Gameplan_file: 2.csv Auto_Hero_Select: False game_log.txt

Thanks in advance and thanks for updating it again! :)

F0X3Z commented 2 years ago

I found the issue, basically, I have the exact same key binds but since I have a Swedish keyboard layout the / was not working. So I had to change it in the code and the keybind to something else.

I found another issue now though, the bot will not upgrade the sub to a 204. I have played around a little bit with the XP_Monkey, when removing that part of the code the bot will upgrade to a 204 but the timing will be all wrong and it will try to start a new game before this one has finished.

RavingSmurfGB commented 2 years ago

Hey F0X3Z, Sorry for not coming to you earlier, this project is not always monitored.

I'm really glad you got to the bottom of the first issue, however, both of these sure are strange. It could be that the timing is a little off for some reason on your playthroughs and that the bot cannot afford to buy the upgrade for 204; It is further implied by removing the XP_Monkey code as this would of course use some of the money.

On line 567 in Py_AutoBloons.py try to modify the number at the end to something else - this informs the bot how long to wait before upgrading: Line 567: upgrade_tower(3, "SUBMARINE_LOCATION", 39) Example modification: upgrade_tower(3, "SUBMARINE_LOCATION", 47)

May I ask why you are using the script; is it to level up monkeys; get insta-monkeys or maybe something else. It may also help to understand your PC setup a little more, would you be able to tell me the CPU and GPU of your system.

Thanks, Joe

RavingSmurfGB commented 2 years ago

Didn't mean to close ;)

F0X3Z commented 2 years ago

Hi!

I've only used it since I think it's a fun and interesting project, I haven't really used it for XP, mostly for Monkey Money and unlocking instas since there is currently an event. When leaving the config file blank on Xp monkey, it will not do the 204 upgrade, if I enable DART for example, it will place down dart monkeys but it still won't upgrade to the sub to a 204. But when removing that part of the code in the AutoBloons.py it worked and suddenly made the last upgrade on the sub.

I only have a very basic understanding of coding but since your project is so well documented I managed to make some changes for it to work for me, it now runs without any issues for me and unlocks the instas in this event. I only changed some of the coordinates which probably weren't actually needed, removed some of the XP code, and changed the 1440_easter.png in the support_files folder since the color changed. Successfully ran the bot for 6h before I turned it off. Unfortunately, I never found out why it never worked for me but it definitely had something to do with the XP part of the code.

I have a Ryzen 3700X and a 2080S

I have uploaded my edited version in this post, maybe you will understand why those changes worked for me :)

AutoBloons Edit.zip

RavingSmurfGB commented 2 years ago

Hey F0X3Z,

I couldn't see anything in your modifications that jumped out at me, to explain why those changes improved the situation. However, I am really happy that you have some form of a solution!

It's worth noting in the latest update of the script events should be universally handled so you should not have to update those darn screenshots again.

I am moving the script to have the functionality to record someone's play through which I hope should avoid problems like this in the future, it has been partially implemented and documented but not fully tested yet. But feel free to give it a go if you would like https://github.com/RavingSmurfGB/Py_AutoBloons#recording-playthroughs

RavingSmurfGB commented 2 years ago

Closing but if you need help again don't hesitate to open another issue :)