• 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.

[SOLVED] - Can you expand Tiles/Metatiles and Max Map Size limits?

  • 1
    Posts
    1
    Years
    • Seen Oct 24, 2024
    Please bear with me I'm just starting and my english is whatever but I'll try to keep it simple.

    I want to know if you can (and how to) get tilesets and a map size beyond game limits.

    I've found this in include/fieldmap.h
    #define NUM_TILES_IN_PRIMARY 512
    #define NUM_TILES_TOTAL 1024
    #define NUM_METATILES_IN_PRIMARY 512
    #define NUM_METATILES_TOTAL 1024
    #define NUM_PALS_IN_PRIMARY 6
    #define NUM_PALS_TOTAL 13
    #define MAX_MAP_DATA_SIZE 10240

    and in graphics_file_rules.mk a lot of

    $(TILESETGFXDIR)/secondary/someplace/tiles.4bpp: %.4bpp: %.png
    $(GFX) $< $@ -num_tiles 159 -Wnum_tiles

    (I'm using emerald-expansion btw)
    I have a couple of question about this.

    What are the limitations of these numbers? It's possible to have smth like 1400 in NUM_METATILES_TOTAL and 800 in NUM_METATILES_IN_PRIMARY ?
    The same about MAX_MAP_DATA_SIZE, can I just have a 16000 map size?
    If the answer is yes I assume there must be some other files that might need a tweak or some essential assets to help pull this off or improving performance idk I'd be super grateful for any kind of guidance, ty.
     
    Please bear with me I'm just starting and my english is whatever but I'll try to keep it simple.

    I want to know if you can (and how to) get tilesets and a map size beyond game limits.

    I've found this in include/fieldmap.h


    and in graphics_file_rules.mk a lot of



    (I'm using emerald-expansion btw)
    I have a couple of question about this.

    What are the limitations of these numbers? It's possible to have smth like 1400 in NUM_METATILES_TOTAL and 800 in NUM_METATILES_IN_PRIMARY ?
    The same about MAX_MAP_DATA_SIZE, can I just have a 16000 map size?
    If the answer is yes I assume there must be some other files that might need a tweak or some essential assets to help pull this off or improving performance idk I'd be super grateful for any kind of guidance, ty.
    The constants NUM_TILES_TOTAL and NUM_METATILES_TOTAL are already at their maximum values. All you can really do is change the primary constants to control how the (meta)tile numbers are split between the primary and secondary tilesets. Same applies to the palettes too, but it could be possible to increase the total palettes by 1.

    MAX_MAP_DATA_SIZE can be increased but doing so uses up precious RAM space. A good workaround for making larger maps is to stitch together multiple smaller maps and implement this modification to make it seamless.

    The numbers in graphics_file_rules.mk limit how many of the tiles in the png files are put into the game. You should change the numbers (or completely remove the limitation) if you're resizing the tileset png files.
     
    Back
    Top