• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:40
CEST 15:40
KST 22:40
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Serral wins EWC 202542Tournament Spotlight: FEL Cracow 202510Power Rank - Esports World Cup 202580RSL Season 1 - Final Week9[ASL19] Finals Recap: Standing Tall15
Community News
Weekly Cups (Jul 28-Aug 3): herO doubles up5LiuLi Cup - August 2025 Tournaments3[BSL 2025] H2 - Team Wars, Weeklies & SB Ladder10EWC 2025 - Replay Pack4Google Play ASL (Season 20) Announced58
StarCraft 2
General
Clem Interview: "PvT is a bit insane right now" Serral wins EWC 2025 TL Team Map Contest #5: Presented by Monster Energy Would you prefer the game to be balanced around top-tier pro level or average pro level? Weekly Cups (Jul 28-Aug 3): herO doubles up
Tourneys
WardiTV Mondays $5,000 WardiTV Summer Championship 2025 Sparkling Tuna Cup - Weekly Open Tournament LiuLi Cup - August 2025 Tournaments Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
External Content
Mutation # 485 Death from Below Mutation # 484 Magnetic Pull Mutation #239 Bad Weather Mutation # 483 Kill Bot Wars
Brood War
General
Which top zerg/toss will fail in qualifiers? BW General Discussion Google Play ASL (Season 20) Announced How do the new Battle.net ranks translate? Nobody gona talk about this year crazy qualifiers?
Tourneys
[ASL20] Online Qualifiers Day 2 [Megathread] Daily Proleagues Cosmonarchy Pro Showmatches [ASL20] Online Qualifiers Day 1
Strategy
Simple Questions, Simple Answers [G] Mineral Boosting Muta micro map competition Does 1 second matter in StarCraft?
Other Games
General Games
Nintendo Switch Thread Total Annihilation Server - TAForever Stormgate/Frost Giant Megathread Beyond All Reason [MMORPG] Tree of Savior (Successor of Ragnarok)
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Bitcoin discussion thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread 9/11 Anniversary
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
TeamLiquid Team Shirt On Sale The Automated Ban List
Blogs
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
The Link Between Fitness and…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
Customize Sidebar...

Website Feedback

Closed Threads



Active: 697 users

Mafia Votecount Tool

Forum Index > TL Mafia
Post a Reply
Normal
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 12:24 GMT
#1
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!
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 12:42 GMT
#2
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 12:53 GMT
#3
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 13:56 GMT
#4
Or not... Those were closed off later in the same post...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
raynpelikoneet
Profile Joined April 2007
Finland43268 Posts
Last Edited: 2015-07-06 16:55:14
July 06 2015 16:53 GMT
#5
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.
table for two on a tv tray
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 17:22 GMT
#6
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
raynpelikoneet
Profile Joined April 2007
Finland43268 Posts
July 06 2015 17:28 GMT
#7
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.
table for two on a tv tray
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 18:06 GMT
#8
Yeah currently it works like that. I was just considering an actual votecount as a possible bonus feature, although it would be more uncertain if it would always work.

Here's an example of what it currently shows:

https://mafia-votecount.herokuapp.com/#487695-ot-vs-the-mods-mafia
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
raynpelikoneet
Profile Joined April 2007
Finland43268 Posts
July 06 2015 18:10 GMT
#9
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.
table for two on a tv tray
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 18:22 GMT
#10
Hmm... That's a good idea actually :D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
raynpelikoneet
Profile Joined April 2007
Finland43268 Posts
July 06 2015 18:32 GMT
#11
srsly you didn't think of that?
i thought that was the point of this thing in the first place.
table for two on a tv tray
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 18:34 GMT
#12
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
July 06 2015 20:33 GMT
#13
How are you fetching text from forum posts?
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 06 2015 21:04 GMT
#14
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
Last Edited: 2015-07-06 21:51:01
July 06 2015 21:50 GMT
#15
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&#039;15] Round 3 Grand Finals Preview</a><a href="/forum/starcraft-2/489319-spl15-round-3

Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
Last Edited: 2015-07-06 23:45:33
July 06 2015 23:43 GMT
#16
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)
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 07 2015 10:59 GMT
#17
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&#039;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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 07 2015 11:01 GMT
#18
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 opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 09 2015 11:33 GMT
#19
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 09 2015 11:34 GMT
#20
Hm... Although the D2 post is missed in the Gaiden game.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
ShoCkeyy
Profile Blog Joined July 2008
7815 Posts
July 09 2015 15:22 GMT
#21
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.
Life?
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
July 09 2015 15:47 GMT
#22
Stop making derogatory threads about me

