Forum

> > CS2D > General > Skins not aligning
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Skins not aligning

8 replies
To the start Previous 1 Next To the start

old Skins not aligning

the bamboozle
User Off Offline

Quote
So I was creating some skins for weapons or characters, but in some cases the skin doesn't align accurately in game, which in turn creates something like a half the front of a gun drop from the left side, and then half the end of the gun drop at the right side of the front half, similar issue happened with characters too, is there something I'm missing?

old Re: Skins not aligning

DC
Admin Off Offline

Quote
They don't align because CS2D doesn't do anything special to magically align them. It just draws the images as they are. With fixed offsets/centering. So if you move something by one pixel in a skin it it will be off by one pixel in the game.

Best advice I can give you is to stick to the original image resolutions (32x32 pixels) and keep the position/silhouette mostly the same. Otherwise things will be off.

old Re: Skins not aligning

the bamboozle
User Off Offline

Quote
I aligned my character skin on the existing skin at the exact position, unfortunately it turned out wrong. As for the gun drop sprite, it worked after I saved over it, can't say the same for character skin. What other options do I have?

old Re: Skins not aligning

DC
Admin Off Offline

Quote
Can you share your character skin image? If you use the same size/position/silhouette then there shouldn't be any problems. I don't see any other options (or sources for problems).

old Re: Skins not aligning

the bamboozle
User Off Offline

Quote
So this is the comparison, although I did noticed that the original is slightly tilted towards the left instead of being dead center of each 32x32 pixels partitions.
IMG:https://i.imgur.com/d8eIAIc.png

And here the in game results.
IMG:https://i.imgur.com/gZNntp0.png

old Re: Skins not aligning

DC
Admin Off Offline

Quote
Okay that's weird... you are right. I can't see any issue with this one.
Does your image file have a size of exactly 64x96 pixels (like shown here)? Did you save it as bmp? When you open one of the original skins with the tool you're using and save it the same way you did with your one does it still work fine?

old Re: Skins not aligning

the bamboozle
User Off Offline

Quote
I shall give yours a try later. Yeah it's 64x96, bmp format although 32bits to retain transparency. Maybe that was the issue? I'm using paint.net. The same thing happened to my mcx spear drop sprite but that one is purely bmp without any transparency tricks involved, I can't quite remember what i did to make it work though.

old Re: Skins not aligning

DC
Admin Off Offline

Quote
Yes, I'm pretty sure that it must be some kind of file format issue. I have no other explanation than that. I think you can also save it as PNG and rename the extension in the file name to bmp afterwards. That's kind of dirty but it should work.

old Re: Skins not aligning

the bamboozle
User Off Offline

Quote
I shall give that a try too, thanks for the advice.
Edit: Your "dirty" trick works, thanks.
edited 1×, last 26.12.23 12:45:22 pm
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview