ggtracker / ggtracker/sc2reader

How can I get the values inside of PlayerStatsEvent?

Open
#173 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
169
Forks
152
PR merge metrics
No merged PRs in 30d

Description

I'm able to get the normal events out of the replays, but when I print it using the following:

  replay = sc2reader.load_replay(
      'path_here',
      engine=sc2reader.engine.GameEngine(plugins=[ContextLoader(), APMTracker(), SelectionTracker()]))
  
  for r in replay.events:
      print(r)

I see the "Stats Update" every 10 seconds like expected, but I can't find a way to actually print out those stats? I'm interested in seeing the player's minerals, vespene gas, etc.

Hope someone can point me in the right direction, thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PlayerStatsEvent instances yielded by replay.events and the GameEngine plugin configuration shown in the report. Determine how the event exposes minerals, vespene gas, and other stats, then document the access path or example output so completion clearly shows how those values can be printed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
game-dev
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.