• 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

[Emerald] Make Move Relearner Teach Egg Moves With A Flag

Make the Move Relearner in Pokémon Emerald teach egg moves instead of level-up moves by setting a flag. This modification will allow egg moves to be taught to all Pokémon within the same evolution family, not just the base form. For instance, Charmander's egg moves can also be taught to Charmeleon and Charizard.

Tutorial:
https://github.com/pret/pokeemerald/wiki/Make-Move-Relearner-Teach-Egg-Moves-With-A-Flag

EDIT 28-JUL-2024: Code updated, more polish.
- Any invalid Pokémon are now prevented from being selected in the party screen (''NOT ABLE!'')
- Egg moves already learned by the Pokémon no longer appear in the list
 
Last edited:
[FIRERED] [EMERALD] How to make opponent's Pokemon have its own Poke Ball

Make your opponent throw a different Poke Ball when sending out a different Pokemon.

Spoiler: In "/include/data.h" ("/include/battle.h" in pokefirered) add "u16 pokeball" to "TrainerMonNoItemDefaultMoves", "TrainerMonItemDefaultMoves", "TrainerMonNoItemCustomMoves" and "TrainerMonItemCustomMoves":

Spoiler: In "/src/battle_main" in "CreateNPCTrainerParty" add "SetMonData(&party[i], MON_DATA_POKEBALL, &partyData[i].pokeball);" in all cases:

Spoiler: Now in "/src/data/trainer_parties.h" add ".pokeball = ITEM_YOUR_POKEBALL," to every Pokemon you want to have different Poke Ball:


Enjoy!
Spoiler:
 
Last edited:
[EMERALD] Faster Running

Run twice as fast (mach bike speed) if holding R while running.
(animation while running faster shows the Walking (Not running) animation)

(based on Fast Surfing & Running speed by default)

In /src/field_player_avatar.c
Spoiler: Under "static void PlayerRun(u8);" add the line:

Spoiler: Under "static void PlayerRun(u8 direction)" add these lines:

Spoiler: Inside "static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)" add these lines within the last IF statement:

