ConquerStats - Ingame analysis

The storehouse of handy and helpful plugins/addons and webpages.

Moderators: Tech Team, Global Moderators

Forum rules
Please read the Community Guidelines before posting.

ConquerStats - Ingame analysis

Postby cspare on Sun Sep 21, 2008 4:28 pm

ConquerStats - Ingame analysis
ConquerStats consists of 2 seperate scripts. They work independently from each other, so you can choose the one you like best, or just install both at the same time.

Download link: http://userscripts.org/scripts/show/34187

Screenshots
Overview:
Image

Territories held:
Image

Tooltip:
Image

What it does
ConquerStats shows a bit of extra information about how players are playing their game. In one of the tables you can see how many times every player has attacked his opponents. In another table you can see how efficiently players are using their reinforcements. The total number of reinforcements in all game rounds is shown and divided in four groups: Regular Reinforcements (those you get for having a certain amount of countries), Bonus (those you get for holding continents) Territory Bonus (auto deployed troops for holding certain territories) Spoils (those you get for cashing a set of cards).

Requirements
You must be running Firefox with Greasemonkey installed.
Full instructions for Firefox and Greasemonkey from scratch: viewtopic.php?t=41487

The chart is hosted in a Silverlight (more or less Microsoft's version of Flash) application, so you will need to download the Silverlight runtime if you don't have it already. A download button will automatically appear in the game-screen when you need to download it. You will still need Greasemonkey to insert the chart into the website.

ToDo list
Items on this list are under development.
  • Toggle cumulative totals for charts (Total armies at beginning of the turn)
  • Add an option to continue to draw a 0-reinforcements line for eliminated players
  • Integrate with the BOB script so gamelogs don't have to be downloaded 2 times
  • Add attacks per turn chart

Changelog
  • 1.5.3: It works with colour codes
  • 1.5.2: Site fixes
  • 1.5.1: Minor fixes
  • 1.5.0:
    - The reinforcements table now shows the same stat types as the chart;
    - Fixed strike through style for eliminated players;
    - The version update check now only checks once per browser session, instead of every page view;
    - Some minor lingo changes.
  • 1.4.0: - There now is a setting to define where ConquerStats should appear on the screen: Above to gamelog or Below the gamechat.
  • 1.3.0: - Territories held chart added + improved mouse-over tooltip information.
  • 1.2.0: - Ajax enabled (automatically updates data while playing)
  • 1.1.3 & 1.1.4: - Implemented final release of Silverlight 2.0, instead of beta 2
  • 1.1.2: - Fixed script to match site's change of lingo
  • 1.1.0: - Implemented basic ingame reinforcements charts
Last edited by cspare on Wed Mar 24, 2010 5:54 am, edited 29 times in total.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby BaldAdonis on Mon Sep 22, 2008 1:05 am

Wow!
First thoughts: you should include the armies each player starts with, for the efficiency calculation. I've got one that shows 200% efficiency, and I imagine it would cause errors for any player who hasn't taken a turn yet.
*edit*
After playing around a bit more, could you also add neutrals to the attack list (I like to know how many territories a player has taken in conquest maps) and something funny is going on here Game 3257565. Maybe because of the fog, but it hasn't counted any of my opponents attacks against me, I assume because the territory names are recorded in the log. Presumably, you won't be able to see a count for either of us, but a cursory glance at the log will show that we've been fighting.
User avatar
Lieutenant BaldAdonis
 
Posts: 2321
Joined: Fri Aug 24, 2007 1:57 am
Location: Trapped in Pleasantville with Toby McGuire
Medals: 48
Standard Achievement (3) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Assassin Achievement (1) Freestyle Achievement (2) Fog of War Achievement (3) Speed Achievement (2) Cross-Map Achievement (3)
Ratings Achievement (1) Tournament Achievement (19) General Achievement (2) Clan Achievement (3) Tournament Contribution (1)

Re: ConquerStats - shows several ingame statistics

Postby yeti_c on Mon Sep 22, 2008 2:52 am

Nice work cspare... I'm gonna install this later and have a play.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9670
Joined: Thu Jan 04, 2007 9:02 am
Medals: 46
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (3) Terminator Achievement (1)
Assassin Achievement (1) Freestyle Achievement (1) Fog of War Achievement (3) Cross-Map Achievement (3) Ratings Achievement (3)
General Achievement (1) Map Contribution (13) Tournament Contribution (1) General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby cspare on Mon Sep 22, 2008 4:07 am

BaldAdonis wrote:Wow!
First thoughts: you should include the armies each player starts with, for the efficiency calculation. I've got one that shows 200% efficiency, and I imagine it would cause errors for any player who hasn't taken a turn yet.
*edit*
After playing around a bit more, could you also add neutrals to the attack list (I like to know how many territories a player has taken in conquest maps) and something funny is going on here Game 3257565. Maybe because of the fog, but it hasn't counted any of my opponents attacks against me, I assume because the territory names are recorded in the log. Presumably, you won't be able to see a count for either of us, but a cursory glance at the log will show that we've been fighting.


Ok, thanks for the feedback. I just fixed the problem for your game Game 3257565, it should work now if you download the latest version of the script: http://userscripts.org/scripts/source/34187.user.js.
I'll have a look later tonight to include the starting armies in the effeciency calculation.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby yeti_c on Mon Sep 22, 2008 4:17 am

Initial comments.

a) Include attacks against Neutral armies.
b) for "no cards" games - drop the 2 columns about card reinforcements.
c) I assume you have to download the full log and parse through this to get your stats? - you might want to test what happens when you goto game Game 1000001

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9670
Joined: Thu Jan 04, 2007 9:02 am
Medals: 46
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (3) Terminator Achievement (1)
Assassin Achievement (1) Freestyle Achievement (1) Fog of War Achievement (3) Cross-Map Achievement (3) Ratings Achievement (3)
General Achievement (1) Map Contribution (13) Tournament Contribution (1) General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby e_i_pi on Mon Sep 22, 2008 4:29 am

