Valokoodari / btd6-ahk

An AutoHotkey (v2) script to automate collection events in Bloons TD 6.
MIT License
71 stars 32 forks source link

No MK, No heroes #93

Closed kobisjeruk closed 1 year ago

kobisjeruk commented 1 year ago

First time using github, hopefully I'm doing it right. This is my edited version (please refer README.md). Changes :- main.ahk -remove hero check, trim down the time and change the hotkeys for start (Z) and stop/reload (X)

utils/towers.ahk -change unit from ninja -> druid

maps -revamped all maps

Valokoodari commented 1 year ago

I have not yet tested this properly but just by skimming through the changes this seems really good for the most part.

However, I did notice some code formatting problems (mostly mixed tabs and spaces, and trailing whitespace) which will need to be fixed before merging. Also the changes made in a63a1b0 will not be merged aside from the removal of the hero check as the hotkeys should not be anything common like cut and undo and the sleep times have been chosen to not spam the log too much. Even the hero check removal should be done properly instead of just commenting out the function call.

I will likely have time tomorrow or the day after that so I'll fix all these problems then. Also please name your commits properly in the future if you make any more changes as "Add files via upload" doesn't describe the changes made at all.

Valokoodari commented 1 year ago

Result so far are 175 victories and 14 defeats which isn't quite as good as the older strategies (~1000 victories to 10 defeats). I still think the results are good enough so I'm merging this now.

kobisjeruk commented 1 year ago

Honestly, more than anything else I am quite shocked to see that 14 defeats. Were any particular map prove to be problematic? I wish I could reproduce the result but I am facing a different problem (not really a problem but sometimes script got randomly stuck at the victory screen).

Valokoodari commented 1 year ago

Currently at 414 victories and 28 defeats. All of the defeats have been on either Ravine (9) or Workshop (19). On Workshop the problem is clear: sometimes too many bloons leak and the script cannot afford the spike factory. On Ravine I haven't yet seen what the problem is but I suspect it to be something similar.

kobisjeruk commented 1 year ago

I suspected it is something related to timing. Almost always I tried to have some leeway before purchase/upgrade. Mostly if the purchase or upgrade use up almost all cash (like say <$50 left), I'd wait until the next round instead. Ravine is one where it is quite 'tight'. I didnt realize it happened in Workshop. A simple solution is to bump the purchase/upgrade to the next round. I guess you fix it already?

Valokoodari commented 1 year ago

Yeah, I fixed them already in commits 1db789cac5d1cfb5541cf5d36adaa378349a9388 and a3c755959adc728b818fc84b839eae12d264d116.