• 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?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Quick Research & Development Thread

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
I've located a table that is possibly useful for ASM hackers (certainly those doing abilities). It controls the end of turn effects that tend to do damage such as Leech Seed, Burn, Poison and Nightmare (among other things).

In Fire Red it is located at 0182FC, and in Emerald at 0409C8.

I'm compiling a list of effects that will correspond to the relevant 4 byte entries (they're just pointers that get loaded).

Spoiler:
 
Last edited:

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
Change the order that badges appear on the trainer card (untested)
Simply makes the loop read from a lookup table before checking for the badge.
Spoiler:
 
48
Posts
9
Years
  • Age 24
  • Seen Mar 9, 2024
Reusable TMs in Emerald

So I was taking a peek through good old reseach and development today when I saw a cute little post about resuable TMs. You know, making TMs act like HMs. After seeing that it had been found on Ruby and FireRed, I thought, why not find it one Emerald? So I did.

To do this little bad boy, go to 0x1B6EE0 in your Emerald ROM and change the A9 there to 90.
Simple as that!

Here's a tiny little explanation for those wondering.

First, 0x1B6EE0 is this little section of code called when a TM or HM is being used. For simplicity's sake, I'll show what is relevant:

Code:
081B6EE0: 20A9 mov r0, #0xA9
081B6EE2: 0040 lsl r0, r0, #0x1
081B6EE4: 4284 cmp r4, r0
081B6EE6: bhi $081B6EF0

What it does, is first take the number A9, and put it in r0. Then, it takes r0 and left shifts it 1. This is the same as multiplying by 2 (A9 << 1 = A9 * 2 = 152). If one was to look at any item editor, they would see that this is the index of TM50 in Emerald. Then, this new value is compared to r4, which has the index of the TM/HM being used. If this number higher, the game knows that an HM was used, so it goes to the relevant area to keep it.

This is where we come in. What we want the game to think is that all TMs are the same as HMs. So, what we need to do is change the index it looks for into the index for the first TM, rather than the first HM. So looking at the items, TM01's index is 121. Dividing this by 2 gives 90, so that is why we put 90. The only downside to doing this really is that item 120 is included in this check, which doesn't matter because it's not a TM anyway (it's the Devon Goods). So there ya have it!

That's great .but how to remove the number show text
like "TM1 x1"
to
"TM1 "
 

Exodrake

The Manliest Chick that Ever Manlied
163
Posts
10
Years
  • Age 30
  • Seen Nov 30, 2016
Is there a method to remove the 100 EV cap on the EV-enhancing medicines (Protein, etc.), for FireRed?
 

MrDollSteak

Formerly known as 11bayerf1
858
Posts
15
Years
I'm not sure if this is the right place as such for this, but I guess it's sort of Research...

But anyway, the Egg hatching graphics are actually completely independent from the 'Pokemon' Egg sprite which has the index 19C. You can find this graphics in the HUD navigation for Fire Red but I thought I'd post the offsets here as well as the necessary image to replace them with in NSE. Just insert sprite Image+Palette and save the image and the palette to the Rom. It doesn't need any repointing, and the image is indexed.

Fire Red

Palette: 25F842
Image: 25F862

Emerald

Palette: 32B70C
Image: 32B72C
 

Attachments

  • 412.png
    412.png
    726 bytes · Views: 60
Last edited:

Joexv

ManMadeOfGouda joexv.github.io
1,037
Posts
11
Years
Is this also the area where Emerald's badge obedience checks are located? I want to mess with the levels that badges allow obedience for.

Levels checks are at:
08045CC6 (0)
08045D4A (10)
08045D58 (30)
08045D66 (50)
08045D74 (70)

The flags this checks are at 08045DC4. There are 4 (2 bytes each). The first flag (0x86E) makes everything obey.
 
457
Posts
10
Years
  • Age 28
  • Seen Mar 17, 2024
Sorry for repost but it should be deserved to be here now.

Emerald Encounter Music

I have been using Hopeless Trainer Editor as my current trainer editor in use to edit trainer data and to change encounter music assigned on trainers as well. I also wondered which songs (Sappy number does each value uses). I have researched that on. And, guess what? Just like in FireRed, an assigned encounter music number plays a certain theme. I was also using Unnamed Trainer Editor and since didn't listed up for Emerald so, here is the list:

