Jump to content

Recommended Posts

So I'm trying to give my custom character four custom recipes in a custom crafting tab. I have this all coded in the modmain lua, and the pngs, TEXs, and XMLs of the recipes are in the items/inventoryitems folder. However, the custom crafting tab and the recipe slots are empty when I play the game even though the slots are showing up. I also can't craft them. The character goes through the motion of crafting something and even spends the ingredients for the recipe, then stops and says "I can't do that" and that's the end of it.

I've noticed other mods have their custom recipes in zips that contain anim.bin, atlas-0, and build.bin in the anim folder, and in the images folder they only have XMLs and TEXs, not pngs. I think my issue is I don't have these zips compiling in the anim folder, however I don't know how to do that.

I've attached a screenshot of what the crafting menu looks like, my code to create the crafting tab and two recipes, and the inventoryimages folder containing the images. I'm using this character mod template 

 

 

Annotation 2020-04-25 222119.png

Annotation 2020-04-25 222455.png

Annotation 2020-04-25 222709.png

image.png.473e22d7fe27b30c2fba172386764c95.png

That should get your images working. Other than that, it is important to add your custom ingredients to the ingredient list in the game. I can't remember how to do that, but I'm sure it's mentioned wherever you found the code for what you have now.

I think it's just making sure to add an atlas for them, like this.

local my_ingredient = Ingredient( "ingredient prefab name", 1 )
my_ingredient.atlas = "images/inventoryimages/ingredient_atlas_filename.xml"

 

Edited by Ultroman
3 hours ago, Ultroman said:

image.png.473e22d7fe27b30c2fba172386764c95.png

That should get your images working. Other than that, it is important to add your custom ingredients to the ingredient list in the game. I can't remember how to do that, but I'm sure it's mentioned wherever you found the code for what you have now.

I think it's just making sure to add an atlas for them, like this.


local my_ingredient = Ingredient( "ingredient prefab name", 1 )
my_ingredient.atlas = "images/inventoryimages/ingredient_atlas_filename.xml"

 

Unfortunately, this didn't work. I added the ingredient atlas and removed .tex from line 70 and it didn't work. I then added an ingredient value and it didn't work. I then removed .tex from lines 78 and 84 and that didn't work either.
This is what my code looks like now. 844582514_Annotation2020-04-26133809.thumb.png.de0b27a453f264d3625dd1029347f3fb.png

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
×
  • Create New...