jun1per Posted May 27 Report Posted May 27 (edited) i've been messing with the new groundcrafting code trying to make in-world weapon and tool disassembling, but noticed that a few items (bows, firestarter, fishing rod, etc) function strangely with the patches i've been using. i suspect it may have something to due with how the "behaviors" section is formatted in the base jsons, but that's just a hunch. if anyone knows more about how the groundcrafting code works or what my patches might be missing please let me know! here's an example photo of a tool i successfully patched: along with the patch i used: Spoiler [ { "op": "addmerge", "path": "/behaviors", "value": [ { name: "GroundStoredProcessable", properties: { processTime: 5, toolDurabilityCostByType: { "axe-scrap-scrap": 7, "*": 2 }, processedStacksByType: { "axe-felling-copper": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-copper", quantity: { avg: 1 } }], "axe-felling-tinbronze": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-tinbronze", quantity: { avg: 1 } }], "axe-felling-bismuthbronze": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-bismuthbronze", quantity: { avg: 1 } }], "axe-felling-blackbronze": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-blackbronze", quantity: { avg: 1 } }], "axe-felling-gold": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-gold", quantity: { avg: 1 } }], "axe-felling-silver": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-silver", quantity: { avg: 1 } }], "axe-felling-iron": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-iron", quantity: { avg: 1 } }], "axe-felling-meteoriciron": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-meteoriciron", quantity: { avg: 1 } }], "axe-felling-steel": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-axe-steel", quantity: { avg: 1 } }], "axe-scrap-scrap": [{ type: "item", code: "game:metalbit-carbonized", quantity: { avg: 3 } }, { type: "item", code: "somedisassemblyrequired:scrapreed", quantity: { avg: 3 } }], "axe-bearded-ruined": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-bearded-ruined", quantity: { avg: 1 } }], "axe-battle-ruined": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-battle-ruined", quantity: { avg: 1 } }], "axe-bardiche-ruined": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-bardiche-ruined", quantity: { avg: 1 } }], "axe-double-ruined": [{ type: "item", code: "somedisassemblyrequired:oldtoolhead-double-ruined", quantity: { avg: 1 } }] }, remainingItemByType: { "*": { type: "item", code: "somedisassemblyrequired:leftovers-wood-none", quantity: 1 }, }, tool: "knife", processingSound: "sounds/block/chop*", interactionHelpCode: "groundstoredaction-disassemble", handbookProcessIntoTitle: "groundstoreddisassembledesc-title", handbookCreatedByTitle: "handbook-createdby-groundstoreddisassembling" } } ], "file": "game:itemtypes/tool/axe-metal.json", "side": "Server" } ] and what the "strange function" with specific items looks like: and the code for that: Spoiler [ { "op": "addmerge", "path": "/behaviors", "value": [ { name: "GroundStoredProcessable", properties: { processTime: 5, toolDurabilityCost: 2, processedStacks: [{ type: "item", code: "game:drygrass", quantity: { avg: 1 } }], remainingItem: { type: "item", code: "game:stick", quantity: 1 }, tool: "knife", processingSound: "game:sounds/block/chop*", interactionHelpCode: "groundstoredaction-disassemble", handbookProcessIntoTitle: "groundstoreddisassembledesc-title", handbookCreatedByTitle: "handbook-createdby-groundstoreddisassmbling" } } ], "file": "game:itemtypes/tool/firestarter.json", "side": "Server" } ] (another thing i've noticed with the improperly functioning tools is that every property works perfectly except for the "processedStacks" and "remainingItem" properties.) Edited May 27 by jun1per Typo
Recommended Posts