• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 03:48
CET 09:48
KST 17:48
  • 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 Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
RSL Season 3: RO16 results & RO8 bracket11Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge1[TLMC] Fall/Winter 2025 Ladder Map Rotation14Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA12
StarCraft 2
General
RSL Season 3: RO16 results & RO8 bracket SC: Evo Complete - Ranked Ladder OPEN ALPHA RSL Season 3 - Playoffs Preview Mech is the composition that needs teleportation t GM / Master map hacker and general hacking and cheating thread
Tourneys
RSL Revival: Season 3 $5,000+ WardiTV 2025 Championship StarCraft Evolution League (SC Evo Biweekly) Constellation Cup - Main Event - Stellar Fest 2025 RSL Offline Finals Dates + Ticket Sales!
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
Data analysis on 70 million replays soO on: FanTaSy's Potential Return to StarCraft FlaSh on: Biggest Problem With SnOw's Playstyle [ASL20] Ask the mapmakers — Drop your questions BGH Auto Balance -> http://bghmmr.eu/
Tourneys
Small VOD Thread 2.0 [BSL21] GosuLeague T1 Ro16 - Tue & Thu 22:00 CET [BSL21] RO16 Tie Breaker - Group B - Sun 21:00 CET [BSL21] RO16 Tie Breaker - Group A - Sat 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread [Game] Osu! Should offensive tower rushing be viable in RTS games? Clair Obscur - Expedition 33
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI About SC2SEA.COM
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread Korean Music Discussion
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
The Health Impact of Joining…
TrAiDoS
Dyadica Evangelium — Chapt…
Hildegard
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2093 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
RSL Revival
07:30
Playoffs
SHIN vs TriGGeRLIVE!
herO vs Reynor
Maru vs MaxPax
Crank 1131
Tasteless568
IndyStarCraft 106
Rex54
TKL 53
CranKy Ducklings53
3DClanTV 28
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Crank 1131
Tasteless 568
ProTech124
IndyStarCraft 106
Rex 54
TKL 53
StarCraft: Brood War
actioN 543
Killer 333
Leta 197
ajuk12(nOOB) 150
Sharp 86
ToSsGirL 45
soO 42
Sacsri 38
zelot 20
BeSt 11
Dota 2
monkeys_forever247
XcaliburYe2
League of Legends
JimRising 481
Counter-Strike
shoxiejesuss353
Other Games
summit1g15842
XaKoH 231
Happy217
C9.Mang0215
Fuzer 100
NeuroSwarm36
Trikslyr32
ceh920
Dewaltoss18
Organizations
Dota 2
PGL Dota 2 - Main Stream12827
StarCraft: Brood War
UltimateBattle 108
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH128
• LUISG 12
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1143
• Stunt583
Upcoming Events
WardiTV Korean Royale
3h 12m
Replay Cast
14h 12m
RSL Revival
22h 42m
WardiTV Korean Royale
1d 3h
SC Evo League
1d 3h
IPSL
1d 8h
Julia vs Artosis
JDConan vs DragOn
OSC
1d 8h
BSL 21
1d 11h
TerrOr vs Aeternum
HBO vs Kyrie
RSL Revival
1d 22h
Wardi Open
2 days
[ Show More ]
IPSL
2 days
StRyKeR vs OldBoy
Sziky vs Tarson
BSL 21
2 days
StRyKeR vs Artosis
OyAji vs KameZerg
Replay Cast
2 days
Monday Night Weeklies
3 days
Replay Cast
3 days
Wardi Open
4 days
Replay Cast
5 days
Wardi Open
5 days
Tenacious Turtle Tussle
5 days
The PondCast
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-11-16
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 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.