• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 11:09
CET 17:09
KST 01:09
  • 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
ByuL: The Forgotten Master of ZvT28Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0258LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2
StarCraft 2
General
Terran AddOns placement How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Nexon's StarCraft game could be FPS, led by UMS maker ByuL: The Forgotten Master of ZvT Oliveira Would Have Returned If EWC Continued
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament SEL Doubles (SC Evo Bimonthly) WardiTV Team League Season 10 RSL Season 4 announced for March-April
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
Mutation # 514 Ulnar New Year The PondCast: SC2 News & Results Mutation # 513 Attrition Warfare Mutation # 512 Overclocked
Brood War
General
Soma Explains: JD's Unrelenting Aggro vs FlaSh Recent recommended BW games TvZ is the most complete match up BGH Auto Balance -> http://bghmmr.eu/ ACS replaced by "ASL Season Open" - Starts 21/02
Tourneys
The Casual Games of the Week Thread [Megathread] Daily Proleagues [LIVE] [S:21] ASL Season Open Day 1 ASL Season 21 Qualifiers March 7-8
Strategy
Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular?
Other Games
General Games
Nintendo Switch Thread Battle Aces/David Kim RTS Megathread Path of Exile Beyond All Reason New broswer game : STG-World
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine UK Politics Mega-thread YouTube Thread Mexico's Drug War
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
YOUTUBE VIDEO
XenOsky
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Inside the Communication of …
TrAiDoS
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2324 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 States25558 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 States25558 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
uThermal 2v2 Circuit
15:00
Monthly #3 - March
Serral1452
WardiTV557
uThermal463
IndyStarCraft 194
SteadfastSC136
StrangeGG61
MindelVK16
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Serral 1452
uThermal 463
IndyStarCraft 194
SteadfastSC 136
Liquid`TLO 72
BRAT_OK 69
MindelVK 16
StarCraft: Brood War
Sea 46407
Britney 38116
Rain 2129
Shuttle 614
JYJ 101
Backho 81
ToSsGirL 37
Free 30
Rock 30
JulyZerg 21
[ Show more ]
NaDa 10
Dota 2
Gorgc5321
qojqva1671
Counter-Strike
fl0m3567
allub175
oskar120
Heroes of the Storm
Khaldor497
Liquid`Hasu286
Other Games
B2W.Neo1147
Liquid`RaSZi1014
Beastyqt320
Fuzer 177
mouzStarbuck148
Hui .132
QueenE125
ArmadaUGS101
Mew2King68
KnowMe25
JuggernautJason22
Organizations
Counter-Strike
PGL184
Other Games
BasetradeTV111
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• HeavenSC 30
• poizon28 3
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 1409
League of Legends
• Jankos3051
Upcoming Events
Replay Cast
16h 51m
Wardi Open
19h 51m
Monday Night Weeklies
1d
Replay Cast
1d 7h
Replay Cast
2 days
Replay Cast
3 days
The PondCast
3 days
KCM Race Survival
3 days
Replay Cast
4 days
Replay Cast
5 days
[ Show More ]
CranKy Ducklings
5 days
Replay Cast
6 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

[S:21] ASL SEASON OPEN 2nd Round
LiuLi Cup: 2025 Grand Finals
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Acropolis #4 - TS5
Jeongseon Sooper Cup
Spring Cup 2026
WardiTV Winter 2026
Nations Cup 2026
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025

Upcoming

ASL Season 21: Qualifier #1
ASL Season 21: Qualifier #2
ASL Season 21
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
CSLAN 4
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
NationLESS Cup
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
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 © 2026 TLnet. All Rights Reserved.