The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Overwrite existing scripts but keep the same offset?

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 May 19th, 2018 (6:11 PM).
b33taku b33taku is offline
 
Join Date: May 2017
Posts: 4
I am 3 weeks new to pokemon hack rom and decided to make my own romhack so far I have some understanding of scripting.

Is it possible to overwrite existing scripts but keep the the offset (or overwrite the offset) do to a small change ( items wise) without wasting free space (or is it not a waste since I expanded the ROM to 32MB)?... is it impossible?... or possible but isn't worth the time and effort?

What I want to do is just tweak the TM item on every gym leader/npc and item in the overworld that give it to the player (because i have used TM expansion its not giving the right item). I am using a Clean Emerald as a base (I explained the ROM to 32MB) with Dizzy's Battle Engine Upgrade, pokemon Expansion, ItemTmTutor Expansion, and Various feature.

So, what I want to do is just go to the existing scripts and change the TM/HM item index to the correct one so it would give the correct TM item because it is using the old TM/HM item index. However, I was thinking if I am just doing 1 small change to the giveitem 0x[TM Item Index] and replacing the old script would it cause the game to glitch out or something if i just save the old script edit and compile it? Or do I have to re-write all the scripts containing the all the old TM item index and give it some free space?

Note: I am not changing anything related to the storyline in Pokemon Emerald im just adding new pokemons, items, moveset, and others. While keeping the Emerald default storyline and some events the same. ATM...
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 20th, 2018 (1:55 AM).
Sakakii's Avatar
Sakakii Sakakii is offline
 
Join Date: Nov 2017
Posts: 242
Yeah you can goto the offset for the script in a hex editor and then look for the giveitem part of the script and change the value of the TM, this way you don't have to re-compile the script.

For example I want to change the TM Brock gives in FR I grab his offset in A-map (16A5F3) and then I study the code and I find 47 01 this is 147 reversed which is the number for Rock Tomb so I change that :)

I also do backup before I make change to make sure I don't mess up.
__________________
Pokémon Kanlara Ultimate
Pokémon Kanlara Classic
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 20th, 2018 (4:34 AM).
b33taku b33taku is offline
 
Join Date: May 2017
Posts: 4
Ah... forgot about hex editing method it instead of re-compiling it... >.<

Thanks for the reply I will try it that way then.
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:17 AM.