Autotile Tile IDs

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
Due to image-linking limits, this tutorial won't have any images. To see it with images, click here.

Autotile Tile IDs

Introduction

This was something I was bored enough to experiment with and learn a little more about. Okay, it was more like I had to since I'm writing a Tile Substitution / Placement script that -- as of this writing -- will be up very soon. Some of the information here is probably a no-brainer to those who worked with autotiles before.

Autotile Indexes

Normal Autotile Indexes

Each autotile contains 48 (ranges from 0..47) different tiles which appear in different directions. I have put together a list that explains all 48 of them should you ever want to use this information in some way. Here they are:

  • 00 Center (No edges)
  • 01 ↖ (Outside Corner) Edge
  • 02 ↗ (OC) Edge
  • 03 ↖↗ (OC) Edges
  • 04 ↘ (OC) Edges
  • 05 ↖↘ (OC) Edges
  • 06 ↗↘ (OC) Edges
  • 07 ↖↗↘ (OC) Edges
  • 08 ↙ (OC) Edge
  • 09 ↖↙ (OC) Edges
  • 10 ↙↗ (OC) Edges
  • 11 ↖↙↗ (OC) Edges
  • 12 ↙↘ (OC) Edges
  • 13 ↖↙↘ (OC) Edges
  • 14 ↙↗↘ (OC) Edges
  • 15 ↖↗↙↘ (OC) Edges
  • 16 ← Edge
  • 17 ←, ↗ (OC) Edges
  • 18 ←, ↘ (OC) Edges
  • 19 ←, ↗↘ (OC) Edges
  • 20 ↑ Edge
  • 21 ↑, ↘ (OC) Edges
  • 22 ↑, ↙ (OC) Edges
  • 23 ↑, ↙↘ (OC) Edges
  • 24 → Edge
  • 25 →, ↙ (OC) Edges
  • 26 →, ↖ (OC) Edges
  • 27 →, ↖↙ (OC) Edges
  • 28 ↓ Edge
  • 29 ↓, ↖ (OC) Edges
  • 30 ↓, ↗ (OC) Edges
  • 31 ↓, ↖↗ (OC) Edges
  • 32 ←→ Edges
  • 33 ↑↓ Edges
  • 34 ↖ (Inside Corner) Edge
  • 35 ↖ (IC), ↘ (OC) Edge
  • 36 ↗ (IC) Edge
  • 37 ↗ (IC), ↙ (OC) Edge
  • 38 ↘ (IC) Edge
  • 39 ↖ (OC), ↘ (IC) Edge
  • 40 ↙ (IC) Edge
  • 41 ↙ (IC), ↗ (OC) Edge
  • 42 ↑←→ Edges
  • 43 ↑←↓ Edges
  • 44 ↓←→ Edges
  • 45 ↑→↓ Edges
  • 46 ↖↗↙↘ (IC) Edges
  • 47 Autotile Display Graphic
Tile A1 Block E Indexes

Behavior of autotiles for waterfalls. Indexes 4 through 47 are the same.

  • 00 Center (No edges)
  • 01 ← Edge
  • 02 → Edge
  • 03 ← and → Edge
  • 04..47 ???
Tile A3 Roofs and Walls / Tile A4 Walls

Behavior of autotiles for Tile A3 Roofs, Tile A3 and A4 Walls. Indexes 16 through 47 are the same.

  • 00 Center (No edges)
  • 01 ← Edge
  • 02 ↑ Edge
  • 03 ↖ Edge
  • 04 → Edge
  • 05 ←→ Edges
  • 06 ↗ Edge
  • 07 ↑←→ Edges
  • 08 ↓ Edge
  • 09 ↙ Edge
  • 10 ↑↓ Edges
  • 11 ←↑↓ Edges
  • 12 ↘ Edge
  • 13 ↓←→ Edges
  • 14 →↑↓ Edges
  • 15 ←→↑↓ Edges
  • 16..47 ???
Autotiles & Tileset Tile IDs

Tile A1 Tile IDs

Please look into Tile A1 Block E Indexes for info on the Block E Autotiles

  • 00 Block A (2048..2095)
  • 01 Block B (2096..2143)
  • 02 Block C #1 (2144..2191) (Uses Layer 2)
  • 03 Block C #2 (2192..2239) (Uses Layer 2)
  • 04 Block D #1 (2240..2287)
  • 05 Block E #1 (2288..2335)
  • 06 Block D #2 (2336..2383)
  • 07 Block E #2 (2384..2431)
  • 08 Block D #3 (2432..2479)
  • 09 Block E #3 (2480..2527)
  • 10 Block D #4 (2528..2575) (Note: Below D #3)
  • 11 Block E #4 (2576..2623) (Note: Below E #3)
  • 12 Block D #5 (2624..2671) (Note: Across D #3)
  • 13 Block E #5 (2672..2719) (Note: Across E #3)
  • 14 Block D #6 (2720..2767) (Note: Across D #4 / Below D #5)
  • 15 Block E #6 (2768..2815) (Note: Across E #4 / Below E #5)
Tile A2 Tile IDs

  • 16 Block A #1: Ground A1-1 (2816..2863)
  • 17 Block A #1: Pattern A1-1 (2864..2911) (Uses Layer 2)
  • 18 Block A #1: Ground A1-2 (2912..2959)
  • 19 Block A #1: Pattern A1-2 (2960..3007) (Uses Layer 2)
  • 20 Block B #1: Pattern B1-1 (3008..3055) (Uses Layer 2)
  • 21 Block B #1: Pattern B1-2 (3056..3103) (Uses Layer 2)
  • 22 Block B #1: Pattern B1-3 (3104..3152) (Uses Layer 2)
  • 23 Block B #1: Pattern B1-4 (3153..3199) (Uses Layer 2)
  • 24 Block A #2: Ground A2-1 (3200..3247)
  • 25 Block A #2: Pattern A2-1 (3248..3295) (Uses Layer 2)
  • 26 Block A #2: Ground A2-2 (3296..3343)
  • 27 Block A #2: Pattern A2-2 (3344..3391) (Uses Layer 2)
  • 28 Block B #2: Pattern B2-1 (3392..3439) (Uses Layer 2)
  • 29 Block B #2: Pattern B2-2 (3440..3487) (Uses Layer 2)
  • 30 Block B #2: Pattern B2-3 (3488..3535) (Uses Layer 2)
  • 31 Block B #2: Pattern B2-4 (3536..3583) (Uses Layer 2)
  • 32 Block A #3: Ground A3-1 (3584..3631)
  • 33 Block A #3: Pattern A3-1 (3632..3679) (Uses Layer 2)
  • 34 Block A #3: Ground A3-2 (3680..3727)
  • 35 Block A #3: Pattern A3-2 (3728..3775) (Uses Layer 2)
  • 36 Block B #3: Pattern B3-1 (3776..3823) (Uses Layer 2)
  • 37 Block B #3: Pattern B3-2 (3824..3871) (Uses Layer 2)
  • 38 Block B #3: Pattern B3-3 (3872..3919) (Uses Layer 2)
  • 39 Block B #3: Pattern B3-4 (3920..3967) (Uses Layer 2)
  • 40 Block A #4: Ground A4-1 (3968..4015)
  • 41 Block A #4: Pattern A4-1 (4016..4063) (Uses Layer 2)
  • 42 Block A #4: Ground A4-2 (4064..4111)
  • 43 Block A #4: Pattern A4-2 (4112..4159) (Uses Layer 2)
  • 44 Block B #4: Pattern B4-1 (4160..4207) (Uses Layer 2)
  • 45 Block B #4: Pattern B4-2 (4208..4255) (Uses Layer 2)
  • 46 Block B #4: Pattern B4-3 (4256..4303) (Uses Layer 2)
  • 47 Block B #4: Pattern B4-4 (4304..4351) (Uses Layer 2)
Tile A3 Tile IDs

Please look into Tile A3 Roofs and Walls / Tile A4 Walls for info on the Roof and Wall Autotiles

  • 48 Exterior Roof #1 (4352..4399)
  • 49 Exterior Roof #2 (4400..4447)
  • 50 Exterior Roof #3 (4448..4495)
  • 51 Exterior Roof #4 (4496..4543)
  • 52 Exterior Roof #5 (4544..4591)
  • 53 Exterior Roof #6 (4592..4639)
  • 54 Exterior Roof #7 (4640..4687)
  • 55 Exterior Roof #8 (4688..4735)
  • 56 Exterior Wall #1 (4736..4783)
  • 57 Exterior Wall #2 (4784..4831)
  • 58 Exterior Wall #3 (4832..4879)
  • 59 Exterior Wall #4 (4880..4927)
  • 60 Exterior Wall #5 (4928..4975)
  • 61 Exterior Wall #6 (4976..5023)
  • 62 Exterior Wall #7 (5024..5071)
  • 63 Exterior Wall #8 (5072..5119)
  • 64 Exterior Roof #9 (5120..5167)
  • 65 Exterior Roof #10 (5168..5215)
  • 66 Exterior Roof #11 (5216..5263)
  • 67 Exterior Roof #12 (5264..5311)
  • 68 Exterior Roof #13 (5312..5359)
  • 69 Exterior Roof #14 (5360..5407)
  • 70 Exterior Roof #15 (5408..5455)
  • 71 Exterior Roof #16 (5456..5503)
  • 72 Exterior Wall #9 (5504..5551)
  • 73 Exterior Wall #10 (5552..5599)
  • 74 Exterior Wall #11 (5600..5647)
  • 75 Exterior Wall #12 (5648..5695)
  • 76 Exterior Wall #13 (5696..5743)
  • 77 Exterior Wall #14 (5744..5791)
  • 78 Exterior Wall #15 (5792..5839)
  • 79 Exterior Wall #16 (5840..5887)
Tile A4 Tile IDs

Please look into Tile A3 Roofs and Walls / Tile A4 Walls for info on the Wall Autotiles

  • 80 Interior Roof #1 (5888..5935)
  • 81 Interior Roof #2 (5936..5983)
  • 82 Interior Roof #3 (5984..6031)
  • 83 Interior Roof #4 (6032..6079)
  • 84 Interior Roof #5 (6080..6127)
  • 85 Interior Roof #6 (6128..6175)
  • 86 Interior Roof #7 (6176..6223)
  • 87 Interior Roof #8 (6224..6271)
  • 88 Interior Wall #1 (6272..6319)
  • 89 Interior Wall #2 (6320..6367)
  • 90 Interior Wall #3 (6368..6415)
  • 91 Interior Wall #4 (6416..6463)
  • 92 Interior Wall #5 (6464..6511)
  • 93 Interior Wall #6 (6512..6559)
  • 94 Interior Wall #7 (6560..6607)
  • 95 Interior Wall #8 (6608..6655)
  • 96 Interior Roof #9 (6656..6703)
  • 97 Interior Roof #10 (6704..6751)
  • 98 Interior Roof #11 (6752..6799)
  • 99 Interior Roof #12 (6800..6847)
  • 100 Interior Roof #13 (6848..6895)
  • 101 Interior Roof #14 (6896..6943)
  • 102 Interior Roof #15 (6944..6991)
  • 103 Interior Roof #16 (6992..7039)
  • 104 Interior Wall #9 (7040..7087)
  • 105 Interior Wall #10 (7088..7135)
  • 106 Interior Wall #11 (7136..7183)
  • 107 Interior Wall #12 (7184..7231)
  • 108 Interior Wall #13 (7232..7279)
  • 109 Interior Wall #14 (7280..7327)
  • 110 Interior Wall #15 (7328..7375)
  • 111 Interior Wall #16 (7376..7423)
  • 112 Interior Roof #17 (7424..7471)
  • 113 Interior Roof #18 (7472..7519)
  • 114 Interior Roof #19 (7520..7567)
  • 115 Interior Roof #20 (7568..7615)
  • 116 Interior Roof #21 (7616..7663)
  • 117 Interior Roof #22 (7664..7711)
  • 118 Interior Roof #23 (7712..7759)
  • 119 Interior Roof #24 (7760..7807)
  • 120 Interior Wall #17 (7808..7855)
  • 121 Interior Wall #18 (7856..7903)
  • 122 Interior Wall #19 (7904..7951)
  • 123 Interior Wall #20 (7952..7999)
  • 124 Interior Wall #21 (8000..8047)
  • 125 Interior Wall #22 (8048..8095)
  • 126 Interior Wall #23 (8096..8143)
  • 127 Interior Wall #24 (8144..8191)
