The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.


Reply
 
Thread Tools
  #1    
Old July 21st, 2008, 12:41 PM
~Teh Panda~'s Avatar
~Teh Panda~
Sea of Dreams - Redux
 
Join Date: Aug 2007
Hockeypanda32's knowledge in Pokemon Hacking


Learn how to hack Pokemon Ruby, Sapphire, Emerald, Leafgreen, and Firered

First of all, yes you need roms to do this, giving out links is illegal so none of that!

Table of Contents

1. Text Hacking
2. Mapping, and some other things in Advance Map
3. image Hacking, Palletes and more
4. Scripting in XSE

Chapter 1 Text Hacking

What we need



In this pic a loaded rom of Pokemon firered is in there, all basic speeches are in there now from the game, so look around and find a piece of text you want to change. Click on it and in the textbox to the right its words will appear. Edit these to your liking and be sure to keep the text in the the text border, now click save text, if you need to repoint it press yes, repoint! There you go, your first changed text, play your rom and look at it, all changed!

Advanced text changing, is it not there, time to get in depth!

For in depth text hacking you are going to need an emulator to find exact bits of text, you must have exact punctuation for it to work. Here is a step by step way to do this.
  1. Press search, now go into your emulator and find the text you want to change, lets say a pokemon name, look up Bulbasaur.
  2. Once you find the text the just says Bulbasaur change it to something like Mostop, if there are any other entries on just Bulbasaur change it.
  3. Open up your emulator and go to where you get your first pokemon, choose Bulbasaur, the standard you choose Bulbasaur will still be there.
  4. Once you got him, look in your pokemon inventory, no Bulbasaur, you gotta Mostop!
  5. Now to change the other text with Bulbasaur in it go back to the search and change everything with Bulbasaur in it to Mostop or w/e you named Bulbasaur!
You can use this for anything, Item's, badges, Pokemon, Attacks, Message's, pokedex descriptions, ETC.

Chapter 2, Mapping, and more in Advance Map

What we need



Mapping is made easier by Lu-ho's advance Map included above, open up your rom once you have opened A-Map, now on the left there will be three tabs, use the header one, on R/S/E 0 will be the outsides towns, routes, etc. and looking through the rest for others, insides, caves, etc. Choose your map you want to edit and you will see it now on your screen!

After you get the map you want start editing with the tiles you see at the right until you get a fully edited map to your liking, once you play it in game though you will see that the movement permissions are the same as the map before you edited it! In your Advance Map go to the movement permissions tab. In the left now you will see that there are numbers and letters, a lot of them really do not matter though. Here is a list for each of them and what they mean!

1=not passable
C=passable
4=not passable unless you use surf
D=signpost
0=climbing ladders

There are still others but we will not go through those now, those are basically all you need, lets say you have a tree, you would put a 1 on every part of it besides the tips tiles, finish putting in your permissions, wala, you got it...

Palette Editing your tiles in the game

In A-Map on the top of the app there should be a puzzle-like icon called the block editor open it up, now in here there should be a pallete tab, click on it and press "Show Palette Editor". You should see this popup.



Behind it the block editor will still be there, now go through palettes and see which tiles abide to which palette and change them according to what you want your game to look like, be sure to backup your rom before this incase you edit it bad. Once done press apply after you finish each palette. When you have applied all this go back into the palette editor window and press the tab palletes and click "Apply palette changes"

Edit your Tiles



Once again in A-Map go to the block editor. Now you must go to the palette corresponding to the tile you want to edit! Once you find it go to the pictures tab, click save tileset 1 (tileset 2 is the other tileset), open up the file you saved in Paint now, it should have dib as its extension, you must save it as a dib also! After you are done editing just press save so it and the palette are not mistaken. Back in Advance Map go into the block editor and the pictures tab, press load tileset 0. Once you have loaded it than go back in the pictures tab and press load new blocks, wala, you got it!

Advance Map Main Tabs, Map Editor, Movement Permissions etc.

In the main part of Advance Map there are specific tabs for different jobs.
  • Map Editor
    Already explained above

  • Movement Permissions
    Already explained Movement permissions

  • Events
    Where events are stored, all your scripts will be entered here once you make a new person or replace another events script, people events are of course the people that walk around, signposts, warps, and scripts. For signposts, scripts and person events you must enter your scripts compiled offset, for warps put it over a door of some kind and enter your map bank and no. (explained in connection part) you want it to warp to and the warp event in the map you want it to warp to.

  • Wild Pokemon
    Self explanatory, change the wild pokemon in the level, change what pokemon they are and change there levels.

  • Header Tab
    Change the towns name, route whatever. In here you can also chnage the tilesets, I wouldn't ever change the first one and the second one differs, I recommend mixing kind of matching tilesets. you can change dimensions and look at level scripts also.

Connection Manager



Basically you just change where your maps connect to, Offset is probably the hardest part of understanding this...the value entered here means how many tiles the map connecting to this one is delayed. If your connection goes up or down it means how many tiles it is delayed to the left of the map! A negative would make it right. Map bank and Map no. can be found simpily with this method, if your looking at your maps by sorting by header, go to the slected map, lets say it is "Lavender Town (3.5)" You want connected than the map bank would be 3 and the map no. would be 5, same with every map. Making neew connection or deleting them can be done simpily because the app pretty much guides you it self!

Chapter 3


Chapter 4, XSE Scripting

What we need

Table of Contents

Part 1, Dynamic's
Part 2, Basic Message
Part 3, a yes/no basic script

More to come

Part 4, Flags
Part 5, givepokemon
Part 6, specials
Part 7, movement


To start us off we need to open up XSE and have a blank script tab. Now we may start scripting

Part 1, dynamic's

At the start of any script you must place your dynamic offset to start your script.

A dynamic offset is the hexidecimal your whole script is going to rely on,
Here is how you should place it at the top of your script.

Code:
#dynamic 0x800000
800000 = Your offset, it must be an open offset. Use a free space finder to find your offsets. Advance Map has a built in one.

Part 2, A Basic Message

Now before we start remember to include your dynamic.
After this here we place a line of code that states you are making a new script.

Code:
#ORG @start
Explanations of these 2 words.

#org = the beggining of a new offset.
@start = the name of your offset, replace start with anything you want to call it.

Now if we want this event to work properly as a message from a person we must include these two lines

Code:
lock
faceplayer
Explanations of these 2 words.

lock = you cannot move while script is going
faceplayer = the person faces you

Our next step will be the actual pointer to the message. All we have to type is this...

Code:
Message @tutorial
Explanations of these 2 words.

Message = pointer to a message offset
@tutorial = once again the name of the offset, replace it with whatever your message's offsets are.

^This line of code is neccesary or your script wont ever do anything.

Next we type this to signify wht kind of message it is.

Code:
boxset 6
No need to explain this, now to close of the end of this offset.

Code:
release
end
Here is what we should have so far!

Code:
#dynamic 0x800000 'or any offset there you want it to be thats open

#org @start
lock
faceplayer
Message @tutorial
boxset 6
release
end
Don't get all happy at your first XSE script yet, we still have to make your message say something.

Code:
#org @tutorial
= This is my first script!
Tada, here is the "final" script!

Code:
#dynamic 0x800000 'or any offset there you want it to be thats open

#org @start
lock
faceplayer
Message @tutorial
boxset 6
release
end

#org @tutorial
= This is my first script!
No load your rom in XSE, and press compile. On the pop-up windo press copy, now in Adv-Map make a new person and put the offset you copied in the new person's offset box.

Tada, now we can test it out.

Part 3, is it just me or does it smell like yes/no box time?

Starting us off for a yes/no script we must still place our dynamic offset, our #org @start, and our lock and faceplayer.

You should have this to start off then.

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
Now put in a new message offset pointer, and copy the rest, I will explain everything next.

Code:
message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
We know the first line of code but what do the 5 other's mean?

Definitions

boxset 5 = yes/no box popup with message
compare LASTRESULT 1 = basically means if you pressed yes
if 1 goto @yes = they pressed yes and get reverted to a new offset, which is not a message, it cannot be yet
compare LASTRESULT 0 = basically means if you pressed no
if b_true goto @no = they pressed no and get reverted to a new offset, which is not a message, it cannot be yet


Then place a release and an end and here is what we should have so far, the basis offset point

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
release
end
Now to place our offsets from the pointer's, lets start out with the messages.

Just like a basic message script and with the pointer provided.
The Message should look like this.

Code:
#org @tutorial
= Yes or no?
Now for the offset pointer's yes and no, let's start with yes.

Code:
#org @yes
message @pressyes
boxset 6
release
end
That looks familiar, well it is. you really just revert to another message or anything you want it to do! Now for no, if you think you can try it yourself dont look!

Code:
#org @no
message @pressno
boxset 6
release
end
Now to make the message's pressyes and no, simple here is what you should get with them!

Code:
#org @pressyes
= You pressed YES!

#org @pressno
= You pressed NO!
here should be your final script!

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
release
end

#org @tutorial
= Yes or no?

#org @yes
message @pressyes
boxset 6
release
end

#org @no
message @pressno
boxset 6
release
end

#org @pressyes
= You pressed YES!

#org @pressno
= You pressed NO!
More to Come, parts 4, 5, 6, and 7!
__________________




Mystic still in work to let you know...
Reply With Quote
  #2    
