Rendell Posted January 23, 2016 Share Posted January 23, 2016 Hello! First, I'd like to state that I'm a newbie in this all this modding stuff and I haven't tried to mod anything before Don't Starve at all and I barely understand what's going on in LUA codes. Or maybe the problem here is somewhere else, but I'm not sure. So, this is a custom item for a character mod. It is supposed to be a neon equipable glowing stick. Just an endless source of light (I know, I know, it's kinda cheat-y...), nothing more. While technically it works the way it should - it glows and recipe appears correctly in the crafting tab - I definitely have some troubles with graphics. 1. When my character equips it, the stick does this weird rectangular thing. 2. And when I drop item on the ground it doesn't appears at all. However, I'm pretty sure I've done anything right. I've checked files dozens of times but can't see any problem yet I have this in game. Here are all files associated with the item. neonstick.lua neonstick.zip swap_neonstick.zip modmain.lua Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/ Share on other sites More sharing options...
Maris Posted January 23, 2016 Share Posted January 23, 2016 technically swap image is just an image with alpha channel. It's is not an animation and it can't have special effects. And it does not matter what images you are using for recipe and for ground animation. "Swap image" replaces one of the images in character animation. That's why it's impossible to add custom effects (actually not impossible but very hard and tricky). Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713092 Share on other sites More sharing options...
Rendell Posted January 23, 2016 Author Share Posted January 23, 2016 I don't need any special effects on the equipped stick. I just need it to look like the image that is in swap_neonstick.zip. I even checked .tex for swap image dozens of times and it's clear without any artifacts. Yet still I get this weird rectangle around it in the game. And I still don't understand why dropped out stick is invisible. Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713102 Share on other sites More sharing options...
Rendell Posted January 23, 2016 Author Share Posted January 23, 2016 (edited) I've managed to solve the second problem. My neonstick.lua was lacking this line: inst.AnimState:PlayAnimation("idle") Now the ground sprite finally appears. But I still have the problem with that rectangular thing on equipped stick. Maybe I have messed up somewhere? What are the exact steps of making swap_item.zip? Edited January 23, 2016 by Rendell Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713145 Share on other sites More sharing options...
NyctoDarkMatter Posted January 24, 2016 Share Posted January 24, 2016 Question; did you compile these via SCML or did you edit the .zip files? I don't know exactly what the issue is because I'm not an expert but I figured that might be helpful, since sprite glitches happen often when editing the ZIP and TEX files. Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713236 Share on other sites More sharing options...
Rendell Posted January 24, 2016 Author Share Posted January 24, 2016 9 hours ago, NyctoDarkMatter said: Question; did you compile these via SCML or did you edit the .zip files? I don't know exactly what the issue is because I'm not an expert but I figured that might be helpful, since sprite glitches happen often when editing the ZIP and TEX files. Both. When I edited swap_neonstick.zip tex files and build, I've got this weird rectangle. Then I found Malacath's tutorial, and tried to make zip by using compiler. As a result... Ahem. Equipped stick doesn't appears at all. Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713348 Share on other sites More sharing options...
Rendell Posted January 24, 2016 Author Share Posted January 24, 2016 I opened the zip compiler created. For some reason, atlas-0.tex is empty while atlas-1.tex has the sprite. Yet when I edit atlas-0, still nothing changes. Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713360 Share on other sites More sharing options...
NyctoDarkMatter Posted January 24, 2016 Share Posted January 24, 2016 Do you by any chance have a set for the SCML I can take a look at? Like, the character's files? I'll gladly take a look and see if I can fix it but I can't explain how to fix it without looking at the files and discovering what's wrong first, if that makes sense. Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713466 Share on other sites More sharing options...
Neu7ral Posted January 24, 2016 Share Posted January 24, 2016 7 hours ago, Rendell said: I opened the zip compiler created. For some reason, atlas-0.tex is empty while atlas-1.tex has the sprite. Yet when I edit atlas-0, still nothing changes. You actually made both folders? I mean, swap_neonstick -> swap_neonstick and inside the item? By the way, the character looks awesome. Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713500 Share on other sites More sharing options...
Rendell Posted January 25, 2016 Author Share Posted January 25, 2016 5 hours ago, Neutral_Steve said: You actually made both folders? I mean, swap_neonstick -> swap_neonstick and inside the item? Hmm. No. Have I supposed to do that? I've tried it now but the result is still same. 5 hours ago, Neutral_Steve said: By the way, the character looks awesome. Thank you very much! 7 hours ago, NyctoDarkMatter said: Do you by any chance have a set for the SCML I can take a look at? Like, the character's files? I'll gladly take a look and see if I can fix it but I can't explain how to fix it without looking at the files and discovering what's wrong first, if that makes sense. Sure! Here, I attached all scmls used in the mod. scmls.rar Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713562 Share on other sites More sharing options...
NyctoDarkMatter Posted January 25, 2016 Share Posted January 25, 2016 Uhh, thanks but the SCMLs don't include the images. I need those as well, haha. Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713577 Share on other sites More sharing options...
Rendell Posted January 25, 2016 Author Share Posted January 25, 2016 Oh, oops. : D Here? neonstick.rar Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713579 Share on other sites More sharing options...
Neu7ral Posted January 25, 2016 Share Posted January 25, 2016 (edited) I remade the neonstick. Check the read.txt and the neonstick.lua the green text will say your errors and what I did to change corrrectly. (Yes, I tested in game, works correctly now ) neonstick thingies.zip This says the read.txt Added an folder inside on swap_neonstick called swap_neonstick (I put inside the equiped item image) neonstick called neonstick (I put inside the dropped image) Also, When I say I highly reccomend add the component weapon is because the animation on attack with control+f will look buggy. Edited January 25, 2016 by Neutral_Steve More edits, yay! Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713660 Share on other sites More sharing options...
Rendell Posted January 26, 2016 Author Share Posted January 26, 2016 I checked it too, it works for me as well! Now I understand what you meant by putting image in a separate folder. Thank you so much! Especially for the notes in .lua. If I may ask, what actually does OnDropped? 10 hours ago, Neutral_Steve said: Also, When I say I highly reccomend add the component weapon is because the animation on attack with control+f will look buggy. Yep, I already noticed it... Looks weird. I added weapon component and everything's fine now. Thank you very much once again! Link to comment https://forums.kleientertainment.com/forums/topic/63131-having-trouble-with-custom-item-graphics/#findComment-713870 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