Skip to content

Commit a0b3e12

Browse files
committed
Massive reorganization into a much simpler file structure that should remove a lot of headaches
1 parent 970dfaa commit a0b3e12

File tree

21 files changed

+745
-759
lines changed

21 files changed

+745
-759
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*~
22
*.pyc
3+
dist
4+
sc2reader.egg-info

README.txt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,26 @@ from the awesome `phpsc2replay`_ project.
88
Example Usage
99
--------------
1010

11-
>>>from sc2reader import Replay
12-
>>>replay = Replay('path/to/replay.sc2replay')
13-
14-
#TODO: more work to be done here
11+
::
12+
13+
>>> replay = Replay(filename)
14+
>>> print "\n%s on %s played on %s" % (replay.type,replay.map,replay.date)
15+
>>>
16+
>>> #Player[0] is None so that players can be indexed by ID
17+
>>> for team,players in replay.teams.iteritems():
18+
>>> print "\n\tTeam %s: %s" % (team,replay.results[team])
19+
>>> for player in players:
20+
>>> print "\t\t%s" % player
1521

22+
2v2 on Zwietracht IV played on Mon Dec 27 22:51:59 2010
23+
24+
Team 1: Won
25+
Player 1 - Pille (Zerg)
26+
Player 2 - Mort (Zerg)
27+
28+
Team 2: Lost
29+
Player 3 - HaRib0 (Protoss)
30+
Player 4 - neosmatrix (Zerg)
1631

1732
See the sc2replay `wiki`_ for additional usage details.
1833

@@ -49,6 +64,7 @@ Basic Install
4964
::
5065

5166
$ easy_install sc2reader
67+
$ sc2printer 'path/to/replay.sc2replay'
5268

5369
Advanced Install
5470
~~~~~~~~~~~~~~~~~
@@ -58,6 +74,7 @@ Advanced Install
5874
$ git clone https://github.com/GraylinKim/sc2reader.git
5975
$ cd sc2reader
6076
$ python setup.py install
77+
$ sc2printer 'path/to/replay.sc2replay'
6178

6279
Issues and Support
6380
-------------------
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,133 @@
177177
0x012b31: 'Set Rally Point? Or Right Click...',
178178
}
179179

