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 RPG Maker map files #1889

Open
bjorn opened this Issue Feb 21, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@bjorn
Owner

bjorn commented Feb 21, 2018

This would be mainly to help people move away from RPG Maker, that have already done a lot of work on their maps. But if combined with saving to RPG Maker map format, it could also simply offer people an alternative for the built-in map editor.

Of course, there are many versions of RPG Maker and generally no documentation about their map formats is provided. But there's bound to be resources online written by people who have already tried to reverse-engineer the map format.

@EJlol

This comment has been minimized.

Show comment
Hide comment
@EJlol

EJlol Feb 22, 2018

RPG Maker XP uses the ruby marshal format. To further understand the format you will need to know 2 things, the ruby class definitions and which order the objects are saved. Both these things are easily accessible after purchasing RPG Maker XP, and it would not surprise me if someone documented it on the internet somewhere. If not, I may be able to document it for you. I believe VX and VX Ace kinda use the same method to save the mapfile, just with different class definitions. (though I do need to check that to be sure). I don't know much about MV though. They use javascript instead of ruby, so I assume they use a completely different save file.

EJlol commented Feb 22, 2018

RPG Maker XP uses the ruby marshal format. To further understand the format you will need to know 2 things, the ruby class definitions and which order the objects are saved. Both these things are easily accessible after purchasing RPG Maker XP, and it would not surprise me if someone documented it on the internet somewhere. If not, I may be able to document it for you. I believe VX and VX Ace kinda use the same method to save the mapfile, just with different class definitions. (though I do need to check that to be sure). I don't know much about MV though. They use javascript instead of ruby, so I assume they use a completely different save file.

@Koopa1018

This comment has been minimized.

Show comment
Hide comment
@Koopa1018

Koopa1018 Feb 22, 2018

How do you intend to handle autotiles? Doesn't seem like Tiled has quite the feature set to make that easy to handle, at least on the user side. It's almost got it with the Terrain brush,
but that can't do single-tile spots of terrain.
Granted, I haven't quite figured out Wang tiles yet, so that might have potential.

EDIT: Oops, completely forgot about automapping. That'll almost certainly do. (Would be nice to have it auto-generate the rulemaps for that, though.)

Koopa1018 commented Feb 22, 2018

How do you intend to handle autotiles? Doesn't seem like Tiled has quite the feature set to make that easy to handle, at least on the user side. It's almost got it with the Terrain brush,
but that can't do single-tile spots of terrain.
Granted, I haven't quite figured out Wang tiles yet, so that might have potential.

EDIT: Oops, completely forgot about automapping. That'll almost certainly do. (Would be nice to have it auto-generate the rulemaps for that, though.)

@EJlol

This comment has been minimized.

Show comment
Hide comment
@EJlol

EJlol Feb 23, 2018

Actually the autotiles that RPG Maker uses are not really suitable with Tiled without any tileset modifications. RPG Maker splits the tiles in several parts, and then combining them again to get the correct tile, whereas Tiled is unable to do that. To be able to do that you have to create a 16x16 grid on a 32x32 tileset, effectively quadrupling the size of the map... Where as the terrain, wang and automapping can be used in some ways for autotiling, they cannot split and combine tiles. For 2000/2003 and XP it is not a huge problem if autotiles aren't supported cause they aren't used a lot, however VX and VX Ace are mostly based on autotiles (again I don't know anything about MV). This may make it more difficult to support VX and VX Ace.

EJlol commented Feb 23, 2018

Actually the autotiles that RPG Maker uses are not really suitable with Tiled without any tileset modifications. RPG Maker splits the tiles in several parts, and then combining them again to get the correct tile, whereas Tiled is unable to do that. To be able to do that you have to create a 16x16 grid on a 32x32 tileset, effectively quadrupling the size of the map... Where as the terrain, wang and automapping can be used in some ways for autotiling, they cannot split and combine tiles. For 2000/2003 and XP it is not a huge problem if autotiles aren't supported cause they aren't used a lot, however VX and VX Ace are mostly based on autotiles (again I don't know anything about MV). This may make it more difficult to support VX and VX Ace.

@Koopa1018

This comment has been minimized.

Show comment
Hide comment
@Koopa1018

Koopa1018 Feb 23, 2018

Indeed, RM does do that. A potential workaround that I can see (which has some serious flaws): have Tiled do the tileset modifications for you. For each autotile in a set, create an additional tileset image containing every useful combination of autotile parts, and then pull from that set when converting the map to .tmx.
This would definitely keep the map size un-quadrupled, but you would have to store all those extra images created...which would be awkward and would probably offset the space saved by a smaller map file, especially for VX/A maps. That may be a necessary evil, but hey, not my place to say. ;) It would also be pretty awkward to design such a system to be able to save back to the RM map formats, I would guess.

In any case, I wouldn't call autotiles "not used a lot." Sure, certain sets in XP mostly work without, but leaving out autotiles would break (or rather, make very ugly) the following in XP and 2K/3 alike: paths, dirt patches, dark spots of grass, the void beyond the interiors of houses, dungeon hazards (ice, pits, lava, etc.), more than half of the average world map (mountains, forests, poison swamps, snow...), water (for world maps and close-up scenes both)....

On that note, water tiles in 2K/3. One center tile, two possible border sets (edges, inner and outer corners), a "deep water" set that has to fit inside the center tile (including corners, inner and outer), times three animation frames each (larger files, if the image-per-tileset method is used), and none of this in the conventional autotile format. If you guys decide to go ahead with RM2K/3 map importing but skip water tiles, I completely understand.

Regardless, if I hadn't already made the switch from RM to Tiled, and was still considering, discovering that an official map importer couldn't do autotiles would be a serious blow against the program in my mind.

Koopa1018 commented Feb 23, 2018

Indeed, RM does do that. A potential workaround that I can see (which has some serious flaws): have Tiled do the tileset modifications for you. For each autotile in a set, create an additional tileset image containing every useful combination of autotile parts, and then pull from that set when converting the map to .tmx.
This would definitely keep the map size un-quadrupled, but you would have to store all those extra images created...which would be awkward and would probably offset the space saved by a smaller map file, especially for VX/A maps. That may be a necessary evil, but hey, not my place to say. ;) It would also be pretty awkward to design such a system to be able to save back to the RM map formats, I would guess.

In any case, I wouldn't call autotiles "not used a lot." Sure, certain sets in XP mostly work without, but leaving out autotiles would break (or rather, make very ugly) the following in XP and 2K/3 alike: paths, dirt patches, dark spots of grass, the void beyond the interiors of houses, dungeon hazards (ice, pits, lava, etc.), more than half of the average world map (mountains, forests, poison swamps, snow...), water (for world maps and close-up scenes both)....

On that note, water tiles in 2K/3. One center tile, two possible border sets (edges, inner and outer corners), a "deep water" set that has to fit inside the center tile (including corners, inner and outer), times three animation frames each (larger files, if the image-per-tileset method is used), and none of this in the conventional autotile format. If you guys decide to go ahead with RM2K/3 map importing but skip water tiles, I completely understand.

Regardless, if I hadn't already made the switch from RM to Tiled, and was still considering, discovering that an official map importer couldn't do autotiles would be a serious blow against the program in my mind.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Feb 23, 2018

Owner

Probably 32x32 tile RPG Maker maps would import as 16x16 tile Tiled maps, so that the autotiles can be handled correctly. The support for autotiling compatible with RPG Maker could be provided with another tool (#1022).

Owner

bjorn commented Feb 23, 2018

Probably 32x32 tile RPG Maker maps would import as 16x16 tile Tiled maps, so that the autotiles can be handled correctly. The support for autotiling compatible with RPG Maker could be provided with another tool (#1022).

@Koopa1018

This comment has been minimized.

Show comment
Hide comment
@Koopa1018

Koopa1018 Feb 24, 2018

Ah, okay. That works.

Koopa1018 commented Feb 24, 2018

Ah, okay. That works.

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