• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - 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.

Copybyte Causing Freeze? And another question.

  • 20
    Posts
    8
    Years
    • Seen Sep 4, 2021
    Both copybyte and writebytetooffset cause my game (fire red) to freeze when used before a trainerbattle or a tile script. If I do it in a normal talk-to-npc-script, it works just fine. Why is this happening? Any way around it? particularly with trainerbattles, though I'd like to use both.

    Related second question... is there any way to make a script run on start up, or any other time that would guarantee it has run before you have a chance to get into any battles?
     
    Welp, I'm a dummy and didn't realize the tile script locks you automatically, so adding a release command at the end made those work. Still nothing but crashes before trainerbattle.
     
    That's because trainer battles are hardcodded in a way. The code reads the arguments of the first script command to strip trainer ID and battle type.

    You will not be able to run a script before the trainer battle, unless it's the type of trainer battle where you have to walk up and talk to the trainer. There is a script that's always run though right before a trainer battle, maybe later I'll go find it for you.
     
    That's exactly what I've been trying and failing to find if you wouldn't mind. (Does the same thing happen for wild battles? I'd like that script location too if possible.)

    edit: Just checked the pointer in RAM to the actively running script (0x03000F14) while starting both trainer and wild pokemon battles and no script pointer shows up there... stumped. :(
     
    Last edited:
    Back
    Top