Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] First Steps

Notices
For all updates, view the main page.

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.



Reply
 
Thread Tools
  #1    
Old 2 Weeks Ago (07:17 PM). Edited 2 Weeks Ago by Splash.
Splash's Avatar
Splash Splash is offline
But nothing happened.
 
Join Date: Oct 2009
Location: Just use an Old Rod
Gender: Male
Nature: Hasty
Posts: 402
Hello I'm Splash and this is a Tutorial for Beginners by a Beginner.

I will somehow guide you to your first steps in hacking.
This tutorial contains:
-> Steps how to properly apply a cool rombase
-> How to hex edit to insert new features
-> How to assemble and insert ASM
-> Some tips in Scripting and Avoiding Bugs

Future plans:
-> A tutorial on intermediate scripting
-> A more elaborate var tutorial
-> An FAQ Section
-> More tips and tricks in hacking

---------------------------------------------------------->
Useful links that us beginners might not know exist section
Spoiler:

Deokishisu's Motivational Speech
-> A thread I strongly recommend cause it has a great motivational speech.

Quick Research and Development Thread
-> This thread gives you a detailed information about some aspects
of the games. Read through stuff here and you might learn a thing or two.

ASM Resource thread
-> This thread is where kind hackers donate their ASM for everyone to use.

Move Resource Thread
-> This thread is where you can learn how to add new moves to your game.

Ability Resource Thread
-> This thread is just like the Move Resource Thread but you can learn
how to add Abilities here.

Begginer's Lounge
-> A place where we can ask questions.

Script Help Thread
-> If you have any problems with your script here is the place to be

Quick Questions and Answers Thread
-> If something is bugging you or maybe just curious about something. Ask away here.

ASM and Disassembly Help Thread
-> You can ask questions about ASM here.


---------------------------------------------------------->

First Let's start off with the things you need to start Rom Hacking:
-> The Basic Tools
Spoiler:
-> XSE or eXtreme Script Editor by HackMew

This tool will most likely be one of your most used tool since it basically
makes your romhack from creating events, creating trainer battles and
even calling out your asm. But more on that later..

-> A-Map or Advance Map by LuHo

This tool's basic function is to create and edit maps but it can also add events,
ow, scripts, hidden items and a heck of a lot more. This with XSE will be the
thing you need to romhack.

-> FSF or Free Space Finder by HackMew

This tool searches for free space. That might be a simple description but it
does a lot actually.

-> A Game Editor

I've used tons of tools to edit the Game but right now the tool I found the most efficient
to use is Kurapika's G3T. It basically lets you edit the Game whether it's
about the Pokemon, about the Trainers, or about the items. There are many other
tools that you can use and has certain unique features like G3HS giving you the
ability to expand the pokemon. But if you're a beginner like myself I'm recommending
G3T since it is a great tool.

-> A Hex Editor -> Yes. If you want to insert Asm in your game or add certain features
you'll need this tool. We'll use HxD in this tutorial.


-> A Rom Base

Now what is a rom base? It basically is another patch of a game that has features
beginners like us will be unable to implement that easily. What we'll be using
in this tutorial will be Mr. DollSteak's Decaps and Attack Rombase which for me
is the bomb!

-> Time

Yes. Time is essential if you want to make a great hack and you need a whole lot
of it. Making a great hack not only needs skills but also needs time. Time to
learn more. Time to fix bugs. Time to improve the game.

-> A solid idea

When making a hack, I've seen beginners asking for help even though they've not
even started on a story. Some only have a single idea and they think that it's enough
to make a rom hack. NO! That's not the only thing you need. Plan your hack first and
determine whether the features you want to implement are doable. Don't expect
someone to make your hack for you. Asking for help is great but it's best to try
doing it yourself first. You might be surprised that you can actually do it. And It
will feel really awesome if you succeed doing it I promise!

-> Determination

If you start feeling like your sick of hacking. Try to remind yourself why you
started in the first place. If your beginning to become lazy, Don't force yourself
and take a break. A good hack takes time. You could also ask others for opinion for your hack and to further develop it.

----------------------------------------------------->
Applying the Rombase
Spoiler:

Lets start our tutorial with applying a Rom Base. Yes this is where we start.