+ Show Spoiler +
I am not a tool!+ Show Spoiler +
lol
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 09 2015 17:44 GMT
#23
Here's the GitHub page for this if you're interested:

https://github.com/Xatalos/mafia-votecount

JQuery is used a bit, but not Node.js.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 09 2015 17:49 GMT
#24
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).
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
ShoCkeyy
Profile Blog Joined July 2008
7815 Posts
July 09 2015 18:08 GMT
#25
Purpose of using clojure as opposed to PHP or other languages? Just curious :D
Life?
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 09 2015 21:33 GMT
#26
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
ShoCkeyy
Profile Blog Joined July 2008
7815 Posts
July 10 2015 14:04 GMT
#27
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!
Life?
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 10 2015 17:59 GMT
#28
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
July 12 2015 09:23 GMT
#29
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.
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 12 2015 10:11 GMT
#30
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 14 2015 20:22 GMT
#31
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 14 2015 20:25 GMT
#32
(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 opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 14 2015 20:26 GMT
#33
The "Players" list is pretty useless at this point in time, so I'll just delete it for the time being while at it....
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 14 2015 20:32 GMT
#34
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 14 2015 20:33 GMT
#35
(Currently it just adds the new vote without doing anything about the old vote)
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 14 2015 22:12 GMT
#36
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
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 09:00 GMT
#37
I guess that would make more sense, yeah.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:12 GMT
#38
Well, now a vote on another player is considered as unvote+vote....
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 15 2015 10:18 GMT
#39
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
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:41 GMT
#40
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:45 GMT
#41
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:46 GMT
#42
Hmm... Should the current day votecount perhaps even be at the top? I imagine it's the most relevant use case for the hosts...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
Last Edited: 2015-07-15 10:49:25
July 15 2015 10:48 GMT
#43
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
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:48 GMT
#44
Although something seems to be messed up with the numbers of votes next to the target names atm
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:49 GMT
#45
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 15 2015 10:50 GMT
#46
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
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:51 GMT
#47
Ok. Let's do that.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 10:53 GMT
#48
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 11:16 GMT
#49
Now it should all work.

Let me know if there's some problem with the new votecount view!
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 11:18 GMT
#50
For reference:

https://mafia-votecount.herokuapp.com/#487695-ot-vs-the-mods-mafia
https://mafia-votecount.herokuapp.com/#488742-newbie-student-mafia-xii
https://mafia-votecount.herokuapp.com/#488082-tl-mafia-lxxi-gaiden
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 15 2015 13:49 GMT
#51
Also personal pet peeve but can you put spaces between the commas and the names in the vote count? :p


otherwise everything looks great!
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 14:06 GMT
#52
Done
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 15 2015 14:13 GMT
#53
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 17 2015 15:16 GMT
#54
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
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 17 2015 17:21 GMT
#55
Haha :D Well, that's an idea to consider, but I'm not sure if it's allowed on the site?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 17 2015 17:34 GMT
#56
hey we're tl mafia we get special account making privileges
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 17 2015 18:18 GMT
#57
Oh :D

Just fixed the problem. Now https://mafia-votecount.herokuapp.com/#489370-lost-but-not-forgotten-mini-mafia shows properly. I thought you had forgotten to enter the host names but actually it was just a JavaScript fail.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 18 2015 17:42 GMT
#58
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
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 18 2015 19:15 GMT
#59
Oh yeah... That could be useful... I'll see what I can do :D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 18 2015 19:54 GMT
#60
Oops, crashed the Heroku app for a bit. It should start working just now...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 18 2015 20:06 GMT
#61
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 18 2015 20:10 GMT
#62
Re-entered the game because something got messed up and Fecalfeast's last unvote wasn't showing.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 18 2015 20:16 GMT
#63
Let me know if you notice something else to be improved / in need of fixing!
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 18 2015 20:24 GMT
#64
sweet! love youuu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 19 2015 10:56 GMT
#65
There was a bug with the refreshing not working properly but it should now be fixed.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Holyflare
Profile Blog Joined November 2010
United Kingdom30774 Posts
July 19 2015 18:52 GMT
#66
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)
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 19 2015 19:28 GMT
#67
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 19 2015 20:21 GMT
#68
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 19 2015 21:23 GMT
#69
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 21 2015 11:58 GMT
#70
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 21 2015 13:04 GMT
#71
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!
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
Last Edited: 2015-07-24 04:55:18
July 24 2015 04:53 GMT
#72
We are having trouble getting the script to work in Mini Mafia Down Under 3. Onegu just tested out the vote in the voting thread (and we are running the script in the voting thread because the game is post-restricted) and the tracker is not picking up his vote at all despite it being in the correct format. I have a Day 1 post just before his test vote.

