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

[Battle✓] help with trainers using the wrong Pokemon

  • 9
    Posts
    15
    Years
    • Seen Oct 5, 2023
    Trying to add a new trainer (under ID #47) and essentially what's happening is whenever I give them Pokemon with a higher ID than 0xFF (basically every 3 digit #) it only reads the first two digits.

    So say I add Milotic (#149 in the game), write the team to a new pointer, plop the battle script onto a trainer and battle them, he sends out a Tentacruel (#49) instead.

    Here's my script:

    Code:
    #dynamic 0xA01396
    
    #org @start
    trainerbattle 0x0 0x47 0x0 @intro @defeat
    special2 LASTRESULT 0x39
    compare LASTRESULT 0x1
    if 0x1 goto @start2
    msgbox @casual 0x6
    end
    
    #org @start2
    trainerbattle 0x5 0x47 0x0 @intro @defeat
    end
    
    #org @intro
    = Time to catch a fish!
    
    
    #org @defeat
    = What the heck are you doing?
    
    
    #org @casual
    = I'm catching a fish!

    Not sure if it has to do with using an unused trainer ID but I literally have reused those for other battles that work just fine. I originally thought it could've been the vs seeker checks/rematch scripts messing it up since the ones that DO work aren't rematches, but I took those out and did a basic battle script as well to no avail. I also considered maybe it's because I wrote the trainer ID as 0x47 instead of 0x047 as a last ditch effort, but then noticed I have another script that does just that with an unused trainer ID and works fine.

    I even used XSE to hunt down where it repointed their new team and checked the numbers, and the 3 digit Pokemon IDs are there but they don't read properly in-game. What am I missing here?

    also, this is happening for IDs 47, 48, 4C, 4D, and possibly 49 but haven't tested that one yet. HOWEVER, I am using 49 and 4B with no problems. I'm also using 19 and 1A with no apparent problems either.
     
    Last edited:
    You may have to repoint the data. The current area where these trainers are stored is probably just enough for the current pokemon. So, if the new pokemon has an extra digit, the new number will either be cut off or overwrite other existing data. What tool are you using? It should give you the option to repoint the data
     
    Yeah, I had to repoint the party data since I added new Pokemon to their party.

    And now I went to go try things but when I launch HTE, it's giving me an error that I don't know how to fix. And another error that crashes the program if I try to load a ROM. I don't think I did anything horribly wrong but I guess I must've?

    EDIT: I figured out how to fix this problem while looking up how to fix HTE itself (but I couldn't find it when looking up the direct problem, life comes at you fast). I added a new Pokemon, repointed the party AGAIN, and removed one of the Pokemon after repointing. Not quite sure why it fixed the trainer and I am pretty new to this, but I'm just happy it's working now lmao. Sorry if this comes off as a pointless thread but hopefully it helps someone else who's stuck like I am.
     
    Last edited:
    Back
    Top