• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:10
CEST 02:10
KST 09:10
  • 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
[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5TL.net Map Contest #21 - Finalists4Team TLMC #5: Vote to Decide Ladder Maps!0[ASL20] Ro8 Preview Pt1: Mile High15
Community News
PartinG joins SteamerZone, returns to SC2 competition215.0.15 Balance Patch Notes (Live version)94$2,500 WardiTV TL Map Contest Tournament 151Stellar Fest: StarCraft II returns to Canada11Weekly Cups (Sept 22-28): MaxPax double, Zerg wins, PTR12
StarCraft 2
General
PartinG joins SteamerZone, returns to SC2 competition 5.0.15 Balance Patch Notes (Live version) ZvT - Army Composition - Slow Lings + Fast Banes Stellar Fest: StarCraft II returns to Canada Had to smile :)
Tourneys
Stellar Fest $2,500 WardiTV TL Map Contest Tournament 15 Sparkling Tuna Cup - Weekly Open Tournament LANified! 37: Groundswell, BYOC LAN, Nov 28-30 2025 Maestros of The Game—$20k event w/ live finals in Paris
Strategy
Custom Maps
External Content
Mutation # 493 Quick Killers Mutation # 492 Get Out More Mutation # 491 Night Drive Mutation # 490 Masters of Midnight
Brood War
General
[ASL20] Ro8 Preview Pt2: Holding On BarrackS' ASL S20 Ro.8 Review&Power of Friendship Question regarding recent ASL Bisu vs Larva game BGH Auto Balance -> http://bghmmr.eu/ Thoughts on rarely used units
Tourneys
[ASL20] Ro8 Day 4 [Megathread] Daily Proleagues [ASL20] Ro8 Day 3 Small VOD Thread 2.0
Strategy
TvZ Theorycraft - Improving on State of the Art Current Meta I am doing this better than progamers do. Simple Questions, Simple Answers
Other Games
General Games
ZeroSpace Megathread Stormgate/Frost Giant Megathread Dawn of War IV Nintendo Switch Thread Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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
TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI Russo-Ukrainian War Thread Canadian Politics Mega-thread
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
Recent Gifted Posts The Automated Ban List BarCraft in Tokyo Japan for ASL Season5 Final
Blogs
[AI] From Comfort Women to …
Peanutsc
Mental Health In Esports: Wo…
TrAiDoS
Try to reverse getting fired …
Garnet
[ASL20] Players bad at pi…
pullarius1
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1307 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 9h 50m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Rain 4516
Larva 118
NaDa 34
ggaemo 31
Dota 2
canceldota159
League of Legends
JimRising 927
Counter-Strike
Stewie2K679
Super Smash Bros
AZ_Axe147
Heroes of the Storm
Khaldor216
Other Games
summit1g8169
Grubby3072
FrodaN2996
C9.Mang0296
KnowMe166
UpATreeSC129
ViBE117
XaKoH 97
Trikslyr67
Mew2King44
JuggernautJason18
Organizations
Other Games
gamesdonequick743
BasetradeTV41
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• RyuSc2 98
• davetesta46
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• Ler80
Other Games
• imaqtpie1201
Upcoming Events
Sparkling Tuna Cup
9h 50m
BSL Team Wars
18h 50m
Team Bonyth vs Team Dewalt
Dewalt vs kogeT
JDConan vs Tarson
RaNgeD vs DragOn
StRyKeR vs Bonyth
Aeternum vs Hejek
IPSL
18h 50m
DragOn vs Fear
Radley vs eOnzErG
Replay Cast
1d 9h
Map Test Tournament
2 days
Map Test Tournament
3 days
Tenacious Turtle Tussle
3 days
The PondCast
4 days
Map Test Tournament
4 days
Map Test Tournament
5 days
[ Show More ]
OSC
5 days
Korean StarCraft League
6 days
CranKy Ducklings
6 days
Map Test Tournament
6 days
OSC
6 days
[BSL 2025] Weekly
6 days
Safe House 2
6 days
Liquipedia Results

Completed

KCM Race Survival 2025 Season 3
Maestros of the Game
HCC Europe

Ongoing

BSL 20 Team Wars
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
Acropolis #4 - TS2
C-Race Season 1
IPSL Winter 2025-26
EC S1
ESL Pro League S22
Frag Blocktober 2025
Urban Riga Open #1
FERJEE Rush 2025
Birch Cup 2025
DraculaN #2
LanDaLan #3
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
WardiTV TLMC #15
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 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.