Encounter Themes:
  • 0x0: The Youngster encounter theme which music number is 0x17C
  • 0x1: The Lass encounter theme which music number is 0x197
  • 0x2: The Tuber encounter theme which music number is 0x17B
  • 0x3: The Bug Maniac encounter theme which music number is 0x1A7
  • 0x4: The Black Belt encounter theme which music number is 0x1A0
  • 0x5: The Cool Trainer (now Ace Trainer) encounter theme which music number is 0x1A1
  • 0x6: The Team Aqua encounter theme which music number is 0x1A3
  • 0x7: The Team Magma encounter theme which music number is 0x1B9
  • 0x8: The Swimmer encounter theme which music number is 0x181 (edit at 0xB1C30 to change song number 81 01 00 00)
  • 0x9: The Kid encounter theme which music number is 0x1C1
  • 0xA: The Elite Four encounter theme which music number is 0x1C2
  • 0xB: The Hiker encounter theme which music number is 0x1C3
  • 0xC: The Reporters Gabby and Ty encounter theme which music number is 0x1C5
  • 0xD: The Gentleman encounter theme which music number is 0x18D

0xE until 0xFF (14 until 255) plays the Bug Maniac encounter theme which music number is 0x1A7. Alright! That goes for a while. I still need to research them more since there are further information about them on how they work and how they are listed up. I have seen its table around but it is not as dynamic to be easily repointed. I will update this post as soon as I have gathered information.

One important thing: During the process on expanding the Pokedex for Emerald, the ninth step messes up the load of 0x8 encounter music which I have discovered earlier. It seems that in the first twenty-nine 81 01 00 00-s includes the 0x8 encounter theme. To fix the 0x8 encounter music once again: go to 0xB1C30 then type 81 01 00 00.

To conclude this, you can have no longer translating the Controlling/Extending Encounter Music which is only for FireRed. You can have fourteen kinds of encounter music in Emerald (than FireRed being three unless you have applied that hack). You have too much already so expanding it on Emerald is pointless.

Emerald Overworld and Battle Textboxes

Getting lazy jogging down stuff from VBA's Logs? There are few people ask about that. Alright! For being fair, here are the data you need... again for Emerald:

Emerald Overworld Textbox: 0x08DDD768 (uncompressed image)
Emerald Overworld Textbox Palette: 0x08DDD728 (uncompressed palette)
Emerald Battle Textbox: 0x08C00000 (compressed image)
Emerald Battle Textbox Pal: 0x08C004E0 (compressed palette)

I guess you know what compressed and uncompressed images and palettes are? Good!
 

Jaizu

Average rom hacker
279
Posts
14
Years
Hi! If you are using a 32x32px overworld for the PLAYER(NDS style) you will notice that it will look weird when you choose your name.

qB8ZxAH.png


To fix it just go to the direction 083A3BC0 and put 18 instead 10
It makes the PLAYER and GARY overworlds look like a 32x32px.

7HNuVBd.png


Credits to daniilS
 
Last edited:

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023

Encrypted Counters

FR saves 64 hidden words after the variables space. Apparently, only the first 51 of them are actually used (still their purpose is unknown) and have a max value of 0x00FFFFFF (16 millions). You can access them by using variable 0x4100 + [counter id * 2, only lower halfword] (but you need to disable the security key to read the actual value) and increment by 1 using the scripting command cmdc3 [id] and battle script command cmd60 [id].

Here's the list of counters i found:
Code:
0x0 n. saves
0x1 hall of fame (HHHH/MM/SS)
0x5 n. steps
0x7 n. poke battles
0x8 n. wild battles
0x9 n. trainer battles
0xA n. hall of fame
0xB n. poke caught
0xC n. poke fished
0xD n. eggs hatched
0xE n. poke evolved
0xF n. pokecenter heal
0x11 n. safari games
0x12 n. trees cut
0x13 n. rocks smashed
0x15 n. trades
0x17 n. link win
0x18 n. link loss
0x19 n. link draw
0x1A n. splash used 
0x1B n. struggle used
0x1C n. gamecorner max payout
0x20 ??? [manipulated by special 0xED]
0x26 n. pokemart purchases
0x27 n. itemfinder uses
0x28 n. thunderstorm weather in overworld (unused)
0x29 n. pokedex opened
0x2A n. elitefour win? (updated with hall of fame)
0x2B n. ledge jumps
0x2F ???
0x32 n. union room
0x33 n. berry crush
 

Deokishisu

Mr. Magius
990
Posts
18
Years

Encrypted Counters

