• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:45
CEST 15:45
KST 22:45
  • 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
HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6Code S RO8 Preview: herO, Zoun, Bunny, Classic7
Community News
Weekly Cups (June 23-29): Reynor in world title form?3FEL Cracov 2025 (July 27) - $8000 live event13Esports World Cup 2025 - Final Player Roster14Weekly Cups (June 16-22): Clem strikes back1Weekly Cups (June 9-15): herO doubles on GSL week4
StarCraft 2
General
How does the number of casters affect your enjoyment of esports? Weekly Cups (June 23-29): Reynor in world title form? Esports World Cup 2025 - Final Player Roster HomeStory Cup 27 - Info & Preview The SCII GOAT: A statistical Evaluation
Tourneys
HomeStory Cup 27 (June 27-29) WardiTV Mondays SOOPer7s Showmatches 2025 FEL Cracov 2025 (July 27) - $8000 live event $200 Biweekly - StarCraft Evolution League #1
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers [G] Darkgrid Layout
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
ASL20 Preliminary Maps Unit and Spell Similarities BW General Discussion I made an ASL quiz BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET [Megathread] Daily Proleagues [BSL20] ProLeague LB Final - Saturday 20:00 CET Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile What do you want from future RTS games? Beyond All Reason
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Stop Killing Games - European Citizens Initiative Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Summer Games Done Quick 2025!
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Blog #2
tankgirl
Game Sound vs. Music: The Im…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Customize Sidebar...

Website Feedback

Closed Threads



Active: 685 users

C9++ Setup Generator

Forum Index > TL Mafia
Post a Reply
1 2 3 4 Next All
Xatalos
Profile Joined January 2011
Finland9675 Posts
Last Edited: 2014-09-30 14:16:21
September 28 2014 22:23 GMT
#1
After releasing the MafiaTools website ( http://www.teamliquid.net/forum/mafia/465676-mafiatools ) a while ago, and making some updates to the site initially (based on feedback), I haven't really spent much time on it lately. However, today I finally got around to making a big addition the site: a C9++ setup generator. I felt that it was a large enough addition to warrant its own thread (since many players who might be interested in this tool wouldn't probably be following the original MafiaTools thread).

Basically this is a tool for automating the tedious process of creating a new C9++ setup manually. It should be of use for anyone who considers hosting games, actually more so than my earlier tool for automated balance testing ( http://www.teamliquid.net/forum/mafia/436988-automatic-balance-tester ). I think even the most experienced hosts would benefit from automating this process - unlike with the automated balance tester.

Here's a direct link to the new tool: http://t-teesalmi.users.cs.helsinki.fi/MafiaTools/c9setup.html (link updated)

Here's a link to the source code used to generate new setups: http://pastebin.com/xePzkUhQ (link updated)

Here are the rules I based this tool on: http://wiki.mafiascum.net/index.php?title=C9++

Bug reports and other suggestions are very welcome. It seems to be working correctly, but there could always be something that I managed to miss.

Also huge thanks to the players who gave valuable feedback in the original MafiaTools thread! There are still a couple of suggestions that haven't been implemented, but I'll probably get around to them at some point.
"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
yamato77
Profile Blog Joined October 2010
11589 Posts
September 28 2014 22:45 GMT
#2
We ran a bunch of C9++ a while ago and ended up hating them.
Writer@WriterYamato
Alakaslam
Profile Blog Joined September 2011
United States17336 Posts
September 29 2014 00:24 GMT
#3
I don't care I will use this for stuff elsewhere.

Gracias xata
If you think Elon Musk is a Nazi, it is because YOU radicalized him!
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 29 2014 05:44 GMT
#4
On September 29 2014 07:45 yamato77 wrote:
We ran a bunch of C9++ a while ago and ended up hating them.


I'm not quite sure what you mean exactly? In any case, it might not be a perfect setup, but I think it's pretty good and certainly has its uses..
"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
September 29 2014 05:45 GMT
#5
On September 29 2014 09:24 Alakaslam wrote:
I don't care I will use this for stuff elsewhere.

Gracias xata


No problem
"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
yamato77
Profile Blog Joined October 2010
11589 Posts
September 29 2014 16:13 GMT
#6
Bugs ran C9++ games and people ended up gaming the setup more than they played actual mafia.

I'm sure it's fine if you modify it so that mass claim doesn't fuck mafia
Writer@WriterYamato
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 29 2014 18:24 GMT
#7
On September 30 2014 01:13 yamato77 wrote:
Bugs ran C9++ games and people ended up gaming the setup more than they played actual mafia.

I'm sure it's fine if you modify it so that mass claim doesn't fuck mafia


Oh OK

I guess that problem can be solved by claiming that it's a "modified C9++ setup" with some minor modification like you said. That would prevent setup speculation pretty effectively.

Well, my tool doesn't really allow for modification currently.... I guess something like that could be added to 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
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 29 2014 22:01 GMT
#8
Phew... The website was offline for a while, sorry about that. I ran into a problem that prevented the website from functioning properly. I finally got it fixed, though, so everything should be fine now.

More importantly, I created a new JavaScript-based version of the same tool here: http://t-teesalmi.users.cs.helsinki.fi/MafiaTools/c9setup.html

Source JavaScript here: http://pastebin.com/TcqYGBVe

It should work exactly the same as the Java-based version, but the advantage is that you don't need to reload the page to generate a new setup. I also left the original Java-based tool on the website, but this should be the superior tool among those two.

By the way, if there are any wishes for modifying the parameters of generating new C9++ setups with the tool, please share those here. As yamato77 mentioned, it might be useful to be able to modify the setup rules so that setup speculation becomes less of an issue during games.
"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
Foolishness *
Profile Blog Joined May 2009
United States3044 Posts
September 30 2014 00:56 GMT
#9
Blazinghand should know all the modifications to make c9 a worthwhile setup to play.

Though by that point it's not even c9 anymore...

Cloud 9.
geript: "Foolishness's cases are persuasive and reasonable but leave you feeling dirty afterwards. Kinda like a whore." ---- Manager of the TL Mafia forum, come play!
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
September 30 2014 02:28 GMT
#10
Cool. Yeah, the problem is that it's going to be harder to make "modified setups" without having to change the source code every time.

Makes me want to go back and finish (ehm....."start") that setup generator+runner I wanted. I swear that when I finish uni I'll (maybe) get to it!


The more you study and learn, the more stuff you want to do and in more awesome different ways. Like creating a forum-based epicmafia kind of system, where you can play games in the web site itself, or via a web service you can have personalized bots do the automated setup-things while the game is played in each individual forum. But yeah....takes time.
Wish I could have a pause button to pause time and do this kind of stuff, then unpause and keep going with my life.


Hmm...thinking about it I would want to have more time to play mafia again (ehmm...I think it's been like 9 months since the last time I played here)....or fixing the mafia spreadsheet thing Google fucked up >_>

Anyways, cool tool. I think these kind of "quick and dirty tools" will be of great help so far, since they are easy to use, maintain, and just create a new one if one so desires.


Also, you know the cool thing about the javascript thing: You don't even need to "host" it anywhere.

Try this:

1) Paste the code below in Notepad, and save it as "c9Generator.html":
+ Show Spoiler +



<!DOCTYPE html>
<html>
<head>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-theme.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/bootstrap-select.css" rel="stylesheet">
<title>MafiaTools C9++ Setup Generator</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="container">
<h1>C9++ Setup Generator</h1>
<p> <a href="index.jsp"><button type="button" class="btn btn-xs btn-default">Go Back</button></a>
<button type="button" onclick="generateroles();" class="btn btn-xs btn-default">Generate New C9++ Setup</button>
</p>
<form name="rolesform">
<ul id="roles">
</ul>
</form>
</div>
<script>
function generateroles() {
var rolestohtml = "";
var roles = [];
var numbers = [];
var characters = [];

for (var index = 0; index < 7; ++index) {
numbers.push(Math.floor(Math.random() * (99)) + 1);
}

numbers.forEach(function(number) {
if (number <= 50) {
characters.push('T');
} else if (number >= 51 && number <= 65) {
characters.push('C');
} else if (number >= 66 && number <= 75) {
characters.push('D');
} else if (number >= 76 && number <= 85) {
characters.push('V');
} else if (number >= 86 && number <= 95) {
characters.push('M');
} else if (number >= 96) {
characters.push('B');
}
});

var tCount = 0;
var cCount = 0;
var dCount = 0;
var vCount = 0;
var mCount = 0;
var bCount = 0;

characters.forEach(function(character) {
if (character === 'T') {
tCount++;
} else if (character === 'C') {
cCount++;
} else if (character === 'D') {
dCount++;
} else if (character === 'V') {
vCount++;
} else if (character === 'M') {
mCount++;
}
else if (character === 'B') {
bCount++;
}
});

if (cCount === 1) {
roles.push("1-Shot Cop");
} else if (cCount === 2) {
roles.push("Cop");
} else if (cCount === 3) {
roles.push("Cop");
roles.push("1-Shot Cop");
} else if (cCount === 4) {
roles.push("Cop");
roles.push("Cop");
} else if (cCount === 5) {
roles.push("Cop");
roles.push("Cop");
roles.push("1-Shot Cop");
} else if (cCount === 6) {
roles.push("Cop");
roles.push("Cop");
roles.push("Cop");
}

if (dCount === 1) {
roles.push("Doctor");
} else if (dCount === 2) {
roles.push("Doctor");
roles.push("1-Shot Doctor");
} else if (dCount === 3) {
roles.push("Doctor");
roles.push("Doctor");
} else if (dCount === 4) {
roles.push("Doctor");
roles.push("Doctor");
roles.push("1-Shot Doctor");
} else if (dCount === 5) {
roles.push("Doctor");
roles.push("Doctor");
roles.push("Doctor");
}

if (vCount === 1) {
roles.push("1-Shot Vigilante");
} else if (vCount === 2) {
roles.push("Vigilante");
} else if (vCount === 3) {
roles.push("Vigilante");
roles.push("1-Shot Vigilante");
} else if (vCount === 4) {
roles.push("Vigilante");
roles.push("Vigilante");
} else if (vCount === 5) {
roles.push("Vigilante");
roles.push("Vigilante");
roles.push("1-Shot Vigilante");
}

if (mCount === 1) {
roles.push("Innocent Child");
} else if (mCount === 2) {
roles.push("Mason");
roles.push("Mason");
} else if (mCount === 3) {
roles.push("Mason");
roles.push("Mason");
roles.push("Innocent Child");
} else if (mCount === 4) {
roles.push("Mason");
roles.push("Mason");
roles.push("Mason");
} else if (mCount === 5) {
roles.push("Mason (Mason group 1)");
roles.push("Mason (Mason group 1)");
roles.push("Mason (Mason group 2)");
roles.push("Mason (Mason group 2)");
}

if (bCount === 1) {
roles.push("Roleblocker");
} else if (bCount === 2) {
roles.push("Roleblocker");
roles.push("1-Shot Roleblocker");
} else if (bCount === 3) {
roles.push("Roleblocker");
roles.push("Roleblocker");
} else if (bCount === 4) {
roles.push("Roleblocker");
roles.push("Roleblocker");
roles.push("1-Shot Roleblocker");
}
if (tCount === 0) {
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Mafia Godfather");
} else if (tCount === 1) {
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Mafia Godfather");
roles.push("Serial Killer");
} else if (tCount === 2) {
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Mafia Godfather");
} else if (tCount === 3) {
roles.push("Mafia Goon");
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
roles.push("Serial Killer");
} else if (tCount === 4) {
roles.push("Mafia Goon");
roles.push("Mafia Goon");
roles.push("Mafia Roleblocker");
} else if (tCount === 5) {
roles.push("Mafia Goon");
roles.push("Mafia Godfather");
roles.push("Serial Killer");
} else if (tCount === 6) {
roles.push("Mafia Goon");
roles.push("Mafia Godfather");
} else if (tCount === 7) {
roles.push("Mafia Goon");
roles.push("Mafia Godfather");
roles.push("Serial Killer");
}

while (roles.length < 13) {
roles.push("Vanilla Townie");
}

roles.forEach(function(role) {
rolestohtml += "<li>" + role + "</li>";
});
document.getElementById("roles").innerHTML = rolestohtml;
}
</script>
</body>
</html>



2) Double-click this file you created
3) Enjoy your own C9 generator app, that can run even when offline, etc.

