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

Access to production queue in a replay? #135

Closed H-Park closed 7 years ago

H-Park commented 7 years ago

Is Observation()->GetRawActions() truly raw actions, or effective actions? If so, then one could filter the actions for production actions and work with that, however it would be advantageous to have access to the production queue for better replay analysis on the macro side of things.

KevinCalderone commented 7 years ago

I am not sure what you mean by "raw" and "effective". GetRawActions will contain the production action on the gameloop the action was added to the build queue. (The term "Raw" in the name is just to distinguish it from the "FeatureLayer" version of the same function)

If you just want to inspect the state of the production queue, it exposed in Unit::orders.

It seems like the documentation for that isn't great. The "order" field behaves differently for regular units and production buildings. For regular units like marines the orders are things like move/attack. For production building that don't take regular order like move, it contains their production queue.