The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page Tutorial HG/SS: Editing The Opening Sequence, Part 1
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


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 June 16th, 2016 (4:03 PM).
Hiro TDK Hiro TDK is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 45
Editing The Opening Sequence

This will be the first of hopefully a series of tutorials for modifying HeartGold and SoulSilver. There aren't a lot of guides around, and of the ones that do exist, none are very detailed. I haven't been doing this very long, and I'm not that great at writing tutorials, so I wanted to start small. So, I figured I'd start from the literal beginning. This tutorial aims to familiarize you with the programs and steps necessary for editing visuals in the game, and will only cover the opening credits.

Before we begin, you'll need a few programs.

Tinke - This will be your all-purpose ROM editor.
https://github.com/pleonex/tinke/releases

Console Tool - We'll be using this for palette modifications.
http://www.romhacking.net/forum/index.php?topic=8407.0

MKDSCM - This will be for exporting models. Fun stuff, you'll see.
https://gbatemp.net/threads/mkds-course-modifier.299444/

Photoshop - You can get a copy here. Yes, it's free. Yes, it's legal.
http://helpx.adobe.com/creative-suite/kb/cs2-product-downloads.html

010 Editor - You could use any hex editor, but this one has a handy function.
http://www.sweetscape.com/download/010editor/


Open Tinke, hit at the top right, and navigate to your copy of HeartGold or SoulSilver. For this tutorial, I am using SoulSilver, though the actual files are the same in both versions. Once you open up the ROM, navigate to /a/2/6/2 and use the [Unpack] button.


These are the files that we'll be using. You'll see several file types here, and more as we progress. They are:








The names given by the program are odd or oddly worded. Pack is a NARC file, short for Nitro Archive, a type of compressed archive file. Compress files are similar to the NARC files, except that they aren't archives. They're single files compressed. You pack and unpack them the same way. Just as a note here, if you try to unpack a file that's already unpacked, it will reorganize the file list, making it much more difficult to navigate. Your best bet is to save your changes and reload the ROM if that happens.

Palette files are files containing up to sixteen color palettes of sixteen colors each. Tile files are tilesets. Maps are large image maps built from tilesets and palettes. Cells are specific smaller images or sets of images built from tilesets and palettes. Animations are quite similar to cells, except that they let you preview some of those image sets as an animation.


Use the [View] button to view a palette file, then do the same with a tileset. Once you've viewed a tileset, you can view cells, animations, and image maps. You can view any map/animation/cells with any tilesets and any palettes, but the actual game uses specific combinations. Again, order is Palette > Tile > Map/Cells/Animation.

The last two are very different file types. Models are 3D models. Generally speaking, they actually contain textures. The exception is for maps, whose textures are stored separately. Textures are used for both models and overworld sprites. Models are definitely the most difficult things to edit. Onto the first edit.



Copyright Screen
Palette > Tile > Map
2_0 > 2_4 > 2_14


Before making any alterations, use the [Extract] button to make backups of the files you'll be changing. This will be the Palette and Tile files. If you make any mistakes, you can select the files and use the [Change File] button to swap it with the original. If you forget to backup the originals and make a mistake, you'll have to reload the ROM in order to try again.



In order to do alterations, use the [Export] button on the bottom right. Now you can throw the image in an editor and a make some changes. For the purpose of this tutorial, I've added my moniker to this screen, as well as making an ... alteration to the Game Freak text. I've also adjusted the vertical alignment of the text to keep it centered with the new line. Stickler.


Once you're done with whatever alteration you've made, save it as a copy. You can use the [Import] button to replace the image in the game. In order to do so, you must make sure to have the correct Palette, Tile, and Map selected. Otherwise, it'll cause problems and you'll have to swap the originals back in.


You should tick the (Map Compression) check box. This will take out any empty tiles creating that jumbled looking image you saw in 2_4.


If you are using a new palette, or any color changes, tick the (Replace Palette) check box, as well. I recommend not doing this yet. I will explain palette changes as they are important in the next section.


To finalize and test your changes, you'll have to repack any compressed files and save the ROM. To do so, select any Compress files containing Tile or Palette files that you've edited and click the [Pack] button. In this case, you'll have to pack both 2_4 and 2_14.


Afterward, navigate back up to the NARC file and pack that as well. Then hit [Save ROM] and save it as a copy. You can then test the changes in an emulator of your choice.




Game Freak Logo / Online Interaction
2_3 > 2_5 > 2_13

