Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 281 forks source link

"Select all larvae" game setting screws up calls over API #234

Open noorus opened 6 years ago

noorus commented 6 years ago

My co-developer found the following issue: If you have the "select all larvae" gameplay setting enabled in SC2, then sending commands to a specific larva using a direct Unit pointer/ID can still cause another larva to receive the command instead. This breaks trying to keep track of the build cycle and such. I believe the gameplay setting shouldn't affect API commands.

ttinies commented 6 years ago

Resolving this issue would simplify things, indeed.

In the meantime, there is a work around for this issue. If you track production units, you can track the initialization of a new egg in production to the prior command executed. Be advised that there is some game loop delay between when the command is sent, when the egg actually behind producing and when the egg shows up in the observation.

NikEyX commented 6 years ago

Please fix it. At the moment it will ALWAYS build more than one drone if you have enough supply and minerals and select a SINGLE larva on a hatch with multiple larvae nearby.

[02:08:22 INFO] USING LARVA: 4361289729 [02:08:22 INFO] Started training: Drone [02:08:22 INFO] (Observed Action: 1342 on tags: 4360241153, 4361289729)