The game starts in about 18 hours (24 July, 2300 BST) so any help (PM any of us or comment directly in page 4 or here or whatever) would be greatly appreciated. I am terrible with these scripts.

http://www.teamliquid.net/forum/mafia/490661-mini-mafia-down-under-3?page=4
http://www.teamliquid.net/forum/mafia/490855-mini-mafia-down-under-3-voting-thread

https://mafia-votecount.herokuapp.com/#490855-mini-mafia-down-under-3-voting-thread
The phoenix must burn to emerge. - Janet Fitch
Keirathi
Profile Joined May 2012
United States4679 Posts
July 24 2015 05:36 GMT
#73
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 24 2015 08:35 GMT
#74
Interesting idea...

I'll think about implementing something along those lines as well.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Palmar
Profile Blog Joined July 2010
Iceland22633 Posts
July 24 2015 18:16 GMT
#75
you should open source this tbh.
Computer says mafia
Blazinghand *
Profile Blog Joined December 2010
United States25552 Posts
July 24 2015 18:19 GMT
#76
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
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Palmar
Profile Blog Joined July 2010
Iceland22633 Posts
July 24 2015 18:26 GMT
#77
On July 25 2015 03:19 Blazinghand wrote:
Show nested quote +
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/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).
Computer says mafia
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 24 2015 18:29 GMT
#78
The GitHub page is here: https://github.com/Xatalos/mafia-votecount You can make pull requests or use parts of the code as you wish (just see the license included).
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Palmar
Profile Blog Joined July 2010
Iceland22633 Posts
July 24 2015 18:29 GMT
#79
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.
Computer says mafia
Blazinghand *
Profile Blog Joined December 2010
United States25552 Posts
Last Edited: 2015-07-24 18:30:07
July 24 2015 18:29 GMT
#80
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/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).


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"
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Palmar
Profile Blog Joined July 2010
Iceland22633 Posts
July 24 2015 18:31 GMT
#81
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/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).


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!
Computer says mafia
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 24 2015 18:35 GMT
#82
Variables nolo, yolo, klolo and klol wtf :D:D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Palmar
Profile Blog Joined July 2010
Iceland22633 Posts
Last Edited: 2015-07-24 18:38:33
July 24 2015 18:35 GMT
#83
what on earth is leiningen?

edit: this looks like some kind of a bastard child of lisp or something, jesus.
Computer says mafia
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 24 2015 18:38 GMT
#84
Kind of a tool for managing Clojure projects (running, testing etc.)
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Blazinghand *
Profile Blog Joined December 2010
United States25552 Posts
July 24 2015 18:38 GMT
#85
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/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).


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
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Keirathi
Profile Joined May 2012
United States4679 Posts
Last Edited: 2015-07-24 18:46:53
July 24 2015 18:44 GMT
#86
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Palmar
Profile Blog Joined July 2010
Iceland22633 Posts
July 24 2015 18:48 GMT
#87
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

