Investigating Replays¶
Circleguard¶
To investigate replays, you first need to create a Circleguard object. To
do so you will need an api key.
If you don’t already have an api key, visit https://osu.ppy.sh/p/api/ and enter
Circleguard for App Name and
https://github.com/circleguard/circlecore for App URL. Circlecore
needs this key to retrieve replay data and user information, among other
things.
Note
Due to a redirection bug on the website, you may need to log in and wait 30 seconds before being able to access the api page through the above link.
After that, circleguard instantion is easy:
cg = Circleguard("key")
Replace "key" in these examples with your api key.
Investigation¶
We provide several convenience methods through Circleguard to investigate
replays for different cheat types.
For instance, to investigate replays for replay stealing, use steal_check():
cg = Circleguard("key")
r1 = ReplayMap(221777, 2757689)
r2 = ReplayMap(221777, 4196808)
replays = [r1, r2]
results = cg.steal_check(replays)
and similarly for relax
(relax_check()) and aim correction
(correction_check()).
steal_check() (and other similar methods) returns a generator containing
Result objects. We will cover these shortly in Results.
Also important to note is that Loadables do not load any information from the
api on instantiation. cg.run() is where this loading occurs, and where you
should expect api ratelimiting (when investigating 10 or more Replays) to
occur.
Should you want finer control over when you load replays, see Loading.
Note
Loadables that get loaded stay loaded, so you can reuse the same object
without fear of doubling (or worse) the loading time.
Multiple Cheats¶
Should you want to investigate a replay for multiple cheats, you can always call each of the methods we mentioned above on the replay. But we understand that isn’t enough for more advanced usage.
To investigate a replay for multiple cheats in one function call, you should
call cg.run(), passing in a bitwise combination of Detect values.
For instance, to investigate a Map for both RELAX and
CORRECTION:
cg = Circleguard("key")
m = Map(221777, span="1-3")
results = cg.run(m, Detect.RELAX | Detect.CORRECTION)