So i've thought a bit about the theory of a mafia game, especially the balancing of games and examined it.
Factors of a game outcome
an important question is: what matters to the outcome of a game. basically there are only 3 things that affect the whole game
1) the setup
2) the player skill
3) the luck
these 3 factors determine all other factors
see this diagram i've made:
(here is an advanced complete diagram, but it looks very complex and is not needed for my further points (wasnt sure if i should post this masterpiece of art): https://s14.directupload.net/images/140310/wrqd2q2d.png)
however as you can see in the diagram, all comes down to lynches, kills and the setup.
Balance of setups
so the goal is to determine how balanced a setup is. you can see that the 2 main factors the setup influences are the outcome itself (by how many mislynches are allowed if no kill fails) and the night actions thus votes (example: sheriff targeting mafia will increase votes on that mafia usually) thus lynches (so in the end the setup affects how likely a mislynch is to happen) and thus ofc the outcome again
additionally, since the setup affects night actions it will also affect the night kills (so it affects how likely is a fail kill to happen, for example if there are more than 1 maf team or lots of protectives or how likely is it a vigi shoots a maf/town)
the MYTOWN scale
let's look at the 'how many mislynches are allowed'.
for this i'll need to introduce the MYTOWN scale (mislynches to win)
the MYTOWN value can be determined easily in every conventional setup (means town vs one or multiple scum teams vs neutrals, nothing special like 5 sided)
to determine the MYTOWN value we have to check, how many mislynches must theoretically happen until the scums win, assuming every kill goes through and nothing special like vigi kills happen. so how many mislynches till scum number and mafia number are equal or scums are more (all scum teams and killing neutrals count as scum, nonkilling neutrals don't count)
of course the MYTOWN value changes as the game progress (see below).
let's take a setup with only town and maf as a simple example. lets say it's d1 (lynch day) and there are 8 town vs 3 mafia. let's see, after n1 6:3, after n2 4:3. then a nolynch would be enough, which counts as 0.5 (see below)
so the MYTOWN value here would be 2.5
definition: the starting MYTOWN value is the MYTOWN value a game has at the beginning and can be determined for every conventional setup (or aproximately if the rolelist is somewhat unknown)
conlusion:
the mafia wins once it's 0 (happens if town number=scum number) or below (happens if scum are more than town). however it doesn't have to be a mafia win because:
a) there may be no mafia member left, a 0:0 has the MYTOWN of 0 but noone wins
b) it may be night start, so the kill just has to fail to recover MYTOWN (see below)
c) scum may have equal or more players than town, but they might be split among more teams (or killing neutrals) so no factions controls the vote and the game goes on
d) there may be a nonkilling neutral, so even if scum number = town number the scum doesn't control the lynch and game goes on
e) some hosts may keep the game going despite one scum faction controlling the lynch if town can still recover because of vet, vigi, bd etc (see below)
so the town can still recover (get the MYTOWN higher than 0) and win though that's unlikely if it's once 0 or below
now how do events change the MYTOWN value
let's start with such simple setups as the example:
mislynch: -1 (obviously, the scale is based on this)
no lynch: -0.5
failed kill: +0.5
kill on their own: +1
succesful lynch: +/- 0
vigi/jailor/vet/kidnapper kill on town: -0.5
vigi/jailor/vet kill on mafia: +0.5
now we look at it with non killing neutrals:
lynching a jester: -(amount of town suicides - amount of mafia suicides +1) * 0.5
lynching a survivor, exe, amne, student, etc: -0.5
sk/second mafia (more KPN):
the additional kpn will change the starting MYTOWN val. just calculate it through with 2 deaths each night
example: 11 town vs 3 maf vs sk. after n1: 8:3:1 after n2 5:3:1 =>1 kill enough for no town majority => nolynch and 1 failed kill enough=> starting MYTOWN val = 2.33 (see below)
most gains and drops depend on the kpn so here are general formulas (all can still be applied for 1 kpn aswell):
mislynch still -1
even a successful lynch will now remove (kpn-1)/(kpn+1)
a nolynch will now remove KPN/(KPN+1)
a failed kill will only give 1/(kpn+1)
kill on their own/other scum faction will give only 2/(Kpn+1)
vigi/jailor/vet kill on mafia will give 1/(kpn+1)
vigi/jailor/vet/kidnapper kill on town will remove 1/(kpn+1)
lynching surv etc removes KPN/(KPN+1)
lynching jester removes (town suicides - mafia suicides + KPN)/(KPN+1)
removing a kpn will force you to recalculate the MYTOWN val
you can see additional kpn in a setup will make it a LOT of harder, because the starting MYTOWN is much lower and additionally many events pull more/grant less. and even lynching successful EVERY time is not enough anymore if you have already lost too many points which wouldnt be possible with just 1 kpn
one thing is still missing, the cultist conversion. depending on how many conversions will most likely occur in the setup, you can either see it as a kpn or not.
if counted as kpn: successful conversion -1/(kpn+1); not succesful: +1/(kpn+1)
not counted: succesful: -2/(kpn+1); not succesful: nothing
arsonist is difficult because it has no fixed kpn, it can either have almost 1 kpn or none at all if lynched soon enough
the witch: either you count it as nonkilling neutral (lynch counts as surv lynch) or you count it as mafia member (reduces starting MYTOWN but lynch counts as successful)
whether d1 lynch is allowed or not or game starts at n1, doesnt affect the starting MYTOWN, it makes it just impossible to avoid a drop on d1 if nolynch or n1 start. but even if d1 lynch is allowed, a drop is almost certain because most likely ppl wont lynch and if they do, it will be a mislynch
for convenience another definition: one mislynch equivalent are actions that reduce MYTOWN by the same amount than a mislynch which is 1. example: 2 no lynches are a mislynch equivalent in a game with 1 kpn. conclusion: the MYTOWN tells us how many mislynch equivalents are needed so the mafia wins
so now what's the point of the scale. first it can be used during a game, to determine what has to happen so you win or to judge plans (for example would it help to lynch the jester)
second and most importantly it can be used to determine how balanced a setup is. since in most of our setups the chance of mislynch is pretty much the same and the chance of fail kill too (as long only one mafia team because more would increase the chance they kill each other) the MYTOWN is the most important factor of a setup. since luck is random and player skill is equal on both sides (unless you deliberately put all good players in one team or you'd say on a site all players are one sided talented, so eg in general much worse as town than as mafia compared to all other sites. in this case you'd have to make setups more town sided specifically on this one sided gifted site) the MYTOWN is the most important factor for the whole outcome of any game
take fm 20 for example:
23 townies
11 scums (without student who became scum)
3 kpn at start (without arso) (5 from n4)
that's 3 starting MYTOWN (not accounting n4 kpn increase so in reality it's even lower
and that's also how the lynches went pretty much, 3 mislynch equivalents happened because of nolynch, student and jester lynch, vigi-/jailor-/modkill, marshall mislynch. normally there should have been a bit more allowed than the starting MYTOWN because of failed night kills and the reduce of kpn on d2 with sashas lynch, both would increase the MYTOWN but the increase of kpn in n4 decreased it again
optimal starting MYTOWN
so now the actual question is: what starting MYTOWN values should setups have? obviously, the more players the more mislynches must be allowed because there will be more lynches in total. maybe 2 for sfm, 3 for mfm and 4 for big fm (however less if 2 big scum teams). for exact values we'd need detailed statistics
thoughts? mistakes? discuss