- TypeScript 98%
- HTML 1%
- JavaScript 0.7%
- Dockerfile 0.3%
This pull request introduces support for a new role type, `loric`, across several parts of the codebase. The main changes ensure that `loric` is treated similarly to existing special roles like `fabled` and `travellers` in role definitions, setup logic, script filtering, selection requirements, and UI pluralization. Role definition and handling: * Added `loric` to the `RoleTypes` array and updated the `CharacterInfo` class so that `loric` is considered a special role alongside `fabled` and `travellers`. [[1]](diffhunk://#diff-33f0dcf99a76d4de3eacdb145c7016294a7366caa02d110d3beacc7d1f9fbca7R34) [[2]](diffhunk://#diff-33f0dcf99a76d4de3eacdb145c7016294a7366caa02d110d3beacc7d1f9fbca7L73-R74) Setup and filtering logic: * Modified the `goesInBag` function in `setup.ts` so that characters with the `loric` role type do not go in the bag, matching the behavior for `fabled`. * Updated the `onlyBaseThree` function in `script.ts` to include `loric` as a valid role type for base three scripts. Selection and UI: * Changed the `requiredSelection` function in `selection.ts` so that `loric` roles are always required selections, just like `fabled`. * Updated the `pluralRole` function in `character_sheet.tsx` to treat `loric` as a plural role type for UI display purposes. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: ratteler50 <4249192+ratteler50@users.noreply.github.com> |
||
|---|---|---|
| .github/workflows | ||
| .vscode | ||
| assets | ||
| extra_scripts | ||
| fetch_assets | ||
| hash_password | ||
| homebrew_scripts | ||
| icons | ||
| screenshots | ||
| src | ||
| test | ||
| .babelrc | ||
| .gitignore | ||
| .markdownlint.jsonc | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc.mjs | ||
| docker-compose.yml | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| FEATURES.md | ||
| LICENSE | ||
| package.json | ||
| posthtml-include.d.ts | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
| workbox-config.js | ||
| yarn.lock | ||
BotC storyteller tools
Tools for the storyteller in Blood on the Clocktower, for supporting in-person games.
Role assignment: Select roles for a script and randomize them. Helps set up a game that will otherwise be run from a tablet or a piece of paper.
Night sheet: Generate a good-looking and useful night sheet for a custom script, with instructions for each character, similar in style to the base 3 scripts. These print nicely, with a page for the first night and another for other nights.
Role sheet: A replacement for the script tool's character sheet (for players) that is useful to the storyteller, and a useful replacement for existing options on mobile.
Role assignment features
The highlights are that the tool helps you pick characters and distribute them to players, and it all works offline. The app has all scripts from the unofficial script database. See this detailed list of features for more, as well as some screenshots.
Setting up for development
Install yarn and nvm.
nvm use
yarn install
yarn fetch-assets --json
yarn run check
The project now uses Vite as the default build tool instead of Parcel.
The last command fetches the JSON assets, which are needed for the code to build.
Run yarn run check to run eslint, check formatting, and check types with
TypeScript. Run yarn run fmt to automatically fix formatting with prettier.
Download assets
yarn fetch-assets
This fetches character icons, and all the scripts from https://botcscripts.com - it will take a couple minutes. Running multiple times won't re-download images and scripts. If you want to re-fetch, delete the downloaded assets:
yarn fetch-assets --clean
Running the website
Use yarn start to run a development server.
To build an optimized, static version of the site to dist/, run yarn build.
Testing
There is currently no testing framework setup. This is not intentional, I just haven't set one up. (A contribution that sets up testing would be very useful!)
There is infrastructure for some automated browser screenshots:
yarn test-screenshots
test-screenshots takes some options, run it with yarn test-screenshots --help to see them.
Building and Running with Docker
To build and run the application using Docker, follow these steps:
Build the Docker Image
First, build the Docker image using the provided Dockerfile:
docker build -t botc:latest .
Run the Docker Container
To run the Docker container and map the necessary ports, use the following command:
docker run -p 8000:8000 -it botc:latest
This command maps port 8000 on your host machine to port 8000 in the container, making the application accessible at http://localhost:8000.
Using Docker Compose
Alternatively, you can use Docker Compose to build and run the application. Ensure you have a docker-compose.yml file with the appropriate configuration.
To start the application with Docker Compose, run:
docker-compose up
This will build the image (if not already built) and start the container with the port mappings specified in the docker-compose.yml file.
Stopping the Docker Container
To stop the running Docker container, press Ctrl+C in the terminal where the container is running, or use the following command to stop it gracefully:
docker stop <container_id>
Replace <container_id> with the actual container ID, which you can find using:
docker ps
Acknowledgments and Copyrights
- Blood on the Clocktower is a trademark of Steven Medway and The Pandemonium Institute
- Night reminders and other auxiliary text written by Ben Finney
- Iconography by Font Awesome
- All other images and icons are copyright their respective owners
This project and its website are provided free of charge and are not affiliated with The Pandemonium Institute in any way.