Skip to content

Commit

Permalink
docs: Update for 0.8.5 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
misterpotts authored Mar 22, 2023
1 parent 45f040d commit 745a517
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Fabricate 0.8.3
title: Fabricate 0.8.5
email: [email protected]
description: >-
End user documentation for the Foundry Virtual Tabletop (VTT) Module, "Fabricate".
Expand Down
3 changes: 2 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ const myComponent = craftingSystem.getComponentById(myComponentId);
console.log(`Before modification: ${myComponent}`);
const componentData = myComponent.toJson();
componentData.salvageOptions["My new Salvage Option"] = { "rLP3cTCTnQsxddDt": 1 } // Adds a new salvage option
componentData.essences["bGfx37pYjqlf812"] = 3; // Adds an essence with a quantity of 3
// perform any other modifications you want here. You can alter any of the fields in the `CraftingComponentJson`,
// including the item UUID. The new values meet the requirements specified in the interface.
const updatedComponent = await craftingSystem.mutateComponent(myComponent.id, componentData);
Expand Down Expand Up @@ -385,7 +386,7 @@ CraftingSystem#deleteComponentById

<details open markdown="block">
<summary>
Modifying a component
Deleting a component
</summary>

```js
Expand Down
2 changes: 1 addition & 1 deletion docs/components/salvaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Click that, and Fabricate will open a dialogue that prompts you to confirm your
Click “Yes” and Fabricate will remove the salvaged component (or decrement its quantity, depending on the game system).
Then, it will add the salvage results to your inventory.

You can skip the confirmation dialogue by holding the shift key when you click the delete button.
You can skip the confirmation dialogue by holding the shift key when you click the salvage button.
This is particularly useful when you have a lot of the same type of item to salvage.

![](/fabricate/img/salvage-a-component.gif)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/craft-a-recipe.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/manage-recipe-essences.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/multiple-recipe-options.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ Fabricate is currently maintained by [MisterPotts].
Use the left navigation, as well as the search at the top of this page, to learn how to build your own crafting systems using Fabricate.
Read on below to find out more about this module and how to support its development.

## Known issues

{: .highlight }
> This section lists the known issues with this version of Fabricate
### Items with existing source IDs

**Impact**: Fabricate does not recognise your items when they are owned by actors

**Discovered when:** Users were importing items from compendiums created with the [FVTT Data toolbox](https://github.com/SvenWerlen/fvtt-data-toolbox)

**Caused by:** Imported items already had a `core.sourceId` flag set which pointed to a different item, or nothing.
Foundry copies this, preserving it for all items created from the original.
Fabricate expects you to have manually created or duplicated the items, and for the `sourceId` to be set for the first time when you import
or add the item to an actor's inventory.

**The fix:** Edit your compendium to remove any existing core flags (back up your data first!).
Then, re-create the items owned by actors that should be part of your crafting system.

## Embedded crafting systems

The following crafting systems come pre-installed with Fabricate.
Expand Down
16 changes: 16 additions & 0 deletions docs/recipes/crafting.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ Crafting is the fundamental activity for any RPG crafting system, perhaps unsurp

## Crafting a Recipe

If an item owned by an actor is a Fabricate recipe, the crafting icon will appear in the item sheet header bar.
Click that button on an open item sheet to open the recipe crafting app.

If the recipe has multiple salvage options, you will be able to select an option.
If not, you will see only the one option.
You can click the recipe requirements and results to open their item sheets to see more details, before you make the decision to craft the recipe (or not).

To craft the recipe, just click the "Craft" button in the top right of the recipe crafting app.
Click that, and Fabricate will open a dialogue that prompts you to confirm your decision.
Click “Yes” and Fabricate will remove the consumed components from your inventory (or decrement their quantity, depending on the game system).
Then, it will add the recipe results to your inventory.

You can skip the confirmation dialogue by holding the shift key when you click the craft button.
This is particularly useful when you want to craft the same recipe multiple times.

![](/fabricate/img/craft-a-recipe.gif)
44 changes: 43 additions & 1 deletion docs/recipes/editing.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,46 @@ Make sure that you've selected the crafting system you want to add the recipes t
Then, simply drag and drop the items into the drop zone beneath "Add a recipe to `{my system}`".
Fabricate will add the recipe to the crafting system and display a notification confirming it was successfully added.

![](/fabricate/img/adding-recipes.gif)
![](/fabricate/img/adding-recipes.gif)

## Adding recipe ingredients, catalysts and results

A recipe needs results to produce something when crafted.
Most simple recipes require a specific set of ingredients, and may also require catalysts to be present.

To add these to your recipe, find the recipe in the recipe browser.
Then, click the "Edit" button.
This will open the recipe editor.
Once here, you can drag and drop components from the available components in the right column, to the requirements option on the left.
You can choose to add the component as a catalyst, or an ingredient.

Dragging another of the same component will **increase** the quantity.
However, the quickest way to do that is to left-click a component already present in the salvage option.
You can **reduce** the quantity of components and remove them from requirements by right-clicking (or shift-clicking) them.

To manage results, simply switch to the results tab and do the same.

![](/fabricate/img/adding-recipe-requirements-and-results.gif)

## Multiple requirement and result options

You can specify multiple options for recipe requirements, as well as results.
This will provide players with a choice when salvaging the component.

To add anew option for either requirements or results, simply click "New" next to the current option.
Then, drag and drop a component into the drop zone to create an additional option.
You can edit this option in the same way as others.
You can rename options, changing the text that is displayed to players when choosing between them.
Additionally, you can remove an option by clicking "Delete" to the right of the option name.

![](/fabricate/img/multiple-recipe-options.gif)

## Manage recipe essences

You can add and remove your crafting system's [essences](/fabricate/essences) from a recipe's requirements easily.
Just open up the recipe editor and scroll down to the "Essences" section.
Use the "+" (plus) and "-" (minus) buttons to the left and right of each essence name to increment or decrement the quantity required by the recipe.
These essences are required in addition to any catalysts and specific ingredients.
However, they maybe sourced from any components in the actor's inventory.

![](/fabricate/img/manage-recipe-essences.gif)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fabricate",
"version": "0.8.4",
"version": "0.8.5",
"description": "A system-agnostic, flexible crafting module for FoundryVT",
"main": "index.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/public/module.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "fabricate",
"title": "Fabricate",
"version": "0.8.4",
"version": "0.8.5",
"description": "A system-agnostic, flexible crafting module for FoundryVTT",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/crafting/attempt/CraftingAttempt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DefaultCraftingAttempt implements CraftingAttempt {

get consumedComponents(): Combination<CraftingComponent> {
return this._componentSelection.essenceSources
.combineWith(this._componentSelection.ingredients.actual);
.combineWith(this._componentSelection.ingredients.target);
}

}
Expand Down

0 comments on commit 745a517

Please sign in to comment.