• 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

17
Posts
3
Years
  • Age 28
  • Seen Jul 8, 2022
This thread is not for making requests or asking for help. It's about posting simple features or changes for others to use.
You should open a new thread in ... for this kind of matters.

That being said, I think you're supposed to add an entry for every existing item in src/data/pokemon/item_effects.h. Or at least every single one until the Metal Coat in this case.
Are you sure that you did that?
Adding a single entry for the Metal Coat after the last one and calling it a day won't do, as the list clearly covers every single item up to the Enigma Berry by default.

Oh sorry! I'll head over there with the question. Thanks for the quick response! I'll delete the post here and open up a thread there.
 
49
Posts
5
Years
  • Age 29
  • Seen Dec 27, 2023
[pokeemerald] Automatically switch to lower case in the naming screen

First of all thanks for writing a tutorial and I don't want to be a spoilsport, but the exact same code already exists in a tutorial from Jaizu on page 6, it just hasn't been added to the main page yet by Avara.
 
22
Posts
14
Years
  • Seen Oct 27, 2023
Oh my bad, I admittedly haven't fully explored this thread, which I should've done before posting. Should I delete my post? I don't really want to take away from the previous poster.
 
49
Posts
5
Years
  • Age 29
  • Seen Dec 27, 2023
Oh my bad, I admittedly haven't fully explored this thread, which I should've done before posting. Should I delete my post? I don't really want to take away from the previous poster.

No problem and yes, thats probably best
 
5
Posts
10
Years
  • Seen Jan 6, 2024
Let a Pokémon forget any move they know (Emerald)

As you all know, there's certain moves that a Pokémon can't forget on their own, these are the Hidden Machine Moves.
There is a function which handles that, it's called CanReplaceMove and it can be found in the src/pokemon_summary_screen.c file.
By making this function always return a value of TRUE, we can let any Pokémon forget any of their moves at will.

To do this, let's open up the src/pokemon_summary_screen.c file and change the CanReplaceMove function from this:
Code:
static bool8 CanReplaceMove(void)
{
    if (sMonSummaryScreen->firstMoveIndex == MAX_MON_MOVES
        || sMonSummaryScreen->newMove == MOVE_NONE
        || IsMoveHm(sMonSummaryScreen->summary.moves[sMonSummaryScreen->firstMoveIndex]) != TRUE)
        return TRUE;
    else
        return FALSE;
}

To this:
Code:
static bool8 CanReplaceMove(void)
{
    return TRUE;
}

Save, build a ROM and that's basically it.




Alternatively, we can instead remove this function and adjust the code where it's called from accordingly.
Thankfully, the CanReplaceMove function is only called in the Task_HandleReplaceMoveInput function, so basically we'd need to:
1) Remove the declaration of the CanReplaceMove function (Line 214 by default).
2) Remove the CanReplaceMove function (Lines 2210 to 2218 by default).
3) Adjust the if check of the Task_HandleReplaceMoveInput function where CanReplaceMove is called, changing it from this:
Code:
            else if (gMain.newKeys & A_BUTTON)
            {
                if (CanReplaceMove() == TRUE)
                {
                    StopPokemonAnimations();
                    PlaySE(SE_SELECT);
                    sMoveSlotToReplace = sMonSummaryScreen->firstMoveIndex;
                    gSpecialVar_0x8005 = sMoveSlotToReplace;
                    BeginCloseSummaryScreen(taskId);
                }
                else
                {
                    PlaySE(SE_HAZURE);
                    ShowCantForgetHMsWindow(taskId);
                }
            }

To this:
Code:
            else if (gMain.newKeys & A_BUTTON)
            {
                StopPokemonAnimations();
                PlaySE(SE_SELECT);
                sMoveSlotToReplace = sMonSummaryScreen->firstMoveIndex;
                gSpecialVar_0x8005 = sMoveSlotToReplace;
                BeginCloseSummaryScreen(taskId);
            }

Quick Showcase:
gTMYk31.gif


And that's pretty much it.​

Your guide is very helpful, but I would like to add that that only works when you want to replace a move outside of battle:
Here an update that I did that would work in-battle too in the file src/battle_script_commands.c:

