Results 1 to 14 of 14

Thread: Mafia Assigner Programs

  1. #1

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default Mafia Assigner Programs

    I've made two different programs to help with giving out roles in Mafia games.

    Legal notice: Both programs are licensed under the GNU General Public License (v3.0), the full text of which is available here as well as included in the downloads.



    Java program

    C# program


    The files are broken up into three separate downloads each:
    Program: The actual program itself. This is the only required download.
    GameTypes: Premade gametypes (listed in the post), plus templates to help in making your own.
    SourceCode: The source code of the program; this just lets you see how I coded the program.

    There is now also a set of spreadsheets for hosts to use.
    Last edited by Woden; 09-02-2011 at 03:16 AM.

  2. #2

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default Java version (v1.1)

    Requirements: Java Runtime Environment

    Pros:
    Basic text-file editing to create your games... no XML knowledge needed. Works on all operating systems which support Java (batch file for easy program use only works on Windows operating systems, however).

    Cons:
    Very limited options, text files must be set up pretty exactingly.

    Notes:

    • On Windows operating systems, you can run the program by simply double-clicking on the "MafiaAssigner.bat" file.
    • To use the pre-made game types, simply copy them to the program's folder and unzip them; they will overwrite the input files (except the Players.txt file) to give the correct settings.



    Included game types:

    • C9
    • Dethy
    • Kingmaker
    • Lyncher Minus
    • Lyncher Plus
    Last edited by Woden; 04-01-2011 at 05:22 AM.

  3. #3

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default C# version (v1.1)

    Requires: .NET Framework 4.0 (Note: This is only compatible with Windows operating systems. Sorry, Mac and Linux users.)

    Pros:
    Greater flexibility in game design (particularly as I am still taking suggestions on this program), uses a graphical user interface (GUI).

    Cons:
    Requires some XML knowledge to use, requires the .NET framework (and is therefore Windows-only).

    Included game types:

    • C9
    • Dethy
    • Kingmaker
    • Lyncher Minus
    • Lyncher Plus
    • A basic game featuring some common roles, such as Roleblocker and Godfather.
    Last edited by Woden; 04-04-2011 at 05:48 PM. Reason: Minor update (v1.1)

  4. #4
    Philosopher Nortac's Avatar
    Join Date
    Aug 2007
    Location
    S&T!
    Posts
    7,960

    Default

    Question: does your program's C9 template also randomly decide on which C9 setup to use? Or is that up to the host to randomly pick first?

  5. #5

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default

    Quote Originally Posted by Nortac View Post
    Question: does your program's C9 template also randomly decide on which C9 setup to use? Or is that up to the host to randomly pick first?
    It will randomly decide. This is true of both programs.

    Basically, it just has a chance of picking a Townsperson role instead of a special role; there's a chance that you will get a setup given with no special roles, but it's pretty uncommon, and easily fixed by just re-running the program.

    Actually, I should probably go back and check that one to make sure it's giving about equal chances to all three desired outcomes...


    Edit: Fixed it in a kind of cheatish way. I made it assign three Townsperson roles first, then randomly pick from "Detective", "Doctor", and "Another Townie".
    (Edit 2: And this is actually a good example of why the flexibility of the C# program is better, as this solution isn't possible in my Java one... granted, the Java one is simplistic trash, but hey, it's hard to make use of XML in Java...)
    Last edited by Woden; 04-01-2011 at 05:26 AM.

  6. #6

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default

    First, I'd like to note that I am writing up a new Java version which will more closely match the C# version; it'll probably be a few days, since I'm restarting from scratch and will need to make equivalent stuff to some of the things included in C# (such as data tables).

    Having said that, a question for anybody that has used the C# version: Are there any changes you would like to see, or any features you think should be added?

    (Edit: In case the huge time gap with no updates wasn't enough of a hint, the Java upgrade was scrapped. I had too many issues trying to get it to read XML files. I might try again once I've finished this new no-XML version, but don't hold your breath.)
    Last edited by Woden; 09-19-2011 at 09:07 PM.

  7. #7
    Philosopher Nortac's Avatar
    Join Date
    Aug 2007
    Location
    S&T!
    Posts
    7,960

    Default

    Quote Originally Posted by Woden View Post
    First, I'd like to note that I am writing up a new Java version which will more closely match the C# version; it'll probably be a few days, since I'm restarting from scratch and will need to make equivalent stuff to some of the things included in C# (such as data tables).

    Having said that, a question for anybody that has used the C# version: Are there any changes you would like to see, or any features you think should be added?
    I'd like to see a feature that could create a C9++ round, as described here: http://mafiascum.net/wiki/index.php?title=C9%2B%2B

  8. #8

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default

    Quote Originally Posted by Nortac View Post
    I'd like to see a feature that could create a C9++ round, as described here: http://mafiascum.net/wiki/index.php?title=C9%2B%2B
    Wow, that looks monstrously complex to make a program for. O_O

    I'll give it a go, but that's probably going to be a while before I've got it working properly.

  9. #9
    Philosopher Nortac's Avatar
    Join Date
    Aug 2007
    Location
    S&T!
    Posts
    7,960

    Default

    Quote Originally Posted by Woden View Post
    Wow, that looks monstrously complex to make a program for. O_O

    I'll give it a go, but that's probably going to be a while before I've got it working properly.
    Yeah, no rush. Prioritize however you wish; it'll be some time before I plan to host one of those. Definitely not until after finals.

  10. #10

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default

    Also, in the interest of providing even more tools to make hosting easier, here's some generic spreadsheets to help you keep track of the goings on of your rounds.

    Mafia host spreadsheet excel.zip - For use with Microsoft Excel (or compatible programs)
    Mafia host spreadsheet open office.zip - For use with Open Office (or compatible programs)

    The Lynch Votes sheet is designed around using a vote minimum, but it also gives a sum of each player's votes received if you choose not to use the vote minimum. If you are making use of a vote minimum, then you can adjust the formula used by changing the two values at the top of that sheet; all players who meet the minimum on a given day will have an "L" next to their number of received votes on that day.

    The Mafia Kill sheet is designed around having votes for the mafia kill; if you are simply having a Godfather system where one player is responsible for the kill, then you can also use it as simply a record of who they are targeting each night. Each player will have a votes received total each day, and the player who received the most votes (or all players tied for the most votes) will have a "K" next to their number of votes received.

    The Lynch Votes and Mafia Kill sheets use formulae to make things easier... you only need to fill in fields which are a light blue-green and surrounded by a black border, everything else should auto-fill. The Specials sheet, on the other hand, is basically just a digital scratchpad since special powers vary so widely.

  11. #11

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default

    I'm re-working the mafia assigner program (I also plan to make a companion mafia organizer program to make life easier for hosts, but that'll come later), and since I'm still in the planning stages, I decided that I'd get some input on the terminology I'll be using.

    For the groups of players who are all on the same side (e.g., village, mafia), I are currently calling them factions, in the style of MafiaWiki.
    The abilities that each player has (e.g., ability to kill a player each night, or investigate, etc.) are being called powers. In addition, limitations or changes to the powers (e.g., 50% success rate, can only be used every other night, one-shot) are being called modifiers.
    The requirements for a player to win (e.g., for village-aligned players, your faction being the last one standing) are being called win conditions.
    Combinations of powers and win conditions (e.g., cop, godfather, serial killer) are being called roles.
    I will be including a system to let you restrict groups of roles (e.g., having no more than 1 investigative role, or any similar limit to an arbitrary tag you wish to stick on roles), and am currently calling the individual restrictions "role-limits," but would prefer a better name.

    Any suggestions for better terminology?

  12. #12

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default

    I uploaded some screenshots of what I've done so far, and posted a comment on each giving a brief explanation. If you've got any questions, comments, or criticisms, please go ahead and let me know, especially on questions and criticisms; this is the stage of development where it's easiest for me to change things, since most of it is still in planning right now.


    Also, since I'm feeling generous, I've attached a pack of clipart files in .ico format. I'm using them in this program, but they can be used anywhere .ico files can be used, such as for desktop shortcuts. They have all the standard sizes (16x16, 32x32, 48x48, 64x64, and 128x128) included in them.
    Attached Files Attached Files

  13. #13

    Woden's Avatar
    Join Date
    Apr 2007
    Location
    Georgia, U.S.A.
    Posts
    11,602

    Default

    Okay, another thing I need input on. I'm hard-coding some power effects into the program (so that they will be available in the follow-up program for helping hosts track stuff). I've come up with the following system:


    • Powers will be made by choosing a selection of effects and modifiers.
    • Multiple effects can be added to a single power (e.g., Jailer's power would be Protect + Roleblock)
    • Roles (and factions) can have multiple powers.
    • Effects are divided into "active" (usable when the player/faction wants) and "passive" (automatic, or event-triggered) effects.



    So far, I've gotten the following lists of effects and modifiers thought up:

    Faction active power effects
    • Kill: May kill one player with each use.
    • Alignment Investigate: May learn the alignment of one player with each use.
    • Role Investigate: May learn the role of one player with each use.
    • Stakeout: May see who targets one player at night with each use.
    • Stalk: May see who one player targets at night with each use.
    • Protect: Prevents one player from being murdered with each use.
    • Bodyguard: Redirects to a member of the faction (operator, or random if no operator) the first murder attempt at one player with each use.
    • Roleblock: Prevents one player's night action with each use.
    • Recruit: Able to change a player's faction to this faction with each use.
    • Switch: Able to redirect all other targetings directed at two players with each use.


    Faction active power modifiers
    • Operator: The faction must send a member to use the power, opening up the possibility of the power being blocked through death or roleblocking.
    • Random Effect: When the power is used, a single effect is chosen at random from the power's effects.
    • Lucky: Has a [x]% chance of not working when used.
    • Limited use: Can only be used [x] number of times.
    • Compulsive: Must be used whenever possible.
    • Recharge: After being used, requires [x] days before it can be used again.
    • Stealthy: The power does not show up to Stakeout and Stalk powers.
    • Free Action: The power can be used in addition to any other active powers each night.
    • Multiuse: The power can be used [x] times each night.


    Faction passive power effects
    • Communication: The faction members know each other, and may communicate privately.


    Role active power effects
    • Kill: May kill one player with each use.
    • Alignment Investigate: May learn the alignment of one player with each use.
    • Role Investigate: May learn the role of one player with each use.
    • Stakeout: May see who targets one player at night with each use.
    • Stalk: May see who one player targets at night with each use.
    • Protect: Prevents one player from being murdered with each use.
    • Bodyguard: Redirects to self the first murder attempt at one player with each use.
    • Roleblock: Prevents one player's night action with each use.
    • Recruit: Able to change a player's faction to the user's faction with each use.
    • Switch: Able to redirect all other targetings directed at two players with each use.


    Role active power modifiers
    • Random Effect: When the power is used, a single effect is chosen at random from the power's effects.
    • Lucky: Has a [x]% chance of not working when used.
    • Limited use: Can only be used [x] number of times.
    • Backup: Power is not available until activated by the host.
    • Compulsive: Must be used whenever possible.
    • Recharge: After being used, requires [x] days before it can be used again.
    • Stealthy: The power does not show up to Stakeout and Stalk powers.
    • Free Action: The power can be used in addition to any other active powers each night.
    • Multiuse: The power can be used [x] times each night.


    Role passive power effects
    • Parting Shot: If lynched, may kill a player.
    • Vengeful: If murdered, kills their attacker.
    • Paranoid: If targeted other than for murder, kills whomever targeted them.
    • Fugitive: Able to survive lynches.
    • Bulletproof: Able to survive murder attempts.
    • Assassin: Bypasses protection.
    • Juggernaut: Bypasses bodyguarding.
    • Cherubic: Shows up as innocent to alignment investigations.
    • Sinister: Shows up as guilty to alignment investigations.
    • Anonymous: Shows up as a powerless role to role investigations.


    Passive power modifiers
    • Lucky: Has a [x]% chance of not working when used.
    • Limited use: Can only be used [x] number of times.
    • Recharge: After being used, requires [x] days before it can be used again.



    Does anyone have any other effects or modifiers they would like to see, any better names for the stuff I've already listed (remember, shorter is better), or any questions/comments about the above?

  14. #14
    Philosopher Shenaynay's Avatar
    Join Date
    Aug 2008
    Location
    John Hopkin Univerity
    Posts
    8,649

    Default

    Unstickying and adding a link to this in the mafia role / common abbreviation thread. Thank you, Woden, it's a very helpful thread, we just have to consolidate the stickied threads.
    Quote Originally Posted by Sirveri View Post
    I would like to have a fertile female for a mate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •