problem with getting achievements' percentage for games with stats

74 views
Skip to first unread message

Tomasz Doroz

unread,
Jan 15, 2014, 4:37:00 AM1/15/14
to steam-c...@googlegroups.com
For several games that have expanded stats I cannot seem to get proper values for achievement percentage. This happens for sure on Alien Swarm, EYE Divine Cybermancy, WH40k Dawn of War 2 Retribution.

The code I'm using is :

try {
achiev = id.getGameStats(gameShortName).getAchievementsPercentage();
achievPercent = String.valueOf(Math.round(achiev * 100)) + "%";
}catch(Exception ex){
// Nothing to do
}

The problem is within

return GameStats.createGameStats(this.customUrl, game.getShortName());

I guess some logic needs to be modified for those games with expanded stats and it is currently missing. Either this or I'm doing something wrong.

Sebastian Staudt

unread,
Jan 15, 2014, 5:45:11 AM1/15/14
to steam-condenser
What is the specific problem you are encountering?
Catching all exceptions and doing nothing may disguise the real cause here.


2014/1/15 Tomasz Doroz <tdo...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Steam Condenser" group.
To unsubscribe from this group and stop receiving emails from it, send an email to steam-condens...@googlegroups.com.
To post to this group, send email to steam-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/steam-condenser/2f221097-40cb-4304-9140-5c71ef4f0aef%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Tomasz Doroz

unread,
Jan 22, 2014, 3:48:55 PM1/22/14
to steam-c...@googlegroups.com
For example on WH40k Dawn of War 2 Retribution...

In SteamId.class...

return GameStats.createGameStats(this.customUrl, game.getShortName());

goes to GameStats.class...

public static GameStats createGameStats(Object steamId, String gameName)
            throws SteamCondenserException

and not finding the game on the list of special cases tries to return...

return new GameStats(steamId, gameName);

but fails on xml parsing and throws...

throw new SteamCondenserException("XML data could not be parsed.", e);

instead. This happens for the three games mentioned in the first post. Any chance to fix this?

Sebastian Staudt

unread,
Jan 23, 2014, 1:15:18 AM1/23/14
to steam-condenser
When trying to reproduce this I noticed that Steam Community redirects any requests to a stats page using `?xml=all` (what Steam Condenser uses) to `?xml=1`.
`?xml=all` had been introduced for some games in the past and I'm pretty sure Alien Swarm was one of them. They had only parts of the data returned when using `?xml=1`.

It seems that this might be related.

Looking at http://steamcommunity.com/id/koraktor/stats/AlienSwarm?xml=1, there's no useful data at all.


2014/1/22 Tomasz Doroz <tdo...@gmail.com>
Reply all
Reply to author
Forward
0 new messages