Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources

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 April 20th, 2014 (09:14 PM). Edited April 21st, 2014 by Smeargle.
Smeargle's Avatar
Smeargle
Illusory
 
Join Date: Nov 2012
Location: In the fabric of life
Gender: Other
Nature: Timid
Send a message via Skype™ to Smeargle
Hello everyone, today I will teach everyone how to truelly make their hacks unique by replacing the generic in-battle messages.
This is my first tutorial so forgive me if anything may be hard to follow, I will work on fixing anything that may hinder the learning process.


Before I begin I need to credit bugmania for discovering 0xD7360, without this I would not have been able to follow it and find where the all the battle messages that they game has had locked away. I would also like to credit LocksmithArmy for his table on "pokemon characters" that made decoding and writing new battle messages so much easier. (the chart can be found in step 1)

Alright now lets get started shall we.
To start with let me share the information I have gathered while researching:

3FB218 -- 3FEA26 are where all battle messages, this includes EVERY message you have ever seen in battle. It can be a lot of ground to cover.. But I will be giving a few tricks as to how to find specific messages quickly.

3FDF3C -- 3FE513 are where a good some of pointers related to battle messages are stored, but not all of them. Why is this important? Well lets say you wanted to add a bigger message than the game already has inputted. You would have to re-point your new message to somewhere with a bit more space.


Step One: Learning Letters and Commands
Spoiler:
First off open Your rom with any hex editor and go to 0x3FB218, this is where all battle messages are stored. Things may look a bit overwhelming at first but there is a pattern to it all. Everything here is editable, and a few important commands to know when editing a message, or even searching for one are the Hex/Commands:
FB=\p - new line
FD=\v - calls on data (like when learning a new attack or leveling up)
FE=\n - new page
FF=\x - ends a message (You will find the start of a new message right behind a FF)
These are great and all but without knowing the letters your not going to make it very far.
Spoiler:

00= (space)
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Œ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=œ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[pk]
54=[mn]
55=[po]
56=[ké]
57=[bl]
58=[oc]
59=[k]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[U]
7A=[D]
7B=[L]
7C=[R]
85=<
86=>
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=[.]
B1=[""]
B2=""
B3=[']
B4='
B5=[m]
B6=[f]
B7=[$]
B8=,
B9=[x]
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=[>]
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=[u]
F8=[d]
F9=[l]



Step Two: Finding and Following a message
Spoiler:

When looking for a message, you will always find one right after a FF.

For the sake of this tutorial I will be editing the (pokemon) used (attack) message.
This can be found at 0x3FD57B. After properly decoding the message with the table found in step one I find that this message first calls on the name of the Pokemon, then says "used", and finally calls on the name of the attack chosen.

Now with the picture above you can see there isn't much room to get creative with our message, we only have 11 bytes we can edit. The only way we are going to be able to fit a nice message in is if we re-point, luckily this is very easy.
Its time to follow our pointer, depending on your hex editor this may be different.

Your simply going to type in the offset in your search bar, only a little scrambled.
Here we have the offset 3FD57B, so I would search 7B D5 3F 08. What this is doing is searching for where the offset for this message is stored.

Hit ok and BOOM

We found it.



Step Three: Re-pointing your message
Spoiler:

So now that we found the pointer that tells the game where our message is located, lets change it so we can make one a little bigger.

You can place it anywhere with free space, I recommend using Free Space Finder, but for this tutorial I already know I have free space at 0x800000
Anyways here you will place your new pointer.
Remember to always put in your pointers in backwards, your offset may be 0x800000 but the game will only go if you reverse the order like 00 00 80 ending with a 08 to tell the rom it is a pointer.
Alright now lets go to our offset.

Hopefully you will see "FF" Hex Data, this is unused blank data that you will be able to write over. If your offset leads you to a bunch of used Hex, go back and lead it to something you know has no data being used.



Step Four: Lets Write
Spoiler:

Now we have a blank canvas, we can make our new message as long or as short as we want. Heck, you can even leave it entirely blank if you want to.
Something to keep in mind is that some messages are universal, shared by both you and the opposing pokemon so just keep that in mind when writing your message.

The (pokemon) used (attack) message is one of these universal messages.
But because this is a tutorial and not a romhack I don't really mind if their are oddities by making a message completely talking about the player.

So I will be adding in the following message:
(pokemon) doesn't like your tone. However, it must obey... (pokemon) used (attack)!

This translated in hex:
FD 0F 00 D8 E3 D9 E7 E2 B4 E8 FE E0 DD DF D9 00 ED E3 E9 E6 00 E8 E3 E3 D9 AB FB DC E3 EB D9 EA D9 E6 B8 00 DD E8 00 E1 E9 E7 E8 FE E3 D6 D9 ED AD AD AD FB FD 0F 00 E9 E7 D9 D8 FE FD 01 FF

Make sure you end it with FF, this tells the rom that the message is over.
Now insert whatever message you want ingame, and save.

Here are the results:



Thats all, super easy stuff. I hope my tutorial wasn't to confusing, please help out each other in the comments if I am not around to do so.
Credit would be much appreciated if you include this in your hack
thanks,
Smeeeeargle


Edit: Eventually I will be providing a tool for easy translation. Its already half done, but I haven't had much time to finish it lately.
Reply With Quote
  #2    
Old April 22nd, 2014 (02:30 AM).
Renegade's Avatar
Renegade
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Nice little tutorial!
Quote:
This is my first tutorial so forgive me if anything may be hard to follow, I will work on fixing anything that may hinder the learning process.
Don't worry about this, your tutorial was very easy to follow and straightforward.
It's something small, but this should help people who want to expand their messages larger than what A-text limits them to.
__________________
Reply With Quote
  #3    
Old April 22nd, 2014 (02:45 PM).
Smeargle's Avatar
Smeargle
Illusory
 
Join Date: Nov 2012
Location: In the fabric of life
Gender: Other
Nature: Timid
Send a message via Skype™ to Smeargle
Once I find the time I will add a table of all the more important message offsets.
I really was hoping to add all that stuff originally but I have had no time as of late.
Reply With Quote
  #4    
Old April 22nd, 2014 (02:52 PM).
hashtag's Avatar
hashtag
the man in black
Community Supporter
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 19
Gender: Male
Interesting research. I'm wondering what, personally, you had down as an idea to use this for? I hope it could be used for a feature similar to the one implemented in Platinum where the foe comes back into the screen to have a chat with you.
__________________
#
Reply With Quote
  #5    
Old April 22nd, 2014 (07:23 PM).
Smeargle's Avatar
Smeargle
Illusory
 
Join Date: Nov 2012
Location: In the fabric of life
Gender: Other
Nature: Timid
Send a message via Skype™ to Smeargle
Quote originally posted by Shinx:
Interesting research. I'm wondering what, personally, you had down as an idea to use this for? I hope it could be used for a feature similar to the one implemented in Platinum where the foe comes back into the screen to have a chat with you.
This can be used for a wide range of thing, alone without ASM it simply replacing messages.
However if someone was to get creative they could with a little assembly they could for sure add, special messages like "Oh! A shadow pokemon!" if one was to make a Colloseum or XD remake.
If someone were to make a custom status affect, its in battle message can now be added to the game. With the information provided, if someone went back and traced a status effect they could even have the game ask if you'd like to use a status healer for the next turn.

This information is a big chunk of the pokemon game considering how many battles we enter. Now that the information is out their its time for the community to make the real magic happen. Behind these messages is quite a bit of information to explore
Reply With Quote
  #6    
Old April 25th, 2014 (03:04 AM).
Pollena's Avatar
Pollena
 
Join Date: Apr 2014
Gender: Male
Good and useful tutorial. Thanks.
__________________
Classic Pokémon games fan. GameBoy and XBOX gamer.
Reply With Quote
  #7    
Old April 26th, 2014 (06:19 AM).
parth9's Avatar
parth9
God is busy...May i help you
 
Join Date: May 2013
Location: India
Gender: Male
Nature: Lonely
Nice tutorial......really easy to follow
__________________
Reply With Quote
  #8    
Old April 26th, 2014 (10:43 AM). Edited April 26th, 2014 by Smeargle.
Smeargle's Avatar
Smeargle
Illusory
 
Join Date: Nov 2012
Location: In the fabric of life
Gender: Other
Nature: Timid
Send a message via Skype™ to Smeargle
Quote originally posted by Pollena:
Good and useful tutorial. Thanks.
Quote originally posted by parth9:
Nice tutorial......really easy to follow

Great to hear that, come summer I will be including a tool that will translate English to hex to speed the overall process up.

I would also like to point out that these letters and characters are not solely used for in-battle messages. You can use these find a lot of the games text, and then trace the text back to their actual functions
Reply With Quote
  #9    
Old April 26th, 2014 (11:18 AM).
parth9's Avatar
parth9
God is busy...May i help you
 
Join Date: May 2013
Location: India
Gender: Male
Nature: Lonely
Quote originally posted by Smeargle:
Great to hear that, come summer I will be including a tool that will translate English to hex to speed the overall process up.

I would also like to point out that these letters and characters are not solely used for in-battle messages. You can use these find a lot of the games text, and then trace the text back to their actual functions
I would be waiting for your tool ....hope its released as soon as possible.
__________________
Reply With Quote
  #10    
Old April 26th, 2014 (12:55 PM).
Smeargle's Avatar
Smeargle
Illusory
 
Join Date: Nov 2012
Location: In the fabric of life
Gender: Other
Nature: Timid
Send a message via Skype™ to Smeargle
Quote originally posted by parth9:
I would be waiting for your tool ....hope its released as soon as possible.
I already have the main part of done, It translates english to Hex perfectly. But for whatever reason it gets a bit buggy when you try to translate Hex to English. I won't be finishing it until may though, I've got a lot of art projects I put off that I need to finish.
Reply With Quote
  #11    
Old April 27th, 2014 (04:00 AM).
parth9's Avatar
parth9
God is busy...May i help you
 
Join Date: May 2013
Location: India
Gender: Male
Nature: Lonely
Quote originally posted by Smeargle:
I already have the main part of done, It translates english to Hex perfectly. But for whatever reason it gets a bit buggy when you try to translate Hex to English. I won't be finishing it until may though, I've got a lot of art projects I put off that I need to finish.
By the way.....do you know at which offset is the defeating message located
Like bulbasaur fainted or something like that?
__________________
Reply With Quote
  #12    
Old April 27th, 2014 (09:11 AM).
DragonFantasy's Avatar
DragonFantasy
 
Join Date: Apr 2014
Gender: Male
Thank you for this information. I was wondering how to change the descriptions of attacks, because I added 27 new attacks to Pokemon Emerald and couldn't change their descriptions. With this, I finally know which numbers to use for my new descriptions. Thanks for the help!
__________________
Dreams of Dragons...
Reply With Quote
  #13    
Old April 27th, 2014 (09:13 AM).
Smeargle's Avatar
Smeargle
Illusory
 
Join Date: Nov 2012
Location: In the fabric of life
Gender: Other
Nature: Timid
Send a message via Skype™ to Smeargle
Quote originally posted by parth9:
By the way.....do you know at which offset is the defeating message located
Like bulbasaur fainted or something like that?
Yup, you can find that at 3FB40E-3FB419.
should look like this: FD 10 FE DA D5 DD E2 E8 D9 D8 AB FB FF

Here are a few message pointers straight out of my notes as well.
If you have any others you can't seem to find just let me know

3FCC8A -- ## = begins to store escape messages
3FCC74 - 88 = It's super effective
3FCBE4 -- F3 = A critical hit!
3FB31F -- 2D = Stop(space)learning/n/v01?

3FB2B6 -- D0 = \v00(space)is(space)trying(space)to(newline)learn(space)\v01.\p\x
3FB2FC -- 3FB31F = delete(space)a(space)move(space)to(space)make(newline)room(space)for(space)\v01?\x
3FB2D1 -- FB = But,(space)/v00(space)cannot(space)learn(newline)more(space)than(space)four(space)moves.\p\


3FB2A7 -- B5 = learned\n\v01
3FB291 -- A3 = grew(space)to(new line)LV.\v(data)!
3FB262 -- 6F = (2F)(double space)gained /v À <---- gained exp
3FD274 -- 78 = EXP. (space)
3FD279 -- 7E = Points!
3FB252 -- 60 = (pokemon), come back!
3Fd57E -- 81 = used <---- attacks
Reply With Quote
  #14    
Old April 27th, 2014 (12:10 PM).
parth9's Avatar
parth9
God is busy...May i help you
 
Join Date: May 2013
Location: India
Gender: Male
Nature: Lonely
Quote originally posted by Smeargle:
Yup, you can find that at 3FB40E-3FB419.
should look like this: FD 10 FE DA D5 DD E2 E8 D9 D8 AB FB FF

Here are a few message pointers straight out of my notes as well.
If you have any others you can't seem to find just let me know

3FCC8A -- ## = begins to store escape messages
3FCC74 - 88 = It's super effective
3FCBE4 -- F3 = A critical hit!
3FB31F -- 2D = Stop(space)learning/n/v01?

3FB2B6 -- D0 = \v00(space)is(space)trying(space)to(newline)learn(space)\v01.\p\x
3FB2FC -- 3FB31F = delete(space)a(space)move(space)to(space)make(newline)room(space)for(space)\v01?\x
3FB2D1 -- FB = But,(space)/v00(space)cannot(space)learn(newline)more(space)than(space)four(space)moves.\p\


3FB2A7 -- B5 = learned\n\v01
3FB291 -- A3 = grew(space)to(new line)LV.\v(data)!
3FB262 -- 6F = (2F)(double space)gained /v À <---- gained exp
3FD274 -- 78 = EXP. (space)
3FD279 -- 7E = Points!
3FB252 -- 60 = (pokemon), come back!
3Fd57E -- 81 = used <---- attacks
Thank you very much for it..........
__________________
Reply With Quote
  #15    
Old April 28th, 2014 (01:57 AM).
Astraea's Avatar
Astraea
aka Brendon McCullum
 
Join Date: Sep 2013
Location: Otago, New Zealand
Age: 18
Gender: Male
Nature: Brave
Send a message via Skype™ to Astraea
Its great tutorial, Easy to follow and I have got quite a lots of help from it!
__________________
Reply With Quote
  #16    
Old May 5th, 2014 (10:00 AM).
Le pug's Avatar
Le pug
Creator of Pokémon: Discovery
Community Supporter
 
Join Date: Aug 2013
Location: Le bed
Age: 22
Gender: Male
Nature: Bold
Is there any way to manipulate this in a script ... to which the bytes can be changed at the offsets by some command and then changed back at the end of the script?
__________________



Check out some of my contributions:
• Check out my easy tile insertion tutorial, Inserting Tiles Into AdvanceMap For Dummies
Click here to find out how to remove clouds from the Emerald titlescreen
• Check out the most updated Emereld Decapitalization Patch around by clicking here
• Need help fixing a gross bug in your hack? Let me show you how by clicking here



Click here to view the PC thread of Pokémon: Discovery.
Click here to view the PC thread of Pokémon: Fat Kid.

Pokétch ROM Hacking Community Discovery Twitter Discovery FB IRC Chat
Reply With Quote
  #17    
Old June 11th, 2014 (07:22 PM).
XDamaru's Avatar
XDamaru
Winter Knight
 
Join Date: Apr 2014
Location: Terminus Cave, no no Lumiose City
Age: 17
Gender: Male
Nature: Serious
Send a message via Skype™ to XDamaru
Hi Smeargle, i have a question
If you have special message like:

- [Trainer] would like to battle
- [Trainer] is about to use [Pokemon]
- Will [player] change Pokemon?

The [Trainer], [Pokemon], and [Player] word, how to search them? What hex code of it? Or we just ignore it and search "... would like to battle"?
Thanks before
__________________

I halted my Hack Project for about 6 Months. I wish I could revive it back

Still a XERNEAS fan, and also a LEGENDARY Pokemon Collector.
My safari friends are over 90000 96, I could not add anyone right now.... Sorry

Reply With Quote
  #18    
Old July 13th, 2014 (11:22 PM).
Ollie11
 
Join Date: May 2014
Gender: Male
Quote originally posted by XDamaru:
Hi Smeargle, i have a question
If you have special message like:

- [Trainer] would like to battle
- [Trainer] is about to use [Pokemon]
- Will [player] change Pokemon?

The [Trainer], [Pokemon], and [Player] word, how to search them? What hex code of it? Or we just ignore it and search "... would like to battle"?
Thanks before
For trainers there is two words: trainer class and name. Class's code is FD 1C and name's code is FD 1D. So full trainer name code is FD 1C 00 FD 1D.
For Pokemon code is FD 0F, and for attacks - FD 01

Quote originally posted by Smeargle:
FB=\p - new line
FD=\v - calls on data (like when learning a new attack or leveling up)
FE=\n - new page
You are wrong here. FB is new page, and FE is new line.
Reply With Quote
  #19    
Old July 16th, 2014 (03:33 AM).
Gorrioncillo
 
Join Date: Nov 2013
Gender: Male
if i want to put: A wild "nature" "pokemon specie" appear!!!
how can i do it???? especialy the code for the nature
Reply With Quote
  #20    
Old August 12th, 2014 (05:56 AM). Edited August 12th, 2014 by Thicowinchester7.
Thicowinchester7's Avatar
Thicowinchester7
Thicowinchester
 
Join Date: Aug 2014
Location: Brazil
Age: 18
Gender: Male
Nature: Quiet
Hey guys, i need a help...I'm trying to replace the following text:
[Trainer] is about to use [Pokemon]... for something like: [Trainer] is about to call the next pokémon...
I've sucess at remove the "[Trainer] is about to use [Pokemon]..." message, but...the battle skipped the part of "...Will [player] change Pokemon? [YES/NO]" I deduced which all this is a single script, but, i need support to keep the part of "...Will [player] change Pokemon? [YES/NO]" I must re-write all the script in a free space? If "yes" is the answer...How i can put the data part of "[Trainer]" and "[Player]" and the "[YES/NO]" at the script? (Sorry if was a noob question, im beginner haha :v) I'll try to see here, but a answer is welcome =)

* Great tutorial, easy to understand and very explained.
Reply With Quote
  #21    
Old August 28th, 2014 (05:41 AM).
Lance32497's Avatar
Lance32497
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
how did I know the values needed in FD /v ?
__________________
My Threads

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 12:11 PM.