The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Copybyte Causing Freeze? And another question.

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old January 31st, 2017 (5:37 PM).
Glaceon69's Avatar
Glaceon69 Glaceon69 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Female
Posts: 20
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?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old January 31st, 2017 (5:56 PM).
Glaceon69's Avatar
Glaceon69 Glaceon69 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Female
Posts: 20
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.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old January 31st, 2017 (7:22 PM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
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.
__________________
...
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old February 1st, 2017 (8:17 AM). Edited February 1st, 2017 by Glaceon69.
Glaceon69's Avatar
Glaceon69 Glaceon69 is offline
 
Join Date: Jan 2017
Age: 31
Gender: Female
Posts: 20
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. :(
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:23 AM.