• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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
    6
    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?
     
    Just use writebytetooffset to set items battle usage to 0 and in after battle script use writebyteoffset to change if its usable in battles.
     
    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.
     
    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.
     
    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