Skip to content

Commit

Permalink
add TimeToCraft
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryBeaver committed Jan 10, 2023
1 parent 684c1ef commit 93dde02
Show file tree
Hide file tree
Showing 17 changed files with 615 additions and 265 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ see[RecipeMacro](https://github.com/AngryBeaver/beavers-crafting/blob/main/macro
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.
Here you can see all crafting process you are acutally in or that are completed.
#### +add
you can add a new crafting process by clicking on +Add, which will open the recipe Compendium.
#### timeToCraft
When you have configured TimeToCraft to interaction. Your crafting process will start by locking the resources needed.
You then can click in the status field to finalize the crafting process.
This will grant your results and maybe unlocks your resources if they are not consumed in the process.


Alternatively you can enable Header Buttons in the configuration to open up the recipeCompendium (deprecated 2.x)

![img.png](pictures/img.png)
Expand Down Expand Up @@ -124,6 +132,8 @@ Every Character will now have access to 50+ recipes to brew potions.

## Latest features:
have a look at the changelog.md
### 2.2.x timeToCraft
Crafting is now a process that can be started and finalized
### 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
Expand Down
46 changes: 33 additions & 13 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog
## 2.0.x crafting tab on actor
## 2.2.x feature: Time To Craft
### 2.2.0 feature: Time To Craft
Crafting becomes a process that you start when clicking on the RecipeCompendium.
The crafting process starts by consuming all resources and fireing up the advanced macro but without granting the results.
When you decide the time to craft is ready you can process the crafting by clicking on the status of the process.
Now the skill check if any is executed and the crafting might end in success or fail. You will get your results and locked resources are freed up if the crafting process allows so.

You can configure the timeToCraft behaviour in the settings section.
Interaction is default it will start the process and waits until you finish the process with your action.
Instantly will switch back to previous mode. you can craft with one click instantly.

#### Time To Craft vs world time automation
E.g. you start the recipe and when the worldtime is advanced by an amount given in the recipe, the crafting completes.

In this first draft I decided against this! As crafting is a downtime activity and passing time does not automatically mean you spend the time on crafting, you might sleep or run for you live from monsters, who knows.


## 2.1.x feature: Crafting tab on actor
### 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.

### 2.1.1 fix: referenced ingredients
fixed: when you do not have given ingredient crafting required the ingredient reference to be valid.

### 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.0.x breaking change: extract potions module
### 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.0.0 breaking change: extract potions module
The example components have moved to an extra module.
#### why
Expand All @@ -14,18 +46,6 @@ Previous imported recipes won't work anymore as the resource has moved.
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
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
25 changes: 25 additions & 0 deletions css/crafting.css
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,29 @@
margin: 5px;
width:20px;
height:20px;
}

.beavers-crafting .processing{
background-image: repeating-linear-gradient(
-45deg,
hsl(400,90%,50%) 0%, /* orange */
hsl(400,90%,50%) 4%,
hsl(120,0%,50%,0%) 4%, /* grau */
hsl(120,0%,50%,0%) 8%, /* grau */
hsl(400,90%,50%) 8%, /* orange */
hsl(400,90%,50%) 12%,
hsl(120,0%,50%,0%) 12%, /* grau */
hsl(120,0%,50%,0%) 16% /* grau */
);
animation-name: beavers-crafting-diagonal;
animation-duration: 40s;
animation-direction: reverse;
animation-iteration-count: infinite;
animation-timing-function: linear;
background-size: 400% 100%;
}

@keyframes beavers-crafting-diagonal {
0% {background-position: 0% 50%}
100% {background-position: 95% 50%}
}
20 changes: 14 additions & 6 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"name": "Name",
"status": "Status",
"add": "+ Add",
"input": "input",
"output": "output"
"input": "Resources",
"output": "Results"
}
},
"inventory": {
"type" : "Type",
"type": "Type",
"title": "Inventory"
},
"recipe": {
Expand All @@ -26,7 +26,7 @@
"currency": "Cost",
"consumeOnFailedSaveHint": "Consumes Cost on failed Skill check",
"attendants": "Attendants",
"macro":{
"macro": {
"button": "save"
}
},
Expand Down Expand Up @@ -74,8 +74,16 @@
"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."
"name": "ActorSheetLink",
"hint": "This will add a recipe link on the ActorSheet. Optional since 2.0.x as too many modules polute the Header area of sheets, in some worlds i have problems to find a blank space to drag."
},
"timeToCraft": {
"name": "TimeToCraft",
"hint": "TimeToCraft is used to track the time a crafting process needed. Instantly will not use any time and will instantly finish the process. Interaction will process when the user interacts with the process.",
"choices": {
"instantly": "instantly",
"interaction": "interaction"
}
}
},
"tool-config": {
Expand Down
2 changes: 1 addition & 1 deletion 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": "2.1.2",
"version": "2.2.0",
"authors": [
{
"name": "angryBeaver",
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": "2.1.2",
"version": "2.2.0",
"description": "Crafting",
"devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules",
"main": "src/main.js",
Expand Down
Binary file modified 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.
Loading

0 comments on commit 93dde02

Please sign in to comment.