Computer says mafia
Palmar
Profile Blog Joined July 2010
Iceland22633 Posts
July 24 2015 18:49 GMT
#88
yeah clojure means no-go for me too. I'm not even a programmer!
Computer says mafia
JieXian
Profile Blog Joined August 2008
Malaysia4677 Posts
July 24 2015 19:15 GMT
#89
tl mafia getting all high tech (Y)
Please send me a PM of any song you like that I most probably never heard of! I am looking for people to chat about writing and producing music | https://www.youtube.com/watch?v=noD-bsOcxuU |
wherebugsgo
Profile Blog Joined February 2010
Japan10647 Posts
July 25 2015 07:25 GMT
#90
LOL that script
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 25 2015 10:25 GMT
#91
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 opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 25 2015 10:46 GMT
#92
Everything seems to work properly now with the test game (Half the Sky's game). Let's see if things keep going so well
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
raynpelikoneet
Profile Joined April 2007
Finland43268 Posts
July 25 2015 14:33 GMT
#93
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?
table for two on a tv tray
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 25 2015 17:03 GMT
#94
Not really...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 26 2015 18:03 GMT
#95
Happy birthday rayn haha :D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
Last Edited: 2015-07-26 18:33:36
July 26 2015 18:32 GMT
#96
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]
The phoenix must burn to emerge. - Janet Fitch
Half the Sky
Profile Joined May 2014
Germany9029 Posts
Last Edited: 2015-07-26 18:36:26
July 26 2015 18:36 GMT
#97
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.
The phoenix must burn to emerge. - Janet Fitch
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 26 2015 20:05 GMT
#98
Yeah the nonvoters list is work-in-progress :D You can ignore it until it works lol
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 26 2015 22:04 GMT
#99
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 26 2015 22:16 GMT
#100
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..
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 26 2015 22:22 GMT
#101
Undecided on how to approach this problem right now. Good ideas?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
GlowingBear
Profile Joined May 2014
Brazil12446 Posts
July 26 2015 22:34 GMT
#102
If [playername] has got [most votes] by [deadline], then [remove] player from [playerlist]

Trust me, I'm a lawyer
I'm adorable.
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 26 2015 22:47 GMT
#103
:D:D

Then there are NK's, Dayvigs etc....
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
July 26 2015 22:56 GMT
#104
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.
The phoenix must burn to emerge. - Janet Fitch
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
July 26 2015 23:34 GMT
#105
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...
GlowingBear
Profile Joined May 2014
Brazil12446 Posts
July 26 2015 23:56 GMT
#106
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
I'm adorable.
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 27 2015 00:13 GMT
#107
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"?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 27 2015 00:13 GMT
#108
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


Show nested quote +
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...


:O
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 27 2015 00:15 GMT
#109
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
July 27 2015 23:09 GMT
#110
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.)
The phoenix must burn to emerge. - Janet Fitch
Half the Sky
Profile Joined May 2014
Germany9029 Posts
July 27 2015 23:22 GMT
#111
Alright, I figured it out. Scanning took ages, but we are back on track. It got the vote already placed for Day 2.
The phoenix must burn to emerge. - Janet Fitch
Half the Sky
Profile Joined May 2014
Germany9029 Posts
July 28 2015 00:31 GMT
#112
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 phoenix must burn to emerge. - Janet Fitch
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 28 2015 01:01 GMT
#113
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 28 2015 13:05 GMT
#114
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 28 2015 19:22 GMT
#115
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)
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
July 28 2015 21:53 GMT
#116
Well, the new delete game button isn't working yet. But deleting players already works.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
July 29 2015 17:56 GMT
#117
How do I handle replacements with the voting tool? I just confirmed a replacement. Or do I deal with that manually for now?
The phoenix must burn to emerge. - Janet Fitch
Xatalos
Profile Joined January 2011
Finland9675 Posts
Last Edited: 2015-07-29 20:48:05
July 29 2015 20:47 GMT
#118
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 01 2015 20:08 GMT
#119
Whoops, looks like the TL revamp broke the votecount after all...

Sorry people. It might take a bit to fix it.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Damdred
Profile Joined July 2014
15669 Posts
August 01 2015 20:11 GMT
#120
dammit xatalos why can't we have good things
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 01 2015 20:12 GMT
#121
On August 02 2015 05:11 Damdred wrote:
dammit xatalos why can't we have good things


I blame the TL mods
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 01 2015 22:31 GMT
#122
It should be working now? I hope :D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
Last Edited: 2015-08-03 21:26:49
August 03 2015 21:24 GMT
#123
Mini Mafia Down Under 3 - Day 4 - about 1 day left in the cycle

Tracker failed to pick up either of rsoultin's last unvote from Palmar and the vote on boxerfred although I realise she misspelt boxerfred's name, the tracker still should have picked up the unvote at least and that it did not.

http://www.teamliquid.net/forum/mafia/490855-mini-mafia-down-under-3-voting-thread?page=9

unvote -
http://www.teamliquid.net/forum/mafia/490855-mini-mafia-down-under-3-voting-thread?page=9#166
voting boxerfred (misspelt) -
http://www.teamliquid.net/forum/mafia/490855-mini-mafia-down-under-3-voting-thread?page=9#168

