ConquerStats - Ingame analysis

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

Moderators: Global Moderators, 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
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
Image
User avatar
Captain e_i_pi
 
Posts: 1770
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: 2758
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: 2758
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: 2758
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: 2758
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
Lieutenant OliverFA
 
Posts: 2345
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
Lieutenant OliverFA
 
Posts: 2345
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)

Next

Return to Available Tools/Enhancements

Who is online

Users browsing this forum: Crazysnakeguy, dkmaster, General Roy, loutil, spjegues, Tiberius Maximus, Woltato and 3 guests

Login