Gatherer

Gatherer

Free
Version: V13
FVTT: V13
Any System
Download
Changelog

    Gather, Hunt and Scavenge with a simple to use, Rollable Table based custom Journal Page. With skill/tool checks, automated uses reset based on time and a minigame option!

    Getting Started

    ℹ️

    Want to start with some already made recipes and gathering points?
    Download the DnD5e Potion Crafting & Gathering (opens in a new tab) module by Action_Jay (opens in a new tab) The module leverages both the Mastercrafted and Gatherer modules. Make sure you install both!

    Creating a Gathering spot

    A Fully setup Gatherer SheetA Fully setup Gatherer Sheet

    Gatherer works with Roll Tables, so before you start create a roll table and drag and drop the items you want for your Gathering Spot in it. Non-item (e.g. Actors) and text entries will be just logged in chat and not added to character inventories.

    To create a gathering spot, follow this steps:

    • Create a new Journal and create a new Gatherer Journal Page in it (or add a Gatherer Journal Page in an existing Journal)
    • Select a Roll table from the drop down menu.
    • Set the extra options you want, for this first tutorial we will use just the basics. We will give this gathering spot a 15 hours reset time and 10 draws (or pulls).
    • The sheet should look like the one in the A Fully setup Gatherer Sheet image
    • Once you saved your Journal Page should look like Gatherer Sheet in View Mode when in view mode

    Interacting with a Gathering spot

    Gatherer Sheet in View ModeGatherer Sheet in View Mode

    You can gather from the sheet by clicking the Gather button!

    • Remember that you need either a token selected or a character assigned to gather
    • As a GM you can manually reset a spot with the Reset button
    • You can drag and drop a Gathering page on a scene as a journal pin as any other journal page

    Recommended Modules

    Configuration Options

    You can configure multiple options for the Gatherer Sheet

    Time

    Specify the time in hours after which the timer and draws are reset. For example, a time of 48 will reset the spot every 2 days. You can use decimal values.

    Draws

    The number of Pulls that can be made from this spot. Draws\Pulls will reset automatically with time or when pressing the Reset button.

    Quantity

    The amount of items that will be gathered from this spot. This value is the same for all items and cannot be customized per item. If you wish to change item chances, you can always weight the table differently. Quantity also evaluates roll expressions. For example 1d6+3 and 3 will both work.

    Require

    Specify item requirements for this gathering, the parameters can be a comma separated list of item names. The actor doing the gathering will need to have ALL the Required items if multiple are specified. Example Fishing Rod,Bait

    Gatherer MinigameGatherer Minigame

    Minigame

    The minigame tag will let the user pick the item to gather instead of leaving it to chance! When using this tag, instead of a table roll, the user will be prompted with a window with items appearing in a random sequence, when the user clicks the button the currently displayed item will be awarded! The time is in milliseconds, e.g. 800.

    Remember that the time you chose is then multiplied by the chance an item has to be drawn from the table, so for example, if an item has 20% chance of being drawn, it's display timer will be 800ms*0.2 = 160ms so make sure to pick an appropriate amount of time!

    And remember, the more you wait to pick the item the faster the minigame will get!

    Note: Leaving this field empty will disable the minigame and use standard table rolling.

    Expression

    A Macro expression that will be evaluated before the gathering. If the expression resolves to false, a Pull will be consumed but no items will be gathered. Example const res = await actor.rollSkill("inv"); return res.total > 15; will roll an investigation check, if the result is higher than 16 the pull will succeed.

    If you wish to cancel a gathering alltogether, return null instead and no pulls will be consumed.

    If you return a number (e.g. const res = await actor.rollSkill("inv"); return res.total) it will be checked against the DCs in the Modifiers section.

    Modifiers

    You can add as many modifiers as you need. If either the roll result or the value returned by the expression is equal to or greater than the DC (using the higher value), the number of items gathered is modified according to the modifier expression. You may include a mathematical operator at the beginning of the modifier; if none is provided, a plus (+) is assumed by default.

    • Example: Modifier: *1d4 - DC: 20, Expression result: 22 multiplies the number of gathered items by 1d4

    Checks (DND5E Only)

    For the DnD5e system, a dropdown with ability/skill checks and tool checks are available with corresponding DC.

    • The tool name is Case Sensitive
    • Failing the check will result in a consumed Pull but no rewards

    Harvesting

    You can gather resources from dead creatures!

    • Open the creature actor sheet
    • Click on the Gatherer Button on top
    • Drag in a Gatherer Page
    • Set a Pulls override (if you want)

    Players will be able to gather resources from that token by pressing Shift + G while having the token Targeted.

    Configuration

    In the game settings you can disable the harvesting feature, as well as set the resource path to check if the creature can be harvested (eg. is dead)

    Advanced

    This section contains APIs for advanced users and developers.

    Macros

    Gather

    You can use the game.modules.get("gatherer").API.gather macro to gather without the need to open the journal.

    /**
     * Gather the journal.
     * @param {string} pageUuid - The uuid of the journal to gather.
     * @param {string} actorUuid - The uuid of the actor to gather for. (optional)
     */
     
    /*EXAMPLE*/
     
    game.modules.get("gatherer").API.gather("JournalEntry.CFn2RzFEskvetNZy.JournalEntryPage.nFcrnFCbWH8wHDPV", "Actor.OcOyw1pt7EKZ1oMC");

    Harvest

    You can use the game.modules.get("gatherer").API.harvestToken macro to harvest a token without the need to open the journal.

    /**
     * Harvest the token.
     * @param {TokenDocument} token - The token to harvest.
     */
     
    /*EXAMPLE*/
     
    game.modules.get("gatherer").API.harvestToken(token);

    Migrate

    You can use the game.modules.get("gatherer").API.migration.showManualMigrationDialog macro to show a migration dialog to the new journal page structure.

    /**
     * Migrate journal pages or compendiums.
     */
     
    /*EXAMPLE*/
     
    game.modules.get("gatherer").API.migration.showManualMigrationDialog(token);

    Hooks

    gathererGather

    The gathererGather hook, fires just before the items are gathered from the table. It receives the following parameters:

    /**
     * Object representing gathered data.
     * @typedef {Object} gathererData
     * @property {Actor} actor - The actor associated with the gathered data.
     * @property {Item[]} items - An array of items associated with the gathered data.
     * @property {number} quantity - The quantity of items in the gathered data.
     */

    Example:

    Hooks.on("gathererGather", (gathererData) => {
        gathererData.quantity *= 2;
        gathererData.actor.update({ "data.attributes.hp.value": 0 });
        gathererData.items = gathererData.items.filter((item) => item.name !== "Rope");
    });