SugarCarrot 1 Report post Posted January 14, 2020 So, i decided to add an item to my character mod, but here's the problem. I dunno, what to do with recipe icon, bc i added the way to .xml and .tex files in AddRecipe function and stuff, but it still won't show. Maybe i'm just a little bit dummy, but i'll be very pleased, if someone will help. o~o Paul McCartney.zip Share this post Link to post Share on other sites
Ultroman 717 Report post Posted January 15, 2020 Try removing this line (line 21 in love.lua): inst.components.inventoryitem.imagename = "love" Share this post Link to post Share on other sites
SugarCarrot 1 Report post Posted January 16, 2020 15 hours ago, Ultroman said: Try removing this line (line 21 in love.lua): inst.components.inventoryitem.imagename = "love" Eh, it still isn't working. Maybe i should add some variables or something? ^. _^. Share this post Link to post Share on other sites
Ultroman 717 Report post Posted January 16, 2020 Try moving the love files (just the tex and xml) to the appropriate folder for inventoryimages: /images/inventoryimages/ Then, update your references to love.tex and love.xml in the mod. Remember, they're referenced in both modmain.lua and love.lua Also, are you sure your tex file is valid? Share this post Link to post Share on other sites
SugarCarrot 1 Report post Posted January 18, 2020 On 16.01.2020 at 6:22 PM, Ultroman said: Try moving the love files (just the tex and xml) to the appropriate folder for inventoryimages: /images/inventoryimages/ Then, update your references to love.tex and love.xml in the mod. Remember, they're referenced in both modmain.lua and love.lua Also, are you sure your tex file is valid? I've done that, but s t i l l . . . And yes, the .tex file is working. But ok, i reconvert .png to .tex again, updated .tex files, but how i said, here's this problem anyway. Share this post Link to post Share on other sites
Ultroman 717 Report post Posted January 18, 2020 Please share a zip with your mod with the new folder structure. Share this post Link to post Share on other sites
SugarCarrot 1 Report post Posted January 18, 2020 15 minutes ago, Ultroman said: Please share a zip with your mod with the new folder structure. Well... Here it is :^s Paul McCartney.zip Share this post Link to post Share on other sites
Ultroman 717 Report post Posted January 19, 2020 I made it work You had two problems, or three, depending on how you look at it. You've posted this in the DS forum, but your character is for DST. The codebases are very different, e.g., DS has no AddRecipe function, so I was very confused by your code Your AddRecipe call was written for an old version of the AddRecipe function. It has a lot more parameters now, so the placement of the "image" parameter has changed since whatever post you used as source for your recipe code was written. I have fixed that and added some comments about the "image" parameter. AddRecipe also doesn't have a parameter for the atlas (the XML file) for the image, like DS does, so you have to set the "atlas" variable of the recipe afterwards. This is because of how Klei takes advantage of their strict folder structure, to save thousands of lines of code when adding all their many recipes. Since our image is a custom image, and not a part of their atlases, we have to tell the game to use our custom atlas, instead of automatically trying to find our image in the game's original atlases. You had an AddComponent call above the TheWorld.ismastersim check in your love.lua, which makes clients crash when using the character. This is one of the reasons you should always test your mods on a server with caves, or at least a server where you will be the client of the server and not the host (which adding caves does). Paul McCartney.zip Share this post Link to post Share on other sites
SugarCarrot 1 Report post Posted January 20, 2020 On 19.01.2020 at 4:23 AM, Ultroman said: I made it work You had two problems, or three, depending on how you look at it. You've posted this in the DS forum, but your character is for DST. The codebases are very different, e.g., DS has no AddRecipe function, so I was very confused by your code Your AddRecipe call was written for an old version of the AddRecipe function. It has a lot more parameters now, so the placement of the "image" parameter has changed since whatever post you used as source for your recipe code was written. I have fixed that and added some comments about the "image" parameter. AddRecipe also doesn't have a parameter for the atlas (the XML file) for the image, like DS does, so you have to set the "atlas" variable of the recipe afterwards. This is because of how Klei takes advantage of their strict folder structure, to save thousands of lines of code when adding all their many recipes. Since our image is a custom image, and not a part of their atlases, we have to tell the game to use our custom atlas, instead of automatically trying to find our image in the game's original atlases. You had an AddComponent call above the TheWorld.ismastersim check in your love.lua, which makes clients crash when using the character. This is one of the reasons you should always test your mods on a server with caves, or at least a server where you will be the client of the server and not the host (which adding caves does). Paul McCartney.zip Guesss i got that, so yeah, big thanks for your advices and help, dude! u-u <3 Share this post Link to post Share on other sites