Line 481: |
Line 481: |
| | | |
| ===Custom machines=== | | ===Custom machines=== |
− | You can now add/edit machine logic by editing the <samp>Data/Machines</samp> asset. This consists of a string → model lookup, where the key matches the <samp>ID</samp> field and the value is a model with these fields: | + | You can now add/edit machine logic by editing the <samp>Data/Machines</samp> asset. |
| | | |
− | ====Required fields====
| + | This consists of a string → model lookup, where... |
− | {| class="wikitable"
| + | * The key is the The [[#Custom items|qualified or unqualified item ID]] for the item which acts as a machine (like <samp>(BC)127</samp> for [[The Cave|mushroom boxes]]). If a machine has two entries, the ''unqualified'' ID takes priority. To avoid mod conflicts, '''custom machines should always use unqualified item IDs''' (since custom IDs should already be unique). |
− | |-
| + | * The value is a model with the fields listed below. |
− | ! field
| |
− | ! effect
| |
− | |-
| |
− | | <samp>ItemId</samp>
| |
− | | The [[#Custom items|qualified or unqualified item ID]] for the item which acts as a machine (like <samp>(BC)127</samp> for [[The Cave|mushroom boxes]]).
| |
− | | |
− | If a machine has two entries, the ''unqualified'' ID takes priority. To avoid mod conflicts, '''custom machines should always use unqualified item IDs''' (since custom IDs should already be unique). | |
− | |}
| |
| | | |
| ====Item processing rules==== | | ====Item processing rules==== |
Line 569: |
Line 561: |
| |} | | |} |
| |- | | |- |
− | | <samp>MinCount</samp><br /><samp>MaxCount</samp> | + | | <samp>MinStack</samp> |
− | | ''(Optional)'' The minimum and maximum number of this item produced. A value in this range will be chosen randomly each time it's produced. If the maximum is set to <samp>-1</samp>, it'll match the minimum automatically. Defaults to 1 (minimum) and -1 (maximum). | + | | ''(Optional)'' The item's stack size when it's produced. Default -1, which keeps the value set by the item query (usually 1). |
| + | |- |
| + | | <samp>MaxStack</samp> |
| + | | ''(Optional)'' If set to a value higher than <samp>MinStack</samp>, the stack is set to a random value between them (inclusively). |
| + | |- |
| + | | <samp>ToolUpgradeLevel</samp> |
| + | | ''(Optional)'' The initial upgrade level for the tool to produce (like [[Axes|Copper vs Gold Axe]], or [[Training Rod]] vs [[Iridium Rod]]). This is ignored for non-tool items. Default 0. |
| + | |- |
| + | | <samp>IsRecipe</samp> |
| + | | ''(Optional)'' Whether to add the crafting/cooking recipe for the item when it's collected, instead of the item itself. Default false. |
| |- | | |- |
| | <samp>Quality</samp> | | | <samp>Quality</samp> |
Line 580: |
Line 581: |
| | <samp>PreserveId</samp> | | | <samp>PreserveId</samp> |
| | ''(Optional)'' The produced item's preserved unqualified item ID, if applicable. For example, [[Wine|blueberry wine]] has its preserved item ID set to the [[blueberry]] ID. This can be set to <samp>DROP_IN</samp> to use the input item's ID. Default none. | | | ''(Optional)'' The produced item's preserved unqualified item ID, if applicable. For example, [[Wine|blueberry wine]] has its preserved item ID set to the [[blueberry]] ID. This can be set to <samp>DROP_IN</samp> to use the input item's ID. Default none. |
− | |-
| |
− | | <samp>AddPrice</samp><br /><samp>MultiplyPrice</samp>
| |
− | | ''(Optional)'' Numeric changes applied to the produced item's price, which is calculated as <samp>AddPrice + (MultiplyPrice × normal price)</samp>. These default to 0 (<samp>AddPrice</samp>) and 1 (<samp>MultiplyPrice</samp>).
| |
| |- | | |- |
| | <samp>Condition</samp> | | | <samp>Condition</samp> |
Line 595: |
Line 593: |
| | <samp>IncrementMachineParentSheetIndex</samp> | | | <samp>IncrementMachineParentSheetIndex</samp> |
| | ''(Optional)'' Whether to increment the machine's spritesheet index by one while it's processing this output. This stacks with the <samp>ShowNextIndexWhenLoaded</samp> field (''i.e.'' setting both to true will increment the index by two). Default false. | | | ''(Optional)'' Whether to increment the machine's spritesheet index by one while it's processing this output. This stacks with the <samp>ShowNextIndexWhenLoaded</samp> field (''i.e.'' setting both to true will increment the index by two). Default false. |
| + | |- |
| + | | <samp>QualityModifiers</samp><br /><samp>StackModifiers</samp> |
| + | | ''(Optional)'' [[#Quantity modifiers|Quantity modifiers]] applied to the <samp>Quality</samp> or <samp>Field</samp> field. The modifier conditions can use item-only tokens, which will check the ''input'' (not output) item. For <samp>QualityModifiers</samp>, the operations are performed on the numeric quality values: <samp>0</samp> (normal), <samp>1</samp> (silver), <samp>2</samp> (gold), or <samp>4</samp> (iridium). |
| + | |- |
| + | | <samp>QualityModifierMode</samp><br /><samp>StackModifierMode</samp> |
| + | | ''(Optional)'' A [[#Quantity modifiers|quantity modifier mode]] which indicates what to do if multiple modifiers apply at the same time. Default <samp>Stack</samp>. |
| |- | | |- |
| | <samp>OutputMethod</samp> | | | <samp>OutputMethod</samp> |
Line 647: |
Line 651: |
| |} | | |} |
| |- | | |- |
− | | <samp>QualityModifiers</samp><br /><samp>QuantityModifiers</samp><br /><samp>ReadyTimeModifiers</samp> | + | | <samp>ReadyTimeModifiers</samp> |
− | | ''(Optional)'' [[#Quantity modifiers|Quantity modifiers]] applied to the produced item's processing time, quality, or stack size. The modifier conditions can use item-only tokens, which will check the ''input'' (not output) item. For <samp>QualityModifiers</samp>, the operations are performed on the numeric quality values: 0 (normal), 1 (silver), 2 (gold), or 4 (iridium). | + | | ''(Optional)'' [[#Quantity modifiers|Quantity modifiers]] applied to the produced item's processing time. The modifier conditions can use item-only tokens, which will check the ''input'' (not output) item. |
| |- | | |- |
− | | <samp>QualityModifierMode</samp><br /><samp>QuantityModifierMode</samp><br /><samp>ReadyTimeModifierMode</samp> | + | | <samp>ReadyTimeModifierMode</samp> |
| | ''(Optional)'' A [[#Quantity modifiers|quantity modifier mode]] which indicates what to do if multiple modifiers apply at the same time. Default <samp>Stack</samp>. | | | ''(Optional)'' A [[#Quantity modifiers|quantity modifier mode]] which indicates what to do if multiple modifiers apply at the same time. Default <samp>Stack</samp>. |
| |} | | |} |