The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.


Advertise here

Reply
 
Thread Tools
  #1    
Old November 28th, 2010, 12:39 PM
miksy91's Avatar
miksy91
A GB/C Rom Hacker since 2010
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed

Advertise here
Now, some of you might think "nah, I won't bother reading this because it's hard an all...".
Really, there isn't anything magical about editing data with a hex editor. The only skill you really need is to know how to convert numbers of decimal system into hexadecimal system. You can additionally use Calculator to do this

There are 16 different numbers in hexadecimal system whileas there are only 10 in the "normal" number system (0, 1, 2,...8, 9).
In hexadecimal system, those are: 0, 1, 2, ..., 8, 9, A, B, C, D, E, F.
After F it goes to 10, 11, 12,.., 1E, 1F, 20 etc.

Doesn't sound too hard now does it ?

Now that you know what different numbers in hexadecimal system mean, it's time to download a hex editor ! Hex editor is a tool that can be used for hacking any game you desire. By opening the ROM with it, it shows what the ROM looks like - it's full of bytes, nothing else. So, hacking is actually only changing bytes.
GoldFinger is a fine hex editor which I use myself, you can download any hex editor you want to but this one is kinda user-friendly.
Get it here: GoldFinger

So do as you normally do when hacking a game.
1) Open the ROM with the tool (in this case your hex editor).
2) Edit the data you wish to edit.

However, editing the data isn't as easy as you may have gotten used to.
The problem is that first you've to locate the offset, where the data you wish to edit, is located.

Now as a simple example, let's change the specifics of a person in Viridian City in Pokemon FireRed. Open AdvanceMap and go to the event data of the person next to the pokecenter (on the right).

Below, you'll see its offset is at 3B4EDC.
Now, open the same Pokemon FireRed ROM with a hex editor.
Under "Edit" click Goto and type in the offset of the person.

You should see this:



Here, you can see that the "real" data of the person we're editing is 06 12 00 00 21 00 1A 00 03 03 20 00 00 00 00 00 8F 5A 16 08...

Now, let's take another look at the data of the person with AdvanceMap.

[Person event no.] = 6 (refers to 06)
[Picture no.] = 18 (12, notice that 12 in hexadecimal is 18 in decimal)
[Unknown] = 00 00 (00 00)
[X position] = 21 (21 00, if it would be 21 01, the person would be at 1 * FF + 21 = 120)
[Y position] = 1A (1A 00)
[Unknown] = 03 (03)
[Movement type] = "Walk up and down" (03, notice that this is the 4th in the list (00, 01, 02, 03))
[Movement] = 20 (20)
[Unknown] = 00 (00)
[Trainer] = No (00, Yes possibly 01 ?)
[Unknown] = 00 (00)
[View radius] = 00 00 (00 00)
[Script offset] = $165A8F (8F 5A 16 08, 08 is still a part of the script pointer and shouldn't be changed unless you know what you're doing. See shiny quagsire's definition for this a couple of posts below.)

The following bytes are 00's as well...

It seems Lu-Ho wanted to keep X and Y location bytes still in hexadecimal whileas Picture no. bytes are in decimal instead.

But yeah, now that you've read it through don't tell me it was that hard
Scripting is a lot harder if done the "hardcore" way.

All in all, editing trainers or doing some mapping with a hex editor isn't any harder than this - it's only changing bytes from one to another.
__________________
My Rom Hack



Hacks I support





Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations

Last edited by miksy91; November 30th, 2010 at 12:12 AM.
Reply With Quote
  #2    
Old November 29th, 2010, 03:43 PM
Sawakita's Avatar
Sawakita
Not Invented Here
 
Join Date: May 2010
Gender: Male
Quote:
Hex editor is a tool that can be used for hacking any game you desire (or specifically a game made in hexadecimal system, pokemon games use this system).
Saying that pokemon games "use hex system" is just incorrect; in fact a hex editor is just a program that allows to view internal structure of any file (yes, you can open any file with a hex editor), and all those hex numbers you see are just the bytes that form the file.
Probably pokemon games were made in C, or similar, then compiled and assembled, and the result is machine language, i.e. a long long string of bits, some of those are ON and some are OFF.
And, when the file is loaded, the CPU (or, in our case, the emulated cpu) interprets that sequence of bits accordingly to its own internal architecture.

So it's just that electronic softwares uses this system.
__________________



| 1st Gen Hacking: Useful Links | A good example of REAL ROM Hacking |
Reply With Quote
  #3    
Old November 29th, 2010, 05:24 PM
psychicboy's Avatar
psychicboy
Hacking is all that matters...
 
Join Date: Aug 2009
Location: Twilight Town
Age: 20
Gender: Male
Nature: Hasty
So where would I find the starting location in FireRed ._.
__________________
Soon to be Hacking legend...
~Psy







Wanna play my hack? Check it out here!

My sig was "too big brah", so I shortened it.
Reply With Quote
  #4    
Old November 29th, 2010, 05:48 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by psychicboy View Post
So where would I find the starting location in FireRed ._.
Starting location of what, exactly? It's quite difficult to locate any data with Hex Editing alone. You need to use it in conjunction with other tools.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #5    
Old November 29th, 2010, 07:04 PM
psychicboy's Avatar
psychicboy
Hacking is all that matters...
 
Join Date: Aug 2009
Location: Twilight Town
Age: 20
Gender: Male
Nature: Hasty
Quote:
Originally Posted by Darthatron View Post
Starting location of what, exactly? It's quite difficult to locate any data with Hex Editing alone. You need to use it in conjunction with other tools.
Well its like this. After applying JPan's patch to a lean FireRed Rom, SMCA no longer works. Therefore I cannot change my starting location using that tool anymore. So how would I change this using Hex?
__________________
Soon to be Hacking legend...
~Psy







Wanna play my hack? Check it out here!

My sig was "too big brah", so I shortened it.
Reply With Quote
  #6    
Old November 29th, 2010, 07:32 PM
Shiny Quagsire's Avatar
Shiny Quagsire
どないやねん, ヤドン
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Quote:
Originally Posted by miksy91
[???] = 08 (no idea where this comes from)
This is actually still part of the script pointer. In the ROM, there are certain section of RAM. 08000000 is the ROM. So the full pointer for the script would be 08165A8F. If it were in an expanded ROM, the 08 would be 09, and so on.

As for the rest of the tutorial, it's a pretty good guide. I've always chuckled at people that want to ASM hack, but can't hex edit, so I'll point a few questions here if I have to.
__________________



Reply With Quote
  #7    
Old November 29th, 2010, 11:53 PM
miksy91's Avatar
miksy91
A GB/C Rom Hacker since 2010
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by psychicboy View Post
Well its like this. After applying JPan's patch to a lean FireRed Rom, SMCA no longer works. Therefore I cannot change my starting location using that tool anymore. So how would I change this using Hex?
I'd ask the creator of the tool for the offset of starting location.
Or, you could make an ips-patch for the change of starting location only.

Besides, I've "enchanced" the first post a little bit
__________________
My Rom Hack



Hacks I support





Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations

Last edited by miksy91; November 30th, 2010 at 12:06 AM.
Reply With Quote
  #8    
Old December 21st, 2010, 07:16 PM
shinyabsol1's Avatar
shinyabsol1
Pokemon DarkJasper!?
 
Join Date: Aug 2010
Gender: Male
Nature: Calm
Is that download for the Gold Finger hex editor safe? Mcafee gives it some questionable reviews...
Reply With Quote
  #9    
Old December 22nd, 2010, 12:08 AM
miksy91's Avatar
miksy91
A GB/C Rom Hacker since 2010
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by shinyabsol1 View Post
Is that download for the Gold Finger hex editor safe? Mcafee gives it some questionable reviews...
It should be safe alright, at least I haven't gotten any viruses from site romhacking(dot)net.

Besides, you can always use google to search for any other hex editor you like. I've heard some people prefer for instance WindHex.
__________________
My Rom Hack



Hacks I support





Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations
Reply With Quote
  #10    
Old December 22nd, 2010, 03:40 PM
shinyabsol1's Avatar
shinyabsol1
Pokemon DarkJasper!?
 
Join Date: Aug 2010
Gender: Male
Nature: Calm
Quote:
It should be safe alright, at least I haven't gotten any viruses from site romhacking(dot)net.

Besides, you can always use google to search for any other hex editor you like. I've heard some people prefer for instance WindHex.
Thanks for the reassurance. The reason that I'm interested in this specific editor is because it sounds simpler than others I have heard of. I would prefer not to get a hex editor off of some random website on google because you never know if it is safe or not. Its nice to try a site that can be recommended by others.
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 05:38 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.