How can I gather the ItemIDs of each item used to crafting an item (the recipe)? Right now the json data files in C:\rust\bundles\items\ folder show InstanceIDs for some reason and not ItemIDs. Would appreciate any help here.
Getting the ItemID for all items' recipes
All item ID's here
For recipes - needs to create script that will check every item for resource cost craft
For recipes - needs to create script that will check every item for resource cost craft
Hi Orange,
Thanks for the response. I don't think I understand your response. Creating a script that will check every item for resource cost? I cannot seem to get access to craftable item's actual component list. What's available in the recipe blob is an InstanceID which has no correlation to the component (just the amount, as a KVP)
If you're saying I should write a script that infers from this, yes over time, we could figure it out, but should anything every change it would take forever to do so. Is there really no way to do this programmatically?
Thanks for the response. I don't think I understand your response. Creating a script that will check every item for resource cost? I cannot seem to get access to craftable item's actual component list. What's available in the recipe blob is an InstanceID which has no correlation to the component (just the amount, as a KVP)
If you're saying I should write a script that infers from this, yes over time, we could figure it out, but should anything every change it would take forever to do so. Is there really no way to do this programmatically?
Hi Corrosion,
At initialise of your plugin you can write in Json all itemID needed for craft one item.
I don't know if I understood the need correctly.
Edit : If you look in itemconfig you can find some usefull code. Example of config/ItemConfig.json
At initialise of your plugin you can write in Json all itemID needed for craft one item.
I don't know if I understood the need correctly.
Edit : If you look in itemconfig you can find some usefull code. Example of config/ItemConfig.json
{
"Blueprints": [
{
"amountToCreate": 1.0,
"blueprintStackSize": -1.0,
"ingredients": [
{
"amount": 50.0,
"shortname": "metal.refined"
},
{
"amount": 200.0,
"shortname": "wood"
},
{
"amount": 1.0,
"shortname": "riflebody"
},
{
"amount": 4.0,
"shortname": "metalspring"
}
],
"isResearchable": true,
"NeedsSteamItem": false,
"rarity": "VeryRare",
"scrapFromRecycle": 0.0,
"scrapRequired": 0.0,
"targetItem": "rifle.ak",
"time": 90.0,
"UnlockAchievment": "",
"workbenchLevelRequired": 3.0
},
{
"amountToCreate": 2.0,
"blueprintStackSize": -1.0,
"ingredients": [
{
"amount": 5.0,
"shortname": "stones"
},
{
"amount": 5.0,
"shortname": "gunpowder"
}
],
"isResearchable": true,
"NeedsSteamItem": false,
"rarity": "Common",
"scrapFromRecycle": 0.0,
"scrapRequired": 0.0,
"targetItem": "ammo.handmade.shell",
"time": 3.0,
"UnlockAchievment": "",
"workbenchLevelRequired": 0.0
},
{
[...]
}
],
"Items": [
{
"category": "Weapon",
"condition": {
"enabled": true,
"maintainMaxCondition": false,
"max": 150.0,
"repairable": false
},
"CraftableWithSkin": false,
"craftingStackable": 10.0,
"displayDescription": "High damage machine rifle.",
"displayName": "Assault Rifle",
"HasSkins": true,
"isHoldable": true,
"isUsable": true,
"maxDraggable": 0.0,
"modules": [
{
"capacity": 3.0,
"defaultContents": [],
"maxStackSize": 0.0,
"onlyAllowedItemType": null,
"openInDeployed": false,
"openInInventory": true,
"type": "ItemModContainer"
},
{
"ammoType": "ammo.rifle",
"builtInSize": 30.0,
"contents": 4.0,
"type": "ItemModEntityBaseProjectile"
}
],
"Parent": null,
"quickDespawn": false,
"rarity": "VeryRare",
"shortname": "rifle.ak",
"spawnAsBlueprint": false,
"stackable": 1.0
},
{
"category": "Ammunition",
"condition": {
"enabled": false,
"maintainMaxCondition": false,
"max": 0.0,
"repairable": false
},
"CraftableWithSkin": false,
"craftingStackable": 64.0,
"displayDescription": "Shoddy ammo with multiple projectiles.",
"displayName": "Handmade Shell",
"HasSkins": false,
"isHoldable": false,
"isUsable": false,
"maxDraggable": 0.0,
"modules": [
{
"breakProbability": 0.0,
"closeFlybyDistance": 3.0,
"conditionLoss": 0.0,
"createDecals": true,
"damageDistances": {
"x": 10.0,
"y": 20.0
},
"damageMultipliers": {
"x": 1.0,
"y": 0.25
},
"damageTypes": [
{
"amount": 9.0,
"type": "Bullet"
}
],
"drag": 1.0,
"flybySoundDistance": 8.0,
"gravityModifier": 1.0,
"initialDistance": 0.0,
"mods": [],
"penetrationPower": 1.0,
"remainInWorld": false,
"ricochetChance": 0.5,
"stickProbability": 1.0,
"thickness": 0.1,
"tumbleSpeed": 0.0,
"type": "ItemModProjectile"
}
],
"Parent": null,
"quickDespawn": false,
"rarity": "None",
"shortname": "ammo.handmade.shell",
"spawnAsBlueprint": false,
"stackable": 64.0
},
{
[...]
}
]
}