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

Simple Modifications Directory

Lunos

Random Uruguayan User
3,114
Posts
15
Years
  • [Pokeemerald] DS-Style party screen (2 versions)
    Changes the party screen to one similar to the DS versions. 2 different layouts available!
    V1:
    5dlIj9X.gif

    V2:
    MUeq5yM.gif


    How to:
    V1: Have a look at the following commit for the main implementation LINK.
    V2: Implement the first version and the have a look at the commit LINK

    Or clone it into your repo:
    Code:
    git remote add xaman https://github.com/TheXaman/pokeemerald/
    For version 1:
    Code:
    git pull xaman party_screen_ds_style
    For version 2:
    Code:
    git pull xaman party_screen_ds_style2

    Thats it! If you find any bugs, let me know.
    If you want to change the look of the windows you need to alter graphics/interface/party_menu_bg.png

    Eggs:
    ZE44bV7.gif
    Double battles:
    5kKaHHJ.gif



    Known bugs ONLY V1: Healing via potion "breaks" the slash between hp and maxHp


    Credits:
    TheXaman
    visually inpsired by Lunos binary version, but no code or assets used.
    Found some issues with the v2 layout in the Battle Tower.
    bYdPjDM.gif
     
    3
    Posts
    2
    Years
    • Seen Oct 10, 2021
    Running Indoors (EM)

    Simply remove the following from /src/bike.c and you should be able to use your running shoes inside any building.

    Inside the file search for:
    Code:
    bool32 IsRunningDisallowed(u8 metatile)

    and delete the following:
    Code:
    !(gMapHeader.flags & MAP_ALLOW_RUNNING) ||

    Thats it, now you should be good to go (or run in this case).

    CREDIT:
    None needed

    My original file looks like this:

    bool32 IsRunningDisallowed(u8 metatile)
    {
    if (!gMapHeader.allowRunning || IsRunningDisallowedByMetatile(metatile) == TRUE)
    return TRUE;
    else
    return FALSE;
    }

    What do I need to delete?
     
    39
    Posts
    3
    Years
    • Seen Aug 23, 2023
    My original file looks like this:

    bool32 IsRunningDisallowed(u8 metatile)
    {
    if (!gMapHeader.allowRunning || IsRunningDisallowedByMetatile(metatile) == TRUE)
    return TRUE;
    else
    return FALSE;
    }

    What do I need to delete?

    Remove !gMapHeader.allowRunning
     
    448
    Posts
    6
    Years
    • Seen today
    Faster Soft Resets (Emerald)

    This modification makes soft resetting faster by taking the player straight to the continue/new game screen after a soft reset.
    EMjILQx.gif


    How to:
    Spoiler:


    EDIT: updated sub_815355C to GetSaveBlocksPointersBaseOffset & Save_LoadGameData to LoadGameSave
     
    Last edited:
    51
    Posts
    13
    Years
  • [pokeemerald] Inherit moves from both parents

    In vanilla Emerald, only the male parent can pass its moves to the offspring.

    How to fix that:

    Spoiler:

    Now when breeding for egg moves & TM/HM moves it will also check if the mother knows them.
     
    7
    Posts
    2
    Years
    • Seen Jan 31, 2022
    Nicknaming as an option in the Pokémon Party Screen (Emerald)​
    This code allows you to change the nickname of a Pokémon in your party on the Pokémon Party Screen with a new option called "Nickname".
    Honestly, the idea of requiring the service of an NPC in X Town or City to change a Pokémon's nickname is silly.
    You should always be able to nickname your own Pokémon, in my opinion.

    The code can be found in this commit, it's super easy stuff.
    https://github.com/shinny456/pokeemerald/commit/c92e5861e3ba85abaf53af81aa0bb70acae505af

    Quick demonstration:
    xxnUgll.gif


    Bugs:
    Spoiler:


    The credits for this feature go to Shinny456. I'm just reposting it here because he wanted to share it with y'all.

    And that's pretty much it.​

    While this is great and does exactly what it says on the tin, I'd like to report a small issue (and I know you're just sharing this on someone else's behalf, but they're not too active on github anymore, so perhaps you or someone else knows how to fix it).

    After renaming your Pokemon (or backing out from the naming interface) you're immediately returned back to the field, rather than back to the party menu. Notice how in your demonstration GIF, you're forced to open the party menu again to verify the change you've made. This is not intuitive. Ideally, you should be returned back to the party menu, with the renamed Pokemon being selected again. Virtually every other menu/bag option in the game will return you back to where you came from, and it only makes sense this commit does too.

    So the problem with the commit is that ChangePokemonNickname is being referenced in tv.c, which always returns you to the field (it's not designed to be used from within the party menu, after all). I think you'd need to create a copy of this function (as well as ChangePokemonNickname_CB) and edit it accordingly. That being said, I know little of C, so this is where my contribution ends. I tried fixing this commit a few times, but no luck. :(

    If anyone else has any ideas, that'd be great!
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • While this is great and does exactly what it says on the tin, I'd like to report a small issue (and I know you're just sharing this on someone else's behalf, but they're not too active on github anymore, so perhaps you or someone else knows how to fix it).

    After renaming your Pokemon (or backing out from the naming interface) you're immediately returned back to the field, rather than back to the party menu. Notice how in your demonstration GIF, you're forced to open the party menu again to verify the change you've made. This is not intuitive. Ideally, you should be returned back to the party menu, with the renamed Pokemon being selected again. Virtually every other menu/bag option in the game will return you back to where you came from, and it only makes sense this commit does too.

    So the problem with the commit is that ChangePokemonNickname is being referenced in tv.c, which always returns you to the field (it's not designed to be used from within the party menu, after all). I think you'd need to create a copy of this function (as well as ChangePokemonNickname_CB) and edit it accordingly. That being said, I know little of C, so this is where my contribution ends. I tried fixing this commit a few times, but no luck. :(

    If anyone else has any ideas, that'd be great!
    I don't see it as an actual issue honestly, but returning to the party screen is surely an improvement, so I edited the post.
    pn_1398.gif
     
    Last edited:
    7
    Posts
    2
    Years
    • Seen Jan 31, 2022
    [Pokeemerald] Use Fly/Flash from party menu if Pokémon is compatible

    The following changes allow Fly and/or Flash to be used in the field if the Pokémon is able to learn the relevant HMs, without them needing to be taught. Of course, the necessary gym badges are still required.

    All of the changes are made in src\party_menu.c (SetPartyMonFieldSelectionActions) and can be found in this commit:
    https://github.com/Scyrous/pokeemerald/commit/2b263a419784b63252ecdd3f576472ee0b3ce136

    Demonstration:
    crwRZaS.gif

    Both Xatu and Latios are compatible with Fly/Flash. Because Latios already knows 3 HM moves, only Fly is added to the action list.

    Notes:
    If the Pokémon already knows fly or flash, the moves will show up as usual.
    If the Pokémon already knows 4 field moves, no new moves will be added to the action list.
    If the Pokémon knows less than 4 field moves, Fly will be prioritized over Flash.
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Swap party screen slots using Select [Em]
    A few days back I booted up Pokémon Ultra Sun because I had to test something, when I realized that nobody (as far as I know anyway) has thought about making it so you can quickly swap Pokémon slots inside the party screen with the press of a button, like you can do in the aforementioned game.
    Because of that, and because I figured the game already had all the logic to switch slots around ready for me to use, I considered giving it a try.
    It wasn't until about 30 minutes ago that I took a stab at it because I was lazy. Lo and behold, it's done.

    I don't think I need to explain anything.
    This allows you to swap around slots in the Pokémon Party Screen using the Select button.
    pn_1438.gif


    To implement this, you can track my GitHub repository via git remote and pull the branch partyScrQuickSwap which is where I'm hosting the code:
    Code:
    git remote add lunos https://github.com/LOuroboros/pokeemerald
    git pull lunos partyScrQuickSwap
    Or you can implement it manually:
    https://github.com/pret/pokeemerald/compare/master...LOuroboros:partyScrQuickSwap
    Your choice.

    And that's pretty much it.​
     
    Last edited:
    1
    Posts
    3
    Years
    • Seen Oct 25, 2021
    POKEEMERALD
    PSS IN THE START MENU
    First, we add a new Flag in include/constants/flags.h
    Code:
    FLAG_POKEMONPCMENU
    (this will be used after)
    Then, we go to include/pokemon_storage_system.h
    There, we add anywhere:
    Code:
    void Cb2_EnterPSS(u8 boxOption);
    Then we go to src/pokemon_storage_system.c, and we delete
    Code:
    static void Cb2_EnterPSS(u8 boxOption);
    (when its definied, the first one)
    and we search for "static void Cb2_EnterPSS(u8 boxOption) ", then we erase the "static " (the second one)
    Then, we search for:
    Code:
    static void FieldCb_ReturnToPcMenu(void)
    And we replace it entirely for this:
    Code:
    static void FieldCb_ReturnToPcMenu(void)
    {
        u8 taskId;
        MainCallback vblankCb = gMain.vblankCallback;
    	if (FlagGet(FLAG_POKEMONPCMENU)==TRUE)
    	{
    		SetVBlankCallback(NULL);
    		taskId = CreateTask(Task_PokemonStorageSystemPC, 80);
    		gTasks[taskId].data[0] = 0;
    		gTasks[taskId].data[1] = sPreviousBoxOption;
    		Task_PokemonStorageSystemPC(taskId);
    		SetVBlankCallback(vblankCb);
    		FadeInFromBlack();
    	}
    	else
    	{
    	    SetVBlankCallback(CB2_ReturnToField);
    		FadeInFromBlack();
    		DisableInterrupts(FLAG_POKEMONPCMENU);
    	}
    }
    Then, we go to src/start_menu.c, and we search for: static bool8 StartMenuBagCallback(void);, and right after, we add:
    static bool8 StartMenuPCCallback(void);
    Then, we go to "{gText_MenuBag, {.u8_void = StartMenuBagCallback}}," and again we add bellow:
    {gText_MenuPC, {.u8_void = StartMenuPCCallback}},
    Then, we go to "static bool8 StartMenuBagCallback(void)" and after the whole funcion we add:
    Code:
    static bool8 StartMenuPCCallback(void)
    {
    	u8 taskId;
        if (!gPaletteFade.active)
        {
            PlayRainStoppingSoundEffect();
            RemoveExtraStartMenuWindows();
    		Cb2_EnterPSS(x);
            return TRUE;
        }
    
        return FALSE;
    }
    (in my case, its "0" the number for the Move Pokémon System, but I have made some changes {I changed the Move option to the first place}, and I'm sure the original number for the option is "2"...)

    Then, we search for: "MENU_ACTION_BAG"
    And after we add: "MENU_ACTION_PC,"

    Now we go to: "if (FlagGet(FLAG_SYS_POKEMON_GET) == TRUE)" and inside there we add:
    AddStartMenuAction(MENU_ACTION_PC);
    Like this:
    Code:
        if (FlagGet(FLAG_SYS_POKEMON_GET) == TRUE)
        {
            AddStartMenuAction(MENU_ACTION_POKEMON);
    		AddStartMenuAction(MENU_ACTION_PC);
        }
    Then, we go to "AddStartMenuAction(MENU_ACTION_BAG);" and right after we add:
    AddStartMenuAction(MENU_ACTION_PC);

    Then, we go to data/scripts/pc.inc and we add this after "playse SE_PC_ON" in "EventScript_PC:: @ 8271D92":
    setflag FLAG_POKEMONPCMENU
    Now, after "special DoPCTurnOffEffect", in "EventScript_TurnOffPC:: @ 8271E47" we add:
    clearflag FLAG_POKEMONPCMENU

    Lastly, we need to add the strings for the PC in the Start Menu, (thanks, Lunos)
    We go to include/strings.h and we add this somewhere:

    extern const u8 gText_MenuPC[];

    And this is the last step. We go to src/strings.c and we add this somewhere:
    const u8 gText_MenuPC[] = _("PC");

    And we're done! this time, we are We should be able to enter the Move Pokémon PC, and the Pokécenter PC's won't be affected.

    n11Cwen.gif

    Hello! This code worked with no errors, however I get a loud screeching sound when exiting the pc that is continuous until i join a battle screen. Any idea how i might resolve this?
     
    7
    Posts
    2
    Years
    • Seen Jan 31, 2022
    [Pokeemerald] Earn battle points from trainer battles (with a variable)

    The following changes allow you to earn battle frontier points from trainer battles by setting a variable.
    Variable 0x8003 is used to activate this routine and also overrides the current trainer battle transition (a random transition from the battle frontier table is used instead).
    Variable 0x8004 controls the amount of points earned from the battle. By default, the string is limited to 3 digits (999 points).

    Both variables need to be set before the trainerbattle command, and they are automatically reset upon the player winning (or upon whiteout).

    All of the changes can be found in this commit:
    https://github.com/Scyrous/pokeemerald/commit/f69452cb557bc2b06bf68fab67a6920621e28541

    Demonstration:
    2wJGDeB.gif

    After defeating Steven in battle, the player earns a whopping 15 battle points.

    Usage:
    setvar VAR_0x8003, 1 // enable battle points routine, change battle transition
    setvar VAR_0x8004, 15 // set amount of battle points won to be 15
    trainerbattle_no_intro TRAINER_STEVEN, MeteorFalls_StevensCave_Text_StevenDefeat
     

    Subzero Eclipse

    Because I say so.
    24
    Posts
    6
    Years
    • Seen Mar 4, 2023
    [Pokeemerald] Fully functional debug menu with Flags, Vars, Items, custom scripts, Pokemon and more!
    This is my implementation of a debug menu based on Ketsuban's tutorial and some code from Pyredrid, AsparagusEduardo and Ghoulslash.
    Tc9Ydjz.gif


    Features:
    Spoiler:


    How to:
    Add and clone it into your repo:
    Code:
    git remote add xaman https://github.com/TheXaman/pokeemerald/
    git pull xaman tx_debug_system
    make clean
    make debugging


    Access ingame:
    From now one if you want the menu to show up you have to run your make command with the addition parameter: debugging or debugging _modern, for example make debugging -j8. Those parameters already include DINFO=1.
    To access ingame press R + Start.



    That it, now enjoy and if you find any bugs or if you write some cool additions you think others could profit from, please let me know in this threat, via pm or over on github!


    Credits: If you use this, you have to give credit to all following people!
    TheXaman
    Ketsuban
    Pyredrid
    AsparagusEduardo
    Ghoulslash
    ExboSeed
    Sierraffinity
    Jaizu

    I found a strange issue here: using the give Pokemon (just the Lvl one, haven't tried the complex one) for 10/11-ish times freezes the game (the NPC still move around, though).
    Here's a boring gif of me giving myself a bunch of Bulbasaurs, at the end of the GIF I can no longer move the cursor or exit the menu (I'm in a older stage of my project where all I have are the three expansion branches and the debug menu)
    https://imgur.com/a/qABpNVJ
     
    2
    Posts
    2
    Years
    • Seen Feb 8, 2022
    A previous post in this thread addresses Emerald's broken RNG by replacing the code in SeedRngAndSetTrainerId with something that uses the RTC to seed the RNG. The issue with it though is that on a newly-initialised game, the RTC is unset and hence unused, so any randomness won't actually occur until the clock has been started. It has the unfortunate consequence of having the Trainer ID no longer be randomly generated (or, it ends up being something predictable around the 10000 range).

    For those who have pulled from the repo recently, the fixes simply require uncommenting of these code portions in main.c:

    Declarations:
    Code:
    //static void SeedRngWithRtc(void);

    Within the AgbMain() codeblock:
    Code:
    //SeedRngWithRtc(); see comment at SeedRngWithRtc declaration below

    A function in the code commented out:
    Code:
    // oops! FRLG commented this out to remove RTC, however Emerald didnt undo this!
    //static void SeedRngWithRtc(void)
    //{
    //    u32 seed = RtcGetMinuteCount();
    //    seed = (seed >> 16) ^ (seed & 0xFFFF);
    //    SeedRng(seed);
    //}

    For those with older clones that don't have these, simply put them in (without the comments).

    Hello, I have two question about this

    1. Should I do this "https://www.pokecommunity.com/showpost.php?p=10127870&postcount=53" before ?

    2. I have

    "#ifdef BUGFIX
    static void SeedRngWithRtc(void)
    {
    u32 seed = RtcGetMinuteCount();
    seed = (seed >> 16) ^ (seed & 0xFFFF);
    SeedRng(seed);
    }
    #endif"

    Should I remove "#ifdef BUGFIX" and "#endif" ?
     
    118
    Posts
    4
    Years
  • Remove the need to water berries on rainy Routes (Emerald)

    Ever watered berry trees in the thunderstorm on Route 119 and thought "this makes no sense"?

    This little tweak will make any berry trees on specified routes give out their maximum number of berries all the time, as if the weather watered them for you!

    Go to src\berry.c and find the function named GetBerryCountByBerryTreeId().
    Replace it with the following:
    Code:
    static u8 GetBerryCountByBerryTreeId(u8 id)
    {
        struct BerryTree *tree = GetBerryTreeInfo(id);
        const struct Berry *berry = GetBerryInfo(tree->berry);
        u16 currentMap = gMapHeader.regionMapSectionId;
    
        if (currentMap == MAPSEC_ROUTE_119 || currentMap == MAPSEC_ROUTE_120 || currentMap == MAPSEC_ROUTE_123)
            return berry->maxYield;
        else
            return gSaveBlock1Ptr->berryTrees[id].berryYield;
    }
    Then you'll probably need to add #include constants/map_groups.h at the top of src\berry.c so the compiler recognizes the map names.

    The maps used here are just examples, so you can change them to whatever condition you want.

    Just a heads-up! In new versions of the decomp, you'll want to include "constants/region_map_sections.h" instead, not "constants/map_groups.h".
     
    49
    Posts
    5
    Years
    • Seen Dec 27, 2023
    Completly reimplemented the whole menu code into a new and uptodate branch. Removed the sound off option and changed the instant text to the faster text by ella_trifle, because the instant text led to problems with some scripts!

    [Pokeemerald] Improved scrolling options menu with faster text, HP and EXP bar speeds and a metric unit option!
    This is an improved options menu with the ability to scroll for more than the standard amount of options, developed by DizzyEgg.
    JgAsm1D.gif


    Spoiler:
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Get an event object's facing direction in an overworld script [Em]
    I came up with this sometime ago, when Jaizu was working on their Pokémon D/P remake, but was too lazy to recreate one of the story events faithfully.
    It wasn't working because I'm dumb, but with the help of GriffinR, I was able to get it to work.

    Usage is quite simple really.
    There's a new scripting macro, getobjectfacingdirection.
    This macro will read the number or localId variable of the event object whose facing direction you want to get, and will then store the result in the specified var.

    yskYu41.gif


    To implement this, you can track my GitHub repository via git remote and pull the branch getObjFacingDir which is where I'm hosting the code:
    Code:
    git remote add lunos https://github.com/LOuroboros/pokeemerald
    git pull lunos getObjFacingDir
    Or you can implement it manually:
    https://github.com/LOuroboros/pokeemerald/compare/master...LOuroboros:getObjFacingDir
    Your choice.

    And that's pretty much it.​
     
    Back
    Top