• 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 fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[FR] Expanding TMs/HMs

239
Posts
8
Years
  • Age 31
  • Seen Nov 12, 2023
I haven't seen an actual tutorial on how to do this, so I figured I would make a step-by-step one to help out any users who might have difficulty. It might work better in a tool, but this gives users the ability to accommodate to their own item ID needs.

Here is a GIF of what the second option looks like

First off, this tutorial is based off of the research and assembly done by Jambo51, and further development from this post, and credit goes to Taの境界 for the initial routines, some of which are optimized/altered here.

Note:
This method allows for a total of 128 TMs/HMs. These TMs have to be in consecutive order with an allowable gap between items. For example, keeping the first 58 TMs/HMs, and starting TMs 51-128 at item ID 375, just after Sapphire). You can play around with the item IDs however you like, but I would recommend having TMs 1-58 in the original location (overwriting HMs 1-8 is fine), and having as small of a gap between TM 58 and TM59 as possible, as it looks the best graphically speaking.

Tools Needed:
Hex Editor
Assembly Compiler (HackMew's is found here)

Step 1: Expanding Items
Spoiler:


Step 2: New TM Moves and Names
Spoiler:



Step 3: TM Compatability
Spoiler:


Here is a python program I wrote for compatibility. It takes in a list of TM numbers (eg. 1 4 8 12 54 100) and spits out the hex string in little endian for you to easily insert into your ROM. Each step is laid out for you to easily edit to your desire and/or debug. Be aware that it will not stop you if you list a number outside of the range 1-128.
Spoiler:



Step 4: Remove TM animation
Spoiler:


Step 5: Expand Bag Item Limit
Spoiler:


Some Notes:
1. If you add new HMs and the associated move name is 13 characters long, it will string together the next HM name. Here is a fix for this problem:

Instructions:
1. compile and insert into free space
2. insert 00 48 00 47 (xx+1) xx xx 08 at 0x8dac

Spoiler:


2. I tried to make this as easy to follow as possible. Please post comments with questions or any bugs/issues you find. There may be mistakes since I copied a lot of data down...
3. If you are adding new HM moves, see this post for adding new field moves. Eg. Rock Climb
 
Last edited:
22
Posts
9
Years
  • Age 27
  • Seen Oct 18, 2021
Surprisingly someone doing this thread while credit to me, you should also credit to Jambo51 as I figured out how he manage to break that thing 3 years ago.
Not sure my code working but pretty sure that i wrote the things in faster way(and bad coding style),
Not hacking Fire Red anymore but I believe someone who really need this should plan to insert these routines with c.
 
239
Posts
8
Years
  • Age 31
  • Seen Nov 12, 2023
(I Like) It would be easier to create a patch.

My one hesitancy to do this would be that the data insertion might conflict with user's existing data, especially when the item data structure is so large.


Surprisingly someone doing this thread while credit to me, you should also credit to Jambo51 as I figured out how he manage to break that thing 3 years ago.
Not sure my code working but pretty sure that i wrote the things in faster way(and bad coding style),
Not hacking Fire Red anymore but I believe someone who really need this should plan to insert these routines with c.

Thanks for catching that, I'll update the initial post. I'm (slowly) learning how to hack in C currently so I may make/help make a tool to do just that at some point.
 
41
Posts
7
Years
  • Age 27
  • Seen Dec 16, 2018
First of all, thanks for sharing your routines in TM Expansion...
next, I am sure to implement this on my hack..

Last. I know this sounds very slowpoke. But, is there any possibility that the old compatibility will not be broken? Like there will be new sets of TM Compatibility..

for example:
TM 01 - HM 09 uses the old compatibility while TM 51 - TM 128 uses the new compatibility.

I know that the bit-reading is opposite from the previous way, correct me if I'm wrong. I'm still hoping the as-rare-as-shiny-pokemon possibility.
 
22
Posts
9
Years
  • Age 27
  • Seen Oct 18, 2021
First of all, thanks for sharing your routines in TM Expansion...
next, I am sure to implement this on my hack..

Last. I know this sounds very slowpoke. But, is there any possibility that the old compatibility will not be broken? Like there will be new sets of TM Compatibility..

for example:
TM 01 - HM 09 uses the old compatibility while TM 51 - TM 128 uses the new compatibility.

I know that the bit-reading is opposite from the previous way, correct me if I'm wrong. I'm still hoping the as-rare-as-shiny-pokemon possibility.

possible but not practical, you can have 2 compatibility table with some code tweaking. You need to consider vanilla compatibility table has 64 TM/HM slot. Currently no tool could edit your kind of compatibility so I prefer to redo all.
 
41
Posts
7
Years
  • Age 27
  • Seen Dec 16, 2018
possible but not practical, you can have 2 compatibility table with some code tweaking. You need to consider vanilla compatibility table has 64 TM/HM slot. Currently no tool could edit your kind of compatibility so I prefer to redo all.

As expected. Doing that might be helpful but hard to do. Anyways, this research is awesome.
 
239
Posts
8
Years
  • Age 31
  • Seen Nov 12, 2023
As expected. Doing that might be helpful but hard to do. Anyways, this research is awesome.

While it would be easier to redo the entire table, there is no reason you could not split the table up. You could theoretically have as many compatability tables as you want for various game scenarios or freespace limitations. Of course, as Taの境界 said, you would need to tweak the TM_compat code a bit. You would need to add in another check for register r4 such that it branches to load a separate table if the TM index (value in r4) is greater than 64, for example.
 
3
Posts
5
Years
  • Age 31
  • Seen Jul 26, 2019
Hi, thanks for the tutorial.
A question, can i translate this tutorial to spanish to post it in WhackaHack?
I will give the credits to you and the people who did the research

Sorry for the bad english
 
3
Posts
5
Years
  • Age 31
  • Seen Jul 26, 2019
I do all the steps in the tutorial and i have a problem:
The TM only appears in the TM case when i have recived all them.
I explain:
I made 2 scripts: In one of them i give to the player only 1 or 2 TM
In the second script i give to the player all the TM and HM

If i execute the first script, when i open the TM case, the game freeze. If i execute the second script, i have no problem, i open the TM case and all the TM and HM are there.
This happen to me no matter what TM i am giving in the first script.
If i execute the second script and after that i execute the first script, i open the TM case and i have no problem: i have all the TM and HM, and the TM given in the first script i got 2 of them.
So is like a problem of visualization of the TM, i tried change the RAM adress that i use in the step 5 but i got the same problem.

Do anyone else have this problem?
What did i do wrong?

EDIT:
I already discovered my error, in the modification of the byte in 9A600, i put the HM01 item ID instead of the TM01 Object ID.
So, when i put it well...i have no problem.

Again, sorry for the bad english.
 
Last edited:
32
Posts
5
Years
  • Age 18
  • Seen Sep 1, 2023
Instructions:
1. replace 0xXX and 0xYY with appropriate vals (see comments)
2. replace 0x08XXXXXX with address of new tm move table
3. compile and insert into thumb-aligned free space (ending in 0,4,8, or C)
4. insert 00 49 08 47 (xx+1) xx xx 08 at 0x125A78, where (xx+1) xx xx 08 is reverse pointer to this routine +1 (eg. inserted at 0x908374 --> 75 83 90 08)
How do I find this?
I don't know where the the tm move table is stored.
 
56
Posts
5
Years
  • Age 28
  • Seen Nov 17, 2023
How do I find this?
I don't know where the the tm move table is stored.

You dont repoint the old one, you make a brand new table from scratch. The old TM table will not work at all because it uses 8 bytes per pokemon, whereas this one uses 16 bytes.
 
14
Posts
3
Years
  • Age 32
  • Seen Sep 17, 2020
Hi fellow hackers,

I have been trying since last night to implement this upgrade in my Rom without much succes.

I managed to get to step 2 of the process after which you are asked to fix the TM numbers in the provided script.

https://ibb.co/m80S2rk

1) Do I have to save and compile a seperate script for each TM or can I add them all together in one script as I did in above image (up to 128)? 2) Are there any other changes that I need to implement that I'm overseeing?

I'm delving into completely new terrain with these things, hence the maybe rather stupid question.

Any constructive inputs are welcome.
 
Back
Top