Register

Beaver's Crafting Module

An Add-on Module for Foundry Virtual Tabletop

Author: AngryBeaver Project: Source Foundry Versions 10+ (Verified 13) Last Updated 1 day, 2 hours ago

This module is for:

by:

in possibly all Systems: (List of adaption layers)

Features

Crafting

potionCrafting.png

full Length Video

Character advancement

img.png

DownTimeActivities

downtime.png

Containers

container.png

TOC

HowTo

Create Recipes

img.png

For this to work you must go to your settings and enter the name of the create Item Dialog. Default is "Create New Item" obviously you need to adapt if you have a different language.

Configure Recipe

configure.png

requires:

you may add required items to your recipe via drag and drop. Required items are not consumed and could be anything from classes to backgrounds.

costs:

You may add costs to your recipe named ingredients. This can either be currency or items You may add items via drag and drop.

tests:

you may add steps or tests that are needed in the process. When adding tests you can define that your progress can fail on certain amount of failed tests. You can configure that costs are consumed or returned when you fail your progress.

Tests consisting of one or more TestSections.

TestSection

In ech TestSection you need to hit a given amount of successes specified by "hits" in the TestSection default is 1.

Each TestSection consist of one or more TestOption you can add as choice . There are up to 4 types of TestOptions.

You can add multiple times the same type of TestOption for example to choose from diffrent skills. Your Recipe can fail if you reach the specified "fails" default is 1. If you set the fails to 0 your recipe can never fail. You can also specify if your costs will get consumed when your recipe fails. e.g. img.png

meaning:

results:

You may add Items, Containers, or RollTables via drag and drop as results of your process.

instruction:

description.png

You may add flavour text to your "recipe". Make sure to hit the save button.

folder:

You may add a folder structure to group your progresses on your actor tab.

macro:

Advanced user may use the optional recipe macro that gets executed during the crafting process. see RecipeMacro

Executing Recipes

On your actor-sheet you will find a new tab.

add

Initially your sheet will be blank except for the add button. you can add a new crafting process by clicking on +Add, which will open the Recipe Compendium.

Recipe Compendium

img.png

or Condition

img.png Some recipe can have "or conditions" for required, cost and result items. You can choose one of those or conditions in the RecipeCompendium.

list

img.png

It lists all your progress with the various recipes you are currently interacting with.

You can show details to each progress by clicking on the progress-name.

advancement

if your recipe has a test/progress involved you can advance it on this tab.

Your process will start by locking the resources needed. you can advance or test your progress by clicking on the progress column:

advance.png

when your progress ends by reaching 100% success you will be rewarded with the results of the recipe. or nothing when you fail.

result

img.png

You will see a chat message with your result

Items updated or created in a successfull crafting process are flagged:

flags.beavers-crafting.isCrafted = true
 

AnyOf

AnyOf is an Item that is intended to be used as ingredient to create recipes that do not need a specific ingredient but any ingredient of... e.g. specific type.

Therefor AnyOf Item has an input field to write a macro code that gets executed when a recipe is checked for its ingredients. The macro has "item" as input and should return boolean as output. The macro will test if the given item meets the conditions of the AnyOf Ingredient.

Example

To understand the intension of this feature you can use this as examples:

return item.name.startsWith("Test") any item that has a name that starts with "Test"

return item.type === "weapon"  any item of type weapon (if weapon is a type in your system) The attributes of item depend on your system. To find out what attributes your item has you can test with console.log(item); return false . When you hit f12 the item document structure should be copied to your logs when ever you test this anyOf.

ItemTags

For people with 0 code experience to better filter the item AnyOf we point out the ItemTags a simple and easy module to use and integrates perfectly with this feature all you have to do is insert the following macro: return ItemTags.Check(item, ['tag1','tag2']) and modify the tag array as you want ['metal','sword'] or ['metal','bow'] etc., major details about this module are on this API this allows you to "draconianly" filter your components with little and definitely more dynamic effort.

test

You can test your AnyOf Conditions by dropping an item in the dropArea and hit the "test item" button.

customize Recipes

When you use a recipe with AnyOf you can customize it and by doing so define what specific ingredients you finally want to use for this recipe.

Drag And Drop

img.png img.png

