A QoL FoundryVTT module to improve the harvesting and looting experience.
IMPORTANT NOTE: To make the module work with the requestor module you have to set the module setting of the latter with key Module Permissions with the value Request: Anyone. Accept: Only if GM or self
This work includes material taken from the System Reference Document 5.1 (“SRD 5.1”) by Wizards of the Coast LLC and available at https://dnd.wizards.com/resources/systems-reference-document. The SRD 5.1 is licensed under the Creative Commons Attribution 4.0 International License available at https://creativecommons.org/licenses/by/4.0/legalcode.
It's always easiest to install modules from the in game add-on browser.
To install this module manually:
- Inside the Foundry "Configuration and Setup" screen, click "Add-on Modules"
- Click "Install Module"
- In the "Manifest URL" field, paste the following url:
https://raw.githubusercontent.com/OhhLoz/Harvester/master/src/module.json - Click 'Install' and wait for installation to complete
- Don't forget to enable the module in game using the "Manage Module" button
This module uses the socketlib library for wrapping utility methods. It is a hard dependency
This module uses the requestor library for a better visual display experience for the user. It is a hard dependency
This module uses the Better Rolltables for more flexibility with harvesting. It is an optional dependency and it is recommended for the best experience and compatibility with other modules.
This module uses the Item Piles for convenience with sharing. It is an optional dependency and it is recommended for the best experience and compatibility with other modules.
This action allows the Harvesting action to be linked to a standard rolltable retrieve the result items.
In the standard Harvest Rolltable sheet, the "association" field is the name of the token monster with the name of the rolltable! So "Name of The Monster" === "Name of the Rolltable" (case insensitive).
If you have any doubt about the matching try out the api method and open a issue:
game.modules.get("harvester").api.testWithRegex("Shadow Demon", "Shadow Demon Arcane")) => boolean
The re are two module settings to add some preferences to the search of the term:
- Enable exact match for search on source reference: By default we try to guess with some regex what you want for example (checkout the readme table). IF YOU JUST WANT A EXACT MATCH enable this module settings."
- Enable any suffix match for search on source reference: By default we try to guess with some regex what you want for example (checkout the readme table). Usually 'Shadow Demon Witchguard' and 'Shadow Demon Servant' give the same results so to avoid the duplicate of the rolltables you can enables this module settings and create one RollTable 'Shadow Demon', this will convert the source reference fomr 'Shadow Demon' to 'Shadow Demon(.*?)' for the regular expression check. If you already have set your regular expression DO NOT ENABLE THIS.
IMPORTANT: By default we try to guess with some regex what you want for example if you loot a "Shadow Demon" it will positively validate a rolltable with "Shadow Demon Arcane", but not the reverse and will not validate "Shadow Demon Psych" with "Shadow Demon Arcane", here a table of examples:
| Source | Target | Result |
|---|---|---|
| Shadow | Shadow Demon BBB | true |
| Shadow Demon | Shadow Demon Arcane | false |
| Shadow Demon Arcane | Shadow Demon Arcane | true |
| Shadow Demon Arcane | Shadow Demon | true |
| Shadow Demon BBB | Shadow Demon | true |
| Shadow Demon BBB | Shadow Demon Arcane | false |
| Shadow Demon Warrior | Shadow Demon Arcane | false |
| Shadow Demon Guard | Shadow Demon Arcane | false |
| Shadow Demon Cro | Shadow Demon | true |
| Shadow Demon Witchdoctor | Shadow Demon | true |
| Shadow Demon BBB | (.?)Shadow Demon Arcane(.?) | false |
| Shadow Demon Arcane | (.?)Shadow Demon Arcane(.?) | true |
| Shadow Demon | (.?)Shadow Demon(.?) | true |
| Shadow Demon BBB | (.?)Shadow Demon(.?) | true |
| Shadow Demon Arcane | (.?)Shadow Demon(.?) | true |
Example 1
Name of the monster: Wolf
Name of the rolltable: Wolf or Harvester | Wolf
Result: get any monster 'Wolf' with a BRT Rolltbale with the same name or subset of names 'Wolf'
Example 2
Name of the monster: Wolf
Name of the rolltable: as regex: /^Wolf/ or /^Harvester | Wolf/
Result: get any monster 'Wolf' with a Rolltbale with the same name or subset of names 'Wolf'
REMEMBER YOU MUST PUT THE NEW ROLLTABLE IN THE HARVESTER COMPENDIUM "harvester.harvester" or in the Rolltable directory of the world itself (for now).
This action allows the Harvesting action to be linked to a BRT rolltable retrieve the result items and display it with the "Item Piles" module for retrieval.
Given the various needs there are three modes offeature behavior
- "Keep It or Share It !" : The player decides whether to keep the loot for themself or share it with others
- "Share It" : It is shared with others by default
- "Keep It" : It is kept for itself by default.
This action allows the Looting action to be linked to a rolltable to retrieve the result currencies and display on the chat.
Every rolltable applies inline roll for the currency data on text table result.
NOTE: Every text table result in a type BRT Loot tables is treated as a currencyData formula and converted in a item piles supported formula.
This feature support many format from old and other modules here a list:
- Old brt format:
100*1d6[gp],4d4+4[sp] to 100*1d6gp 4d4+4sp - Harvester format:
[[/r 5d6]]{Copper} and [[/r 1d6*100]]{Electrum}[[/r 2d6*10]] - Old brt loot currency formula:
{(2d8+1)*10[cp], 6d8+3 [sp]} - Html code base with the editor:
<p>100*1d6[gp],4d4+4[sp]</p>,<p>[[/r 5d6]]{Copper} and [[/r 1d6*100]]{Electrum}[[/r 2d6*10]]</p>,<p>{(2d8+1)*10[cp], 6d8+3 [sp]}</p> - Item Piles format (The advisable format to use):
((2d8+1)*10)cp (6d8+3)sp
As a example a text like this:
{(2d8+1)*10[cp], 2d8+1 [sp]}
is converted runtime in this
20cp 16sp
Integration with the module Better Rolltables Feature
In the BRT Harvest Rolltable sheet, the "Source Reference" field is the one used by this module to connect the monster to the rolltable! So "Source Reference" === "Name of The Monster" OR a regex.
Example 1
Name of the monster: Wolf
Source Reference on the BRT rolltable as simple strig: Wolf
Result: get any monster 'Wolf' with a BRT Rolltbale with source reference 'Wolf'
Example 2
Name of the monster: Wolf
Source Reference on the BRT rolltable as regex: /^Wolf/
Result: get any monster 'Wolf' with a BRT Rolltable with source reference stating with the string 'Wolf'
BRT now support multi skill integration, just set an array of skills on the source reference field on the BRT rolltable
and launch the harvester action!
REMEMBER YOU MUST PUT THE NEW ROLLTABLE IN THE BRT COMPENDIUM "better-rolltables.brt-harvest-harvester" or in the Rolltable directory of the world itself (for now).
npm installdev will let you develop your own code with hot reloading on the browser
npm run devbuild will build and set up a symlink between dist and your dataPath.
npm run buildbuild:watch will build and watch for changes, rebuilding automatically.
npm run build:watchprettier-format launch the prettier plugin based on the configuration here
npm run-script prettier-formatlint launch the eslint process based on the configuration here
npm run-script lintlint:fix launch the eslint process with the fix argument
npm run-script lint:fixbuild:json unpack LevelDB pack on src/packs to the json db sources in src/packs/_sourcevery useful for backup your items and manually fix some hard issue with some text editor
npm run-script build:jsonbuild:clean clean packs json sources in src/packs/_source. NOTE: usually this command is launched after the command build:json and after make some modifications on the json source files with some text editor, but before the build:db
npm run-script build:cleanbuild:db packs the json db sources in src/packs/_source to LevelDB pack on src/packs with the new jsons. NOTE: usually this command is launched after the command build:json and after make some modifications on the json source files with some text editor
npm run-script build:dbAny issues, bugs, or feature requests are always welcome to be reported directly to the Issue Tracker
This package is under an GPL-3.0 license and the Foundry Virtual Tabletop Limited License Agreement for module development.
Thanks to anyone who helps me with this code! I appreciate the user community's feedback on this project!
- data-toolbox For providing an easy method for importing items programmatically from a csv to a compendium
- p4535992 For adding Compatibility with Better Roll Tables, Requestor & Ongoing Support/Development
- ctbritt For adding Item Piles integration




