• 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.

Code: [EM] Items, TMs, Tutor Moves Expansion

This script expands items by creating new slots and adding them at the end of the table. It means that the items themselves have to be added by the user in an item editor. TMs are different, because they require changes to the game code, particularly bag.
I'm also not sure what you mean by 'expanding all the other item types'. Things like Berries or new poke balls would take some work, because they're not ordinary items. But all other items is just a matter of putting values in an item editor.
 
Last edited:
Hi DizzyEgg, some time ago I inserted the Battle engine+Pokemon exp.+Item exp. correctly. Now I'm trying to perform the process again, increasing the number of pokemon this time. The pokemon expansion works fine but the item expansion is giving me problems. I think it's because I don't remember how to calculate the EXPANDED_BAG_OFFSET. If my pokedex has 992 entries, I do the following:

address pokemon exp + X, where X is the:
(DexPokes / 8)(rounded up) + (DexPokes / 8)(rounded up)
(992 / 8)(rounded up) + (992 / 8)(rounded up) -> (992 / 8)+(992 / 8) = 124 + 124 = 248 [F8 in hex]
EXPANDED_BAG_OFFSET = 0203CF64 + F8 = 0x0203D05C

Is this correct?
 
Hi DizzyEgg, some time ago I inserted the Battle engine+Pokemon exp.+Item exp. correctly. Now I'm trying to perform the process again, increasing the number of pokemon this time. The pokemon expansion works fine but the item expansion is giving me problems. I think it's because I don't remember how to calculate the EXPANDED_BAG_OFFSET. If my pokedex has 992 entries, I do the following:

address pokemon exp + X, where X is the:
(DexPokes / 8)(rounded up) + (DexPokes / 8)(rounded up)
(992 / 8)(rounded up) + (992 / 8)(rounded up) -> (992 / 8)+(992 / 8) = 124 + 124 = 248 [F8 in hex]
EXPANDED_BAG_OFFSET = 0203CF64 + F8 = 0x0203D05C

Is this correct?

Yeah, it is correct.
 
With 100 TMs and 8 HMs (for a total of 108 TMs + HMs), what should I change the line in PGE's ini
Code:
TMHMLenPerPoke=8
to?

It seems like changing it to 16 works, but...
 
I have a little problem with the item expansion. I installed it with battle engine and pokemon expansion. In the game all works fine, as far I test it. But in PGE TM compatibility and MoveTutor compatibility don't show correctly. For example Torchic, I test it in game and he doesn't learn the moves that show in this image:

[PokeCommunity.com] [EM] Items, TMs, Tutor Moves Expansion

[PokeCommunity.com] [EM] Items, TMs, Tutor Moves Expansion


Torchic learns his natural TM moves like sunny day, flamethrower... In PGE Torchic doesn't "learn" these moves.

I think that TM_compatibility_table and MoveTutor_compatibility_table offsets are wrong. But I put in the PGE the offsets that show in item expansion:

[PokeCommunity.com] [EM] Items, TMs, Tutor Moves Expansion


Any idea how can I localizate the offsets?
 
Last edited:
I have a little problem with the item expansion. I installed it with battle engine and pokemon expansion. In the game all works fine, as far I test it. But in PGE TM compatibility and MoveTutor compatibility don't show correctly. For example Torchic, I test it in game and he doesn't learn the moves that show in this image:

Torchic learn his natural TM moves line sunny day, flamethrower... In PGE Torchic doesn't "learn" these moves.

I think that TM_compatibility_table and MoveTutor_compatibility_table offsets are wrong. But I put in the PGE the offsets that show in item expansion:


Any idea how can I localizate the offsets?

If Torchic can learn the TMs it previously could in the game, but PGE doesn't show that, it's PGE's fault. And I think that's the issue there. Could you show me your PGE's ini?
 
If Torchic can learn the TMs it previously could in the game, but PGE doesn't show that, it's PGE's fault. And I think that's the issue there. Could you show me your PGE's ini?

Sure, this is the ini that I'm using:

Spoiler:
 
Sure, this is the ini that I'm using:

Spoiler:
Put the ini and the PGEinicreator.exe in the folder and run PGEiniCreator after you apply the expansion.

https://github.com/Gamer2020/PGEiniCreator/tree/master/PGEiniCreator/bin/Debug
 
If Torchic can learn the TMs it previously could in the game, but PGE doesn't show that, it's PGE's fault. And I think that's the issue there. Could you show me your PGE's ini?

Yes, after I try the Gamer2020 solution, I think you are right, the problem is the ini or PGE. Thank you.

Put the ini and the PGEinicreator.exe in the folder and run PGEiniCreator after you apply the expansion.

https://github.com/Gamer2020/PGEiniCreator/tree/master/PGEiniCreator/bin/Debug

Thank you, I tried it and the TMHMCompatibility and MoveTutorCompatibility offsets are correct, the problem was TMHMLenPerPoke, in the ini I put 8 instead of 16. Now the TMs compatibility shows correctly in the PGE, however the move tutor compatibility still shows wrong:

[PokeCommunity.com] [EM] Items, TMs, Tutor Moves Expansion


I think ini is correct, any way to fix the problem?
 
Yes, after I try the Gamer2020 solution, I think you are right, the problem is the ini or PGE. Thank you.



Thank you, I tried it and the TMHMCompatibility and MoveTutorCompatibility offsets are correct, the problem was TMHMLenPerPoke, in the ini I put 8 instead of 16. Now the TMs compatibility shows correctly in the PGE, however the move tutor compatibility still shows wrong:

[PokeCommunity.com] [EM] Items, TMs, Tutor Moves Expansion


I think ini is correct, any way to fix the problem?
It should be the NumberOfMoveTutorAttacks but I will have to look at it. Since the issue is with PGE please post on the Github. I will be more than happy to assist you from there. I do not wish to clutter this thread and I do not check this site often.
 
Hey, I'm not trying to get in trouble, but this is a legitimate question. I love this hack, it makes item expansion easier. But what about item pocket expansion. Not just for TMs or the Main Item Pocket, but Poké Balls and Berries. I'm looking at this part of the items.py file:
Spoiler:

What if I changed it to this:
Spoiler:


Would it be OK to do this?
 
Hey, I'm not trying to get in trouble, but this is a legitimate question. I love this hack, it makes item expansion easier. But what about item pocket expansion. Not just for TMs or the Main Item Pocket, but Poké Balls and Berries. I'm looking at this part of the items.py file:
Spoiler:

What if I changed it to this:
Spoiler:


Would it be OK to do this?

I mean, why do you think I added those lines, to confuse people or to decorate my script? XD Obviously you can change it, that's what those lines are for.
 
I mean, why do you think I added those lines, to confuse people or to decorate my script? XD Obviously you can change it, that's what those lines are for.
Okay, that's really cool to know, what with more berries and more Poké Balls (I think, right? ;) ). But there is a limit correct, of, I think, 255?
 
Okay, that's really cool to know, what with more berries and more Poké Balls (I think, right? ;) ). But there is a limit correct, of, I think, 255?

The limit is your saveblock space. You can check it for yourself by having say 800 items in your pockets, saving the game, restarting and continuing the game. Some of them should disappear. Also the malloc function may not return available space for strings for some large numbers.
But no, it's not 255, the number of items per pocket is stored as a halfword, so the 'technical' limit is 65535.
 
The limit is your saveblock space. You can check it for yourself by having say 800 items in your pockets, saving the game, restarting and continuing the game. Some of them should disappear. Also the malloc function may not return available space for strings for some large numbers.
But no, it's not 255, the number of items per pocket is stored as a halfword, so the 'technical' limit is 65535.
Really? I didn't know that! When I was first working on it, I thought it was 255 because it was a limit of 0-FF. But screw it, that's pretty boss lol!
 
quick issue to report- when expanding the TM slots, the TMs are moved to new bag slots. however, this causes any items that are placed into the old TM slots to have a "--" after their pickup message ("player found one [item]--!"). likewise, although i have yet to test this, i assume this means that TMs found in the overworld would not provide the message of what move they contain.
 
quick issue to report- when expanding the TM slots, the TMs are moved to new bag slots. however, this causes any items that are placed into the old TM slots to have a "--" after their pickup message ("player found one [item]--!"). likewise, although i have yet to test this, i assume this means that TMs found in the overworld would not provide the message of what move they contain.

TMs found in the overworld should display the message fine. As for the pickup, you're right, the items aren't changed, similarly as all the previous instances of old TMs' indexes. :P
 
fair enough. is there a way to fix the issue so that that message doesn't appear/point the message away from the items in the TM's old slots?

also, is there a way to stop TMs from being able to be held as items? this would likely be tied into the infinite-reuse TM routine, as in every generation where TMs are reusable they also cannot be held. this is fairly important because it can cause players to lose TMs forever (by giving it to a pokemon to hold and then releasing that pokemon, for example).
 
Back
Top