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

[Pokeemerald] ORAS-style Key Item Wheel

  • 4
    Posts
    6
    Years
    • Seen Nov 6, 2023
    This adds a Gen VI-inspired Key Item registration menu to pokeemerald, allowing you to register up to 4 Key Items at the same time and pick from them by pressing SELECT+DPAD.

    When designing this I wanted to use as few palettes as possible, so that it doesn't conflict with having a lot of NPCs or sprites on-screen. This uses only 1 sprite palette (for the UI boxes) and 2 BG palettes (reusing the slots for UI text and windows), so displays correctly in basically any situation.

    Like all my features, this is compatible with vanilla save files--a Key Item registered in vanilla will migrate over. I reuse some unused rematch entries to store the 4 registered items in the saveblock:
    Code:
    // MAX_REMATCH_ENTRIES decreased from vanilla's 100 to 92
    // This is to accomodate 4 non-vanilla registeredItems
    /*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES];
    /*0xA26*/ u16 registeredItems[MAX_REGISTERED_ITEMS];
    /*0xA2E*/ //u8 padding3[2];
    /*0xA30*/ struct ObjectEvent objectEvents[OBJECT_EVENTS_COUNT];

    This feature is also compatible with my followers and lighting branches but does not require either, and doesn't require a dynamic overworld palette system to work.

    Screenshots:
    [PokeCommunity.com] ORAS-style Key Item Wheel
    [PokeCommunity.com] ORAS-style Key Item Wheel
    [PokeCommunity.com] ORAS-style Key Item Wheel


    It works in Granite Cave / any cave where you need to use Flash:
    [PokeCommunity.com] ORAS-style Key Item Wheel


    The repo can be found here. To add it to your pokeemerald project:
    Code:
    git remote add pokemerrp https://github.com/aarant/pokeemerald
    git pull pokemerrp key-item-wheel

    Bugs:
    You can post here or contact me on Discord (username: merrp) with bug reports. I'm in the Discords for PRET as well as RHH.
    • Sometimes the item palettes may flicker for a frame, because of the scanline effect used to swap them.

    Credit
    • GruntLucas, for help with windowing and a memory leak
     
    Last edited:
    Super clean implementation!
    I love it! :D

    I did have a slight issue with some graphical corruption; a key item I have instantly spawns additional sprites which seemed to be the cause some odd corrupted pixels to hang about from where the key item sprites were
    I had a pretty easy fix, for my case, by adding a frame delay after the key item menu graphics is destroyed :)

    Edit: I did find 2 extra issues 😅
    The Bg 0 map wasn't being correctly cleared and would result in a tile appearing for me when I opened the save menu, after opening the key item select

    I was also getting some stuttering after opening the key item wheel which turned out to be due to a missing DisableInterrupts(INTR_FLAG_HBLANK) whilst freeing the menu resources
     
    Last edited:
    Thanks! :)

    For the issues you found, would you mind either sharing those fixes or opening a PR? They seem like fairly small fixes, the BG 0 one probably just needs me to pick a different baseblock for the icon windows.
     
    Thanks! :)

    For the issues you found, would you mind either sharing those fixes or opening a PR? They seem like fairly small fixes, the BG 0 one probably just needs me to pick a different baseblock for the icon windows.

    Hi! Really sorry about the wait!
    It's been a while since I last checked PokeCommunity 😅

    Here's the 2 commits where I fixed those issues:
    Fixed save menu tile corruption
    Fixed stuttering after openning key items menu
    I did make some other small changes in these 2 it seems although I really can't remember the details of them as it was a few months ago now 😅
     
    Super useful and better than registering items to L and R in the overworld, thanks for sharing!
     
    Back
    Top