If you keep creating javascript tools, you don't even need a server. Just put up the HTML files so people can download them and use them on their own (though hosting them might be more convenient for some people).
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
September 30 2014 06:45 GMT
#11
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 07:37 GMT
#12
Yeah, that's definitely one effective way of using the tool. If you wanted to, you could even take the script and include it on your own website (I don't mind, although mentioning the source would be nice).

Well, I think the optimal solution is still for myself to host the script for now - because there are many scenarios where that would be for the best (for example: when using your phone or using the tool at work). But it certainly can't hurt to create an offline version of it as well like you mentioned.

I understand very well the feeling of lacking time Well, this tool was pretty quick to create, but anything larger would certainly put a heavy strain on my studies. Although I guess it could be doable to spread the usage of time over a larger period of time... What you talked about seemed pretty interesting and I'd definitely like to see at least some kind of a prototype of it if you can spare any time between your university work? Do you mean it'd be like a more comprehensive version of this tool - one that you could generate setups using any rules with? Seems pretty difficult to account for so many variables... But I guess it could be doable. And automating the process of votecounts etc. could certainly be helpful.

And yeah, like I said earlier, suggestions on modifying the rules of C9++ are still very welcome
"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
September 30 2014 08:00 GMT
#13
On September 30 2014 15:45 Blazinghand wrote:
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.


