You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/JSON/ITEM_CRAFT_AND_DISASSEMBLY.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Crafting recipes are defined as a JSON object with the following fields:
76
76
"contained":true, // Boolean value which defines if the resulting item comes in its designated container. Automatically set to true if any container is defined in the recipe.
77
77
"container":"jar_glass_sealed", //The resulting item will be contained by the item set here, overrides default container.
78
78
"container_variant":"jar_glass_sealed_strawberry_picture", //The container specified above will spawn as the specified variant, overrides the normal weighted behavior.
79
-
"batch_time_factors":[25, 15], //Optional factors for batch crafting time reduction. First number specifies maximum crafting time reduction as percentage, and the second number the minimal batch size to reach that number. In this example given batch size of 20 the last 6 crafts will take only 3750 time units.
79
+
"batch_time_factors":..., //See below for details
80
80
"charges":2, // Number of resulting items/charges per craft. Uses default charges if not set. If a container is set, this is the amount that gets put inside it, capped by container capacity.
81
81
"result_mult":2, // Multiplier for resulting items. Also multiplies container items.
82
82
"flags": [ // A set of strings describing boolean features of the recipe
@@ -117,6 +117,26 @@ Crafting recipes are defined as a JSON object with the following fields:
117
117
]
118
118
```
119
119
120
+
#### `batch_time_factors`
121
+
122
+
`batch_time_factors supports several formats, with two different scaling functions.
123
+
124
+
Logistic scaling provides savings of some percent once the batch reaches a certain size.
This shows both formats for logistic scaling. The first number specifies the maximum crafting time reduction as a percentage, and the second number the minimal batch size to reach that number. If this recipe took 5000 moves, when made in a batch of 20, the last 5 units would take only 3750 moves to produce.
131
+
132
+
Linear scaling provides purely linear scaling. There are two parameters, the `setup` time `T`, and the max batch size `M`, which is optional. The time taken for a batch of size `n` for a recipe which takes `t` time is: `(ceil(n/M) * T) + (n * (t - T))`. If `M` is not specified, it defaults to n, simplifying to `T + (n * (t - T))`.
133
+
In other words, max does not limit the max batch size, it merely specifies when the setup cost will be applied again.
0 commit comments