• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 17:44
CEST 23:44
KST 06:44
  • 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
[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy18ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
GSL CK: More events planned pending crowdfunding0Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage3Weekly Cups (March 23-29): herO takes triple6Aligulac acquired by REPLAYMAN.com/Stego Research8
StarCraft 2
General
Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win Rongyi Cup S3 - Preview & Info Team Liquid Map Contest #22 - Presented by Monster Energy Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool What mix of new & old maps do you want in the next ladder pool? (SC2)
Tourneys
$5,000 WardiTV TL Map Contest Tournamen GSL CK: More events planned pending crowdfunding Sparkling Tuna Cup - Weekly Open Tournament RSL Season 4 announced for March-April StarCraft Evolution League (SC Evo Biweekly)
Strategy
Custom Maps
[M] (2) Frigid Storage Publishing has been re-enabled! [Feb 24th 2026]
External Content
The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power Mutation # 518 Radiation Zone
Brood War
General
ASL21 General Discussion Pros React To: JaeDong vs Queen [BSL22] RO32 Group Stage so ive been playing broodwar for a week straight. Gypsy to Korea
Tourneys
[Megathread] Daily Proleagues [ASL21] Ro24 Group F Escore Tournament StarCraft Season 2 [ASL21] Ro24 Group E
Strategy
What's the deal with APM & what's its true value Fighting Spirit mining rates Simple Questions, Simple Answers
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game General RTS Discussion Thread Darkest Dungeon
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread The Chess Thread Russo-Ukrainian War Thread NASA and the Private Sector Things Aren’t Peaceful in Palestine
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Loot Boxes—Emotions, And Why…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
ASL S21 English Commentary…
namkraft
Electronics
mantequilla
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1986 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 16m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Hui .91
StarCraft: Brood War
Calm 2656
ggaemo 133
910 25
Sexy 21
NaDa 9
Dota 2
monkeys_forever368
Counter-Strike
Coldzera 1601
Super Smash Bros
C9.Mang0155
Other Games
summit1g11955
Grubby3328
FrodaN594
shahzam568
Liquid`Hasu176
ToD130
Sick89
Mew2King48
ROOTCatZ37
ViBE20
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• musti20045 36
• davetesta19
• RyuSc2 9
• OhrlRock 1
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• RayReign 53
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV976
League of Legends
• Doublelift2419
Other Games
• imaqtpie1259
• Scarra957
• Shiphtur277
Upcoming Events
PiGosaur Cup
2h 16m
Replay Cast
11h 16m
Kung Fu Cup
13h 16m
Replay Cast
1d 2h
The PondCast
1d 12h
CranKy Ducklings
2 days
WardiTV Team League
2 days
Replay Cast
3 days
CranKy Ducklings
3 days
WardiTV Team League
3 days
[ Show More ]
uThermal 2v2 Circuit
3 days
BSL
3 days
Sparkling Tuna Cup
4 days
WardiTV Team League
4 days
BSL
4 days
Replay Cast
5 days
Replay Cast
5 days
Wardi Open
5 days
GSL
6 days
Liquipedia Results

Completed

CSL Elite League 2026
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026

Upcoming

Escore Tournament S2: W2
IPSL Spring 2026
Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
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.