• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • 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.

How do I change the size of the text boxes in the battle menu?

bitKoder

completely unreasonable
  • 36
    Posts
    8
    Years
    • Seen Jun 22, 2025
    I have been digging through the pokeemerald battle code and have discovered how to edit the colors, font and position of text in the battle menus, but not how to change the size or position of the text boxes they are displayed in. Anyone know where I can find the code that triggers/controls the drawing of the battle menu text boxes?
     
    I have been digging through the pokeemerald battle code and have discovered how to edit the colors, font and position of text in the battle menus, but not how to change the size or position of the text boxes they are displayed in. Anyone know where I can find the code that triggers/controls the drawing of the battle menu text boxes?

    The text boxes are drawn according to the tilemap stored in graphics/battle_interface/textbox_map.bin
    You can edit it with Tilemap studio. Load graphics/battle_interface/textbox.png as the tileset.
     
    Hello, I hope nobody will mind me hijacking this thread, as I'm asking almost the same question! 🙈

    I want to be able to add a new "kind" of textbox and change its size... So like, how there's MSGBOX_NPC, I'd like to be able to call up MSGBOX_ALT and give it a different appearance and size.

    Is that doable? 😃
     
    Hello, I hope nobody will mind me hijacking this thread, as I'm asking almost the same question! 🙈

    I want to be able to add a new "kind" of textbox and change its size... So like, how there's MSGBOX_NPC, I'd like to be able to call up MSGBOX_ALT and give it a different appearance and size.

    Is that doable? 😃

    While your question is similar the answer is completely different.
    First off:
    Is that doable? 😃
    You can make the game do anything a GBA can do and I'm pretty sure that a GBA can display a text box that looks different from the usual text box.

    Then to answer the actual question:
    The msgbox command calls a std script depending on the message type. You can define a new message type in asm/macros/event.inc and add a std script for it in data/event_scripts.s.
    Normally the std scripts use the "message" script command to display the text box. You might instead use the "callnative" command to call a custom C function that draws your custom textbox.

    For reference, you can find the code for the message script command in src/scrcmd.c
     
    Thanks Anon822!
    I set up the tileset and disabled the loading of the user window so the default battle frame would show, and it works, but when the level up popup appears, it has no frame. Any idea how I can add a custom frame on this to match the battle message box?
    [PokeCommunity.com] How do I change the size of the text boxes in the battle menu?
     
    Thanks Anon822!
    I set up the tileset and disabled the loading of the user window so the default battle frame would show, and it works, but when the level up popup appears, it has no frame. Any idea how I can add a custom frame on this to match the battle message box?
    [PokeCommunity.com] How do I change the size of the text boxes in the battle menu?

    The border for that box is drawn by the HandleBattleWindow function. The values written to "var" are the different tilemap values that get written to vram. You can change those values to change what tiles the border uses (assuming that you already have the tiles for your frame in vram).
     
    Back
    Top