180+
units = {
181+
182+
#Terran Buildings
183+
0x030901: 'Command Center',
184+
0x030a01: 'Supply Depot (raised)',
185+
0x021301: 'Supply Depot (lowered)',
186+
0x004b01: 'Supply Depot (lowered) (2)',
187+
0x031001: 'Command Center (upgrading to orbital command)',
188+
0x002801: 'Orbital Command',
189+
0x000c01: 'Barracks',
190+
0x010e01: 'Factory',
191+
0x011301: 'Factory (Flying)',
192+
0x020701: 'Factory (Flying) (2)',
193+
0x010f01: 'Starport',
194+
0x020d01: 'Amory',
195+
0x000f01: 'Bunker',
196+
0x001101: 'Tech Lab (Addon)',
197+
198+
#Terran Units
199+
0x021101: 'SCV',
200+
0x011601: 'SCV (Alternate, Building?)',
201+
0x031001: 'Marine',
202+
0x031301: 'Marauder',
203+
0x001501: 'Hellion',
204+
0x030d01: 'Seige Tank',
205+
0x001401: 'Thor',
206+
207+
#Zerg
208+
0x002d01: 'Larvae',
209+
0x001301: 'Egg',
210+
0x014101: 'Egg ..',
211+
0x002301: 'Egg (Cocoon? Individual?)',
212+
0x040301: 'Egg (fast spawning)',
213+
0x080301: 'Egg (spawning stuffs..)',
214+
0x020301: 'Egg (4 at a time?)',
215+
0x010301: 'Egg (extra)',
216+
0x008301: 'Egg (extra2)',
217+
0x012901: 'Creep Tumor',
218+
0x012001: 'Drone',
219+
#0x010401: 'Drone (Alternate)',
220+
0x012101: 'Zergling',
221+
#0x001501: 'Zergling (Alternate)',
222+
0x000b01: 'Baneling',
223+
0x011101: 'Baneling (Alternate)',
224+
0x022201: 'Roach',
225+
0x012301: 'Hydralisk',
226+
0x022301: 'Infestor',
227+
0x022001: 'Mutalisk',
228+
0x009001: 'Burrowed Unit (Drone)',
229+
0x004801: 'Burrowed Unit (Drone) (2)',
230+
0x002401: 'Burrowed Unit (Drone) (3)',
231+
0x041001: 'Burrowed Unit (Drone) (4)',
232+
0x021001: 'Burrowed Unit (Drone) (5)',
233+
0x002701: 'Burrowed Unit (Zergling)',
234+
0x002601: 'Burrowed Unit (Roach)',
235+
0x021201: 'Burrowed Unit (Roach) (2)',
236+
0x041201: 'Burrowed Unit (Roach) (3)',
237+
0x010a01: 'Burrowed Unit (Roach) (4)',
238+
0x011201: 'Unburrowing (Roach)',
239+
0x040a01: 'Unburrowing (Roach) (2)',
240+
0x020a01: 'Unburrowing (Roach) (3)',
241+
0x032501: 'Overseer',
242+
0x032401: 'Overseer Cocoon',
243+
0x040201: 'Baneling Cocoon',
244+
0x020201: 'Baneling Cocoon (2)',
245+
0x010201: 'Baneling Cocoon (3)',
246+
0x002201: 'Baneling Cocoon (4)',
247+
0x011001: 'Baneling Cocoon (5)',
248+
0x000a01: 'Baneling Cocoon (6)',
249+
250+
0x022601: 'Queen',
251+
0x012201: 'Overlord',
252+
253+
0x001e01: 'Hatchery',
254+
0x003e01: 'Extractor',
255+
0x011c01: 'Extractor (building?)',
256+
0x011d01: 'Spawning Pool',
257+
0x031e01: 'Spine Crawler',
258+
0x011e01: 'Evolution Chamber',
259+
0x031f01: 'Spore Crawler',
260+
0x031d01: 'Roach Warren',
261+
0x021e01: 'Infestation Pit',
262+
0x011f01: 'Hydralisk Den',
263+
0x031c01: 'Baneling Nest',
264+
0x021c01: 'Spire',
265+
0x002001: 'Lair',
266+
267+
#Protoss
268+
0x011701: 'Nexus',
269+
0x021401: 'Pylon',
270+
0x021501: 'Assimilator',
271+
0x021701: 'Forge',
272+
0x021601: 'Gateway',
273+
0x002901: 'Warp Gate',
274+
0x011801: 'Cybernetics Core',
275+
0x031501: 'Twilight Council',
276+
0x001801: 'Templar Archives',
277+
0x001b01: 'Robotics Facility',
278+
0x001a01: 'Robotics Bay',
279+
0x031701: 'Stargate',
280+
281+
#Protoss Units
282+
0x001c01: 'Probe',
283+
#0x041101: 'Probe (Alternate)',
284+
#0x007001: 'Probe (Alternate)',
285+
0x011901: 'Zealot',
286+
0x006e01: 'Alternate Toss (6e01) (Void/Pheonix)',
287+
0x006c01: 'Alternate Toss (6c01) (Void/Pheonix)',
288+
0x006901: 'Alternate Toss (6901) (Sentry/Immortal)',
289+
0x001d01: 'Alternate Toss (1d01) (Colossus)',
290+
0x006601: 'Alternate Toss (6601) (Stalker)',
291+
0x006501: 'Alternate Toss (6501) (Zealot)',
292+
0x006f01: 'Alternate Toss (6f01) (Sentry/Immortal)',
293+
0x011a01: 'Stalker',
294+
0x021901: 'Sentry',
295+
0x011b01: 'High Templar',
296+
0x031a01: 'Observer',
297+
0x031b01: 'Immortal',
298+
0x030501: 'Colossus',
299+
0x021a01: 'Pheonix',
300+
0x031801: 'Void Ray',
301+
302+
#General
303+
0x034201: 'Destructible Rocks',
304+
0x034301: 'Destructible Rocks (2)',
305+
0x024101: 'Destructible Debris',
306+
0x032901: "Xel'Naga Tower",
307+
0x003d01: 'Mineral Field',
308+
0x022b01: 'Rich Mineral Field',
309+
}

sc2reader/data/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

sc2reader/data/units.py

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)