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.
[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.
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
[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":
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 :/
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:
the entirety of this part happens in gflib/text.c.
in the function
Code:
void RunTextPrinters(void)
:
Code:
if (sTextPrinters[i].active)
{
u16 temp = RenderFont(&sTextPrinters[i]);
[COLOR="Lime"]+ CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, 2);[/COLOR]
switch (temp)
{
case RENDER_PRINT:
[COLOR="Red"]- CopyWindowToVram(sTextPrinters[i].printerTemplate.windowId, 2);[/COLOR]
case RENDER_UPDATE:
now text will be printed 2 characters per frame on mid speed, and 4 characters per frame on fast speed. if you'd like to change this, just change x in the lines that say
Code:
repeats = x
for each text speed setting in the switch statement you added earlier.
part 2: changing slow and mid
Spoiler:
now that more than one character is being printed per frame, we might not want text speed slow and text speed mid to have delays of multiple frames every time they want to print a character. we can quite easily change how many frames the game waits before trying to print again, for each text speed setting. to do this, we go to src/menu.c.
find
Code:
static const u8 sTextSpeedFrameDelays[] =
and simply change the number for each setting. in my case, i changed each number to 1, because i didn't want any time between each character or group of characters being printed.
by setting the frame delay of slow speed to be 1, and the repeats of slow speed to be 1 as well, it effectively works the same way as text speed fast originally did.
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):
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.
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.
[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.
Features:
Spoiler:
Utility:
Heal player party
Clock: check and set
Fly to all cities: ----------------------------Warp to any map warp: --------------Check saveblock space:
Check weekday: does nothing, left in as a simple spot to add some test stuff for you guys
Change Trainer name, gender and OIT:
Flags:
Added some usefull debug flags like ignore collision, no wild encounters (Inmortal) and no trainers attacking you.
Toggle any flag ingame: -------------Toggle specific usefull flags
Vars:
Read and change any vars ingame:
Give:
Items:
All TMs:
Pokemon in 2 versions:
---Simple: only takes the ID (source code, not ingame) and a level:
---Complex: ID, level, shiny?, nature and ability (including hidden with PE), individual IVs and up to 4 custom moves.
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.
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
Define an unused flag as "FLAG_ENABLE_WILDMON_EVOLUTION"
Spoiler: Inside of src/wild_encounter.c
Inside: static void CreateWildMon(u16 species, u8 level)
directly under this line: CreateMonWithNature(&gEnemyParty[0], species, level, USE_RANDOM_IVS, PickWildMonNature());
paste:
With that, Pokemon with the evo type EVO_LEVEL will spawn evolved up to their highest form available when FLAG_ENABLE_WILDMON_EVOLUTION is set.
Dont forget to set the FLAG somewhere (like a script).
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
If you want to prevent capturing while "Wild Pokemon Variation" is enabled, you can use "FLAG_DISABLE_CATCHING" from Disable-Catching-Pokemon and don't need to define a new one.
Otherwise define an unused flag as something like "FLAG_ENABLE_WILDMON_VARIATION".
Spoiler: Inside of src/wild_encounter.c
Inside: static void CreateWildMon(u16 species, u8 level)
directly under this line: CreateMonWithNature(&gEnemyParty[0], species, level, USE_RANDOM_IVS, PickWildMonNature());
paste:
if (FlagGet(FLAG_DISABLE_CATCHING)) // Or "FLAG_ENABLE_WILDMON_VARIATION" depending on what you named your FLAG { u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES); // Stores the wild Pokemon that SHOULD spawn in "species" (in case no random Pokemon is selected). u16 RandSpecies; if ((Random() % 4) == 1) // From my understanding, this picks a number between 0 & 3 and if its equal to 1 (25% chance) then it sets the "RandSpecies" directly below to: SPECIES_PICHU. RandSpecies = SPECIES_PICHU; else if ((Random() % 500) == 1) // Same thing but 1 in 500 chance to set "RandSpecies" to: SPECIES_EEVEE. RandSpecies = SPECIES_EEVEE; else if (FlagGet(FLAG_DEFEATED_RIVAL_ROUTE103) && (Random() % 1000) == 1) // if you've defeated rival on route103, 1 in 1000 chance to set "RandSpecies" to: SPECIES_BULBASAUR. RandSpecies = SPECIES_BULBASAUR; else if (FlagGet(FLAG_IS_CHAMPION) && (Random() % 8192) == 1 // if you're the champion, 1 in 8192 chance (Shiny odds) to set "RandSpecies" to: SPECIES_CELEBI. RandSpecies = SPECIES_CELEBI; else // If no Random Pokemon are selected above, sets "RandSpecies" to whatever is stored in "species". RandSpecies = species; CreateMonWithNature(&gEnemyParty[0], RandSpecies, level, USE_RANDOM_IVS, PickWildMonNature()); // Creates a Wild Pokemon with the species being whatever is stored in "RandSpecies" }
Change the SPECIES & encounter odds (& FLAGs) above to whatever you want.
To add more pokemon just add a new: else if ((Random() % X) == 1) RandSpecies = SPECIES_X;
above the last "else".
Spoiler: If you would like to use all the base form land mons:
This huge list of checks causes a 1-2ms delay before wild pokemon battles start.. if anyone knows a better way to do this please let me know..
Now all thats left to do is set the FLAG from somewhere (FLAG_DISABLE_CATCHING or FLAG_ENABLE_WILDMON_VARIATION).
The above pokemon (if selected) will now spawn anywhere Wild Land mon normally spawn..
(If you are using "Wild Pokemon Evolve", make sure "Wild Pokemon Variation" is above it and below CreateMonWithNature.)
(I'm not a coder and Everything i know is from people who have shared their knowledge in places like this and youtube.
I hope anyone with more knowledge and exp than me can point out any shortcomings or simple improvements to this, that a C++ noob like me might have missed..)
[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.
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.
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:
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:
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
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:
Change the code strings that I provide below:
From:
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.
[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.
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.
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.
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.
[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.
[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:
void PlayBGM(u16 songNum)
{ if (gSaveBlock2Ptr->optionsBattleStyle == OPTIONS_BATTLE_STYLE_SHIFT)
songNum = 0;
if (gDisableMusic)
songNum = 0;
if (songNum == MUS_NONE)
songNum = 0;
m4aSongNumStart(songNum);
}
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:
void PlayBGM(u16 songNum)
{ if (gSaveBlock2Ptr->optionsBattleStyle == OPTIONS_BATTLE_STYLE_SHIFT)
songNum = 0;
if (gDisableMusic)
songNum = 0;
if (songNum == MUS_NONE)
songNum = 0;
m4aSongNumStart(songNum);
}
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).
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.
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.