• 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

1
Posts
3
Years
    • Seen Dec 5, 2022
    Faster berry interactions (Emerald)
    This is a tiny mod that makes dealing with berries (planting, watering, picking) quicker by removing some unnecessary dialogs.

    Demonstration: streamable.com/fsn46f (sorry for the cheesy playername)


    • Removes these messages:
      "[Player] put away the [berry] in the Berries pocket."
      "The soil returned to its soft and loamy state."
      "[Player] watered the [berry]."
      "The plant seems to be delighted."​
    • If you have berries, skips the "It's soft soil" message and opens your bag immediately
    • Merges the "Want to water[...]?" question with the growth stage message (e.g. ORAN has sprouted. Want to water[...]?)


    Diff: github.com/dunsparce9/pokeemerald-tweaks/commit/40685e
    In short: Only berry_tree.inc is edited. WantToPlant is replaced with ChooseBerryToPlant, BerryGrowthStage messages are edited to include the "want to water?" question (I couldn't find a way to add more text without displaying another message so I had to copypaste the same wailmer check for all 4 labels, sorry :D), CheckBerryFullyGrown is edited to skip to PickBerry, and messages that are now unused are removed.

    Had to remove the https because this is a new account 🙃
    I built and tested these changes with my old save, but feel free to test them yourself, this is my first mod so please tell me if it doesn't work.
     
    Last edited:
    146
    Posts
    16
    Years
    • Age 26
    • Seen Apr 29, 2024
    Show Type Effectiveness In-Battle [EM]​
    super.png
    normal.png
    notvery.png
    noeffect.png

    doubleseff.gif
    dualtype_super.png
    dualtype_neutral.png
    dualtype_nve.png

    pokeemerald.png


    Now with Doubles, Flying Press/two-typed moves, and Inverse Battles support!

    First thing you're going to want to do is to go into graphics\battle_interface, move text.pal to somewhere safe (I don't think the edits I made to this file harm anything, but better to be safe than sorry) and delete text.gbapal and text.gbapal.lz. Now, download the attached text.zip file, and move its contents (which is just a new text.pal) into the graphics\battle_interface folder.

    Now, we get to the fun coding part!
    Open up src\battle_message.c, search for sTextOnWindowsInfo_Normal, and add this to the bottom of this array:
    Spoiler:


    Now, open src\battle_bg.c, and add this to the bottom of gStandardBattleWindowTemplates (make sure you paste this before DUMMY_WIN_TEMPLATE, though):
    Spoiler:


    The final bit for this code belongs in src\battle_controller_player.c.
    We're going to start by adding these defines at the end of the list of defines toward the top of the file:
    Code:
    #include "constants/battle_move_effects.h"
    #include "event_data.h"
    This is necessary for getting the Inverse Battle flag later on, and for getting the move effects for two-typed moves.

    Next, define a new method at the top of the file. You can place it anywhere, but I searched for:
    Code:
    static void MoveSelectionDisplayMoveType(void);
    And placed it above it. The method we are defining is:
    Code:
    static void MoveSelectionDisplayMoveTypeDoubles(u8 targetId);
    The reason we're defining a whole new method for this here is because it's a bit easier than adding a 1 to every MoveSelectionDisplayMoveType call that happens in this file. If you wanted to, you could replace every MoveSelectionDisplayMoveType(); in the file to MoveSelectionDisplayMoveType(1); and replace the MoveSelectionDisplayMoveType method with the MoveSelectionDisplayMoveTypeDoubles method from later in this post and everything should work the same.

    Now, we're going to be copying over the effectiveness table from src\battle_util.c of DizzyEgg's Battle Engine.
    I placed this toward the top of the file, under "unknown unused data".
    Spoiler:

    (If you're not using DizzyEgg's Battle Engine for whatever reason, just eliminate the last line and the last column of this table to get rid of Fairy and it should work fine.)

    Now, search for MoveSelectionDisplayMoveType(void), and add these three methods above it:
    Spoiler:

    Obviously, you can remove the whole two-type move check if you're not using DizzyEgg's Battle Engine.

    And in MoveSelectionDisplayMoveType, change this line:
    Code:
    BattlePutTextOnWindow(gDisplayedStringBattle, 10);
    To this:
    Code:
    BattlePutTextOnWindow(gDisplayedStringBattle, TypeEffectiveness(moveInfo, 1));

    Now, we just need to add calls for MoveSelectionDisplayMoveTypeDoubles. Search for HandleInputChooseTarget(void) and find the two places that use this switch statement:
    Code:
    switch (GetBattlerPosition(gMultiUsePlayerCursor))
    Immediately after these switch statements, add this line:
    Code:
    MoveSelectionDisplayMoveTypeDoubles(GetBattlerPosition(gMultiUsePlayerCursor));

    And you should be good to go!
    Thanks to DizzyEgg for his hard work on the Battle Engine upgrade. The type effectiveness table and the MulModifier method made things very easy once I figured out how the palettes worked. I for sure would not have been able to do this without those.
     

    Attachments

    • text.zip
      210 bytes · Views: 324
    Last edited:
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    [Pokeemerald] Bag Sorting

    This feature adds bag sorting by the following:
    • Name (alphabetical)
    • Quantity (most -> least)
    • Type (see gItemsByType)

    G6ocszA.gif
    9OOVCOp.gif
    4SxLHHB.gif


    Here is the repo.

    How to Activate: Press the Start Button in the bag.

    How To Add:
    Credit:
    • Skeli / CFRU source
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 146
    Posts
    16
    Years
    • Age 26
    • Seen Apr 29, 2024
    I made a disposable branch pretty quickly to show off the exact changes to the code.
    If it's not too much to ask, could you please check if everything's correct?
    Man, I am not on my game recently, haha. In MoveSelectionDisplayMoveType, the line should be BattlePutTextOnWindow(gDisplayedStringBattle, TypeEffectiveness(moveInfo, 1));, I forgot to add in the "1" in my original tutorial. I'll edit it now. My apologies.
     
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    [Pokeemerald] Saveblock Cleansing

    The game is saved in sets of saveblock chunks, 3968 bytes each. Saveblock2 is 1 chunk, while Saveblock1 is 4 chunks (15872 bytes). Unfortunately, the former only has 84 bytes remaining, while the latter has only 120 bytes remaining before these sizes are reached.

    This removes some likely superfluous saveblock data to allow more custom data to be saved. Each section removed is given a define, so you can toggle on/off whatever you want. (see the top of include/global.h). In total, roughly 3082 bytes have been opened up:
    Spoiler:


    Here is the repo.
    How To Add:
    Other areas to clean more data that are not included in the repo (reduce to values of 1 to prevent compiler errors)
    Tv Shows - 900 bytes - change TV_SHOWS_COUNT in include/constants/global.h
    Record Mixing Apprentices - 272 bytes - change APPRENTICE_COUNT in include/constants/global.h
    Mail - 576 bytes - change MAIL_COUNT in include/constants/global.h
    Secret Bases - 3200 bytes - change SECRET_BASES_COUNT in include/constants/global.h

    I don't expect that the base game will be affected by these changes, but if anything breaks please report it to me.
     
    Last edited:
    48
    Posts
    9
    Years
    • Seen yesterday
    Showing IVs/EVs in Summary Screen [EM]

    I found another way to showing when page is Skills screen.
    find static void Task_HandleInput(u8 taskId) and add code between else if
    Spoiler:

    And the BufferIvOrEvStats code
    Spoiler:

    now if you are at stats screen,just press L button the regular stats will change to IVs,and if press R button, EVs will shown.
    I didn't using DizzyEgg's colored-nature mod.
     
    12
    Posts
    8
    Years
    • Seen Nov 2, 2022
    All the simple modifications in this thread are being updated and moved to pokeemerald's wiki. Feel free to help transfer everything if you would like.

    In the future, if you have a Simple Modification to post, please contribute here instead: https://github.com/pret/pokeemerald/wiki
     
    Last edited:
    146
    Posts
    16
    Years
    • Age 26
    • Seen Apr 29, 2024
    I found another way to showing when page is Skills screen.
    Awesome job! My original code doesn't display the nature coloring when showing IVs/EVs anyway, so this is perfect.

    EDIT: So, I modified this a bit to look a bit cleaner when using DizzyEgg's code anyway since I was bored, and I added another if statement to show the normal stats again when pressing Start. I have also added this to my original post.

    I added one more else if in static void Task_HandleInput(u8 taskId) (and changed around the numbering a bit):
    Spoiler:

    Here's my version of BufferIvOrEvStats using DizzyEgg's nature-color mod:
    Spoiler:

    And here's the same method for use without DizzyEgg's nature mod:
    Spoiler:


    Both are tested, and both work like a dream. Thank you for your hard work!
     
    Last edited:
    146
    Posts
    16
    Years
    • Age 26
    • Seen Apr 29, 2024
    [Pokeemerald] Bag Sorting

    When trying to implement this, pressing start functions fine, but pressing A on items in pockets that don't have 3 options by default (every pocket but Berries and Items) causes one of the sorting options to come up.
    pokeball.png
    tmhm.png
    key.png

    I pulled straight from your repo--is this happening on your end as well, or is this caused by something else I've implemented?
     

    Jaizu

    Average rom hacker
    281
    Posts
    14
    Years
  • Pokemerald: Skip Rayquaza intro.
    In src/intro.c, inside static u8 SetUpCopyrightScreen(void)
    We replace
    Code:
    SetMainCallback2(MainCB2_Intro);
    with
    Code:
    SetMainCallback2(CB2_InitTitleScreen);
     
    Last edited:
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    When trying to implement this, pressing start functions fine, but pressing A on items in pockets that don't have 3 options by default (every pocket but Berries and Items) causes one of the sorting options to come up.
    pokeball.png
    tmhm.png
    key.png

    I pulled straight from your repo--is this happening on your end as well, or is this caused by something else I've implemented?

    I just want to report this problem fixed. Thank you!
     
    119
    Posts
    14
    Years
  • Scrolling Multichoices In Scripts

    I was asked to implement this, so here it goes. Just so you know, scrolling lists are already coded in, they're called list menus in pokeemerald. Check out list_menu.h and list_menu.c.

    Updated lines in this spoiler:
    Spoiler:


    I also have the code in my github branch called script_multichoice, so you can pull directly from it.

    A couple of functions in this code are outdated. I have highlighted them in red in the spoiler below. Derived from GriffinR on the Discord. Would be great to add this update to the index at the start of this thread or to the original post.
     
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    [Pokeemerald] Pokemart Items by Badge Count

    Shop Items have been based on badge count rather than city/town for a while, now. This repo sets up shop items based on Gen 8 badge counts.

    The repo.

    Usage:
    Replace pokemart *itemList with:
    Code:
    pokemart 0

    How To Add:
    • git remote add ghoul https://github.com/ghoulslash/pokeemerald
    • git pull ghoul mart-badges
    • If you wish to change the item lists, just change sShopInventory_ZeroBadges (or whatever badge-count you care about) in src/shop.c

    Alternatively, follow the wiki post
     
    Last edited:
    1,309
    Posts
    12
    Years
    • She/Her
    • Seen Nov 24, 2023
    Hello everyone, just a quick post to let you know the main post has been given a long overdue update! Apologies for the wait. I've been away from the forums for some time due to virus-related family issues. Thanks for your patience and sorry again! x
     
    55
    Posts
    14
    Years
    • Seen Feb 1, 2023
    Yeah, it doesn't seem to work. I asked TheXaman about this on his profile back in March and he never really answered.
    I guess this is a good time to post this. I really should have done it sooner, but I kind of forgot :P

    Overworld 1HP Poison Survival [EM]
    Some time ago, Blurose made his own version of this mechanic for his project in Pokeruby.
    Some months ago, I ported it to Pokeemerald, and this seems to be a good time to post it here as an alternative.

    The relevant modifications can be seen in this commit, it's veery simple.
    https://github.com/LOuroboros/pokeemerald/commit/c162100fdc5439ebd7eefabc5890dae56d1a88f7

    Pics:
    2019-04-27_19-58-36.gif
    2019-04-27_20-01-34.gif

    A small issue I found with this: if the player has only 1 pokémon, the game will show the "{POKEMON} has fainted" instead of "{POKEMON} survived the poison", but the pkmn will still survive with 1 HP.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • A small issue I found with this: if the player has only 1 pokémon, the game will show the "{POKEMON} has fainted" instead of "{POKEMON} survived the poison", but the pkmn will still survive with 1 HP.
    Uh... then you probably didn't apply all the changes shown in the commit.
    The very last change done to the src/strings.c file shows very clearly how I change the text string labeled gText_PkmnFainted3 from "{STR_VAR_1} fainted…\p\n" to "{STR_VAR_1} survived the poisoning.\nThe poison faded away!\p".
    I don't think you noticed it, but one of the 2 GIFs I uploaded in the very post you quoted shows how everything is working correctly, be it with 1 Pokémon on the party or more, in fact.
     
    119
    Posts
    14
    Years
  • Change the title screen music [EM]

    In pokeemerald/src/title_screen.c, find this line:
    Code:
    [B]m4aSongNumStart([COLOR="Red"]MUS_TITLE3[/COLOR]);[/B]

    Replace MUS_TITLE3 with the name of a different song. The names of all the songs can be found in pokeemerald/sound/songs/midi.

    So for example, replace it as such:
    Code:
    [B]m4aSongNumStart([COLOR="SeaGreen"]MUS_SATTOWER[/COLOR]);[/B]
     
    55
    Posts
    14
    Years
    • Seen Feb 1, 2023
    Uh... then you probably didn't apply all the changes shown in the commit.
    The very last change done to the src/strings.c file shows very clearly how I change the text string labeled gText_PkmnFainted3 from "{STR_VAR_1} fainted…\p\n" to "{STR_VAR_1} survived the poisoning.\nThe poison faded away!\p".
    I don't think you noticed it, but one of the 2 GIFs I uploaded in the very post you quoted shows how everything is working correctly, be it with 1 Pokémon on the party or more, in fact.

    I know for 100% sure that I changed that string -- because I tested it and it was saying the correct thing -- but I think I know what may have happened. I think, when I merged a decap branch, it may have overwritten that change. Ive double checked, and it did get reverted (and I've now fixed it).

    Thanks for the reply, and sorry about the false alarm.
     
    Back
    Top