Blizzard / s2client-proto

StarCraft II Client - protocol definitions used to communicate with StarCraft II.
MIT License
3.76k stars 430 forks source link

data regarding non-valid actions due to non-valid arguments #97

Closed natangold85 closed 6 years ago

natangold85 commented 6 years ago

hello. there are actions which are presence in the "available_actions" but are not valid due to not-valid arguments. for example, action to build a building is not valid if the screen location given in arguments is not valid (due to the height map or other reason).

in this case in the graphical environment of the game there is a a red line that saying that the location chosen for building is not valid. there is a way i can understand this output from the observation given in the step function? if not, there is another way to retrieve this data? so far i only succeed to retrieve this data through the screen observation but it retrieved in delay of a few steps (that is caused by the time that is taking to the scv to reach the building coordinate) maybe there is a way to get from the screen observation the green mark that appear before the scv reach the building coordinate?

thanks natan

KevinCalderone commented 6 years ago

There is a bit of documentation on this here: https://github.com/Blizzard/s2client-proto/blob/master/docs/protocol.md#action-errors

There are two places action errors may be reported. It sounds like you are looking for the first of the two:

ResponseAction::result

ResponseObservation::action_errors