New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for autotile (RPG Maker format) #1022

Open
Frozenfire92 opened this Issue Jul 12, 2015 · 9 comments

Comments

Projects
None yet
5 participants
@Frozenfire92

Frozenfire92 commented Jul 12, 2015

Tiled is a great tool, especially for those who use Unity or game engines other than RPG maker. With the release of the newest humble bundle I foresee many people like myself wanting to use their new assets with Tiled (and eventually game engines other than RPG maker). It appears that their Autotile format is quite common and works well for compacting things, but makes it difficult to use in Tiled without an external tool.

I think it is within the scope of Tiled to support importing this format and then automatically slicing it up. While the terrain tool works well for some sprites, it doesn't seem to work with this format. There is an existing tool Remex but it only supports the 64x96 pixel image at a time. It would be better to automatically detect the size and split it accordingly (It appears 512x384 is standard)

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jul 12, 2015

Owner

It would definitely be interesting to support this type of terrain, though I have not seen it used outside of RPG Maker so I kind of disagree with the format being "quite common". Outside of RPG Maker, the format used by Tiled is actually quite common. In any case the question comes up a lot, I guess mainly because of the vast library of tilesets available alongside (or made for use with) RPG Maker.

I'm not sure what's the best way to support it. There are some options:

  • Ship a tool like Remex with Tiled. However, it is plain annoying to have to preprocess your tilesets and it needlessly increases the texture size.
  • Build into Tiled some intelligence about how to cut and recombine these autotiles. Unfortunately, when we go this way then this kind of code would need to be added to all libraries and frameworks out there that support Tiled maps.
  • Half the tile size so that Tiled maps can stay simple and compatible with existing libraries and frameworks, but allow the tools to apply RPG Maker stile automapping. This increases the size of the layer data by four and puts the complexity of dealing with the halved tile size in the UI. I guess this last approach is the one used by RPG Maker itself, but I do not know its map format.

In any case, if you want to help me get around to a feature like this, please do consider supporting me on Patreon. The amount of time I have for Tiled directly depends on how many hours I can afford to drop from my job.

Owner

bjorn commented Jul 12, 2015

It would definitely be interesting to support this type of terrain, though I have not seen it used outside of RPG Maker so I kind of disagree with the format being "quite common". Outside of RPG Maker, the format used by Tiled is actually quite common. In any case the question comes up a lot, I guess mainly because of the vast library of tilesets available alongside (or made for use with) RPG Maker.

I'm not sure what's the best way to support it. There are some options:

  • Ship a tool like Remex with Tiled. However, it is plain annoying to have to preprocess your tilesets and it needlessly increases the texture size.
  • Build into Tiled some intelligence about how to cut and recombine these autotiles. Unfortunately, when we go this way then this kind of code would need to be added to all libraries and frameworks out there that support Tiled maps.
  • Half the tile size so that Tiled maps can stay simple and compatible with existing libraries and frameworks, but allow the tools to apply RPG Maker stile automapping. This increases the size of the layer data by four and puts the complexity of dealing with the halved tile size in the UI. I guess this last approach is the one used by RPG Maker itself, but I do not know its map format.

In any case, if you want to help me get around to a feature like this, please do consider supporting me on Patreon. The amount of time I have for Tiled directly depends on how many hours I can afford to drop from my job.

@Frozenfire92

This comment has been minimized.

Show comment
Hide comment
@Frozenfire92

Frozenfire92 Jul 12, 2015

Thanks for the quick response,

Forgive me in being a bit uneducated in the commonality of this format. I think a lot of people like myself have bought the humble bundle and now have a ton of assets in a format for an engine they aren't interested in using.

Ship a tool like Remex with Tiled. However, it is plain annoying to have to preprocess your tilesets and it needlessly increases the texture size.

I think this is the best option. When creating a new tileset the dropdown for type could be Based on RPG Maker tileset which would then auto-detect and split into 64x96 sized chunks to be used by Remex (or the forked code integrated). I think this would make the process much smoother than it is now (cutting the image up and running remex on each individually before loading into tiled)

I thank you for your time you have invested in this project, it is very useful 😄 I will try and have a peek a the code for it and Remex over the next week and look into helping with this feature.

Frozenfire92 commented Jul 12, 2015

Thanks for the quick response,

Forgive me in being a bit uneducated in the commonality of this format. I think a lot of people like myself have bought the humble bundle and now have a ton of assets in a format for an engine they aren't interested in using.