Tools needed:
Lunar IPS -> For Patching
A Rom Base -> We'll use Mr.DollSteak's Decaps and Attack Rombase. cause it's awesome
And a Clean Rom -> We'll use Firered V1.0

Step 1:
Download the Patch -> Mr.DollSteak's Decap. and Attack Rombase

Step 2:
Download the Patcher -> Lunar IPS by FuSoYa

Step 3:
Applying the Patch:
Click the Lunar Ips Icon -> Select Apply IPS Patch -> Select your Rombase IPS -> Select your Rom

After that it will show a message box that will say that the File has been Successfully Patched.

Step 4:
Wait? What?! Yes there is a step four. If you don't follow this you'll encounter errors in your tool. Now heres the first step. Making it compatible with G3HS, G3T, PGE, UTE is an easy task just copy the ini that comes with the patch with the tool you're using and paste it to your tools folder.

Spoiler:


And after that you also need to Hex Edit the rom so that it'll recognize that it is Mr.DollSteak's Rombase.

Step 5:
First you need to open up your Hex Editor, after that open your Gba rom.

Step 6
Then you will see this:
Spoiler:


See the highlighted part? Change it to: "MrDS"

And you'll get this:
Spoiler:

Save that and it will now be compatible with the tools mentioned above.

What if something's wrong?
If you see something like this:
Spoiler:


When using tools such as A-Map just change it back to "BPRE" then Save and you can use those tools again without errors.




---------------------------------------------------------->

Inserting New Features
Spoiler:
I'll teach you the basics of inserting features whether that is simple hex editing or a routine.

What we'll need:
-> Hex Editor
-> The Rom you are using
->XSE
-> A Backup of your Rom(always make a backup)

Okay inserting features is the thing that will make your hack appealing whether that is just a minor feature like eggs hatching at level 1 or major stuff like putting in custom asm.

Speaking of egg hatching lets change the level in which our eggs hatch. In Generation III, eggs hatch at level 5 but in Generation 4 they hatch at level 1 so let's make our game Gen IV-ish using Jambo51's Research

Step 1
Open your Hex Editor and Open your rom file.

Step 2
Search for these Offsets:

Code:
081375B0
08046CBE
0804623E
When searching for offsets remove the "08" part:

Code:
0804623E
Step 3:
Okay let's search the offsets now
This is the first line we're looking for:



To search this press ctrl+g in HxD and search for
Code:
081375B0
As you can see in the highlighted part it contains the number "05"
That mean's that it will hatch at level 5.

Step 4:
So lets change it to "01"



Save that!

Step 5
Now lets change the others just search for the other offsets and change them to "01" just like this:





Step 6
Save those and congratulations! You have added a new feature to your game!

>--------------------------------------------------<

The Quick Research and Development Thread has tons of potential features for your game be sure to look it up.

>--------------------------------------------------<

Now let's pick one of the cool features you can put in your game.

Oh here's one! Darthatron's Port of the BW2 Repel System to GBA

Step 1
First we need to hex edit some of the stuff inside the rom. Just copy the hex changes, search the offset and press ctrl + B:


Step 2
Save that and edit the other offsets.

Step 3
Copy the script in Darth's post and put it on XSE.

Step 4
Search for an offset in the FSF and set it as the dynamic offset:
We'll use
Code:
0x800000


Step 5
Debug and if there's no error Compile the script to your rom.

Step 6
Okay now we will be repointing this.
Why do we need to repoint? Well because if you don't everything you did will be pointless.

Just like what Darth said let's repoint at:

Code:
08083100
Did you remember to remove the bolded part when searching? If you do then you deserve a cookie and you also found this:



Notice that I put in 00 00 80 thats because I compiled the script at 0x800000 I need to reverse that:

Code:
80 00 00 -> 00 00 80
This is called a reverse pointer.

But what if you compiled it in a different offset like: 0x758200
Lets reverse that shall we?

Code:
75 82 00 -> 00 82 75
Yes just like that!

Step 7

If you've done it properly then the script will run properly and if not then I'm sorry but you need to start over. Check every hex changes you do and don't be discouraged. I've done it 3 times before I successfully implemented it xD