So, this one is quite different from the first and a bit more complicated. First thing you might notice is when you opened 2_5, the colors were incorrect. Navigate back to 2_5 and look for the num palette on the bottom in the middle.


If you change Num palette to 2, you'll see that the top half of the image is colored correctly and the bottom half is not. If you change it to palette 8, the bottom half will be colored correctly, but not the top half. This is because 2_13 draws essentially two images, using two different palettes and a single tileset. In fact, you cannot even export and re-import the image from 2_13 because, using two palettes, it has too many colors.


Click the [Hexidecimal] button while you have 2_13 highlighted.


You may notice that in every other column, there is a 20.


If you scroll down, that number changes to 80.


Familiar? Those are the palette numbers, inverted. Each of those begins a set of two bytes, which refer to a tile in the image map. The first byte is the palette number, and the second byte refers to the part of tile set to display. We'll be using this a bit later.

Alright, navigate back to 2_13, and export it. Now, if you intend on modifying this, the image has to keep these dimensions [256x256]. Otherwise, there will be some fun artifacting on both screens. The bottom 64 pixels are used opposite of the copyright screen. The top 192 pixels are overlayed over the first animation. You can feel free to use two different palettes on these. The method is a bit longer for using two palettes, but if you want two gray scales or one and a rainbow, I'll show you how to do it.



One Palette Method

Open 2_13.png in Photoshop. Here you can make all of the changes you want. For the bottom font, Verdana and Shruti are pretty close. I opted for Shruti in my example edit. However, you can draw pictures here if you'd like. If you would like to use a font silimlar the Game Freak logo, Firoaren has made one based on the Gen III games. You can find that here.
http://fontstruct.com/fontstructions/show/1253534/game-freak-font


Once you're done making edits, you have to set up the palette. Save your changes as a copy. Delete the background, or hide the layer it is on, assuming its on its own layer. Navigate to Image > Mode > Indexed Color.


It'll ask to merge or discard layers; just go along with it.


From the dropdown, select one of the three Local settings, whichever setting looks good to you. Restrict the palette to 16 colors. Under the Matte dropdown, choose 50% Gray. This is because the first set of text is overlayed over a black background and a color image. Anything darker than 50% Gray will cause noticable artifacts for any anti-aliasing. Also select None from the Dither dropdown.


For ease of viewing, replace the background color with black. Select the Magic Wand tool.


Untick the Contiguous checkbox and Anti-Aliasing checkbox.


Select the gray background. Choose the color black and hit Alt+Delete to replace the colors. Now go to Image > Mode > Color Table. Sixteen colors was the maximum allowed. If you don't have a full sixteen colors, there will be an extra step later.



In Tinke, still on file 2_13, tick the (Replace palette) and (Map compression) checkboxes. Change {Num palette} to 2. This dictates which palette is replaced. Import the edited 2_13 you just saved. You'll notice that the colors are now wrong, like when you first opened 2_5. Use the [Hexidecimal] button again. Note that all of those 20s and 80s are all now 00s.


This is where our hex editor comes into play. You have to change all of those 00s to 20s, being that the palette you imported to was palette 2. With 2_13 still highlighted in the file list, hit the [Extract] button and save a copy somewhere. Open up the extracted 2_13 with 010 Editor. Goto View > Line Width > Custom Width, and change it to 2 bytes per row. Now, in the toolbar, click on Column mode.

Select the entire right column, from 0024h: to the bottom.

Type in 2. The entire column should change to 20s now. If you change the Line Width back to 16 bytes, you can see that the 20s align like they did when you viewed 2_13 in Tinke. Save your changes.

In Tinke, with 2_13 selected, hit the [Change File] button and find the copy that changed in 010 Editor. Now view it and you should see the fixed color palette. Pack up 2_5.bin and 2.NARC and save your ROM. Take a moment to view your changes in an Emulator of your choice. As for that extra step I mentioned earlier. If you didn't have sixteen colors, you may notices some coloring issues with the background of the second screen. This is because of an error in Tinke. Navigate to 2_3 in the file list and extract it. Open it up with The Console Tool. If you look at the bottom palette, it should lack the same amount of colors that your color table did in Photoshop.


This is because Tinke imported the palette without any filler, causing all of the other palettes to shift. If you select the last correct color in palette 2 (third palette), you can add in swatches to fill out the palette. For example, if you only had ten colors in your palette, select the tenth color in third row and add six black swatches.


Once you're done, save it as a copy, and go back into Tinke. Use the [Change File] button again to swap in the edited 2_3 file. Pack 2_5.bin, 2.NARC, and save the ROM to test it once again. At this point, your edit should be complete with no palette errors.



