• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Map] [Pokeemerald] Reorganizing Tilesets

247
Posts
6
Years
    • Seen today
    I've been messing around with some mapping recently, and as I've been going about the process of picking out tiles from the tilesets, I'm consistently annoyed by the fact that some similar tiles are not next to each other. For example, here's a snapshot of gTileSet_GenericBuilding:
    Spoiler:
    You may notice that there are two versions of the orange-ish chair near the top, and then four versions of it towards the bottom. Multiple versions of bookshelves and beds are scattered about as well. I can see that they seem to be organized more by the flooring, being either that wood paneling or the green carpet, but even that is not fully consistent.

    What I'd like to do is reorganize the tileset so that all versions of one type of chair are all next to each other, then all versions of one type of bed are next to each other, and so on. However, I know that, if I just start moving them around in Porymap, all of the maps that use this tileset will get completely messed up. Is there any way to move tiles around in a tileset, and also avoid breaking all of the maps that use that tileset without having to redraw every map?
     
    448
    Posts
    6
    Years
    • Seen May 6, 2024
    I've been messing around with some mapping recently, and as I've been going about the process of picking out tiles from the tilesets, I'm consistently annoyed by the fact that some similar tiles are not next to each other. For example, here's a snapshot of gTileSet_GenericBuilding:You may notice that there are two versions of the orange-ish chair near the top, and then four versions of it towards the bottom. Multiple versions of bookshelves and beds are scattered about as well. I can see that they seem to be organized more by the flooring, being either that wood paneling or the green carpet, but even that is not fully consistent.

    What I'd like to do is reorganize the tileset so that all versions of one type of chair are all next to each other, then all versions of one type of bed are next to each other, and so on. However, I know that, if I just start moving them around in Porymap, all of the maps that use this tileset will get completely messed up. Is there any way to move tiles around in a tileset, and also avoid breaking all of the maps that use that tileset without having to redraw every map?

    I don't see why you couldn't write a program that:
    - Swaps the metatile data of any given 2 metatiles
    - Goes through every map using that tileset and swaps the metatile indices of those two metatiles

    It would probably be the best to implement it into porymap, so that you get to use its codebase and GUI.
     
    247
    Posts
    6
    Years
    • Seen today
    Took me a hot minute, but I did end up writing my own program to handle this!

    It would probably be the best to implement it into porymap, so that you get to use its codebase and GUI.

    I tried doing this, but it was quickly becoming a pain trying to follow the conventions of the codebase and figure out how to handle Qt Creator all at once. I ended up just making a simple WinForms app, since I'm more comfortable with C#.
     
    448
    Posts
    6
    Years
    • Seen May 6, 2024
    Took me a hot minute, but I did end up writing my own program to handle this!



    I tried doing this, but it was quickly becoming a pain trying to follow the conventions of the codebase and figure out how to handle Qt Creator all at once. I ended up just making a simple WinForms app, since I'm more comfortable with C#.

    Nice to hear!
    Would you mind sharing the program? I bet others could also find it useful.
     
    247
    Posts
    6
    Years
    • Seen today
    Nice to hear!
    Would you mind sharing the program? I bet others could also find it useful.

    Edit: This is now a link to the folder that holds all of the program's data. You need all of the files to be together in the same folder for the .exe to run properly.

    Here's a Google drive link to the program. Wherever you place the .exe, the organizer will create a text file called "DefaultDirectory.txt" so as to store where you last selected a repository. This makes it so that you don't have to keep re-navigating to the folder that holds your repository/repositories every time you use this program.

    Just select your repo folder, then the primary and secondary tileset folders, and then wait a few seconds as the program renders the metatileset. The metatiles may be a bit small for some people.

    To select your metatiles that you want to swap positions of, first select one of the white boxes in the middle of the window. Then click on the metatile in the metatileset image. Do the same for the other box, then click the Swap button to swap their positions. After a few seconds, the program will reorganize the metatileset accordingly, as well as update all of the maps that use that metatileset so that none of your maps break.

    If you want to change which tiles you're swapping, just click on one of the middle boxes again and select a new metatile from the metatileset image. You can also change which tilesets you are working with or which repo you're working on by clicking their respective buttons and choosing a different folder.

    The swapping and metatileset image rendering processes are faster for tilesets that aren't used by many maps and and tilesets that are smaller, respectively.

    You cannot swap metatiles between the primary and secondary tilesets. While I was able to have that functionality work at one point, there would be issues with maps that only use the primary tileset and not the secondary, or vice versa. Based on that, I've prevented that action to be taken in this program.
     
    Last edited:
    247
    Posts
    6
    Years
    • Seen today
    Just updated the program:

    - No longer breaks Porymap prefabs
    - Works with repositories that use the older data/tilesets/metatiles.inc instead of src/data/tilesets/metatiles.h
     
    247
    Posts
    6
    Years
    • Seen today
    Substantial update:

    - You can now swap tiles faster and receive much faster feedback. Once you have made all of the swaps you want to make, you then click the new "Apply" button to have the changes actually be reflected in your project's data. If you don't click "Apply", none of the changes that you've made will be applied.
     
    1
    Posts
    158
    Days
    • Seen Apr 26, 2024
    Substantial update:

    - You can now swap tiles faster and receive much faster feedback. Once you have made all of the swaps you want to make, you then click the new "Apply" button to have the changes actually be reflected in your project's data. If you don't click "Apply", none of the changes that you've made will be applied.
    Its not working for me i downloaded the .exe file but its not running can you tell me what i am doing wrong
     
    247
    Posts
    6
    Years
    • Seen today
    Its not working for me i downloaded the .exe file but its not running can you tell me what i am doing wrong
    Unfortunately, you aren't doing anything wrong. I just tried it myself, and the downloaded version of the .exe wouldn't run for me. It might be a security thing, since downloading and running an .exe is generally not safe. I'll see if I can figure out a way to get it to run without threatening someone's computer security. For now, I'll add a note by the link in the earlier post saying that the .exe isn't working at the moment.
     
    Back
    Top