Stats Tribe/player daily record table extension

Shinko to Kuma

Still Going Strong
Reaction score
786
Author
Shinko to Kuma
Contributors
Sass
Quickbar Entry
javascript:$.getScript("https://shinko-to-kuma.com/scripts/tribeStats.js");
Public?
Public
Approved ticket nr. t13750962

Hi all

This script will collect all the important daily records for players in a chosen tribe, or a specific part of the player leaderboard. This might be usefull to get a good idea of how people are performing, and where they get most of their growth from. Clicking one of the category headers will sort the table according to that category, ascending/or descending, depending on how many times you click it :)

Screenshots:

FKKrV.png

FKKtB.png

FKKuU.png

this script can be ran on several pages:
tribe -> members
ranking -> players
ranking -> tribe -> select tribe of choice -> on tribe player overview

Script:

Code:
javascript:
$.getScript("https://shinko-to-kuma.com/scripts/tribeStats.js");


As always, feedback is appreciated in the comments :)

Sophie "Shinko to Kuma"
 
Changelog
18/4/2021 - Changed host
Last edited:
Upvote 8

Deleted User - 11283139

Guest
nice script.

You should consider replacing
if (window.location.href.indexOf('screen=ranking&mode=player') >-1)
by
if (window.location.href.indexOf('screen=ranking&mode=player') >-1 || (window.location.href.indexOf('screen=ranking') >-1 && window.location.href.indexOf('&mode') == -1))

in the "ranking -> players" page

because when you click on "ranking" you arrive on the player ranking but the "&mode" is missing in the url so the script doesn't work and we are obliged to click specifically on "players" to be able to run it^^
 

Shinko to Kuma

Still Going Strong
Reaction score
786
nice script.

You should consider replacing
if (window.location.href.indexOf('screen=ranking&mode=player') >-1)
by
if (window.location.href.indexOf('screen=ranking&mode=player') >-1 || (window.location.href.indexOf('screen=ranking') >-1 && window.location.href.indexOf('&mode') == -1))

in the "ranking -> players" page

because when you click on "ranking" you arrive on the player ranking but the "&mode" is missing in the url so the script doesn't work and we are obliged to click specifically on "players" to be able to run it^^

Done, didn't think about that, ty :)
 

Ragestyles

Still Going Strong
Reaction score
514
that script is badass not gonna lie, saves some time and gives all the clear and useful information in 1 screen
 

natanprog

Member
Reaction score
11
@Shinko to Kuma
Diff:
8a9,30
> var langShinko;
> switch(game_data.locale) {
>   case "pt_BR":
>     langShinko = {
>         "ODA": "ODA",
>         "ODD": "ODD",
>         "ODS": "ODS",
>         "Loot": "Saqueado",
>         "Gathered": "Coletado",
>         "Combined": "Combinado"
>     }
>     break;
>   default:
>     langShinko = {
>         "ODA": "ODA",
>         "ODD": "ODD",
>         "ODS": "ODS",
>         "Loot": "Loot",
>         "Gathered": "Gathered",
>         "Combined": "Combined"
>     }
> }
107c129
< $(tribeTable+" tr").eq(rowStart-1).append("<th onclick='sortTableTest("+columnStart+")'>ODA</th><th onclick='sortTableTest("+(columnStart+1)+")'>ODD</th><th onclick='sortTableTest("+(columnStart+2)+")'>ODS</th><th onclick='sortTableTest("+(columnStart+3)+")'>Loot</th><th onclick='sortTableTest("+(columnStart+4)+")'>Gathered</th><th onclick='sortTableTest("+(columnStart+5)+")'>Combined</th>")
---
> $(tribeTable+" tr").eq(rowStart-1).append("<th onclick='sortTableTest("+columnStart+")'>"+langShinko["ODA"]+"</th><th onclick='sortTableTest("+(columnStart+1)+")'>"+langShinko["ODD"]+"</th><th onclick='sortTableTest("+(columnStart+2)+")'>"+langShinko["ODS"]+"</th><th onclick='sortTableTest("+(columnStart+3)+")'>"+langShinko["Loot"]+"</th><th onclick='sortTableTest("+(columnStart+4)+")'>"+langShinko["Gathered"]+"</th><th onclick='sortTableTest("+(columnStart+5)+")'>"+langShinko["Combined"]+"</th>")
 
Last edited:

Shinko to Kuma

Still Going Strong
Reaction score
786
I updated my script to now have a BB export and customisable search option

Code:
javascript:
var customNames=["Name 1","Name 2","Name 3"]
$.getScript('https://dl.dropboxusercontent.com/s/dg2z1ikc4pi6v84/tribeStats.js');

You can add as many names as you'd like, just replace the Name 1 etc with whoever. The table it creates on the page will have the time of the daily record on mouseover, but it won't be in the BB export

@natanprog added, ty ^^
 

jaro

Active Member
Reaction score
7
Can you add spanish?
es_ES

"ODA": "ODA",
"ODD": "ODD",
"ODS": "ODS",
"Loot": "Saqueado",
"Gathered": "Recolectado",
"Combined": "Combinado"


thanks @Shinko to Kuma
 

remerofantasma

New Member
Reaction score
1
Can u add German?

"ODA": "BGA"
"ODD": "BGV"
"ODS": "BGU"
"Loot": "Geplündert"
"Gathered": "Gesammelt"
"Combined": " insgesamt "
Ty
 

DonKapparino

New Member
Reaction score
2
Hi, I think I've found a bug. The script swaps ODD and ODS records in a day.

The bug appears to be on lines 219-220, seems quite trivial. Now it reads
Code:
if (statsEnabled.ODD) linksODS.push("/game.php?screen=ranking&mode=in_a_day&type=kill_sup&name=" + names[i]);
if (statsEnabled.ODS) linksODD.push("/game.php?screen=ranking&mode=in_a_day&type=kill_def&name=" + names[i]);
but I think is should be
Code:
if (statsEnabled.ODD) linksODD.push("/game.php?screen=ranking&mode=in_a_day&type=kill_def&name=" + names[i]);
if (statsEnabled.ODS) linksODS.push("/game.php?screen=ranking&mode=in_a_day&type=kill_sup&name=" + names[i]);

BTW do you use Github or a similar service?
 

iDisbelieve

Active Member
Reaction score
35
This script is no longer working for me when I try to run it (nothing happens on execution). Looks to have been broken my a game update.
 

iDisbelieve

Active Member
Reaction score
35
I just tried it on every single page and it still works

I took a look at the .js file and it starts with
Code:
javascript:

Do I need to somehow remove that section from the quick-bar? cause now I'm basically duplicating that line in both the quick-bar and then the file and I think that is what's causing the problems for me.
 

Shinko to Kuma

Still Going Strong
Reaction score
786
I took a look at the .js file and it starts with
Code:
javascript:

Do I need to somehow remove that section from the quick-bar? cause now I'm basically duplicating that line in both the quick-bar and then the file and I think that is what's causing the problems for me.
it makes no difference. it's just a declaration that javascript follows after it.

What server are you trying to run this on/page? I tested this on rankings, on tribe overview, and on tribe members page and it still all works
 
Top