Two Palette Method

When editing this time, you're going to be making two separate images for each half of the image map. Both images need to be [256x256]. For editing the Game Freak portion, use the same parameters as last time, except delete the Online Interactions portion of the screen before you begin. My example:


For Online Interactions portion, delete the Game Freak portion before you begin, and follow all of the same parameters as before, with one exception. Use a black matte on the Indexed Color dialouge box. Here's my example edit:


Go ahead and save each of these files. Then navigate to Image > Mode > Color Table. We'll be using this for two purposes. The first is to once again check to see if we have sixteen colors to prepare for a later step. The second is for palette organization. We're going to draw the palette in the upper left corner of the image. When you import the image into Tinke, Tinke creates the palette by adding colors in the order they occur. Photoshop organizes them however. If we draw the organized palette, Tinke will have an organized palette as well. So click the Save button on the right and save it as an ACT file.


Exit the Color Table. If your swatches window is not open, open it now.


In the swatches window, go to Menu > Replace Swatches.


Save or don't save the old swatches, that's up to you. Either way, open the ACT file that you just created from the color table. Now select the pencil tool.


And use the swatches to draw the color table onto the image, like below. Note that I put the background color first. This is how most of the palettes in the game are organized. Do this with both images and save them as 2_13 (1).png and 2_13 (2).png.


We're going to import the palettes. Go back into Tinke and view files 2_3, 2_5, and 2_13 again. Change the {Num palette} to 2 and tick the (Replace palette) checkbox. Map compression isn't important yet. Hit import and select 2_13 (1).png. If you view 2_3 again, and view palette 2, you can see your organized palette. If you did not have a full sixteen colors, now is the time to use The Console Tool to add filler swatches as described in the previous edit.

Now, we have to use a different palette to export this image. We'll do this with the other image too. What we're doing is moving both images to a mutual palette, like the original image was. This way, the tileset has sixteen colors, despite the image map using two palettes. In order to do so, we have to make sure to use a palette that has sixteen colors. 2_1 is perfect for this. Veiw 2_1, then 2_13 again. Go ahead and export that and save it as 2_13 Palette (1).png. Your edit should look something like this now:


View 2_3 and then 2_13 again. Change the {Num palette} to 8, and tick (Replace palette) again. Import 2_13 (2).png. Go back and view 2_1, then 2_13 again. Export and save as 2_13 Palette (2).png. Mine looked like this:


Open both files in Photoshop. In 2_13 Palette (2).png, Select All and Copy. In 2_13 Palette (1).png, Paste. Now select the top [256x192] portion of the image. Delete it. Now, you'll have both parts of the image visible. Select the background color and use the pencil tool to draw over the palette in the upper left corner. Save this as 2_13 Palette (3).png. My example:


In Tinke, view 2_1, 2_5, then 2_13. Tick (Swap to original palette), which is above (Replace palette). Tick (Map compression). Now, import 2_13 Palette (3).png. Now you have to change the hex codes for the palette like we did in the last edit. Extract 2_13 and open it in 010 Editor. Switch to Column Mode and change the line width to 2 bytes. Select the second column from 0024h: to 0622h: and enter 2. Select the second column from 0624h: to the end of the file and enter 8. Save your changes.


In Tinke, highlight 2_13 in the file list and hit [Change File]. Swap it out with the copy you made in 010 Editor. View files 2_3, 2_5, and 2_13 to see your finalized changes. Pack 2_5.bin, 2.NARC, and Save ROM to view your edits in an emulator. Here are all of my edits in-game.


That completes the first tutorial. Any comments, questions, or criticisms are welcome.
Reply With Quote

Relevant Advertising!

  #2    
Old June 18th, 2016 (9:27 AM).
EvilGears's Avatar
EvilGears EvilGears is offline
GoodCore
 
Join Date: Jun 2016
Location: Curitiba, Brazil
Gender: Male
Nature: Calm
Posts: 4
Awesome tutorial! Exactly what I was looking for, thank you very much! If you know more stuff, please post it. I'm looking for a tutorial to edit the intro animation (just after the Game Freak logo) and another to edit the title screen (and if it's actually possible, the Ho-Oh 3d model too), but it seems that very few people are interested in HG/SS hacking as I do
__________________
My LeafGreen Team:

My Emerald Team:

My Platinum Team:
Reply With Quote
  #3    
