Skip to content

Commit bda00e3

Browse files
committed
Improve the documentation and bump the version.
1 parent 0d9dd07 commit bda00e3

20 files changed

+358
-91
lines changed

README.rst

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ under the open MIT license. Currently powering:
1212

1313
* Websites: `ggtracker.com`_, `gamereplays.org`_
1414
* Tools: `The Core`_
15-
* Research: `Build Order Classification`
15+
* Experiments: `Midi Conversion`_
1616

1717
Our secondary goal is to become a reference implementation for people looking
1818
to implement parsers in other languages. The following is a list of partial
@@ -42,6 +42,8 @@ the three primary resource types listed below. For a more detailed and exact
4242
description of the information that can be extracted please consult the
4343
`documentation`_ hosted on Read the Docs.
4444

45+
The library is production ready and reasonably stable.
46+
4547

4648
Replays
4749
-------------
@@ -51,25 +53,35 @@ Replays can be parsed for the following general types of information:
5153
- Replay details (map, length, version, expansion, datetime, game type/speed, ...)
5254
- Player details (name, race, team, color, bnet url, win/loss, ...)
5355
- Message details (text, time, player, target, pings, ...)
54-
55-
Additional information can be parsed from ladder replays and replays from basic
56-
unmodded private "custom" games. This information includes:
57-
5856
- Unit Selection and Hotkey (Control Group) events.
5957
- Resource Transfers and Requests (but not collection rate or unspent totals!)
6058
- Unfiltered Unit commands (attack, move, train, build, psi storm, etc)
6159
- Camera Movements for all players and observers.
6260

63-
In general, all player actions are recorded but game state information is not.
64-
In some cases, further game state information can be extracted from this raw
65-
information:
61+
Replays from release 2.0.8 on ward make additional state information available:
62+
63+
- Unit states - creation time, positions, and deaths times
64+
- Player resource stats - collection rates/unspent totals
65+
- Player spending stats - resources spent and lost
66+
67+
Further game state information can be extracted from this raw information:
6668

6769
- All unit selections and hotkey values for every frame of the game.
6870
- APM/EPM and its untold variations.
71+
- Supply counts, expansion timings, build orders, etc
72+
73+
We have data dictionaries in place for standard games that make unit meta data
74+
available. Unit meta data is currently limited to:
6975

70-
We are in the process of building data dictionaries for all the SC2 units and
71-
abilities which should enable much more creative and robust analysis of the
72-
raw event stream found in replay files.
76+
- Costs - mineral, vespene, supply
77+
- Classification - army, building, worker
78+
79+
Additionally, abilities that create units/buildings have the built unit linked
80+
with the build time in game seconds.
81+
82+
Unfortunately this information IS NOT currently versioned and is only accurate
83+
for the latest builds of Starcraft. Versioned meta data support will be added
84+
in future releases.
7385

7486

7587
Maps
@@ -87,7 +99,12 @@ There's a lot more in here to be had for the adventurous.
8799
Game Summaries
88100
-----------------
89101

90-
Tons of data parsed. Thank you Prillan and others from `Team Liquid`_.
102+
Game Summary files are downloaded by the client in order to allow you to view
103+
the game summary from your match history. Prior to 2.0.8 they were the only
104+
way to get the information from the summary screen. Since the 2.0.8 release
105+
you have been able to compute this information yourself from the replay files.
106+
107+
Thank you Prillan and `Team Liquid`_ for helping to decode this file.
91108

92109
* Lobby Properties (game speed, game type, ...)
93110
* Player Information (Race, Team, Result, bnet info, ...)
@@ -98,6 +115,9 @@ Tons of data parsed. Thank you Prillan and others from `Team Liquid`_.
98115
Parsing on these files is now production ready for those that can get them. See
99116
the `Team Liquid`_ thread for details on how to go about getting them.
100117

118+
Again, these files are generally unnecessary after the 2.0.8 release.
119+
120+
101121

102122
Example Usage
103123
=====================
@@ -136,7 +156,7 @@ Organizing your 1v1 replays by race played and matchup and sortable by length::
136156
sorted_base = 'sorted'
137157
path_to_replays = 'my/replays'
138158

139-
for replay in sc2reader.load_replays(sys.argv[1], load_level=1):
159+
for replay in sc2reader.load_replays(sys.argv[1], load_level=2):
140160
if replay.real_type != '1v1':
141161
continue
142162

@@ -235,8 +255,9 @@ To run the tests just use::
235255
When repeatedly running tests it can be very helpful to make sure you've
236256
set a local cache directory to prevent long fetch times from battle.net::
237257

238-
mkdir local_cache
239258
export SC2READER_CACHE_DIR=local_cache
259+
# or
260+
SC2READER_CACHE_DIR=local_cache py.test
240261

241262
Good luck, have fun!
242263

@@ -265,19 +286,21 @@ Acknowledgements
265286
=======================
266287

267288
Thanks to all the awesome developers in the SC2 community that helped out
268-
and kept this project going. Special thanks to the people of the awesome
269-
`phpsc2replay`_ project whose public documentation and source code made
270-
starting this library possible and to sc2replay-csharp for setting us
271-
straight on game events parsing and assisting with our v1.5 upgrade.
272-
I'd also like to thank ggtracker sponsoring further development and for
273-
providing the thousands of test files used while adding s2gs and HotS Beta
274-
support.
289+
and kept this project going.
275290

291+
* Special thanks to the people of the awesome (but abandoned!) `phpsc2replay`_
292+
project whose public documentation and source code made starting this library
293+
possible.
294+
* Thanks to `sc2replay-csharp`_ for setting us straight on game events parsing
295+
and assisting with our v1.5 upgrade.
296+
* Thanks to `ggtracker.com`_ for sponsoring further development and providing
297+
the thousands of test files used while adding s2gs and HotS support.
298+
* Thanks to Blizzard for allowing and supporting development of 3rd party tools.
276299