EDIT: Tracker also failed to pick up boxerfred's vote to ObiWanShinobi

http://www.teamliquid.net/forum/mafia/490855-mini-mafia-down-under-3-voting-thread?page=9#165

All of the aforementioned votes were at least 2h ago.
The phoenix must burn to emerge. - Janet Fitch
Blazinghand *
Profile Blog Joined December 2010
United States25552 Posts
August 03 2015 21:29 GMT
#124
people who misspell names are the worst! it's a programming nightmare
When you stare into the iCCup, the iCCup stares back.
TL+ Member
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
August 04 2015 02:22 GMT
#125
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.
Half the Sky
Profile Joined May 2014
Germany9029 Posts
August 04 2015 12:18 GMT
#126
Mini Mafia Down Under 3 - Day 4 (about 9h45m left until EoD)

Tracker is picking up the votes aforementioned in post #123 but it seems like the delay is much longer as Scott's and Onegu's votes are currently (at 9h45m) not being picked up by the tracker, votes were cast approx. 7 and 5 hours ago. (or almost 15h before eod)

http://www.teamliquid.net/forum/mafia/490855-mini-mafia-down-under-3-voting-thread?page=9#170
http://www.teamliquid.net/forum/mafia/490855-mini-mafia-down-under-3-voting-thread?page=9#171

So it looks like the problem right now is a longer delay in tracking the votes than expected.
The phoenix must burn to emerge. - Janet Fitch
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 04 2015 14:38 GMT
#127
##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...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 06 2015 13:28 GMT
#128
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
August 06 2015 16:51 GMT
#129
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/
The phoenix must burn to emerge. - Janet Fitch
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
August 06 2015 20:51 GMT
#130
Hey if someone deleted players by accident, how do I return them to the list for counting?
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 06 2015 22:42 GMT
#131
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 06 2015 22:44 GMT
#132
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
August 06 2015 23:58 GMT
#133
Thank you sir
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
August 07 2015 00:54 GMT
#134
I think I messed up with capitalization of a player's name XD
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 07 2015 13:14 GMT
#135
Capitalization shouldn't really even matter though (the scanner isn't case sensitive)
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
August 07 2015 15:31 GMT
#136
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
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Xatalos
Profile Joined January 2011
Finland9675 Posts
Last Edited: 2015-08-07 17:28:03
August 07 2015 17:27 GMT
#137
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 07 2015 17:29 GMT
#138
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
August 07 2015 17:34 GMT
#139
But RuXxar and ruXxar
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Keirathi
Profile Joined May 2012
United States4679 Posts
August 07 2015 18:46 GMT
#140
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 07 2015 19:02 GMT
#141
Ok, I might have heard of that sometimes before...

As far as I can see, there's no problem with ruXxar?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 09 2015 11:32 GMT
#142
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).
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 09 2015 11:33 GMT
#143
Oh yeah, if you notice improvements to be made (there are surely plenty), then please don't hold back
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
raynpelikoneet
Profile Joined April 2007
Finland43268 Posts
Last Edited: 2015-08-09 12:34:10
August 09 2015 12:06 GMT
#144
Edit: nvm.
table for two on a tv tray
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 09 2015 12:53 GMT
#145
:D ?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Onegu
Profile Blog Joined May 2010
United States9699 Posts
August 09 2015 13:43 GMT
#146
Guess onegu is just too easy to type...
Try TL Mafia!!!
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 09 2015 14:22 GMT
#147
Couldn't remember any nicknames you've had... Maybe Oneg? But that just seems a bit too lazy lol
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 10 2015 23:14 GMT
#148
Hm, no suggestions yet? I expected a storm of posts haha
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
raynpelikoneet
Profile Joined April 2007
Finland43268 Posts
August 10 2015 23:15 GMT
#149
can you add "marshmallow" to marv? :p
table for two on a tv tray
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 10 2015 23:18 GMT
#150
Haha why not...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 10 2015 23:20 GMT
#151
https://github.com/Xatalos/mafia-votecount/commit/fcd6299ceaca469c97ab9f344a54c9c51e958c5f
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Onegu
Profile Blog Joined May 2010
United States9699 Posts
August 11 2015 06:48 GMT
#152
I wouldnt mind fworddude for fedai or whatever his real name is...
Try TL Mafia!!!
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 11 2015 07:43 GMT
#153
Didn't quite get that suggestion :D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 11 2015 22:39 GMT
#154
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"]
};
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 12 2015 22:05 GMT
#155
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 13 2015 20:29 GMT
#156
New address for the nicknames... https://github.com/Xatalos/mafia-votecount/blob/master/resources/public/js/nicknames.js
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
rsoultin
Profile Blog Joined November 2014
Netherlands15308 Posts
August 20 2015 14:14 GMT
#157
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
"rsoultin: Mafia Suicide Inducer...you have unlimited shots because you are so god-damn relentless." - marvellosity (2015)
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 20 2015 17:20 GMT
#158
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
rsoultin
Profile Blog Joined November 2014
Netherlands15308 Posts
August 20 2015 17:39 GMT
#159
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)
"rsoultin: Mafia Suicide Inducer...you have unlimited shots because you are so god-damn relentless." - marvellosity (2015)
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 20 2015 17:52 GMT
#160
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
rsoultin
Profile Blog Joined November 2014
Netherlands15308 Posts
August 21 2015 04:40 GMT
#161
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
"rsoultin: Mafia Suicide Inducer...you have unlimited shots because you are so god-damn relentless." - marvellosity (2015)
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 21 2015 07:25 GMT
#162
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 21 2015 07:26 GMT
#163
New players = other current alive players + replacement players - replaced players

