This repository has been archived on 2023-06-20. You can view files and clone it, but cannot push or open issues or pull requests.
risk-dice-modifier/README.md

109 lines
2.7 KiB
Markdown
Raw Normal View History

2021-06-05 00:52:11 +02:00
<!--
SPDX-FileCopyrightText: 2021 Johannes Loher <johannes.loher@fg4f.de>
SPDX-License-Identifier: MIT
-->
# Risk Dice Modifier
2021-02-07 16:01:14 +01:00
An implementation of risk rolls as found for example in the Splittermond game
2021-02-07 16:32:06 +01:00
system.
This module provides a new dice modifier `ri` for regular Dice. This modifier
causes the dice roller to keep / drop dice according to the following rules:
- If there are either two `1`s or a `1` and a `2` in the results, keep only
these dice.
2021-02-07 19:08:26 +01:00
- Otherwise, keep the two dice with the highest results.
2021-02-07 16:32:06 +01:00
```
2021-02-07 19:40:50 +01:00
/roll 4d10ri # Roll 4d10 in risk die mode
2021-02-07 16:32:06 +01:00
```
![Risk Dice Modifier](./risk-dice-modifier.png)
2021-02-07 16:01:14 +01:00
## Installation
To install and use the Risk Dice Modifier module for Foundry Virtual Tabletop,
2021-02-07 16:01:14 +01:00
simply paste the following URL into the **Install Module** dialog on the Setup
menu of the application.
https://git.f3l.de/ghost/risk-dice-modifier/-/raw/latest/src/module.json?inline=false
2021-02-07 16:01:14 +01:00
## Development
### Prerequisites
2021-02-16 04:06:43 +01:00
In order to build this module, recent versions of `node` and `yarn` are required.
2021-02-07 16:01:14 +01:00
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
```
2021-02-16 04:06:43 +01:00
yarn install
2021-02-07 16:01:14 +01:00
```
### Building
You can build the project by running
```
2021-02-16 04:06:43 +01:00
yarn build
2021-02-07 16:01:14 +01:00
```
Alternatively, you can run
```
2021-02-16 04:06:43 +01:00
yarn build:watch
2021-02-07 16:01:14 +01:00
```
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:
```
{
2021-05-23 02:46:03 +02:00
"dataPath": "<path to your home directory>/.local/share/FoundryVTT/Data"
2021-02-07 16:01:14 +01:00
}
```
On platforms other than Linux you need to adjust the path accordingly.
Then run
```
2021-02-16 04:06:43 +01:00
yarn link-project
2021-02-07 16:01:14 +01:00
```
## Licensing
2021-06-05 00:52:11 +02:00
This project is being developed under the terms of the [LIMITED LICENSE
AGREEMENT FOR MODULE DEVELOPMENT](https://foundryvtt.com/article/license/) for
Foundry Virtual Tabletop.
The project itself is licensed under multiple licenses. It is difficult to keep
this section up to date, so here is a brief summary as of June 2021:
* Files under `.yarn/` are from [yarn] and licensed under the [BSD-2-Clause]
license.
* Images are licensed under the [CC-BY-4.0] license.
* Other files are licensed under the [MIT] license.
For more accurate information, check the individual files.
[BSD-2-Clause]: LICENSES/BSD-2-Clause.txt
[CC-BY-4.0]: LICENSES/CC-BY-4.0.txt
[MIT]: LICENSES/MIT.txt
[yarn]: https://github.com/yarnpkg/berry