drag and drop an ingredient (e.g. from your inventar) to "anyOf" ingredient within your recipeCompendium.

Select available

selection.png clicking the AnyOf will popup a multiple choice dialog of available matching items you can choose from.

It will automatically check if that new ingredient is available in that quantity.

none customized AnyOf ingredients will popup a multiple choice dialog of available matching items before starting

reset

when you reselect the recipe it will remove your customization and start over with unconfigured anyOf Items again.

Hooks

beavers-crafting.start

This is fired for all crafting processes directly after all components are selected and before anything is actually processed.

Hooks.on("beavers-crafting.start", (recipe) => {
  console.log(recipe);  
});
 

Parameters

 
 

Settings

Create Beaver's Item Button

In Foundry VTT v12+, you can enable a button in the Item Directory to quickly create Beaver's Crafting items (Recipes and AnyOf).

createItemButton.png

To enable this, go to the module's Setup configuration and check the Add Beaver's Item Button setting.

3.3.x isCrafted flag

This module now tracks a isCrafted flag on items. It will only be usefull if you want a crafting system that needs to differentiate between crafted and non crafted items. E.g. you want to create recipes that will only work with crafted daggers not bought daggers. Per default this setting is disabled. You can enable it in the settings to either full mode or partial mode.

When this feature is enabled crafted items will be marked with an icon.

img.png

Draggable chat result

With this setting the results within your chat messages are draggable. You then can copy the item over to another character.

Limitations

Notes

Currency reorder

When adding costs to your recipe your currency will get exchanged to highest values. You can however turn off currencyExchange then you need to have the exact currency values.

Items reorder

Actor Items will get merged to stacks in the crafting process. (only those that match ingredients or results)

ItemReference

The recipes do not store an item but a reference to the item. You can manipulate your items afterward the recipe always refers to the actual item.

When you create recipes be carefully from where you pull your results/costs/requires items.

Troubleshooting

Dont show "RECIPE" in item menu

Problem:

When creating new Items the drop down menu does not have Recipe or AnyOf.

Explanation:

The module need to detect the window that creates new Items. For this it uses internally the title of that window. If you have the default language the title is most likely "Create New Item".

img.png.

Solution:

Enter the title of your item creation window in the module setup.

image

As of dnd5 v3.x it seems some systems can manipulate the window title to appear different to capture the right window use:

img.png

this will add a bullseye to the header:

img.png

click it this will configure this windows as your Item creation window and will add the new subtypes whenever you reopen it.

Alternative (v12+): If the above methods fail or if you prefer a more direct approach, you can enable the Create Beaver's Item Button in the module's setup. This adds a dedicated button to the Item Directory that skips the need for window detection.

Advanced Explanation:

It is not possible to add a new item subtype into all supported systems, even with this addition since v11. So beavers-crafting fake it by listening to an event that opens windows and when the window is the Item Creation Window it adds item types to the drop down list. Yes that is evil and has high risks to break at somepoint but as said there is no other possiblity. To filter the right window the module uses the title of the window as there is no real good identification.

Credits

Copy organizational structur from midi-qol (gulpfile,package.json,tsconcig.json)

translated to Brazilian Portuguese by Andersants 
translated to French by Michel

Supported Game Systems

  1. Warhammer Fantasy Roleplay 4th Edition

    Latest Version: Version 9.4.1 Last Updated 22 hours, 36 minutes ago
  2. Pathfinder Second Edition

    Latest Version: Version 7.10.1 Last Updated 3 weeks, 3 days ago
  3. Starfinder First Edition

    Latest Version: Version 0.30.1 Last Updated 1 month ago
  4. Fallout: The Roleplaying Game

    Latest Version: Version 11.16.6 Last Updated 1 month, 1 week ago
  5. Dungeons & Dragons Fifth Edition

    Latest Version: Version 5.2.5 Last Updated 1 month, 1 week ago
  6. Savage Worlds Adventure Edition

    Latest Version: Version 5.1.1 Last Updated 1 month, 1 week ago
  7. Cyberpunk RED

    Latest Version: Version v0.92.2 Last Updated 1 month, 2 weeks ago
  8. Level Up: Advanced 5th Edition (Official)

    Latest Version: Version 1.0.17 Last Updated 1 month, 3 weeks ago
  9. Pathfinder 1

    Latest Version: Version 11.9 Last Updated 2 months, 3 weeks ago
  10. Systems Without Number (Stars, Cities, and Ashes)

    Latest Version: Version 2.3.0 Last Updated 3 months, 1 week ago
  11. DnD 4th Edition

    Latest Version: Version 0.6.2 Last Updated 9 months ago
  12. 3.5e for Foundry VTT

    Latest Version: Version 2.4.3 Last Updated 2 years, 2 months ago

Categories

Available Versions

  1. Version 4.6.1

    1 day, 2 hours ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  2. Version 4.6.0

    1 day, 4 hours ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  3. Version 4.5.2

    6 days, 3 hours ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  4. Version 4.5.1

    1 week, 3 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  5. Version 4.5.0

    1 week, 5 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  6. Version 4.4.5

    1 week, 5 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  7. Version 4.4.4

    1 week, 5 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  8. Version 4.4.3

    1 week, 6 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  9. Version 4.4.2

    1 week, 6 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  10. Version 4.4.1

    1 week, 6 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  11. Version 4.4.0

    2 weeks ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  12. Version 4.3.3

    2 weeks ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  13. Version 4.3.2

    2 weeks ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  14. Version 4.3.1

    2 weeks, 1 day ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  15. Version 4.3.0

    2 weeks, 1 day ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  16. Version 4.2.1

    2 weeks, 2 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  17. Version 4.2.0

    2 weeks, 2 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  18. Version 4.1.7

    2 weeks, 3 days ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  19. Version 4.1.6

    2 months, 2 weeks ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  20. Version 4.1.5

    6 months, 1 week ago
    Foundry Version 11+ (Verified 13.347) Manifest URL Read Notes
  21. Version 4.1.4

    6 months, 3 weeks ago
    Foundry Version 11+ (Verified 13.347) Manifest URL Read Notes
  22. Version 4.1.3

    7 months ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  23. Version 4.1.2

    7 months, 1 week ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  24. Version 4.1.1

    8 months ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  25. Version 4.1.0

    8 months, 3 weeks ago
    Foundry Version 11+ (Verified 13) Manifest URL Read Notes
  26. Version 4.0.15

    9 months ago
    Foundry Version 11+ (Verified 13.342) Manifest URL Read Notes
  27. Version 4.0.14

    9 months, 1 week ago
    Foundry Version 11 - 13 (Verified 13.342) Manifest URL Read Notes
  28. Version 4.0.13

    10 months, 3 weeks ago
    Foundry Version 11 - 13.338 (Verified 12) Manifest URL Read Notes
  29. Version 4.0.12

    11 months, 1 week ago
    Foundry Version 11 - 13 (Verified 13.338) Manifest URL Read Notes
  30. Version 4.0.11

    1 year, 1 month ago
    Foundry Version 11 - 13 (Verified 13.333) Manifest URL Read Notes
  31. Version 4.0.10

    1 year, 1 month ago
    Foundry Version 11 - 13 (Verified 13.333) Manifest URL Read Notes
  32. Version 4.0.9

    1 year, 2 months ago
    Foundry Version 11 - 13 (Verified 13.333) Manifest URL Read Notes
  33. Version 4.0.8

    1 year, 2 months ago
    Foundry Version 11 - 13 (Verified 13.333) Manifest URL Read Notes
  34. Version 4.0.7

    1 year, 3 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  35. Version 4.0.6

    1 year, 5 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  36. Version 4.0.5

    1 year, 5 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  37. Version 4.0.4

    1 year, 5 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  38. Version 4.0.3

    1 year, 6 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  39. Version 4.0.1

    1 year, 6 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  40. Version 4.0.0

    1 year, 6 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  41. Version 3.6.2

    1 year, 6 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  42. Version 3.6.1

    1 year, 6 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  43. Version 3.6.0

    1 year, 6 months ago
    Foundry Version 11 - 12 (Verified 12) Manifest URL Read Notes
  44. Version 3.3.3

    2 years, 2 months ago
    Foundry Version 10 - 10 (Verified 10) Manifest URL Read Notes
  45. Version 3.3.2

    2 years, 2 months ago
    Foundry Version 10 - 11 (Verified 11) Manifest URL Read Notes