Valokoodari / btd6-ahk

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

Feature requests #39

Closed LayanJethwa closed 1 year ago

LayanJethwa commented 2 years ago

Please could we have support for no monkey knowledge, as not many people using this script will have full monkey knowledge, as many would use this script to grind to get full monkey knowledge.

It would also be helpful if the script used simpler strategies, such as ones showcased by FenixKillah on YouTube, where you can go AFK after 15 rounds, this would leave less room for errors with timings.

Timings are quite an issue for me personally, as I cannot find the right timescale to work just right, to remedy this, maybe consider looking at the round numbers to see when to place and upgrade? It would also be useful to have a tool to determine the correct timescale based on frame rate.

Also, dark castle coords and placements seem to be broken, not sure why.

Finally, would it be possible to add a feature whereby if you have been consistently losing on a map, say, twice in a row, it just does dark castle runs or something, so you still get points for the collection, although it is less, but you're not just constantly losing and not getting anything, and then maybe the map that you lost on could be flagged? This would definitely be a lot more helpful for overnight AFK sessions for example.

I understand how hard it is to code hotkeys, so I understand if these features are too hard to implement. The script is great as it is, thank you for putting in all this work!

Valokoodari commented 1 year ago

Todo

valen214 commented 1 year ago

1) Does it sound crazy to implement auto update kek.

2) I'm working on Dark Castle chimps script, found the current util functions api a bit annoying, I'm trying to wrap them this way, so I don't need to type in the coordinates each time. With this format I think it's a bit easier to build the map script. And with enough volunteers and play testing, we might finally build a script to finish the whole game lol

monkeys := Map(
  "hero", [1, 2],
  "dart 1", [3, 4],
  "sub", [222, 222],
  "dart 2", [5, 6],
  "druid 1", [6, 3],
  "druid 2", [222, 222],
  "druid 3", [222, 222],
  "druid 4", [3232, 2323],
  "druid 5", [12, 232],
  "druid 6", [2323, 232],
)

WrappedTargeting(monkey, targeting){
  coords := monkeys[monkey]
  Targeting(coords[1], coords[2], targeting)
}

WrappedUpgrade(monkey, a, b, c){
  coords := monkeys[monkey]
  Upgrade(coords[1], coords[2], a, b, c)
}

WrappedPlace(monkey){
  coords := monkeys[monkey]
  monkey_type := StrSplit(monkey, " ")[1]

  Place(monkey_type, coords[1], coords[2])
}

DarkCastleChimpsGameScript() {
  WrappedPlace("sub")
  WrappedPlace("dart 1")

  StartGame()                 ; chimps starts at round 6

  WaitForRound(7)             ; Round 7
  WrappedPlace("dart 2")

  WaitForRound(1)             ; Round 11
  WrappedUpgrade("sub",0,0,2) ; Sub: 000 -> 002 

  WaitForRound(7)             ; Round 17
  WrappedPlace("hero")        ; Place Hero (Obyn)

  WaitForRound(4)            ; Round 24
  Send "1"                         ; Hero Ability 1
  ; .
  ; .
  ; .

  Loop, 6 {                                 ; loop is okay too
    WrappedPlace("druid " A_Index)
  }
}

3) adding new map script need to modify two files utils/globals.ahk(4): maps and maps/_include.ahk. I know it's picky but I think that is a bit troublesome too, I'm searching if there's any ahk mechanisms to avoid such process.

valen214 commented 1 year ago
  1. I'd love to see if we could make the map script played standalone like this https://www.autohotkey.com/boards/viewtopic.php?t=71960
Valokoodari commented 1 year ago

Thank you @valen214 for all these suggestions.

  1. Does it sound crazy to implement auto update kek.

For the time being I don't really see a reason to spend the time to implement and test auto update. But maybe in the future if there's extra time with no better use.

  1. –– found the current util functions api a bit annoying, I'm trying to wrap them this way, so I don't need to type in the coordinates each time. With this format I think it's a bit easier to build the map script.

I did think about putting the towers coordinates in a map like that but thought that it would be better for now to use the same style for every map as Sanctuary has moving platforms. Maybe the best solution would be to create functions that also calculate the coordinates of moving platforms based on the round number.

  1. adding new map script need to modify two files utils/globals.ahk(4): maps and maps/_include.ahk. I know it's picky but I think that is a bit troublesome too, I'm searching if there's any ahk mechanisms to avoid such process.

It should be possible to automatically include every file in a directory but the current solution seemed to be a lot cleaner than the methods I came upon. But yeah, it's annoying to modify multiple files because of a single change.

  1. I'd love to see if we could make the map script played standalone ––

I dropped the standalone map script support when collection events stopped counting the collectables from games started with the old freeplay -> restart method. But it's possible to bring that back even though it won't really work with collection events. Wouldn't be a bad idea to check that monkey money can still be earned that way though. It's also possible that even the collectables can be gained this way again as I haven't tested it in a long time.