Points:

1) Me love you long time
2) Very long time
3) Is it possible to show totals for teams? I notice I have reinforced 15 or so armies to a teammate, leaving me with bad efficiency, and boosting theirs to 188%, so it;'s hard to tell on a team-for-team basis
User avatar
Captain e_i_pi
 
Posts: 1772
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world
Medals: 36
Standard Achievement (2) Doubles Achievement (3) Triples Achievement (3) Quadruples Achievement (3) Terminator Achievement (2)
Assassin Achievement (1) Freestyle Achievement (2) Fog of War Achievement (3) Speed Achievement (1) Cross-Map Achievement (3)
Ratings Achievement (3) Tournament Achievement (5) Clan Achievement (3) General Contribution (2)

Re: ConquerStats - shows several ingame statistics

Postby chipv on Mon Sep 22, 2008 5:06 am

Excellent script, cspare!

There is a tiny bug - you get an error if color codes are switched on.

Here is the fix:

Code: Select all
var qryPlayers = /<span class="player(\d)">([\s\w|:]*)<\/span>/gi;
User avatar
Colonel chipv
 
Posts: 2756
Joined: Mon Apr 28, 2008 5:30 pm
Medals: 44
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Manual Troops Achievement (1) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (2) Cross-Map Achievement (3)
Ratings Achievement (2) Tournament Achievement (5) General Achievement (2) Clan Achievement (5) Map Contribution (1)
General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby chipv on Mon Sep 22, 2008 5:18 am

A separate problem with that RegExp:

We have some player names with odd characters that will cause RegExps to fail.

For example find any game with *manimal and you won't see his stats.
User avatar
Colonel chipv
 
Posts: 2756
Joined: Mon Apr 28, 2008 5:30 pm
Medals: 44
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Manual Troops Achievement (1) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (2) Cross-Map Achievement (3)
Ratings Achievement (2) Tournament Achievement (5) General Achievement (2) Clan Achievement (5) Map Contribution (1)
General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby cspare on Mon Sep 22, 2008 6:36 am

