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

Merge branch 'master' into doc

parents 08a679e1 dd3805fa
No related branches found
No related tags found
1 merge request!6Replays
......@@ -8,7 +8,7 @@ pages:
- mkdir build
- cd build
- cmake ..
- make -j $(nproc) library
- make library
- cd ../docs
- make html
- cd ..
......@@ -19,3 +19,4 @@ pages:
- public
only:
- master
- Doc
......@@ -58,7 +58,7 @@ Here is a short example that uses SC2Reader to extract the build order.
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
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
--------------
This is the second technique it is much like using a bot but whit the main difference
that no action can be preform just observations. No debug actions can be taken.
This is the second technique it is much like using a bot but whit the diffrens
that no action can be preform just observations
.. code-block:: python
......@@ -87,31 +87,18 @@ that no action can be preform just observations. No debug actions can be taken.
def on_step(self):
ReplayObserver.on_step(self)
def on_game_end(self):
IDAReplayObserver.on_game_end(self)
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
------------
Replay files are version depended.
Replays with tracker events for some versions can be found for example at spawningtool_ and gggreplays_.
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")
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
.. _gggreplays: https://gggreplays.com/matches
.. _s2client-proto: https://github.com/Blizzard/s2client-proto/tree/master/samples/replay-api
\ No newline at end of file
if __name__ == "__main__":
main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment