Skip to content
Snippets Groups Projects
Commit 73781213 authored by Rojikku98's avatar Rojikku98
Browse files

Merge branch 'master' into doc

parents 08a679e1 dd3805fa
Branches
Tags
1 merge request!6Replays
...@@ -8,7 +8,7 @@ pages: ...@@ -8,7 +8,7 @@ pages:
- mkdir build - mkdir build
- cd build - cd build
- cmake .. - cmake ..
- make -j $(nproc) library - make library
- cd ../docs - cd ../docs
- make html - make html
- cd .. - cd ..
...@@ -19,3 +19,4 @@ pages: ...@@ -19,3 +19,4 @@ pages:
- public - public
only: only:
- master - master
- Doc
...@@ -58,7 +58,7 @@ Here is a short example that uses SC2Reader to extract the build order. ...@@ -58,7 +58,7 @@ Here is a short example that uses SC2Reader to extract the build order.
print("Res: " + text) print("Res: " + text)
SC2Reader has documation_ that also describe what information SC2Reader has good documation_ that also describe what information
could be found. `What is in a Replay`_ and Events_ gives a good idea could be found. `What is in a Replay`_ and Events_ gives a good idea
if the information you want could be colleced whithe SC2Reader. if the information you want could be colleced whithe SC2Reader.
...@@ -68,8 +68,8 @@ if the information you want could be colleced whithe SC2Reader. ...@@ -68,8 +68,8 @@ if the information you want could be colleced whithe SC2Reader.
ReplayObserver ReplayObserver
-------------- --------------
This is the second technique it is much like using a bot but whit the main difference This is the second technique it is much like using a bot but whit the diffrens
that no action can be preform just observations. No debug actions can be taken. that no action can be preform just observations
.. code-block:: python .. code-block:: python
...@@ -87,31 +87,18 @@ that no action can be preform just observations. No debug actions can be taken. ...@@ -87,31 +87,18 @@ that no action can be preform just observations. No debug actions can be taken.
def on_step(self): def on_step(self):
ReplayObserver.on_step(self) ReplayObserver.on_step(self)
def on_game_end(self):
IDAReplayObserver.on_game_end(self)
def main(): def main():
coordinator = Coordinator(r"D:/StarCraft II/Versions/Base69232/SC2_x64.exe")
if coordinator.load_replay_list("D:/Replays/"):
observer = MyObserver()
coordinator.add_replay_observer(observer)
while coordinator.update():
pass
else:
print("No replays found")
if __name__ == "__main__":
main()
Replay files coordinator = Coordinator(r"D:/StarCraft II/Versions/Base69232/SC2_x64.exe")
------------ if coordinator.load_replay_list("D:/Replays/"):
Replay files are version depended. observer = MyObserver()
coordinator.add_replay_observer(observer)
Replays with tracker events for some versions can be found for example at spawningtool_ and gggreplays_. while coordinator.update():
pass
else:
print("No replays found")
Replays without tracker events can be download with s2client-proto_. The requested version is 4.6.2
.. _spawningtool: https://lotv.spawningtool.com/replays/?pro_only=on if __name__ == "__main__":
.. _gggreplays: https://gggreplays.com/matches main()
.. _s2client-proto: https://github.com/Blizzard/s2client-proto/tree/master/samples/replay-api \ No newline at end of file
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment