Skip to content

Commit

Permalink
add CraftingTab
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryBeaver committed Jan 8, 2023
1 parent 0fb1834 commit 684c1ef
Show file tree
Hide file tree
Showing 20 changed files with 461 additions and 166 deletions.
49 changes: 28 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ With this module you can create recipes to craft items. E.g. a bunch of mushroom
![Foundry System](https://img.shields.io/endpoint?url=https%3A%2F%2Ffoundryshields.com%2Fsystem%3FnameType%3Draw%26showVersion%3D1%26style%3Dflat%26url%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2FAngryBeaver%2Fbeavers-crafting%2Fmain%2Fmodule.json)
![Download Count](https://img.shields.io/github/downloads/AngryBeaver/beavers-crafting/total?color=bright-green)

#### possible breaking change! 0.7.1 release
see changelog.md for details.
<!> breaking change 1.x -> 2.x see [Changelog](https://github.com/AngryBeaver/beavers-crafting/blob/main/changelog.md)

## Features
![img.gif](pictures/video.gif)
### Loot subtype Recipe
![img.png](pictures/newItem.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.

Expand All @@ -38,17 +37,23 @@ Advanced user may use the optional recipe macro that gets executed during the cr
see[RecipeMacro](https://github.com/AngryBeaver/beavers-crafting/blob/main/macros.md)

#### Usage
- When you create recipes be carfully from where you pull your results/ingredients items. The recipes do not store an item but a reference to the item.
- When you create recipes be carefully from where you pull your results/ingredients items. The recipes do not store an item but a reference to the item.
- Do not pull items from actor !
- You might pull items form your imported world items, if you do your recipe will work perfectly within your world. You can manipulate your items afterward the recipe always refers to the actual item.
- You can pull items from compendium (preferred). This way your recipe can be exported/imported to other worlds as long as those worlds have the same compendiums.

### Crafting
You can start a crafting process by clicking on a recipe in your inventory
or open the recipe Compendium
You can start a crafting process on the crafting tab of your Charsheet (new 2.x)
![img.png](pictures/craftingTab.png)

Here you can see the results of all previous crafts you did or add a new crafting which will open the recipe Compendium.
Alternatively you can enable Header Buttons in the configuration to open up the recipeCompendium (deprecated 2.x)

#### Recipe Compendium
![img.png](pictures/img.png)

Or can start a crafting process by clicking on a recipe in your inventory (deprecated 2.x)

#### Recipe Compendium
![img.png](pictures/crafting.png)

- list all recipes that you have permission to see for all items in your world (not compendium)
Expand Down Expand Up @@ -90,25 +95,23 @@ When you use a recipe with AnyOf you can customize it and by doing so define wha
- when you reselect the recipe it will remove your customization and start over with anyOf Items again.
- none customized AnyOf ingredients will consume a random fitting ingredient of your inventory.

### Compendiums
This module comes with some example compendiums.
#### Ingredients
![img.png](pictures/ingredients.png)
## Examples
The easiest way to get started with this module is with some examples.

You do not need to import those just drag and drop them into your recipes or use the recipe compendium.
#### Potions
![img.png](pictures/potions.png)
### Ingredients
This module provides a compendium for some example Ingredients, that can be used with your recipes.

![img.png](pictures/ingredients.png)

You do not need to import those just drag and drop them into your recipes or use the recipe compendium.
#### RandomTable
![img.png](pictures/table.png)
### Recipes
You can find some example recipes for potions in the companion module beavers-potions
- Install companion module [Beavers-potions](https://github.com/AngryBeaver/beavers-potions)
- import the recipes into your world
- grant permission to the users you want to have access to it.

You do not need to import those just drag and drop them into your recipes or use the recipe compendium.
#### Recipes
![img.png](pictures/recipes.png)

You need to import them and then grant permission to the users you want to have access to it.
The recipecompendium will only show the recipes the user has access to.
Every Character will now have access to 50+ recipes to brew potions.

### Settings
- You can enable or disable attendants for recipes feature 0.7.x default it is disabled.
Expand All @@ -121,6 +124,10 @@ The recipecompendium will only show the recipes the user has access to.

## Latest features:
have a look at the changelog.md
### 2.1.x actorSheetTab
Crafting is now a tab on ActorSheet that shows the history of your crafting processes.
### 2.0.x extract potions module
The example components have moved to an extra module.
### 1.0.x optional macro
you can further customize your recipes with any additions that are not natively supported for recipes. see [RecipeMacro](https://github.com/AngryBeaver/beavers-crafting/blob/main/macros.md)
### 0.7.x optional attendants
Expand Down
31 changes: 23 additions & 8 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
# Changelog
## 2.0.0 time to craft
## 2.0.x crafting tab on actor
### 2.0.0 breaking change: extract potions module
the example components have changed to an extra module. Previous imported recipes won't work anymore as the resource has moved. You need to import the new recipse from
Beaver's Potions. If you had created own recipes with the example potions referenced from compendium you also have to recreate those recipes and reference the new compendium.
The example components have moved to an extra module.
#### why
- potions are dnd5e only and needed a legal term from wizzards of the costs.
- potions have a lot of dnd5e module dependencies and beavers-crafting is currently developed in a direction to maybe allow another system at somepoint.
- some people just wanted potions content without crafting or crafting without potions.
#### breaking:
Previous imported recipes won't work anymore as the resource has moved.

Why:
- those potions are dnd5e only and needed a legal term from wizzards of the costs.
- those potions have a lot of dnd5e module dependencies and beavers-crafting is currently developed in a direction to maybe allow another system at somepoint.
- there might be people that just wanted potions content without crafting.
-> You need to import the latest recipse from Beaver's Potions.

Own recipes that produc the example potions referenced from compendium will not work anymore.

-> delete old potion in recipe and reference new compendium.
### 2.0.1 fix: rerender Recipe Compendium
fixed: when the recipes button is pressed while the window is somewhere open the window will does not popup to front and also does render blank content.
### 2.1.0 feature: Crafting Tab on Actor
### 2.1.0 feature: Crafting tab on actor
Crafting is now a tab on ActorSheet that shows the history of your crafting processes.
Crafting process can now be serialized and deserialized and thus be stored next to the actor initiating the craft process.
This is the core implementation that will allow future features like time to craft and crafting as downtime process with multiple checks.

### 2.1.1 fix: referenced ingredients
fixed: when you do not have given ingredient crafting required the ingredient reference to be valid.
### 2.1.2 fix: dnd5e dependent money exchange.
add: system independent money exchange, any system may be implement against an interface.
add: dnd5e exchange implementation.


## 1.0.x macros
Expand Down
8 changes: 8 additions & 0 deletions css/crafting.css
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,11 @@
margin: 0px 5px 10px;
flex:0 0 30px;
}


.beavers-crafting .crafting-item-img{
background-size: contain;
margin: 5px;
width:20px;
height:20px;
}
7 changes: 6 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"name": "Name",
"status": "Status",
"add": "+ Add",
"ingredients": "Ingredients"
"input": "input",
"output": "output"
}
},
"inventory": {
Expand Down Expand Up @@ -71,6 +72,10 @@
"name": "Configure tools available",
"hint": "Configure list of tools that are available in tool dropdown when creating recipes",
"label": "configure"
},
"addHeaderLink": {
"name": "Add Recipe Link on ActorSheet Header",
"hint": "Too many modules polute the Header area of sheets, in some worlds i have problems to find a blank space to drag."
}
},
"tool-config": {
Expand Down
2 changes: 1 addition & 1 deletion macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ parameter:

````javascript
interface Currency {
name: "pp"|"gp"|"ep"|"sp"|"cp";
name: string; //Dnd5e "pp"|"gp"|"ep"|"sp"|"cp"
value: number;
}
````
Expand Down
16 changes: 2 additions & 14 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Beaver's Crafting System",
"description": "A Crafting Module for DnD",
"id": "beavers-crafting",
"version": "1.0.1",
"version": "2.1.2",
"authors": [
{
"name": "angryBeaver",
Expand All @@ -16,8 +16,6 @@
"path": "lang/en.json"
}
],
"scripts": [
],
"esmodules": [
"src/main.js"
],
Expand Down Expand Up @@ -45,17 +43,7 @@
"compatibility": {
"verified": "2.0.0"
}
}],
"requires": [
{
"id": "beavers-potions",
"type": "module",
"manifest": "https://github.com/AngryBeaver/beavers-potions/releases/latest/download/module.json",
"compatibility": {
"verified": "1.0.7"
}
}
]
}]
},
"compatibility": {
"minimum": "10",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "beavers-crafting",
"title": "Beaver's Crafting",
"version": "1.0.1",
"version": "2.1.2",
"description": "Crafting",
"devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules",
"main": "src/main.js",
Expand Down
Binary file modified pictures/crafting.png
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 pictures/craftingTab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pictures/result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 684c1ef

Please sign in to comment.