ScumBait

This forum is for discussion related to the game.
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #26 (isolation #0) » Sun May 11, 2008 11:17 am

Post by Kison »

I've never touched python in my life(until today) but I think I got the post numbers part working :

Code: Select all

def id_of_post(post):
    try:
        body = post.findParent('tr').parent.find('span', 'postdetails')
        return body.contents[2].split(': ')[1].strip()
    except AttributeError:
        return '??'


Seems to work for me.
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #31 (isolation #1) » Wed Oct 01, 2008 4:33 pm

Post by Kison »

I was actually planning on bumping this. Weilawei hasn't been on the site since June and it looks like the original file has expired from flyupload. Luckily(for anyone who cares), I still have it. You can grab it from here.

Not really sure how complete this is anymore as I've not messed with it in a while. I'm not exactly a Python pro, either, but I can try adding to this if people so desire.

Love,

Random Guy.
Last edited by Kison on Thu Oct 02, 2008 4:11 am, edited 1 time in total.
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #36 (isolation #2) » Thu Nov 06, 2008 11:53 am

Post by Kison »

I have no idea if this is still being worked on as I had vanished right around the time Weilawei posted again, but one of the things that'd have to be looked into is accounting for other moderators taking over a game. Otherwise, things can get a little whacked. Examples: I recall Adel taking over Mafia 78 and Mr. Flay taking over Mafia VS. Wolves Redux despite being players who had perished.

This likely ties into accounting for player deaths. If you can have the script conclude that player X is dead, then seeing player X post again should likely be ignored as far as activity & votes are concerned(with the exception being resurrections, which was the case for MrBuddyLee in Pirates VS Ninjas, and I think a ton of players in Adel's Nightmare game?).

Reason for needing to identify the moderator: I was playing around with this the other day and had plugged in game 8222 and noticed that Mr. Stoofer, the moderator, had a ton of votes spit out in the results. The reason was that every vote count he made was titled
Vote Count
, so the script was seeing this as an actual vote.

For moderators, might be necessary to require the user to input all the mods who have at some point taken over a game. This method would be an issue with the two examples I gave above. The only solution would be to identify the moderators and at which point they became moderators, which would be a bit tedious for those who don't remember.

So,

1) Determine the moderators and at which point they are moderating.
2) Determine when a player dies/resurrects.
3) Link replaced players with their predecessors.

If those three issues could be taken care of, I think this would be a much handier tool.

In another thread there was someone who was worried about not being able to set this up on their system. I made a dinky little page where this can be run: http://scumbait.mine.nu/. Ignore the ads.
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #42 (isolation #3) » Fri Nov 07, 2008 12:22 pm

Post by Kison »

Weilawei's code is still a bit confusing to me, but I managed to do a few things:

- Fixed(more like sloppily patched) a bug that made players with weird letters like Kaleidoscope break the script. It'll act as if the unidentifiable letters don't exist.
- The 'total activity' for each player summary wasn't displaying proper posts-per-player / total posts. So far they're matching up after I made some changes, though.
- Added a new line that displays how many words a player has posted as well as their average word count per post. Example:
Player Summary for Kison
------------------------
3.4% of total activity (39/1154)
Total words posted: 4646. Average per post: 119.13
--------------------------------------------------
Player Summary for Jitsu
------------------------
8.1% of total activity (93/1154)
Total words posted: 20697. Average per post: 222.55
---------------------------------------------------
Someone earlier in the thread had a graph using word counts. Not sure if I can do that, but I can try sometime later.
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #45 (isolation #4) » Sat Nov 08, 2008 6:03 am

Post by Kison »

Mr. Flay wrote:Surely there's a way to 'escape' the non-ASCII characters? I don't know the language this is written in, but usually additional quotes do the trick.
I've done some more research and found a way to perform different types of conversion(backslash escaping, XML, replace, and ignore). The last two are more along the lines of what I was doing to prevent the script from crashing. When I use the XML conversion method, and run the script on the page, KaleiÃ

Return to “Mafia Discussion”