Jump to content

Recommended Posts

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.

screencap_by_renriin-d9p0prb.png

2. And when I drop item on the ground it doesn't appears at all.

screencap2_by_renriin-d9p0pqr.png

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

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

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.

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 by Rendell

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.

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.

screencap3_by_renriin-d9p2pxx.png

Equipped stick doesn't appears at all.

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.

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.

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

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 :D

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 by Neutral_Steve
More edits, yay!

I checked it too, it works for me as well! Now I understand what you meant by putting image in a separate folder. :D

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!

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