Jump to content

Recommended Posts

I cant see my item
i mean yes its in game but no images,no animation... its invisible and i cant craft it because its say:

|Another survivor know how to craft this|

what? why? how?

is someone know how to fix this?
notes:
i have item.zip in anim foulder, i added my item name in prefabfiles = {...}

here is code of recipe:

Spoiler

AddRecipe("bleach",{ Ingredient("monsterlasagna", 1)}, GLOBAL.RECIPETABS.REFINE, TECH.NONE,nil,nil,nil,1,"drugsarebad", "images/inventoryimages/bleach.xml", "bleach.tex")
STRINGS.RECIPE_DESC.BLEACH = "Bleachhhh."

 

It's going to be difficult for people to tell exactly what's wrong without having your mod files available to look at, but I'll suggest some things based on some problems I had with my own mod.

Item cannot be crafted:

Before anything, AddRecipe is the old way of adding items and might work incorrectly.  You might want to change your recipe to AddCharacterRecipe instead if it's supposed to be survivor specific. You can find the code here.

If you do change it to this, add the code

Quote

RegisterInventoryItemAtlas("images/inventoryimages/bleach.xml", "bleach.tex")

in your modmain alongside the other item stuff. Otherwise your inventory icon will disappear! I put mine above the recipe.

Secondly, have you added

Quote

inst:AddTag("drugsarebad")

to your character's [their name].lua file, in their "local common_postinit" function? This is what the game is looking for to allow a survivor to craft it.

If your item isn't supposed to be locked to one character, then use the AddRecipe2 function from the post I linked.

 

Item is invisible:

When I had this problem, it was because I had forgotten to rename the animation build in Spriter when copying a template.

Open your item's .scml file and look at the bottom right. There should be a box there called "Animations" with two lines under it.

Make sure the top line says "bleach" and the one under it says "idle".

unknown.png

If you do this and it's still broken, the problem is more complicated than that and I wouldn't be able to guess what it is.

 

I hope this helps you. I'm not good at coding, so I'm sorry if it's not much help. If you still have issues, you might want to upload a zipped file of your mod so someone can open it and look at all of your code.

Edited by Chesed

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...