MrDollSteak
Formerly known as 11bayerf1
- 858
- Posts
- 16
- Years
- Age 30
- Hong Kong
- Seen Aug 19, 2023
Intro:
With the Fairy-type now being a part of Pokemon for about a year,
it is only natural that hackers have tried to incorporate this into hacks.
Hackers of Emerald have gone about this in many ways, such as
replacing the ??? type, and shifting around the data that uses it.
Fire Red as the most popular engine to hack has had the Fairy-type
implemented through expansion for quite some time now. Having
begun to hack Emerald, I think it is only fair that I make a tutorial
about how to add new types into the game without replacing any.
Tools Needed:
Part 1: Editing the Icons and Palettes
Part 2: Editing Type Effectiveness
Part 3: Editing Type Names
Part 4: Editing the Bag Icon
Congratulations, if you've followed all these instructions you should have fully implemented types!
This is not necessarily particular easy for new hackers, so don't stress if you can't do it, the method I used to implement this is currently available in the
Emerald Battle Engine Upgrade by DizzyEgg and KDS, and I'm sure someone else following this tutorial has made an .ips patch.
Best of luck!
With the Fairy-type now being a part of Pokemon for about a year,
it is only natural that hackers have tried to incorporate this into hacks.
Hackers of Emerald have gone about this in many ways, such as
replacing the ??? type, and shifting around the data that uses it.
Fire Red as the most popular engine to hack has had the Fairy-type
implemented through expansion for quite some time now. Having
begun to hack Emerald, I think it is only fair that I make a tutorial
about how to add new types into the game without replacing any.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/I6yptjV.png)
Tools Needed:
Spoiler:
An Emerald rom
A Hex Editor (I recommend HxD, it's free and amazing)
unLZ-GBA (preferably the hacked one)
NSE 2.X
Paint XP (or any other image editor capable of indexing)
A Hex Editor (I recommend HxD, it's free and amazing)
unLZ-GBA (preferably the hacked one)
NSE 2.X
Paint XP (or any other image editor capable of indexing)
Part 1: Editing the Icons and Palettes
Spoiler:
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
Step 6:
Step 7:
Step 8:
Spoiler:
Open up NSE 2.X, and go to it's navigate function. Unlike Fire Red and Ruby, the location of the type data table is not included in its bookmarks. To open up the type icon image data, type D971B0 into the image tab. DO NOT type anything into the palette tab. To make the image clearer, also pay attention to change the width to 4.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/krVSr3x.png)
Step 2:
Spoiler:
To edit the image you'll need to export this. You can do this by clicking CTRL+SHIFT+E, or by navigating to the following tab.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/UL4im6Z.png)
Step 3:
Spoiler:
Edit the image in the editor of your choice, but make sure it supports indexing, such as GIMP, Paint XP/Vista, or Photoshop. Then insert your completed type table image data with unLZ-GBA into Free Space. I will be using 9C0B20. DO NOT type anything into the palette data tab, and make sure that automatically fix pointers is switched off.
My type chart is attached to the thread, I would recommend that if you are only looking to add the Fairy-type to your hack, I would strongly recommend to download this image.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/RmWyXnl.png)
My type chart is attached to the thread, I would recommend that if you are only looking to add the Fairy-type to your hack, I would strongly recommend to download this image.
Step 4:
Spoiler:
There is only one pointer to the type image data. It is located at 61CFBC, which also happens to be the location of the majority of the information regarding types. Change the pointer to the location of your type chart in the form of ZZ YY XX, wherein your location is XX YY ZZ. Because my location is 9C0B20, my pointer would be 20 0B 9C 08.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/5az6en8.png)
Step 5:
Spoiler:
The next step is repointing and expanding the icon position table. Luckily it is located close by at 61CF60. Navigate up there and Select 5C blocks (hex) then insert it into some more Free Space. I recommend placing at the end of the type image data, which if you are using my image and starting location, should be 9C1558.
[
At the end of your new table place the following pointer, 60 CF 61 08. Which if you notice is the old location of the icon position table. This is because you will be filling in the old table with the position entries, as well as Free Space bytes. If you plan on adding more types than just the Fairy-type, you will need to add pointers to the end of this table that will point to more entries.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/EpVy55L.png)
At the end of your new table place the following pointer, 60 CF 61 08. Which if you notice is the old location of the icon position table. This is because you will be filling in the old table with the position entries, as well as Free Space bytes. If you plan on adding more types than just the Fairy-type, you will need to add pointers to the end of this table that will point to more entries.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/4LEvJg8.png)
Step 6:
Spoiler:
Similar to the type image data, there is only one pointer to the icon position table. It is located at 61CFCC. Just change the pointer there to point to your new icon position table.
While you're there navigate up to 61CF60 and fill in the table with FF FF bytes. You will notice that the structure of the entries is a co-ordinate followed by FF FF 00 00. To add new entries just add the next series of numbers into the table. If you are just adding the Fairy-type, and are using the image I have provided, add the following entry, B8 00 00 00 FF FF 00 00. For every new type afterwards just add 08 to the first byte, leading to C0, C8 etc.
Finally you will need to replace the limiter. The limiter is located at 61CFC1. The limiter is not like other limiters in that it also forms part of the OAM structure, what this means is that if you are using Tlachtli's PSS icon hack, there will be a clash between that, the types and the Pokemon sprite. To fix this, rather than just changing the limiter to the number of new types, change it 30. This means that there is no OAM overlap, and also allows the existence of 47 types. Although that in itself is a ridiculous number, and will likely never be reached.
While you're there navigate up to 61CF60 and fill in the table with FF FF bytes. You will notice that the structure of the entries is a co-ordinate followed by FF FF 00 00. To add new entries just add the next series of numbers into the table. If you are just adding the Fairy-type, and are using the image I have provided, add the following entry, B8 00 00 00 FF FF 00 00. For every new type afterwards just add 08 to the first byte, leading to C0, C8 etc.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/4AhkJ8A.png)
Finally you will need to replace the limiter. The limiter is located at 61CFC1. The limiter is not like other limiters in that it also forms part of the OAM structure, what this means is that if you are using Tlachtli's PSS icon hack, there will be a clash between that, the types and the Pokemon sprite. To fix this, rather than just changing the limiter to the number of new types, change it 30. This means that there is no OAM overlap, and also allows the existence of 47 types. Although that in itself is a ridiculous number, and will likely never be reached.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/UB3drdV.png)
Step 7:
Spoiler:
Now we move onto palette editing. Before we continue, I should explain the structure of the palettes. Unlike Fire Red, the type icons use three different palettes, allowing each one to have unique colours (apart from the Contest data ones, which recycle previous colours). The way in which the game determines which palette to use is through an index table located at 61CFDC where the entries 0D, 0E and 0F correspond to the first, seond and third palette respectively. You will notice that there is an entry for every type, plus one spare. This is convenient if you only wish to incorporate the Fairy-type. If you want to include more however, you will need to repoint this into free space, the pointer is located at 1C439C.
If you wish to include only the Fairy-type and are using my image, then simply add the byte 0E to the end of the table at 61CFF3. If you are using your own image, or are adding other types, you might need to recolour the icons of those types to match the colours of the other icons for those palettes.
If you wish to include only the Fairy-type and are using my image, then simply add the byte 0E to the end of the table at 61CFF3. If you are using your own image, or are adding other types, you might need to recolour the icons of those types to match the colours of the other icons for those palettes.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/UwkRK7M.png)
Step 8:
Spoiler:
This step is slightly different for those who have used my image and are only looking to add the Fairy-type, and for those who are looking to add more.
If you are only adding the Fairy-type and are using my image navigate to palette data, located at D97B84. You will notice that there are no free spaces for colours, which means that the Fairy type will need to use existing colours. This also explains why the second palette was chosen in the palette index table, as it is this palette that contains the Poison and Psychic types. Rather than recreating the types exactly, The Fairy-type tweaks two of the shades of Pink and Purple (used in the bright parts of the Poison-type and Psychic-type). To do this change the bytes at D97BC1 to FF 66, and D97BC8 to 3D 66.
For those of you making other types, you'll have to fiddle around yourselves to find the best combinations. You'll need to reinsert the type image data if you do though. I would ideally like to work out how the routine loads the different palettes and add the space for a fourth one.
If you are only adding the Fairy-type and are using my image navigate to palette data, located at D97B84. You will notice that there are no free spaces for colours, which means that the Fairy type will need to use existing colours. This also explains why the second palette was chosen in the palette index table, as it is this palette that contains the Poison and Psychic types. Rather than recreating the types exactly, The Fairy-type tweaks two of the shades of Pink and Purple (used in the bright parts of the Poison-type and Psychic-type). To do this change the bytes at D97BC1 to FF 66, and D97BC8 to 3D 66.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/p6hCagf.png)
For those of you making other types, you'll have to fiddle around yourselves to find the best combinations. You'll need to reinsert the type image data if you do though. I would ideally like to work out how the routine loads the different palettes and add the space for a fourth one.
Part 2: Editing Type Effectiveness
Spoiler:
Step 1:
Step 2:
Spoiler:
First of all navigate to the Type effectiveness table located at 31ACE8 and select 150 blocks (hex), then paste it into Free Space. I'd recommend after your Icon Position Table.
To add new entries into the table you'll need to move the bytes starting from FE FE 00, as these are the immunities affected by Foresight, three times as many new entries you'll want to put in. This is because each new entry is 3 bytes long, composed in the structure, attacking type, defending type then multiplier. The multipliers are either 00 (immune), 05 (not very effective) or 14 (super effective).
For the Fairy-type, you'll need to add 12 new entries, which is 24 bytes long (hex). Though if you are editing the type chart to match Gen VI, you will be removing the Ghost and Dark type resists.
The first new type starts at 17, so if you wanted a Fairy-type move to be super effective against Dark-type Pokemon (index 11), your entry would be 17 11 14. This is what your Type Effectiveness Chart should look like to match Gen VI.
If you add any other new types they will be 18, 19, 1A etc. until you reach 2F at which case the expansion won't work any more, but as I said before there should be no reason to reach 47 types in the game.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/eKSE0QY.png)
To add new entries into the table you'll need to move the bytes starting from FE FE 00, as these are the immunities affected by Foresight, three times as many new entries you'll want to put in. This is because each new entry is 3 bytes long, composed in the structure, attacking type, defending type then multiplier. The multipliers are either 00 (immune), 05 (not very effective) or 14 (super effective).
For the Fairy-type, you'll need to add 12 new entries, which is 24 bytes long (hex). Though if you are editing the type chart to match Gen VI, you will be removing the Ghost and Dark type resists.
The first new type starts at 17, so if you wanted a Fairy-type move to be super effective against Dark-type Pokemon (index 11), your entry would be 17 11 14. This is what your Type Effectiveness Chart should look like to match Gen VI.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/6hnuBfu.png)
If you add any other new types they will be 18, 19, 1A etc. until you reach 2F at which case the expansion won't work any more, but as I said before there should be no reason to reach 47 types in the game.
Step 2:
Spoiler:
You will now need to repoint every mention of the original Type Effectiveness table. To do this click CTRL+R, type in the pointer for the table E8 AC 31 08 in the search for tab, the pointer for your new location BC 15 9C 08 (if you've used the same values as I have) in the replace tab, and finally make sure that your data type is set to Hex values. Search in the direction 'All', and finally click Replace All.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/63OWJOo.png)
Part 3: Editing Type Names
Spoiler:
Step 1:
Step 2:
Spoiler:
Navigate to 31AE38 and select 80 blocks (in hex) and repoint it to Free Space, I'd suggest just after the Type Effectiveness Table.
You will now need to add in the new Type Name entries. While this table may not have a recognizable structure to most of you, it is in fact a series of words, based upon the character system shown here:
Each entry is 7 bytes long, so with the Dark-type being the 11th index, and the Fairy type the 17th, you'll need to fill in a few blank entries made up of 00s and FF bytes, and finally the word Fairy as shown through the symbols above.
If you are only interested in the Fairy-type, you can use the hex symbols above. However if you are adding your own types you'll have to add the names in after these ones with the relevant text.
Finally go through and replace all the pointers to 38 AE 31 08, with the location of your new table which if you've been following the tutorial's offsets should be 30 17 9C 08.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/NgWw052.png)
You will now need to add in the new Type Name entries. While this table may not have a recognizable structure to most of you, it is in fact a series of words, based upon the character system shown here:
Spoiler:
00=
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=ª
2C=·
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52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=!
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=
F8=[d]
F9=[l]
FA=\l
FB=\p
FC=\c
FD=\v
FE=\n
FF=\x
Each entry is 7 bytes long, so with the Dark-type being the 11th index, and the Fairy type the 17th, you'll need to fill in a few blank entries made up of 00s and FF bytes, and finally the word Fairy as shown through the symbols above.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/9IaVptf.png)
If you are only interested in the Fairy-type, you can use the hex symbols above. However if you are adding your own types you'll have to add the names in after these ones with the relevant text.
Finally go through and replace all the pointers to 38 AE 31 08, with the location of your new table which if you've been following the tutorial's offsets should be 30 17 9C 08.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/95zMDbX.png)
Step 2:
Spoiler:
While so far the structure has appeared to be similar to Fire Red's in terms of the Type Name Table, there are in fact two more tables with pointers to the type names. I am unsure of what exactly these tables do, but they're only called once, so probably something not battle related.
First, navigate to 2F029C and select 90 blocks (hex), and repoint this into Free Space, I'd recommend right after your Type Names, which if you've been following the offsets used by the tutorial will be 9C17D8.
You will need to add one more entry for the Fairy-type or others. This is pretty simple, first put a pointer to the text you used for the name of the new type, followed by the index 17, followed by 00 00 00. You will need to do this for every other type you add too. You can also if you feel the need replace all the pointers in the table to the new offsets of your respective Type Names, though this is not necessary.
Finally as with everything in the tutorial, repoint the data. You should have the hang of it by now, but regardless here is a screenshot.
The second table is located at 56EF14, and is also 90 blocks (hex) long. Select it all and move it into Free Space, preferably just after the other one at 9C1870. To add in the new entries, you'll first need to add the pointer 25 8B 5E 08, and then the pointer to the location of your new type name.
Once again, repoint the data.
To make it appear in the Pokedex, navigate to 56EFC6, just like the palette thing you will find an index list. Place the index of your type here, though note that you only have space for 1 entry, you will need to expand otherwise.
Then at 56EFDE and 56EFE6 you will find the bytes 12. These are limiters change them to 13, and you're all set.
First, navigate to 2F029C and select 90 blocks (hex), and repoint this into Free Space, I'd recommend right after your Type Names, which if you've been following the offsets used by the tutorial will be 9C17D8.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/A7JKNen.png)
You will need to add one more entry for the Fairy-type or others. This is pretty simple, first put a pointer to the text you used for the name of the new type, followed by the index 17, followed by 00 00 00. You will need to do this for every other type you add too. You can also if you feel the need replace all the pointers in the table to the new offsets of your respective Type Names, though this is not necessary.
Finally as with everything in the tutorial, repoint the data. You should have the hang of it by now, but regardless here is a screenshot.
![[PokeCommunity.com] Adding New Types into Emerald [PokeCommunity.com] Adding New Types into Emerald](https://i.imgur.com/R4DpFMu.png)
The second table is located at 56EF14, and is also 90 blocks (hex) long. Select it all and move it into Free Space, preferably just after the other one at 9C1870. To add in the new entries, you'll first need to add the pointer 25 8B 5E 08, and then the pointer to the location of your new type name.
Once again, repoint the data.
To make it appear in the Pokedex, navigate to 56EFC6, just like the palette thing you will find an index list. Place the index of your type here, though note that you only have space for 1 entry, you will need to expand otherwise.
Then at 56EFDE and 56EFE6 you will find the bytes 12. These are limiters change them to 13, and you're all set.
Part 4: Editing the Bag Icon
Spoiler:
Congratulations, if you've followed all these instructions you should have fully implemented types!
This is not necessarily particular easy for new hackers, so don't stress if you can't do it, the method I used to implement this is currently available in the
Emerald Battle Engine Upgrade by DizzyEgg and KDS, and I'm sure someone else following this tutorial has made an .ips patch.
Best of luck!
Attachments
Last edited: