How to format sprites?

Hi.

I am having trouble trying to figure out how to format sprites. The entire process is confusing and I can't really find any help on formatting them, especially if they are bigger than the normal 32 x 32 (or whatever the size is).

I am trying to make a sprite sheet of this object, but every attempts ends up with a piece of it out of frame.

I really dont understand how the engine divides the image into parts, the whole process is really confusing and I'm kind of getting a little annoyed trying to figure it out. 🙁
Each sprite is divided in twelve (12) parts (3 columns and 4 rows). If you name your sprite with a leading $ the sprite sheet will be divided considering that you have a single sprite in it, if you name it without the leading $, the engine assumes that you have 8 sprites in that said sheet and calculates its size considering those 8 sprites divided in 4 columns and 2 rows.

The final result is:
$filename -> 3x4
filename -> 12x8

Take a look at RTP files to get a better grasp on this explanation if there are still things that you do not understand. In your case, since you have a single object, you might want to name your file with a leading $. Considering its size being 39x81, the final result should be a file that is 117x324.

EDIT: however, there is still one thing you have to consider when doing this. The engine automatically centers the sprite horizontally, which means that if your sprite is more than 32 pixels wide, it will be centered, leaving an equal amount of pixels to the right and an equal amount of pixels to the left of your grid square.

In your case, your sprite is 39 pixels wide. Since 39-32=7 the engine is unable to align the sprite properly (7/2=3, but 3*27≠7). The easiest way to have your sprites aligner properly is to have their width being an even number, otherwise you will have to calculate how the engine is going to center it beforehand.
The best way to get the numbers is to start with the cell size, which means the single object size that will be used and visible on the computer screen. The default for Ace is 32x32 for the cell, but ANY size can be used here.

Your object is 39 × 71 Pixel in size. For a single sprite you need it 3x4 times, which results in a total picture size of 117x284 for the spritesheet, with an $ to indicate that it is a single sprite sheet. I suggest you don't make it a spritesheet unless you have several other objects of exactly the same size.

Within the sprite, your object needs to be placed exactly inside the 39x71 grid - the frames you have only happen if there is a pixel space between the cells.

Contrary to @Heirukichi above it is NOT absolutely required to have an equal amount of pixels on both sides. The engine can work with uneven placement. However if you want to fit specific, pixel-based positions, then you need to experiment on placement to see if you need to add a pixel line to the left or to the right to get it to the correct position. Keep in mind that this needs to be added to the CELL, not the entire sprite - that means three different pixel lines at each grid border. Messing this up can cause jitter on the event if it moves.

What you also need to keep in mind is that the sprite will only displayed in full in the game itself - NEVER in the editor.
And that is correct that way, because if a larger sprite were to be displayed in full size in the editor, you would have no way to see or select the regular tiles next to it. And that would make working on the map impossible.
Contrary to @Heirukichi above it is NOT absolutely required to have an equal amount of pixels on both sides.
I never said it does require the number of pixels to be equal on both sides. What I said is that in case of an odd number, it is mathematically impossible to have an equal amount of pixels on both sides.
However if you want to fit specific, pixel-based positions, then you need to experiment on placement to see if you need to add a pixel line to the left or to the right to get it to the correct position
This is exactly what I said, maybe you missed this part, but I was saying exactly the same thing there:
Heirukichi said:
The easiest way to have your sprites aligner properly is to have their width being an even number, otherwise you will have to calculate how the engine is going to center it beforehand.
Being the easiest way does not mean another way does not exist. Anyway, thanks for the clarification on how it shows in the editor, I completely missed that part.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-format-sprites.110645/