chipv wrote:A separate problem with that RegExp:

We have some player names with odd characters that will cause RegExps to fail.

For example find any game with *manimal and you won't see his stats.


Thanks, I fixed the problem and it should work okay now. You can download the latest version from http://userscripts.org/scripts/source/34187.user.js
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby chipv on Mon Sep 22, 2008 7:38 am

Good job. One further problem happens with territories with funny characters in:

For example:

http://www.conquerclub.com/game.php?game=3105844

So just use the same fix for the territory names also:

Code: Select all
var regExQry = /<span class="player(\d)">[ \x21-\x3D\x3F-\x7E]*<\/span> attacked [ \x21-\x3D\x3F-\x7E]* from [ \x21-\x3D\x3F-\x7E]* and conquered it from <span class="player(\d)"/gi;
User avatar
Colonel chipv
 
Posts: 2756
Joined: Mon Apr 28, 2008 5:30 pm
Medals: 44
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Manual Troops Achievement (1) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (2) Cross-Map Achievement (3)
Ratings Achievement (2) Tournament Achievement (5) General Achievement (2) Clan Achievement (5) Map Contribution (1)
General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby cspare on Mon Sep 22, 2008 2:21 pm

Ok, I think I implemented most of the fixes/changes as where requested above.
The most important new features are:
  • Team stats are now included;
  • Attacks versus neutral player is now included;
  • Bonus Card stats are now hidden when no cards are used.

Any feature request or bug report is much appreciated.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby chipv on Mon Sep 22, 2008 4:20 pm

cspare wrote:Ok, I think I implemented most of the fixes/changes as where requested above.
The most important new features are:
  • Team stats are now included;
  • Attacks versus neutral player is now included;
  • Bonus Card stats are now hidden when no cards are used.

Any feature request or bug report is much appreciated.



Great job, cspare!
User avatar
Colonel chipv
 
Posts: 2756
Joined: Mon Apr 28, 2008 5:30 pm
Medals: 44
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (2)
Manual Troops Achievement (1) Freestyle Achievement (1) Nuclear Spoils Achievement (2) Fog of War Achievement (2) Cross-Map Achievement (3)
Ratings Achievement (2) Tournament Achievement (5) General Achievement (2) Clan Achievement (5) Map Contribution (1)
General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby OliverFA on Mon Sep 22, 2008 4:26 pm

Installed. Going to test it...
User avatar
Corporal 1st Class OliverFA
 
Posts: 2361
Joined: Wed Jul 09, 2008 4:30 am
Location: Somewhere in Spain
Medals: 32
Standard Achievement (2) Doubles Achievement (1) Triples Achievement (1) Quadruples Achievement (2) Terminator Achievement (1)
Freestyle Achievement (1) Nuclear Spoils Achievement (1) Fog of War Achievement (2) Trench Warfare Achievement (2) Teammate Achievement (1)
Random Map Achievement (1) Cross-Map Achievement (2) Beta Map Achievement (1) Ratings Achievement (2) Tournament Achievement (1)
Clan Achievement (3) Training Achievement (1) Tournament Contribution (2) General Contribution (5)

Re: ConquerStats - shows several ingame statistics

Postby OliverFA on Mon Sep 22, 2008 4:36 pm

It's a pitty that the log does not show failed attacks, because then you would be able to display that information in your script.
User avatar
Corporal 1st Class OliverFA
 
Posts: 2361
Joined: Wed Jul 09, 2008 4:30 am
Location: Somewhere in Spain
Medals: 32
Standard Achievement (2) Doubles Achievement (1) Triples Achievement (1) Quadruples Achievement (2) Terminator Achievement (1)
Freestyle Achievement (1) Nuclear Spoils Achievement (1) Fog of War Achievement (2) Trench Warfare Achievement (2) Teammate Achievement (1)
Random Map Achievement (1) Cross-Map Achievement (2) Beta Map Achievement (1) Ratings Achievement (2) Tournament Achievement (1)
Clan Achievement (3) Training Achievement (1) Tournament Contribution (2) General Contribution (5)