Ship a tool like Remex with Tiled. However, it is plain annoying to have to preprocess your tilesets and it needlessly increases the texture size.

I think this is the best option. When creating a new tileset the dropdown for type could be Based on RPG Maker tileset which would then auto-detect and split into 64x96 sized chunks to be used by Remex (or the forked code integrated). I think this would make the process much smoother than it is now (cutting the image up and running remex on each individually before loading into tiled)

I thank you for your time you have invested in this project, it is very useful 😄 I will try and have a peek a the code for it and Remex over the next week and look into helping with this feature.

@lefticus

This comment has been minimized.

Show comment
Hide comment
@lefticus

lefticus Jul 12, 2015

I bought the Game Maker Humble Bundle myself and feel compelled to point out that much (most?) of the material in it has a Copyright statement such as:

The graphics included in the Product (the "Pirate Ship Tile Pack") may be used with any of ENTERBRAIN's game development software (include all related titles of "RPG MAKER Series" or "our products") that retains the Company's rights. You cannot use the Resource Pack with other game engines/software. User can create, distribute, or sell their original game by using the Resource Pack only if they meet all the following conditions:

If I read that correctly that means we cannot legally use these tilesets with tools like "tiled" anyhow.

This is now the second Humble Bundle with RPG Maker in it that I've bought and I've seen many copyright licenses similar to this one.

lefticus commented Jul 12, 2015

I bought the Game Maker Humble Bundle myself and feel compelled to point out that much (most?) of the material in it has a Copyright statement such as:

The graphics included in the Product (the "Pirate Ship Tile Pack") may be used with any of ENTERBRAIN's game development software (include all related titles of "RPG MAKER Series" or "our products") that retains the Company's rights. You cannot use the Resource Pack with other game engines/software. User can create, distribute, or sell their original game by using the Resource Pack only if they meet all the following conditions:

If I read that correctly that means we cannot legally use these tilesets with tools like "tiled" anyhow.

This is now the second Humble Bundle with RPG Maker in it that I've bought and I've seen many copyright licenses similar to this one.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jul 12, 2015

Owner

Right, that's the deal with RPG Maker's own tilesets unfortunately, so supporting them directly is pretty much only useful for 3rd party tilesets that were painted to be RPG Maker compatible.

Owner

bjorn commented Jul 12, 2015

Right, that's the deal with RPG Maker's own tilesets unfortunately, so supporting them directly is pretty much only useful for 3rd party tilesets that were painted to be RPG Maker compatible.

@Frozenfire92

This comment has been minimized.

Show comment
Hide comment
@Frozenfire92

Frozenfire92 Jul 12, 2015

I believe they addressed that here https://support.humblebundle.com/hc/en-us/articles/206156508 . I think limiting assets to a specific engine goes against what humble bundle is about anyhow, I believe all of the assets included in the humble bundle were as you said painted to be RPG maker compatible

Frozenfire92 commented Jul 12, 2015

I believe they addressed that here https://support.humblebundle.com/hc/en-us/articles/206156508 . I think limiting assets to a specific engine goes against what humble bundle is about anyhow, I believe all of the assets included in the humble bundle were as you said painted to be RPG maker compatible

@lefticus

This comment has been minimized.

Show comment
Hide comment
@lefticus

lefticus Jul 13, 2015

@Frozenfire92 Ah, thank you. I was pretty confused by that.

lefticus commented Jul 13, 2015

@Frozenfire92 Ah, thank you. I was pretty confused by that.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jul 13, 2015

Owner

@Frozenfire92 That's great to know!

Owner

bjorn commented Jul 13, 2015

@Frozenfire92 That's great to know!

@bjorn bjorn added the feature label Aug 24, 2015

@fmoo

This comment has been minimized.

Show comment
Hide comment
@fmoo

fmoo Jun 7, 2016

Just wanted to add a link to some docs on how autotiles work in RMVXA.

Like Remex (which is basically abandoned these days), that link only covers the most popular "A2" format, so I'll to provide some extra details from my investigation on the other "A" formats.

  • The "A1" format has the same number of tiles as A2, except the first three (column-wise) blocks out of every four blocks of microtiles are animations of each other (e.g., water tiles).
  • The "A3" format uses squre blocks of 16 minitiles for every block instead of the (rectangular) 24 minitiles from A1/A2. As a result, A3 supports rendering of square/rectangular surfaces only. This is used primarily for things like walls, steeped roofs, bridges, etc.
  • The "A4" format is a hybrid of A2 and A3, where below every block of 24-minitile surfaces, there is a 16-minitile square block for walls themed according to the above roof/floor surface block.
  • "A5" appears to be a generic, non-minitile based tilesheet.
  • "B" and "C" are for objects, and are generic, non-minitile based tilesheets as well.

fmoo commented Jun 7, 2016

Just wanted to add a link to some docs on how autotiles work in RMVXA.

Like Remex (which is basically abandoned these days), that link only covers the most popular "A2" format, so I'll to provide some extra details from my investigation on the other "A" formats.

  • The "A1" format has the same number of tiles as A2, except the first three (column-wise) blocks out of every four blocks of microtiles are animations of each other (e.g., water tiles).
  • The "A3" format uses squre blocks of 16 minitiles for every block instead of the (rectangular) 24 minitiles from A1/A2. As a result, A3 supports rendering of square/rectangular surfaces only. This is used primarily for things like walls, steeped roofs, bridges, etc.
  • The "A4" format is a hybrid of A2 and A3, where below every block of 24-minitile surfaces, there is a 16-minitile square block for walls themed according to the above roof/floor surface block.
  • "A5" appears to be a generic, non-minitile based tilesheet.
  • "B" and "C" are for objects, and are generic, non-minitile based tilesheets as well.
@kphillisjr

This comment has been minimized.

Show comment
Hide comment
@kphillisjr

kphillisjr Dec 27, 2016

Contributor

I also think this is a good idea, and will greatly expand on what @fmoo stated. Also I will say that the following information can be used by anyone wishing to import tiles into this map editor.

Tile Types

Generic Terrain autotile

These are the easiest to work with, and cover most of the auto-tiles. For RPGMaker VX Ace optimized tilesets these are a 16 pixel by 16 pixel grid. I know my example is smaller than this. The Blue area represents the edge case with other tiles, and the white area is the terrain type for the Auto-Tile.
coreautotile

Animated Terrain autotile

These are terrain auto-Tiles from above where you have 3 frames of animation side by side.

Generic Wall Auto-Tile

This works exactly the same as Terrain auto-Tiles, but lacks the small inner corner case. In General these tiles do not have interaction with other tile-types.
wallautotile

WaterFall Auto-Tiles

This tile type is a set of two 32px by 32px animated tiles side by side where each row is a frame of animation. This means that this tile takes up the same amount of space on a sprite sheet as a generic terrain auto-tile. This can form an animated wall auto-tile when you have 3 or more that can be linked together. In general this is the type of tile where the users need to configure on a set-by-set basis because this can involve 3 types of terrain ( Waterfall, Water, and land type )

RPG Maker Tile Layers

Tile Layer A1

This is the most complex of the sprite sheets, but in general all of these have the similar layout as shown below:
autotilea

Tile Layer A1 - Area A - Water/Ocean

This is a Animated Terrain Auto-tile. In general it is used for water.

Tile Layer A1 - Area B - Deep Water/Ocean

This is a Animated Terrain Auto-tile. In general it is used for deeper water, and sometimes is placed within Area A.

Tile Layer A1 - Area C - More animated Water Tiles

More Animated Terrain Auto-Tiles. To my knowledge these have been used for Lava, Ice, and even more water animations.

Tile Layer A1 - Area D - Water Tile decoration

These are generally used for decoration of water tiles in an auto-terrain format.

Tile Layer A1 - Area E - More Water Decoration Tiles

These could be terrain auto-tiles or waterfall tiles. Either way this section requires a lot of user input, but in general these are always two 32px by 32px tiles side by side, and sometimes 3 of these can be combined to form a wall auto-tile.

Tile Layer A2

This is a straight forward import, this is a grid of 8 by 4 terrain auto-tiles.

Tile Layer A3 - Exterior wall/Ceiling

This is used for exterior Ceiling/walls, and is a 8 by 4 grid of wall auto-tiles. I believe the easiest solution for now is to define each wall auto-tile as a terrain.

Tile Layer A4 - Wall/Ceiling

This is is simply a row of 8 terrain auto-tiles used for Ceilings followed by a row of 8 wall auto-tiles. In general this forms a total of 48 tiles total.

Tile Layer A5 - Generic Tiles