If someone dies, then you can simply remove that player in the game view.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Onegu
Profile Blog Joined May 2010
United States9699 Posts
August 21 2015 07:47 GMT
#164
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.
Try TL Mafia!!!
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 21 2015 09:56 GMT
#165
:D:D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
rsoultin
Profile Blog Joined November 2014
Netherlands15308 Posts
August 21 2015 13:18 GMT
#166
@.@ it would be more funny if it wasn't true lol ;o;
"rsoultin: Mafia Suicide Inducer...you have unlimited shots because you are so god-damn relentless." - marvellosity (2015)
Keirathi
Profile Joined May 2012
United States4679 Posts
August 21 2015 15:14 GMT
#167
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
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 21 2015 20:43 GMT
#168
I guess that could be done as well......
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
Last Edited: 2015-08-22 01:14:38
August 22 2015 00:14 GMT
#169
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 22 2015 11:53 GMT
#170
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 22 2015 16:38 GMT
#171
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
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 22 2015 18:54 GMT
#172
Hmm... I'm not actually sure either since my friend created the tables.

I'll get back to you later.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 22 2015 19:22 GMT
#173
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 24 2015 21:12 GMT
#174
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).
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 24 2015 21:29 GMT
#175
Sweet, got it running. Thanks!

I'll play around with it and see what I can come up with :D
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 10:16 GMT
#176
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 10:38 GMT
#177
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...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 10:39 GMT
#178
(Using lein repl)
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
rsoultin
Profile Blog Joined November 2014
Netherlands15308 Posts
August 25 2015 12:18 GMT
#179
i think we broke this again
"rsoultin: Mafia Suicide Inducer...you have unlimited shots because you are so god-damn relentless." - marvellosity (2015)
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 12:25 GMT
#180
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...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Half the Sky
Profile Joined May 2014
Germany9029 Posts
August 25 2015 12:25 GMT
#181
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.
The phoenix must burn to emerge. - Janet Fitch
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 12:26 GMT
#182
That's the problem with voting threads... Less natural to include phase change posts :D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 12:26 GMT
#183
ay 3
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
rsoultin
Profile Blog Joined November 2014
Netherlands15308 Posts
August 25 2015 12:39 GMT
#184
nh...hopefully that'll fix it; if it doesn't i guess i can reenter info again after all my classes lol @.@
"rsoultin: Mafia Suicide Inducer...you have unlimited shots because you are so god-damn relentless." - marvellosity (2015)
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 12:42 GMT
#185
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).
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 25 2015 15:54 GMT
#186
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 17:34 GMT
#187
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?).
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 17:37 GMT
#188
Or maybe just a name view file (something like "create_player.clj" like "create_game.clj"?)
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 17:37 GMT
#189
*new view file
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 25 2015 17:41 GMT
#190
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
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 18:22 GMT
#191
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});
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 18:29 GMT
#192
Wait... actually, you also need to include which game the player belongs to (game id).
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 18:34 GMT
#193
Oh... Apparently the migrations command was (migrate), not (migrations). You could try that instead.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 18:35 GMT
#194
And dunno if your HTML link is correct, but you can look at the delete-player / delete-game links for reference
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 25 2015 19:21 GMT
#195
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.

My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 19:40 GMT
#196
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 25 2015 19:54 GMT
#197
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 19:55 GMT
#198
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 19:57 GMT
#199
Ok, nice. I guess everything but the database related changes should be merged?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 25 2015 19:58 GMT
#200
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 20:23 GMT
#201
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 25 2015 20:27 GMT
#202
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 20:37 GMT
#203
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 20:40 GMT
#204
In any case, all the relevant changes were nice.

Be sure to pull these changes before continuing btw
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 20:41 GMT
#205
Wait... one of my commits after the first one broke it...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 25 2015 20:47 GMT
#206
:\
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 20:55 GMT
#207
Now its seems to work again.

Good job Nice addition to get the delete etc. buttons working properly.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 20:57 GMT
#208
And yeah, remember to pull hahaha
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 25 2015 21:01 GMT
#209
Or you can basically just copy that single styling change to your local test folder if you want.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 12:13 GMT
#210
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 27 2015 16:43 GMT
#211
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!
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 18:26 GMT
#212
That's true.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 18:31 GMT
#213
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 18:32 GMT
#214
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?
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 27 2015 19:04 GMT
#215
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.
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 19:29 GMT
#216
Are you sure it works that way? I guess.. Hm.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Keirathi
Profile Joined May 2012
United States4679 Posts
August 27 2015 20:56 GMT
#217
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?
My dear friend if I have gone pants on head, you have gone socks on ears!!! -ShiaoPi
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 21:17 GMT
#218
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 21:19 GMT
#219
By the way, if the target is empty, it just means it's an unvote.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
August 27 2015 21:21 GMT
#220
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 01 2015 22:47 GMT
#221
Hm yeah.. This is bit of a problem sometimes :D

ritoky (3): JudgeJudy, Fidei86, Tictock
ticktock (2): geript, ritoky, Damdred
Tictock (2): ObiWanShinobi, geript
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 03 2015 21:45 GMT
#222
I just added "Ticktock" as a nickname for "Tictock". That was getting too annoying Sorry for the late fix.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
September 04 2015 05:17 GMT
#223
Xata
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 04 2015 14:08 GMT
#224
lol
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
kitaman27 *
Profile Blog Joined April 2009
United States9245 Posts
September 08 2015 02:47 GMT
#225
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
I'm better than dirt. Well, most kinds of dirt. I mean not that fancy store bought dirt. That stuffs loaded with nutrients. I... I can't compete with that stuff.
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 08 2015 14:35 GMT
#226
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 08 2015 15:44 GMT
#227
Well, not really. But maybe if there's a lot of games running simultaneously.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
kitaman27 *
Profile Blog Joined April 2009
United States9245 Posts
September 08 2015 21:45 GMT
#228
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.
I'm better than dirt. Well, most kinds of dirt. I mean not that fancy store bought dirt. That stuffs loaded with nutrients. I... I can't compete with that stuff.
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:19 GMT
#229
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...
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:19 GMT
#230
Day 1
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:19 GMT
#231
##vote xalatos
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:20 GMT
#232
##vote scott
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:20 GMT
#233
##vote marvelusity
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:20 GMT
#234
##vote ogenu
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:21 GMT
#235
##vote katamun
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:21 GMT
#236
##vote ovbaousone
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:21 GMT
#237
Commence testing..
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:25 GMT
#238
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
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:25 GMT
#239
Wow... I can't believe how well it worked after all....
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:25 GMT
#240
Well, now there shouldn't be any problems with misspelling of names or anything at least
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
marvellosity
Profile Joined January 2011
United Kingdom36161 Posts
December 04 2015 15:40 GMT
#241
On December 05 2015 00:20 Xatalos wrote:
##vote marvelusity