Re: ConquerStats - shows several ingame statistics

Postby cspare on Mon Sep 22, 2008 4:40 pm

OliverFA wrote:It's a pitty that the log does not show failed attacks, because then you would be able to display that information in your script.

Yea indeed, that would have been nice. But from what I read (somewhere here in the forums) they are working on improving the logs. I will include it in the script as soon as they release it. In the meantime I'll try to get as much out of it as possible, and make a good base for the upcoming log enhancements.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby t-o-m on Tue Sep 23, 2008 1:53 pm

:shock:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/Tom/Application%20Data/Mozilla/Firefox/Profiles/jhqfhxns.default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js :: getFullLog :: line 403" data: no]
Colonel t-o-m
 
Posts: 2824
Joined: Sat Mar 22, 2008 2:22 pm
Location: Redistributing wealth
Medals: 39
Standard Achievement (3) Doubles Achievement (3) Triples Achievement (2) Quadruples Achievement (1) Terminator Achievement (1)
Assassin Achievement (2) Manual Troops Achievement (2) Freestyle Achievement (3) Fog of War Achievement (3) Speed Achievement (3)
Teammate Achievement (2) Cross-Map Achievement (2) Ratings Achievement (3) Tournament Achievement (1) General Achievement (1)
Clan Achievement (2) Map Contribution (1) Tournament Contribution (3) General Contribution (1)

Re: ConquerStats - shows several ingame statistics

Postby cspare on Tue Sep 23, 2008 2:52 pm

t-o-m wrote::shock:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/Tom/Application%20Data/Mozilla/Firefox/Profiles/jhqfhxns.default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D/components/greasemonkey.js :: getFullLog :: line 403" data: no]


Hmm, that might have something to do with other (grease monkey) scripts trying to access a remote file at the same time. Could you please paste your list of installed scripts (in the order they appear)?
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby yeti_c on Wed Sep 24, 2008 3:20 am

You can get this in BOB by leaving the game screen very soon after loading it too.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9670
Joined: Thu Jan 04, 2007 9:02 am
Medals: 46
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (3) Terminator Achievement (1)
Assassin Achievement (1) Freestyle Achievement (1) Fog of War Achievement (3) Cross-Map Achievement (3) Ratings Achievement (3)
General Achievement (1) Map Contribution (13) Tournament Contribution (1) General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby cspare on Wed Sep 24, 2008 4:29 am

yeti_c wrote:You can get this in BOB by leaving the game screen very soon after loading it too.

C.


In the BOB plugin for getting the snapshot XML the script retries up to 10 times, has that something to do with this problem aswell? And do you have any idea why it still fails quite often after the page has been open for a while, but always works after a refresh?
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby yeti_c on Wed Sep 24, 2008 4:33 am

cspare wrote:
yeti_c wrote:You can get this in BOB by leaving the game screen very soon after loading it too.

C.


In the BOB plugin for getting the snapshot XML the script retries up to 10 times, has that something to do with this problem aswell? And do you have any idea why it still fails quite often after the page has been open for a while, but always works after a refresh?


Yes - if you the image has changed then the 'URL' you have for it will be wrong so the server will return nothing - so you have to have the latest map image to take the snapshot - this can often happen in freestyle or speed. (i.e. someone else is playing and has changed the map)

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9670
Joined: Thu Jan 04, 2007 9:02 am
Medals: 46
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (3) Terminator Achievement (1)
Assassin Achievement (1) Freestyle Achievement (1) Fog of War Achievement (3) Cross-Map Achievement (3) Ratings Achievement (3)
General Achievement (1) Map Contribution (13) Tournament Contribution (1) General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby cspare on Mon Sep 29, 2008 4:53 pm

I've just added a new script to ConquerStats: Score Charts. The start post is updated with some information.

The download link is: http://userscripts.org/scripts/show/34706.

