Blizzard / heroprotocol

Python library to decode Heroes of the Storm replays
MIT License
398 stars 69 forks source link

Score screen #18

Closed ptsonev closed 8 years ago

ptsonev commented 8 years ago

Is it possible to pull stats from the score screen when the game ends, e.g. Siege Damage, Healing, Hero Damage, Experience, etc. ?

Thank you.

cherscarlett commented 8 years ago

Those stats are available from heroes.16 replay files in the tracker events

On Tue, Feb 2, 2016 at 5:58 AM, ptsonev notifications@github.com wrote:

Is it possible to pull stats from the score screen when the game ends, eg Siege Damage, Healing, Hero Damage, Experience, etc ?

Thank you

— Reply to this email directly or view it on GitHub https://github.com/Blizzard/heroprotocol/issues/18.

Cher Stewart

You cannot do all the good the world needs, but the world needs all the good you can do.

ptsonev commented 8 years ago

Hello, i am not sure, i am following.

It seems there are 8 different events in the replay.tracker.events file: NNet.Replay.Tracker.SPlayerSetupEvent NNet.Replay.Tracker.SUnitBornEvent NNet.Replay.Tracker.SUpgradeEvent NNet.Replay.Tracker.SPlayerStatsEvent NNet.Replay.Tracker.SUnitDiedEvent NNet.Replay.Tracker.SUnitOwnerChangeEvent NNet.Replay.Tracker.SUnitPositionsEvent NNet.Replay.Tracker.SUnitTypeChangeEvent

I guess SPlayerStatsEvent is what i need, however it contains stats that are starcraft 2 related { "m_playerId": 1, "m_stats": { "m_scoreValueMineralsCurrent": 0, "m_scoreValueVespeneCurrent": 0, "m_scoreValueMineralsCollectionRate": 0, "m_scoreValueVespeneCollectionRate": 0, "m_scoreValueWorkersActiveCount": 0, "m_scoreValueMineralsUsedInProgressArmy": 0, "m_scoreValueMineralsUsedInProgressEconomy": 0, "m_scoreValueMineralsUsedInProgressTechnology": 0, "m_scoreValueVespeneUsedInProgressArmy": 0, "m_scoreValueVespeneUsedInProgressEconomy": 0, "m_scoreValueVespeneUsedInProgressTechnology": 0, "m_scoreValueMineralsUsedCurrentArmy": 0, "m_scoreValueMineralsUsedCurrentEconomy": 0, "m_scoreValueMineralsUsedCurrentTechnology": 0, "m_scoreValueVespeneUsedCurrentArmy": 0, "m_scoreValueVespeneUsedCurrentEconomy": 0, "m_scoreValueVespeneUsedCurrentTechnology": 0, "m_scoreValueMineralsLostArmy": 0, "m_scoreValueMineralsLostEconomy": 0, "m_scoreValueMineralsLostTechnology": 0, "m_scoreValueVespeneLostArmy": 0, "m_scoreValueVespeneLostEconomy": 0, "m_scoreValueVespeneLostTechnology": 0, "m_scoreValueMineralsKilledArmy": 0, "m_scoreValueMineralsKilledEconomy": 0, "m_scoreValueMineralsKilledTechnology": 0, "m_scoreValueVespeneKilledArmy": 0, "m_scoreValueVespeneKilledEconomy": 0, "m_scoreValueVespeneKilledTechnology": 0, "m_scoreValueFoodUsed": 0, "m_scoreValueFoodMade": 0, "m_scoreValueMineralsUsedActiveForces": 0, "m_scoreValueVespeneUsedActiveForces": 0, "m_scoreValueMineralsFriendlyFireArmy": 0, "m_scoreValueMineralsFriendlyFireEconomy": 0, "m_scoreValueMineralsFriendlyFireTechnology": 0, "m_scoreValueVespeneFriendlyFireArmy": 0, "m_scoreValueVespeneFriendlyFireEconomy": 0, "m_scoreValueVespeneFriendlyFireTechnology": 0 }, "_event": "NNet.Replay.Tracker.SPlayerStatsEvent", "_eventid": 0, "_gameloop": null, "_bits": 1048 }