Old June 18th, 2016 (1:25 PM).
Hiro TDK Hiro TDK is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 45
Quote:
Originally Posted by EvilGears View Post
I'm looking for a tutorial to edit the intro animation (just after the Game Freak logo)
This will be the next part of the tutorial. I'm currently working on it, but it's a busy week.

Quote:
and another to edit the title screen (and if it's actually possible, the Ho-Oh 3d model too)
Oh, it's possible.
https://www.youtube.com/watch?v=-pyc2Z7uGyo
https://www.youtube.com/watch?v=0oiHITEgBFY
https://www.youtube.com/watch?v=yHQ9N-wGatg
https://www.youtube.com/watch?v=rjoQXy35b2w
Reply With Quote
  #4    
Old June 18th, 2016 (5:56 PM).
EvilGears's Avatar
EvilGears EvilGears is offline
GoodCore
 
Join Date: Jun 2016
Location: Curitiba, Brazil
Gender: Male
Nature: Calm
Posts: 4
Quote:
Originally Posted by Hiro TDK View Post
This will be the next part of the tutorial. I'm currently working on it, but it's a busy week.
Oh that's nice, take your time. I'm looking foward to it.

Quote:
Originally Posted by Hiro TDK View Post
Oh, it's possible.
That's great, I've never seen those hacks done on DS.
__________________
My LeafGreen Team:

My Emerald Team:

My Platinum Team:
Reply With Quote
  #5    
Old June 20th, 2016 (8:59 AM).
DSg077's Avatar
DSg077 DSg077 is offline
 
Join Date: Sep 2014
Gender: Female
Posts: 11
Would you possibly do a guide for editing the type chart? The one available isn't very detailed and I'm just stuck on trying to convert a type chart advantages/disadvantages to 6 Gen standards. Crystal Tiles 2 doesn't save my progress for some reason.
Reply With Quote
  #6    
Old June 20th, 2016 (4:00 PM).
Hiro TDK Hiro TDK is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 45
If I were to do a guide for that, it would be quite a ways off. MeroMero's is good though. I've successfully used it to make a few modifications.
Reply With Quote
  #7    
Old June 20th, 2016 (6:16 PM).
EvilGears's Avatar
EvilGears EvilGears is offline
GoodCore
 
Join Date: Jun 2016
Location: Curitiba, Brazil
Gender: Male
Nature: Calm
Posts: 4
I'm having problems with adding my logo to the game, can you help me? I'm trying the one palette method and I did not use photoshop to make my logo (because of this, I can't apply matte after indexing), instead I'm using it just for indexing and viewing the palettes. My logo has 16 colors, is indexed and in tinke, replace palette and map compression are checked, palette number is 2. When I import the .RLCN I just edited in 010, all colors look right, but when I pack everything and export the rom, the colors are all messed up. To know how much the colors were being scrambled, I tried adding the color palette to the top of my logo like you did in one of the steps, and it appears that all colors are being inverted (darker shades first, brighter shades last as opposed to my palette, that has brighter shades first, then darker shades, like your palette). Do you have any clues why this is happening and how can I fix it?

(sorry I can't post images yet)
i.imgur(dot)com/nk1qJmu.png
__________________
My LeafGreen Team:

My Emerald Team:

My Platinum Team:
Reply With Quote
  #8    
Old June 21st, 2016 (8:50 PM).
Hiro TDK Hiro TDK is offline
 
Join Date: Oct 2015
Gender: Male
Posts: 45
EvilGears, if you PM with an Imgur gallery of screenshots walking through the process to where it messes up, I can gladly help you out. I'll take a look after work tomorrow.

I have a correction to post to the guide, but it shouldn't be affecting what you're up to.
Reply With Quote
  #9    
Old June 22nd, 2016 (2:12 PM).
EvilGears's Avatar
EvilGears EvilGears is offline
GoodCore
 
Join Date: Jun 2016
Location: Curitiba, Brazil
Gender: Male
Nature: Calm
Posts: 4
Quote:
Originally Posted by Hiro TDK View Post
EvilGears, if you PM with an Imgur gallery of screenshots walking through the process to where it messes up, I can gladly help you out. I'll take a look after work tomorrow.

I have a correction to post to the guide, but it shouldn't be affecting what you're up to.
I tried to send you a PM but it says that you can't receive PMs or chose not to. Whatever, the link is here.

imgur(dot)com/a/StdUz
__________________
My LeafGreen Team:

My Emerald Team:

My Platinum Team:
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 GMT -8. The time now is 5:33 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 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 - 2016 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.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.