I hope you all like it. Any feedback is appreciated.
Sergeant 1st Class cspare
 
Posts: 101
Joined: Sun Apr 08, 2007 12:56 pm
Medals: 8
Standard Achievement (1) Doubles Achievement (1) General Contribution (6)

Re: ConquerStats - shows several ingame statistics

Postby brandoncfi on Tue Sep 30, 2008 1:24 am

I love it...Alothough the new script is not working for me the in-game in very useful
Highest point total 2774 and a rank of Colonel.
OSA of You
OSA Obsructing Your Sleep
GO STEELERS !!!
User avatar
Cook brandoncfi
 
Posts: 1172
Joined: Sun Nov 11, 2007 4:40 am
Location: L.A. to watch the Lakers win a Championship
Medals: 46
Standard Achievement (3) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (2) Terminator Achievement (1)
Assassin Achievement (1) Manual Troops Achievement (1) Freestyle Achievement (2) Fog of War Achievement (3) Speed Achievement (1)
Teammate Achievement (2) Random Map Achievement (1) Cross-Map Achievement (3) Ratings Achievement (3) Tournament Achievement (5)
Clan Achievement (5) Tournament Contribution (9)

Re: ConquerStats - shows several ingame statistics

Postby yeti_c on Tue Sep 30, 2008 2:47 am

Loving the new graphing tool - that is really awesome.

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9670
Joined: Thu Jan 04, 2007 9:02 am
Medals: 46
Standard Achievement (2) Doubles Achievement (2) Triples Achievement (2) Quadruples Achievement (3) Terminator Achievement (1)
Assassin Achievement (1) Freestyle Achievement (1) Fog of War Achievement (3) Cross-Map Achievement (3) Ratings Achievement (3)
General Achievement (1) Map Contribution (13) Tournament Contribution (1) General Contribution (10)

Re: ConquerStats - shows several ingame statistics

Postby Twill on Tue Sep 30, 2008 8:12 am

cspare - for some reason in a game I just finished "total attacks" was reading way too low.

It said I had something like 10 successful attacks when I had 8 in that round alone.

could you also explain what the stats are (either a hover CSS tooltip type thing or a help box)

Last request: an update alert like BOB and clickable maps have so that users who have this installed will know when to upgrade without coming here?

Is this using the new XML file?

Great work!
Twill

<edit> I lied, couple more suggestions: Split the graph into a 2nd thread, you're going to get a lot of traffic on that one and separate threads would be best.

Requests for the chart: add dates along the bottom (the date games ended?) and plot the game as a linkable point on the graph so a user can click on a point and be taken straight to a game for reference.
Retired.
Please don't PM me about forum stuff any more.

Essential forum poster viewing:
Posting, and You! and How to behave on an internet forum...on the internet
User avatar
Corporal 1st Class Twill
Retired Administrator
 
Posts: 3677
Joined: Fri Jan 20, 2006 10:54 pm
Medals: 11
Standard Achievement (3) Freestyle Achievement (2) Fog of War Achievement (1) Speed Achievement (1) Random Map Achievement (1)
Cross-Map Achievement (1) General Achievement (1) General Contribution (1)

Re: ConquerStats - shows several ingame statistics

Postby Optimus Prime on Tue Sep 30, 2008 8:40 am

I've installed them both, but.... the Score Chart isn't working. It says "Loading chart..." and then finishes, but nothing is displayed. :(
User avatar
Cadet Optimus Prime
Retired Administrator
 
Posts: 9747
Joined: Mon Mar 12, 2007 9:33 pm
Medals: 51
Standard Achievement (3) Doubles Achievement (2) Triples Achievement (1) Terminator Achievement (1) Speed Achievement (1)
Teammate Achievement (1) Cross-Map Achievement (3) Ratings Achievement (3) Tournament Achievement (1) General Achievement (2)
Tournament Contribution (30) General Contribution (3)

Next

Return to Available Tools/Enhancements

Who is online

Users browsing this forum: Charle, Chewie1, Robert The Red, Slaylark

cron
Login