I hate to ask here again for something that's probably really simple (I'm sure my ignorance is getting annoying, if so, I offer my sincere apologies), but I've ran out of both ideas and options. I'm making a mod for custom weapons with a custom crafting table. The weapons work. The crafting table works. The recipes for both also work, the table is craftable, and the weapons for the table are also craftable. The problem is that the recipes for the weapons only appear on the crafting table in admin mode. Otherwise, the station's crafting menu is just blank. I've dredged through the forums looking for others that have had this problem, I've looked through the modding Ebook, and I've tried every solution suggested, and nothing has worked. Here's an example from the .activeitem and .recipe of one of the weapons: Code: "itemName" : "accatranlasgun", "price" : 960, "inventoryIcon" : "accatranlasgun.png", Code: "output" : { "item" : "accatranlasgun", "data" : { "level" : 1, "shortdescription" : "Accatran Lasgun" }, "count" : 1 }, "groups" : [ "mechtable", "weapons", "all" ] Just to show I am using the right item name. So, I've tried learning the recipes through player.config.patch: Code: {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"mechtable"}}, {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"accatranlasgun"}} Nothing. Though, oddly enough, that worked just fine for learning the table's recipe. But for the weapons? Nothing. And I've tried learning the recipes through learnBlueprintsOnPickup, specifically by picking up the crafting table itself: Code: "learnBlueprintsOnPickup" : [ "accatranlasgun" ] That looked like it worked, at first. There was a little popup that said I've learned the recipe, but upon checking the table, still nothing. And in both cases it doesn't even produce an error in the log to tell me what's wrong, so I'm a bit at a loss as to what I'm missing here. Again, the weapons appear just fine in the custom crafting station and are perfectly craftable, just only in admin mode. Any ideas or help would be appreciated.
I am not a 100% sure but if I remember right it needs to be the full value in player.config. so Code: "accatranlasgun", "data" : { "level" : 1, "shortdescription" : "Accatran Lasgun" }
Well, nothing else has worked so I'll give it a shot. If so, though, I wonder why the shortdescription wasn't required for the table.
Well what do you know, that worked. Huh. So, I guess when adding objects like furniture to the player.config you just need the item name, Code: { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "mechtable" }} but for items like weapons (and I'm guessing armor as well, I'll have to test that) you need its full recipe value, Code: { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "accatranlasgun", "data" : { "level" : 1, "shortdescription" : "Accatran Lasgun" }}} That doesn't make a whole lot of sense, but hey, if it works it works I suppose. Thanks again Suit, you're a lifesaver.
It is because your recipe used a special parameter that it is required. The recipe you learn is the output of the recipe - literally. This does allow for more interesting possibilities - such as variations of recipes of the same item. Though I have not experimented with it personally.
So what would I put in the learnBlueprintsOnPickup field if the itemname alone isn't enough for a weapon? Would I put the full output value there as well?