For some reason I can't figure this out in RPGMaker MV. I'm trying to animate characters sitting in chairs, at counters etc. but I can't get them to grid/line up. What are your tips for this?
Getting Characters To Line Up With Tiles
Time Fantasy/OSMThe usual way is to put ! at the start of the file name.
I tried that and it started in an even weirder spot. How do you determine where they're going to end up? :3
I think the line up point is the bottom edge of the tile going up, and then centered in the tile, unless it doesn't have an ! in which case it starts a number of pixels above the bottom edge. I'm not sure about the exact number of pixels with MV, I think it's 10 on Ace so it might be 15.
you need to understand that the sprites have no fixed size - the defaults have a grid of 48x48 in MV, but any size works - and that any size is always centered on the bottom of the grid, with an offset of I think 12 pixels without the ! and zero offset if there is a ! in the filename.
To have an actor sitting in a chair, you first need to identify how far that sitting position is from the bottom line of the grid, and then use an image program to place the sprite at that distance in your sheet.
Depending on which numbers you work with, you might or might not need the ! - but you always need to count the pixels of your chair and place the person sprite accordingly.
To have an actor sitting in a chair, you first need to identify how far that sitting position is from the bottom line of the grid, and then use an image program to place the sprite at that distance in your sheet.
Depending on which numbers you work with, you might or might not need the ! - but you always need to count the pixels of your chair and place the person sprite accordingly.
So I can't really figure out the dimensions of these characters but I know that they line up at the bottom of the feet if I use a !. When you're using characters that work off of a different sizing how do you determine where the sprite lines up with the regular in-editor grid? Sorry if this is a dumb question, it just doesn't make sense to me right now. 😐
@IAmJakeSauvage
The first step is to identify the cell size of the spritesheet you're using. By default that is 48x48, but if you're using differently sized sheets then you need to identify that first.
In the case of a full spritesheet, you get the horizontal cell size by dividing the total pixel number by 12. In your (unfortunately cropped) example sheet, the picture width is 972 pixels, which means that the cell width would be 81 pixels - which is the wrong number however because there is a black bar to the left.
The height of the cell would be the total picture height divided by 8, but because you cropped the sheet I don't know its original height and can't calculate the original cell number. Please do this with the full picture you have.
After that, make the grid of your image program into that cell size instead of the 48x48 grid you currently have activated on it. Guesstimating from your incomplete spritesheet the cell size if probably around 100x75 or 105x78 or something like that, but you need to calculate the correct numbers based on the true size of your spritesheet.
Then you'll have the lines where all sprite will align themselves to for that specific sheet.
Differently sized spritesheets will need differently sized grids to get those lines into the correct positions.
The first step is to identify the cell size of the spritesheet you're using. By default that is 48x48, but if you're using differently sized sheets then you need to identify that first.
In the case of a full spritesheet, you get the horizontal cell size by dividing the total pixel number by 12. In your (unfortunately cropped) example sheet, the picture width is 972 pixels, which means that the cell width would be 81 pixels - which is the wrong number however because there is a black bar to the left.
The height of the cell would be the total picture height divided by 8, but because you cropped the sheet I don't know its original height and can't calculate the original cell number. Please do this with the full picture you have.
After that, make the grid of your image program into that cell size instead of the 48x48 grid you currently have activated on it. Guesstimating from your incomplete spritesheet the cell size if probably around 100x75 or 105x78 or something like that, but you need to calculate the correct numbers based on the true size of your spritesheet.
Then you'll have the lines where all sprite will align themselves to for that specific sheet.
Differently sized spritesheets will need differently sized grids to get those lines into the correct positions.
@IAmJakeSauvage, hopefully this can help you (image-heavy spoilers!):
I don't know if it was the best method but here's how I would tackle this.
First of all, it'll be easier for you when know how big the characters are. Let's setup the grid first.
Next, I am going to test how 'off' a character is compared to the default grid.
But there might be a small problem: your chairs have different configurations in that room (comparing it in a 48x48 grid: some chairs start a few pixels lower below the square (and/ left or right) than the other.
That's why I would suggest to evenly offset the chairs, so that you only need one sheet per character for all the chairs.
(Just saw @Andar posted something similar, see it as extra visual imagery then)
I don't know if it was the best method but here's how I would tackle this.
First of all, it'll be easier for you when know how big the characters are. Let's setup the grid first.
Step 1
First determine the maximum height of your character. I figured a new character started where the shadow of the character above ended. Well here I have the problem of not having the full spritesheet, but I'll use a workaround: i take two character rows as the only selection.
Step 2
Now that I only have 2 rows I can finally setup the grid: width = Image width/ 12 and hight =image hight/ 2
If the pictures you uploaded aren't scaled/ are 1:1, then the grid should be 78x108.
First determine the maximum height of your character. I figured a new character started where the shadow of the character above ended. Well here I have the problem of not having the full spritesheet, but I'll use a workaround: i take two character rows as the only selection.
Step 2
Now that I only have 2 rows I can finally setup the grid: width = Image width/ 12 and hight =image hight/ 2
If the pictures you uploaded aren't scaled/ are 1:1, then the grid should be 78x108.
Next, I am going to test how 'off' a character is compared to the default grid.
Step 1
First, I made a character sheet for only one character. I named it !$char2
For this image, it doesn't matter how big the character is, since we used the !$ symbols in the filename.
Step 2
Now put the sheet in a normal event and compare it to the default actor/ grid.
After a mapshot (or screenshot,doesn't really matter), this was the result.
Now you can take notes on how you would align your character with your chair. (Note the red small arrows)
First, I made a character sheet for only one character. I named it !$char2
For this image, it doesn't matter how big the character is, since we used the !$ symbols in the filename.
Step 2
Now put the sheet in a normal event and compare it to the default actor/ grid.
After a mapshot (or screenshot,doesn't really matter), this was the result.
Now you can take notes on how you would align your character with your chair. (Note the red small arrows)
But there might be a small problem: your chairs have different configurations in that room (comparing it in a 48x48 grid: some chairs start a few pixels lower below the square (and/ left or right) than the other.
That's why I would suggest to evenly offset the chairs, so that you only need one sheet per character for all the chairs.
(Just saw @Andar posted something similar, see it as extra visual imagery then)
Holy cow! Awesome guide Rabosion. Thanks. 🤘:mrsatan:🤘
@Rabosion I could kiss you. Thank you so much for taking the time to do that - I was able to finally figure it out thanks to you!
Original thread: https://forums.rpgmakerweb.com/threads/getting-characters-to-line-up-with-tiles.79188/