These are 32px by 32px tiles.

Tile Layer B to E - Generic Tiles

These are Objects of varying size.

Possible issues.

Animated Terrains

I have not found any simple way to create animated terrains yet, and this is a required feature for this bug report.

Cross-File Terrains

I have found that occasionally the terrain auto-tiles have the center fill-tile found in the TileA5 file. To my knowledge there is no easy way to resolve this issue without editing the input files directly.

Terrain Fill

There is no easy way to fill using defined terrains. Instead you need to fill using tiles in the tile sheet directly.

Possible Solution

There is many solutions for this, but the easiest would be to use import wizard. The Wizard will need to have the user help guide the import since there is going to be a large set of tiles imported in one go. Most of the work would be terrain definition/names, and the occasional cross-file terrain fix.

Contributor

kphillisjr commented Dec 27, 2016

I also think this is a good idea, and will greatly expand on what @fmoo stated. Also I will say that the following information can be used by anyone wishing to import tiles into this map editor.

Tile Types

Generic Terrain autotile

These are the easiest to work with, and cover most of the auto-tiles. For RPGMaker VX Ace optimized tilesets these are a 16 pixel by 16 pixel grid. I know my example is smaller than this. The Blue area represents the edge case with other tiles, and the white area is the terrain type for the Auto-Tile.
coreautotile

Animated Terrain autotile

These are terrain auto-Tiles from above where you have 3 frames of animation side by side.

Generic Wall Auto-Tile

This works exactly the same as Terrain auto-Tiles, but lacks the small inner corner case. In General these tiles do not have interaction with other tile-types.
wallautotile

WaterFall Auto-Tiles

This tile type is a set of two 32px by 32px animated tiles side by side where each row is a frame of animation. This means that this tile takes up the same amount of space on a sprite sheet as a generic terrain auto-tile. This can form an animated wall auto-tile when you have 3 or more that can be linked together. In general this is the type of tile where the users need to configure on a set-by-set basis because this can involve 3 types of terrain ( Waterfall, Water, and land type )

RPG Maker Tile Layers

Tile Layer A1

This is the most complex of the sprite sheets, but in general all of these have the similar layout as shown below:
autotilea

Tile Layer A1 - Area A - Water/Ocean

This is a Animated Terrain Auto-tile. In general it is used for water.

Tile Layer A1 - Area B - Deep Water/Ocean

This is a Animated Terrain Auto-tile. In general it is used for deeper water, and sometimes is placed within Area A.

Tile Layer A1 - Area C - More animated Water Tiles

More Animated Terrain Auto-Tiles. To my knowledge these have been used for Lava, Ice, and even more water animations.

Tile Layer A1 - Area D - Water Tile decoration

These are generally used for decoration of water tiles in an auto-terrain format.

Tile Layer A1 - Area E - More Water Decoration Tiles

These could be terrain auto-tiles or waterfall tiles. Either way this section requires a lot of user input, but in general these are always two 32px by 32px tiles side by side, and sometimes 3 of these can be combined to form a wall auto-tile.

Tile Layer A2

This is a straight forward import, this is a grid of 8 by 4 terrain auto-tiles.

Tile Layer A3 - Exterior wall/Ceiling

This is used for exterior Ceiling/walls, and is a 8 by 4 grid of wall auto-tiles. I believe the easiest solution for now is to define each wall auto-tile as a terrain.

Tile Layer A4 - Wall/Ceiling

This is is simply a row of 8 terrain auto-tiles used for Ceilings followed by a row of 8 wall auto-tiles. In general this forms a total of 48 tiles total.

Tile Layer A5 - Generic Tiles

These are 32px by 32px tiles.

Tile Layer B to E - Generic Tiles

These are Objects of varying size.

Possible issues.

Animated Terrains

I have not found any simple way to create animated terrains yet, and this is a required feature for this bug report.

Cross-File Terrains

I have found that occasionally the terrain auto-tiles have the center fill-tile found in the TileA5 file. To my knowledge there is no easy way to resolve this issue without editing the input files directly.

Terrain Fill

There is no easy way to fill using defined terrains. Instead you need to fill using tiles in the tile sheet directly.

Possible Solution

There is many solutions for this, but the easiest would be to use import wizard. The Wizard will need to have the user help guide the import since there is going to be a large set of tiles imported in one go. Most of the work would be terrain definition/names, and the occasional cross-file terrain fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment