[GBAFE] Modifying Minimap Tile Associations

If you’ve ever wanted to change what minimap tiles your terrain types will display as on the minimap, there’s a function at $A7A0C that handles that. As it’s a switch case statement I went ahead and made some macros for EA users:

#define MinimapTileTable $A7A38
#define TileHandler_Plain $A7B3C
#define TileHandler_Road $A7B40
#define TileHandler_VillageHouse $A7B4C
#define TileHandler_ArmoryVendor $A7B50
#define TileHandler_Arena $A7B54
#define TileHandler_Fort $A7B58
#define TileHandler_Gate $A7B5C
#define TileHandler_Forest $A7B60
#define TileHandler_Thicket $A7B64
#define TileHandler_SandDesert $A7B68
#define TileHandler_River $A7B6C
#define TileHandler_Mntn $A7B78
#define TileHandler_Peak $A7B7C
#define TileHandler_Bridge $A7B80
#define TileHandler_Water $A7B8A
#define TileHandler_SeaLake $A7B96
#define TileHandler_Floor $A7BA2
#define TileHandler_Pillar $A7BA6
#define TileHandler_Door $A7BAA
#define TileHandler_Throne $A7BB4
#define TileHandler_Chest $A7BB8
#define TileHandler_StoneRuins $A7BBC
#define TileHandler_Cliff $A7BC4
#define TileHandler_Ballista $A7BD0
#define TileHandler_Flat $A7BD4
#define TileHandler_Stairs $A7BD8
#define TileHandler_Walls $A7BE2
#define TileHandler_Valley $A7BEE
#define TileHandler_Blank $A7BF2

#define SetMinimapTileHandler(tileType, pointer) "PUSH; ORG MinimapTileTable+(tileType*4); POIN pointer; POP"

As an example, here’s how to make the Drawbridge terrain type show up as the bridge tile:

SetMinimapTileHandler(0x14, TileHandler_Bridge)

I think this would be a nice feature to have in FEBuilder’s Tileset Editor.


Some additional notes: the Road, River, Sea/Lake, Cliff and Walls handlers jump to some additional functions to display coasts and edges smoothly. The minimap tileset image is at $A1FBD8. There’s some room on the end to add custom tiles without breaking these functions.

1 Like

Oh, this is great! I’ve been needing this kind of thing! Hmmm… It looks like a bunch of relative branches, as per for a switch case. I guess l wouldn’t get lucky happening upon the same code in the other games? Oh, wait… Ah, good thing l waited to comment. Seems like l could brute force it after all, though l am by no means an expert at this.

Looks like FE6’s TileHandler_Plain, as you labeled it, is at 0x86EE0. l don’t think l can brute force the minimap tile table thing you listed (actually, l just now figured out how this really works, l probably can find the table), but that’s the main tile handler stuff. Both surprising and not surprising that it’s almost identical between 6 and 8. l can probably find the offset for FE7 (and the actual table for FE6) tomorrow if no one else does.

But, really, thanks a million for posting this! It’s one of those things l really wanted to change around.

(l’m so silly. FE6’s MinimapTileTable is literally right above the first pointer, at 0x86E18, isn’t it?)

To summarize my messy post:
FE6’s MinimapTileTable is at 0x86E18.
FE7U’s MinimapTileTable is at 0xA2480.
FE7 and FE8 are exactly identical, except the pointers obviously. FE6 has slight changes and a few less minimap options to choose from.

1 Like

Awesome, thanks so much for documenting the other versions!