Old July 21st, 2008, 11:28 PM
KhaosKnight's Avatar
KhaosKnight
The 1 and only Khaotic Hacker
 
Join Date: Dec 2007
Nature: Relaxed
Nice tut, it covers the basics pretty well. It will help alot of beginning hackers

Yay first post. whoo
__________________





Reply With Quote
  #3    
Old July 21st, 2008, 11:33 PM
Tyrantrum's Avatar
Tyrantrum
おなら
 
Join Date: Oct 2007
Location: New Jersey
Age: 20
Gender: Male
Nature: Lonely
Send a message via Skype™ to Tyrantrum
khaosknight1 is right(besides the 1st post thing! ), this does pretty much cover the basics for beginner hackers.
Maybe this could be stickied!
__________________




(x) Tumblr
(y) Gallery
Previously Eeveon
Reply With Quote
  #4    
Old July 21st, 2008, 11:36 PM
KhaosKnight's Avatar
KhaosKnight
The 1 and only Khaotic Hacker
 
Join Date: Dec 2007
Nature: Relaxed
it doesnt need to be stickied till it is finished, right now its like all the other tuts, just give it time
__________________





Reply With Quote
  #5    
Old July 21st, 2008, 11:40 PM
Tyrantrum's Avatar
Tyrantrum
おなら
 
Join Date: Oct 2007
Location: New Jersey
Age: 20
Gender: Male
Nature: Lonely
Send a message via Skype™ to Tyrantrum
Quote:
Originally Posted by Eeveon View Post

Maybe this could be stickied!
See, I even underlined it!
I know it won't yet, I said maybe, because this is very useful.
Can't wait to see what u have for chapter 3!
__________________




(x) Tumblr
(y) Gallery
Previously Eeveon
Reply With Quote
  #6    
Old July 22nd, 2008, 04:12 AM
X-aveon's Avatar
X-aveon
IS BACK!!!!!!!!!!!!!!!!!!!
 
Join Date: Jan 2008
Gender:
Nature: Naive
Send a message via Yahoo to X-aveon
what's the under construction part about? and do you plan on finishing your tutorial anytime soon for xse. this tut looks good, but i think the most important part is the XSE tut. thanx.
__________________


I want that apple......
Reply With Quote
  #7    
Old July 22nd, 2008, 10:00 AM
~Teh Panda~'s Avatar
~Teh Panda~
Sea of Dreams - Redux
 
Join Date: Aug 2007
Thanks guys, I meant it for that reason! I think the threads name should be changed I couldn't think of one so I just said what i said :D
__________________




Mystic still in work to let you know...
Reply With Quote
  #8    
Old July 22nd, 2008, 02:43 PM
cooley's Avatar
cooley
///Keepin' it simple
 
Join Date: Feb 2007
Location: United States
Age: 19
Gender: Male
Nature: Impish
Send a message via Windows Live Messenger to cooley Send a message via Skype™ to cooley
1 thing to say.
You do not need to search for free space in XSE. You only need the starting offset.

E.g. 0x800000
XSE will search for free space from that offset. Get it?

You only need FSF or A-map to get the starting offset.
Great tutorial by the way. It's a great help to me and beginner hackers!
__________________

Reply With Quote
  #9    
Old July 22nd, 2008, 04:42 PM
~Teh Panda~'s Avatar
~Teh Panda~
Sea of Dreams - Redux
 
Join Date: Aug 2007
Quote:
Originally Posted by cooley View Post
1 thing to say.
You do not need to search for free space in XSE. You only need the starting offset.

E.g. 0x800000
XSE will search for free space from that offset. Get it?

You only need FSF or A-map to get the starting offset.
Great tutorial by the way. It's a great help to me and beginner hackers!
Thanks and yes, i will write more just busy as of now!
__________________




Mystic still in work to let you know...
Reply With Quote
  #10    
Old July 22nd, 2008, 06:32 PM
KhaosKnight's Avatar
KhaosKnight
The 1 and only Khaotic Hacker
 
Join Date: Dec 2007
Nature: Relaxed
Quote:
Originally Posted by cooley View Post

E.g. 0x800000
XSE will search for free space from that offset. Get it?

So XSE never overwrites used space? i didnt think it did that, i always open a hex editor and look for the zeros to start in the DE5000's area. Hmm...
__________________





Reply With Quote
  #11    
Old August 7th, 2008, 01:29 PM
poddish's Avatar
poddish
Spirit Of Radio
 
Join Date: May 2008
Location: Earth
Send a message via Windows Live Messenger to poddish
How do you make a wild battle?
__________________
I believe children are the future.
As such, we can do whatever we want, and in the future, when it's time to clean up our mess, they will have to do it for us.
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 01:48 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.