---------------------------------------------------------->

Inserting ASM in your hack
Spoiler:

ASM Tutorials:
HackMew's Knowledge
Inserting ASM Routines

Tools you need:
-> Thumb Compiler
-> Hex Editor
-> Notepad
-> XSE
-> A Backup of your Rom(always make a backup)

ASM is one of the more difficult parts in hacking especially when you're a beginner. But I have good news for you! There's a thread called ASM Resource Thread which is started by the awesome FBI Agent. You can use routines posted in that thread. Just be sure to give them the credit they totally deserve

Now let's use FBI Agent's Exp Disabler Routine as our ASM

Step 1:
Put the routine in the notepad.

Spoiler:


At the end press enter at the end so that no error will happen when you assemble it.

Step 2:
Save it as ExpDisabler.asm or something like that

Spoiler:


Step 3:
Go to your command prompt.

Step 4:
Locate the Folder where you placed the ASM file.
Just make sure that the thumb compiler is in the same folder.

Step 5:
Type "thumb expdisabler.asm expdisabler.bin"
Spoiler:


Step 6:
Press Enter to assemble the bin


Step 7:
Open the Bin File in the Hex Editor and you'll get something like this:
Spoiler:


Code:
0F B4 FF 20 40 00 04 30 07 4A 00 F0 0C F8 01 28 04 D0 0F BC 64 28 02 D0 04 48 00 47 0F BC 29 68 53 31 08 78 02 4A 10 47 D1 E6 06 08 25 1D 02 08 05 1D 02 08
Step 8:
Insert that in a Free Space in the Rom.
We'll use 0x810000:

Spoiler:


Step 9:
Just like what FBI Agent said on his Original Post lets insert some byte changes:

Code:
00 00 00 49 08 47 XX XX XX 08
at 0x21CFA

But wait what are those XX? Those should contain the offsets of where you put the bytes inside the Bin File you've compiled. We used the offset 0x810000 so let's reverse that:

Code:
810000 -> 81 00 00 -> 00 00 81
Don't add the offset to the byte changes yet. We need to add 1 to the offset
in order for it to work properly. Some ASM require it but some don't pay
close attention to the instructions when your a beginner since it might
crash, freeze or restart your game if followed incorrectly. Just be sure to backup your rom first before inserting an ASM.

so lets add it: 810000 +1 = 810001

Code:
81 00 01 -> 01 00 81
Step 10:
insert the reverse hex pointer to the byte changes:

From:
Code:
 00 00 00 49 08 47 XX XX XX 08
To:
Code:
00 00 00 49 08 47 01 00 81 08
Step 11:
Search for offset: 0x21CFA

Step 12:
Add the Byte changes:
Spoiler:


Save it.

Step 13:
Let's Make a script while also using the asm


setflag 0x202 -> sets the exp disabler
clearflag 0x202 -> disables the disabler

Congrats You've now inserted your first ASM!



Quick tip:
Spoiler:

Most ASMs that are donated already have compiled versions which are what
we will see when opening the Bin File that we assembled. Just paste write
those bytes on a free space and repoint the necessary offset to the offsets
where you put the compiled versions and your good to go!


>--------------------------------------------------<

If you want some already done ASM routines go to the
ASM Resource thread. And you would not believe how much of
ASM you would drown yourself in
>--------------------------------------------------<

Alright now for some tips!

---------------------------------------------------------->
Scripting Tips
Spoiler:

Because there are already tutorials that are very well done, I'm just gonna
some tips and reminders here. Oh and If your wondering what those tutorials are here are my recommendations:

Diegoisawesome's MEGA HUGE XSE Script Tutorial

and

Tajaros' Scripting Tutorial

Now lets start with the tips.

-> Save your scripts
Don't assume that your scripts will work properly even if they compiled.
So save your scripts!

-> Debug first before Compiling
Use the debug option before you compile your scripts. If not you might
encounter bugs even if it compiled after you fixed the error.

-> XSE's charming little notepad
You can use that little notepad to add some reminders or you can even put in some your used flags.

-> Safe Variables and Flags
Some flags or vars when used can cause bugs and errors to the games sometimes even leading to your save files being deleted.
Spoiler:

Here are the list of safe flags by Karatekid552's Flags, Vars and Script Tiles

-> 200-2FF

Here the list of Safe Vars:

-> 0x4011-0x40FF


-> XSE Guide inside XSE
Some of you mightn't notice that XSE has its own built in Guide.
You can refer to that if your internet is slow or if you dont have internet at all.

-> The Power of Ctrl + T
It automatically adjusts the text so that it wont slip outside the message box

-> Miscellanous Script Thread
This thread has already made scripts that you can use for your own hacks just be sure to credit the maker

->Variables
It may be daunting to study these little critters but fear not! I'm here to kinda explain these things called "vars"

Variables are similar to a let's say a shopping cart.. A very small shopping
cart that can only contain a single item. That item is the number which you
the scripter that you are have set it.

Here's an example:

Code:
setvar 0x8000 0x1
From what we see above we can only see a bunch of numbers but in truth
what we see are not just that. Let's break it down.

Code:
setvar
It means that you are setting up a number to the var itself. Like you are putting a single item to a shopping cart. Why single? because vars can only have a single number at a time but it's changeable so you could always manipulate that single number.

Code:
0x8000
Is the variable that we are setting. It's our small shopping cart.

Code:
0x1
It's the number that we are putting in the var. It's like an item from the grocery store.

So to sum it up it's like this:
We are putting 0x1an apple inside the variable 0x8000shopping cart by using setvarour hands.


---------------------------------------------------------->

Avoiding bugs
Spoiler:

You'll eventually encounter bugs no matter how strong your OCD is.
Here are some advice:

-> Check the script
Yes this is the first thing you need to do when encountering bugs. Look at all the parts. You may have set a used flag.

-> Check the OW, Signpost or Script you placed in A-Map
Why? Because you might've forgotten to insert the script offsets.
It always happened to me xD

-> Remember the safe flags and vars
Scroll up and reread them again. Click the link for a more indepth guide.

And Finally:


-> CREATE A BACKUP
This will come in handy when there are bugs you think are unfixable.
You should also archive the each time you succesfully made changes.

The cycle should be:

Create a Backup -> Hack something -> Test it out -> Make a note of the changes -> Repeat the Cycle

-> Create rbc files
You can make these files when you save your scripts in XSE so if you
successfully compiled a script it's better to save the script so that you
could check out what you did wrong when something does go wrong.

-> Finding bugs using A-Map
A neat trick is going to the map where the error occurs and double click
the OW or the script tiles that have errors that way you can check out what
happened wrong.

---------------------------------------------------------->
To be continued
__________________
༼ つ ◕_◕ ༽つ PRAISE Splash ༼ つ ◕_◕ ༽つ
________________________________
|VM|Firered A RebooT|PM
|
Rom Hacking Beginners Click Here!
Come to the IRC If you wanna Live!
Reply With Quote
  #2    
Old 2 Weeks Ago (12:47 AM).
Sniper's Avatar
Sniper Sniper is offline
ふゆかい
 
Join Date: Nov 2013
Location: Philippines
Gender: Male
Nature: Quiet
Posts: 1,401
Not bad and it's not that complicated as well. This is very helpful for short, nicely done Splash! c:
__________________
Reply With Quote
  #3    
Old 2 Weeks Ago (02:00 AM).
Percy's Avatar
Percy Percy is online now
Sceptile ftw
 
Join Date: Sep 2014
Location: Somewhere in the world, obviously
Age: 18
Gender: Male
Nature: Gentle
Posts: 1,792
Just like what Gunther said above me, the tutorial's great! If I'm a beginner right now, this will be so damn helpful. Good job, Splash! *splashes away*
__________________
Pokémon Ranger Academy
Status: Coming Soon ...
#RadReds
Credit

Pair

Reply With Quote
  #4    
Old 2 Weeks Ago (02:31 AM).
Splash's Avatar
Splash Splash is offline
But nothing happened.
 
Join Date: Oct 2009
Location: Just use an Old Rod
Gender: Male
Nature: Hasty
Posts: 402
Quote originally posted by Sniper:
Not bad and it's not that complicated as well. This is very helpful for short, nicely done Splash! c:
Quote originally posted by Percy:
Just like what Gunther said above me, the tutorial's great! If I'm a beginner right now, this will be so damn helpful. Good job, Splash! *splashes away*
Thanks guys! Now I just need to lure in beginners to this page so that they'll now this exist.. haha
__________________
༼ つ ◕_◕ ༽つ PRAISE Splash ༼ つ ◕_◕ ༽つ
________________________________
|VM|Firered A RebooT|PM
|
Rom Hacking Beginners Click Here!
Come to the IRC If you wanna Live!
Reply With Quote
  #5    
Old 2 Weeks Ago (02:45 AM).
Percy's Avatar
Percy Percy is online now
Sceptile ftw
 
Join Date: Sep 2014
Location: Somewhere in the world, obviously
Age: 18
Gender: Male
Nature: Gentle
Posts: 1,792
Quote originally posted by Splash:
Thanks guys! Now I just need to lure in beginners to this page so that they'll now this exist.. haha
why not suggest to deokishisu to add this in that READ ME FIRST thread.
__________________
Pokémon Ranger Academy
Status: Coming Soon ...
#RadReds
Credit

Pair

Reply With Quote
  #6    
Old 2 Weeks Ago (03:02 AM).
Splash's Avatar
Splash Splash is offline
But nothing happened.
 
Join Date: Oct 2009
Location: Just use an Old Rod
Gender: Male
Nature: Hasty
Posts: 402
Quote originally posted by Percy:
why not suggest to deokishisu to add this in that READ ME FIRST thread.
I will after this is finished hehe
It's not complete yet so I'll ask when I'm satisfied with what I have..
__________________
༼ つ ◕_◕ ༽つ PRAISE Splash ༼ つ ◕_◕ ༽つ
________________________________
|VM|Firered A RebooT|PM
|
Rom Hacking Beginners Click Here!
Come to the IRC If you wanna Live!
Reply With Quote
  #7    
Old 2 Weeks Ago (05:39 AM).
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 227
Quote originally posted by Splash:
-> How to compile and insert ASM
Assemble. You assemble ASM.
__________________
My Emerald IDB
Knizz's FireRed IDB
I will ASMentor people who exhibit enough enthusiASM. Join the IRC to become an ASMentee.
Reply With Quote
  #8    
Old 2 Weeks Ago (05:44 AM).
Splash's Avatar
Splash Splash is offline
But nothing happened.
 
Join Date: Oct 2009
Location: Just use an Old Rod
Gender: Male
Nature: Hasty
Posts: 402
Quote originally posted by Touched:
Assemble. You assemble ASM.
Oh okay sorry about that haha
__________________
༼ つ ◕_◕ ༽つ PRAISE Splash ༼ つ ◕_◕ ༽つ
________________________________
|VM|Firered A RebooT|PM
|
Rom Hacking Beginners Click Here!
Come to the IRC If you wanna Live!
Reply With Quote
  #9    
Old 1 Week Ago (11:23 PM).
ShoarmaKarma ShoarmaKarma is offline
 
Join Date: May 2015
Gender: Male
Posts: 1
I'm new in hacking, I've done everything correct and all went well.
Only now is the problem, I don't know how to load up your game!
Hope you'll react as soon as possible
Reply With Quote
  #10    
Old 1 Week Ago (02:45 AM).
Splash's Avatar
Splash Splash is offline
But nothing happened.
 
Join Date: Oct 2009
Location: Just use an Old Rod
Gender: Male
Nature: Hasty
Posts: 402
Quote originally posted by ShoarmaKarma:
I'm new in hacking, I've done everything correct and all went well.
Only now is the problem, I don't know how to load up your game!
Hope you'll react as soon as possible
Hi can you be more specific about your problem? Did you use a clean Firered v1.0 rom? screenshots would be nice
__________________
༼ つ ◕_◕ ༽つ PRAISE Splash ༼ つ ◕_◕ ༽つ
________________________________
|VM|Firered A RebooT|PM
|
Rom Hacking Beginners Click Here!
Come to the IRC If you wanna Live!
Reply With Quote
Reply
Quick Reply

Sponsored Links
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 UTC -8. The time now is 03:45 PM.