Remove the following in the line 5423:
Code:
            if (IsHMMove2(moveId))
                {
                    PrepareStringBattle(STRINGID_HMMOVESCANTBEFORGOTTEN, gActiveBattler);
                    gBattleScripting.learnMoveState = 6;
                }
                else
                {

And do not forget to remove the final } from that function.
 
Last edited:

Jaizu

Average rom hacker
281
Posts
14
Years
There is a script command called setmonmove, however that one doesn't accept var values. I don't think this is too useful, but if you want to give it a var value just replace it's function with:
Code:
bool8 ScrCmd_setmonmove(struct ScriptContext *ctx)
{
    u8 partyIndex = ScriptReadByte(ctx);
    u8 slot = ScriptReadByte(ctx);
    u16 move = VarGet(ScriptReadHalfword(ctx));

    ScriptSetMonMoveSlot(partyIndex, move, slot);
    return FALSE;
}
 
1,309
Posts
12
Years
  • Age 31
  • Seen Nov 24, 2023
Hi all, as always thanks for contributing! Have updated the first post just now. Feel free to prod me if I missed any x
 

Lunos

Random Uruguayan User
3,111
Posts
15
Years
Gen. 6 styled Exp. Share
Quick heads up.
I pushed a new commit to my gen6_exp_share branch after Jaizu pointed out to me that I forgot to clear the value of gSaveBlock2Ptr->expShare upon starting a New Game.


Disable Pokémon animations [Em]
Nice and simple. It's also a repost from here.
These changes disable the sprite animations that Pokémon have in battle and in the Summary Screen too.
I'm posting it here because it'd be better archived here than in some random thread.

Showcase:
TynnKZK.gif


To implement this, y'all can either track my GitHub repository via git remote and pull the branch where I'm hosting the code:
Code:
git remote add lunos https://github.com/LOuroboros/pokeemerald
git pull lunos disable_pkmn_anims

Or you can also apply the changes manually:
https://github.com/LOuroboros/pokeemerald/commit/3908a7f00c2f832fba1339660fa8656020f35267
https://github.com/LOuroboros/pokeemerald/commit/6aec04a54d05c69a624b50495544d642e18409cf
Your choice.

And that's pretty much it.​
 
Last edited:

Jaizu

Average rom hacker
281
Posts
14
Years
[Pokeemerald] Auto-Run

Toggle an Auto-Run feature with the R-Button!
kg3848P.gif


The repo.

Notes:
Spoiler:

