Since you're going for online, I think it would work best to have a Detective side of gameplay, a Murder side, and a Bystander/Witness side of gameplay.
Game starts, players are randomly assigned a role. 1 Detective, 1 Murderer, 4 Normal Blokes. (Maybe once it was developed, other setups could be created?)
Murder selects a place for the crime scene, (for example) A Home, a Work Environment, or a School.
Murder selects strike method (Lights go out, Everyone Goes to sleep or other interesting ideas)
The for the first x-minutes the murderer and the normal blokes are in the home. They can talk to eachother, walk around, and do other various tasks. Each player is given a location within the home they are to go to, they have 'random' tasks they must do. This is just to keep everyone busy. The murder doesn't really have tasks given to him, instead he is setting up the murder. He is able to
- Place False Evidence
- Setup aspects of the crime such as a rope for hanging, an ice block, ect
There would likely be pre determined murder methods, each with certain 'setups' (maybe each method would have 1-3 possible setups?) and with certain evidence that the game will create. The murder is given various pieces for placing false evidence.
Likely the tasks people are given to do should also be placing items in certain locations, certain things could be empty (meaningless) and certain could coincidentally be potential evidence. The murder could place meaningless items when other people were around, and evidence when people weren't. Or he could try to be brave, place evidence and simply say it was the task the game gave him. He could be caught, because lets say, each player is given one thing to place every minute. There are 5 minutes. This means unless he can do something when absolutely nobody is looking, he can only place 5 items. If he places all 5 evidence, people will be suspicious. But if he does all 5 normal items, he won't have much evidence to throw the detective off when he arrives.
Then the lights go off, and the murder plan is put into action, and the true evidence is placed in the world.
The detective arrives, see's which of the methods was used and determines what evidence must appear. If he can figure out which evidence is real, he would know which of the methods was used and be able to deduce if certain people had certain signs. For example, he determines the broken window is real, the bullet outside is real, and that hand gun in the bathroom was used for it. He checks the prints on the hand gun (as opposed to say, the sword or the rope) and determines 3 of the people came into contact with it. (2 were moving it around, and 1 was the murderer.. hmm..) He asks people 'who was given the hand gun to move in the pre-detective phase? 2 people would answer, because it's true. But the murderer knows he needs to pretend it was him. So he says he did also.. making 3 claims. All 3 match the hand prints. A person points out 'I saw player A moving it from the bedroom to the bathroom during phase 3' Another says I saw player B Moving it from the bathroom to the living room in phase 4.' Somebody says 'so it was Player C then?' but, in reality player B moved it during phase 4, as one of his 'actions' But then 3 others say I saw player C moving it as well, and can confirm it was the only thing he moved during the phase.' Then somebody says 'Hey! I saw player B place a rag during phase 4! He used TWO actions!' and that would be the murderers error.
If the detective hadn't figured it out during this, he could have examined each player to see who had gun powder on them. But certain people could be given backstories that made this apply to them as well.
A. Players are given tasks to move, place, or pick up items around the location. They can talk and see eachother.
B. Detective arrives , he can perform an autopsy, check finger prints, and ask players what they were told to place. He has to determine for himself who he trusts, and who might be lying. Assuming he trusted someone, he could ignore the evidence they placed during their 5 phases.
C. Detective is told to deduce the culprit, if he is right, Town/Detective Win if he is wrong, Murder Wins.
The detective has to get everyones statements for all of these aspects, he then see's if anyone contradicts eachother, and can determine that it's likely one of the people who contradict eachother is the killer, and the other is town. The Detective tries to determine for himself what evidence he thinks was placed by town, and then looks at the remaining pool of evidence. He checks which way the victim was killed, and considers the 3 possible setups. (setups being combinations of evidence that could become that murder method.. if that makes sense) and deduces which evidence was likely actually used, and which was placed to misslead him. (A killer tactic here would be to place 3 false pieces of evidence that exactly lined up to another setup of the same murder method, or 2 of them if there was 1 piece that worked for both)
He also must consider what players saw other players do. (witnesses )
The killer needs to keep his story straight, know who he can disagree with, and act like he only placed 5 items.
4 people will tell the truth about what they placed, so most of the items will be accounted for. The liar will act like his are real, so those will likely end up being considered fake, rendering them fairly useless. leaving only a few pieces of evidence. The detective can determine that among what's left, is the real evidence, and anything the criminal placed. Assuming this occured, if there was 3 things left, the detective would know they are the evidence he should use the investigative results from (finger prints, and things of the sort) But if there are more than 5, he'll have to think about it a little bit.
But, the murderer knows what evidence will be placed and where because of his crime plan (He should be able to choose the location, the in-location place for the murder, the murder method, ect) so if he remembers/knows who saw him place what during what of the 5 phases, he can say he placed something during a certain phase, that actually showed up during the crime. But he needs to be wary of players, because if he says he placed it during phase 1, and another player had to do something in that same section, during phase 1.. they'll know he's lying.) Mafia has to know which lies to tell, and which truths to cause mayhem, and make someone else seem like the bad guy.
this would be very difficult to plan, but if set up properly it could be the perfect online detective game. Balancing psychology, induction, deduction and elegant detective mechanics. This is obviously a very incomplete thought, but it gets the idea of how the game would play across. There would need to be lots of planning..