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

Be able to quit replays #129

Closed H-Park closed 3 years ago

H-Park commented 7 years ago

The replay pack is a mixed bag of player skill, ranging from master vs master to silver vs silver. It is a great resource to have, but it doesn't make sense to gather data and eventually train off of actions made by players at or below the 50th percentile of skill.

RIght now, there is no way to quit out of a replay once it has begun. Being able to quit low tier replays would greatly expiate the data collection process.

KevinCalderone commented 7 years ago

Summarizing what we already chatted about for other people's reference:

The intended way of doing this is to override the IgnoreReplay function on your ReplayObserver. Each time the coordinator wants to start a new replay, it will gather meta-data about the replay and call your IgnoreReplay function. If you return true, it will skip over that replay. The ReplayInfo parameter of IgnoreReplay contains the MMR of all the players in the replay.

That being said, it may still be nice to have a way of quitting a replay. When playing a game this can already by done with DebugInterface::DebugEndGame, but there is no equivalent for replays.

Necdilzor commented 6 years ago

I've been able to quit a replay using both

Debug()->DebugEndGame();
Debug()->SendDebug();

and

Debug()->DebugTestApp(sc2::DebugInterface::exit);
Debug()->SendDebug();

on the OnStep() event. It would be nice to have an easier alternative :)