• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 06:41
CET 12:41
KST 20:41
  • 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
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns6[BSL21] Non-Korean Championship - Starts Jan 103SC2 All-Star Invitational: Jan 17-1822Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises3Weekly Cups (Dec 15-21): Classic wins big, MaxPax & Clem take weeklies3
StarCraft 2
General
Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns SC2 All-Star Invitational: Jan 17-18 Weekly Cups (Dec 22-28): Classic & MaxPax win, Percival surprises Chinese SC2 server to reopen; live all-star event in Hangzhou Starcraft 2 Zerg Coach
Tourneys
WardiTV Winter Cup WardiTV Mondays SC2 AI Tournament 2026 OSC Season 13 World Championship uThermal 2v2 Circuit
Strategy
Simple Questions Simple Answers
Custom Maps
Map Editor closed ?
External Content
Mutation # 507 Well Trained Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes Mutation # 504 Retribution
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion I would like to say something about StarCraft StarCraft & BroodWar Campaign Speedrun Quest Data analysis on 70 million replays
Tourneys
[Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET [BSL21] Non-Korean Championship - Starts Jan 10 SLON Grand Finals – Season 2
Strategy
Game Theory for Starcraft Simple Questions, Simple Answers Current Meta [G] How to get started on ladder as a new Z player
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread General RTS Discussion Thread Awesome Games Done Quick 2026! Should offensive tower rushing be viable in RTS games?
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Trading/Investing Thread The Big Programming Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced
Blogs
How do archons sleep?
8882
Psychological Factors That D…
TrAiDoS
James Bond movies ranking - pa…
Topin
StarCraft improvement
iopq
GOAT of Goats list
BisuDagger
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2338 users

Mafia Votecount Tool - Page 11

Forum Index > TL Mafia
Post a Reply
Prev 1 9 10 11 12 13 Next All
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
Prev 1 9 10 11 12 13 Next All
Please log in or register to reply.
Live Events Refresh
Next event in 2h 19m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 212
StarCraft: Brood War
Britney 30169
Rain 2725
Sea 2192
GuemChi 1516
Shuttle 1044
FanTaSy 803
Stork 397
ZerO 382
firebathero 345
actioN 339
[ Show more ]
Soma 228
Light 216
Last 213
Hyuk 211
Mini 202
EffOrt 199
Snow 197
ToSsGirL 145
Leta 140
Aegong 120
ggaemo 104
Pusan 94
hero 72
Hyun 69
Barracks 64
Killer 61
ajuk12(nOOB) 58
Nal_rA 42
Sharp 41
910 39
sorry 33
NotJumperer 26
NaDa 24
JYJ 23
soO 20
Movie 15
zelot 13
Noble 12
Terrorterran 11
Sacsri 10
Icarus 2
HiyA 1
Dota 2
XaKoH 880
XcaliburYe469
NeuroSwarm121
Counter-Strike
olofmeister2143
zeus1152
shoxiejesuss954
x6flipin494
Other Games
singsing1816
B2W.Neo1162
Pyrionflax474
JimRising 449
Fuzer 295
Sick200
ZerO(Twitch)6
Organizations
Other Games
gamesdonequick27135
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• LUISG 44
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos5438
• HappyZerGling212
Upcoming Events
OSC
2h 19m
Classic vs Krystianer
Solar vs TBD
ShoWTimE vs TBD
MaxPax vs TBD
MaNa vs MilkiCow
GgMaChine vs Mixu
SOOP
1d 16h
SHIN vs GuMiho
Cure vs Creator
The PondCast
1d 22h
Sparkling Tuna Cup
2 days
IPSL
3 days
DragOn vs Sziky
Replay Cast
3 days
Wardi Open
4 days
Monday Night Weeklies
4 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2026-01-06
WardiTV 2025
META Madness #9

Ongoing

C-Race Season 1
IPSL Winter 2025-26
OSC Championship Season 13
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025

Upcoming

Escore Tournament S1: W3
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup
Thunderfire SC2 All-star 2025
Big Gabe Cup #3
Nations Cup 2026
Underdog Cup #3
NA Kuram Kup
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
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 © 2026 TLnet. All Rights Reserved.