• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[PokeFireRed] Resize choice boxes

  • 3
    Posts
    2
    Years
    • Seen Jan 10, 2025
    I'm putting the final touches on the intro to my decomp. The rival naming window should have 3 options:

    1. New Name
    2. Remi
    3. Elle

    The original box had 5 options, so now I'm left with:

    1. New Name
    2. Remi
    3. Elle
    4. <blank>
    5. <blank>

    Does anyone have any clues they can give me where/how to shorten this choice box to only show 3 options? https://i.imgur.com/tHnkK87.png
     
    I'm putting the final touches on the intro to my decomp. The rival naming window should have 3 options:

    1. New Name
    2. Remi
    3. Elle

    The original box had 5 options, so now I'm left with:

    1. New Name
    2. Remi
    3. Elle
    4. <blank>
    5. <blank>

    Does anyone have any clues they can give me where/how to shorten this choice box to only show 3 options? https://i.imgur.com/tHnkK87.png
    If you track down the function that calls either of the 2 arrays that contain the different preset names for the Player's character based on their gender, you'll land in the function that creates the window where the name choices are printed and that fills it with content.
    If you read the contents of said function, you can see that the very first line calls a function labeled AddWindow, which creates the window that will contain the name choices.
    This function reads a pointer to a struct WindowTemplate array.
    If we check the declaration of the array called here, which is sIntro_WindowTemplates, we see the specifications of the different windows created throughout the game's intro.
    Read each entry inside the array 1 by 1.
    What do you see?
    I see an entry using a label WIN_INTRO_NAMES.
    That label sounds pretty self-explanatory to me. It's likely the specifications of the window that contains the name choices during the intro.
    It has a default height of 10. If we reduce it to 6, what do we get?
    Left = Original, Right = Modification.
    [PokeCommunity.com] [PokeFireRed] Resize choice boxes


    And that's pretty much it.
     
    This is exactly what I needed. I was actually looking at the WIN_INTRO_NAMES template, but I was looking for a length based on number of objects in the array, not the default height setting. Thinking about it, the default name list is massive and there was only ever 4 names to choose from so that should have alerted me I was looking for the wrong thing.

    I combined what you mentioned with
    Code:
    Menu_InitCursor
    which determines the number of options the cursor can select, and now it's working perfect!

    Thanks for the help!
     
    Back
    Top