Conquer Club

ConquerStats - Ingame analysis

The home of third-party tools and utilities that can enhance your Conquer Club experience.

Moderator: Tech Team

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

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
Captain BaldAdonis
 
Posts: 2334
Joined: Fri Aug 24, 2007 1:57 am
Location: Trapped in Pleasantville with Toby McGuire

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: 9624
Joined: Thu Jan 04, 2007 9:02 am

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

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: 9624
Joined: Thu Jan 04, 2007 9:02 am

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: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world

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
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

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
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

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

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
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

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

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
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: ConquerStats - shows several ingame statistics

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

Installed. Going to test it...
User avatar
Private OliverFA
 
Posts: 2295
Joined: Wed Jul 09, 2008 4:30 am
Location: Somewhere in Spain

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
Private OliverFA
 
Posts: 2295
Joined: Wed Jul 09, 2008 4:30 am
Location: Somewhere in Spain

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

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]
User avatar
Major t-o-m
 
Posts: 2916
Joined: Sat Mar 22, 2008 2:22 pm

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

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: 9624
Joined: Thu Jan 04, 2007 9:02 am

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

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: 9624
Joined: Thu Jan 04, 2007 9:02 am

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

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: 1179
Joined: Sun Nov 11, 2007 4:40 am
Location: Escondido Ca

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: 9624
Joined: Thu Jan 04, 2007 9:02 am

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
 
Posts: 3630
Joined: Fri Jan 20, 2006 10:54 pm

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
 
Posts: 9665
Joined: Mon Mar 12, 2007 9:33 pm

Next

Return to Third-Party Tools & Enhancements

Who is online

Users browsing this forum: Silly Knig-it