

Removed the defunct replay.other_people attribute.Removed the defunct replay.events_by_type attribute.Removed the defunct ayer_names attribute.Now a CorruptTrackerFileError is raised when the tracker file is corrupted (generally only older resume_from_replay replays).But hopefully people were not doing that anyway. This means no more unit._type_class._class_._name_. Use generic UnitType and Ability classes for data.Deprecated UnitDiedEvent.killer in favor of UnitDiedEvent.killing_player.Deprecated UnitDiedEvent.killer_pid in favor of UnitDiedEvent.killing_player_id.Deprecated unit.killed_by in favor of unit.killing_player.Loading resources in this way returns a replay generator: replays = sc2reader.load_replays('path/to/replay/directory') If you want to load a collection of replays, you can use the plural form. Sc2reader.load_replay('MyReplay.SC2Replay', load_level=4) Sc2reader.load_replay('MyReplay.SC2Replay', load_level=3) Sc2reader.load_replay('MyReplay.SC2Replay', load_level=2) Sc2reader.load_replay('MyReplay.SC2Replay', load_level=1) # Also loads game details: map, speed, time played, etc Sc2reader.load_replay('MyReplay.SC2Replay', load_level=0) You can use the load level option to limit replay loading and improve load times: # Release version and game length info.
#STARCRAFT 2 PROJECT HAVEN CLASSES FULL#
In some cases, you don’t need the full extent of the replay data. This will load all replay data and fix GameHeart games.

Replay = sc2reader.load_replay('MyReplay', load_map=true) Versioned meta data support will be addedįor many users, the most basic commands will handle all of their needs: import sc2reader Unfortunately this information IS NOT currently versioned and is only accurateįor the latest builds of Starcraft. Classification - army, building, workerĪdditionally, abilities that create units/buildings have the built unit linked.We have data dictionaries in place for standard games that make unit meta dataĪvailable. Supply counts, expansion timings, build orders, etc.All unit selections and hotkey values for every frame of the game.Player spending stats - resources spent and lostįurther game state information can be extracted from this raw information:.Player resource stats - collection rates/unspent totals.Unit states - creation time, positions, and deaths times.Replays from release 2.0.8 onward make additional state information available:

