|
Hello!
I've been working on an automated votecount tool for TL Mafia games (it only works for games on this forum) during the recent months with an old friend of mine. It's now basically functional and open for feedback / bug reports / suggestions / etc. here:
https://mafia-votecount.herokuapp.com
The idea is pretty simple. When you host a new game, you just click the button "Create New Game" and then enter the URL of the game thread as well as the names of the hosts. For example like this:
URL Address: http://www.teamliquid.net/forum/mafia/487695-ot-vs-the-mods-mafia Host Name(s) (for example 'host1 line break host2'): yamato77 Onegu
(Note that the host names have to be separated by line breaks!)
The field "Players" is optional since it doesn't affect anything except the player listing at the top of the game view.
Now the Heroku application starts scanning the game thread - it goes through every post and checks if there's a vote/unvote in the post. If there is, it adds it to the database. Then the website reads the list of votes and displays it on the game view. Every 15 minutes after this the application scans any new posts in the same thread and adds any new votes to the database.
I've already done some amount of testing and everything seems to work fine so far. However, it's not 100% certain that everything works as intended That's part of the reason why I made this thread.
There are just a couple of restrictions for games that use this system. First of all, the votes/unvotes need to be in the standard format (##Vote X / ##Vote: X etc.). In addition, the Day/Night posts need to be in the standard format (starting with "Day X" etc., not some themed version of that). Finally, every Day/Night post needs to be made by a host/co-host (the players entered into "Host Name(s)" field).
But why make this website? Well, the main purpose is to reduce the need for separate voting threads and to make the hosts' jobs easier. Now you can just effectively create one thread for your game, insert your thread URL to this website and easily see who's voted for who throughout the game. No need for additional threads or having to go through a vast amount of posts in search of votes.
All the basic functionality of the website is already implemented, but no doubt there's an unlimited amount of new features that could be implemented. When you make suggestions, keep in mind that I've mainly worked on the front end (what's displayed to the user) of the application while my friend has been working on the back end (what happens in the background) of the application. I'm relatively busy at the moment, but my friend is probably a lot more busy, so suggestions for the front end (how the votes are displayed etc.) would be easier to implement for the time being.
Here are some ideas that I've been pondering to implement at some point in the future already (if I/we get around to it ):
1) The votes of the current day could perhaps also be displayed in the same format as the regular votecount posts on the forum. That way the host/co-host could simply always copy the most recent vote listing of this format to the thread when there's a need for another votecount post. However, there's a major problem with this idea: it's that many players vote with all kinds of "nicknames" or just misspell when they're voting. That causes huge difficulties for displaying votes neatly in such a format.
2) There could be some sort of an authentication system for creating new games. This way only actual hosts could create new games and there wouldn't be any need to worry about trolls ruining the website by spamming the "Create New Game" button. Hopefully there wouldn't even be a need for this, but... 
3) It could be nice to be able to manually edit/remove games from the list. However, this would probably require the authentication system to be implemented first...
4) It could also be nice if "old" games (no new votes for 5 days or something like that) would be automatically deleted.
Well, good luck and let me know your thoughts!
|
For some reason, it seems that it's not noticed when the day changes in the game [T][I]OT vs The Mods Mafia. Will investigate.
|
It might be related to the unusual formatting of the Day 2 post ([B][blue]Day 2 ). Well, I guess I'll wait and see what happens from now on... Not going to change the scanning method right now.
|
Or not... Those were closed off later in the same post...
|
That looks really good!
[...]... it's that many players vote with all kinds of "nicknames" or just misspell when they're voting. Honestly this should not be a problem. People should check their spelling (if this was implemented) when doing the most important thing in a game of mafia.
|
Haha, I guess so In any case, at least the current way of just showing the votes in a list is quite foolproof and doesn't require much effort from the hosts/players. The main purpose was to reduce required effort, after all.
|
If you just show a list of posts like that and not ACTUALLY do votecounts then the problem is kinda already solved. As if i do ##Vote: Xata it would just show "raynpelikoneet voted for Xata". Then the hosts can do the votecounts based only on the voting posts.
|
|
Yeah i looked at it quickly. tbh i don't find it hard for hosts to make the correct votecount in case you could "print" a list out and it said:
raynpelikoneet (2); Xatalos, marvellosity rayn (1); HolyFlare
As host you can obviously tell which votes are meant to cast for real on what people and which are not.
|
Hmm... That's a good idea actually :D
|
srsly you didn't think of that? i thought that was the point of this thing in the first place.
|
Well the original idea was to be an easily copy-pasteable votecount shower. Then it changed to a list of votes (kind of like an automatic voting thread) since there were difficulties with that approach. But I guess that's a reasonable compromise to add in the future.
|
How are you fetching text from forum posts?
|
On July 07 2015 05:33 batsnacks wrote: How are you fetching text from forum posts?
Hm? You basically just download the contents of the whole page and then go through the text searching for certain patterns such as posts and votes/unvotes.
|
On July 07 2015 06:04 Xatalos wrote:Show nested quote +On July 07 2015 05:33 batsnacks wrote: How are you fetching text from forum posts? Hm? You basically just download the contents of the whole page and then go through the text searching for certain patterns such as posts and votes/unvotes.
I tried this before and I can't find where the posts are: + Show Spoiler + [15-07-06 17:48:38:716 EDT] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en" dir="ltr"> <head> <title>Mafia Votecount Tool</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="csrf-token" content="nS1otfa1"> <meta name="viewport" content="width=1214"> <link rel="stylesheet" type="text/css" href="/mirror/v25/tla4.min.css"> <link href="//fonts.googleapis.com/css?family=Open+Sans:600" rel="stylesheet" type="text/css"><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" src="/mirror/v15/functions4.min.js"></script> <link rel="shortcut icon" href="/favicon.ico"> <link rel="canonical" href="http://www.teamliquid.net/forum/mafia/489506-mafia-votecount-tool"></head> <body onload="resize_images2()"> <div id="navwrapper"> <div id="userpanel"> <ul> <li><a id="top-login-button" href="/mytlnet/login">Log In</a></li> <li class="guestlink"><a href="/mytlnet/register">Register</a></li> <li class="guestlink"><a href="/mytlnet/siteprefs.php">Settings</a></li> <li><a href="" id="up_drop" class="upicons tb-sprite toggle_link" title="Log In"></a></li> </ul> <div id="userpanelend"></div> </div> <div id="up_dropdown"> <div id="up_dropdown_content"> <div id="loginbox"> <form method="post" action="/mytlnet/login.php"> <input type="hidden" name="token" value="nS1otfa1"> <table> <tr> <td><label for="loginname">Username</label></td> <td><input class="text" type="text" size="12" name="loginname" id="loginname" tabindex="1" required="required"></td> </tr> <tr> <td><label for="loginpasswd">Password</label></td> <td><input class="text" type="password" size="12" name="loginpasswd" id="loginpasswd" tabindex="2" required="required"></td> </tr> <tr> <td> <button id="loginsubmit" type="submit" tabindex="3">Log In</button> </td> <td> <input type="checkbox" name="makeAcookie" id="makeAcookie" value="1" tabindex="4"> <label for="makeAcookie">Remember Me</label> </td> </tr> </table> <input type="hidden" name="stage" value="1"> <input type="hidden" name="back_url" value="/forum/mafia/489506-mafia-votecount-tool"> </form> </div> </div> <div id="up_dropdown_end"> </div> </div> <div class="topmenubar"> <div class="top_menu right"> <span><a href="http://www.teamliquidpro.com/">TeamLiquidPro</a></span> <span><a href="http://wiki.teamliquid.net/">Liquipedia</a></span> <span><a href="http://www.liquidhearth.com/">LiquidHearth</a></span> <span><a href="http://www.liquiddota.com/">LiquidDota</a></span> <span><a href="http://www.liquidlegends.net/">LiquidLegends</a></span> <span><a href="http://www.liquidpoker.net/">LiquidPoker</a></span> <div> <a href="https://www.facebook.com/teamliquidnet" class="topmenuicons" id="tb-facebook"></a> <a href="https://twitter.com/teamliquidnet" class="topmenuicons" id="tb-twitter"></a> <a href="http://www.youtube.com/teamliquidnet" class="topmenuicons" id="tb-youtube"></a> </div> </div> </div> <div id="tlverytopbanner" style="background-image:url(/staff/HawaiianPig/banner/lgbt3.jpg)"> <a href="/" id="homelink"></a> <div id="stats"> <div id="timebar"><span>EDT</span> 17:48<br> <!--<span>•</span>--> <span>CEST</span> 23:48<br> <!--<span>•</span>--> <span>KST </span>06:48</div> <!--Active: 3069--><!--<span><a id="topstreamlink" href="/video/streams/">Stream viewers: </a></span>--> </div> <div id="countdown" style="width:300px"></div> </div> <div class="navbar tb-sprite" id="navwrap"> <ul class="smallnav"> <li><a style="padding:14px 15px 10px" href="/">Home</a></li> <li class="tb-sprite spacer"></li>
<li class="tl-dropdown" id="forums-dropdown" data-dropdown="dropdown-menu-forums"><a href="/forum/">Forum <span class="sn_dropdown"></span></a></li> <li class="tb-sprite spacer"></li>
<li><a href="/video/streams/">Streams</a></li> <li class="tb-sprite spacer"></li>
<li class="tl-dropdown" id="lp-dropdown" data-dropdown="dropdown-menu-liquipedia"><a href="http://wiki.teamliquid.net/">Liquipedia <span class="sn_dropdown"></span></a></li> <li class="tb-sprite spacer"></li>
<li class="tl-dropdown" id="features-dropdown" data-dropdown="dropdown-menu-features"><a href="/features/">Features <span class="sn_dropdown"></span></a></li> <li class="tb-sprite spacer"></li>
<li class="store"><a style="padding:14px 15px 10px" href="/store/"><!--<img style="position:absolute;margin-left:-15px;margin-top:-7px" src="/images/store/store-new.png">--><img style="margin-bottom:-2px;width:16px;height:13px" alt="" src="/images/layout/cart.png"> Store</a></li> <li class="tb-sprite spacer"></li>
<li class="wcs-portal"><a style="padding:12px 11px 10px" href="//wcs.liquipedia.net/"><img style="margin-bottom:-4px;width:17px;height:17px" alt="" src="/staff/R1CH/WCSPortalLogo.png"> WCS</a></li> <li class="tb-sprite spacer"></li>
<li><a href="/plus/">TL+</a></li> <li class="tb-sprite spacer"></li> </ul>
<ul id="filters"> <li class="search"> <form id="searchbox" action="/forum/search.php" method="get" style="float: right; padding: 0px; margin-bottom: 0px; margin: 9px 10px 0px 10px; display: inline"> <div> <a onclick="$('#searchbox').submit(); return false" href="/forum/search.php" style="position:absolute;z-index:5;width:18px;height:18px;" title="Search"></a> <input type="text" maxlength="32" size="23" name="q" class="tb-sprite" id="searchicon"> </div> </form> </li>
</ul>
<ul id="rightnav"> <li class="tb-sprite smallnavend"></li> </ul> <div class="clear"></div> </div>
<div class="navbar submenu" id="dropdown-menu-liquipedia" data-top-menu="lp-dropdown" style="display:none;position:absolute;left:141px;height:20px;z-index:10;background:#040f21;margin-top:-1px"> <ul class="smallnav subnav"> <li><a href="http://wiki.teamliquid.net/starcraft2/">StarCraft 2</a></li> <!-- <li><a href="http://wiki.teamliquid.net/dota2/">Dota 2</a></li>--> <li><a href="http://wiki.teamliquid.net/starcraft/">Brood War</a></li> <li><a href="http://wiki.teamliquid.net/smash/">Smash</a></li> <li><a href="http://wiki.teamliquid.net/heroes/">Heroes</a></li> <li><a href="http://wiki.teamliquid.net/starcraft2/Portal:2015_WCS">WCS Portal</a></li> </ul> <div class="clear"></div> </div>
<div class="navbar submenu" id="dropdown-menu-features" data-top-menu="features-dropdown" style="display:none;position:absolute;left:131px;height:20px;z-index:10;background:#040f21;margin-top:-1px"> <ul class="smallnav subnav"> <li><a href="/liquibet/">Liquibet</a></li> <li><a href="/fantasy/">Fantasy StarCraft</a></li> <li><a href="/tlpd/">TLPD</a></li> <li><a href="http://wiki.teamliquid.net/starcraft2/Premier_Tournaments">Events</a></li> <li><a href="/barcraft/">BarCraft</a></li> </ul> <div class="clear"></div> </div>
<div class="navbar submenu" id="dropdown-menu-forums" data-top-menu="forums-dropdown" style="display:none;position:absolute;left:10px;height:20px;z-index:10;background:#040f21;margin-top:-1px"> <ul class="smallnav subnav"> <li><a href="/forum/?filter=starcraft2">StarCraft 2</a></li> <!-- <li><a href="/forum/?filter=dota2">Dota 2</a></li>--> <li><a href="/forum/?filter=broodwar">Brood War</a></li> <!-- <li><a href="/forum/?filter=lol">League of Legends</a></li>--> <li><a href="/blogs/">Blogs</a></li> </ul> <div class="clear"></div> </div>
<div style="height:4px"></div> <div id="main-left-sidebar"><div class="sidebar_block"><a class="block_header" href="/news/">News</a><div class="sbcontents block-news_left_mid"><div class="sbtitle"><a href="/news/">Featured News</a></div><a href="/forum/starcraft-2/489480-kespa-cup-season-2-2015-preview">[KeSPA Cup] Season 2 2015 Preview</a><a href="/forum/starcraft-2/489480-kespa-cup-season-2-2015-preview?page=last" class="comments">16</a><a href="/forum/starcraft-2/489319-spl15-round-3-grand-finals-preview">[SPL'15] Round 3 Grand Finals Preview</a><a href="/forum/starcraft-2/489319-spl15-round-3
|
United Kingdom30774 Posts
On July 07 2015 03:10 raynpelikoneet wrote: Yeah i looked at it quickly. tbh i don't find it hard for hosts to make the correct votecount in case you could "print" a list out and it said:
raynpelikoneet (2); Xatalos, marvellosity rayn (1); HolyFlare
As host you can obviously tell which votes are meant to cast for real on what people and which are not.
if it did ^ it would be perfect (and contain crossed out names too or something)
|
On July 07 2015 06:50 batsnacks wrote:Show nested quote +On July 07 2015 06:04 Xatalos wrote:On July 07 2015 05:33 batsnacks wrote: How are you fetching text from forum posts? Hm? You basically just download the contents of the whole page and then go through the text searching for certain patterns such as posts and votes/unvotes. I tried this before and I can't find where the posts are: + Show Spoiler + [15-07-06 17:48:38:716 EDT] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en" dir="ltr"> <head> <title>Mafia Votecount Tool</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="csrf-token" content="nS1otfa1"> <meta name="viewport" content="width=1214"> <link rel="stylesheet" type="text/css" href="/mirror/v25/tla4.min.css"> <link href="//fonts.googleapis.com/css?family=Open+Sans:600" rel="stylesheet" type="text/css"><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" src="/mirror/v15/functions4.min.js"></script> <link rel="shortcut icon" href="/favicon.ico"> <link rel="canonical" href="http://www.teamliquid.net/forum/mafia/489506-mafia-votecount-tool"></head> <body onload="resize_images2()"> <div id="navwrapper"> <div id="userpanel"> <ul> <li><a id="top-login-button" href="/mytlnet/login">Log In</a></li> <li class="guestlink"><a href="/mytlnet/register">Register</a></li> <li class="guestlink"><a href="/mytlnet/siteprefs.php">Settings</a></li> <li><a href="" id="up_drop" class="upicons tb-sprite toggle_link" title="Log In"></a></li> </ul> <div id="userpanelend"></div> </div> <div id="up_dropdown"> <div id="up_dropdown_content"> <div id="loginbox"> <form method="post" action="/mytlnet/login.php"> <input type="hidden" name="token" value="nS1otfa1"> <table> <tr> <td><label for="loginname">Username</label></td> <td><input class="text" type="text" size="12" name="loginname" id="loginname" tabindex="1" required="required"></td> </tr> <tr> <td><label for="loginpasswd">Password</label></td> <td><input class="text" type="password" size="12" name="loginpasswd" id="loginpasswd" tabindex="2" required="required"></td> </tr> <tr> <td> <button id="loginsubmit" type="submit" tabindex="3">Log In</button> </td> <td> <input type="checkbox" name="makeAcookie" id="makeAcookie" value="1" tabindex="4"> <label for="makeAcookie">Remember Me</label> </td> </tr> </table> <input type="hidden" name="stage" value="1"> <input type="hidden" name="back_url" value="/forum/mafia/489506-mafia-votecount-tool"> </form> </div> </div> <div id="up_dropdown_end"> </div> </div> <div class="topmenubar"> <div class="top_menu right"> <span><a href="http://www.teamliquidpro.com/">TeamLiquidPro</a></span> <span><a href="http://wiki.teamliquid.net/">Liquipedia</a></span> <span><a href="http://www.liquidhearth.com/">LiquidHearth</a></span> <span><a href="http://www.liquiddota.com/">LiquidDota</a></span> <span><a href="http://www.liquidlegends.net/">LiquidLegends</a></span> <span><a href="http://www.liquidpoker.net/">LiquidPoker</a></span> <div> <a href="https://www.facebook.com/teamliquidnet" class="topmenuicons" id="tb-facebook"></a> <a href="https://twitter.com/teamliquidnet" class="topmenuicons" id="tb-twitter"></a> <a href="http://www.youtube.com/teamliquidnet" class="topmenuicons" id="tb-youtube"></a> </div> </div> </div> <div id="tlverytopbanner" style="background-image:url(/staff/HawaiianPig/banner/lgbt3.jpg)"> <a href="/" id="homelink"></a> <div id="stats"> <div id="timebar"><span>EDT</span> 17:48<br> <!--<span>•</span>--> <span>CEST</span> 23:48<br> <!--<span>•</span>--> <span>KST </span>06:48</div> <!--Active: 3069--><!--<span><a id="topstreamlink" href="/video/streams/">Stream viewers: </a></span>--> </div> <div id="countdown" style="width:300px"></div> </div> <div class="navbar tb-sprite" id="navwrap"> <ul class="smallnav"> <li><a style="padding:14px 15px 10px" href="/">Home</a></li> <li class="tb-sprite spacer"></li>
<li class="tl-dropdown" id="forums-dropdown" data-dropdown="dropdown-menu-forums"><a href="/forum/">Forum <span class="sn_dropdown"></span></a></li> <li class="tb-sprite spacer"></li>
<li><a href="/video/streams/">Streams</a></li> <li class="tb-sprite spacer"></li>
<li class="tl-dropdown" id="lp-dropdown" data-dropdown="dropdown-menu-liquipedia"><a href="http://wiki.teamliquid.net/">Liquipedia <span class="sn_dropdown"></span></a></li> <li class="tb-sprite spacer"></li>
<li class="tl-dropdown" id="features-dropdown" data-dropdown="dropdown-menu-features"><a href="/features/">Features <span class="sn_dropdown"></span></a></li> <li class="tb-sprite spacer"></li>
<li class="store"><a style="padding:14px 15px 10px" href="/store/"><!--<img style="position:absolute;margin-left:-15px;margin-top:-7px" src="/images/store/store-new.png">--><img style="margin-bottom:-2px;width:16px;height:13px" alt="" src="/images/layout/cart.png"> Store</a></li> <li class="tb-sprite spacer"></li>
<li class="wcs-portal"><a style="padding:12px 11px 10px" href="//wcs.liquipedia.net/"><img style="margin-bottom:-4px;width:17px;height:17px" alt="" src="/staff/R1CH/WCSPortalLogo.png"> WCS</a></li> <li class="tb-sprite spacer"></li>
<li><a href="/plus/">TL+</a></li> <li class="tb-sprite spacer"></li> </ul>
<ul id="filters"> <li class="search"> <form id="searchbox" action="/forum/search.php" method="get" style="float: right; padding: 0px; margin-bottom: 0px; margin: 9px 10px 0px 10px; display: inline"> <div> <a onclick="$('#searchbox').submit(); return false" href="/forum/search.php" style="position:absolute;z-index:5;width:18px;height:18px;" title="Search"></a> <input type="text" maxlength="32" size="23" name="q" class="tb-sprite" id="searchicon"> </div> </form> </li>
</ul>
<ul id="rightnav"> <li class="tb-sprite smallnavend"></li> </ul> <div class="clear"></div> </div>
<div class="navbar submenu" id="dropdown-menu-liquipedia" data-top-menu="lp-dropdown" style="display:none;position:absolute;left:141px;height:20px;z-index:10;background:#040f21;margin-top:-1px"> <ul class="smallnav subnav"> <li><a href="http://wiki.teamliquid.net/starcraft2/">StarCraft 2</a></li> <!-- <li><a href="http://wiki.teamliquid.net/dota2/">Dota 2</a></li>--> <li><a href="http://wiki.teamliquid.net/starcraft/">Brood War</a></li> <li><a href="http://wiki.teamliquid.net/smash/">Smash</a></li> <li><a href="http://wiki.teamliquid.net/heroes/">Heroes</a></li> <li><a href="http://wiki.teamliquid.net/starcraft2/Portal:2015_WCS">WCS Portal</a></li> </ul> <div class="clear"></div> </div>
<div class="navbar submenu" id="dropdown-menu-features" data-top-menu="features-dropdown" style="display:none;position:absolute;left:131px;height:20px;z-index:10;background:#040f21;margin-top:-1px"> <ul class="smallnav subnav"> <li><a href="/liquibet/">Liquibet</a></li> <li><a href="/fantasy/">Fantasy StarCraft</a></li> <li><a href="/tlpd/">TLPD</a></li> <li><a href="http://wiki.teamliquid.net/starcraft2/Premier_Tournaments">Events</a></li> <li><a href="/barcraft/">BarCraft</a></li> </ul> <div class="clear"></div> </div>
<div class="navbar submenu" id="dropdown-menu-forums" data-top-menu="forums-dropdown" style="display:none;position:absolute;left:10px;height:20px;z-index:10;background:#040f21;margin-top:-1px"> <ul class="smallnav subnav"> <li><a href="/forum/?filter=starcraft2">StarCraft 2</a></li> <!-- <li><a href="/forum/?filter=dota2">Dota 2</a></li>--> <li><a href="/forum/?filter=broodwar">Brood War</a></li> <!-- <li><a href="/forum/?filter=lol">League of Legends</a></li>--> <li><a href="/blogs/">Blogs</a></li> </ul> <div class="clear"></div> </div>
<div style="height:4px"></div> <div id="main-left-sidebar"><div class="sidebar_block"><a class="block_header" href="/news/">News</a><div class="sbcontents block-news_left_mid"><div class="sbtitle"><a href="/news/">Featured News</a></div><a href="/forum/starcraft-2/489480-kespa-cup-season-2-2015-preview">[KeSPA Cup] Season 2 2015 Preview</a><a href="/forum/starcraft-2/489480-kespa-cup-season-2-2015-preview?page=last" class="comments">16</a><a href="/forum/starcraft-2/489319-spl15-round-3-grand-finals-preview">[SPL'15] Round 3 Grand Finals Preview</a><a href="/forum/starcraft-2/489319-spl15-round-3
Hm... This is what I see: http://pastebin.com/wZtyhXga
|
On July 07 2015 08:43 Holyflare wrote:Show nested quote +On July 07 2015 03:10 raynpelikoneet wrote: Yeah i looked at it quickly. tbh i don't find it hard for hosts to make the correct votecount in case you could "print" a list out and it said:
raynpelikoneet (2); Xatalos, marvellosity rayn (1); HolyFlare
As host you can obviously tell which votes are meant to cast for real on what people and which are not. if it did ^ it would be perfect (and contain crossed out names too or something)
Okay, I'll look into it at some point
|
The tool seems to be working as intended for the ongoing games. At least from what I watched of the OT vs The Mods game.
I've been a bit busy with a Mafia game as well as a couple of other things. I started implementing the neater votecount thingy that rayn suggested though. We'll see how it goes. I hope I could make that as well as the automatic removal of old games in the nearby weeks.
|
Hm... Although the D2 post is missed in the Gaiden game.
|
You should definitely get a github going, we can pretty easily expand the code for this. Also I noticed you're hosting on heroku, are you using node as well? or just plain jquery?
We can talk to TL admins to spit out JSON for mafia forums for security reasons, ask them to just add an API Token.
|
|
|
It doesn't currently run locally, by the way. If you want to fix that, then revert the changes I made in the last week or so (database settings from PostgreSQL -> H2).
|
Purpose of using clojure as opposed to PHP or other languages? Just curious :D
|
Clojure was chosen because my friend (TripleSnail) wanted to learn Clojure, so I suggested this idea to him At the same time I wanted to learn JavaScript.
|
On July 10 2015 06:33 Xatalos wrote:Clojure was chosen because my friend (TripleSnail) wanted to learn Clojure, so I suggested this idea to him  At the same time I wanted to learn JavaScript.
Javascript treating you right? But that's cool, I'm definitely going to look into it. Thanks for the push start!
|
On July 10 2015 23:04 ShoCkeyy wrote:Show nested quote +On July 10 2015 06:33 Xatalos wrote:Clojure was chosen because my friend (TripleSnail) wanted to learn Clojure, so I suggested this idea to him  At the same time I wanted to learn JavaScript. Javascript treating you right?  But that's cool, I'm definitely going to look into it. Thanks for the push start!
It's been a pretty interesting journey. I've learned quite a few new things about JavaScript/CSS (especially the one page approach implementation) and also a bit of Clojure.
By the way I don't think there's much need for a JSON feed or something like that. TripleSnail said that the easy part is finding the posts and their content as well. The problems are with sorting the content of the posts and giving the content in a different form wouldn't help with that really.
You're free to use the code for something else if you want to. You can also make a pull request if you notice something that needs fixing.
I should get back to working on the project in the near future
|
Awesome.
Nice choice to use Clojure. If you start learning more of it surely you'll come up with new ways to improve your app.
On July 06 2015 21:24 Xatalos wrote: 1) The votes of the current day could perhaps also be displayed in the same format as the regular votecount posts on the forum. That way the host/co-host could simply always copy the most recent vote listing of this format to the thread when there's a need for another votecount post. However, there's a major problem with this idea: it's that many players vote with all kinds of "nicknames" or just misspell when they're voting. That causes huge difficulties for displaying votes neatly in such a format.
Like people said, ignore the "nicknames" and stuff. People should be able to know how CTRL+C works. If you do allow hosts to pre-define the list of players, then you can only allow votes on those players, and give out warnings if someone voted for someone differently. Or if you want it to be more flexible (for instance if you allow stuff like "#Vote: GLaDOS"), just leave it like it is.
2) There could be some sort of an authentication system for creating new games. This way only actual hosts could create new games and there wouldn't be any need to worry about trolls ruining the website by spamming the "Create New Game" button. Hopefully there wouldn't even be a need for this, but...
Nah, that'd make it overly-complicated. You'd have to manage those accounts manually, only for people in TL. If someone new wants to start using your app you have to create a new account just for him, etc. With tools like a Captcha (to prevent bots from creating games), and some mild moderating, there won't be problems. Alternatively give someone the "job" of accepting which game is created or not. Each "create new game" button creates an application which you can accept or reject. But until that problem actually happens, I'd say ignore it.
Also, in the near/mid future, you may want to expose your vote-counter as a service (web services and all that). That way you could create games, receive notifications for new votes, get a list of all games/current votes by bots and other apps. It'd be easier to add security there too (you can give credentials to certain bots/apps and never worry again), etc. Might come handy in the future.
Once I finish my bachelors degree (is it called that in USA?), I have a craving for starting a project similar to this. I just need some free time to get rolling.
|
Thanks for the suggestions.
I, too, hope that nobody decides to troll the app :D
My current idea is to do it just like rayn suggested. We'll see how it goes. Going to be away from home for a bit now though.
|
I implemented a tentative version of the "copy-pasteable" votecount listing that rayn suggested.
It looks kind of like this at the moment:
---
Current Day Votecount
Bill Murray (2): jcarlsoniv,Lord Tolkien lord tolkien (0): BillMurray (2): AsmodeusXI,ComaDose vote: jcarlsoniv (1): Bill Murray jcarlsoniv (1): Bill Murray yomato (1): ComaDose
---
Source for the example: https://mafia-votecount.herokuapp.com/#487695-ot-vs-the-mods-mafia
Feedback is welcome!
At the moment I'm considering that it could be nice to also add things like:
- The list of non-voters - Unvotes don't delete the vote but just overwrite it in the view - Ordering of the votes in highest -> lowest order?
But that's enough for this session :D
|
(By the way... If you're wondering why Bill Murray has two votes in that example, it's because he voted twice in a row without unvoting... When you unvote, it deletes all your votes in the view, but in that case, two different votes without unvoting -> two votes in the view...)
|
The "Players" list is pretty useless at this point in time, so I'll just delete it for the time being while at it....
|
I'm actually not sure what should be done in that situation (a player voting another player without unvoting). Should it be considered as an unvote+vote? Or an invalid vote? Opinions?
|
(Currently it just adds the new vote without doing anything about the old vote)
|
United Kingdom30774 Posts
On July 15 2015 05:32 Xatalos wrote: I'm actually not sure what should be done in that situation (a player voting another player without unvoting). Should it be considered as an unvote+vote? Or an invalid vote? Opinions?
unvote and vote since he clearly meant to vote someone new
|
I guess that would make more sense, yeah.
|
Well, now a vote on another player is considered as unvote+vote....
|
United Kingdom30774 Posts
Sweet! Ty dude. You should enable some kind of version where it just crosses out the name for an unvote if people want that info or something
|
Just implementing that feature Sorry if the app is being a bit unstable in the recent minutes since I'm testing stuff directly in the Heroku version.
|
Ok, now it should work that way... I hope.... Take a look: https://mafia-votecount.herokuapp.com/#487695-ot-vs-the-mods-mafia
On second thoughts, it'd be a bit more difficult to implement the "non-voters" section. First you'd have to correctly input the names of every player in the game and that creates an additional hurdle for the user.
But at least that unvote thing should work just fine now.
|
Hmm... Should the current day votecount perhaps even be at the top? I imagine it's the most relevant use case for the hosts...
|
United Kingdom30774 Posts
Yup that sounds the most useful! I imagine having people spell someone's name correctly isn't too much of a chore :p even if it is the host can just manually correct it and do their job lol. Also personal pet peeve but can you put spaces between the commas and the names in the vote count? :p
|
Although something seems to be messed up with the numbers of votes next to the target names atm
|
On July 15 2015 19:48 Holyflare wrote: Yup that sounds the most useful! I imagine having people spell someone's name correctly isn't too much of a chore :p even if it is the host can just manually correct it and do their job lol
Which post was this referring to
|
United Kingdom30774 Posts
On July 15 2015 19:46 Xatalos wrote: Hmm... Should the current day votecount perhaps even be at the top? I imagine it's the most relevant use case for the hosts...
This one
|
|
By the way, the app requires restarting every time it's redeployed or inactive for like 30 minutes. That's why it takes 5 seconds or so to load the page sometimes.
|
Now it should all work.
Let me know if there's some problem with the new votecount view!
|
|
United Kingdom30774 Posts
Also personal pet peeve but can you put spaces between the commas and the names in the vote count? :p
otherwise everything looks great!
|
Done
|
Next up should be automatically deleting finished games, I guess.... But that's not too urgent at all.
Would be good to see this actually used in ongoing games and what little fixes should be made from that. Maybe I'll message hosts later on.
|
United Kingdom30774 Posts
you should totally set it up to run on a tl account that automatically posts the vote counts in the thread so that hosts basically have to do nothing ever
|
Haha :D Well, that's an idea to consider, but I'm not sure if it's allowed on the site?
|
United Kingdom30774 Posts
hey we're tl mafia we get special account making privileges
|
|
United Kingdom30774 Posts
oo kind of see a problem already, is it possible to have a BBCODE formatted vote count hidden at the bottom or something? Lazy me would like that <3 :D basically just bold the voted for players name and vote amount and strike through the unvotes
|
Oh yeah... That could be useful... I'll see what I can do :D
|
Oops, crashed the Heroku app for a bit. It should start working just now...
|
Now it's working. It looks kind of like this when copy-pasted to TL:
Day 1 Votecount
fecalfeast (2): Onegu, Fecalfeast plotspot (1): KelsierSC, Rels yamato77 (0): geript KelsierSC (1): geript
|
Re-entered the game because something got messed up and Fecalfeast's last unvote wasn't showing.
|
Let me know if you notice something else to be improved / in need of fixing!
|
United Kingdom30774 Posts
|
There was a bug with the refreshing not working properly but it should now be fixed.
|
United Kingdom30774 Posts
hmmm, I think (if possible), there should be a list of players not voting (maybe you could input the player list before the game starts and it can parse through that and list the ones that didn't vote yet or w/e - i dunno anything about coding :D)
|
Yeah there was a "Players" list in the create game window before. I guess it could be re-implemented...? It's a bit problematic in the sense that every player name would have to be entered 100% perfectly though
|
Some very weird things have happened today with the refresher (how the votes update automatically once the game has been entered). Several missed votes already. Re-entered the game again just now and it seems to have scanned everything correctly now.
Let's see if more missed votes occur.
|
Seems like this was missed (but it's no big wonder why :D):
VayneAuthority United States. July 19 2015 23:03. Posts 6171 Gift TL+ PM Profile Report Quote # filter ##unvote onegu
##:vote Jonnylaw
|
On July 20 2015 03:52 Holyflare wrote: hmmm, I think (if possible), there should be a list of players not voting (maybe you could input the player list before the game starts and it can parse through that and list the ones that didn't vote yet or w/e - i dunno anything about coding :D)
Do you think this would be worth the effort of having the host enter every player name 100% correctly while creating the game?
|
Well, quite a few nice improvements to the tool thanks to Holyflare so far!
A couple of things that should maybe be made clearer:
1) Votes in an incorrect format like ##:vote JonnyLaw won't be counted at all! 2) If the names are spelled incorrectly, then there will be duplicate vote targets (such as johhnylaw: x, y and jonnylaw: z, w)... although I recently changed it so that all names will be changed to lower case to at least reduce this issue a bit 3) For the hosts: each day/night post needs to start with the text "Day " or "Night " *on the first line* of the post... It doesn't matter if there's space or styling in there, as long as there's no text or additional lines before that!
|
|
Something I think would be cool would be to have a JSON config file for name matching.
Something like:
{ "Xatalos": ["Xata", "Xat"] "marvellosity": ["marv"] etc etc }
Then when someone votes, you check the config file to see if the vote matches any of the exact names or short names or people actually in the game, and if so, place the vote for the exact name. Could also do some fuzzy matching so something like ##vote: Kierathi wouldn't be a big deal.
If people start voting for someone consistently by one name (for instance, say people start ##Vote: Keir) that isn't in the config, then someone could just go add it to the config file and make a quick pull request and then it all works.
Then, if none of the matching happens, you could fallback to just leaving the vote as they typed it and making sure that the host gets a notification about it.
|
Interesting idea...
I'll think about implementing something along those lines as well.
|
you should open source this tbh.
|
Blazinghand
United States25550 Posts
On July 25 2015 03:16 Palmar wrote: you should open source this tbh.
I wouldn't mind contributing and I'm sure there are other TL Mafia community members who know how to program who could help out, or at least look over the code
|
On July 25 2015 03:19 Blazinghand wrote:I wouldn't mind contributing and I'm sure there are other TL Mafia community members who know how to program who could help out, or at least look over the code I already have a command line tool that does kind of the same thing but I never bothered to make a configuration part for it or make it readable. I'm not even sure it works but it did run the vote counting for storm mafia:
https://gist.github.com/palmar/c10c42dd4dd330c0f89c
I also have a bunch of other mafia related scripts and stuff (tool to count the words/post amount per player in a game, a mafia hosting IRC bot and at one point I hooked together our skype group and our IRC channel through bots).
|
|
I think someone... maybe keirathi? I can't remember really, even made some kind of a fuzzy matching and alias support for nicknames. That was fantastic.
|
Blazinghand
United States25550 Posts
On July 25 2015 03:26 Palmar wrote:Show nested quote +On July 25 2015 03:19 Blazinghand wrote:On July 25 2015 03:16 Palmar wrote: you should open source this tbh. I wouldn't mind contributing and I'm sure there are other TL Mafia community members who know how to program who could help out, or at least look over the code I already have a command line tool that does kind of the same thing but I never bothered to make a configuration part for it or make it readable. I'm not even sure it works but it did run the vote counting for storm mafia: https://gist.github.com/palmar/c10c42dd4dd330c0f89cI also have a bunch of other mafia related scripts and stuff (tool to count the words/post amount per player in a game, a mafia hosting IRC bot and at one point I hooked together our skype group and our IRC channel through bots).
these are some of the most disgusting variable names I've ever seen hahahah
solo = post.find('div', attrs={'class':'quote'}) if solo: solo.replace_with('') folo = post.find('b') try: yolo = folo.get_text() except: yolo = "" pass nolo = yolo.encode('ascii', 'ignore') lolo = nolo.lower() if "##vote" in lolo: trolo = lolo.split("##vote") try: dmolo = trolo[1] except: pass klolo = dmolo.translate(None, ' :') fullcontentlist.append(klolo) elif "##unvote" in lolo: klol = "unvote"
|
On July 25 2015 03:29 Blazinghand wrote:Show nested quote +On July 25 2015 03:26 Palmar wrote:On July 25 2015 03:19 Blazinghand wrote:On July 25 2015 03:16 Palmar wrote: you should open source this tbh. I wouldn't mind contributing and I'm sure there are other TL Mafia community members who know how to program who could help out, or at least look over the code I already have a command line tool that does kind of the same thing but I never bothered to make a configuration part for it or make it readable. I'm not even sure it works but it did run the vote counting for storm mafia: https://gist.github.com/palmar/c10c42dd4dd330c0f89cI also have a bunch of other mafia related scripts and stuff (tool to count the words/post amount per player in a game, a mafia hosting IRC bot and at one point I hooked together our skype group and our IRC channel through bots). these are some of the most disgusting variable names I've ever seen hahahah solo = post.find('div', attrs={'class':'quote'}) if solo: solo.replace_with('') folo = post.find('b') try: yolo = folo.get_text() except: yolo = "" pass nolo = yolo.encode('ascii', 'ignore') lolo = nolo.lower() if "##vote" in lolo: trolo = lolo.split("##vote") try: dmolo = trolo[1] except: pass klolo = dmolo.translate(None, ' :') fullcontentlist.append(klolo) elif "##unvote" in lolo: klol = "unvote"
it's beautiful isn't it!
|
Variables nolo, yolo, klolo and klol wtf :D:D
|
what on earth is leiningen?
edit: this looks like some kind of a bastard child of lisp or something, jesus.
|
Kind of a tool for managing Clojure projects (running, testing etc.)
|
Blazinghand
United States25550 Posts
On July 25 2015 03:31 Palmar wrote:Show nested quote +On July 25 2015 03:29 Blazinghand wrote:On July 25 2015 03:26 Palmar wrote:On July 25 2015 03:19 Blazinghand wrote:On July 25 2015 03:16 Palmar wrote: you should open source this tbh. I wouldn't mind contributing and I'm sure there are other TL Mafia community members who know how to program who could help out, or at least look over the code I already have a command line tool that does kind of the same thing but I never bothered to make a configuration part for it or make it readable. I'm not even sure it works but it did run the vote counting for storm mafia: https://gist.github.com/palmar/c10c42dd4dd330c0f89cI also have a bunch of other mafia related scripts and stuff (tool to count the words/post amount per player in a game, a mafia hosting IRC bot and at one point I hooked together our skype group and our IRC channel through bots). these are some of the most disgusting variable names I've ever seen hahahah solo = post.find('div', attrs={'class':'quote'}) if solo: solo.replace_with('') folo = post.find('b') try: yolo = folo.get_text() except: yolo = "" pass nolo = yolo.encode('ascii', 'ignore') lolo = nolo.lower() if "##vote" in lolo: trolo = lolo.split("##vote") try: dmolo = trolo[1] except: pass klolo = dmolo.translate(None, ' :') fullcontentlist.append(klolo) elif "##unvote" in lolo: klol = "unvote" it's beautiful isn't it!
ugh
|
On July 25 2015 03:29 Palmar wrote: I think someone... maybe keirathi? I can't remember really, even made some kind of a fuzzy matching and alias support for nicknames. That was fantastic.
Wasn't me. Only thing I've written for here was the useless C9++ generator 
I considered writing it last night when I first saw this thread and tried to think of ways to make it more universal, but then I saw that it was in Clojure and decided I don't have time to learn an entirely new way of programming lol.
|
It was lonemeow, I even found the git but I'm not gonna post it here for him (he'd probably be fine with it but don't wanna be rude).
It's much better than mine 
|
yeah clojure means no-go for me too. I'm not even a programmer!
|
tl mafia getting all high tech (Y)
|
|
Btw wherebugsgo... Does the "bugs" in your name mean actual bugs or computer bugs? 
And btw I also created a C9++ setup generator earlier here: http://www.teamliquid.net/forum/mafia/468070-c9-setup-generator With that said, it seems that the site I used to host it is down currently :/ At least you can still run the JavaScript locally if you want to.
|
Everything seems to work properly now with the test game (Half the Sky's game). Let's see if things keep going so well
|
On July 25 2015 19:25 Xatalos wrote:Btw wherebugsgo... Does the "bugs" in your name mean actual bugs or computer bugs?  bugs' account name is one of the most intelligent i have heard.  can you figure out why?
|
|
Happy birthday rayn haha :D
|
Happy birthday Rayn!
Also Xata and I have PMed but of note - We are in Day 1 of Down Under 3, and as follows:
Yeh I should have said something. Case sensitivity isn't a big thing but what concerns me is if there is a tie and given current definitions of plurality the generator doesn't seem to account for that. The player who most recently had more votes should be lynched.
I've noticed on the last votecount (1930 BST) I've done the non-voters are getting accounted for, so thumbs up there. However, there is a bracketed "object name" placeholder, so I'm not sure what that's about.
I am still re-ordering the votes based on plurality.
Current Day Votecount
rsoultin (0): Onegu, Snickers kelsiersc (1): Snickers, GlowingBear hopeless1der (1): raynpelikoneet, Clarity_nl, scott31337 raynpelikoneet (1): Palmar palmar (0): FirmTofu clarity_nl (0): rsoultin scott31337 (3): boxerfred, Hopeless1der, FirmTofu firmtofu (5): raynpelikoneet, Onegu, KelsierSC, rsoultin, ObiWanShinobi boxerfred (1): Snickers
Not Voting (10): [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], raynpelikoneet, Onegu, rsoultin, scott31337]
|
Also in the above, the no voters have already voted as well. I had to edit that all out except for Scott who actually did unvote as of the most recent vote count.
So that is another bug there.
|
Yeah the nonvoters list is work-in-progress :D You can ignore it until it works lol
|
Now the list of non-voters *should* work :D
We'll see...
Please note that the app considers a new day started once the first vote of a new day is given. So the non-voters list will show the values of the previous day until a new vote for the new day is given basically.
|
Oh damn... Forgot that players die during the game :D
At the moment the non-voters list should only work properly on D1. Dead players need to be removed manually from that list..
|
Undecided on how to approach this problem right now. Good ideas?
|
If [playername] has got [most votes] by [deadline], then [remove] player from [playerlist]
Trust me, I'm a lawyer
|
:D:D
Then there are NK's, Dayvigs etc....
|
Had a problem tonight with the vote tracker at about 15 minutes prior to EoD. Gave me a bit of a panic attack which resulted in me manually counting the votes past the deadline.
I went to update the votecount and it missed scott31337's voteswitches. Or when I churned out the text it was not showing his last voteswitch. Because of how close the votecount was I had to recount the votes manually, but I wanted to bring this to your attention.
The Not Voting line is still ALSO bugged it's showing the list of everyone who is still in the game.
|
On July 25 2015 03:49 Palmar wrote: yeah clojure means no-go for me too. I'm not even a programmer!
Bend the knee to the LISP master race. MWAHAHAHA
+ Show Spoiler +I don't even know clojure either lol
On July 25 2015 19:25 Xatalos wrote:Btw wherebugsgo... Does the " bugs" in your name mean actual bugs or computer bugs?  And btw I also created a C9++ setup generator earlier here: http://www.teamliquid.net/forum/mafia/468070-c9-setup-generator With that said, it seems that the site I used to host it is down currently :/ At least you can still run the JavaScript locally if you want to.
The next time you say that word, I'll kill you...
|
On July 27 2015 07:47 Xatalos wrote: :D:D
Then there are NK's, Dayvigs etc....
I'm no programmer but...
Can the program detect strikes names?
If so, all it would need was the OP of voting threads having the playerlist. Then, when a player is out, the host strikes the name in the OP and the tool reads it as a player eliminated from the game
|
On July 27 2015 07:56 Half the Sky wrote: Had a problem tonight with the vote tracker at about 15 minutes prior to EoD. Gave me a bit of a panic attack which resulted in me manually counting the votes past the deadline.
I went to update the votecount and it missed scott31337's voteswitches. Or when I churned out the text it was not showing his last voteswitch. Because of how close the votecount was I had to recount the votes manually, but I wanted to bring this to your attention.
The Not Voting line is still ALSO bugged it's showing the list of everyone who is still in the game.
Keep in mind that there's a delay of 1-5 minutes between a vote being posted and it being counted. I guess I could reduce that delay even further...? Hm.
It seems that all the votes are counted at least now?
To me it shows like nobody is "not voting"?
|
On July 27 2015 08:34 gonzaw wrote:Show nested quote +On July 25 2015 03:49 Palmar wrote: yeah clojure means no-go for me too. I'm not even a programmer! Bend the knee to the LISP master race. MWAHAHAHA + Show Spoiler +I don't even know clojure either lol The next time you say that word, I'll kill you...
:O
|
On July 27 2015 08:56 GlowingBear wrote:Show nested quote +On July 27 2015 07:47 Xatalos wrote: :D:D
Then there are NK's, Dayvigs etc.... I'm no programmer but... Can the program detect strikes names? If so, all it would need was the OP of voting threads having the playerlist. Then, when a player is out, the host strikes the name in the OP and the tool reads it as a player eliminated from the game
Hmm... Perhaps.... Although that's slightly unreliable in the sense that the formatting etc. of hosts listing their players varies?
|
I saw your last messages in the voting thread for Mini Mafia Down Under 3. We are in Day 2. One player has already placed his first vote, and you've deleted the game so now am I supposed to put in Night 1 and Day 2 posts separately or can they be the same post? I am pretty lost as to what to do now.
I was completely unaware there had to be a Night X post. My mistake.
(The hosting team are obviously counting manually at this point to prevent any EoD issues.)
|
Alright, I figured it out. Scanning took ages, but we are back on track. It got the vote already placed for Day 2.
|
Luckily I made the final voting post in addition to the Day post otherwise Boxerfred would have had to vote again.
Can the Night X and Day Y post be combined into one in a given voting thread?
The not voting thread is fixed, except for as you said, the people who are out of the game. Only other thing I mentioned was having to delete any votes that came in right at the deadline, or 2300 BST.
|
The Night / Day posts need to be in separate posts atm. It always only checks the first word of the first line in every post to see if it's a cycle change post.
Not sure if there's an easy solution to the deadline issue. Using strict timer-based cycles would bring its own problems since cycles can also be shortened/extended...? Hm.
|
Re-added the two ongoing games with their current playerlist now.
I hope there'll be a more convenient method to update the players in the near future :D
|
Now you can remove dead players from the game just by clicking on their name in the game view.....
(Note: this has no effect on the vote history or the actual votecount, it only removes the player as a potential voter in the "Not Voting" list)
|
Well, the new delete game button isn't working yet. But deleting players already works.
|
How do I handle replacements with the voting tool? I just confirmed a replacement. Or do I deal with that manually for now?
|
I handled it just now, but for the future: now you can delete games as well as delete players. If a player dies, just delete him. If players are replaced, then delete the game and re-enter it with the relevant players.
|
Whoops, looks like the TL revamp broke the votecount after all...
Sorry people. It might take a bit to fix it.
|
dammit xatalos why can't we have good things
|
On August 02 2015 05:11 Damdred wrote: dammit xatalos why can't we have good things
I blame the TL mods
|
It should be working now? I hope :D
|
|
Blazinghand
United States25550 Posts
people who misspell names are the worst! it's a programming nightmare
|
Does TL have some kind of api to get threads/posts/etc, and make posts with a bot? Or do you have to program a bot to go to the login page and manage cookies and that kind of stuff (assuming TL doesn't introduce a Captcha soon and fuck it all up soon lol)?
If so you could have a TL-approved bot that can just post in the voting thread when someone makes a bad vote.
|
|
##vote boxerfriend :D:D:D
I assume this is a problem with Heroku.... Since Heroku apps are put to "sleep mode" when they're not accessed for a while. It takes a bit to restart the app when you access it after a pause (longer than 30 minuter or so), and then some additional time is needed to scan the tracked games after the restart.
I think the solution here is just to wait a bit after accessing the app and you notice it needs to restart (indicated by it taking 5-10 seconds for the site to load). I guess some sort of an auto-refresher could be created to access the site every 10 minutes or something? haha
(by the way, the current refresh interval is 3 minutes so if the votes aren't tracked after 3 minutes of restarting the app, then we have a problem!)
I have absolutely no idea about TL's bot policies. If someone does, then I guess it could be feasible to create a bot that uses the information from this site...
|
Alakaslam's game seems to be going smoothly so far... Let me know if there are bugs / usability problems!
Just remember to use "Day " or "Night " as the first text of every cycle change post.
And click on a player's name to remove him from the players whenever a player dies.
|
On August 04 2015 23:38 Xatalos wrote: I think the solution here is just to wait a bit after accessing the app and you notice it needs to restart (indicated by it taking 5-10 seconds for the site to load). I guess some sort of an auto-refresher could be created to access the site every 10 minutes or something? haha
(by the way, the current refresh interval is 3 minutes so if the votes aren't tracked after 3 minutes of restarting the app, then we have a problem!)
Knock on wood, Down Under 3 is back to normal, aside from rsoultin misspelling Scott's name, the tracker is picking up votes normally. \o/
|
Hey if someone deleted players by accident, how do I return them to the list for counting?
|
For the time being, you can just delete the game and create it again with the current players (this also goes for the situation where someone is replaced). Might need to think of a better way to handle it though... Hm.
|
By the way, I might add the auto-delete feature at some point, but delete your game after it's finished for now. It just unnecessarily burdens the app if a finished game is scanning every 3 minutes
|
|
I think I messed up with capitalization of a player's name XD
|
Capitalization shouldn't really even matter though (the scanner isn't case sensitive)
|
On August 07 2015 22:14 Xatalos wrote: Capitalization shouldn't really even matter though (the scanner isn't case sensitive) But it's duplicating my players based on capitalization of their names?
Or is it how they're voting?
lol, my players & I are so similar... we are such fools
|
Actually it seems like the duplication is happening just because of traditional misspelling 
edgarallanpoe correct (3): Rels, Fecalfeast, Fecalfeast, raynpelikoneet edgar later part missing (0): raynpelikoneet, rsoultin, ruXxar edgarallenpoe allan, not allen! (2): raynpelikoneet, rsoultin, ruXxar, The Shining edgarallenpoe[/b] allan, not allen! + unnecessary /b included (0): The Shining
|
That's a bit annoying but needs to be manually fixed, I guess... The scanner is "dumb" and can't notice misspellings for now.
Although I was thinking of adding a solution to that eventually. Something like a list of nicknames / possible misspelled names for each player on TL.
|
|
On August 08 2015 02:29 Xatalos wrote: That's a bit annoying but needs to be manually fixed, I guess... The scanner is "dumb" and can't notice misspellings for now.
Although I was thinking of adding a solution to that eventually. Something like a list of nicknames / possible misspelled names for each player on TL.
Ideally you would have a list of nicknames, and then you would also do a "fuzzy matching" algorithm.
Basically, "fuzzy matching" is where you go through a correct name and a possible name, and you count how many differences there are. So like, 'Xatalos' and 'Xamalot' would have 1 difference. Then you set a threshhold, like say "If there are less than 3 differences between input name and real name, accept it as real name".
It's a bit more nuanced than that, but that's the basic idea.
|
Ok, I might have heard of that sometimes before...
As far as I can see, there's no problem with ruXxar?
|
OK, now the (very tentative) list of nicknames is up and running... You can currently see it from here (starting from line 110 atm): https://github.com/Xatalos/mafia-votecount/blob/65ef269876281f24eb68d44eb11a6d812664a825/resources/public/js/games.js
Here's the current list for convenience as well:
var nicknames = { "27ninjabunnies": ["27nb", "nb", "ninja", "ninjabunnies"], "Alakaslam": ["slam"], "Artanis[Xp]": ["art", "artanis"], "batsnacks": ["bat", "bats"], "Bill Murray": ["bm", "bill", "murray"], "Blazinghand": ["bh"], "boxerfred": ["bf", "boxerfred"], "Chezinu": ["chez"], "Clarity_nl": ["clarity"], "Damdred": ["damd", "damdy"], "EdgarAllanPoE": ["edgar", "poe", "edgarallenpoe"], "Fecalfeast": ["ff", "fecal"], "FirmTofu": ["ft", "firm", "tofu"], "GlowingBear": ["gb", "glowing", "bear"], "Half the Sky": ["hts"], "Hapahauli": ["hapa"], "Holyflare": ["hf"], "justanothertownie": ["jat"], "Keirathi": ["kei", "keir"], "LightningStrike": ["ls", "lightning"], "marvellosity": ["marv", "marvy", "marvel", "marvelocity"], "Oatsmaster": ["oat", "oats"], "ObiWanShinobi": ["ows", "obi", "obiwan", "shinobi"], "raynpelikoneet": ["ray", "rayn", "raypelikoneet"], "rsoultin": ["rs", "rsou", "rsoul"], "sandroba": ["sand", "roba"], "[UoN]Sentinel": ["sent", "sentinel"], "scott31337": ["scott"], "Stutters695": ["stutters"], "The Shining": ["shining"], "VayneAuthority": ["va", "vayne"], "VisceraEyes": ["ve", "viscera"], "WaveofShadow": ["wos", "wave"], "Xatalos": ["xat", "xata"], "yamato77": ["yam", "yama", "yamato"] };
Basically it works like this: whenever someone votes one of the nicknames (the names on the right), the vote is immediately converted to target one of the "actual" names (the names on the left).
|
Oh yeah, if you notice improvements to be made (there are surely plenty), then please don't hold back
|
|
|
Guess onegu is just too easy to type...
|
Couldn't remember any nicknames you've had... Maybe Oneg? But that just seems a bit too lazy lol
|
Hm, no suggestions yet? I expected a storm of posts haha
|
can you add "marshmallow" to marv? :p
|
|
|
I wouldnt mind fworddude for fedai or whatever his real name is...
|
Didn't quite get that suggestion :D
|
Current nicknames list :D
var nicknames = { "27ninjabunnies": ["27nb", "nb", "ninja", "bunnies", "ninjabunnies"], "Alakaslam": ["slam"], "Artanis[Xp]": ["art", "artanis"], "batsnacks": ["bat", "bats"], "Bill Murray": ["bm", "bill", "murray"], "Blazinghand": ["bh", "blazing"], "boxerfred": ["bf", "boxer"], "Chezinu": ["che", "chez"], "Clarity_nl": ["clarity"], "Damdred": ["damd", "damdy"], "EdgarAllanPoE": ["edgar", "allan", "poe", "edgarallenpoe"], "Fecalfeast": ["ff", "fecal"], "Fidei86": ["fidei"], "FirmTofu": ["ft", "firm", "tofu"], "GlowingBear": ["gb", "glowing", "bear"], "Half the Sky": ["hts", "sky"], "Hapahauli": ["hapa"], "Holyflare": ["hf"], "IAmRobik": ["robik"], "JudgeJudy": ["jj", "judge", "judy"], "justanothertownie": ["jat"], "Keirathi": ["kei", "keir"], "LightningStrike": ["ls", "lightning"], "marvellosity": ["marv", "marvy", "marvel", "marvelocity", "marshmallow"], "Oatsmaster": ["oat", "oats"], "ObiWanShinobi": ["ows", "obi", "obiwan", "shinobi"], "Onegu": ["o", "oneg"], "raynpelikoneet": ["ray", "rayn", "raypelikoneet"], "rsoultin": ["rs", "rsou", "rsoul"], "sandroba": ["sand", "roba"], "[UoN]Sentinel": ["sent", "sentinel"], "scott31337": ["scott"], "Stutters695": ["stutters"], "The Shining": ["shining"], "Tubesock": ["ts", "tube"], "VayneAuthority": ["va", "vayne"], "VisceraEyes": ["ve", "viscera"], "WaveofShadow": ["wos", "wave"], "Xatalos": ["xat", "xata"], "yamato77": ["yam", "yama", "yamato"] };
|
I did some extensive revamping on how the game page is displayed to the user today. There could still be small bugs (and there's at least definitely one slight bug that I'm working on atm), but since it's only about the display, there shouldn't be anything too seriously game-affecting. In any case, I look forward to testing these changes + the nicknames list
|
|
i'll manually add this for the votecount this time, but for whatever reason even though it's picking up ruXxar's votes in the linked posts they're not making it into the votecount?
not sure how it can recognize it and still not get there but ye
|
Yeah sorry, just noticed that on my own and fixed it. Thanks for mentioning it anyway :D
If you're curious, it happened because I was using a mistaken method for adding votes to the final votecount from the vote "data". It caused proper votes to sometimes disappear in the process. Good to know that such a bug still existed and now is no more.
|
Thanks a bunch ^^
(I'm sorry but I'm not good with coding...all I remember from C++ was that semi-colons were hateful and my penchant for typos is bad for programs lol)
|
|
Not sure how this works with replacements but we have two (if you've already worked this out with oneg, disregard)
raynpelikoneet is in for VA
and
Bill Murray is in for beneather
|
It's supposed to be handled like this: you go to the "main menu" (Go Back), then delete the whole game and create it again with the new players.
|
New players = other current alive players + replacement players - replaced players 
If someone dies, then you can simply remove that player in the game view.
|
On August 21 2015 13:40 rsoultin wrote: Not sure how this works with replacements but we have two (if you've already worked this out with oneg, disregard)
raynpelikoneet is in for VA
and
Bill Murray is in for beneather
How cute you think onegu actually does host work. That is why he has you.
|
|
@.@ it would be more funny if it wasn't true lol ;o;
|
Since you already have a way to remove a player from an ongoing game, why not also add a way to add a player to currently running game!? Then you can handle replacements without all the deleting-the-game stuff.
Maybe it's not as simple as I make it sound, though
|
I guess that could be done as well......
|
Hmm, Xata, do you have any ideas why I'm getting a compiler error when I try to run the app locally (or even push to heroku)?
When I run "lein ring server" it starts loading all of the dependencies, then it gets tot he part about compiling the clojure stuff, and it fails at either /src/mafia-votecount/models.clj or /src/lobos/config.clj with a NullPointerException.
Edit: Here's the pastebin of the error message if it makes any sense to you 
http://pastebin.com/raw.php?i=K3bgQssq
Edit2: Oh, I think I just needed to change the db-uri subname in the files. But now I'm running into another problem.
(def db (let [db-uri (java.net.URI. (System/getenv "DATABASE_URL"))] (->> (string/split (.getUserInfo db-uri) #":") (#(identity {:db (last (string/split (System/getenv "DATABASE_URL") #"\/")) :classname "org.postgresql.Driver" :subprotocol "postgresql" :user (% 0) :password (% 1) :subname "//ec2-54-197-253-142.compute-1.amazonaws.com:5432/dfnp55jvc64kc4"})))))
I changed the subname to use my heroku link, but now I get "org.postgresql.util.PSQLException: FATAL: password authentication failed for user"
This is a bit frustrating since I have it set up like yours. I must just be missing something, since I have it set up like yours and the "DATABASE_URL" is listed in my config variables from the app page in the heroku dashboard. :\
Nevermind all of this, I'm an idiot. I changed the subname locally but forgot to commit the changes before I tried to push.
Herp derp.
|
Ah yeah.. Sorry, the text in the README is outdated. It's set to use a Heroku DB now, not a local H2 database anymore.
You got it working now by creating your own Heroku DB though?
|
no, I never could get it to work right and I eventually just gave up.
The problem I was having when I gave up was that I couldn't figure out how to run the migrations script to create the db tables/etc, so my app was just crashing as soon as I tried to load it every time
|
Hmm... I'm not actually sure either since my friend created the tables.
I'll get back to you later.
|
I didn't notice any bug so I just tried to re-enter the game and now it correctly shows "Day 2 Votecount". Maybe someone re-entered the game with an incorrect host name or something? Not really sure anymore since I forgot to check that possibility.
|
Okay, Keirathi... Sorry for the delay, but after trying out various options, I think the best (or at least the easiest) solution is just to follow these steps to test stuff locally:
1) Install leiningen ("brew install leiningen" for OS X and something similar for Linux, I'd assume... not sure about Windows)
2) Clone the Git repository (git clone https://github.com/Xatalos/mafia-votecount - or whatever the address of your forked repository is in case you intended to make a pull request from a fork)
3) Now copy that folder and rename the new folder as something like mafia-votecount-local. Once that's done, go to the new folder and replace these files with the following contents:
project.clj: http://pastebin.com/A7sSdFMe
src/lobos/config.clj: http://pastebin.com/k9YdKbEm
src/mafia_votecount/models.clj: http://pastebin.com/zScESAt1
4) Now you're using a completely functional, empty, local H2 database (all data is stored on your own computer). Just type "lein ring server" and you're ready to go for testing any changes locally (no need for Heroku or anything).
|
Sweet, got it running. Thanks!
I'll play around with it and see what I can come up with :D
|
Okay Assuming you've made a fork, you can then just copy your changes to the actual forked folder and make a pull request. If there's something you noticed to fix/add, I mean.
Right now there are a couple of issues remaining that could be nice to fix at some point (if you wanted ideas haha):
1) Ordering for the votecount targets (by the amount of voters they have) 2) Get night start games working (currently you can work around the issue by simply not making a correctly formatted N0 post, but naturally it would be nicer if everything worked automatically) 3) Some sort of authentication system (perhaps just requiring some single password for editing the database?) 4) A button for adding new players to a game or something like that
|
Oh, and about the migrations script... If you want to try running your own Heroku app, then I think it went something like just running the "(migrations)" command once you've loaded the functions in migrations.clj. That should create the tables...
|
|
i think we broke this again
|
Ah damn... Just edit some post after the last D2 vote to start with "Night 2" and another to start with "Day 2", then delete + enter the game...
|
On August 25 2015 21:18 rsoultin wrote:i think we broke this  again
I saw the voting thread. Onegu needed to have put the Day 3 post right after the Night 2 post. As it is, anyone that is between the first and second Night 2 posts will not have their votes counted. In general, you just do those posts consecutively right after EoD unless you know for some reason you have night voting which no normal will ever have and even few themed games will.
|
That's the problem with voting threads... Less natural to include phase change posts :D
|
ay 3
|
nh...hopefully that'll fix it; if it doesn't i guess i can reenter info again after all my classes lol @.@
|
Even if you edit in the Day 3 post, you still need to re-enter the game since the tool only scan through posts that it hasn't scanned before (meaning that the D3 post is just skipped).
|
On August 25 2015 19:16 Xatalos wrote:Okay  Assuming you've made a fork, you can then just copy your changes to the actual forked folder and make a pull request. If there's something you noticed to fix/add, I mean. Right now there are a couple of issues remaining that could be nice to fix at some point (if you wanted ideas haha): 1) Ordering for the votecount targets (by the amount of voters they have) 2) Get night start games working (currently you can work around the issue by simply not making a correctly formatted N0 post, but naturally it would be nicer if everything worked automatically) 3) Some sort of authentication system (perhaps just requiring some single password for editing the database?) 4) A button for adding new players to a game or something like that
Aye, #4 was the first thing I was going to do. I have the form made, I just need to figure out how to do the clojure stuff on the back end Like, I mostly understand what's going on, but it's still a little confusing about what I actually need lol.
On August 25 2015 19:38 Xatalos wrote: Oh, and about the migrations script... If you want to try running your own Heroku app, then I think it went something like just running the "(migrations)" command once you've loaded the functions in migrations.clj. That should create the tables...
Yea, After I pushed to heroku, i would do "heroku run lein repl" and then "(use 'lobo.core)" then "(migrations)"
But that didn't seem to work.
|
Hmmm... Not sure why then....
I'm not really 100% sure how I'd go about the "adding players", but I'd imagine you could look at how I managed to get the "delete player" and "delete game" functions working (you need a JavaScript function, a route in models.clj, and functions in player.clj and models.clj I'd assume?).
|
Or maybe just a name view file (something like "create_player.clj" like "create_game.clj"?)
|
|
Yea, I have the javascript part done.
In home.clj, I added "(POST "/add-player" [name] (player/add-player name))"
In player.clj, I added "(defn add-player [name] (models/add-player name))"
Then in models.clj I added "(defn add-player [name] (insert player (values name)))"
In the javascript, I call $.post("/add-player", player) where player is an object like {name: "keir"}. However, I get a 404 when I try to run it. I'm not entirely sure why, so it'll take some playing around. Clojure seems kind of hard to debug though
|
The problem might be with the JS part if you get a 404... (wild guess) or possibly with the route?
What is the "player" even, a string, object? The other calls were like this $.post("/delete-game", {id: id});
|
Wait... actually, you also need to include which game the player belongs to (game id).
|
Oh... Apparently the migrations command was (migrate), not (migrations). You could try that instead.
|
And dunno if your HTML link is correct, but you can look at the delete-player / delete-game links for reference
|
On August 26 2015 03:22 Xatalos wrote: The problem might be with the JS part if you get a 404... (wild guess) or possibly with the route?
What is the "player" even, a string, object? The other calls were like this $.post("/delete-game", {id: id}); I said in the post that "player" was an object of the form {name: "keir"} 
How it generates the object is: var player = {"name": document.getElementById("newPlayer").value}.
The newPlayer element is the input box for the player name, of course.
So my call is basically exactly like yours: $.post("/add-player", {name: "keir"}); I'm nearly 100% positive that part is right. Something is wrong with the routing or handling of it in clojure though.
On August 26 2015 03:29 Xatalos wrote: Wait... actually, you also need to include which game the player belongs to (game id).
Yea I realized that when I actually poked around in the database. The player schema has id, game, and name.
Oh herp derp, I figured out the problem with the routing. In the home.clj file that defines the routes, I forgot missed the closing parenthesis on defroutes. So my route wasn't being added 
Would be nice if that threw some kind of error though, instead of compiling and leaving my scratching my head as to why it wasn't working.
Anyways, i added the game id to the add-player calls, etc, and it seems to be working correctly now. When I push the submid button for the form, keir gets added to the db.
I'll clean it up and throw up a pull request soon.
|
Nice. If you want to do the fuzzy matching thing (I think it was you who suggested it?) then go ahead :D I guess on the JS side?
|
So, I'm looking at the pull request before I submit it, but there's a lot of stuff that doesn't need to be merged. I'm not sure how to exclude stuff from the pull request, though. If you're not sure what stuff should be merged, let me know.
There are a couple of things I still want to do:
1) Order the vote counts correctly
2) Add a button to reset the "current post" counter or whatever. Basically force the scanner to do a whole thread rescan, so if something happens again like in Personality again where the host forgets to do the phase change post in the voting thread, they can post it, then his the rescan button and the app will start over scanning from the front again.
Basically, anytime you have to delete a game and re-add it is annoying. I'd like to eliminate the problems that currently make you do that.
3) Fuzzy matching.
|
Hmm... I fear Day 3 of your game might be a lost cause because you can't edit in the Day 3 post properly..... Maybe just count manually for now and then return to the tool by adding Night 4 and Day 4 posts properly?
|
Ok, nice. I guess everything but the database related changes should be merged?
|
I made notes on what should be merged in the pull request.
But yea, basically everything except the gitignore stuff, anything related to db, and the system.properties file.
|
I ended up just manually picking the relevant changes and pushing them myself. Sorry about that, but please make it easier to accept the pull request in the future :D
|
I don't know that there's anything I can do to make it easier, lol.
You're pretty much always going to have to do some manual merging to get around the database stuff unless I can get the heroku version working on my end.
I think a lot of it is that you are using Mac? Linux? And the line ending are saved differently. That's why i lot of those blank lines were highlighted, etc, i think.
Maybe I can fix that? Not sure.
|
I guess you could create a separate mafia-votecount-local folder or something, test your stuff there and then copy-paste the relevant changes to the "real" folder? That's what I basically ended up doing anyway
|
In any case, all the relevant changes were nice.
Be sure to pull these changes before continuing btw
|
Wait... one of my commits after the first one broke it...
|
|
Now its seems to work again.
Good job Nice addition to get the delete etc. buttons working properly.
|
And yeah, remember to pull hahaha
|
Or you can basically just copy that single styling change to your local test folder if you want.
|
Merged... Nice work. I tried to do that same sorting thing at some point earlier but moved onto other things when I ran into some problems with it. Looks like it's functional now.
|
It's not perfect. It doesn't solve the situation that sometimes happens in plurality where the day ends and 2 people have the same number of votes. In that case, the host will still have to manually figure out who is lynched.
But it's better than having to sort it all manually!
|
|
Actually it's possible to solve that situation as well... Something like this?
Check if the second target in the sorted targets list has the same amount of votes as the first. If yes, then go through the votes for that day and see which of the targets has the later last vote. If that target is first in the target list, then switch places of the first and second targets.
That might work out well enough?
|
Although that wouldn't work if there were more than two with the same amount of votes... Would have to go through every target in the sorted targets list I guess until the voters length wasn't equal to that of the first target?
|
Still doesn't work. Imagine this situation:
Player A gets a 5th vote at 5:00. Then a 6th vote at 6:30.
Player B gets a 5th vote at 6:00.
Then the person who voted for Player A at 5:00 unvotes. Now Player A and Player B are tied at 5 votes, Player A should be lynched because they reached 5 votes first, but Player A's last vote is technically after Player B's.
I've tried thinking through it, but I can't really think of any easy, logical way to solve the problem.
|
Are you sure it works that way? I guess.. Hm.
|
Yea, I'm pretty sure.
So thinking about it more, I think the way to go about it would be to find the number of votes that players are tied at, then loop through all the votes to findt he last time that they were ever under that number of votes, and compare those times between players to determine the order.
For instance, if Player A and Player B were tied at 3 votes, then you do a scan of all votes where A was the target.
T: vote A (1:00) - 1 U: vote A (2:00) - 2 V: vote A (3:00) - 3 U: Unvote A (4:00) - 2 W: vote A (5:00) - 3 X: vote A (6:00) - 4 V: unvote A (7:00); - 3 Y: vote A (8:00) - 4 Z: vote A (9:00) - 5 Z: unvote A (10:00) - 4 Y: unvote A (11:00) - 3
Now lets say we're doing a vote count now. We see that A never dropped below 3 votes since 5:00 Compare that time with the same analysis of Player B, and sort them based on whoever was first.
Since (I think?) the votes are ordered in the database by when they appear, you don't really need time, just the index of the vote and compare them.
It's not going to be simple, but I think it can be done?
|
Yeah there's no time for the votes, but they're put into the database in the same order they're scanned so basically you get the vote order by just going through them (or comparing the vote id). Here's an example of how the database looks like:
id | game | day | index | voter | target ------+------------------------------------------+-----+-------+----------------+----------------- 2500 | 492852-the-new-personality-voting-thread | 1 | 3 | ritoky | fidei86 2501 | 492852-the-new-personality-voting-thread | 1 | 4 | geript | ritoky 2502 | 492852-the-new-personality-voting-thread | 1 | 5 | Fecalfeast | damdred 2503 | 492852-the-new-personality-voting-thread | 1 | 6 | Damdred | fecalfeast 2504 | 492852-the-new-personality-voting-thread | 1 | 7 | Fecalfeast | 2505 | 492852-the-new-personality-voting-thread | 1 | 7 | Fecalfeast | judgejudy 2506 | 492852-the-new-personality-voting-thread | 1 | 8 | Fecalfeast | 2507 | 492852-the-new-personality-voting-thread | 1 | 8 | Fecalfeast | damdred 2508 | 492852-the-new-personality-voting-thread | 1 | 9 | Chezinu | ritoky 2509 | 492852-the-new-personality-voting-thread | 1 | 10 | Chezinu
|
By the way, if the target is empty, it just means it's an unvote.
|
The "id" is what truly separates the votes from each other (and they're in the order of being given), while the "index" means the index of the post where the vote was given.
|
Hm yeah.. This is bit of a problem sometimes :D
ritoky (3): JudgeJudy, Fidei86, Tictock ticktock (2): geript, ritoky, Damdred Tictock (2): ObiWanShinobi, geript
|
I just added "Ticktock" as a nickname for "Tictock". That was getting too annoying Sorry for the late fix.
|
Xata
|
|
kitaman27
United States9244 Posts
On July 06 2015 21:24 Xatalos wrote: Now the Heroku application starts scanning the game thread - it goes through every post and checks if there's a vote/unvote in the post. If there is, it adds it to the database. Then the website reads the list of votes and displays it on the game view. Every 15 minutes after this the application scans any new posts in the same thread and adds any new votes to the database.
Would it be feasible to poll the voting thread more frequently than every 15 minutes at the end of day? It would be useful to have this tool be able to handle mass vote switch situations where there is only a minute or two left in the cycle and it is difficult to figure out who actually has the most votes. I know it would have come in handy on day 2 during the personality game :D
|
Actually the frequency is currently 3 minutes. I'm not sure if it makes sense to make it even shorter since it might take longer than a minute to scan the whole thread if there's a huge amount of new posts
|
Well, not really. But maybe if there's a lot of games running simultaneously.
|
kitaman27
United States9244 Posts
On September 08 2015 23:35 Xatalos wrote:Actually the frequency is currently 3 minutes. I'm not sure if it makes sense to make it even shorter since it might take longer than a minute to scan the whole thread if there's a huge amount of new posts 
Ah nevermind then! I didn't realize it wasn't 15 minutes any more.
|
Finally got around to implementing fuzzy matching just now (with the help of a library called fuzzyset.js) Going to test it here for a little bit...
|
|
|
|
|
|
|
|
Commence testing..
|
Day 1 Votecount
ObviousOne (1): Xatalos Xatalos (0): Xatalos scott31337 (0): Xatalos marvellosity (0): Xatalos Onegu (0): Xatalos kitaman27 (0): Xatalos
Not Voting (5): scott31337, marvellosity, Onegu, kitaman27, ObviousOne
|
Wow... I can't believe how well it worked after all....
|
Well, now there shouldn't be any problems with misspelling of names or anything at least
|
United Kingdom36158 Posts
On December 05 2015 00:20 Xatalos wrote: ##vote marvelusity *slap*
|
|
|
|
Too late
|
Shit deadline is passed ? Plz no modkill
|
Rels has been given a 2-game ban for posting in a game without being a player.
|
Before you ask, marvellosity received no penalty because he's a valuable member of the community (VMOTC). Life is never fair.
|
United Kingdom36158 Posts
quite right. know your place. ^_^
|
On December 05 2015 00:52 Xatalos wrote: Before you ask, marvellosity received no penalty because he's a valuable member of the community (VMOTC). Life is never fair. shut up scum So your counter is trying to correct mistakes now ?
|
Wow nice. Will look at the code
|
Yeah, it uses a 3rd party library called as fuzzyset.js now. And it worked surprisingly well so far. As you can see from the last page, it correctly matched all of those (pretty difficult) test subjects... Like katamun -> kitaman27 haha
But let me know if there are problems.
|
And btw it uses the "Players" list the host enters for that. If no players are entered while creating the game, the fuzzy matching won't work.
|
And it shouldn't really work that well with abbreviations like SL or GB.... Because it uses pairs of two letters next to each other for the matches. But most of the abbreviations are already in the nicknames list though so mostly that shouldn't matter. Just for reference.
|
|
-> raynpelikoneet
|
|
|
|