Skip to content

Commit 0744e29

Browse files
committed
Add a frequently asked questions page.
1 parent e5d11b8 commit 0744e29

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

docs/source/faq.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Frequently Asked Questions
2+
==============================
3+
4+
1. :ref:`faq1`
5+
2. :ref:`faq2`
6+
3. :ref:`faq3`
7+
4. :ref:`faq4`
8+
9+
.. _faq1:
10+
11+
How do I get a list of game events (including messages)?
12+
------------------------------------------------------------
13+
14+
Here is a minimal example::
15+
16+
replay = sc2reader.load_replay('path/to/replay.SC2Replay')
17+
for event in replay.events:
18+
print '{0} => {1}: {2}'.format(event.pid,event.name, event.time)
19+
20+
Please see the `documentation`_ for a full listing of the information available.
21+
22+
.. _documentation: http://sc2reader.rtfd.org
23+
24+
.. _faq2:
25+
26+
How to I get the game state at a specific time in the game. E.g. at 10:00 how many workers every player has.
27+
---------------------------------------------------------------------------------------------------------------
28+
29+
This is difficult. Events are only recorded for player initiated actions and you'll find that both successful and unsuccessful actions are included. That means several things complicates our lives:
30+
31+
1. There is no "unit created" event. Only a "player attempted to use train <unit>" events.
32+
2. There is no "death" event. You can only tell a unit is alive when it is actively selected.
33+
3. Game state information: player resources, available supply, etc are unavailable at all times.
34+
35+
It may be possible to overcome these limitations and approximate game state with a series of very smart assumptions and cool algorithms. If you could accurately count workers though, you'd be the first I think.
36+
37+
.. _faq3:
38+
39+
How can I retrieve game summary files?
40+
-----------------------------------------
41+
42+
s2gs files hashes are not contained inside any other SC2 resources as far as anyone knows.
43+
44+
Make sure you read the `s2gs thread`_ for details.
45+
46+
Aside from manually causing s2gs files to download to your battle.net cache folder you might try set up the `S2GSExtractor`_ to scrape them from the process memory. I can't speak to its legality or effectiveness but it is somewhere to start if you want to automate things.
47+
48+
.. _s2gs thread: http://www.teamliquid.net/forum/viewmessage.php?topic_id=330926
49+
.. _S2GSExtractor: https://github.com/gibybo/S2GS-Extractor
50+
51+
.. _faq4:
52+
53+
Script <name here> is broken. What is wrong?
54+
-----------------------------------------------
55+
56+
It is true that not all the scripts are very well maintained. They were originally intended as mini usage examples. It seems that people are trying to use them as a primary interface for sc2reader though. I'll have to make sure they don't break going forward.
57+
58+
Patches to the scripts are always accepted, just issue a pull request or email me a patch file.

docs/source/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ time. Any questions, suggestions, or concerns should be posted to the sc2reader
1616
`mailing list`_. You can also pop on to our #sc2reader, our `IRC channel`_ on
1717
Freenode if you want to chat or need some live support.
1818

19+
.. note::
20+
21+
Checkout our :doc:`faq`. If your question isn't covered there, let us know and we'll add it to the list.
22+
1923
.. _mailing list: http://groups.google.com/group/sc2reader
2024
.. _IRC Channel: http://webchat.freenode.net/?channels=#sc2reader
2125

@@ -35,6 +39,7 @@ SC2 replays hold a ton of information. The following reference pages were put to
3539

3640
.. toctree::
3741

42+
faq
3843
sc2reader
3944
primaryresources
4045
supportobjects
@@ -47,6 +52,7 @@ SC2 replays hold a ton of information. The following reference pages were put to
4752
:maxdepth: 2
4853
:glob:
4954

55+
faq
5056
sc2reader
5157
primaryresources
5258
supportobjects

0 commit comments

Comments
 (0)