277300

278-
.. _Build Order Classification: https://github.com/grahamjenson/sc2reader
279301
.. _ggtracker.com: http://ggtracker.com
280302
.. _gamereplays.org: http://www.gamereplays.org/starcraft2/
303+
.. _Midi Conversion: https://github.com/obohrer/sc2midi
281304
.. _sc2reader.scripts: https://github.com/GraylinKim/sc2reader/tree/master/sc2reader/scripts
282305
.. _The Core: http://www.teamliquid.net/forum/viewmessage.php?topic_id=341878
283306
.. _PyPy: http://pypy.org/

docs/source/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@
4141

4242
# General information about the project.
4343
project = u'sc2reader'
44-
copyright = u'2011'
44+
copyright = u'2011-2013'
4545

4646
# The version info for the project you're documenting, acts as replacement for
4747
# |version| and |release|, also used in various other places throughout the
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.4.0'
51+
version = '0.5.0'
5252
# The full version, including alpha/beta/rc tags.
53-
release = '0.4.0'
53+
release = '0.5.0'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.
@@ -179,7 +179,7 @@
179179
# (source start file, target name, title, author, documentclass [howto/manual]).
180180
latex_documents = [
181181
('index', 'sc2reader.tex', u'sc2reader Documentation',
182-
u'Graylin Kim, Bas Peschier', 'manual'),
182+
u'Graylin Kim', 'manual'),
183183
]
184184

185185
# The name of an image file (relative to this directory) to place at the top of

docs/source/dataobjects.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. currentmodule:: sc2reader.data
2+
3+
Data Objects
4+
=====================
5+
6+
Objects representing in-game objects.
7+
8+
9+
Unit
10+
--------------------------
11+
12+
.. autoclass:: Unit
13+
:members:
14+
15+
16+
Ability
17+
--------------------------
18+
19+
.. autoclass:: Ability
20+
:members:
21+
22+
23+
24+
Build
25+
--------------------------
26+
27+
.. autoclass:: Build
28+
:members:

docs/source/decoders.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. currentmodule:: sc2reader.decoders
2+
3+
Decoders
4+
===============
5+
6+
Used to decode the low level contents of files extracted from MPQFiles
7+
8+
ByteDecoder
9+
--------------------------
10+
11+
.. autoclass:: ByteDecoder
12+
:members:
13+
14+
BitPackedDecoder
15+
--------------------------
16+
17+
.. autoclass:: BitPackedDecoder
18+
:members:

docs/source/events/game.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. currentmodule:: sc2reader.events.game
2+
3+
Game Events
4+
=============
5+
6+
Coming soon!
7+
8+
.. automodule:: sc2reader.events.game
9+
:members:

docs/source/events/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Events
2+
============
3+
4+
All of the gamplay and state information contained in the replay is packed into events.
5+
6+
* :doc:`game`: Human actions and certain triggered events
7+
* :doc:`message`: Message and Pings to other players.
8+
* :doc:`tracker`: Game state information
9+
10+
.. toctree::
11+
:hidden:
12+
13+
game
14+
message
15+
tracker
16+

docs/source/events/message.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. currentmodule:: sc2reader.events.message
2+
3+
Message Events
4+
===================
5+
6+
Coming soon!
7+
8+
.. automodule:: sc2reader.events.message
9+
:members:

docs/source/events/tracker.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. currentmodule:: sc2reader.events
2+
3+
Tracker Events
4+
=====================
5+
6+
.. automodule:: sc2reader.events.tracker
7+
:members:

docs/source/factories.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. currentmodule:: sc2reader.factories
2+
3+
Factories
4+
==============
5+
6+
Factories are used to load SCII resources from file-like objects and paths to file-like objects. Objects must implement ``read()`` such that it retrieves all the file contents.
7+
8+
9+
SC2Factory
10+
--------------------------
11+
12+
.. autoclass:: SC2Factory
13+
:members:
14+
15+
16+
DictCachedSC2Factory
17+
--------------------------
18+
19+
.. autoclass:: DictCachedSC2Factory
20+
:members:
21+
22+
FileCachedSC2Factory
23+
--------------------------
24+
25+
.. autoclass:: FileCachedSC2Factory
26+
:members:
27+
28+
DoubleCachedSC2Factory
29+
--------------------------
30+
31+
.. autoclass:: DoubleCachedSC2Factory
32+
:members:

docs/source/index.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,21 @@ The best way to learn how to pick sc2Reader up and get started is probably by ex
3535
Reference Pages
3636
-----------------------
3737

38-
SC2 replays hold a ton of information. The following reference pages were put together to help you quickly find the information you need.
38+
The following reference pages were put together to help you quickly find the information you need.
3939

4040
.. toctree::
4141

4242
faq
4343
sc2reader
44-
primaryresources
44+
mainobjects
4545
supportobjects
46-
utilityclasses
46+
dataobjects
4747
plugins
48+
factories
49+
decoders
50+
utilities
51+
events/index
52+
4853

4954

5055
.. toctree::
@@ -54,8 +59,12 @@ SC2 replays hold a ton of information. The following reference pages were put to
5459

5560
faq
5661
sc2reader
57-
primaryresources
62+
mainobjects
5863
supportobjects
59-
utilityclasses
64+
dataobjects
6065
plugins
66+
factories
67+
decoders
68+
utilities
6169
tutorials/*
70+
events/index

0 commit comments

Comments
 (0)