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:
https://raw.githubusercontent.com/OhhLoz/Harvester/master/src/module.json
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:
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
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:
100*1d6[gp],4d4+4[sp] to 100*1d6gp 4d4+4sp
[[/r 5d6]]{Copper} and [[/r 1d6*100]]{Electrum}[[/r 2d6*10]]
{(2d8+1)*10[cp], 6d8+3 [sp]}
<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>
((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
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 install
dev
will let you develop your own code with hot reloading on the browser
npm run dev
build
will build and set up a symlink between dist
and your dataPath
.
npm run build
build:watch
will build and watch for changes, rebuilding automatically.
npm run build:watch
prettier-format
launch the prettier plugin based on the configuration here
npm run-script prettier-format
lint
launch the eslint process based on the configuration here
npm run-script lint
lint:fix
launch the eslint process with the fix argument
npm run-script lint:fix
build:json
unpack LevelDB pack on src/packs
to the json db sources in src/packs/_source
very useful for backup your items and manually fix some hard issue with some text editor
npm run-script build:json
build: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:clean
build: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:db
Any 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!