• 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

55
Posts
1
Years
    • Seen May 11, 2024
    REMOVING LEVEL FROM COMBAT STATISTICS EMERALD

    ALTERING DAMAGE
    Open src/battle_util.c and find
    Code:
    dmg = ((gBattleMons[battlerAtk].level * 2) / 5) + 2;

    Replace gBattleMons[battlerAtk].level with a number of your choice, all damage will use this number in place of the mons level.

    ALTERING STATS
    Open src/pokemon.c and find
    Code:
    s32 n = (((2 * baseStat + iv + ev / 4) * level) / 100) + 5;

    You can then replace level with a static number as above, though mine was altered to
    Code:
    (((baseStat + iv + ev / 4))) + 5;
    to keep it simpler to calculate.

    To alter HP find
    Code:
    newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10;
    and change level again. Or to allow some kind of growth change the formula to
    Code:
    newMaxHP = (((n + hpEV / 4))) + level + 10;
    which will give exactly 1 HP per level (plus EVs).

    (Apologies for the formatting, forum formatting is not my forte)
     
    8
    Posts
    1
    Years
    • Seen Dec 20, 2023
    Just out of curiosity, why would you want to do this? Wouldn't this make battles at high levels last dozens of times longer than battles at low levels?
     
    55
    Posts
    1
    Years
    • Seen May 11, 2024
    Just out of curiosity, why would you want to do this? Wouldn't this make battles at high levels last dozens of times longer than battles at low levels?

    Not really. Late game EVs still increase stats, as well as having access to better moves and evolutions from normal levels.
     
    451
    Posts
    6
    Years
    • Seen May 11, 2024
    Multichoice2 - Improved Multichoice Command (Emerald)

    This modification adds the event script command "multichoice2", which combines the functionality of the three pre-existing multichoice commands(multichoice, multichoicegrid, multichoicedefault) into a single command and lets you define the multichoice options as strings within your scripts:

    Code:
    Multichoice2_Demo::
        messageinstant Text_Demo1
        multichoice2 1, 1, Text_DemoOptions
        closemessage
        end
    
    Text_Demo1:
        .string "Select an option.$"
    
    Text_DemoOptions:
        .string "Option 1$"
        .string "Option 2$"
        .string "Option 3$"
        .string "$"

    Simple Modifications Directory


    Setup:
    Spoiler:
     
    Last edited:
    55
    Posts
    1
    Years
    • Seen May 11, 2024
    [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:
    Simple Modifications Directory

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

    Usage:

    Is there a way to make this the default for each trainer, or would I have to apply the variable to each individual trainer match?
     
    14
    Posts
    1
    Years
    • Seen Oct 21, 2023
    Start menu Page turning

    My English is not very good, so please forgive me if there are grammatical errors

    When I added content to the start menu, I found that the menu could not accommodate the new content, so I did research

    Firstly,open "src/strings.c"
    Change the content of gText_MenuExit to "NextPage".

    Then add these following contests:
    //Other options you want to join.
    const u8 Text_MenuPage[]=_("LasePage");


    Secondly,open include/strings.h.Add these codes:
    //Other options you want to join.
    extern const u8 gText_MenuPage[];


    Thirdly,open src/start_menu.c.Add "menu_action_page" and the content you want to add to enum.

    Next,define something new.
    EWRAM_DATA static u8 sStartMenuPage = 0;
    //Other options you want to join.
    static bool8 StartMenuChangePage(void);
    static void BuildSecondStartMenu(void);


    Then add these code to sStartMenuItems:
    //Other options you want to join.
    {gText_MenuPage, {.u8_void = StartMenuChangePage}}


    Finally,Modify some function.

    BuildStartMenuActions:
    static void BuildStartMenuActions(void)
    {
    sNumStartMenuActions = 0;

    if (sStartMenuPage==0) {
    if (IsUpdateLinkStateCBActive() == TRUE)
    {
    BuildLinkModeStartMenu();
    }
    else if (InUnionRoom() == TRUE)
    {
    BuildUnionRoomStartMenu();
    }
    else if (GetSafariZoneFlag() == TRUE)
    {
    BuildSafariZoneStartMenu();
    }
    else if (InBattlePike())
    {
    BuildBattlePikeStartMenu();
    }
    else if (InBattlePyramid())
    {
    BuildBattlePyramidStartMenu();
    }
    else if (InMultiPartnerRoom())
    {
    BuildMultiPartnerRoomStartMenu();
    }
    else
    {
    BuildNormalStartMenu();
    }
    }
    if (sStartMenuPage==1) {
    BuildSecondStartMenu();
    }
    }


    Search:
    if (gMenuCallback != StartMenuSaveCallback
    && gMenuCallback != StartMenuExitCallback
    && gMenuCallback != StartMenuSafariZoneRetireCallback
    && gMenuCallback != StartMenuBattlePyramidRetireCallback)


    Change it to:
    if (gMenuCallback != StartMenuSaveCallback
    && gMenuCallback != StartMenuExitCallback
    && gMenuCallback != StartMenuSafariZoneRetireCallback
    && gMenuCallback != StartMenuBattlePyramidRetireCallback
    && gMenuCallback != StartMenuChangePage)


    Add new function:
    static void BuildSecondStartMenu(void) {
    //Other options you want to join.
    AddStartMenuAction(MENU_ACTION_EXIT);
    }

    //Other functions you want to join

    static bool8 StartMenuChangePage(void) {
    sStartMenuPage=0;
    RemoveExtraStartMenuWindows();
    HideStartMenu();
    ShowStartMenu();
    }

    Lastly,change StartMenuExitCallBack to:
    static bool8 StartMenuExitCallback(void)
    {
    sStartMenuPage=1;
    RemoveExtraStartMenuWindows();
    HideStartMenu();
    ShowStartMenu();
    return TRUE;
    }


    Now I know a bug:
    When I finish turning the page, I must press B to close the menu and turn it on again to work normally, otherwise I will not be able to press the up/down key.
     
    14
    Posts
    1
    Years
    • Seen Oct 21, 2023
    Increase bag item capacity(em)

    When I increase TMHM capacity,I discover this code:
    #define MAX_BAG_ITEM_CAPACITY 99
    So I try to increase bag item capacity.

    Firstly,open include/constants/items.h,and change MAX_BAG_ITEM_CAPACITY to 999,change BAG_ITEM_CAPACITY_DIGITS to 3.

    Then,open src/item.c,search AddPyramidBagItem,Change "*newquantities" in this function to u16.

    Finally,open include/shop.h,In the "shopdata",change maxquantity to u16.

    I haven't found any bugs yet.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • [Pokeemerald] TM Case ported from FR and custom one!
    There's a super small issue with the improved version of the TM case, TheXaman.
    It seems the palette of the icon of the species in the party doesn't get properly loaded and tinted after you return from the party menu to the TM case.
    Simple Modifications Directory
     
    451
    Posts
    6
    Years
    • Seen May 11, 2024
    Physical Special Split Icons In Battle (Emerald)

    This modification does exactly what the name says. It's for pokeemerald-expansion only.

    Simple Modifications Directory


    Setup:
    Spoiler:
     

    Attachments

    • Simple Modifications Directory
      split_icons_battle.png
      5.1 KB · Views: 1,041

    セケツ

    ポケハック初心者
    61
    Posts
    7
    Years
    • Seen yesterday
    [PokeEmerald] Add a New Wallpaper to the Pokemon Storage Box

    For the Pokemon Storage System (Pokebox in PC), it is some hacks that have succeeded in making some brand new wallpapers inserted into their pokebox in PC. (or simply replaced the original). As far as I know, this small, hardly noticed but necessary (Personally thought) feature has been completed by an IPS patch developed for the binary rom hacking field several years ago. But it's a shame that that patch was only compatible for FireRed (BPRJ Only), there isn't any port of it for any version of Pokeemerald until now, and there is no doubt that it can not be used on any version of Pokeemerald at all.
    Well, since I have stepped into the decomp-hacking field for some days, I had luckily found it PRETTY MUCH EASIER to recreate this feature just by editing the source files directly.
    Till here, if someone still doesn't get what I said, please take a look at the picture below. Here is an original wallpaper of "the ID card of trainer", which was made & inserted into the ROM by myself.

    Simple Modifications Directory


    And now, without any explanation more, I will tell how to do it through the text below. Moreover, there is no doubt that this my presenting solution below is CERTAINLY NOT the only, safe or completely & authortically correct way to solve this problem mentioned. If anyone read this post finds any error existing in it or has much better and simpler ways, please give a reply or point it out, or just forgive my ignorance at least. Very Appreciated.

    Step 1. Some basic knowledge about the wallpapers of pokebox.

    Spoiler:


    Step 2. Preparing for the resources, tiles & tilemap.

    (1) For the Resources:

    Spoiler:


    (2) For the Tiles:

    Spoiler:


    (3) For the Tilemap:

    Spoiler:


    Step 3. Hacking the source files.

    (1) Define the New Wallpaper:

    Spoiler:


    (2) Add the graphic rules for the new wallpaper:

    Spoiler:


    (3) Make the selection of new wallpaper appears in the select menu:

    Spoiler:


    And that's all for this long & dreadful tutorial! (Sorry for my bad written English..). Saving all the files and making your ROM by using the compeller, then it's time to test & enjoy what you have done so far.
     
    Last edited:

    セケツ

    ポケハック初心者
    61
    Posts
    7
    Years
    • Seen yesterday
    [PokeEmerald] Remove the "Green Flash" screen of the opening's background when the pokemon logo appears

    A very tiny discovery that I decided to post here for my bad memory's sake.
    When it comes to the aspect of opening (not the entrie introduction, I mean, but only the opening itself from the appearance of the main "pokemon logo" title and later on), there is an unique feature that is only presented in that of Pokeemerald: at the moment the main "pokemon logo" title appearing, the background screen would turn to applegreen (or seems to be yellow for some specific emulators or hardwares) instead of the default black & white for some seconds as the shining slash moves forward, which seems like a "green flash" from my point of view.
    For anyone could not understand or not know about what I am talking about, please look at these pictures below. What's more, I also post the same opening of Sapphire here for the comparison.

    Spoiler:


    Well, just by looking through the decomp files of Pokemon Ruby & Sapphire. I have figure out one way to remove it completely. Here is it.

    1. Open the "title_screen.c" file under the src folder, which takes control of the whole introduction presented in the beginning of the game, and there lies some strings & texts related to the appearance of the pokemon logo & its background.

    2. Find one function named "SpriteCB_PokemonLogoShine", then delete a second-grade "if & else" structure presented inside of this function, which you can clearly see in the picture below.

    Spoiler:


    3. Adjust the whole structure of this function itself based on the modification of last step in order to make it legal & executable, just like the picture below.
    Spoiler:


    Then save & test.

    NOTES (Just Some personal opinion of this feature, whether reading it or not depends on you) :

    Spoiler:


    All in all, if you find any bug or error of this discovery and this tutorial itself, please leave a comment or give a reply to me. For me, I would be very appreciated for everyone's reading & hope it will be helpful.
     
    Last edited:
    106
    Posts
    4
    Years
  • [Pokefirered] IV Rankings On the Summary Screen

    This is a remake of the IV Rankings on the summary screen for binary. No code from there was used, only the images. This only modifies the PrintSkillsPage function, so it should be compatible with most branches / forks. You could probably modify the code to display EVs too, but it could get a bit cluttered.

    How to modify:
    The IV images can be found in graphics/interface/ivs. They use the type icons pal, so make sure to change them if you have modified the type icons. They are all 8x8, so make sure yours in 8x8 as well.

    Here's some images:
    Simple Modifications Directory
    Simple Modifications Directory
    Simple Modifications Directory


    Credits:
    - DoesntKnowHowToPlay: Original Image, inspiration
    - Lunos: Finding the original post

    How to use:
    - git remote add greenphx https://github.com/Greenphx9/pokefirered/
    - git pull greenphx summary-screen-iv-rankings
     
    106
    Posts
    4
    Years
  • [Pokefirered] Nature Coloured Stats

    This is a remake of the nature coloured stats that Spherical Ice made for binary. I used some of DizzyEgg's code for the text colours.

    How to modify:
    To modify the colours of the text, open up pokemon_summary_screen.c and modify sNatureTextColors. I'm not sure how the colours work, so I'd recommend playing around with the numbers and seeing what happens. The first set is the grey numbers, second is red, and third is blue.

    Here's some images:
    Simple Modifications Directory
    Simple Modifications Directory
    Simple Modifications Directory


    Credits:
    - Spherical Ice - Original binary version, inspiration
    - DizzyEgg: Decomp Version

    How to use:
    - git remote add greenphx https://github.com/Greenphx9/pokefirered/
    - git pull greenphx nature-colored-stats

    If you've used my IV Rankings branch, you'll get a merge conflict. Just press "Accept Both Changes" On Visual Studio Code, and it should work (note this won't work for all merge conflicts)
     
    Last edited:
    239
    Posts
    8
    Years
    • Seen Apr 15, 2024
    Useful Scripting Specials

    [Pokeemerald] + [Pokefirered]

    I've started this wiki page for sharing potentially useful scripting specials. I wanted to share here for reference as well
     
    451
    Posts
    6
    Years
    • Seen May 11, 2024
    Prevent Roamers From Fleeing (Emerald / Firered)

    To prevent roamers from fleeing from battle, open data/battle_ai_scripts.s, locate AI_Roaming and change it to:
    Code:
    AI_Roaming:
    	end
     
    13
    Posts
    2
    Years
  • Increase bag item capacity(em)

    When I increase TMHM capacity,I discover this code:
    #define MAX_BAG_ITEM_CAPACITY 99
    So I try to increase bag item capacity.

    Firstly,open include/constants/items.h,and change MAX_BAG_ITEM_CAPACITY to 999,change BAG_ITEM_CAPACITY_DIGITS to 3.

    Then,open src/item.c,search AddPyramidBagItem,Change "*newquantities" in this function to u16.

    Finally,open include/shop.h,In the "shopdata",change maxquantity to u16.

    I haven't found any bugs yet.

    in my rom there was this error according to the image because I'm using the expanded bag, I don't know if it would have a link or not, it's the only thing I think could cause a problem. Even when it disappears from this black screen, it goes straight to another screen and freezes the game, but if you register the item as in Key items, nothing happens.
     

    Attachments

    • Simple Modifications Directory
      telapreta.png
      10.1 KB · Views: 23
    • Simple Modifications Directory
      congelado.png
      10.4 KB · Views: 18
    13
    Posts
    2
    Years
  • [Pokeemerald] Nature Mints

    I've had this done for a while but wanted to share my custom implementation. The difference being that the summary screen will tell the player what the new and old natures are, instead of SWSH only showing the stat changes in the summary screen:

    Simple Modifications Directory


    Notes:
    • This repo includes dizzyegg's nature color code.
    • It is also separate from RHH's item_expansion!

    How To Get:

    Sorry my dear, but the Git Pull of your nature_mints repository is giving error when using pokeemerald-expansion
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • The item expansion already have that. This branch is only needed if you're using either expansion but not the item expansion/vanilla pokeemerald. Because you said that you are using those (all three?) expansions, you don't have to.
    Heck, even ghoulslash confirmed this:

    Unless you're not using item expansion for reasons, you don't have to do this since the item expansion already had those mints exist...

    Hope you understand this!
    That's partly wrong.
    Allow me to clarify, the item data for the mints is definitely present in the item_expansion, but their effect is not. You still need Ghoul's branch for that, regardless of whether you use the IE.
    The mints' effect, at least in the way Ghoul implemented them (though I can't think of a way around it myself) requires meddling with some of the structs that conform a savefile, and that's a bit of a landmine field.
     
    6
    Posts
    2
    Years
  • That's partly wrong.
    Allow me to clarify, the item data for the mints is definitely present in the item_expansion, but their effect is not. You still need Ghoul's branch for that, regardless of whether you use the IE.
    The mints' effect, at least in the way Ghoul implemented them (though I can't think of a way around it myself) requires meddling with some of the structs that conform a savefile, and that's a bit of a landmine field.

    Oh, I'm so sorry! I thought that its effects already been implemented since apparently it exist on the file list in item expansion... I will delete the post for avoid the confusions... Thank you for clarifying and clears it up to me, though! ^^
     
    14
    Posts
    1
    Years
    • Seen Oct 21, 2023
    in my rom there was this error according to the image because I'm using the expanded bag, I don't know if it would have a link or not, it's the only thing I think could cause a problem. Even when it disappears from this black screen, it goes straight to another screen and freezes the game, but if you register the item as in Key items, nothing happens.

    Ah? I don't know why, it doesn't appear on pret's pokeemerald
     
    Back
    Top