The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other SERIOUS issue/glitch with map scripts.

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 October 27th, 2015 (8:13 AM). Edited October 30th, 2015 by CenterI.
CenterI CenterI is offline
 
Join Date: Oct 2015
Posts: 7
I'm a relatively new hacker(started a couple of months ago) who is hoping to release his first rom hack. Unfortunately, I've run an inexplicable issue when rom hacking.

This isn't a simple issue but hopefully its one that someone here can assist me with.

I'm hacking Pokemon Emerald using Advance Map 1.92 and I'm inserting a level/map script(02 Validates...) into a map. Of course I use a variable for that. And the script is supposed to increment the variable(so that the script doesn't ever occur again).

The first time I enter the map, the map script works fine, but afterwards(the other times when nothing is supposed to happen) is when the problem occurs. The game more or less freezes and just shows an endless loop of text boxes and I can not move the character or exit.

I'm not sure what to do, maybe someone here can help me. Hopefully, I did a decent job explaining the problem.
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old October 27th, 2015 (8:19 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
In Advance-Map, go into the Header tap on the map with the level script, and do the keyboard shortcut Ctrl + H to enable the Advanced view. Copy the script offset in the Map script offset: field, and then load your ROM in XSE. Do the shortcut Ctrl + D and uncheck Refactoring, and then click Apply. Paste the offset in the Offset field, and then click the Level Script button, and then the Decompile button. If the script that decompiles has something like this:

#raw word 0xFFFF

replaces the 0xFFFF with 0x0, and then click the Compile button. That should fix this!
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old October 28th, 2015 (12:49 PM).
CenterI CenterI is offline
 
Join Date: Oct 2015
Posts: 7
Thank you for your reply. The issue is when I get that Map Script Offset and put it into XSE, I don't see "#raw word 0xFFFF" or anything like that, i just see org and offset followed by end in the next line. I'm not sure what to do.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old October 29th, 2015 (9:01 AM).
BremFM BremFM is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 52
Quote:
Originally Posted by CenterI View Post
Thank you for your reply. The issue is when I get that Map Script Offset and put it into XSE, I don't see "#raw word 0xFFFF" or anything like that, i just see org and offset followed by end in the next line. I'm not sure what to do.
Post your script then, so we can look into it.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old October 29th, 2015 (11:01 AM).
CenterI CenterI is offline
 
Join Date: Oct 2015
Posts: 7
Quote:
Originally Posted by BremFM View Post
Post your script then, so we can look into it.
I don't think you understand. My issue isn't with my script. When my script needed to work, it worked. It was when I entered the map after the script is where an error occur(where the textbox,containing text from my last encounter, popped up in an endless loop, effectively freezing the game).
So Mr. Spherical Ice said that I should look into the map script offset and put that offset in XSE. When I did that, what happened was I got a pretty much blank script looking something like this:
#org #E36B40
end

And that was it.(The E36B40 is no the actual map script offset. It wa only used for the sake of example. I am away from my laptop at the moment). So I am still very unsure what o do the solve this issue.

Also I should note that I'm using Pokemon emerald not FireRed,which is what most people hack with(from what I've seen). Not sure if there's a difference between the map scripts/offsets in Emerald.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old October 29th, 2015 (11:24 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
Quote:
Originally Posted by CenterI View Post
I don't think you understand. My issue isn't with my script. When my script needed to work, it worked. It was when I entered the map after the script is where an error occur(where the textbox,containing text from my last encounter, popped up in an endless loop, effectively freezing the game).
So Mr. Spherical Ice said that I should look into the map script offset and put that offset in XSE. When I did that, what happened was I got a pretty much blank script looking something like this:
#org #E36B40
end

And that was it.(The E36B40 is no the actual map script offset. It wa only used for the sake of example. I am away from my laptop at the moment). So I am still very unsure what o do the solve this issue.

Also I should note that I'm using Pokemon emerald not FireRed,which is what most people hack with(from what I've seen). Not sure if there's a difference between the map scripts/offsets in Emerald.
Map scripts work the same across all Generation 3 games. If that is what you're decompiling even after clicking the Level Script button on XSE, then I recommend you compile the following script with XSE and paste its point in the Map script offset: field in the Header tab's professional view:

Spoiler:
Code:
#dynamic 0xE00000
#freespacebyte 0xFF

'---------------
#org @start
#raw 0x2
#raw pointer @setup
#raw 0x0

'---------------
#org @setup
#raw word 0xFFFF
#raw word 0xVVVV
#raw pointer 0x8XXXXXX
#raw word 0x0
This will activate a 0x2 level script at XXXXXX (the pointer to your script) when variable FFFF is at value VVVV.
__________________
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old October 30th, 2015 (6:56 AM).
CenterI CenterI is offline
 
Join Date: Oct 2015
Posts: 7
Quote:
Originally Posted by Spherical Ice View Post
Map scripts work the same across all Generation 3 games. If that is what you're decompiling even after clicking the Level Script button on XSE, then I recommend you compile the following script with XSE and paste its point in the Map script offset: field in the Header tab's professional view:

Spoiler:
Code:
#dynamic 0xE00000
#freespacebyte 0xFF

'---------------
#org @start
#raw 0x2
#raw pointer @setup
#raw 0x0

'---------------
#org @setup
#raw word 0xFFFF
#raw word 0xVVVV
#raw pointer 0x8XXXXXX
#raw word 0x0
This will activate a 0x2 level script at XXXXXX (the pointer to your script) when variable FFFF is at value VVVV.
Thank you, Mr. Ice. Your assistance has led to me solving the problem. Your generosity and patience will be rewarded. God Bless.
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:10 AM.