Jump to content

Missing Recipe Image Fix?


Recommended Posts

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?

imagemissing.jpg

Link to comment
Share on other sites

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

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 by Sinaboo
Link to comment
Share on other sites

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 by Sinaboo
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...