- •Downloads:
- •Update Log:
- •Table of Contents:
- •Prologue: Bare Basics
- •Chapter 1: Key Terminology & Abbreviations
- •7Zip Archive – Supposedly the best file archiver there is, but not used as much, and thus less convenient. Requires 7zip or winRar to use.
- •VisualBoyAdvance – most people’s emulator of choice, almost always referred to as “vba” for short.
- •Chapter 2: Using Nightmare Modules
- •I upload anything that I think might be useful to someone on that site. Just use the menus and search until you find it.
- •Chapter 3: File Management
- •In order to be a successful hacker you need to have a lot of good management.
- •Chapter 4: Pointer Tables
- •Chapter 5: Battle Animation Editor
- •Chapter 6: Character Editor
- •Chapter 7: Class Editor
- •Chapter 8: Item Editor
- •Item icon – obvious
- •Chapter 9: Spell Association Editor
- •Chapter 13: Movement Cost Editor
- •If the value next to a type of terrain is ‘255’ then it is uncrossable because a unit won’t have 255 movement points.
- •Chapter 16: Battle Palette Reference Editor
- •If you want to know how to actually edit battle palettes’ colors, you can find that in a later chapter that I will make.
- •Chapter 17: Arena Class Editor
- •It’s a bit of work, but making cGs is quite rewarding, and it’s easier than some stuff, that’s for sure! Good luck with your cg making!
- •Chapter 20: Lyn’s Ending Editor
- •Chapter 21: Tutorial Editing/Getting Rid of the Tutorial
- •Part 2: Downloading the Programs
- •Part 3: Preparing Your midi
- •If you still have more than 10 tracks, you should find another midi. Sorry but, there are limits in life.
- •Part 4: Applying Blazer’s Beta Music Insertion/Instrument Patch
- •Part 5: Converting Your midi
- •Part 6: Making Your midi Repeat and Transferring it to Your rom
- •If the b1 and bc are next to each other then I can almost guarantee you want to replace it, so hit “replace” and do that with every instance and once you’re finished you’re good to go.
- •Part 7: Track Pointers & Repointing
- •Part 8: Finale- Assembling Your Song & Profit
- •If you don’t have this module, you’ll have to use this outdated way of doing it. Do check to see if you have the latest Nightmare Modules in general, but otherwise… well, sorry I guess. Xp
- •Part 9: Possible Errors & Wrap-up
- •Part 10: Documentation and Stuff
- •Atrius’ Notes:
- •Charon’s Notes:
- •Part 11: The Music Hacking Run-Down (Shorter Version of Tutorial & Walls of Text)
- •Part 12: Credits & Thanks
- •Chapter 25: Music Editing with Zahlman’s Song Editor
- •If you actually do type in help and press ‘enter’ on your keyboard, it’ll give you a list of commands, and tell you some stuff. Here’s the important stuff:
- •It worked! Great! I know how to import a song!
- •Chapter 26: Exporting Music with gba2midi
- •Chapter 27: Battle Background Graphics
- •If it doesn’t, I suggest double-checking all your settings (everything should be compressed) and make sure your width is set to 30 and your height is set to 32.
- •Chapter 28: Music Array Module
- •Chapter 29: Sound Room Editing
- •Chapter 30: Chapter Unit Editing with Nightmare
- •Chapter 31: Death Quotes
- •Chapter 32: Event iDs
- •Chapter 33: Battle Conversations
- •Chapter 34: Triangle Attacks
- •Chapter 35-36: The Animation Modules & Repointing Tutorial
- •It should look like this:
- •Chapter 37: Support Editing
- •Chapter 38: Miscellaneous Nightmare Modules
- •In this chapter I’m going to quickly run through what some other nightmare modules do.
- •Vendor/Armory Editors – edits the contents of vendors and armories.
- •Vulnerary Editor – edits the amount of hp restored by a vulnerary. (Default: 10)
- •Vulnerary Editor – edits the amount of hp restored by a vulnerary.
- •Chapter 40: Text Editing with fEditor Adv
- •Chapter 41: Portrait Formatting & Preparation
- •Chapter 42: Portrait Insertion with fEditor Adv
- •I wouldn’t mess with the palette editor (the colorful boxes).
- •Chapter 43: Locating Palettes
- •Chapter 44: Editing Palettes
- •I don’t exactly have a color I want to use for this title screen background, so I’m just going to show you how to get the rgb of some random color on a portrait.
- •If something didn’t work right, make sure you:
- •Chapter 45: Working with gbage
- •Chapter 46: Chapter Data Editor
- •Vision Distance is for Fog of War (fow). If it’s ‘0’, it’s assumed there is no fog of war.
- •Hold it! (Unless you aren’t hacking fe7!)
- •Chapter 47: Map Creation
- •I’m tired of writing this tutorial. Honestly. So from now on, I’m going to stop making so many wasteful comments like the one I am typing right now.
- •Chapter 48: Map Insertion
- •If you’re looking to make a totally new chapter (instead of being limited to the old game’s exact same scenes with exact same events) then read on, because I’m going to hack events next!
- •Chapter 49: Event Assembler Basics
- •I would just always add end guards since it’s not something you need to worry about too much.
- •Chapter 50: Events – The Layout
- •Including the stlb
- •Chapter 51: Events – The Event Codes
- •Items is just a list of items with a max of 4 starting items. I prefer to use the 3rd method of writing them, with the brackets and all. Each item is separated by a comma.
- •Chapter 52: Event Construction
- •VillageGate: // name of tile data group
- •Chapter 54: Chapter Creation Finishing Touches
- •Chapter 55: Importing Tilesets
- •Part 2: The First Frame
- •Part 1b: Palette Preparing
- •Part 2: Testing the Foundation to Your Animation
- •If all goes well, your guy should be standing, kinda like this.
- •Part 3: Making the Rest of Your Frames
- •Chapter 58: Custom Battle Animations – Scripts
- •I just pulled a Xeld. Had to do that at least once in this tutorial.
- •If you don’t know what a sound sounds like, just test it out with your animation and find out. Experiment with the codes if you need to.
- •Chapter 59: Custom Spell Animations
- •0X85 command count for this spell: 10
- •It’s true! It did work! It’s still very much a work in progress, as you can see, but the point is we got he test frame working. The rest just takes time, patience, and the attitude that you can do it!
- •Chapter 60: Weapon Icons
- •If you did, you are successful. Despite the odd format of the icons, you have spotted them, and that is what is most important, in my honest opinion.
- •I have this show up:
- •Chapter 61: Map Sprites
- •Chapter 62: Proper Betatesting
- •Chapter 63: vba’s Tools
- •Chapter 64: Other vba Options
- •In this chapter I’m going to detail some of vba’s semi-obscure but not totally obscure options. Knowing how to use vba will help you test your game in various ways.
- •Chapter 65: Recording Videos & Sound
- •Chapter 66: Fixing the Desync with VirtualDubMod & Video Rendering
- •Chapter 67: ips Patching & General Patching Information
- •Chapter 68: ups Patching
- •I suggest you read the ips patching tutorial (at least the beginning) if you haven’t done so as I will not be as thorough with this chapter as I was the previous.
- •In an extremely similar manner you can apply patches. Take a look.
- •Chapter 69: jfp Patching
- •Chapter 70: xDelta Patching
- •Chapter 71: Nightmare Module Format
- •It is recommended (for reasons of readability by humans) that a newline
- •Is unused ("null") for editboxes.
- •Chapter 72: Miscellaneous Information Archive
- •Chapter 73: Useful Links & Websites
- •Chapter 74: Bonus – Assembly Hacking
- •Preparations:
- •Part 1: Background Info
- •Part 2: Inserting an Assembly Hack
- •Part 2: Breaking Down Your First asm Hack
- •I digressed a lot, but back to the point:
- •Part 3: Second Example – More Codes, More Fun
- •Read other people’s doc.
- •Part 4: More Examples – “Speed-Analyzing”
- •It’s thumb. Write to offset 0. Start with label “Initial”. Push 5 registers and the last register, then start a loop counter in r2 with starting value 0x00.
- •Ifat *Conditional id* *asm routine pointer*
- •I may have mentioned this before, but finding where to hack routines is difficult. And I’m sure I mentioned that finding space for them is difficult.
- •It’s not super long, but it’s got some new things we need to learn. Let’s get started.
- •Part 5: Finding asm Routines & Basics of Using a Debugger
- •Warning: terms may not be accurate. In fact, they almost definitely aren’t accurate, as you’ve probably figured out by now.
- •I don’t know what the flags do either, but they’re there, right next to the window. That’s g.
- •I hope to hear of your achievements in the near future!
- •Final Chapter: Credits, Thanks, and the Epilogue
If something didn’t work right, make sure you:
Didn’t overlap changes (change with one program, then change with another without exiting/reloading and all)
Forget byte reversal when typing in the hex, or even do byte reversal twice
Forget to convert properly (dividing/multiplying by 8, inserting the right values into GBA color picker)
Edit the wrong colors (use the palette viewer to help know which colors you are editing)
Edit the compression bits (be sure to avoid 00’s unless they are part of an actual color—remember, 00s come about every 4 bytes).
Wooh! We’re done!
Chapter 45: Working with gbage
Here we’re gonna learn a little bit more about graphics, palettes, and TSA. Just a little bit more.
Load GBAGE and your ROM, to start.
There are 3 main things you can input into GBAGE. The offset, palette, and TSA. The width and height can be adjusted to make the image look good. I’ll say it again just to make sure you know it: size is in tiles, and tiles are 8x8 pixels, and the GBA screen is 240x160.
You can dump and insert/load raw graphics. It’s like the raw hex for it. You can’t SEE anything unless you save it as a bitmap, however.
If you’re editing uncompressed graphics (just uncheck the ‘compressed’ button, although you have to know where the uncompressed graphics are) you can scroll through it by hitting the +/- block, +/- line, and +/- screen buttons. You can load palettes the same as normal as well.
When you save a bitmap, it’s best to save as a PNG, because PNG is one of the best common image file types out there in both functionality and size. You can then edit the image; however, I have to warn you about tampering with it too much. If you add colors to the image and save it, it’ll mess up the palette. If you insert an image with more than the original amount of colors, it’ll overwrite data AFTER the palette. Furthermore, sometimes images may appear to use more than 16 colors, but don’t actually—it’s all a bit tricky so just be safe with what you’re doing and constantly back-up as mistakes in graphical editing can easily lead to a completely messed up and glitch ROM (in the most unpredictable ways).
Similar things can happen with graphics. This is why when you check the ‘Import Graphics’ or ‘Import Palette’ button in GBAGE, also check the ‘abort if bla bla’, because it stops GBAGE from overwriting data. If it DOES abort, there is an easy way to insert your data without much fuss. Just find some free space (I manage mine pretty well so I know where I have free space in my ROMs) and put in new offsets for your data, then hit “Repoint X pointers” to repoint the graphic or palette pointers. This will insert the data without worry about space and then repoint the graphic or palette so the game knows where the new data is.
Another thing: it is VERY good to document what you find and change in GBAGE. I don’t spend my time bolding stuff unless I mean it. If you write down cool graphics you find while scrolling through, you can just go back to your list of graphics and what image # they are and be like “hey, I want to edit that”, then go to the image and do what you want with it. Also, when you repoint stuff, you’ll want to know where it is in case you need to go back and do stuff to it.
This includes palettes! Finding palettes isn’t the most fun thing ever. You might as well take 5 seconds out to write where the palette is so you save yourself 5 minutes later on. *even though it only takes me like 30 seconds to find a palette most of the time*
That being said, I have a little documentation for FE7’s graphics. Nothing for FE6 or FE8 not because I’m biased, but because I’ve just never hacked those as much. Oh wait, that could be considered bias… teehee. I only made one hack of FE6 so far and haven’t done much with FE8 except for importing data from that game for my hack Fire Emblem: Sacred Contention.
Graphic Documentation
----------------------
#s for use with GBAGE
FE7
----
800 - Levelup
802 - Numbers
805+ - Map Effects, Staff Anims?
825 - "To Be Continued"
826 - "Game Over"
835 - Statsheet Related Stuff
836 - " "
839 - Arrows
846 - Chapter Title Bar? (Menu?)
847 - Chapter Title Bar (When Starting Capter)
848 - "Game Over" again
849 - Letters
854 - "Help"
855 - Misc. Graphics
857 - Arena Menu Stuff?
860 - Weapon Type Icons
861-862 - ^Same, but scrunched up and split apart
865 - Another background
866 - Vertical Arrow in statsheet (not sure)
867 - Above, but horizontal
868 - More Text
874 - Star
879 - Main Menu Graphics
880 - ^Same
883 - Sound Room Graphics
884 - Mode Select Stuff
898 - "Personal Information" Scroll
900 - Main Menu BG, Statsheet BG
904 - Class Roll Primary Weapons Graphics
906 - Another Text Font
907 - Another Text Font
(CGs between here)
1099 - "Fin" Text
1100 - Player Ranking Text
1101+ - Credits
1135 - Intro Text
1153 - 2003 Nintendo Presents
1154 - Various Weapons that circle around in opening
1156+ - Water Droplet Animation
1187+ - Opening "CG" Backgrounds (broken up into many pieces...)
1273+ - Misc. Opening Effects (I'm guessing, anyway)
1368 - "Fire Emblem" Shadow
1370 - Sword, "Fire Emblem", "Press Start", and Copyright Graphics
1371+ - More
Misc. Effects? Thunder sparks are here...
1376+ - Beginning of Portraits/Chibis.
Wait! I have more!
Arena Dialog Background
-------------------------
Image Data at 0x3EFA3C
Image #797 in GBAGE, data is LZ77 compressed
TSA at 0x3F2618, uncompressed
Palette at 0x3F2ACC, uncompressed
Battle Preps/Miscellaneous Background
--------------------------------------
Image at 0x407440
Image #865
Palette at 0x40D130
Menu & Statsheet Background
----------------------------
Image #900
0x418E44
Palette at 0x41E2D8
CGs
----
Start at around image 922, first broken up into 240x16 pieces, then total CGs, TSA and battle
palettes can be found at CG table, please see CG editor or other doc for more information.
Opening Text
-------------
Starts around image #1135 offset 0x5E9D4C
Fire Emblem Shadow
--------------------
Image #1368 0x66AB48
Title Screen Background
------------------------
Image #1369 0x66AF8C palette at 0x66AF6C
Armads at 0x66F294 Image #1370
"Fire Emblem", Shadow, Sword, misc.
stuff at Image 1371 offset 0x66FD80
^Palette at 66FCE0 (note: multiple palettes for different parts, change the palette index appropriately)
OK, that’s all I have to share with you.
I think I’ve said enough about that topic then. Next, about palettes—there are different graphic modes. GBA almost always uses 4bit, so unless you’re an NDS hacker *like me*, I wouldn’t worry about it too much. I don’t think any images use 256 colors (which would be 8bpp), nothing definitely uses Truecolor or Indexed bitmaps, and the only other graphics are ones that use 2bpp and lower which isn’t included in this tutorial as GBAGE doesn’t support it (and it’s not very useful).
“Gray scale” makes it so that the image is grayscale. This is sometimes useful. It’s most useful when you’re scrolling through images trying to find out what they are. If it’s set to grayscale, it’s easier to see the details of an image and make out what it’s supposed to be, as opposed to using some palette with weird colors.
If you load a palette that is compressed, just click the appropriate button to load it properly. Else, said button will be greyed out.
The palette index is for palettes with multiple uh… indexes. Sometimes there are alternate palettes for an image that can be loaded with the ‘palette index’ button (for example, map sprites). You can quickly scroll through these by clicking the up/down arrows next to Palette Index.
Oh wait, there’s a way to edit colors in GBAGE too, I forgot! You can use the Color Control box and type in RGB (has to be divided by 8 though) to edit colors. I’m not really good with it, so you’ll have to experiment with it yourself if you want to use it…
Now, onto the last menu. Tile Control. You can choose to use TSA and, if the TSA is compressed, you can choose to load said compressed TSA.
The “amount of bytes to ignore for displaying” is a feature used to skip tiles to align images. I can’t explain it too well, but sometimes if an entire image seems to be off a little bit, either adjust said feature or the size. Usually you’ll see a weird tile at the top-left corner or everything will look like it’s shifted a little when this is needed.
You can even manipulate the tiles with GBAGE. “Tile index” is which tile you want to select, starting from the top-left, going to the right and then down the rows. You can flip the tiles horizontally, vertically, make them use another graphic by altering the graphic number, or make a tile use another palette in the index by adjusting the Palette index. This is extremely useful for TSA hacks—however, newer versions of GBAGE don’t let you edited compressed TSA, in which case you will have to use a decompressor to decompress the TSA separately and then edit it.
I realize that this part is a bit more difficult than the other aspects of GBAGE, and so I’m going to help out a little. First of all, you need to use TSA, and if it’s compressed, hit that button.
While I’m at it, you may be thinking “how do you even know where TSA IS?”. There are several ways to find TSA:
Find it in a pointer table/array. For example, the Battle BG Array Editor (it’s a nightmare module) has a list of graphics, palette, and TSA for battle background.
Use debugging. If you don’t know how to debug though, this won’t prove to useful.
Look using a hex editor. Often times TSA, palette, and graphics are all right next to each other. In fact, most of the time they are. Thus it wouldn’t be surprising to find TSA data right after the palette data, for instance. Being able to recognize different types of data is a skill you’ll develop over time just by experimenting and studying—it’s mostly as simple as looking for patterns.
Anyway, back to editing the TSA. You can click anywhere on the image and select a tile like that (probably preferable), or type in a “tile index” to select which tile to edit. The “Graphics” slot dictates which tile should be used at this spot in the graphic.
It’s like this:
The raw graphics are a bunch of building blocks.
The palette is the paint.
The TSA is the map telling which blocks go where.
However, not only can the TSA tell which blocks go where, but also control how they are placed—which you can change by clicking “horizontal” and “vertical” under Flip—and reuse blocks an infinite amount of times. It can even specify which palette a tile uses, which can be changed by clicking up or down on the “palette” box. This makes it so that a 16 color image can be more than 16 colors by having different parts of the graphic use different palettes and thus different colors.
Here you can see that I’m editing the tiles at the bottom right. I’ve not only flipped them but I made one of the tiles (the tile being highlighted) use palette “1”. Unfortunately palette 1 is just a dud—it’s just a bunch of 00’s there and 0000 = black, so we get a black box, but it still illustrates how the Tile Control menu of GBAGE can edit TSA to change how images are displayed in-game.
There is one other use for changing the palette. If you’re not sure what tile you are editing, you can change the palette quickly and spot the tile that changes palette—that’s easier than trying to tell which tile was just flipped or something.
Now, let’s get some practice with the title screen menu background. I’ll tell you where the graphics, palette, and TSA are, so load them into GBAGE. Note that the graphics are compressed.
Graphics- [Approximately] Image 1369, Offset 0x66AF8C
Palette- Offset 0x66AF6C
TSA- Offset 0x66EDC0
Once that’s done, you should see the following in the image panel:
WAIT! I CAN EXPLAIN!
First of all, there’s an extra tile there that is causing some problems. We can use the ‘ignore bytes’ feature to get rid of that. Ignore two bytes (the equivalent of one tile).
That should look something like that.
And that’s how that should look. Yes, it should look like the whole image is flipped upside down and every row is also flipped upside down. The reason why is because the game undoes these flips. I don’t know why, but it’s the truth. The game initially processes the image like this, and then it undoes the flips. It’s a result of uncompressed TSA—compressed TSA is not flipped like this, meaning “what you see is what you get” with compressed TSA. If you’ve done the chapter on battle backgrounds, you’re familiar with compressed TSA already.
If we really wanted we could flip each tile and change the order manually. But as I said, that isn’t necessary, because the game does that for us. Still, we can practice manipulating TSA by changing random tiles. Just click on a tile and edit the ‘graphic’ part, flip it both ways for the lulz, and edit the palette. Just so you know how it works.
Here’s one more example of how this works, just for emphasis:
And my results (the tile at the top):
That’s just to show you what I mean. And with all that practice and explaining done, you should now have a decent grasp of editing graphics using GBAGE, or at the very least, you should be less intimidated by all the features popping out at you!