FR saves 64 hidden words after the variables space. Apparently, only the first 51 of them are actually used (still their purpose is unknown) and have a max value of 0x00FFFFFF (16 millions). You can access them by using variable 0x4100 + [counter id * 2, only lower halfword] (but you need to disable the security key to read the actual value) and increment by 1 using the scripting command cmdc3 [id] and battle script command cmd60 [id].

Here's the list of counters i found:
Code:
0x0 n. saves
0x1 hall of fame (HHHH/MM/SS)
0x5 n. steps
0x7 n. poke battles
0x8 n. wild battles
0x9 n. trainer battles
0xA n. hall of fame
0xB n. poke caught
0xC n. poke fished
0xD n. eggs hatched
0xE n. poke evolved
0xF n. pokecenter heal
0x11 n. safari games
0x12 n. trees cut
0x13 n. rocks smashed
0x15 n. trades
0x17 n. link win
0x18 n. link loss
0x19 n. link draw
0x1A n. splash used 
0x1B n. struggle used
0x1C n. gamecorner max payout
0x20 ??? [manipulated by special 0xED]
0x26 n. pokemart purchases
0x27 n. itemfinder uses
0x28 n. thunderstorm weather in overworld (unused)
0x29 n. pokedex opened
0x2A n. elitefour win? (updated with hall of fame)
0x2B n. ledge jumps
0x2F ???
0x32 n. union room
0x33 n. berry crush

Some of these are probably used to give out the stickers on Four Island or to display link records in the upstairs of the Pokemon Center, but others may be RS leftovers that the Storyteller used to keep track of "Legendary Trainers". Like, how often you saved or used the itemfinder and such. In fact, Bulbapedia's list of the Storyteller's stories matches almost all of these, and I suspect the unknown ones check flags that RS used (such as number of berries planted or contests won).
 

Mr.Pkmn

Ordinary ASM Magician
53
Posts
15
Years
  • Seen Nov 17, 2023
Some of these are probably used to give out the stickers on Four Island or to display link records in the upstairs of the Pokemon Center, but others may be RS leftovers that the Storyteller used to keep track of "Legendary Trainers". Like, how often you saved or used the itemfinder and such. In fact, Bulbapedia's list of the Storyteller's stories matches almost all of these, and I suspect the unknown ones check flags that RS used (such as number of berries planted or contests won).
Yes, only some of them are used. The others are totally missing (like the heal at home, which is 0x10 but unused by the mom script)
 

Blah

Free supporter
1,924
Posts
11
Years
Hey guys, I just wanted to post a warning about a PKSV bug which occurs quite commonly when testing out routines with callasm (perhaps it happens in XSE too, I haven't tried).

Steps to produce bug:
Write a routine and insert it into ROM
Write Script with callasm which uses said routine, compile it
Close PKSV

- Normally around here, I give my routines a game test -

Open a new PKSV and decompile the script
Make modifications to the routine
Make modification to the script and compile

Result:
Modification to the routine are undone. To avoid the bug you need to always reinsert the routine after compiling a script which uses the routine.
 
794
Posts
10
Years
I've finally updated this thread, too! Again, notify me if I missed something. I too shall be more diligent in keeping this thread updated. :D

Wouldn't it be better if each link moved you to a specific post instead of a page? Just like Lost Heart did with the ASM resource thread.
 

BLAx501!

Pokemon Flux
80
Posts
10
Years
I'm not sure if this has already been discussed here, but, would it be possible to port the breakable tiles from Sky Pillar (R/S/E) to Fire Red? I mean, to make them only able to be surpassed using the bike and non stopping.
 

Telinc1

Weirdo Extraordinaire
168
Posts
10
Years
I'm not sure if this has already been discussed here, but, would it be possible to port the breakable tiles from Sky Pillar (R/S/E) to Fire Red? I mean, to make them only able to be surpassed using the bike and non stopping.
Definitely possible, and a similar thing is actually done in the cave in Four Island (forgot the name). There's a scripting command which deals with these sort of things, I think it was cmd3c or cmda6 IIRC. In RSE the same functionality is also used for the ash grass in Route 113. There's a post in this thread which explains the usage of the command, too lazy to dig it up.
 

Telinc1

Weirdo Extraordinaire
168
Posts
10
Years
I just made a little discovery for Pokédex hacking to add on to this post. What's been really bugging me is how you can change the amount of items the National Pokédex has, but the byte for the Regional one isn't known. Well, the 0x13 at 0x452010 is that "missing unknown value". Of course, the amount of items in the National Pokédex is at 0x4520C8, just like Chaos Rush discovered.
 
Back
Top