The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script [Emerald] The little girl at the beginning of the game

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 March 29th, 2019 (3:54 AM). Edited March 29th, 2019 by McPaul.
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Hello,

I made modification to the scripts in my ROM hack of Pokémon Emerald. Then I wanted to test it and started a game. BUT!

The little girl preventing you from leaving Littleroot Town without a Pokémon is glitched. She isn't at the right place anymore:

https://www.noelshack.com/2019-13-5-1553860313-girl-1-wrong.png
https://www.noelshack.com/2019-13-5-1553860313-girl-2-wrong.png

She should be like this (original Emerald):

https://www.noelshack.com/2019-13-5-1553860360-girl-3-right.png
https://www.noelshack.com/2019-13-5-1553860360-girl-4-right.png

I didn't change anything in Littleroot Town, I didn't even open the town's map in Advance Map. What happened? Repoint/compile mistake? Is it possible to correct those kind of glitches without starting from nothing again? I'm ready to redo it all from scratch if I did too wrong.

The thing is I modified the scripts directly and compiled. Should I repoint them instead if I edit anything?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 29th, 2019 (4:24 AM).
kalarie kalarie is online now
 
Join Date: Jun 2008
Posts: 760
If you made a script bigger you should indeed repoint them. The placement of that sprite is partly determined by the type 03 level script. You could've also changed something in flags/variables that determine where that sprite is on the map.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old March 29th, 2019 (4:51 AM).
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Quote:
Originally Posted by kalarie View Post
If you made a script bigger you should indeed repoint them. The placement of that sprite is partly determined by the type 03 level script. You could've also changed something in flags/variables that determine where that sprite is on the map.
Thank you for answering.

I saved my scripts and used my backups from before modifying them. The little girl is back to normal.

So I have to import the scripts with XSE and use FSF to find a free space offset, right? That's all? everything is going to work smooth if I do that?

Sorry for my stupid questions but I'm a beginner.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old March 29th, 2019 (5:08 AM).
kalarie kalarie is online now
 
Join Date: Jun 2008
Posts: 760
Don't worry, this is the place to ask these type of questions;)

Regarding XSE and FSF: yes, that would work. But it would be easier to use dynamic offsets in XSE, then XSE will search for free space itself starting from a certain offset.

I would suggest you take on one of the scripting tutorials on PC to learn most of the basics, there are plenty around. I personally liked the Generation III Video Tutorials by Anthroyd.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old March 29th, 2019 (6:03 AM).
Avara's Avatar
Avara Avara is offline
 
Join Date: Dec 2011
Gender: Female
Nature: Relaxed
Posts: 1,305
Please don't apologize, you've nothing to be sorry about =) using #dynamic 0x800000 at the beginning of your script means that it will automatically compile to the first free offset with sufficient space that it finds after 0x800000.

As well as the video series mentioned above you can find scripting guides here and here. The first one has some things in it that the second one doesn't, but the second one has been around way longer and people have found solutions to problems they'd been having in the comments, so if you ran into an issue you might find a fix by searching in there.
__________________
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old March 29th, 2019 (7:27 AM).
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Wow thanks for all! I'm progressing a whole lot!
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old March 29th, 2019 (9:14 AM).
Karl's Avatar
Karl Karl is offline
Creator of Pokémon Darkfire
 
Join Date: Nov 2010
Location: London, UK
Gender: Male
Nature: Calm
Posts: 168
Quote:
Originally Posted by Avara View Post
Please don't apologize, you've nothing to be sorry about =) using #dynamic 0x800000 at the beginning of your script means that it will automatically compile to the first free offset with sufficient space that it finds after 0x800000.
Since you're hacking Emerald, it's best not to use #dynamic 0x800000 in any of your scripts.

This guide is great for learning about the free space available when hacking Pokemon Emerald, as well as a few things you can do to make better use of the limited space you have.

In short, here is the true free space of a fresh Pokémon Emerald ROM:

Spoiler:
0x9C0B20 to 0xAFFFFF
0xB98B30 to 0xBFFFFF
0xD3CEA0 to 0xD437EF
0xDE4018 to 0xE3CF48
0xE3CF64 to the End


So, really, scripts should start with #dynamic 0x9C0B20, to begin with.

It's also extremely important to know that by default AdvanceMap searches for free space from offset 0x6B0000. If you're using AdvanceMap you will need to change this as this is not free space in Emerald and will lead to corruption of the game's musical instruments and/or worse.

To get around this, you'll need to edit the AdvanceMap.ini file as so:

Spoiler:
SuchByte=$00 change to SuchByte=$FF
SuchBeginn=$6B0000 change to SuchBeginn=$9C0B20


Hope this helps.
__________________

Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old March 29th, 2019 (9:27 AM).
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Quote:
Originally Posted by Synonym View Post
Since you're hacking Emerald, it's best not to use #dynamic 0x800000 in any of your scripts.

This guide is great for learning about the free space available when hacking Pokemon Emerald, as well as a few things you can do to make better use of the limited space you have.

In short, here is the true free space of a fresh Pokémon Emerald ROM:

Spoiler:
0x9C0B20 to 0xAFFFFF
0xB98B30 to 0xBFFFFF
0xD3CEA0 to 0xD437EF
0xDE4018 to 0xE3CF48
0xE3CF64 to the End


So, really, scripts should start with #dynamic 0x9C0B20, to begin with.

It's also extremely important to know that by default AdvanceMap searches for free space from offset 0x6B0000. If you're using AdvanceMap you will need to change this as this is not free space in Emerald and will lead to corruption of the game's musical instruments and/or worse.

To get around this, you'll need to edit the AdvanceMap.ini file as so:

Spoiler:
SuchByte=$00 change to SuchByte=$FF
SuchBeginn=$6B0000 change to SuchBeginn=$9C0B20


Hope this helps.
Thanks a lot! Since I expanded my ROM I have a lot of free space, I don't think I have to worry about it, do I? Maybe I still do things wrong.
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old March 29th, 2019 (9:34 AM).
Karl's Avatar
Karl Karl is offline
Creator of Pokémon Darkfire
 
Join Date: Nov 2010
Location: London, UK
Gender: Male
Nature: Calm
Posts: 168
Quote:
Originally Posted by McPaul View Post
Thanks a lot! Since I expanded my ROM I have a lot of free space, I don't think I have to worry about it, do I? Maybe I still do things wrong.
It definitely makes things easier. I did the same thing, mainly to insert my own custom music and mega voicegroup. :D
__________________

Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old March 29th, 2019 (9:51 AM). Edited March 29th, 2019 by Avara.
Avara's Avatar
Avara Avara is offline
 
Join Date: Dec 2011
Gender: Female
Nature: Relaxed
Posts: 1,305
^ you can do all of that to be super safe, but you'll still be fine with what I suggested initially. Editing the AdvanceMap ini is solid advice though! AdvanceMap and other tools mistaking 00 bytes for free space and starting free space finding at the wrong offset is pretty much what caused the meme of "emerald is unstable and has hardly any free space" lmao x


come join the decomp squad and you'll never need to worry about free space again
__________________
Reply With Quote
  #11   Link to this post, but load the entire thread.  
Old March 29th, 2019 (9:59 AM). Edited March 29th, 2019 by McPaul.
McPaul's Avatar
McPaul McPaul is offline
On my way to become a controversial and hated member.
 
Join Date: Mar 2018
Location: Switzerland
Gender: Male
Posts: 286
Rha I'd like to know about decomp, asm and all buuut I'm not that good with programmming. But I should give it a try, I'll find where to start.

I hope my English is good enough tho.
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
Thread Tools

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:14 AM.