https://github.com/multarix/dnd-loot
Generates loot for D&D Hoard/Individual encounters
https://github.com/multarix/dnd-loot
Last synced: 6 months ago
JSON representation
Generates loot for D&D Hoard/Individual encounters
- Host: GitHub
- URL: https://github.com/multarix/dnd-loot
- Owner: Multarix
- License: mit
- Created: 2023-05-24T11:26:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-21T13:54:24.000Z (over 2 years ago)
- Last Synced: 2025-03-09T05:41:11.066Z (11 months ago)
- Language: TypeScript
- Size: 160 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://nodei.co/npm/dnd-loot/)
DnD-Loot is a [Node.js](https://nodejs.org) module that allows you to easily generate loot for individual or hoard encounters.
# **Usage:**
There are two encounter types: `Hoard` & `Individual`.
```js
import { Hoard, Individual } from 'dnd-loot';
const hoardLoot = new Hoard();
const indvidualLoot = new Individual();
```
By passing a number into the constructor, you can specify the challenge rating of the encounter.
If you fail to specify a challenge rating, the loot generation will default to a challenge rating of `0`.
```js
import { Hoard, Individual } from 'dnd-loot';
const challengeRating = 12;
const hoardLoot = new Hoard(challengeRating);
const indvidualLoot = new Individual(challengeRating);
```
If you're unfamiliar with how loot rolling normally works; just because an encounter has a higher challenge rating, doesn't mean it will have better loot.
For example, loot from certain groups of challenge ratings will all result in the same loot calculations.
The groupings are as follows:
- 0 - 4
- 5 - 10
- 11 - 16
- 17+
Of course, on top of this, there is also the RNG to consider when generating loot. Good rolls on a lower grouping may result in better loot than if you had rolled badly on a higher grouping. There is a large amount of variation that can occur.
# Addional Information
If you want details about class methods/ properties please check the [documentation](https://projects.multarix.com/project/loot/).
---
# **Need help?**
If you've encountered a bug or would like to suggest a feature, feel free to create either a pull request or an issue on the [github](https://github.com/Multarix/dnd-loot).