Open Hareide opened 8 years ago
Glad you like the example :)
I will consider adding it, but have to admit that I am very time constrained at the moment, with a lot of backlog. So I won't be able to do this quickly.
To implement this, I think you need more knowledge of where to find the data. Once you know that, it's a cakewalk to add that stuff to the scoreboard.
If you wanna try, I recommend looking at yasps parser.
Thanks for the quick replay. By looking at the yasp site you pointed me to, I now almost have everything I need (and more):
new ColumnDef("HeroID", new DefaultResolver
Do you know how I can find what team that won? I know the ingame console outputs the following line when a local server lobbygame ends: good_guys_win: true
I would guess that it should be returned by the parser as a boolean value.
There is an entity "GameRulesProxy", it has a property:
"m_pGameRules.m_nGameWinner"
2 = Radiant 3 = Dire
iirc.
On 02/18/2016 09:19 PM, Hareide wrote:
Thanks for the quick replay. By looking at the yasp site you pointed me to, I now almost have everything I need (and more): new ColumnDef("HeroID", new DefaultResolver("PlayerResource", "m_vecPlayerTeamData.%i.m_nSelectedHeroID")), new ColumnDef("Team", new DefaultResolver("PlayerResource", "m_vecPlayerData.%i.m_iPlayerTeam")), new ColumnDef("TeamSlot", new DefaultResolver("PlayerResource", "m_vecPlayerTeamData.%i.m_iTeamSlot")), new ColumnDef("SteamID", new DefaultResolver("PlayerResource", "m_vecPlayerData.%i.m_iPlayerSteamID"))
Do you know how I can find what team that won? I know the ingame console outputs the following line when a local server lobbygame ends: good_guys_win: true
I would guess that it should be returned by the parser as a boolean value.
— Reply to this email directly or view it on GitHub https://github.com/skadistats/clarity-examples/issues/19#issuecomment-185897607.
excuse me,do you know how I can find what team that won?
i try the following in skadistats.clarity.examples.matchend.Main
,but return null
getEntity("GameRulesProxy").getDtClass().getFieldPathForName("m_pGameRules.m_nGameWinner")
Just checked, and m_pGameRules.m_nGameWinner
should be there.
Your replay is from Dota 2, right? I think I'd need the replay.
Thank you for your reply,yes,it's Dota2 replay,how to send you my replay ? email ?
Best to put it in some dropbox and share the link. I'm unsure if my mailserver will gobble it, but you can try: clarity@martin.schrodt.org
I have sent you an e-mail,and i still have the following questions
Checked your replay: The property is there. It has value 5 up until tick ~56700, then changes to 2 (radiant). I ran the matchend-example, it spits out values. Since in your screenshot, you get GameRulesProxy = null, it seems that you did not seek to the end of the replay?
This code here https://github.com/skadistats/clarity-examples/blob/master/src/main/java/skadistats/clarity/examples/matchend/Main.java#L34-L36 is important!
I'm sure there are no changes elsewhere,because getEntity("PlayerResource")
works .
This my code
https://gist.github.com/redfish88/223cbc5f120b2e5942e6684a4627948f#file-main-java-L67-L69
Found the problem. The getEntity()
function does not work, because it looks for CDOTA_GamerulesProxy
.
But in this case, the underscore is missing from the entity name (it should be CDOTAGamerulesProxy
)
So you can look it up via
runner.getContext().getProcessor(Entities.class).getByDtName("CDOTAGamerulesProxy")
Thank you very much,i get it!
Love that you can get the scoreboard from a replay in under a second just by building the example "Show stats at the end of the game" from https://github.com/skadistats/clarity-examples/
The ingame scoreboard also list additional detail such as:
Would you consider adding the above to the example? If not, would it be fairly simple to extend the example for someone with limited programming experience?