How to determine your TileID

Llareian

Jack of All Trades, Master of None
Veteran
Joined
Jan 26, 2017
Messages
604
Reaction score
1,424
First Language
English
Primarily Uses
RMMV
Tutorial topic: TileIDs, including Autotiles!

Brief description: I'll be going over how to determine a tile's TileID (which is used in the map data file) using the tilesheet and the shape of the desired autotile (if applicable). This info will most likely be useful for scripters, though @Shaz has just released an awesome new plugin to change a map tile during your game, and this can be useful for her plugin as well.

Requirements: RPG Maker MV, a reason to know the tile IDs

Tutorial body:
Before we start, some terms:

Tile: One square on the default map grid. For MV, a tile is a 48 x 48 pixel square.

Tilesheet: One PNG file containing multiple tiles or autotiles arranged in a predefined pattern, with no empty space between the tiles.

Tileset: A collection of tilesheets defined in the editor, that can consist of up to nine tilesheets designated A1, A2, A3, A4, A5, B, C, D, and E. Each map can use only one tileset.

TileID: A number stored in a map data file that tells the game which tile from the map's tileset to draw in which location. The number's position in the file corresponds to the grid location on the map. The value of the TileID corresponds to a particular tile from the tileset.


Tilesheet numbering

Strangely enough, tile IDs start with the non-autotile sheets first. This means we start with TileID 0 on the top-left tile of the B tilesheet. (Note: Therefore, TileID 0 always corresponds to a blank tile!) Then we proceed left-to-right, then top-to-bottom, through the B tilesheet, then C, D, E, and finally A5 tilesheet (being the only non-autotile A sheet). We'll get to autotiles in a little bit.

Here are the tile IDs for the non-autotile sheets:
Tilesheet B: 0 - 255
Tilesheet C: 256 - 511
Tilesheet D: 512 - 767
Tilesheet E: 768 - 1023
Tilesheet A5: 1536 - 1663

And here are some template PNGs you can lay over your tilesheet PNG image to see the numbers directly!
B:
tilesheet B numbering sheet.png
C:
tilesheet C numbering sheet.png
D:
tilesheet D numbering sheet.png
E:
tilesheet E numbering sheet.png
A5:
tilesheet A5 numbering sheet.png

For those paying attention, your eyes are not playing tricks on you; TileIDs 1024-1535 do not correspond to any tilesheet (at least as far as I can tell!). This is also true for TileIDs 1664 - 2047. I assume room was left here for future growth, but that's only a guess.


Autotiles

Here are the tile IDs for the autotile sheets:
Tilesheet A1: 2048 - 2815
Tilesheet A2: 2816 - 4351
Tilesheet A3: 4352 - 5887
Tilesheet A4: 5888 - 8191

Figuring out your tileID is somewhat more complicated for an autotile, as you might expect. First of all, the tilesheets are NOT numbered in a straightforward left-to-right, top-to-bottom fashion. Secondly, each autotile corresponds to up to 48 different shapes. (Note: There are only up to 47 unique shapes, but one shape repeats to give the math-friendly number 48.)

To make it easier, I've made a set of images to show you how to find your autotile TileID. For each tile you'll need to consult two images; the tilesheet numbering sheet and the autotile type shape sheet. There are three different types of autotiles: floor, wall, and waterfall types.

1) Find the starting TileID and the autotile type from the tilesheet numbering sheet. You can even place this image over top of your tilesheet to help you out. (Note: A1 autotiles contain animated autotiles. These look like three nearly-identical autotiles, but are actually treated as one autotile.)

2) Look on the correct autotile type numbering sheet to find the autotile shape you want, and add the corresponding number to the starting TileID.

Note: The plus signs (+) are located on these sheets to help you remember that you need to add the two numbers together to get your tileID.

Here are the template PNGs for autotiles!
A1:
tilesheet A1 numbering sheet.png
A2:
tilesheet A2 numbering sheet.png
A3:
tilesheet A3 numbering sheet.png
A4:
tilesheet A4 numbering sheet.png
Floor Type:
floor type autotile shapes.png
Wall Type:
wall type autotile shapes.png
Waterfall Type:
waterfall type autotile shapes.png

And there you have it! You now know how to find a TileID for any tile. Hopefully this information is helpful to some of you. :)
 
Last edited:

Anchovy

A Fish Called Amy
Veteran
Joined
Jan 9, 2019
Messages
40
Reaction score
25
First Language
English
Primarily Uses
RMMV
I'm definitely going to use these as templates. Thank you for creating and sharing these!
 

huanggaole

Villager
Member
Joined
Feb 29, 2020
Messages
13
Reaction score
17
First Language
Chinese
Primarily Uses
RMMV
Thank you! I'm using RMMV to generate random maps.
It's very useful to know how to code a map!
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
For those paying attention, your eyes are not playing tricks on you; TileIDs 1024-1535 do not correspond to any tilesheet (at least as far as I can tell!). This is also true for TileIDs 1664 - 2047. I assume room was left here for future growth, but that's only a guess.
Just wondering, is it possible that some of these missing IDs correspond to shadows placed with the shadow tool? I'm not sure if those shadows are implemented as a tile ID mind you... they might be more of a terrain tag sort of thing...
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,615
Reaction score
1,975
First Language
English
Primarily Uses
RMMV
I used to know the answer to this, but I've forgotten exactly why that's the case. There is a reason for it though.
 

Sigony

Crusader Masochist
Veteran
Joined
Aug 18, 2020
Messages
74
Reaction score
463
First Language
English
Primarily Uses
RMMV
This was very helpful, thank you.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Based on this screenshot alone, which one would you sell, and which to equip?
Some random sketch-letons.

I have a strong urge to make a tutorial video of all the random things I've learned since starting on my game. little helpful tips and stuff that may help people.
Do you guys think it's better to have all members in your team from the beginning (then you can pick who battles) or you gain team members as the story goes?
PL: Patch polonizujący do RPG Makera 2003 prawie gotowy! Mamy przetłumaczoną bazę danych (projekt), polskie fonty, wiadomości walki i jakieś 90% edytora.
Do przetłumacznia pozostało te 10% edytora i plik pomocy. Niedługo więcej informacji!

Forum statistics

Threads
107,479
Messages
1,029,969
Members
139,606
Latest member
Aerilate
Top