Am i doing something wrong ? Thank you.

cherscarlett commented 8 years ago

In a heroes.16 replay ONLY you need to look for NNet.Replay.Tracker.SScoreResultEvent in the TrackerEvents.

On Tue, Feb 2, 2016 at 6:53 AM, ptsonev notifications@github.com wrote:

Hello, i am not sure, i am following. It seems there are 8 different events in the replay.tracker.events file: NNet.Replay.Tracker.SPlayerSetupEvent NNet.Replay.Tracker.SUnitBornEvent NNet.Replay.Tracker.SUpgradeEvent NNet.Replay.Tracker.SPlayerStatsEvent NNet.Replay.Tracker.SUnitDiedEvent NNet.Replay.Tracker.SUnitOwnerChangeEvent NNet.Replay.Tracker.SUnitPositionsEvent NNet.Replay.Tracker.SUnitTypeChangeEvent

I guess SPlayerStatsEvent is what i need, however it contains stats that are starcraft 2 related { "m_playerId": 1, "m_stats": { "m_scoreValueMineralsCurrent": 0, "m_scoreValueVespeneCurrent": 0, "m_scoreValueMineralsCollectionRate": 0, "m_scoreValueVespeneCollectionRate": 0, "m_scoreValueWorkersActiveCount": 0, "m_scoreValueMineralsUsedInProgressArmy": 0, "m_scoreValueMineralsUsedInProgressEconomy": 0, "m_scoreValueMineralsUsedInProgressTechnology": 0, "m_scoreValueVespeneUsedInProgressArmy": 0, "m_scoreValueVespeneUsedInProgressEconomy": 0, "m_scoreValueVespeneUsedInProgressTechnology": 0, "m_scoreValueMineralsUsedCurrentArmy": 0, "m_scoreValueMineralsUsedCurrentEconomy": 0, "m_scoreValueMineralsUsedCurrentTechnology": 0, "m_scoreValueVespeneUsedCurrentArmy": 0, "m_scoreValueVespeneUsedCurrentEconomy": 0, "m_scoreValueVespeneUsedCurrentTechnology": 0, "m_scoreValueMineralsLostArmy": 0, "m_scoreValueMineralsLostEconomy": 0, "m_scoreValueMineralsLostTechnology": 0, "m_scoreValueVespeneLostArmy": 0, "m_scoreValueVespeneLostEconomy": 0, "m_scoreValueVespeneLostTechnology": 0, "m_scoreValueMineralsKilledArmy": 0, "m_scoreValueMineralsKilledEconomy": 0, "m_scoreValueMineralsKilledTechnology": 0, "m_scoreValueVespeneKilledArmy": 0, "m_scoreValueVespeneKilledEconomy": 0, "m_scoreValueVespeneKilledTechnology": 0, "m_scoreValueFoodUsed": 0, "m_scoreValueFoodMade": 0, "m_scoreValueMineralsUsedActiveForces": 0, "m_scoreValueVespeneUsedActiveForces": 0, "m_scoreValueMineralsFriendlyFireArmy": 0, "m_scoreValueMineralsFriendlyFireEconomy": 0, "m_scoreValueMineralsFriendlyFireTechnology": 0, "m_scoreValueVespeneFriendlyFireArmy": 0, "m_scoreValueVespeneFriendlyFireEconomy": 0, "m_scoreValueVespeneFriendlyFireTechnology": 0 }, "_event": "NNet.Replay.Tracker.SPlayerStatsEvent", "_eventid": 0, "_gameloop": null, "_bits": 1048 }

Am i doing something wrong ? Thank you.

— Reply to this email directly or view it on GitHub https://github.com/Blizzard/heroprotocol/issues/18#issuecomment-178613705 .

Cher Stewart

You cannot do all the good the world needs, but the world needs all the good you can do.

qfox commented 8 years ago

Thanks!