Comments (12)
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: trueI would guess that it should be returned by the parser as a boolean value.
—
Reply to this email directly or view it on GitHub
#19 (comment).
from clarity-examples.
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.
from clarity-examples.
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.
from clarity-examples.
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")
from clarity-examples.
Just checked, and m_pGameRules.m_nGameWinner
should be there.
Your replay is from Dota 2, right? I think I'd need the replay.
from clarity-examples.
Thank you for your reply,yes,it's Dota2 replay,how to send you my replay ? email ?
from clarity-examples.
Best to put it in some dropbox and share the link.
I'm unsure if my mailserver will gobble it, but you can try: [email protected]
from clarity-examples.
I have sent you an e-mail,and i still have the following questions
- Can i get the match id 、match start time、end time in matchend ?
- How to get the mapping relationship between heroId and heroName? or can i get the heroName from entity's field?
- How to get hero_damage、tower_damage 、killed_by and other info?
Thank you again for your reply!
from clarity-examples.
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!
from clarity-examples.
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
from clarity-examples.
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")
from clarity-examples.
Thank you very much,i get it!
from clarity-examples.
Related Issues (20)
- How to dump the results into txt or json file? HOT 1
- How to get current gold of each player at each tick? HOT 6
- Hi! What is the standard map size and coordinate boundary? HOT 6
- How to get bans and picks from basic info? They are not returned. HOT 3
- Problem with m_flMagicalResistanceValue HOT 3
- get java.lang.reflect.InvocationTargetException when try to get getDtClass() of an entity HOT 8
- Jump to tick at n-th effective minute mark HOT 4
- Hi!How can i get the position and basic information of heroes of each tick? HOT 1
- How do I know the meaning of num? HOT 1
- Item and ability names HOT 4
- Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4 HOT 3
- Is there data for fights in the demo? The "show fight recap" button of dota 2 client HOT 2
- Is the allchat example still relevant? HOT 1
- How to find the initial tick that corresponds to the game start? HOT 7
- Bug report - AllChatProcessor
- Can I extract the key press times? HOT 1
- How can I modify the combatlog example to include maximum health for getAttackerName and getTargetName? HOT 1
- Exception in thread "main" skadistats.clarity.ClarityException: cannot determine last tick before engine type is known HOT 1
- How to get all info contained in the replay as text output? HOT 10
- Can't run any example HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clarity-examples.