PDA

View Full Version : I made something.



Sen
April 12th, 2016, 01:05 AM
Cleared the day to play just to find out that I was killed on N1 yet again. I was bored and wondering how many times that had happened, then thought that it'd be cool to have some sort of player's database.

Long stroy short, I put together a script that adds an option to the player menu (the little popup you get when you click somebody's name), and when you click it you get some statistics of their game's history.

http://i.imgur.com/9c4RvBb.png

Of course, I'm too lazy to build a database by myself, so the idea is that people interested in using the script submit their information and we build it together.

The script doesn't need to be updated; all information submited will be available to everyone as soon as I update the data file.

If you want to participate, just follow these steps:
1.- Install the script (http://pastie.org/pastes/10794494/text?key=ep0tilnl0ezn9caimvng) (You need Greasemonkey, Tampermonkey or whatever your browser uses).

2.- Upload a file like this (http://pastie.org/pastes/10794483/text?key=htnggohegk4drfl6ue9pa) with your information by replacing all the parts in all-caps and post it here.
Here's an example (http://pastie.org/pastes/10794464/text?key=6nqeuidyrs9xaiwne1lw) with my information, and here (http://pastie.org/pastes/10794482/text?key=sghtynfhpv3t4liakpraga)'s a clean version of the sample with no comments.

3.- Wait for me to check the thread and update the file, and anyone with the script installed will be able to see your game history.

Notes:
- For the alignment field, use "Third" if you aren't Town or Mafia, no matter if you are a town-sided or scum-sided faction; only use "Town" and "Mafia" if you are precisely that.
- Only include completed games. If you were replaced or modkilled, that doesn't count. Same for hosting; if you abandoned or cancelled the game, don't list it.
- The alignment field must have a leading uppercase letter followed by lowercase ones. The fields that are filled with "true" and "false" are all lowercase. Size field goes capitalized. The rest don't matter.
- I'm inebriated and I hate/don't know JS, HTML et al. The code is likely a horrid mess. Feel free to clean and/or fix it and upload an update.

And that's it. I really hope someone likes the idea, else it'll be nothing but a glorified statistics page for me. >_>

Firebringer
April 12th, 2016, 01:14 AM
I actually have a personal database that I had up to date until Last December with all my Forum Mafia games (Which is now way over 100+, god damn)

I can put in statistics I have for this site:

(SFM-164 Was last one I kept track of...)

Wins: 13
Losses: 9
Games Played: 22
In Progress: 1 (at the time)
W/L: 59%
Lynched: 2
Night Killed: 8


Just statistics for factions:
Town Win: 47%
Scum Win: 53%

Each game goes into a little more like what night I died or what day I was lynched, Etc.

Firebringer
April 12th, 2016, 01:18 AM
Here are my stats for all games played (needs updating)
Wins: 54
Losses: 46
Games Played: 100
In Progress: 13
W/L: 54%
Lynched: 28
Night Killed 24

Town Wins %: 52
Mafia Win %: 48

Lynched: 28%
NK: 24%
Endgamed: 48%

Sen
April 12th, 2016, 01:20 AM
That's great. (:
You need to upload it in the format of the sample files for the script to be able to show your stats, tho.

Firebringer
April 12th, 2016, 01:21 AM
That's great. (:
You need to upload it in the format of the sample files for the script to be able to show your stats, tho.

I will do so then :)
I need to update my database personally also.

Ill look at this weekend.

Sen
April 12th, 2016, 01:24 AM
Cool. (:
I hope more people like the idea and join.

BananaCucho
April 12th, 2016, 02:02 AM
I like this idea!

On site:

Banana: 6-2 (7 S-FM and 1 FM)

Toadette: 17-4 (all S-FM)

Overall: 23-6 (79%)

Orpz
April 12th, 2016, 09:09 AM
Calix

This looks great!

Cryptonic
April 12th, 2016, 09:12 AM
Enjoy this rep

Calix
April 12th, 2016, 09:13 AM
Calix

This looks great!

Will definitely be helpful for what I'm doing :p

Sen
April 12th, 2016, 10:23 AM
Banana, you need to post the data in the format linked in the op for it to work with the script.

I'm glad people are showing interest.

BananaCucho
April 12th, 2016, 10:47 AM
Banana, you need to post the data in the format linked in the op for it to work with the script.

I'm glad people are showing interest.

Yes I know, I just wanted to brag to fire for a moment :)

Helz
April 12th, 2016, 10:49 AM
This looks really cool. I will have to mess with it

Firebringer
April 12th, 2016, 03:50 PM
Yes I know, I just wanted to brag to fire for a moment :)

I recalculated all latest games and got a win rate above 60%
So not really impressed with yours.

secondpassing
April 13th, 2016, 10:39 PM
Mine was really simple, but I should really be studying...

Never hosted a game-- so I just remove it correct?
Tip: game number is in the url, same with player number

Script (http://pastie.org/10797218)

Sen
April 14th, 2016, 10:30 AM
Updated. (:

Changed your "Faction 2" to "Third", since to avoid issues with all the possible factions, I'm considering all non strictly Town or Mafia factions as 3rd party.

BananaCucho
April 14th, 2016, 11:51 AM
I recalculated all latest games and got a win rate above 60%
So not really impressed with yours.

The jealousy is real :)