HiraaCaan Posted August 11, 2022 Share Posted August 11, 2022 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." Link to comment https://forums.kleientertainment.com/forums/topic/142546-need-help-with-custom-item/ Share on other sites More sharing options...
Haruhi Kawaii Posted August 21, 2022 Share Posted August 21, 2022 (edited) Have you solved the problem yet? Edited August 22, 2022 by Haruhi Kawaii Link to comment https://forums.kleientertainment.com/forums/topic/142546-need-help-with-custom-item/#findComment-1595219 Share on other sites More sharing options...
ant7735 Posted August 22, 2022 Share Posted August 22, 2022 On 8/11/2022 at 1:59 PM, HiraaCaan said: I cant see my item i mean yes its in game but no images,no animation... its invisible. What is the code What is the code for the item prefab? Link to comment https://forums.kleientertainment.com/forums/topic/142546-need-help-with-custom-item/#findComment-1595417 Share on other sites More sharing options...
HiraaCaan Posted September 11, 2022 Author Share Posted September 11, 2022 On 8/21/2022 at 11:59 AM, Haruhi Kawaii said: Have you solved the problem yet? nop Link to comment https://forums.kleientertainment.com/forums/topic/142546-need-help-with-custom-item/#findComment-1597728 Share on other sites More sharing options...
Chesed Posted September 13, 2022 Share Posted September 13, 2022 (edited) 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". 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 September 13, 2022 by Chesed Link to comment https://forums.kleientertainment.com/forums/topic/142546-need-help-with-custom-item/#findComment-1597913 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