Funnily enough my first idea of modifying the generator was to allow excluding Serial Killers from the possible roles as well But does it work if the SK is just replaced with a VT? Or should something else be done as well when that modification is chosen?
"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
Blazinghand *
Profile Blog Joined December 2010
United States25551 Posts
Last Edited: 2014-09-30 08:02:21
September 30 2014 08:02 GMT
#14
On September 30 2014 17:00 Xatalos wrote:
Show nested quote +
On September 30 2014 15:45 Blazinghand wrote:
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.


Funnily enough my first idea of modifying the generator was to allow excluding Serial Killers from the possible roles as well But does it work if the SK is just replaced with a VT? Or should something else be done as well when that modification is chosen?


The simple way is that if you would have an SK, 50% of the time that SK is instead a VT. If you would normally have no SK, 50% of the time, turn one VT into an SK. Whether or not you have an SK is therefore independent of the number of blue roles.
When you stare into the iCCup, the iCCup stares back.
TL+ Member
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 08:24 GMT
#15
On September 30 2014 17:02 Blazinghand wrote:
Show nested quote +
On September 30 2014 17:00 Xatalos wrote:
On September 30 2014 15:45 Blazinghand wrote:
Roughly speaking, C9 is a 13-player setup for which the default is:

10 VT
1x Goon, 1x GF
1x SK


You then flip 7 coins, and for each "Heads", you replace a VT with a PR. 30% cop, 20% Doctor, 20% Vigi, 20% Mason, 10% Town RB. If you get the same role more than once, you increase the power of the role or make two of them. For example, cop is at 30%, but one Cop is just a one-shot cop. You have to roll cop twice to get a full cop. Three times for a full cop and a one-shotter; 4 times (very unlikely) for 2 full cops, and so on.

For each "Heads" you flip, you tinker with the setting a little bit. First three heads don't do anything but fuck around with the SK. 4th heads adds a second goon but yanks the SK, 5th heads brings the SK back, 6th heads gets rid of the sk but buffs scum, 7th heads brings the sk back, etc. Basically, if you flip an even number of heads, you don't have an SK, and if you flip an odd number, you do have an SK.

Due to math reasons, this comes out to a 50% chance of having an SK, and a surprisingly strong tendency for the "2 goon, 1 RB" mafia setup. It also means a carefully claiming town can figure out whether or not there is an SK, and what PRs scum has. It also, to an extent, borks mafia's attemps at a massclaim.

Example:
3 Heads - Mason, Cop, Cop = 2 PRs, 1x Innocent Child, 1x Full Cop. Scumteam is Goon Goon RB.

Let's say for some reason there's a massclaim D2. Town determines they're all VTs except for the Innocent Child who was shot N1 and the Full cop. They lynched VT D1, so that leaves us with: 11 players alive, 2 of which have claimed blue, 9 of which have claimed VT. Based on the info, they know it's a the 2 goon 1 RB setup. Now, you might think "mafia could fakeclaim 1-shot vigi or something" but whatever mafia claims, it'll have to corroborate "there isn't an SK" since nobody else died N1. Which means mafia will have to claim 2 PRs, or more likely, one 2-tier PR, which means Multi-Vigi or Full Cop. If mafia claimed any tier-1 PR, it would end badly. There are some instances where mafia can claim Doctor (if there is one Doctor claim Exactly) or Roleblocker (if there is one Roleblocker Claim exactly) but generally mafia's claim options are super limited, and those that do exist rely on knowing exactly what town has. And mafia can't really even claim Vigi without giving themselves away.

