dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
2162

Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

Johnny34

Premium Member

C9 Automatic Vote Recorder for Mac

For whomever wants to try it, this app keeps votes in a C9. There is nothing limiting it to 7 players except the size of the display window columns.

It does everything for voting except save and load the status between launches of the app.

Features:

- Keyboard entry of players in edit mode
- For voting:
1) Choose 1 to N voters and a votee, click Vote (Vote button only enabled if one or more voters and a votee selected). Adds those votes to the votee, automatically removes ("unvotes") any existing votes that are on other votees from the same voters, and produces an "Official Vote Count" text box that is automatically placed on the clipboard ready for pasting into a DSLR post.

2) Choose a player and click Unvote (Unvote button only enabled if the clicked player has a vote on somebody). This is only necessary when the player wishes to remove his only vote - votes on another player automatically unvote the currently voted player.

3) Automatic Twilight and Lynch. With each vote, twilight is checked for and if present, the player is lynched, removed from the list, and all votes zeroed. Twilight is correctly calculated based on playervotes (numplayers div 2) + 1.

4) Hammer support - if multiple votes go on a player, they can all be selected at once, the votee selected, and Vote clicked.

Mafia C9 Vot···rder.zip
70429 bytes


Above is a zipped executable that runs on the Mac. If someone wants to try and port it to C or Python or Ruby or Perl, I will supply my source code.

It comes preloaded with the Sever Dwarves as players.

yock
TFTC
Premium Member
join:2000-11-21
Miamisburg, OH

yock

Premium Member

What is this written in currently?

sansri88
digital is here
Premium Member
join:2005-12-17
New York, NY

sansri88 to Johnny34

Premium Member

to Johnny34
I don't have a Mac so I can't run it. If someone can compile it to run in Windows that would be great.

TheRul
Why Not You?
Premium Member
join:2007-09-18
Monterey, CA

TheRul to yock

Premium Member

to yock
said by yock:

What is this written in currently?
my guess is code.

Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

Johnny34 to yock

Premium Member

to yock
said by yock:

What is this written in currently?
AppleScript Studio - (Cocoa).

Most of the AppleScript Studio code can be mapped to Objective-C calls, but there is still the issue of the interface.

It's 214 lines of AppleScript Studio code.

I just added automatic saving and loading of the player list and votes/votees so that if you quit in the middle of a day with votes on the board, it will reload those votes/votees on the next launch. It saves everything after each vote and unvote.

That is the vote module - I plan to add a role property to each player and that will allow the "lynched" post to include the player's role. That would show up as a second data entry column for the Mod when entering the players' names.

Other additions are randomization to generate the roles and the flavor of the C9, and entering night actions with timestamps to allow automatic night scene results.

Then there would be a blank text entry box that appeared when a lynch was detected, allowing the Mod to enter the flavor text.

I would enclose the Day and Night images in the app's bundle so it could put those into the HTML for the post also.

CatSnak
Live to Ride
Premium Member
join:2001-05-06
Ashland, OR

1 recommendation

CatSnak

Premium Member

Johnny,

I'd like to see if I can get it working on a windows machine. Can I get your source code puhlease?

iceangel
Premium Member
join:2007-12-08
Beverly Hills, CA

iceangel to Johnny34

Premium Member

to Johnny34
is there some way to run this on a PC?

Johnny34
Fed Up. Bye.
Premium Member
join:2001-06-27
Atlanta, GA

1 edit

Johnny34 to CatSnak

Premium Member

to CatSnak
said by CatSnak:

Johnny,

I'd like to see if I can get it working on a windows machine. Can I get your source code puhlease?
Here's the Applescript Studio code. EDIT: It now automatically chooses the C9 flavor from random.org, and also assigns the seven roles from random.org.

Votes by a voter automatically unvote the voter's existing vote, if any.

It also automatically keeps track of how many votes from lynch each voted player is and notes it alongside the vote list.

It also displays the list of players who have not voted.

As a player is lynched, he is removed from the player list and the threshhold for lynch recalculated.

Mafia C9 Vot···ript.zip
3627 bytes


I still have to add the code to input Cop Doc and Mafia night choices and let it compute the death scene automatically.