Skip to content

More Game Stats + Versioned Balance Data #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
May 14, 2020
Merged

Conversation

ZephyrBlu
Copy link
Owner

@ZephyrBlu ZephyrBlu commented May 4, 2020

This update focuses in adding more capability to the parser by extracting more information from replays.

Game stats added (All to timeline and summary):

  • Command Structure Energy Values
  • Command Structure Energy Efficiency
  • Command Structure Energy Idle Time (Time when Energy >50)
  • Supply Block
  • Warp Gate Efficiency
  • Warp Gate Idle Time
  • Average Idle Larva
  • Resources Collected
  • Screens Per Minute
  • Inject Efficiency
  • Creep Coverage (% and tiles)
  • Creep Tumor Count

Other additions include:

  • Simple Engagement Prediction using sc2-libvoxelbot
  • Energy Calculation for Game Objects
  • Ability Attribution for Game Objects
  • Tile Calculation for Buildings (At the moment only for Creep, will be generalized to Vision as well)

I'm still working out the best way to distribute the Python extension for sc2-libvoxelbot, so for now engagements will return an empty list if the extension is not detected.

There is now also versioned balance data with the correct ability and unit ids.

Imports are now relative so local testing can be done before pushing to PyPI. Will also create a release branch on GitHub. Also fixed an issue with control group events.
Added basic logging, updated parser to Blizzard's latest protocol, fixed multiple bugs that caused the parser to crash, added support for non-english languages and added a 'local' flag to to allow replays without MMR to be parsed.
Previously some modules were importing from s2protocol. These have been changed to absolute imports from the zephyrus_sc2_parser module now in an effort to stop circular import errors.

Also added a 'detailed' flag that makes the parser return the full player objects.
For units such as Archons or Banelings which are created through morphing 1-2 units, the time at which these units were last morphed is now tracked.
Gameloop property of events wasn't being accessed correctly, this is now fixed. morph_time was being set on every TypeChange event, which meant units would be assigned a morph time when they changed modes.
Also fixed some gamedata values and fixed an issue with workers produced and workers killed
Need to verify upgrades and add Banshee and Cyclone unit data
Still need to test energy and properly implement ability tracking
Laying the groundwork to analyze and attribute abilities, still need to implement locations to track building abilities though. Inject efficiency has been implemented along with untested orbital efficiency. Engagement analysis has been integrated and tested.
Archons also produce a UnitInit event. May also need to check against Zerg morphing units, but should be largely irrelevant.
Version-specific balance data is now generated and loaded programmatically. This should allow accurate parsing of previous old replay protocols thanks to data from sc2reader.
Added a few essential abilities and fixed a small bug with versioning
Energy values, efficiency and idle time >50 energy are now tracked for Nexus and Orbitals. These values are recorded both in the timeline and game summary. Core parts of this implementation: ability attribution (ability_event), energy calculations (game_obj) and data recording (player_state, parser)
Creep approximation is based on estimating the number of tiles covered in creep generated by Hatcheries and Creep Tumors. Creates a generous semi-circular estimation (~2% more tiles than actual) and records all tile co-ords included in the estimation in a set (I.e. no duplicate tiles).
ZephyrBlu added 2 commits May 10, 2020 02:00
This reduces parsing time long term because the map data won't need to be constantly fetched.
@ZephyrBlu ZephyrBlu changed the title New Game Stats More Game Stats + Versioned Balance Data May 13, 2020
ZephyrBlu added 2 commits May 14, 2020 20:05
Changed players from a list to dict to be consistent throughout the parser. Changed Supply Block from gameloop to seconds. Added warpgate efficiency and idle time to timeline + summary. Update race stats for Zerg and fixed minor issues with player_state.
Cleaned up some more files from the merge. Also added a check for whether the engagement simulation extension is installed so as not to crash the parser if it isn't.
@ZephyrBlu ZephyrBlu merged commit a1d8455 into master May 14, 2020
@ZephyrBlu ZephyrBlu deleted the new-game-stats branch May 14, 2020 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant