The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Modifying already existing scripts / Dynamic offsets

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 September 10th, 2017 (4:24 AM).
Voi69 Voi69 is offline
 
Join Date: Aug 2015
Gender: Male
Posts: 7
My question is quite simple, but I cannot find information.

I am a beginner in scripting and I think I grasp most of it.

Let's say I load a clean Emerald in AMap. I add a person event for which I create a script.

If I am correct, in XSE and for emerald, after using FSF to get the hex 31AD00, I start with:

Quote:
#dynamic 0x31AD00
Now I can do whatever I want, save and compile.

This will give me a new hex: 31C16A

If I modify my script and then recompile, I obtain a new Hex (the following one). Does that mean that if I want to modify a script, I cannot override its previous version in the game, and as such, I am losing free space even though I just wanted to modify a script?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old September 10th, 2017 (5:41 AM).
Auros's Avatar
Auros Auros is offline
 
Join Date: Sep 2015
Gender: Male
Posts: 87
Yes, that is the case.
I recommend you to test your scripts on a backup first, then when they're correct you could compile then in your game.
Otherwise if you know how to manage hex you can just use an hex editor and manually delete the bytes connected to the previous script.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old September 11th, 2017 (3:55 AM).
NaCl's Avatar
NaCl NaCl is offline
red star
 
Join Date: Sep 2017
Location: Eastern Bloc
Nature: Naughty
Posts: 17
I suggest that you practice on FireRed rather than Emerald if you're a beginner to get a better grasp on the overall feel of ROM hacking. Also, what Auros said.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old September 11th, 2017 (11:33 AM).
BluRose BluRose is offline
blu rass
 
Join Date: Apr 2014
Location: michigan tech
Age: 22
Gender: Male
Nature: Timid
Posts: 812
Quote:
Originally Posted by NaCl View Post
I suggest that you practice on FireRed rather than Emerald if you're a beginner to get a better grasp on the overall feel of ROM hacking. Also, what Auros said.
why though? it's the same thing in most all respects, just need to fix a tool's default addresses (click me to fix the one that matters)
you do need to add the line
#freespacebyte 0xFF
to the top of any script after your dynamic offset in xse if using emerald, otheriwse music data gets corrupted and then random beeps happen and that's bad (00's are not free space!!!)
don't get me wrong i love fire red > emerald but
__________________
heyo check out my github:

BluRosie
highlights:
battle engine for heartgold
various feature branches in heart gold (fairy type, odd egg, mud slopes)

i'm a big part of the development team of pokemon firegold! all the code that i develop for that hack is also on my github

also on discord: BluRose#0412
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old September 11th, 2017 (6:16 PM).
Bladecraft's Avatar
Bladecraft Bladecraft is offline
It's written "Bladecraft" on my forehead.
 
Join Date: Feb 2017
Gender: Male
Nature: Calm
Posts: 83
Quote:
Originally Posted by BluRose View Post
why though? it's the same thing in most all respects, just need to fix a tool's default addresses (click me to fix the one that matters)
you do need to add the line
#freespacebyte 0xFF
to the top of any script after your dynamic offset in xse if using emerald, otheriwse music data gets corrupted and then random beeps happen and that's bad (00's are not free space!!!)
don't get me wrong i love fire red > emerald but
Dear Blu, please get your information right.
Correct: #freespace 0xFF
Incorrect: #freespacebyte 0xFF

Thank you for your contribution to Emerald hackers. <3

Also, a repointing guide should exist, many people don't seem to even know what they're doing, I might work on it one day.
__________________
Rule #0: Always Make a Backup




Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old September 11th, 2017 (7:03 PM).
BluRose BluRose is offline
blu rass
 
Join Date: Apr 2014
Location: michigan tech
Age: 22
Gender: Male
Nature: Timid
Posts: 812
Quote:
Originally Posted by Bladecraft View Post
Dear Blu, please get your information right.
Correct: #freespace 0xFF
Incorrect: #freespacebyte 0xFF

Thank you for your contribution to Emerald hackers. <3

Also, a repointing guide should exist, many people don't seem to even know what they're doing, I might work on it one day.
dear nakash,
get off my lawn
Quote:
Originally Posted by le pug
... it'll say that there isn't enough space and you'll have to include #freespacebyte 0xFF after each #dynamic...
and again
Quote:
Originally Posted by le pug
... without using #freespacebyte 0xFF in your script, XSE will compile...
but this says you're right so hey
i feel like they both work
__________________
heyo check out my github:

BluRosie
highlights:
battle engine for heartgold
various feature branches in heart gold (fairy type, odd egg, mud slopes)

i'm a big part of the development team of pokemon firegold! all the code that i develop for that hack is also on my github

also on discord: BluRose#0412
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old September 12th, 2017 (11:29 AM).
NaCl's Avatar
NaCl NaCl is offline
red star
 
Join Date: Sep 2017
Location: Eastern Bloc
Nature: Naughty
Posts: 17
Quote:
Originally Posted by BluRose View Post
lmao PC won't let me have quotes with links gg
Because if I wanna psyduck around with ROMs during my first few times I think that FireRed is the way to go (sprites, accessibility mostly) . I dig Emerald and I'd like if more hacks had it as their base, but why start hacking with limits you can only see if you already have some exp. Not like scripting is some complicated muk though.
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:16 AM.