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

[ASM & Hex✓] Banning items in certain trainer battles.

62
Posts
5
Years
I'm looking for a way to turn off the bag in certain trainer battles (i.e. gym battles) I know I can edit the items in an item editor to turn off their "in battle capacity", but I'd like to be able to turn it on or off. I realise that the game does this for link battles, is there a way to set this up?
 
62
Posts
5
Years
Just use writebytetooffset to set items battle usage to 0 and in after battle script use writebyteoffset to change if its usable in battles.

Thanks, so i've been messing around with trying to make the POTION unusable during a battle with no avail... This is the script I'm using

Spoiler:


For whatever reason, the game isn't changing that byte before or after the battle (I've tried both). I've also tried having a script tile that reads:
Spoiler:


Still no luck with this either. Any help with this would be greatly appreciated. I don't know why the byte won't change. I'm not sure if I'm missing a command here or something.
 
88
Posts
7
Years
  • Age 34
  • Seen Jan 16, 2020
writebytetooffset 0x00 0x3db284

This won't work because you're trying to write an offset to the ROM (read-only memory). If you want a value to change throughout the game, you must write it to the RAM (read-access memory). In this specific instance, you will likely need some assembly or C routine to check if some value is set in the RAM (eg. a flag), and prevent the BAG text from doing anything in battle.
 
62
Posts
5
Years
This won't work because you're trying to write an offset to the ROM (read-only memory). If you want a value to change throughout the game, you must write it to the RAM (read-access memory). In this specific instance, you will likely need some assembly or C routine to check if some value is set in the RAM (eg. a flag), and prevent the BAG text from doing anything in battle.

Thanks for the info! I'm surprised no one has done this for some type of battle facility :/ I'm good with coding, hex editing, etc, but when it comes to ASM I fall short.
 
Back
Top