Holding R while running should now let you run twice as fast,
but if you have a following pokemon feature (shoutout Merrp's DNS)
this will need additional tweaking if u dont wanna leave your mon in the dust xD

P.S. sorry for the bad .gif quality.. its not playing at the proper speed for some reason :/
 

Attachments

  • [PokeCommunity.com] Simple Modifications Directory
    pokeemerald.gif
    4.8 MB · Views: 3
Last edited:
[pokeemerald] Increase Text Speed Beyond Fast

compared to newer games, text speed is a large part of what makes gen 3 feel slow. the game already prints 1 character per frame when the text speed is set to fast, so we are going to alter it to print more than one character per frame. we can also set the original "fast" speed to be our slowest speed. you can fine-tune the exact speed at each setting to your liking.

part 1: multiple characters per frame

Spoiler:


part 2: changing slow and mid

Spoiler:


i hope you find this modification useful! i've only just added it to my hack today, and i've fixed a couple of bugs with it already. if any more pop up, i'll edit this post to fix them. if anyone else finds bugs with it, please let me know and i'll see what i can do.

Has anyone else encountered an issue with this modification after using a healing item (e.g. Potion) on a Pokémon? I've tried this on a fresh fork of pret/pokeemerald and still get the same bug.

After progressing past the "[POKéMON]'s HP was restored by [n] point(s)." message, the centre of the message box disappears, leaving just the frame behind during the fade out (the correct behaviour is that the message remains and fades out with the rest of the party menu):

[PokeCommunity.com] Simple Modifications Directory [PokeCommunity.com] Simple Modifications Directory

This seems to be related to this part of the modification:

Diff:
if (sTextPrinters[i].active)
{
    u16 renderCmd = RenderFont(&sTextPrinters[i]);
+   CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX);
    switch (renderCmd)
    {
        case RENDER_PRINT:
-           CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, COPYWIN_GFX);
        case RENDER_UPDATE:

However, reverting these lines causes text to be cut off short for various messages.
 
[Emerald] Ability Switcher via special

This scripting special lets you switch between a Pokémon's two abilities. If the Pokémon only has one possibile ability, the special does nothing. The Pokémon is selected using special ChoosePartyMon, but this can be changed to whatever you want of course.

For a far more advanced version of this, check out ghoulslash's ability tutor. I found it to be completely overkill for my purposes, so I made this far more basic implementation.

Tutorial:
https://github.com/pret/pokeemerald/wiki/Ability-Switcher-via-special

[PokeCommunity.com] Simple Modifications Directory
[PokeCommunity.com] Simple Modifications Directory
 
Last edited:
[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.
[PokeCommunity.com] Simple Modifications Directory


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


Access ingame:
From now on if you want the menu to show up you have to define TX_DEBUGGING in debug.h and delete/uncomment the line if you don't want it to show up.
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 have this issue when trying to input git pull xaman tx_debug_system

From https://github.com/TheXaman/pokeemerald
* branch tx_debug_system -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
 
I have this issue when trying to input git pull xaman tx_debug_system

From https://github.com/TheXaman/pokeemerald

* branch tx_debug_system -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
See: https://www.pokecommunity.com/threads/making-a-chosen-party-member-shiny.505849/#post-10782572
 
[EMERALD] Wild Pokemon Evolve​

Make Wild Pokemon spawn in their evolved forms (if able), like Oddish & Zigzagoon on route 119 being over the minimum level required to evolve.
(Seems to only work with evolution type: EVO_LEVEL. EVO_LEVEL_SILCOON is always triggered over EVO_LEVEL_CASCOON (without adding 50% chance to force cascoon).)
(Other evo types seem uneffected. Only effects Wild Land mons (not fishing mons).) Sorry in advance for any sloppy/inefficient code..
(Highly inspired by: Set Wild Pokémon's Levels Dynamically.)

Spoiler: Inside of include/constants/flags.h


Spoiler: Inside of src/wild_encounter.c
 
Last edited:
[EMERALD] Wild Pokemon Variation
This is a middle-ground (more or less) between a full blown Randomizer and the original wild Pokemon encounters on any given map/area. (Only effects Wild Land mons (not fishing mons).)
Wild Pokemon generated in this way that do not match the original species from the map it spawns on will be considered illegal/hacked if traded/migrated (if you care about that)..
I'm using Disable-Catching-Pokemon to prevent to the PLAYER from capturing illegal mons (and all others in the process unfortunately), while "Wild Pokemon Variation" is enabled (but it's not required)...

Spoiler: Inside of include/constants/flags.h


Spoiler: Inside of src/wild_encounter.c
 
Last edited:
[PokeEmerald] Faster HP Recovery in the Party Menu

Update on Sep. 29th 2024: Fix the glitch of the SOFTBOILED's move effect.

As we all know, in the original version of Pokemon Emerald, when the player chooses to use any restore item (like the potion, the revives, the full restores or even any kind of the beverages and drinks) on their pokemon, the HP would be increased only 1 point by 1 frame, which seems to be a long and dreadful process when it comes to a pokemon has both high level and high HP, like BLESSY, SNORLAX or WAILORD and so on.
Well, since the faster HP drain had been completed and implemented as an important QOL feature. I think there is no reason for not doing some changes for that. Therefore, here it is.
For anyone still doesn't get what I'm talking about. Here is a picture of it.
[PokeCommunity.com] Simple Modifications Directory

Then, here's the explanation below.
Firstly, Open the source code file named "party_menu.c", and then search for one task function named "Task_PartyMenuModifyHP".
By the time you finding it, copy and paste the code provided below to change it completely.
Spoiler:
Here's one picture showing this step.
Spoiler:

And then, scroll down to the function below it, the name of which is "ItemUseCB_Medicine". By the time you finding it, do the changes below to a line of the code strings in it:
Spoiler:
Here's also the picture of what I'm talking about.
Spoiler:

Thirdly, scroll down or search for another function named "UseSacredAsh", by the time you finding it, please also do some changes to its code strings below, which is similar to the previous step:
Spoiler:
Here is the picture of it.
Spoiler:

Forthly, open another source code file named "fldeff_softboiled.c". And search for the function named "Task_TryUseSoftboiledOnPartyMon" in it.
By the time you finding it, please also do some changes to the code line in it
Spoiler:
Here is the picture of it:
Spoiler:

Fifthly, jump to another function named "Task_SoftboiledRestoreHealth", which is straightly below the function in previous step. By the time you reaching it ,please also do some similar changes to the code strings again:
Spoiler:
Here is also a picture of it:
Spoiler:

Finally, save your file and test your ROM. And that's pretty much of it.
By the way, I think it necessary for me to explain how it works:
For the pokemon whose maxHP is lower than 48, when any type of the restore item is used on it, the HP would increase 2 points by 1 frame (while in the original version of Pokemon is 1 point by 1 frame)
For the pokemon whose maxHP is more than 48, this newly added function uses the same process of the faster HP Drain tutorial.
I had also added a condition check for the increasement of the HP, to make sure that it would not become overflown or deflown.
Also, it's nothing but only my personal and tiny research. If there is any glitches or bugs in it, and also there's any easier or clearer method of this post. Feel free to give me a reply or send message to me.
Thanks for reading it and sorry for my poor English.
 
Last edited:
[PokeEmerald] Faster HP Recovery in the Party Menu

As we all know, in the original version of Pokemon Emerald, when the player chooses to use any restore item (like the potion, the revives, the full restores or even any kind of the beverages and drinks) on their pokemon, the HP would be increased only 1 point by 1 frame, which seems to be a long and dreadful process when it comes to a pokemon has both high level and high HP, like BLESSY, SNORLAX or WAILORD and so on.
Well, since the faster HP drain had been completed and implemented as an important QOL feature. I think there is no reason for not doing some changes for that. Therefore, here it is.
For anyone still doesn't get what I'm talking about. Here is a picture of it.
[PokeCommunity.com] Simple Modifications Directory

Then, here's the explanation below.
Firstly, Open the source code file named "party_menu.c", and then search for one task function named "Task_PartyMenuModifyHP".
By the time you finding it, copy and paste the code provided below to change it completely.
Spoiler:
Here's one picture showing this step.
Spoiler:

And then, scroll down to the function below it, the name of which is "PartyMenuModifyHP".
By the time you finding it, change the code of it to what I provide below.
Spoiler:
Here's also the picture of what I'm talking about.
Spoiler:

Finally, save your file and test your ROM. And that's pretty much of it.
By the way, I think it necessary for me to explain how it works:
For the pokemon whose maxHP is lower than 48, when any type of the restore item is used on it, the HP would increase 2 points by 1 frame (while in the original version of Pokemon is 1 point by 1 frame)
For the pokemon whose maxHP is more than 48, this newly added function uses the same process of the faster HP Drain tutorial.
I had also added a condition check for the increasement of the HP, to make sure that it would not become overflown or deflown.
Also, it's nothing but only my personal and tiny research. If there is any glitches or bugs in it, and also there's any easier or clearer method of this post. Feel free to give me a reply or send message to me.
Thanks for reading it and sorry for my poor English.
Worked amazingly well , good contribution!
 
[PokeEmerald] Add New Encounter Tables
There are four different encounter tables in The 3rd Gen Pokémon Games: Land, Surf, Fishing, and Rock Smash. But what if you want to add even more? In this tutorial I will teach how to do just that, using Long Grass as an example.

First, we need to define a variable for them to be stored in.

Spoiler: include/wild_encounter.h


Then, we define the encounter rates and the quantity, of the available encounters.

Spoiler: src/data/wild_encounters.json


Then we explain to the game that these encounters now actually exist.

Spoiler: src/data/wild_encounters.json.txt


Before moving on to explain to the game how to actually behave if an encounter is had in the long grass.

Spoiler: src/wild_encounter.c


And lastly, we add an exception, to tell the game to not treat long grass like tall grass.

Spoiler: src/metatile_behavior.c


After adding all this, just go to Porymap, and add the encounters through it like this
[PokeCommunity.com] Simple Modifications Directory


Also, my apologies if this tutorial was subpar. It's my very first tutorial ever, with less than a week of C experience under my belt.
 
Last edited:
[pokeemerald & pokefirered] Disable music (with flags/etc)

At "src/sound.c" go to "void PlayBGM(u16 songNum)"

There just add a new "if" statement at the beginning (highlighted in green):

Spoiler:


In this case I used an already existing option I wanted to replace (battle style), but you can also use a flag instead.

For example:

if (FlagGet(EXAMPLE_FLAG))
songNum = 0;


With this, all battle and overworld BGMs are disabled (it won't disable music already playing right away, you need to soft reset, exit the area or start a battle).
 
[pokeemerald & pokefirered] Disable music (with flags/etc)

At "src/sound.c" go to "void PlayBGM(u16 songNum)"

There just add a new "if" statement at the beginning (highlighted in green):

Spoiler:


In this case I used an already existing option I wanted to replace (battle style), but you can also use a flag instead.

For example:

if (FlagGet(EXAMPLE_FLAG))
songNum = 0;


With this, all battle and overworld BGMs are disabled (it won't disable music already playing right away, you need to soft reset, exit the area or start a battle).
Piece of cake!
 
[Emerald] Improve Partner Battle Code

In Pokémon Emerald, aside from the Battle Frontier, there's only one moment where you team up with another NPC in battle: Steven Stone, during the Mossdeep Space Center event. The tutorial below will address various issues with the code related to that battle and offer improvements to bring it closer to the mechanics seen in modern games. This will also make it easier to introduce new partner battles to the game, without having to worry about the issues and caveats that come with partner battles.

Tutorial: https://github.com/pret/pokeemerald/wiki/Improve-Partner-Battle-Code/

Somewhat related to the tutorial above, I have a small request for those who own any modern Pokemon games. In regular double battles in generation 3 and 4, a level 100 Pokémon will ''absorb'' half of the experience earned in battle. While it can't gain experience, it still causes the other participating Pokémon to only gain half of experience. I'd like to know if this mechanic was changed at any point in modern games. I have a suspicision this was an oversight on GameFreak's end. I made part of the change in step 4 of the tutorial under that assumption.

Unfortunately I don't own any of the newer games, so I can't test this for myself. Any help would be appreciated. Feel free to send me your findings via a DM on Pokecommunity or Discord (''Scyrous'') and I'll update the tutorial.
 
Last edited:
Back
Top