ANRAR4 / AutoBTD6

The scripts contained in this repository allow you to automatically play any gamemode on any map in Bloons TD6
31 stars 4 forks source link

Await round, toggle speed, bug fixes, playthroughs #25

Closed KendleMintJed closed 1 month ago

KendleMintJed commented 1 month ago

Actions

Await round:

Press shift during recording to add an await round action (prompts user for round) The playthrough will then keep track of the round number and wait for the specified round upon the action

Toggle speed

Add this action in in post (speed slow or speed fast) This changes the game speed after the command I needed this to sell two dart monkeys before buying sauda in a run

Playthroughs

Glacial trail

Alternate bloons rounds - No MK, No LL w/ MK Impoppable - No MK, No LL Chimps

The Impoppable run also works for easy, medium & hard

Bugs

Ingame_paused screen not recognised

I believe this is due to the new 'accessibility' tab in the pause screen. I updated the screenshot in 1920x1080, but do not have the means to update 2560x1440

Round image area too small for "/100" gamemodes, but too large for the rest if changed

If the round image area is too large it will error, but if it is too small it will cut off the leading numbers. You may be able to fix this a better way, I did a patch job by adjusting the image area if the gamemode is detected as chimps or impoppable. This was done by adding a gamemode parameter to getResolutionDependentData and is why you'll see segmentCoordinates = getResolutionDependentData(resolution, mapConfig['gamemode'])['segmentCoordinates'] in various places

Logic changes

custom_ocr now outputs a string

In order to include the '/' In the round output, custom_ocr now has a string return type

Various error checks for round recognition

Like cash, I added checks for errors in the round detection. The loop will be skipped if these checks fail and these checks are only active when the action is await_round

await_round action has no cost

The new await_round action has no cost attribute and so had to be added to all the checks relating to actions with no cost.

ANRAR4 commented 1 month ago

The changes seem to work, although my testing was somewhat limited Thanks