Doodle Monster Posted March 8, 2025 Share Posted March 8, 2025 So, I'm working on a character mod for dst! However i've run into a weird issue. When I add my character tag to my crafting recipe the game crashes, but without the tag included it works just fine. Which Is really weird, I checked for typos or anything of that sort but there aren't any. Any help would be awesome! Here's my crash; And my character has the tag 'wramp_crafter' for some reason it works with my other items, just not this one [00:02:42]: [string "scripts/util.lua"]:618: Could not find an asset matching wramp_crafter in any of the search paths. LUA ERROR stack traceback: =[C] in function 'assert' scripts/util.lua(618,1) in function 'resolvefilepath' scripts/recipe.lua(106,1) in function '_ctor' scripts/class.lua(191,1) in function 'Recipe' scripts/modutil.lua(799,1) in function 'AddRecipe' ../mods/Wramp Clothier Toch ups Coat/modmain.lua(136,1) in main chunk =[C] in function 'xpcall' scripts/util.lua(778,1) in function 'RunInEnvironment' scripts/mods.lua(579,1) in function '_InitializeModMain' local MS_MODNAME = 'workshop-2812783478';local a = {} Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/ Share on other sites More sharing options...
oregu Posted March 10, 2025 Share Posted March 10, 2025 AddRecipe2 = function(name, ingredients, tech, config, filters) The 4th argument must be a table. builder_tag is the tag you must have to make the recipe. Spoiler Recipe2("yourprefab", {Ingredient("prefab", 1), Ingredient("prefab", 1)}, TECH.EXAMPLETECH, {builder_tag="wramp_crafter"}) Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1805869 Share on other sites More sharing options...
Doodle Monster Posted March 10, 2025 Author Share Posted March 10, 2025 Thank you for the fast reply! 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1805960 Share on other sites More sharing options...
Doodle Monster Posted March 10, 2025 Author Share Posted March 10, 2025 Hmm. I added the recipe and it works without crashing, but I cannot find the item in the crafting menue. I went back and doubble checked that I spelled the tag correctly not sure what went wrong. Recipe2("winter_attire", { Ingredient("redgem", 1), Ingredient("beefalowool", 8), Ingredient("voidcloth", 4)}, TECH.MAGIC_TWO, {builder_tag="wramp_crafter"}) Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1806057 Share on other sites More sharing options...
Doodle Monster Posted March 10, 2025 Author Share Posted March 10, 2025 (edited) I do have the tag in my character but I'm wondering if it needs to be formatted diffrently for the recipie to work. I just have "wramp_crafter" without builder_tag Edited March 10, 2025 by Doodle Monster Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1806062 Share on other sites More sharing options...
oregu Posted March 10, 2025 Share Posted March 10, 2025 (edited) oh, using AddCharacterRecipe is more accurate than Recipe2. it will be in your character filter rather than a crafting filter. in modmain.lua (or something like recipes.lua) you can use this env.AddCharacterRecipe = function(name, ingredients, tech, config, extra_filters) Spoiler AddCharacterRecipe("winter_attire", {GLOBAL.Ingredient("redgem", 1), GLOBAL.Ingredient("beefalowool", 8), GLOBAL.Ingredient("voidcloth", 4)}, GLOBAL.TECH.MAGIC_TWO, {builder_tag="wramp_crafter"}) or some equivalent on top of using Recipe2, the function uses SetModRPCID() which is probably why it doesnt show up before? nice character by the way Edited March 11, 2025 by oregu Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1806102 Share on other sites More sharing options...
Doodle Monster Posted March 11, 2025 Author Share Posted March 11, 2025 Thank you! I plan on releaseing him on the workshop eventually. I cannot understate how much this helps Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1806273 Share on other sites More sharing options...
Doodle Monster Posted March 11, 2025 Author Share Posted March 11, 2025 Worked like a charm. The crafting Icon is missing, but other then that works great! 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1806292 Share on other sites More sharing options...
Doodle Monster Posted March 11, 2025 Author Share Posted March 11, 2025 I tried to add the crafting icon in at the end, like the original had but It crashes do you know how I would go about adding it? Here's what I put AddCharacterRecipe("winter_attire", {GLOBAL.Ingredient("redgem", 1), GLOBAL.Ingredient("beefalowool", 8), GLOBAL.Ingredient("nightmarefuel", 10)}, GLOBAL.TECH.MAGIC_TWO, {builder_tag="wramp_crafter"},"images/inventoryimages/winter_attire.xml") 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1806294 Share on other sites More sharing options...
Doodle Monster Posted March 13, 2025 Author Share Posted March 13, 2025 I think I almost got it, my sytax might be wrong here's what I put and my crash; [string "../mods/Winter attire/modmain.lua"]:54: unexpected symbol near ')' AddCharacterRecipe("winter_attire", {GLOBAL.Ingredient("redgem", 1), GLOBAL.Ingredient("beefalowool", 8), GLOBAL.Ingredient("nightmarefuel", 10)}, GLOBAL.TECH.MAGIC_TWO, {builder_tag="wramp_crafter", atlas = "images/inventoryimages/winter_attire.xml",},) 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1806912 Share on other sites More sharing options...
Doodle Monster Posted March 15, 2025 Author Share Posted March 15, 2025 @oregu Sorry to bother you! I took a look at it but I was unable to make the crafting icon appear, the game isn't crashing but the crafting icon won't appear. You might see my mistake here's what I have; AddCharacterRecipe("winter_attire", {GLOBAL.Ingredient("redgem", 1), GLOBAL.Ingredient("beefalowool", 8), GLOBAL.Ingredient("nightmarefuel", 10)}, GLOBAL.TECH.MAGIC_TWO, {builder_tag="wramp_crafter"}, {atlas = "images/inventoryimages/winter_attire.xml", image = "winter_attire.tex"}) 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1807256 Share on other sites More sharing options...
oregu Posted March 17, 2025 Share Posted March 17, 2025 (edited) Oh, for some reason I did not get notification for this post. Sorry for the delay! Let me have a look. Did you try putting it in the table along with buildertag instead of the 5th argument? The 5th argument is reserved for additional filters the clothing has. Spoiler -- modmain.lua: -- Make sure you add your images to Assets! Assets = { Asset("ATLAS", "images/inventoryimages/winter_attire.xml"), Asset("IMAGE", "winter_attire.tex"), } RegisterInventoryItemAtlas("images/inventoryimages/winter_attire.xml", "winter_attire") -- This may work instead of adding an atlas to your recipe. -- If it doesnt work try winter_attire.tex instead? AddCharacterRecipe("winter_attire", { -- recipes.lua or recipe.lua GLOBAL.Ingredient("redgem", 1), GLOBAL.Ingredient("beefalowool", 8), GLOBAL.Ingredient("nightmarefuel", 10) }, GLOBAL.TECH.MAGIC_TWO, -- techtree.lua { -- recipe.lua builder_tag = "wramp_crafter", atlas = "images/inventoryimages/winter_attire.xml", -- if this is an inventory item, only add this if you want the recipe image to be different than your inventory item image. otherwise, make an inventory item atlas for your item. image = "winter_attire.tex", }, { -- recipes_filter.lua "CLOTHING", "WINTER", }) -- winter_attire.lua: -- to change an inventory item image inst:AddComponent("inventoryitem") inst.components.inventoryitem:ChangeImageName("") -- if your item is invisible even in inventory, make this your current prefab name Edited March 17, 2025 by oregu Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1807687 Share on other sites More sharing options...
Doodle Monster Posted March 17, 2025 Author Share Posted March 17, 2025 Thank you! Will give it a try! Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1807735 Share on other sites More sharing options...
Doodle Monster Posted March 17, 2025 Author Share Posted March 17, 2025 It worked! Thanks for the help! 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1807749 Share on other sites More sharing options...
oregu Posted March 18, 2025 Share Posted March 18, 2025 14 hours ago, Doodle Monster said: It worked! Thanks for the help! What HUD mod do you use? It looks snazzy. Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1807874 Share on other sites More sharing options...
RozeMeteor Posted March 18, 2025 Share Posted March 18, 2025 8 hours ago, oregu said: What HUD mod do you use? It looks snazzy. Not the guy but, it's the soul infused mod https://steamcommunity.com/sharedfiles/filedetails/?id=2954087809&searchtext=hud 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1807939 Share on other sites More sharing options...
Doodle Monster Posted March 18, 2025 Author Share Posted March 18, 2025 Yep, that's the one! 1 Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1807958 Share on other sites More sharing options...
Doodle Monster Posted April 22, 2025 Author Share Posted April 22, 2025 @oregu Sorry about the ping, I was trying to add a crafting recipie to a already existing item; I know wilson can craft purple gems but when I tried to use AddCharacterRecipe to add another way to craft purplegems It over-rided the original recipie. Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1813587 Share on other sites More sharing options...
Doodle Monster Posted April 22, 2025 Author Share Posted April 22, 2025 Do you know how I would go about adding a recipie for a already existing item; without overrideing the original? Link to comment https://forums.kleientertainment.com/forums/topic/164736-moded-item-crafting-recipe-crashing/#findComment-1813588 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now