This branch has been updated:
  • Resets auto_run to false when you start a new game
  • You can press B to walk if you have it enabled! (I totally didn't steal the idea from Pokémon Unbound)
 
239
Posts
8
Years
  • Age 31
  • Seen Nov 12, 2023
[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:

css8Z0p.gif


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

How To Get:
 
118
Posts
4
Years
This might just be a personal problem, but when I try to get this hack to work in tandem with the "show IVs/EVs on the summary screen" hack, the nature colors only show the initial nature's bonuses/reductions, not the new ones. I might have just messed something up, but I wanted to check. If I'm just being dumb, I'll delete this post later. Amazing work, btw (P.S. If I should ask this somewhere else, please let me know)
 
239
Posts
8
Years
  • Age 31
  • Seen Nov 12, 2023
This might just be a personal problem, but when I try to get this hack to work in tandem with the "show IVs/EVs on the summary screen" hack, the nature colors only show the initial nature's bonuses/reductions, not the new ones. I might have just messed something up, but I wanted to check. If I'm just being dumb, I'll delete this post later. Amazing work, btw (P.S. If I should ask this somewhere else, please let me know)

This was actually an issue with my code. That's the downside of coding late at night :p I just pushed an update so the stat colors should change appropriately with the hidden nature
 
118
Posts
4
Years
[pokeemerald]Remove the Low Health Beep
This is a minor hack, but I thought it might be appreciated.
In:
Code:
src\battle_gfx_sfx.c
Spoiler:
That's about it. After this, you'll be free from that annoying beeping. My goal would be to make it beep a couple of times only, like in the newer games, but I have no idea how to pull that off.
 
Last edited:
118
Posts
4
Years
[pokeemerald]Editing the Save Screen
So, this just for people who want to have something different on the save screen than location, player name, Badges, caught Pokémon, and time spent playing. I only figured this out because my hack doesn't really involve either badges or catching Pokémon, so I just whipped something up to show more relevant information. Feel free to put whatever info you want on there.
Without further ado:
Spoiler:


EDIT: The initial changes I made lead to the wrong character displaying if the number used for badge display goes over 9. Reread to see the fix.
 
Last edited:

Lunos

Random Uruguayan User
3,111
Posts
15
Years
Gen. 6 styled Exp. Share (Em)

I ported this to Pokefirered a bit more than a year ago, but I never really shared it here.
Since someone asked me some questions about it, I quickly ported it to upstream.
While I was at it, I decided to put it in a branch of its own and bring it here.

Gen. 6 styled Exp. Share (FR)
There are no mechanical changes, so it works just like the Emerald port.

To add it to your project, you just need to track my repository via git remote and pull the branch where the code is.
Code:
git remote add lunos https://github.com/LOuroboros/pokefirered
git pull lunos gen6_exp_share

Video:


And that's pretty much it.​
[/CENTER]
 

Lunos

Random Uruguayan User
3,111
Posts
15
Years
Gen. 4 Styled Deoxys Form Change in the Overworld (Em)
I've been meaning to do this for sometime now, and welp, I've finally done it.
I implemented a special that allows the Player to change the form of their Deoxys if the conditions are met.
Since I don't really know about checking for specific tiles, I decided to instead check for metatile behaviors.
The game has plenty of those and there's a lot of unused ones at that.

So, the way this works is: special ChoosePartyMon asks the Player to choose a species.
If the species is Deoxys or any of its forms, and if the metatile behavior of the tile in front of the Player is MB_UNUSED_2C, MB_UNUSED_2D, MB_UNUSED_2E or MB_UNUSED_2F, then Deoxys' form changes.
If these conditions are not met, no form change happens.

EDIT: It doesn't hurt to clarify it, but the idea is to add 4 tiles each using the 4 different metatile behaviors.
Preferably meteors, just like those in Veilstone City (DPPt) or Route 3 (HGSS).


To add it to your project, you just need to track my repository via git remote and pull the branch where the code is.
Code:
git remote add lunos https://github.com/LOuroboros/pokeemerald
git pull lunos change_deoxys_form

Alternatively, you can implement the changes manually. They're in the latest commit of the branch.
https://github.com/LOuroboros/pokeemerald/commit/f6f0490e68f826eccde977d7d6e0766c67b01325

I think the code makes it obvious, but by default, I made it as a complement to the pokemon_expansion feature branch.
Y'all are free to tweak anything as you see fit. The function should be easy to read and understand.

Video:


And that's pretty much it.​
 
Last edited:
853
Posts
3
Years
  • Age 33
  • Seen Nov 9, 2023
just adding the video for Sapphire Jester
if you like, go like his post instead of mine.

[pokéemerald] Checking how much ash you collected with the Soot Sack

If you're looking to get all the items the glass workshop on route 113 can make, you'll have to walk through a lot of volcanic ash – the pretty desk requires 8000 steps! I remember back when I repeatedly walked back and forth collecting ash, I wish I had an easy way to check how much I've collected without going back to the workshop and talking to the glass maker. Well, thanks to disassembly, we can make that happen. It's real simple too, as the code is based on what is used for the coin case and powder jar.

In scr/item_use.c, add the following functions (I added mine after ItemUseOutOfBattle_PowderJar). The first function displays the message when the soot sack is used and the second function gets the ash count for the first function to use.
Code:
void ItemUseOutOfBattle_SootSack(u8 taskId)
{
	ConvertIntToDecimalStringN(gStringVar1, GetAshCount(), STR_CONV_MODE_LEFT_ALIGN, 4);
	StringExpandPlaceholders(gStringVar4, gText_AshQty);
	if (!gTasks[taskId].tUsingRegisteredKeyItem)
	{
		DisplayItemMessage(taskId, 1, gStringVar4, BagMenu_InitListsMenu);
	}
	else
	{
		DisplayItemMessageOnField(taskId, gStringVar4, Task_CloseCantUseKeyItemMessage);
	}
}		

u16 GetAshCount(void)
{
	u16 *ashGatherCount;
	ashGatherCount = GetVarPointer(VAR_ASH_GATHER_COUNT);
	return *ashGatherCount;
}
Then in include/item_use.h, declare the functions we just added:
Code:
void ItemUseOutOfBattle_SootSack(u8);
u16 GetAshCount(void);

Now in src/strings.c, add the following string. This is the message the 1st function will display.
Code:
const u8 gText_AshQty[] = _("ASH QTY:\n{STR_VAR_1}{PAUSE_UNTIL_PRESS}");

Next, add the declaration for the new string in include/strings.h:
Code:
extern const u8 gText_AshQty[];

Finally, in src/data/items.h change .fieldUseFunc for the Soot Sack to use the first new function we created. It should look like this when you're done:
Code:
[ITEM_SOOT_SACK] =
    {
        .name = _("SOOT SACK"),
        .itemId = ITEM_SOOT_SACK,
        .price = 0,
        .description = sSootSackDesc,
        .importance = 1,
        .pocket = POCKET_KEY_ITEMS,
        .type = 4,
        .fieldUseFunc = ItemUseOutOfBattle_SootSack,
        .secondaryId = 0,
    },

And you're done! Pressing on use with the soot sack will show you the quantity of ash you have. It's simple but I'm proud of it cause I'm new to disassembly stuff and since I haven't seen it listed here yet so I thought, Wynaut add it?

Video example:
turns out I can't post links yet, but put this in your address bar on youtube, after the dot com /watch?v=E0rngXrOUb4
- If you don't want it up like this just let me know jester and I'll remove it.-
 
11
Posts
3
Years
  • Age 33
  • Seen Jul 12, 2021
Improved Editing Trainer Parties [EM]

Provides control over most aspects of NPC trainers and homogenizes party types. Based off part of Syreldar's hack. Thanks to UltimaSoul for helping me get it to work.

How to use:

Code:
git remote add surskitty https://github.com/surskitty/pokeemerald
git pull surskitty trainer_control

src/data/trainer_parties.h will need all structs changed to TrainerMon and src/data/trainers.h needs to have .TrainerMon instead of .NoItemDefaultMoves et al. Those are both already applied to vanilla, but if you've done substantial edits, keep your versions and then do the find-replace to change structs and .party type.

More detailed usage notes are over here.

.gender and .nature should be set together. Nature needs to be non-Hardy for a pokemon to be guaranteed male.

I've done some testing, but if there's some other bugs, sorry about that.
 
Last edited:
10
Posts
4
Years
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.

This is not compatible with @ghoulslash's item_desc_header. Since it uses
ObjectEventInteractionGetBerryCountString
as a method to change the var related to the item ID, and this removes it where necessary. Resulting in his system not being able to properly determine the ID of the berry you're picking.

Fix:
Add back `special ObjectEventInteractionGetBerryCountString` on the following methods:
- BerryTree_EventScript_PlantBerry::
- BerryTree_EventScript_CheckBerryFullyGrown::

Code:
BerryTree_EventScript_CheckBerryFullyGrown:: @ 8274421
	buffernumberstring 1, VAR_0x8006
	lock
	faceplayer
[COLOR="Lime"]	[B]special ObjectEventInteractionGetBerryCountString[/B][/COLOR]
	goto BerryTree_EventScript_PickBerry

Code:
BerryTree_EventScript_PlantBerry:: @ 82744DD
	special ObjectEventInteractionPlantBerryTree
	incrementgamestat GAME_STAT_PLANTED_BERRIES
	special IncrementDailyPlantedBerries
[COLOR="Lime"]	[B]special ObjectEventInteractionGetBerryCountString[/B][/COLOR]
	return
 
Last edited:
Back
Top