LibreWolf is a version of party game called Werewolf or sometimes Mafia or Mafioso. It's a game where each of the players are given a role that only the player knows.
The story of the game is set in a Dark Ages when there was still a pinch of magic and trifle of mysticism in the world. There's horrible things happening in a small town. Villagers are being found dead in the morning. Every clue hints to werewolves, but which ones of the villagers are werewolves? Villagers have to find out the guilty ones and get rid of them by hook or by crook until it's too late.
- Head to the Releases section and print the latest .pdf file!
- Invite lots of friends
- At the end of the printed pdf you get a bunch of playing cards. Grab a pair of scissors and work on them while waiting for your friends.
- Read the game instructions while still waiting for your friends to arrive.
- Do as the instructions tell you to and have fun while playing LibreWolf with all the friends that showed up!
Note that you don't have to install anything in order to just play the game. Just download and print the pdf, cut some cards and have a go! Check out the "I only want to play" section for that. Installation is needed if you wish to change something in this game.
-
Clone the repository
With ssh:
$ git clone git@github.com:Zachu/LibreWolf.gitWith https:
$ git clone https://github.com/Zachu/LibreWolf.git -
Install dependencies
$ composer install -
Start a web server and point it to the cloned directory
-
Go to your web URL
Size and orientation
defaults:
paperSize: a4
orientation: portrait
URL: paperSize=a4&orientation=portrait
config.php:
'default' => [
'paperSize' => 'a4',
'orientation' => 'portrait',
]You can specify more options at config.php:
'role_count' => [
'a4' => [ // paperSize
'portrait' => [3, 3], // number of cards in row, number of rows
'landscape' => [4, 2], // number of cards in row, number of rows
],
]Language
defaults:
lang: fi
URL: lang=fi
config.php:
'default' => [
'lang' => 'fi',
]Languages are specified in lang/ directory under a language shorthand.
The directory structure is following:
fi
├───roles //Rolenames and order are specified in config.php section roles
│ alphawolf.php
│ bearded_lady.php
│ blacksmith.php
│
...
│
├───rules
└───templates //Templates can be used in role or rule files
villager.php
werewolf.php
Structure of template file:
<?php return [
'team' => 'Villager',
'description' => 'During a day figure out with other villagers who are the werewolves, and get rid of them before it is too late!',
];Structure of role file:
<?php return [
'template' => 'villager',
'team' => 'Villager',
'name' => 'Seer',
'description' => 'During a day figure out with other villagers who are the werewolves, and get rid of them before it is too late!',
'special' => 'Once a night you can see if a player is a werewolf.',
'info' => 'Gamemaster shows you yes-sign if your inquiry hits a werewolf.',
];team: Which team the role belongs to. name: The name of the role. special: A special ability of the role. Not required. description: A common goal for the role to achieve. template: Specify a template that the role file extends. info: Additional information about how the role works. wakeup_phase: Information for when the role wakes up at night. This is used to generate the gamemasters helper table. Wakeup phases:
- 0: Do not wake up at night. This is the default.
- Positive integers: Wake up at night. Start from 1 and continue increasing. Multiple roles can be at the same wakeup_phase, like for example all the wolves are.
Common usage of the templates:
<?php return [
'team' => 'Villager',
'description' => 'During a day figure out with other villagers who are the werewolves, and get rid of them before it is too late!',
];So the role file could be reduced to:
<?php return [
'template' => 'villager',
'name' => 'Seer',
'special' => 'Once a night you can see if a player is a werewolf.',
'info' => 'Gamemaster shows you yes-sign if your inquiry hits a werewolf.',
];You can just print the webpage to a PDF file.
Or with Chrome or Chromium 59 installed (for headless support):
chromium-browser --headless --disable-gpu http://{URL_TO_LibreWolf}/
After checking out a certain tag, you can name the output file accordingly:
$ BUILDLANG="fi" && BUILDVER=$(git describe --exact-match --tags $(git log -n1 --pretty='%h')) && chromium-browser --headless --disable-gpu --print-to-pdf="dist/LibreWolf-${BUILDVER}-${BUILDLANG}.pdf" http://localhost/LibreWolf/?lang=${BUILDLANG}