• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Help with adding TMs 50-100 to Item Expansion

The problem is probably the tmhm_learnsets.h file as without modification it can't handle any TM/HM thats higher than TM63 I think it was.

I have managed to get 100TMs implemented, it is far from a nice looking solution, but I can go through it if you want. :)
 
I'd be glad if I could get this working yeah ^^'

I don't know...since I added the Item Expansion I get errors when I do stuff like adding maps too... (and I do it the same way I used to)
I think I'll roll back to a version without it for now.
 
Last edited:
Hmm, not sure what could be going on with the maps without seeing the error. But anyways here's how I got the learnsets for 100 TMs working.

Here is my tmhm_learnset file if you want to have a look.
The main change that has to be made is gTMHMLearnsets[][2] to gTMHMLearnsets[][4] so that there is enough room for the extra TMs.
This will cause problems with the defines at the top as integers greater than 64 bits will be created so I created an awful workaround. I created a script that converts the learnsets to integers in the correct array position.
As you can see it makes learnsets completely unreadable so I don't actually recommend this at all, it's just how I managed to get it working...

A better way would be to do do something like an extra define at the top
Code:
 #define TMHM2(tmhm) ((u64)1 << (ITEM_##tmhm - ITEM_64))
and then creating learnsets like this
Spoiler:
Where TMs 64 and above would need to be in the second TMHM_LEARNSET and use TMHM2.
Though I haven't actually tried doing it this so as it is it probably won't work haha.

Either way you'll need to change how the game checks if a TM is teachable in src/pokemon.c
Spoiler:
And as simple(?) as that you have 100 working TMs.
 
Thx so much for sharing!
I don't know if I'm gonna get to trying this out soon, for now I'm working on other stuff than TMs (and left the Item-Expansion out). I gotta admit I was getting a bit frustrated...

But...after all I'd still love to add this in my rom so...I'll post my progress when I get around to it again!
It's so nice to see that it's actually possible x)
 
Thanks for this, I got my 100TMs working with this. This also works if you want to expand Move Tutors as well.
 
Thanks to your previous posts I've managed to get it working without having to convert the learnsets into integers, which was a bit chaotic to be honest xD.What I've done is the following:

1. Changes in src\data\pokemon\tmhm_learnsets.h
Spoiler:


2. Changes in src\pokemon.c
Spoiler:

And that would be. I've tested all TM's and HM's on a few pokemon ingame and the learnsets are working as intended. The only thing i'm missing is expanding the TM's and HM's pocket, because that way only 64 tm's are able to fit on that pocket and if you put more items it obviously crashes. That's another topic though and has nothing to do with this problem.
 
Hey, I tried doing things this way and it didn't work. All I got was a gigantic repeating error. I'm still fairly new to this stuff, so this doesn't really mean much to me. Any ideas?
 

Attachments

  • output.txt
    730.3 KB · Views: 12
Hey, I tried doing things this way and it didn't work. All I got was a gigantic repeating error. I'm still fairly new to this stuff, so this doesn't really mean much to me. Any ideas?

What do you have in line 21676? I see the previous lines didn't have an error, so maybe you can search for some differences there. Maybe you've got a TM that doesn't belong to the correct group or something. You can also check my repository, you can see in this commit all the changes I made, and it works great for me. Note that the tmhm_learnsets file is too big so you'll have to check the raw version

https://github.com/kevinmc37/pokemon-slumber/commit/0ef243b4ff7c1d0103a5e4b26bfa227020032251
 
Thanks to your previous posts I've managed to get it working without having to convert the learnsets into integers, which was a bit chaotic to be honest xD.What I've done is the following:

hi i've tried using this but it keeps telling me that the left shift count is negative, and idk what im doing wrong, do you have any idea of what i could do?

i understand this post is really old but there doesn't seem to be any important changes in the tmhm learnsets in the last versions of item_expansion
EDIT: NEVERMIND i also forgot to delete a TMHM(HM01_CUT) it works now
 
Last edited:
Back
Top