2021-02-07 16:01:14 +01:00
|
|
|
# Risk Dice
|
|
|
|
|
2021-02-07 16:32:06 +01:00
|
|
|
An implementation of risk dice as found for example in the Splittermond game
|
|
|
|
system.
|
|
|
|
|
|
|
|
This module provides a new dice type which represents a risk die. Rolling a risk
|
2021-02-07 17:38:05 +01:00
|
|
|
die ist just rolling a number of dice combined with s special way of calculating
|
|
|
|
the total:
|
2021-02-07 16:32:06 +01:00
|
|
|
- If there are either two `1`s or a `1` and a `2` in the results, the total sum
|
|
|
|
is `1 + 1` or `1 + 2` respectively.
|
|
|
|
- Otherwise, the total result is the sum of the 2 highest results.
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
/roll dr # Roll a risk die.
|
|
|
|
```
|
|
|
|
|
|
|
|
![Risk Dice](./risk-dice.png)
|
|
|
|
|
|
|
|
|
2021-02-07 16:01:14 +01:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
To install and use the Risk Dice module for Foundry Virtual Tabletop,
|
|
|
|
simply paste the following URL into the **Install Module** dialog on the Setup
|
|
|
|
menu of the application.
|
|
|
|
|
2021-02-07 16:02:07 +01:00
|
|
|
https://git.f3l.de/ghost/risk-dice/-/raw/latest/src/module.json?inline=false
|
2021-02-07 16:01:14 +01:00
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
|
|
|
In order to build this module, recent versions of `node` and `npm` are required.
|
|
|
|
We recommend using the latest lts version of `node`, which is `v14.15.4` at the
|
|
|
|
time of writing. If you use `nvm` to manage your `node` versions, you can simply
|
|
|
|
run
|
|
|
|
```
|
|
|
|
nvm install
|
|
|
|
```
|
|
|
|
|
|
|
|
in the project's root directory.
|
|
|
|
|
|
|
|
You also need to install the the project's dependencies. To do so, run
|
|
|
|
|
|
|
|
```
|
|
|
|
npm install
|
|
|
|
```
|
|
|
|
|
|
|
|
### Building
|
|
|
|
|
|
|
|
You can build the project by running
|
|
|
|
|
|
|
|
```
|
|
|
|
npm run build
|
|
|
|
```
|
|
|
|
|
|
|
|
Alternatively, you can run
|
|
|
|
|
|
|
|
```
|
|
|
|
npm run build:watch
|
|
|
|
```
|
|
|
|
|
|
|
|
to watch for changes and automatically build as necessary.
|
|
|
|
|
|
|
|
### Linking the built module to Foundry VTT
|
|
|
|
|
|
|
|
In order to provide a fluent development experience, it is recommended to link
|
|
|
|
the built system to your local Foundry VTT installation's data folder. In order
|
|
|
|
to do so, first add a file called `foundryconfig.json` to the project root with
|
|
|
|
the following content:
|
|
|
|
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"dataPath": "<path to your home directory>/.local/share/FoundryVTT"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
On platforms other than Linux you need to adjust the path accordingly.
|
|
|
|
|
|
|
|
Then run
|
|
|
|
|
|
|
|
```
|
|
|
|
npm run link
|
|
|
|
```
|
|
|
|
|
|
|
|
## Contributing
|
|
|
|
TODO
|
|
|
|
|
|
|
|
## Licensing
|
|
|
|
|
|
|
|
This project is licensed under the MIT License, a copy of which can be found
|
|
|
|
under [LICENSE](LICENSE).
|