*slap*
[15:15] <Palmar> and yes marv, you're a total hottie
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:42 GMT
#242
:D
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:44 GMT
#243
Night 1
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Rels
Profile Joined August 2008
France13467 Posts
December 04 2015 15:45 GMT
#244
##Vote Half the Sky
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:45 GMT
#245
Too late
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Rels
Profile Joined August 2008
France13467 Posts
December 04 2015 15:49 GMT
#246
Shit deadline is passed ? Plz no modkill
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:51 GMT
#247
Rels has been given a 2-game ban for posting in a game without being a player.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 15:52 GMT
#248
Before you ask, marvellosity received no penalty because he's a valuable member of the community (VMOTC). Life is never fair.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
marvellosity
Profile Joined January 2011
United Kingdom36161 Posts
December 04 2015 15:54 GMT
#249
quite right. know your place. ^_^
[15:15] <Palmar> and yes marv, you're a total hottie
Rels
Profile Joined August 2008
France13467 Posts
December 04 2015 15:54 GMT
#250
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 ?
Rels
Profile Joined August 2008
France13467 Posts
December 04 2015 15:57 GMT
#251
Wow nice. Will look at the code
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 16:03 GMT
#252
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 16:05 GMT
#253
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 16:13 GMT
#254
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.
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Artanis[Xp]
Profile Blog Joined December 2005
Netherlands12968 Posts
December 04 2015 16:19 GMT
#255
##Vote Finnish drunkiard
Xatalos
Profile Joined January 2011
Finland9675 Posts
December 04 2015 16:20 GMT
#256
-> raynpelikoneet
"The opportunity to secure ourselves against defeat lies in our own hands, but the opportunity of defeating the enemy is provided by the enemy himself." - Sun Tzu
Normal
Please log in or register to reply.
Live Events Refresh
WardiTV Summer Champion…
11:00
Open Qualifier #1
WardiTV864
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 374
Lowko269
Hui .74
ProTech55
Codebar 22
Vindicta 20
StarCraft: Brood War
Rain 7019
Bisu 2716
Shuttle 2262
Horang2 1605
Flash 1592
EffOrt 903
Larva 506
Mini 412
Soulkey 386
Killer 371
[ Show more ]
ggaemo 351
hero 327
firebathero 264
Mong 256
Zeus 232
ZerO 225
Barracks 217
Soma 183
Hyuk 178
Rush 73
TY 62
ToSsGirL 61
Movie 50
Sharp 43
PianO 41
[sc1f]eonzerg 34
sSak 33
sorry 28
JYJ27
Yoon 21
JulyZerg 18
scan(afreeca) 14
SilentControl 10
IntoTheRainbow 8
Bale 6
Terrorterran 3
Stormgate
TKL 61
Dota 2
Gorgc3997
qojqva3338
Dendi662
XaKoH 398
XcaliburYe212
Counter-Strike
byalli293
oskar141
markeloff66
edward37
Other Games
singsing2336
B2W.Neo1403
hiko794
Beastyqt599
crisheroes389
DeMusliM381
Happy264
Fuzer 215
RotterdaM211
ArmadaUGS89
rGuardiaN88
PartinGtheBigBoy35
QueenE33
ZerO(Twitch)15
Organizations
StarCraft: Brood War
UltimateBattle 18
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• StrangeGG 54
• davetesta16
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• FirePhoenix1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 2205
• WagamamaTV489
League of Legends
• Nemesis4121
Upcoming Events
WardiTV Summer Champion…
1h 20m
PiGosaur Monday
10h 20m
WardiTV Summer Champion…
21h 20m
Stormgate Nexus
1d
uThermal 2v2 Circuit
1d 2h
The PondCast
1d 20h
WardiTV Summer Champion…
1d 21h
Replay Cast
2 days
LiuLi Cup
2 days
uThermal 2v2 Circuit
3 days
[ Show More ]
RSL Revival
3 days
RSL Revival
3 days
uThermal 2v2 Circuit
4 days
CSO Cup
4 days
Sparkling Tuna Cup
4 days
uThermal 2v2 Circuit
5 days
Wardi Open
5 days
RotterdaM Event
6 days
Liquipedia Results

Completed

ASL Season 20: Qualifier #2
FEL Cracow 2025
CC Div. A S7

Ongoing

Copa Latinoamericana 4
Jiahua Invitational
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
HCC Europe
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025

Upcoming

ASL Season 20
CSLPRO Chat StarLAN 3
BSL Season 21
BSL 21 Team A
RSL Revival: Season 2
Maestros of the Game
SEL Season 2 Championship
WardiTV Summer 2025
uThermal 2v2 Main Event
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.