Page 1 of 1

[0.17.79] Given sprite rectangle is outside the actual sprite size

Posted: Thu Apr 16, 2020 2:33 am
by deto
Hey, I'm new to modding and I'm having a strange error that I have no idea how to fix. I can't find anything to help me fix this, so I'm posting here.

Here's the error:
error.png
error.png (42.88 KiB) Viewed 1066 times
I'm sure it's a really simple answer, but I just can't figure out how to do it.

I've attached the mod folder so you can see the code. The animation set that seems to be causing the error is on line 9 of either of the .lua files in the prototypes folder.

Thank you!

Re: [0.17.79] Given sprite rectangle is outside the actual sprite size

Posted: Thu Apr 16, 2020 3:30 am
by kirazy
Your frame count needs to be 16. You're using the transport-belt graphics that correspond to the slower belt animations (half as many frames). You are currently using a frame count of 32, which is used by the faster belt animations, which isn't what you're using.

You also don't need all the east_index, west_index, etc. That's all optional now.

Re: [0.17.79] Given sprite rectangle is outside the actual sprite size

Posted: Thu Apr 16, 2020 4:04 am
by deto
kirazy wrote: Thu Apr 16, 2020 3:30 am Your frame count needs to be 16. You're using the transport-belt graphics that correspond to the slower belt animations (half as many frames). You are currently using a frame count of 32, which is used by the faster belt animations, which isn't what you're using.

You also don't need all the east_index, west_index, etc. That's all optional now.
Thank you!

I would have never guessed that.