Really what happens is certain percentage of mafia's claims automatically let town know there's a fakeclaim based on the fact that any odd number of Heads will mean Serial Killer (or vice versa), and NK amounts will bear out the truth.

What this means is that unless you have exceedingly clever mafia players, masters of trickery and perfect purveyors of lies (like myself), the way the SK appears or doesn't appear, and the nature of town roles, makes it really really hard for mafia to fakeclaim, especially if mafia is not the last person to claim. Generally, this means all claims are either obviously false or confirmed town, in a massclaim situation. C9++ is in this respect very very open.

As for how to balance it, the first step is to remove SK from the equation. After any setup C9++ generates, flip a coin. If the coin comes up Heads, change whether or not SK is in the game, and if it's tails let it lie. This will remove the ability to force scum into certain bad situations due to the presence/absence of the SK. I'd have to spend more time to figure out how to completely solve the massclaim problem, but semi-open can be tough in general.


Funnily enough my first idea of modifying the generator was to allow excluding Serial Killers from the possible roles as well But does it work if the SK is just replaced with a VT? Or should something else be done as well when that modification is chosen?


The simple way is that if you would have an SK, 50% of the time that SK is instead a VT. If you would normally have no SK, 50% of the time, turn one VT into an SK. Whether or not you have an SK is therefore independent of the number of blue roles.


Okay. I'll probably add the option of not having a SK tonight.
"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
September 30 2014 14:14 GMT
#16
Now there's a checkbox labeled as "No Serial Killers". Checking that means simply that if you would normally get a Serial Killer, you now get a Vanilla Townie instead. Perhaps a bit unnecessary, since you could just do the change manually, but why not

New source JavaScript here: http://pastebin.com/xePzkUhQ

Link to the JavaScript version: http://t-teesalmi.users.cs.helsinki.fi/MafiaTools/c9setup.html

Any other suggestions for modifying the basic setup?
"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
gonzaw
Profile Joined December 2011
Uruguay4911 Posts
September 30 2014 21:43 GMT
#17
On September 30 2014 16:37 Xatalos wrote:
Yeah, that's definitely one effective way of using the tool. If you wanted to, you could even take the script and include it on your own website (I don't mind, although mentioning the source would be nice).

Well, I think the optimal solution is still for myself to host the script for now - because there are many scenarios where that would be for the best (for example: when using your phone or using the tool at work). But it certainly can't hurt to create an offline version of it as well like you mentioned.

I understand very well the feeling of lacking time Well, this tool was pretty quick to create, but anything larger would certainly put a heavy strain on my studies. Although I guess it could be doable to spread the usage of time over a larger period of time... What you talked about seemed pretty interesting and I'd definitely like to see at least some kind of a prototype of it if you can spare any time between your university work? Do you mean it'd be like a more comprehensive version of this tool - one that you could generate setups using any rules with? Seems pretty difficult to account for so many variables... But I guess it could be doable. And automating the process of votecounts etc. could certainly be helpful.

And yeah, like I said earlier, suggestions on modifying the rules of C9++ are still very welcome


Basically I had the idea of trying to make the "hosting" of games take place in a server. Basically, think of anything a host does:

-Create setups
-Run games (setup the signup thread, count signups, close signups, start the game sending the role PMs to every player, etc)
-Create day/night posts
-Receive night actions
-Resolve night actions (who scum shoots, who medic saves, who cop checks)
-Give back results of night actions to the respective players
-Periodically post votecounts
-Once day ends, count the votes and lynch the correct player
-Manage QTs, roles, information about the game, etc.

All of these can be automated. I wanted to do something like that, and maybe even make it come with a TL bot (like some that are floating around here), where you just PM the night action or stuff to the bot and the bot does everything automatically (but obviously having a server behind all of it).
Basically, forum mafia games have a certain "structure"; over here, over at OMGUS, and everywhere. You have games, you have setups, you have hosts, you have a balance team, you have a game queue, you have normal/themed/etc games, etc. The structure is the same, the rules are the same (if only slightly changing), thus it makes sense to have a centralized automated tool to handle it.

