Skip to content

Running your own standard set up using existing roles

Chokyotager edited this page Jan 16, 2019 · 9 revisions

Running your own standard set up using existing roles

This part of the guide will inform on how to load your own set-up using existing roles, or a standard set-up. For instructions on how to load a game that has attributes (such as a modular set-up), visit the advanced guide.

Changing general game configurations

configs/game-details.json controls whether or not hammer-lynches. Game night-chat, whispers, fast-forwarding, pre-emptive votes, etc. are available.

Adding IDs of players, and roles

configs/playing.json may look something like this:

{
  "playing": {
    "players": ["1", "2", "3", "4", "5", "6", "7", "8", "9"],
    "roles": ["godfather", "mafioso", "lover", "lover", "sheriff", "doctor", "firefighter", "one_shot_vigilante", "arsonist"],
    "shuffle": true,
    "flavour": null
  }
}

The numbers in playing.players should be replaced with the Discord ID of your players. This is at the time of writing an 18-digit number. It should be enclosed in double inverted commas (").

playing.roles will list the role identifiers in the game. To get a list of all the available roles, look through the source/roles/ folder. The name of the folder is the role identifier.

playing.shuffle covers whether or not the roles will be randomly assigned to the players (through a cryptographically-secure PRNG Fisher-Yates shuffle). If turned off, the first player will always receive the first role in the list (Godfather in this case), and so on.

playing.flavour dictates the flavour of the game. More of this is covered in the in-depth configuration guide.

Initialising the game

Once the configuration is loaded, you may initialise the game by running !_initgame in the Discord server. The rest of the game process is completely automatic and requires no human intervention.

If auto-saves and auto-loading is enabled, the bot will automatically restore the latest save when it is re-booted. This means the bot can be shut down and re-enabled, causing no loss to game progress.

Alternatively, initGame may be keyed into the console directly to kickstart the process.