Skip to content

Running your own standard set up using existing roles

Chokyotager edited this page May 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"],

    "expansions": [],
    "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 (").

Psst: ever since Foxflower 1.0, you may set playing.players to "auto" ("players": "auto"). This will automatically load in players with the pre role as defined in configs/permissions.json - this means you can assign the players who are participating the respective role, and have the bot automatically load them in!

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.

Loading expansion packs

Loading expansion packs involves just adding the folder name of the expansion pack under playing.expansions. You may load in multiple expansion packs at once, the bot reads the array from left to right. Expansion packs can be added/removed at /expansions.

If the expansion pack you are loading has dependencies, it should automatically load them without you specifying in the playing.expansions field so long as the pack is installed in the /expansions folder.

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.