Also, in typical "let's see all the shit we can put in this", I wanted it to be able to even add customized setups and roles, specially themed ones (like making it possible for Greymist to host one of his crazy setups in it), and a lot of other shit.


Anyways, you can see this was pretty huge. At the moment it didn't feel that huge, but while I was just starting the "brainstorm" process, I encountered some big problems. Specially: Night Action resolution. The core of it would be, at the very least, getting night actions and resolving them. But this seemed way too hard.

But that was like 2 years ago. I knew so little stuff about computing compared to what I do now (for example I wanted to do all of it in java...). I even realize some stuff I wanted to do which seemed too tedious, could be done way more easily, or the developing process itself could be done way more faster.

I'm still definitely interested in doing something like this. At the very least, I want to do something like this to get more experience with certain technologies and development practices I don't use at work nor at uni. But the more I stay at uni, the more things I learn and the more things I start to realize I could use for this project instead of old ones, so I'm not in a hurry to do this or anything (since the more I wait, the better equipped I am to handle this thing the way I want to).
So I'd like to do something like this, at the very least as a personal project of mine. I'd like it even more if there was an actual desire and need for it from the community. if I go through the trouble of making something like this, I'd like it to be used ). But those are concerns that come after prototyping and the like


Here's the link to the old thread.
Link: http://www.teamliquid.net/forum/mafia/383168-mafia-system-updates-and-suggestions

+ Show Spoiler +

PS: I was crazy
batsnacks
Profile Blog Joined April 2014
United States4466 Posts
September 30 2014 22:15 GMT
#18
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...
Xatalos
Profile Joined January 2011
Finland9675 Posts
September 30 2014 22:16 GMT
#19
Oh yeah, you were talking about that - I thought you were talking about something a bit different (something more about the setup generation rather than the game running process). I think we discussed that specific system before... in the balance tester thread? But yeah, I guess it's good to wait in its own way instead of rushing to create a weak project. If you do start working on that project, I could probably also help in whatever capacity I'd be capable of.
"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
September 30 2014 22:17 GMT
#20
On October 01 2014 07:15 batsnacks wrote:
+ Show Spoiler +
Innocent Child
Mafia Goon
Mafia Godfather
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie
Vanilla Townie


Hmm...


Hahah... That's an unlikely setup, but one that's still within the boundaries of C9++
"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
1 2 3 4 Next All
Please log in or register to reply.
Live Events Refresh
Replay Cast
10:00
uThermal 2v2 Circuit - Qual.
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Rex 31
StarCraft: Brood War
Rain 11643
Horang2 1833
Hyuk 1690
EffOrt 459
Larva 434
BeSt 349
Soulkey 340
Stork 295
Mini 290
Soma 160
[ Show more ]
ZerO 101
Rush 85
ToSsGirL 73
Sacsri 64
Sea.KH 59
[sc1f]eonzerg 40
Sharp 26
soO 24
Hm[arnc] 20
Free 20
sorry 15
Noble 14
scan(afreeca) 10
Terrorterran 8
Bale 3
Stormgate
RushiSC3
Dota 2
Gorgc4669
qojqva3933
XcaliburYe321
Counter-Strike
markeloff185
edward81
Super Smash Bros
Mew2King146
Other Games
singsing2059
B2W.Neo1536
hiko904
crisheroes357
Pyrionflax243
ArmadaUGS101
ZerO(Twitch)15
Organizations
StarCraft: Brood War
lovetv 10
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 11 non-featured ]
StarCraft 2
• StrangeGG 70
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Upcoming Events
Monday Night Weeklies
2h 15m
Replay Cast
10h 15m
Wardi Open
21h 15m
PiGosaur Monday
1d 10h
The PondCast
1d 20h
RSL Revival
2 days
WardiTV European League
3 days
RSL Revival
3 days
WardiTV European League
4 days
FEL
4 days
[ Show More ]
Korean StarCraft League
4 days
CranKy Ducklings
4 days
RSL Revival
4 days
FEL
5 days
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
6 days
BSL: ProLeague
6 days
Dewalt vs Bonyth
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 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
FISSURE Playground #1
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.