DebateCraft Mafia Host Bot Guide
This guide covers the new dashboard-hosted Mafia system. It is ready for manual games and optional clock-assisted phase transitions. It does not yet resolve night actions automatically.
1. What the host bot handles
The system currently handles:
- Game drafts, rosters, hosts, and co-hosts
- Preset and custom role PMs
- Cryptographically secure role randomization
- Private role-PM delivery
- Game-thread creation
- Scheduled or immediate Day 1 starts
- Player posting permissions
- Vote tracking, thresholds, plurality, and ties
- Day and Night transitions
- Thread locking during Night
- Player elimination and restoration
- Player substitutions
- Temporary or indefinite player muting
- Pausing and resuming games
- Winner announcements
- Timed postgame discussion
- Vote history and Day navigation
- Host and administrator audit logs
It does not currently:
- Accept private night actions through a dedicated action form
- Understand or resolve Cop, Doctor, or Mafia actions
- Determine night-action priority
- Send investigation results automatically
- Choose Mafia’s kill
- Detect win conditions
- Reveal roles automatically
- End the game automatically
- Trigger an immediate hammer when majority is reached
For manual games, players should send night actions privately to the main host. The host resolves those actions and enters the resulting eliminations and announcements through the dashboard.
Part I: Access and responsibilities
2. Getting permission to host
In order to access the mafia host dashboard you need to have permissions to do it. This is to prevent spam and abuse by potential bots. As such, if you want access to utilizing and testing this feature please DM an administrator and we can grant you access.
3. Host roles
Main host
The main host is the canonical game operator. They can:
- Change the setup
- Randomize and finalize assignments
- Send role PMs
- Launch the thread
- Schedule Day 1
- Advance phases
- Resolve votes
- Eliminate and restore players
- Substitute or mute players
- Pause, complete, or cancel the game
System-generated public posts and private role PMs are sent using the main host’s account.
Co-host
Co-hosts receive read-only dashboard access in the current manual-game release. They can review secret assignments and game state, but cannot change or send them.
Administrator
Administrators can normally inspect and recover hosted games. However, an administrator or moderator who is or was a participant in an unfinished game is blocked from its dashboard to prevent cheating. This includes eliminated and substituted players.
4. Opening the Host Dashboard
Go to:
Mafia → Resources → Host Dashboard
The dashboard is divided into:
- Continue hosting: active responsibilities
- Games you run: games where you are the main host
- Games you co-host: read-only co-host assignments
- Pregame drafts: games that have not launched
- Game history: completed and cancelled games
- Other hosts: administrator-only history grouped by main host
Active hosting responsibilities are placed ahead of historical games so they are easier to find.
Part II: Creating a game
5. Create a draft
Select New game draft.
Enter:
- Game name
- Main host username
- Player usernames
- Co-host usernames
Player and co-host usernames can be entered one per line or comma-separated.
The person creating the draft becomes the main host by default. An administrator can create a game for a different approved main host.
You may create an empty draft and add the roster later.
Select Create draft.
6. Understand the pregame workflow
The dashboard presents the launch sequence in this order:
- Roster
- Roles
- Randomize
- Finalize
- Role PMs
- Run game
Complete these in order. Later steps remain unavailable until their prerequisites are satisfied.
Part III: Roster and roles
7. Enter the roster
Under Roster and role set, enter one player username per line.
The displayed order becomes the stable slot order. Randomization changes which role occupies each slot; it does not unpredictably rearrange the underlying player records.
Make sure:
- Every username is valid
- The main host is not accidentally included as a player
- Co-hosts are entered separately
- No player appears twice
- The final player count matches the total role quantity
8. Add preset roles
The initial proof-of-concept role library includes:
- Vanilla Town
- Town Cop
- Town Doctor
- Mafia Goon
Select Add preset role, choose the role, and set the number of players receiving it.
Preset descriptions can still be reviewed and edited before assignments are finalized.
9. Create a custom role
Select Create custom role PM.
Configure:
- Role name
- Alignment
- Quantity
- Known team, when applicable
- Private role-PM body
- Optional advanced voting rules
Alignment choices include:
- Town
- Mafia
- Independent
- Custom alignment
When using a custom alignment, enter the alignment’s public or internal name.
Known teams
Players with the same non-empty team key are treated as teammates. For example, every ordinary Mafia role might use the team key mafia.
Their teammates can then be included in the role PM.
Do not reuse a team key between unrelated groups.
10. Write the role PM
Supported placeholders include:
{player}— assigned player{role}— assigned role{teammates}— players sharing the role’s team key
The game name, role, alignment, and known team information are also included by the system.
Use the PM preview to verify the finished message. Secret role data must stay in the role-PM editor; do not paste it into the public opening-post editor.
Images are not yet supported as first-class PM attachments. Hosted images could be linked manually, but native private-message uploads remain future work.
11. Configure advanced voting rules
Each assigned role can change how its player interacts with voting.
Vote weight
Examples:
0: vote does not add to a wagon1: ordinary voter2: double voter- Higher values: custom weighted voters
Lynch-threshold modifier
This changes the number of votes required to eliminate that specific player.
Examples:
+1: loved or popular player who requires one extra vote-1: hated player who requires one fewer vote0: ordinary threshold
Visibility
Vote weight and threshold modifiers each have separate visibility settings:
- Everyone
- Assigned player and hosts
- Hosts only
This allows the same mechanic to be public in one setup and hidden in another.
Host-only mechanics are deliberately omitted from generated player PMs and public game information.
Advanced modifiers can also be changed during a game when a role or event changes a player’s voting status.
12. Save the setup
Select Save setup.
The total role quantity must exactly equal the roster size before randomization is allowed.
Once assignments have been finalized and delivered, the setup becomes locked. This prevents the roster, role set, and private assignments from becoming competing sources of truth.
Part IV: Randomization and role PMs
13. Randomize assignments
Select Randomize assignments.
The system securely shuffles the configured role packages across roster slots. A package includes:
- Role
- Alignment
- Team
- Role-PM content
- Vote weight
- Threshold modifier
- Visibility rules
These fields move together; alignment is not separately shuffled away from its role.
Review the secret assignment table carefully. Only authorized hosts and administrators who are not game participants can see it.
Current behavior allows rerandomization before finalization. Each reroll creates a new assignment version. A future release may make the first randomization permanent, but that restriction does not exist yet.
14. Finalize assignments
When satisfied, select Finalize assignments.
Finalization locks the assignment version. After this point:
- The roster and role set cannot be reopened casually
- Assignments cannot be rerolled
- Role-PM delivery can begin
- Substitutions must use the dedicated substitution workflow
Do not share or stream the dashboard while assignments are visible.
15. Send role PMs
Under Role PM delivery, select Send role PMs.
Each message is sent from the designated main host. Player replies therefore return to the main host’s private-message conversation.
Delivery statuses include:
- Pending
- Sent
- Failed
The system assigns each recipient and assignment version a stable message identifier. Retrying a partially failed batch cannot intentionally create duplicate role PMs.
If some messages fail:
- Read the recorded error.
- Correct the account or permission problem.
- Select Retry unsent role PMs.
Every role PM must be delivered successfully before the game can launch.
Part V: Launching the thread
16. Prepare the opening post
Under Launch game, enter:
- Thread title
- Opening post
The opening post supports rich-text formatting. Use it for:
- Rules
- Player list
- Public setup information
- Vote syntax
- Phase lengths
- Activity expectations
- Replacement and moderation policies
Do not include secret assignments.
The dashboard creates one canonical game thread. Do not separately edit its host list, roster, or phase state through legacy thread-embedded controls.
17. Choose when Day 1 begins
You have two options.
Start Day 1 immediately
The bot:
- Creates the thread
- Posts the opening material
- Opens Day 1
- Allows eligible players to reply and vote
- Starts the applicable deadline
Schedule Day 1
Choose an exact local date and time.
The bot creates the public thread immediately but keeps player replies and voting locked. At the scheduled time it:
- Posts the Day 1 announcement
- Opens player discussion
- Activates the Day 1 deadline
Before the scheduled start, the dashboard provides:
- Start Day 1 now
- Change schedule
- Day 1 deadline controls
- Scheduled-start status and recovery information
Scheduling uses server-backed work, so closing the browser does not cancel it.
18. Choose a phase-control mode
Manual
Manual mode is recommended for manual games.
Deadlines can be displayed, but reaching one does not advance the game. The host must explicitly resolve the Day or begin the next Day.
Use Manual when:
- Night actions are submitted privately
- The host must calculate results
- Flips require review
- The next Day needs a custom opening message
- The host wants complete control over timing
Automatic phase clock
Automatic mode performs time-based phase transitions.
At a Day deadline, it:
- Reads the canonical vote state
- Applies threshold, plurality, and tie rules
- Resolves the Day
- Opens Night
- Locks player discussion
At a Night deadline, it opens the next Day.
It does not resolve private night actions or send role results. If a host needs to process actions and compose a detailed morning announcement, Manual mode remains safer.
Automatic mode also does not cause an immediate hammer when a player reaches majority. The normal automatic transition occurs at the configured deadline. A host can manually resolve the Day earlier.
Manual controls remain available in either mode.
19. Configure phase lengths
For automatic mode, select preset Day and Night lengths or choose exact deadlines where offered.
For Day 1, choose:
- The normal mode behavior
- An exact end time
In Manual mode, the default can be no deadline. In Automatic mode, a future deadline is required.
20. Configure deadline voting rules
Choose what happens if the Day deadline arrives without a threshold elimination.
No player reaches threshold
Choose:
- No Lynch
- Plurality: eliminate the player with the highest vote total
Multiple top wagons are tied
Choose:
- No Lynch
- Random player among tied wagons
- Player who reached the final tied total first
- Eliminate all tied players
A No Lynch wagon does not compete as an ordinary player wagon in sub-threshold plurality resolution.
21. Launch safely
Select the launch button.
Launching is resumable. If the request is interrupted, reload the dashboard and select Resume game launch. The recovery process reuses the reserved thread and post records rather than creating duplicates.
Only the designated main host can initiate the normal launch. Administrators can assist with recovery when permitted.
Part VI: Running the game
22. How voting works
During an open Day, eligible living players see the Vote to Lynch controls above the reply editor.
A player can:
- Choose a player or Unvote
- Select Insert vote
- Submit the reply normally
The bot recognizes the canonical vote command in the post and updates the game’s vote state.
Players may also select Post vote count to request a public count.
Votes are rejected when the player is:
- Eliminated
- Muted
- Replaced
- Not on the roster
- Posting at Night
- Posting while the game is paused
- Posting before scheduled Day 1
- Posting after automatic deadline closure
- Posting in a completed or cancelled game
23. Monitor the Day
The dashboard’s Day-resolution section displays a current snapshot with:
- Each wagon
- Effective vote total
- Individual elimination threshold
- Voters
- Source posts
- Players not voting
- Detected result
- Any ambiguity requiring host intervention
Vote weight and player-specific threshold modifiers are applied to the canonical calculation.
24. Resolve the Day
When ready, use the Day-resolution panel.
If the bot detects one unambiguous result, choose Use detected vote result.
If the result needs host judgment, choose Record a host override and select:
- No Lynch
- A living player
A host override requires an explanation. That explanation becomes part of the public result announcement.
Then choose the Night deadline and select:
Resolve Day and open Night
The bot will:
- Record the canonical Day result
- Mark the applicable player or players eliminated
- Post the public result
- Open Night
- Immediately lock ordinary player discussion and voting
Hosts and authorized moderators can still post at Night.
25. Process Night manually
For a manual game:
- Have players send actions privately to the main host.
- Confirm action deadlines.
- Resolve protection, investigation, kill, and other effects outside the bot.
- Enter resulting eliminations through the dashboard.
- Prepare the public next-Day announcement.
- Begin the next Day.
Do not rely on the automatic clock to calculate these actions.
26. Begin the next Day
While the game is in Night, the dashboard displays a rich-text field for the next Day’s public opening message.
Use it to announce:
- Who died during the Night
- Alignment or role flips
- Investigation-independent public results
- Rule clarifications
- Replacements
- A concise game recap
Choose the new Day deadline and select Begin Day N.
The bot:
- Posts the host’s public opening message
- Opens the new Day
- Unlocks eligible player replies
- Starts the new deadline
- Starts the Day on a fresh forum page
All Days remain in one thread, but each new Day begins on a new page.
27. Navigate between Days
Once multiple Days exist, the public thread shows a Day navigation bar with:
- Previous Day
- Next Day
- Jump-to-Day selector
Ordinary page-number navigation remains available alongside Day navigation.
28. View vote history
Open the public game thread and select Vote history in the Game Info panel.
Vote history shows:
- Voter
- Target
- Vote or unvote
- Effective wagon total
- Day number
- Time
- Link to the source post
Vote history is public to players and spectators. It is not restricted to hosts.
Eligible legacy games with the old vote system can use the temporary compatibility route, but the full canonical integration belongs to dashboard-hosted games.
Part VII: Host controls
29. Change the phase deadline
Use Current phase deadline to update the running deadline.
In Manual mode, the deadline can be cleared.
Automatic mode requires a future deadline because the worker needs a valid execution time.
30. Override the base threshold
Leave the threshold field blank to use strict majority.
Entering a value changes the game’s base threshold. Individual role modifiers are applied afterward.
For example:
- Base threshold: 5
- Hated modifier:
-1 - That player’s effective threshold: 4
Use role-level modifiers for player-specific mechanics instead of repeatedly changing the whole game’s base threshold.
31. Eliminate or restore a player manually
The roster table provides Eliminate and Restore controls.
Use these for:
- Night kills
- Moderator-resolved effects
- Revivals
- Corrections
- Nonstandard mechanics
Day eliminations should normally go through the dedicated Day-resolution workflow so that votes, history, and announcements remain consistent.
32. Pause and resume
Use Pause game for:
- Host emergencies
- Rule disputes
- Replacement searches
- Technical problems
- Moderation intervention
You may enter a public pause reason.
Pausing preserves the current phase but blocks ordinary player discussion, voting, and automatic advancement.
When resuming:
- Choose Manual or Automatic control.
- Set the appropriate deadline.
- Select Resume game.
33. Substitute a player
Active games must be paused before substitution.
Under Player substitutions:
- Select a living outgoing player.
- Enter the replacement username.
- Enter the required private reason.
- Select Send PM and replace.
The replacement inherits:
- Stable roster slot
- Role
- Alignment
- Team
- Private role card
- Voting modifiers
The outgoing player remains canonical until the replacement PM succeeds.
If delivery fails, use:
- Retry replacement PM
- Safely cancel, but only when no replacement PM was created
During a paused Day, completing a substitution clears the current vote state. Players must vote again after resumption.
34. Mute a player
Muting applies only to the hosted game thread. It does not suspend the account or prevent private messages elsewhere.
Select the player and choose:
- Remainder of the current Day
- Until manually unmuted
Enter the required private reason.
A muted player cannot:
- Reply
- Vote
- Unvote
- Request a vote count
The bot does not automatically announce the mute publicly. The host decides whether the setup requires disclosure.
35. Change the public thread title
Use Thread title in the dashboard.
Changing the title changes the readable slug, but the permanent thread identifier stays the same. Old links redirect to the canonical URL.
This changes the public thread title only; it does not rename the private dashboard record.
Always use this control instead of trying to reconstruct or manually edit the URL.
Part VIII: Ending a game
36. Complete the game
Use Complete game when a win condition has been met.
Choose:
- Winning faction or team
- Or Other result with a custom label
- Optional completion note
- Postgame-discussion length or exact closing time
Then select:
Complete game, announce winner, and open postgame
The bot will:
- Stop the phase clock
- Stop vote processing
- Post the winner announcement
- Open ordinary postgame discussion
- Schedule the thread to close at the selected time
After completion, the dashboard can:
- Change the postgame closing time
- Reopen discussion
- Close discussion immediately
The host must determine when the win condition has been met; the bot does not yet detect it.
37. Cancel a game
Use Cancel game only for abandoned or invalid games.
Cancellation is permanent and closes the linked thread. It is not the normal way to end a successfully completed game.
For unlaunched drafts, cancellation preserves setup and assignment history for auditing but prevents further changes.
Part IX: Safety and recovery
38. Use the dashboard as the source of truth
Do not separately maintain conflicting copies of:
- Roster
- Host list
- Living players
- Phase
- Deadline
- Threshold
- Vote state
- Assignments
Make canonical changes through the dashboard.
Legacy embedded host controls should not be used on dashboard-hosted games.
39. Audit history
The dashboard includes recent activity and a full audit page.
Audit categories include:
- Dashboard views
- Host actions
- Automated actions
Each event records information such as:
- Actor
- Time
- Access basis
- Outcome
- Source
- Relevant non-secret metadata
Secret role assignments and role-PM bodies are not copied into audit metadata.
40. Recover pending operations
Role PM delivery failed
Correct the underlying account problem, then select Retry unsent role PMs.
Launch was interrupted
Select Resume game launch. Do not create a second draft.
Announcement is pending
Select Retry announcement.
Use Dismiss announcement only when you intentionally accept that the public post will never be created. Dismissal cannot be undone.
Thread synchronization is pending
Select Retry thread synchronization before attempting other phase changes.
Scheduled start failed
Use Start Day 1 now or correct the schedule and save it again.
“Game changed in another tab”
Reload the dashboard. The stale form is being rejected to protect newer state.
Authorization or CSRF error after deployment
Reload the page before resubmitting. A form opened before deployment may contain an expired security token.
Administrator cannot access a game
Check whether that administrator is or was a participant in the unfinished game. Participant blocking is intentional.
Host controls are missing
Confirm that:
- The user has Mafia Host permission
- They are the designated main host
- Their approval has not been revoked
- The game is not in a terminal state
- No pending synchronization or announcement is blocking changes
Thread remains locked unexpectedly
Check:
- Current game phase
- Pause status
- Scheduled-start status
- Pending thread synchronization
- Moderator-level locks
A moderator lock overrides ordinary host phase behavior and must be intentionally removed through moderation controls.
Recommended live-game procedure
Before launch
- Confirm the main host and co-hosts.
- Verify every player username.
- Match the role quantity to the roster.
- Preview every custom role PM.
- Confirm team keys and teammate lists.
- Review hidden voting modifiers.
- Randomize only when the setup is final.
- Review assignments privately.
- Finalize assignments.
- Deliver every role PM successfully.
- Use Manual phase control for the first live games.
- Preview the opening post and Day 1 schedule.
During each Day
- Confirm the thread is open.
- Monitor vote history and current wagons.
- Address substitutions or moderation problems through Pause.
- Resolve the Day through the Day-resolution panel.
- Use an override only when host judgment is genuinely required.
- Confirm Night is open and player discussion is locked.
During each Night
- Collect actions privately.
- Resolve actions manually.
- Update living-player status.
- Write the next-Day public message.
- Set the new deadline.
- Begin the next Day.
- Confirm the new Day starts on a fresh page and replies are open.
At game end
- Confirm the actual win condition.
- Choose the winning faction or custom result.
- Add an optional final note.
- Set the postgame-discussion period.
- Complete the game.
- Verify the winner announcement.
- Allow postgame discussion to close automatically or adjust it as needed.
Most important warnings
- Keep assignment screens private.
- Do not rely on the bot to resolve night actions.
- Do not assume reaching majority causes an instant automatic hammer.
- Do not use Cancel for an ordinary game ending.
- Pause before substituting a player.
- Do not manually duplicate a failed launch or PM batch.
- Use the dashboard—not legacy thread controls—as the canonical game record.