Tile A5 Tile IDs

  • 0 (1536)
  • 1 (1537)
  • 2 (1538)
  • 3 (1539)
  • 4 (1540)
  • 5 (1541)
  • 6 (1542)
  • 7 (1543)
  • 8 (1544)
  • 9 (1545)
  • 10 (1546)
  • 11 (1547)
  • 12 (1548)
  • 13 (1549)
  • 14 (1550)
  • 15 (1551)
  • 16 (1552)
  • 17 (1553)
  • 18 (1554)
  • 19 (1555)
  • 20 (1556)
  • 21 (1557)
  • 22 (1558)
  • 23 (1559)
  • 24 (1560)
  • 25 (1561)
  • 26 (1562)
  • 27 (1563)
  • 28 (1564)
  • 29 (1565)
  • 30 (1566)
  • 31 (1567)
  • 32 (1568)
  • 33 (1569)
  • 34 (1570)
  • 35 (1571)
  • 36 (1572)
  • 37 (1573)
  • 38 (1574)
  • 39 (1575)
  • 40 (1576)
  • 41 (1577)
  • 42 (1578)
  • 43 (1579)
  • 44 (1580)
  • 45 (1581)
  • 46 (1582)
  • 47 (1583)
  • 48 (1584)
  • 49 (1585)
  • 50 (1586)
  • 51 (1587)
  • 52 (1588)
  • 53 (1589)
  • 54 (1590)
  • 55 (1591)
  • 56 (1592)
  • 57 (1593)
  • 58 (1594)
  • 59 (1595)
  • 60 (1596)
  • 61 (1597)
  • 62 (1598)
  • 63 (1599)
  • 64 (1600)
  • 65 (1601)
  • 66 (1602)
  • 67 (1603)
  • 68 (1604)
  • 69 (1605)
  • 70 (1606)
  • 71 (1607)
  • 72 (1608)
  • 73 (1609)
  • 74 (1610)
  • 75 (1611)
  • 76 (1612)
  • 77 (1613)
  • 78 (1614)
  • 79 (1615)
  • 80 (1616)
  • 81 (1617)
  • 82 (1618)
  • 83 (1619)
  • 84 (1620)
  • 85 (1621)
  • 86 (1622)
  • 87 (1623)
  • 88 (1624)
  • 89 (1625)
  • 90 (1626)
  • 91 (1627)
  • 92 (1628)
  • 93 (1629)
  • 94 (1630)
  • 95 (1631)
  • 96 (1632)
  • 97 (1633)
  • 98 (1634)
  • 99 (1635)
  • 100 (1636)
  • 101 (1637)
  • 102 (1638)
  • 103 (1639)
  • 104 (1640)
  • 105 (1641)
  • 106 (1642)
  • 107 (1643)
  • 108 (1644)
  • 109 (1645)
  • 110 (1646)
  • 111 (1647)
  • 112 (1648)
  • 113 (1649)
  • 114 (1650)
  • 115 (1651)
  • 116 (1652)
  • 117 (1653)
  • 118 (1654)
  • 119 (1655)
  • 120 (1656)
  • 121 (1657)
  • 122 (1658)
  • 123 (1659)
  • 124 (1660)
  • 125 (1661)
  • 126 (1662)
  • 127 (1663)
Tile B - E Tile IDs

  • B Tile B Set (0..255)
  • C Tile C Set (256..511)
  • D Tile D Set (512..767)
  • E Tile E Set (768..1023)

Formulas

Now you're probably wondering, "okay, now what?" So say you need to call them or change them through the $game_map.data[x, y, i] = value call and you need to use an autotile for some reason. See, autotiles can't shape themselves, so you need to find the tile ID that best suits where you're putting a particular autotile. Now if you can't be bothered to remember all of the tile IDs and such (and honestly, I can't say I blame you because I wouldn't either), then you can use a quick formula for each tileset.

Formula for Tile A1 - Tile A4

2048 + (48 * autotile) + index

Autotile: 0..127

Index: 0..47

Formula for Tile A5

1536 + (column + (row * 8))

Column: 0..7

Row: 0..15

Formula for Tile B - E

(256 * set) + (column + (8 * row))

Set: 0: B, 1: C, 2: D, 3: E

Column: 0..7

Row: 0..31
 
Last edited by a moderator:

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
Got it. I wasn't quite sure what to tag it as first but now I do, and thanks.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
Do you know how to calculate which of the many variations that a single autotile should be drawn with?

For example, I want to draw one tile of sand, so I would provide the autotile ID but how do I compute the index?
 
Last edited by a moderator:

PK8

I sense there's something in the wind...
Veteran
Joined
Mar 17, 2012
Messages
1,220
Reaction score
152
Primarily Uses
Don't mind me if I misinterpret stuff. I'm a bit sleepy, but I think I read your question right. Correct me if I'm wrong on it.


To get the autotile index (variations) of an autotile, you could use something like this:


($game_map.data[x, y, 0] - 2048) % 48


Also, if you're looking to get the index of an autotile set, you could also use this (It's a bit of a complex but I don't have much of an idea how to turn it into something simple yet:


($game_map.data[x, y, 0] - (($game_map.data[x, y, 0] - 2048) % 48) - 2048) / 48
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
I meant when you're actually creating autotiles, the same way when you're using an editor and you're drawing autotiles across the map.

I'm trying to simulate the same effect in order to complete the tile swap script without asking users to look up some random internal index.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

i watched the sonic movie it was pretty good i hope they make a sequel
tomorrow I'ma go on a cruise for the first time ever... lets hope I'll survive the experience!
Omg! 8 years in this forum :o
Ksi
Streaming the last of the RMN Valentiny event games so feel free to drop on by and watch me cry (whether that's from laughter, rage or sheer pain, who knows?)
Today I went to sleep without setting an alarm, so I could sleep more than 2 hours. I woke up after 2 hours.

Forum statistics

Threads
94,309
Messages
919,827
Members
124,060
Latest member
jloppnow
Top