Sinaboo Posted September 13, 2019 Share Posted September 13, 2019 I've been working on my custom item mod and one of it's ingredients isn't showing up! (It's an onion) It's always been like this for me. I've used the following code in my modmain.lua for the recipe. AddRecipe("onion2", {Ingredient("onion", 1), Ingredient("nightmarefuel", 2), Ingredient("goldnugget", 5)}, RECIPETABS.MAGIC, TECH.NONE, nil, nil, nil, nil, "onion2builder", "images/inventoryimages/onion2.xml", "onion2.tex") I tried replacing the onion in my recipe script with other vegetables like a dragonfruit, and that showed up, but some others don't show up in the recipe. Does anyone know a fix or what I should to make it so that the onion will show up when I'm looking at it in the crafting recipe? Link to comment Share on other sites More sharing options...
Ultroman Posted September 13, 2019 Share Posted September 13, 2019 I'd need to see your folder structure. But before you post a zip of your entire mod, have you tried simply omitting the last parameter? So, do this instead. AddRecipe("onion2", {Ingredient("onion", 1), Ingredient("nightmarefuel", 2), Ingredient("goldnugget", 5)}, RECIPETABS.MAGIC, TECH.NONE, nil, nil, nil, nil, "onion2builder", "images/inventoryimages/onion2.xml") Link to comment Share on other sites More sharing options...
Sinaboo Posted September 14, 2019 Author Share Posted September 14, 2019 (edited) I've tried using the line of code you asked but nothing has changed that I noticed. I think the problem may be with the xml file of where the onion/vegetables is stored but I don't know how to overwrite the default DST onion/vegetables xml. I think if I knew how to edit default DST images I could find out how to fix this issue. mod.zip Edited September 14, 2019 by Sinaboo Link to comment Share on other sites More sharing options...
Ultroman Posted September 14, 2019 Share Posted September 14, 2019 You should NOT edit and/or overwrite the game files directly. When making mods, we use the mod API and the tools Klei has provided. Where is the "onion" prefab from? Is it from another mod? Link to comment Share on other sites More sharing options...
Sinaboo Posted September 14, 2019 Author Share Posted September 14, 2019 (edited) 46 minutes ago, Ultroman said: You should NOT edit and/or overwrite the game files directly. When making mods, we use the mod API and the tools Klei has provided. Where is the "onion" prefab from? Is it from another mod? The onion prefab should just be the regular Don't Starve Together onion. It's not from any mods. I also noticed that other vegetables like a tomato don't show up in the crafting box when replacing "onion" in the recipe to try and find out what's causing the issue. Could it be possible that I can't fix the onion not showing up in the crafting recipe window? Edited September 14, 2019 by Sinaboo Link to comment Share on other sites More sharing options...
IronHunter Posted September 14, 2019 Share Posted September 14, 2019 local QUAGMIRE_PORTS = { "tomato", "potato", "onion", "garlic", } The veggie.lua file says that these 4 veggies use the quagmire inventory images. which means the name of the inventory image is quagmire_onion ingredienttype, amount, atlas, deconstruct, imageoverride Ingredient("onion", 1,"images/inventoryimages/quagmire_onion.xml") I got no time to test but I would poke around with the atlas and imageoverride parameters and see if you can point it to the correct filepath. its probably got the correct inventoryimages.xml so its probably just the .tex it is pointing incorreclty. Ingredient("onion", 1, nil,nil, "quagmire_onion.tex") should be a good push in the right direction, if I get some more time I would test this out to make sure before I post this. But I got to head to work. 1 Link to comment Share on other sites More sharing options...
Sinaboo Posted September 15, 2019 Author Share Posted September 15, 2019 Thanks guys! Everything's working fine now. Link to comment 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