Fire Emblem Tutorial

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 274

FIRE EMBLEM: ULTIMATE TUTORIAL

Welcome to my ultimate Fire Emblem hacking tutorial, dedicated towards hacking the GBA Fire Emblem games. Dont say I didnt warn you: this tutorial is massive and it has tons of details. Although this tutorial is a bit inclined towards Fire Emblem 7: Blazing Sword, the information can usually apply to the other games. However, this tutorial will help most for FE7 hackers as it IS FE7 oriented. I will try and add details on the differences between modules and offsets for different games when I can (the tutorial is already really long as it is). Downloads: HTML Version (Online) DOC Version PDF Version Last Updated: June 7th, 2012 Background Info (Not necessary to read): Anyhow, Im a 4-year or so Fire Emblem hacker who is most commonly known by Blazer. My original username was Fire Blazer as in, one who starts a fire by setting something ablaze, but that was kinda lame, so now I just go by Blazer. Anyway, Ive made several Fire Emblem hacks. My biggest ones are Prince of Durand (now dead) and Tactics Universe (in-progress) but Ive also made other hacks like Fire Emblem: Shining Armor, Fire Emblem: Sacred Contention, Fire Emblem DS: Evil Version, Fire Emblem Wars, Fire Emblem Rebirth, Fire Emblem Prisoner of Darkness, and some other minor ones. Im also working on the Fire Emblem 12 Translation Project and Fire Emblem Rebirth 2 with teams of other dedicated people.

Contact Info: If you need to contact me about something, heres my contact info. Please do not ask questions about hacking, ask for ROMs, or anything else thats illegal or timeconsuming, because I dont have the time. I do appreciate some nice feedback though and Id

love to know if this tutorial came in use for someone, so feel free to let me know that I spent my time on something someone used. =P

E-mail: smashfire17@gmail.com AIM: fireblazerx17 MSN: blazer@feshrine.net (not used very often) Skype: ballin1337 Website: http://www.feshrine.net Forums: http://forums.feshrine.net

Youtube: http://www.youtube.com/FireShrine/ Disclaimer: I do not have any rights to Fire Emblem, Intelligent Systems, or Nintendo, nor do I claim anything by writing this tutorial, etc., I am just a humble video game player. Please do not post this tutorial anywhere but the Fire Emblem Shrine. If I want it to be on a website, I will post it there myself. Thank you for your understanding. Please read the Epilogue at the end of this tutorial for more details on using and sharing the Ultimate Tutorial. Update Log: July 8th, 2010 Ive remade the tutorial from near scratch (but included parts of former tutorials as well). August 19th, 2010 Updates, added more chapters (sorry, I forgot to record which things I updated). February 19th, 2011 More updates/chapters (see above). November 6th, 2011 Chapter 26 has been slightly updated. Chapter 45 and the Epilogue have been majorly updated. Added new JFP patching chapter, and renumbered chapters past it accordingly. Started and finished IPS, UPS, JFP, and XDelta patching chapters, as well as the Nightmare Module Format chapter. Also revised chapters 72, 73, and the final chapter. Only chapters 59-61 remain, which will most likely be finished in the next update. November 7th, 2011 Finished chapters 60 on weapon icons and 61 on map sprites in one fell swoop. Then, after several hours, finished chapter 59 on custom spell animations. This means that the tutorial is now completeall chapters are finished. Any future updates will likely only

be revisions, adding small details, updates, and adding more information to the archive chapter, chapter 72. Thanks for reading and waiting so long for this tutorials completion. I hope it helps many people make awesome hacks! Blazer June 7th, 2012 Minor fixes here and there.

With that, its time to start my tutorial!

Table of Contents: Prologue: Bare Basics Chapter 1: Key Terminology & Abbreviations Chapter 2: Using Nightmare Modules Chapter 3: File Management Chapter 4: Pointer Tables Chapter 5: Battle Animation Editor Chapter 6: Character Editor Chapter 7: Class Editor Chapter 8: Item Editor Chapter 9: Spell Association Editor Chapter 10: Stat Bonuses Editor Chapter 11: Promotion Editing Chapter 12: Map Sprite Editing in Nightmare

Chapter 13: Movement Cost Editor Chapter 14: Terrain Stat Editor Chapter 15: Portrait Editor Module Chapter 16: Battle Palette Reference Editor Chapter 17: Arena Class Editor Chapter 18: Boss Music Editor Chapter 19: CG Editing Custom Cutscene Graphics Chapter 20: Lyns Ending Editor Chapter 21: Tutorial Editing/Getting Rid of the Tutorial Chapter 22: Legendary Weapon Editing Chapter 23-24: Music Insertion Tutorial (ELF Method) & Documentation Chapter 25: Music Editing with Zahlmans Song Editor (OUTDATED) Chapter 26: Exporting Music with GBA2MIDI Chapter 27: Battle Background Graphics Chapter 28: Music Array Module Chapter 29: Sound Room Editor 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 Chapter 37: Support Editing Chapter 38: Miscellaneous Nightmare Modules

Chapter 39: Loading FEditor Adv Chapter 40: Text Editing with FEditor Adv Chapter 41: Portrait Formatting & Preparation Chapter 42: Portrait Insertion with FEditor Adv Chapter 43: Locating Palettes Chapter 44: Editing Palettes Chapter 45: Working with GBAGE Chapter 46: Chapter Data Editor Chapter 47: Map Creation Chapter 48: Map Insertion Chapter 49: Event Assembler Basics Chapter 50: Events The Layout Chapter 51: Events The Event Codes Chapter 52: Event Construction Chapter 53: Map Tile Changes Chapter 54: Chapter Creation Finishing Touches Chapter 55: Importing Tilesets Chapter 56: Animation Importation Chapter 57: Custom Battle Animations Frames Chapter 58: Custom Battle Animations Scripts Chapter 59: Custom Spell Animations Chapter 60: Weapon Icons Chapter 61: Map Sprites Chapter 62: Proper Betatesting

Chapter 63: VBAs Tools Chapter 64: Other VBA Options Chapter 65: Recording Videos & Sound Chapter 66: Fixing the Desync with VirtualDubMod & Video Rendering Chapter 67: IPS Patching Chapter 68: UPS Patching Chapter 69: JFP Patching Chapter 70: XDelta Patching Chapter 71: Nightmare Module Format Chapter 72: Miscellaneous Information Archive Chapter 73: Useful Links & Websites Final Chapter: Credits, Thanks, and the Epilogue

Prologue: Bare Basics Before you start hacking, you need to know some basics. Ill be as brief as I can. Think of a ROM as a game file. It contains the data for the game in it. When you play the game and save, save files are created. They contain data about where you are in the game, what stats there are, what weapons you have, etc. An emulator emulatesimitatesplaying the game on the actual system. So instead of playing your ROM on a Gameboy Advance, youd play it on the computer through an emulator, which acts like a Gameboy Advance, but with more features. The system has some limits to it. There is a limit to the number of colors you can use, a limit to the # of layers, a limit to the # of tracks a song can have. This is the hardwares limitsif you dont want to deal with these limits, then you are better off hacking a greater system, like the Nintendo DS, or making your own game through something like RPG Maker. Thats about it for the basics.

Chapter 1: Key Terminology & Abbreviations If you want to follow along hacking discussions, tutorials, and understand what someone is saying when they are answering one of your questions, youre going to need to know some terminology. They may also use some abbreviations as well. Heres everything I can think of: Note: These are not literal or exact definitions. I define them so that a person can understand them and their purpose. Please do not contact me to correct me on the actual meaning of a word. Thank you for your understanding. ROM Read-Only Memory, the game file Emulator plays a game, imitating playing on the actual system GBA Gameboy Advance. NDS Nintendo DS. DS short for NDS lol. Hardware well just say its the system the GBA uses to interpret data found from a cartridge or ROM. Cartridge the actual game as it is bought from a store. Save file contains save data for the game Savestate contains save data for a specific point in the game. One can come back to this moment in the game through a savestate. ASM assembly, the programming for the game TSA No one knows for sure what it stands for. Educated guess is tile sortment array or something like that. Its also called map data. Its purpose is to take a bunch of mixedup disorderly graphics and make some sense out of it so that when you see the graphics in-game, they look nice. Its a sort of layout for graphics. Hard to explain. Debugger a program that helps debug or a game, or search for bugs, find the cause of them, and fix them. Its also used to find other things though. Debugging the act of using a debugger for its said purpose. Hacking editing a ROM. Modding another term for hacking, less juvenile I suppose. Formatting preparing something to be inserted or used Patching applying changes to a game. Patcher a program that does patching. Utility a tool. Text words, characters, script, all types of writing. Graphics pictures, images, visual aspects of the game. Frame a still picture, one part of an animation.

Animations moving picturesframes put together to give the appearance of something moving. Compression a way to scrunch up data as to save space. LZ77 A type of compression. Used with graphics, TSA, palettes, and other data. Huffman A type of compression. Used in text. RLE Run-length encoding. A type of compression that saves space by scrunching up strings of data. Strings hexadecimal bytes one after another. Hexadecimal Base 16, a way to count, essentially. To denote hexadecimal, one can use various prefixes, such as 0x and $. The basic counting is as follows: 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10. For simplicity purposes sometimes people are lazy and do not put a 0x before 09, since the decimal and hexadecimal values are the same. Decimal Base 10, another way to count. Most people are familiar with this. Binary Base 2, another way to count, sort of. Only uses 0s and 1s. Google for more info on binary (I RARELY use it). MS Microsoft Converter something that converts one thing to another type of thing. For example, MS Calculator can convert hexadecimal to decimal and vice-versa. GBAGE GBA Graphics Editor, the best GBA graphics editor for uncompressed and LZ77 data, made by Nintenlord. EA Event Assembler, used to edit and insert events. The best way to edit events. NLZ-GBA an older program similar to GBAGE, but outdated. unLZ-GBA an obsolete graphics editor that I probably shouldnt even mention. Text Editing Suite an obsolete way to edit text. FEditor Adv the best way to edit text, animations, and portraits. A program by Xeld, a veteran Fire Emblem hacker. Song Editor A program by Zahlman that can rip and insert songs that use the Sappy engine. Sappy engine a way that Fire Emblem and other GBA games can interpret music data. Sappy it is also a program that is somewhat obsolete that was used to insert music. MIDI2GBA a program used to convert MIDIs to GBA data. tr.exe a program used to convert MIDIs to GBA data and then put it inside a ROM such that one could listen to the song by emulating said ROM. MIDI music file that pretty much says what instrument to use to play what notes of what kind. A simple music file that tells what to play as opposed to a recording (WAV). WAV a recording of sound waves. MP3 a compressed WAV.

Sprite a graphical object (cant think of a better way to say this). Usually refers to portraits or battle graphics (the characters that you see move in animations) but can also refer to other graphics. Backgrounds background graphics that dont really move. Map sprites refers to the overworld sprites that a player moves on the map. Hex editor a program that edits data in hex (and often includes an ASCII editor to the side). ASCII text editor a text editor that edits text in ASCII formatgoogle for more information. Standard for many things. Fire Emblem uses this, but it compresses the text with Huffman (not that you needed to know that). Offset a place in the ROM denoted by a number. For example, the song table is located at 0x69D6E0. Hex short for hexadecimal. Byte one unit of editing. Corresponds to a number. Bytes can go from 0x00-0xFF (0255 in decimal). Bits smaller than bytes. Google. Word 4 bytes put together. Common input. Also the size of a pointer. Half-word two bytes, half a word. Pointer a word that points to some data. In ROMs, it has a prefix of 0x08 to it because the hardware accesses all ROM data at 0x08000000. Little endian (byte reversal)- Reverses bytes. 0x12345678 becomes 0x78563412. Practice makes perfect. The easiest way to do this is to split up words into bytes. Big endian- google it, not really too important for you to know. Word-alignment Aligning data by the word. Is recommended all the time, but in some rare cases, isnt necessary. That means that data should start at an offset that ends in 0x0, 0x4, 0x8, or 0xC. 0x57120C is word aligned. 0x571205 is not. Think even/odd, except only the values mentioned above are even, and everything else is odd. XD Table or Array look up what an array is. XP. I really cant explain thisyoull have to figure out yourself along the way. Nightmare a program that edits data tables. Modules files with information on what data nightmare should edit. Also called Nightmare Modules. NMM stands for Nightmare Modules. Nightmare 2.0 a new version of Nightmare recreated from scratch by Xeld. Has more features than the original Nightmare along with some fixes. ZIP archive a way of compressing files. It takes a bunch of files and puts them into one archive. The files can later be extracted (taken out) from it. It is a very common format.

This is something on your computer, not used in-game. Its used to share lots of files without having to download each one individually. RAR Archive Same as above, but better. Also less common. Requires winRAR to use. 7zip Archive Supposedly the best file archiver there is, but not used as much, and thus less convenient. Requires 7zip or winRAR to use. Java google it. Is required for FEditor Adv to work (as well as some other programs like Nightmare 2.0). Net framework required for Nintenlords various awesome programs to work. The alternative for non-Windows users is Mono. Tilesets sets of tiles (lol). Its what is used to make a map. Mappy Map Editor the main program used to make maps. MAR Array File a file that can be exported from Mappy. Its used in conjunction with the MAR Array Inserter to insert maps. MAR Array Inserter inserts maps. Repointing making a pointer point to something else. Also involves moving data. Expanding adding space/room for editing. Making something larger. Kilobyte/Megabyte/Gigabyte/ - KB, MB, and GB, google these and make sure you know them. Just bigger ways to count bytes. Palette a range of colors. When one talks about a palette hes talking about the colors used in some sort of graphic or art. Most graphics only use 16 colors, including the transparent color, but on occasion more colors are used (for things like CGs). VisualBoyAdvance most peoples emulator of choice, almost always referred to as VBA for short.

Thats all I can think of for now. Anything else Ill mention later in the tutorial. I think its enough definitions for now, anyway. Chapter 2: Using Nightmare Modules Nightmare is useful for editing a lot of things. The first things a person thinks of are stats, growths, and classes, but it can do more than that. Each game has different modules though. Fire Emblem 7 has the most modules, for example. And FE8 might have some modules for say, the Valni Tower, which FE7 wont have. That being said I will go through how to use as many Nightmare modules as I can. First, you need to get your clean Fire Emblem 7 (U) #1235 ROM. (U) is for U.S.A., #1235 is the ROM #. I nor anyone else can help you with this, so you have to be self-sufficient here. If you

know how, you can always rip it straight from the cartridge. I dont suggest you download any ROMs unless you have the original game either. :\ To get Nightmare Modules as well as everything else youll need to hack, I suggest you go here: http://www.feshrine.net/hacks.html I upload anything that I think might be useful to someone on that site. Just use the menus and search until you find it. Once youve downloaded them, you have to extract the files. winRAR can extract ZIP, RAR, and 7ZIP files, so you might as well just download that and install it. Then right-click and hit extract here or extract to X FOLDER on the Nightmare Modules file and some folders will pop up. Navigate to the folder with your stuff. If Nightmare.exe (the actual nightmare PROGRAM) is not included, you can also download that off of the website separately. Double-click Nightmare to load it. Go to File-> Open Rom or Ctrl+O and then locate your game. Select it. Then do Modules-> Load Modules and select some modules you would like to use. Nightmare modules have the .nmm extension to them. If you want, you can just load a ton of modules. Once youve loaded your modules, youre ready to start editing, technically. However, Im going to go through some of Nightmares (the original Nightmares, NOT Nightmare 2.0s) menu options. File-Open ROM opens the ROM, of course. Do this BEFORE loading your modules. File-Close ROM closes the ROM. I actually suggest just closing Nightmare and then reloading Nightmare whenever you want to open another ROM. To save changes, you must first hit apply changes (under the File menu) to whatever area you are changing. Easier than that, just hit enter. To save all of your accumulated changes, do File>Save ROM, or just do Ctrl+S. To unload a module and take it off of your list, do Modules->Unload Module.

Link Rom to Modules makes it so that whenever you load that ROM, itll automatically load those modules. However, if you move or rename the ROM or the modules, it wont work, and will instead give an error message. The other options arent too useful, so I wouldnt bother with them.

Now, if Nightmare isnt working for you, there are several things to look out for: Make sure you are applying your changes correctly Make sure you open the right ROM Make sure if youve linked ROMs and modules together, you dont move or rename the files (itll mess it up) Make sure you open the right modules for the right game, and that they are compatible

Here are some basic Nightmare issues. After the issue are a list of numbers that tell which things to look at. If there is another issue, its possible one of the mentioned things applies to your problem as well. 1. Check if you have the right ROM #- 1235, the American version. 2. The ROM is unzipped, meaning, it's a .gba file and not a .zip file. Right-click and extract. 3. Module is not extracted/unzipped. Right-click and extract. Download WinRar if needed. 4. Check if files are updated to the most recent ones. 5. ROM is a .gba file. 6. ROM may need to be expanded. "The stats are absolutely crazy! Lyn has -128 speed!" 1. 4. "The Module and ROM are not compatible." 1. 2. 3. 4.

5. 6. "It's just not loading. It says I'm trying to crash Nightmare." 2. 3. 5. Now, about the different aspects: At the very top is what module you are using. Below that is a list of the different entries in the module you can edit. Usually the entries are labeled so that you know what you are editing. Below that is the actual data to edit. There are different types of slots. Dropdowns allow you to choose from a list (although sometimes those lists limit you to only certain values). Othertimes you can edit data in decimalfor example, character stats are in decimal. If it was in hexadecimal, Im sure itd confuse some of you a bit more. There are also signed and unsigned bytes. Some values can go up to 255. Other ones become negative once they reach 127 or so. I really forgot the details of signed/unsigned bytes but because of this and other reasons, stats cant go to like 255. Whenever you make a change to an ENTRY, you have to press enter to apply changes. When you switch entries (say you were editing Eliwood and then you go to Lyn, its the same module but a different entry) you have to press enter again for the new changes you make. (You press enter AFTER the changes, btw.) When youre done with all your changes, then you can press Ctrl+S. Heres an image to help with the Nightmare layout:

Thats pretty much all you need to know about using Nightmare in general. Good luck with your Nightmare editing!

Chapter 3: File Management In order to be a successful hacker you need to have a lot of good management. To start, try and use as few programs at once as possible. What you cant do is use one program to edit something, use another program to edit it, and then go back to the 1 st program and edit it again. Itll undo changes from the 2nd edit because the 1st program doesnt know that the 2nd program edited it. What I suggest doing is when youre done making edits with a program, save, and then exit out, and go to another program. This helps avoid confusions between programs. Note that HxD, a hex editor, reloads a file from its source, so it DOES recognize edits made in between, this is kind of an exception. Also, when a ROM or some other file is being edited, you cant edit it with another program or the other program will give an error. As said, finish up what youre doing with one program first. Another key to file management is to organize your folders and the such. Make a hacking folder and divide that into a few more foldersone with programs, one with CLEAN ROMs (unedited), one with hacks, one with other files, etc., it really helps. Most importantly, BACK UP YOUR GAME. After every major change, BACK UP YOUR GAME. Before you apply some patch to some game, BACK UP YOUR GAME. Before and after you insert graphics, BACK UP YOUR GAME. You never know when something crappy might happen. Have a folder JUST for back-ups and label your back-ups with the date, and maybe even what you did before or after that back-up. For example, if I was about to insert some portraits, I would backup my game, call it PrePortraitsBUP-070410.gba and store it in a folder. Then I know what I did after (inserted portraits), I know its a back-up, and when I took it. If you have good file management then youre on your way to making a big successful hack. ^_^

Chapter 4: Pointer Tables Note: This is a copy/paste from my old hacking tutorial. What is a pointer table? Start by opening your hex editor, and selecting Go to, jump, or whatever sounds like that. Id like you to go to c9c9cc for this. At 0xc9c9cc youll find pointers. Itll look like a bunch of numbers and 08s for that matter. If it doesnt, then you are either at the wrong place or in a wrong ROM. To make sure, it should look like this.

Now that you are there, you are probably confused with all these pointers. I call this the Event Reference Table, although since it has more than events, you can call it the Reference Table I suppose.

A pointer is reversed by little Endian, that formatting thing I talked about. So the first pointer 4CC73408 is 0834C74C. The 08 is added onto every address in the game. Ill get into that later, but for now, just sort of ignore it. You wont need to worry about it too much until you get into ASM (assembly) or expansion. Now this is the great table that you will use to repoint things. Repointing is changing the pointer to somewhere else. Now lets say I repoint to extra space, where this is tons of free space to do whatever. Then I could put tons of information there, or rather much more information than the game normally allows. For instance, you are limited to around 150 weapons by editing the data thats already there. But if you have more space, you can add more items. Repointing data to this new space is expansion. Hopefully itll get clearer as the guide continues. I hope that was useful for you!

Chapter 5: Battle Animation Editor Note: This is a copy/paste from an old tutorial. For some reason, this confuses some people. This isnt fully custom animations, this is the basic animation thing using Nightmare. 1. Load up Nightmare, the game, and the Custom Battle Animation module and the Class Editor. It should look like this.

2. Now for each animation you need to select the weapon type. Lets say we are making a mercenary animation. Then select All Swords (already selected). 3. For the second slot make it All Weapons because it is for all swords, not just one sword. Otherwise use Custom Animation for a Weapon. 4. Select the animation to use. 5. Dont touch the separator. Then do the same thing for the next 3 slots, and a separator, continuing to however many you need. Then enter and ctrl+s and you are done with that part. It should look like this.

Now the game needs to know about this animation. 6. Go to the class editor.

7. Go down to the Battle Animation Pointer.

Change that to 0x8POINTER. 0x8 is the beginning of any pointer (except for expansion), and the pointer would be the number at the top of the custom battle animation pointer. Which is this one.

So that would be what you put in. 0x8FFF800. Now enter and ctrl+s again, and play as Eliwood. Should look like this.

And what happens in-game?

Ah! Hes messed up! Thats because of his palette, unfortunately. Remember, that this changes the class animation and not the character animation. For a custom character animation you either need a class just for them, or a custom battle sprite which will also be explained later (this is another type of custom battle sprite). Thats all for today. =) Chapter 6: Character Editor I will do a run-down through this module. At the top is a list of characters to edit. Generic units lack portraits, chibis, amongst other things. The tutorial characters are used in Lyns mode, while the non-tutorial ones are used in Eliwoods/Hectors mode. Lyns mode characters dont have supports, but they can have themyou just have to add the support pointer to them. IIRC unit 0xFB is labeled Enemy and is the generic enemy unit used in the arena, so I suggest that you dont edit it. I would also not edit Wall or Snag at the end, as well as any other character that seems fishy or special (like the Fire Dragon, dont edit him into something else he is a special character). Now, onto the actual data: Character name the index for the character name text. Type it into FEditor Adv. Character description same, but for description text. Character number used to reference the character. I suggest you dont edit this. Class (support viewer only) only affects the class shown in the support viewer. Portrait the portrait used for the character. Mini-portrait default uses the portraits chibi, everything else is for generic enemies. Affinity self-explanatory. Character number 2? dont edit, just to be safe. Level doesnt affect the actual level. It affects autoleveling, I think. Youll find more about this when using the Chapter Unit Editor or Event Assembler when you edit units. Base stats these are added to the class stats to get the FINAL character stats. Stats can be negative but might glitch if they are unless you use FEditor Advs autopatch. Con bonus same, its added to the class bonus. It can be negative as well. Weapon levels the weapon levels the unit has. Unless youre hax like Athos, you cant have more than 1 S level weapontry and figure out how to do it like Athos if you want.

Also, if the class has a base weapon level, it is used unless the character weapon level is higher. Growths self-explanatory, arent added to class growths, they are as you see them. Palette which palette to use. Generic default colors are for generic enemies. Custom battle sprite gives the option to use a custom battle sprite/animation, but NOT use a custom class. Character abilities they are all pretty self-explanatory. You can combine values to have multiple skills from one list. For example, to have a character that could use steal and thief key (but not have the class ability to use it), you would do 0x04 + 0x08 = 0x0C. Supports Data pointer a pointer to support data self-explanatory I suppose. 0x00 means no supports.

Chapter 7: Class Editor This module edits class data, NOT what character is what class. Just wanted to make that clear. There are 3 unused classes at the end that you might think you can use, but probably shouldnt be used. Apparently they actually are used for something, and whats important is not what its used for (because Im not sure myself), but the fact that they arent free to be edited and all. There are also some classes that are only used in cutscenes as NPCs (like the Peer class, Elberts class) and some unused female classes. Some classes dont have animations. For example, there is no female Myrmidon animation, and the Paladin (F) does not use Isadoras animation by default. Rundown: Class name/description text index to be used with FEditor Adv. Class number class reference number. Better to not be edited. This class promotes to obvious Standing map sprite the map sprite used when you arent selecting the character. For the moving map sprite, you have to edit it using the map sprite pointer table editor, another module (with a somewhat long name). Walking speed obvious, slow or fast. Default portrait for the class, if there is no real portrait, what portrait is used. Typically the enemy class card. Supposedly if someone has a custom class you can use this so that their unpromoted class uses one portrait and their promoted class uses another portrait. Its a cool idea, but I dont know if it actually works, since I havent tested it myself. XP

Base stats obvious. Max stats the limit to what the cap can be. Without Xelds patch included in FEditor Adv, the max is 31. To see how to get past that max without glitches, see FEditor Advs documentation. Note that HP normally cannot go past 60 for allies either. Enemies can go higher though. Class relative power affects experience. A lower number means more experience. 0x03 is like the default. Class growths IIRC affects enemies and how they grow. I forgot for sure. Promotion bonuses stats added when a unit promotes. For the CON bonus, its the difference between the promoted and unpromoted class. Class abilities self-explanatory. They can be combined as well (see the character module chapter for more info). Base weapon-levels the minimum weapon levels that a character of this class must have. Cant go lower than this. Battle animation pointer a pointer to the data that says what animation to use for what weapon. You can edit this with the battle animation editor OR make your own data with the custom battle animation editor. Movement/Terrain data pointers you can edit these with the appropriate nightmare modules. It affects what tiles a unit can move on and the terrain bonuses they get there.

Chapter 8: Item Editor There are a few unused weapons/items and ones that arent obtainable without some bonus requirements, so I suggest you replace these, because expanding this stuff to allow for more item slots is tedious (mainly because you also need more space for weapon icons). Run-down: Item Name/Description pointers by now you should know what this is- text index. Item number reference number. Weapon type obvious. Weapon abilities you can combine bytes, just as you can with character/class abilities. Stat bonuses pointer points to stat bonuses, for example, Durandal gives +5 strength. You can use the stat bonus editor to make your own stat bonuses, or go to the offset mentioned in a hex editor to edit the data there. Effectiveness same as above, essentially. The pointer just points to a list of class numbers that the weapon is effective against. Durability uses

Power might Hit% - obvious Weight obvious Critical obvious Range To get the range, the first bit is the starting range and the 2 nd is the end range. So 0x11 means only within 1, but 0x12 means 1-2 range, and 0x24 means 2-4 range, etc. Cost per use uses x cost per use = actual cost (sell price is of that) Weapon Rank obvious Item icon obvious Staff/Use Effect from my experience this is tricky trying to get it working, so if you play around with it and its not working right, theres nothing you can do about it unless you know ASM. Weapon effect obvious Weapon experience how much experience the weapon gives towards getting to the next weapon level. 1 is normal, 2 is high, 0 is nothing, and you can do 3 and on, but itd be a bit broken to have 3 WEXP.

Chapter 9: Spell Association Editor This module controls what weapon has what animation. Its mainly for magic weapons, tomes, and staves. However other weapons have blank entries where the animation used slot is set to 0xFFFF because there is no spell animation used. Note that spell animation can also refer to non-spell animations such as javelins and arrows. It just refers to any separate animation associated with a weapon that isnt actually apart of the class battle sprites. I hope that made sense. Run-down: Weapon which weapon to use # of chars to display 1 or 2, anything else will glitch (this one is obvious too) Animation used also obvious Return to original position (map) I suggest putting this on. Facing position (map) unless its a staff, this should be towards the target Enemys flashing color (map) white is default for weapons, dark is for dark magic, red is for fire magic, etc., just do what you think looks nice.

Thats all there is to it.

Chapter 10: Stat Bonuses Editor All you have to do here is type the bonuses you want, then take the pointer at the top and type it in the item editor. For example, the first entry is 0xFFF2A0 so in the Item Editor under Stat Bonuses Pointer youd type 0x8FFF2A0. Thats all there is to it. Chapter 11: Promotion Editing If you want edited promotions for the classes, use one of the custom pointer slots in the Promotion Item Editor (in the dropdown where it says Promotion Pointer) and then go to that offset in a hex editor and type the class numbers of the classes that can promote through this item. Remember to save your changes in both nightmare and the hex editor and not to overlap changes by having both programs open at once. To change which class promotes to which class, there is a dropdown slot in the class editor. Chapter 12: Map Sprite Editing in Nightmare Note: I dont know how this works in FE6 or FE8 for sure. This is for FE7. The Map Sprite Pointer Table Editor module controls the moving map sprites. Each class has its own pointers. The animation pointer would better be called the graphics pointer as it is a pointer to the actual map sprite graphics which you can edit in GBAGE. The other pointer is from what I know more like an actual animation pointerit tells like, how to work the map sprite and its animation and crap. Sometimes when you import map sprites from other games the animation will still not look good because of the Another Pointer in which case you have to import that data too. Anyway, if you want to reuse a map sprite of one class on another class, simply copy the pointers and paste them onto the new class slot in the module. Thats it. Chapter 13: Movement Cost Editor Note: The nightmare module is actually called Movement Type Editor as of writing this tutorial, but its better called what the name of this chapter is called, really.

This controls how many movement points it costs to travel certain types of terrain. Think of the movement of a class as a # of points they are allowed to use to travel. So if the value next to a type of terrain is 1 it just takes 1 movement. If its 2 then it requires 2 movement spaces, meaning a unit with 5 movement can only travel through 2 forest tiles because forest tiles require 2 movement and 5/2 = 2.5, rounded down to 2. If the value next to a type of terrain is 255 then it is uncrossable because a unit wont have 255 movement points. There are offsets at the beginning of the name of each entryuse that offset to repoint movement data. The pointer to movement data is located in the class editor. Chapter 14: Terrain Stat Editor Another very short chapter. It is split up into ground and air units. How/what to edit is very obvious. Just know that Pegasus Knights, Wyvern Riders, etc. use the air movementas they are flying they are unaffected by most terrain and do not really receive bonuses. All other units receive the standard ground bonuses. The pointers to this data are in the class editor. Thats all you really need to know. Chapter 15: Portrait Editor Module There is a portrait module made by Ace that was used to repoint graphics and edit miscellaneous stuff like frame positions and eye control. However, because of Xeld and Zahlman, you can do everything this module can do in FEditor Adv. Just some quick notes for those who are curious: FE6 does not have blinking frames Portraits and chibis are LZ77 compressed Mouth and eye frames are uncompressed data Sometimes the game has separate portraitsone with the eyes already open, and one with the eyes already closed. Just a heads-up.

Thats all I have to say about this module.

Chapter 16: Battle Palette Reference Editor This is a very useful module that tells the offset of the palette of a certain character/class. In the character editor is a byte that affects the palette-that byte references this table, finds the offset of the palette, and then loads the palette. The good thing about this table is that it already has some empty slots near the end to use if you need the extra palette space. The actual offsets given are offsets to the LZ77 compressed palette data. If you want to edit it real quickly, you dont have to decompress the data to edit it. However, if you are editing the data and you want to edit all 4 palettes1 for each allegiance (including the P4 allegiance located in the arena) then you can do so by decompressing the data using NLZ77 Compressor, editing it like any other palette, and then recompressing it and re-inserting it. One more quick thing. If you want to make it so that your edited palette works for all allegiances, you should edit a palette of the same class as your new character. For example, lets say you are making a guy named David and he is a knight. His character data replaces Lute from Fire Emblem 8: Sacred Stones. Well, heres what youd do. Youd steal the palette of Gilliam, who is a knight, by going to the offset, copying the palette data there (palette data starts with a 10, so with that clue you should be able to know when the palette data ends) and pasting it somewhere else. Then repoint Lutes/Davids palette to the Gilliam-replica palette. Then edit Gilliams copied palette to whatever you want through a battle palette editing technique. Save the edited battle palette and you now have a knight palette for David that will work right on all 4 allegiances and not look glitch when David is an enemy or an NPC. 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 This is pretty simple as it only has one thing to edit (which class appears). The thing is, I dont suggest editing the empty slots at all. This is because these empty slots are most likely separators.

What do they separate? If I had to take a guess, Id say they separate different modes, meaning the first set of classes is for Lyns, the 2nd is for Eliwoods, and the 3rd is for Hectors. My only other comment is that from what I remember, character 0xFB in FE7 (labeled as Enemy) is the unit used in the arena. FE6 and FE8 probably also have some unit reserved for the arena in their character editor, I just dont know which one. Thats all I have to say about this module. Chapter 18: Boss Music Editor Very, very simple to use module, but also very useful. I just want to note that you cant have allies have their own battle themes, to my knowledge. It only works if they are an enemy. However, if you give one of your allied units a battle theme anyway, and then you fight them in the arena, the boss music may very well play. I havent actually tried this, so its just an idea. Chapter 19: CG Editing Custom Cutscene Graphics Note: Currently FE7 oriented. You want to make your own CGs to insert into a game? Well, heres all you need to know about making them as well as making use of them. To start, lets take a look at the CG Editor module I made. Its just a table editor, but it can be useful. The graphics pointer points to either A) graphics or B) a set of pointers that has more graphics. The TSA pointers points to the TSA that says how to use the CG graphics and make it into a full-fledged background. The palette pointer is kinda obviousits the palette. With that out of the way, lets take a look at the alternate graphics pointer. Lyn mode CGs point to a set of graphics. Take the first entry in the CG editor-- 0x8CED6D0. Well go to the offset 0xCED6D0 in a hex editor.

Whats highlighted is the set of pointers. Its 10 pointers, 0x24 bytes (or 40 bytes). Each graphic is actually a 240x16 piece of the entire CG. If you take all 10 pieces together (vertically) you get a 240x(16x10) or 240x160 image. The size of the GBA screen is 240x160, so we have a full background. Why do Lyn mode CGs work this way? I cant say for sure, but I have a good feeling its because of the Lyns Mode Ending, which uses the CGs as a background. In any case, you can go to one of the pointers and see the graphics if you want. I must admit it is a bit troublesome to use CGs in this manner, which is why you may not want to actually replace these CGs unless you replace them with black graphics (which is what I did in my hack Tactics Universe). Now, theres something the current version of the CG Editor is missing (at the time that I am writing thisI may update the module later). Its a byte that is a flag as to whether the CG works like a Lyns mode CG or a normal CG. Go to 0xCED888 in a hex editor. The byte you see there is 01. If its 01, its a Lyn mode CG. Else, it works like a normal Eliwood/Hector mode CG. Thats all there is to it. Some other quick notes: Palettes are uncompressed Graphics are compressed TSA is compressed

Alright. Theres something else I want to tell you about editing CGs. If you want a simple 16 colored CG, there is an easy way to do it. Just make an image that is 240x160 in size. Load it into Usenti, a bitmap editing program oriented for the GBA that you can find on my site. Hit Palette-> Requantize and type 16 to make it 16 colors. If the image has too many colors to start with, it wont look good, which is why I suggest you use simple images. You can also do something like a sepia tone or a one-color imagesomething that is like grayscale, but tinted with a color, so that it is all red, all blue, etc. This is a graphics editing thing, however, and I cannot help you with this. Youll have to ask in a graphics area how to do such an effect. Anyway, once you get a 16 colored image, change the size to 256x160 using Usenti. The 16x160 portion on the far right that you just added should be the transparent part. Also, at the very top left, there should be a pixel with the color that is going to be transparent. Said pixel will turn up black in-game, but it cant be helped (by me), unfortunately.

As you can see, I managed to save some quality by making the entire image red, but its still kinda eh. On the right in the color box you can see I only have 16 colors (1 row). Although you most likely cant see it, at the very top left of the CG is a dark red pixel that is the SAME dark red on the right. When I insert this CG, itll turn up black, of course. Once thats all done, save your image. Load the CG stuff with GBAGE-everything you need to edit a CG is in the CG Editor module. I suggest editing an Eliwoods mode CG, of course. Type in the graphics offset and the ROMPalette Offset as it is in the CG editor. You dont really need to load the TSA for the image.

Hit Import Bitmap and select your graphic where it says File. Put in an offset for the CG to be inserted and check the following stuff:

When thats done hit OK and hit OK again. Now save with GBAGE (File->Save) and then exit out. Theres one last thing. We havent touched the TSA, have we? Well, theres a trick of sorts with images that are 16 colors. The game already has some TSA made to use with a 256x160 image that only has 16 colors. Its offset is 0x50BE54. Open up the CG Editor in Nightmare and type that under the TSA for your image (remember that since it is a pointer, you type 0x850BE54). Then save. Now all you have to do is test your CG in game. Wait, how to do that? Well, you need to load the CG using events. The event assembler code to load a CG isShows a CG picture SHCG XX XX = picture value (Direct copy/paste from EA files) To do it in hex, the code is D3 00 XX 00, not that anyone uses hex anymore right? I suggest putting fading codes before and after the CG to smoothen the transition. Its kinda necessary if you want the CG to look right. FADI SHCG 0xNN FADU STAL 0xFF The above is an event to fade into the CG, load the CG 0xNN (obviously put a real value there), and then wait for time 0xFF (255) in who knows what units (frames?). You can put other codes in between the fading codes, of course. I just showed the bare minimum. Theres also a macro made by Nintenlord to make it easier:

//Smooth changing to CG #ifdef _FE7_ #define ChangeToCutScene(cutscene) "FADICG 0x10; SHCG cutscene; FADUCG 0x10" #endif All you have to do in your events is put ChangeToCutScene(value) and itll change to the cutscene specified. Makes it slightly easier, I suppose. Thats it for events BUT WAIT! Theres a nifty program that can help you insert CGs OVER 16 COLORS! AND THE METHOD IS KINDA EASIER!!! FEditor Adv has it with it. The batch file is called Execute CG Maker. Execute it and youre your original 240x160 CG image. Itll ask where to save an image showing what the converted CG looks like after its GBA-ification. Im using an arena (shown below) so Ill just call my new one arena2.png. Next you need to tell it what to call the image data dump. arenadmp, arenaimg, or arenagraphics works. Something to tell you what it is, thats all that matters. Then you need to save the map data (Xeld calls it map data, but everyone else is so accustomed to saying TSA that I just say TSA as well). Save it as something youll recognize. Same for the palette data. Then youre done.

Below is what my image looks like afterwards.

Pretty good, amirite? It uses more than 16 colors and manipulates the TSA/map data in a complex way to do so. Thank Xeld for his program. Now all you have to do is copy the data from each respective file into some freespace in your ROM, and mark down each offset you insert it at. So for example, well say I am inserting my graphics at 0xD20000, my TSA at 0xD25000, and my palette at 0xD26000. I have them all written down and labeled. I save my hex editor. Then using the CG Editor module I repoint everything, making sure to add an 0x08 to the beginning of each pointers (0x8D20000, 0x8D25000, 0x8D26000). Then I save with Nightmare and test my ROM (I already went over how to load CGs). Its a bit of work, but making CGs is quite rewarding, and its easier than SOME stuff, thats for sure! Good luck with your CG making! Chapter 20: Lyns Ending Editor This module changes what text is used in the Lyns ending module as well as what characters data is used. You see, the ending shows a record of battles fought, won, and lost, and it gets that from the character #. Depending on whether the character died (got injured) or not, there are two different text. Actually, theres an error in the current Lyns Ending Editor (if you do not see this error in your version, dont worry about it). It says that there is an Injured Text for the Tactician, but from my foggy memory, I think the latter text is actually for the female tactician, while the former text is for the Male tactician. The game knows the male/female thing based off of what you chose when you started the game and stuff. The Lyn Hilltop text is just some text near the end that has a CG of Lyn on a hilltop. For simplicitys sake I made the whole module one entry.

Theres one more thing I want to say about this. When editing the text, there is a trick to it after each line on the text, you have to add a bunch of spaces. For whatever reason, this is how the game knows to make a new line, and if you dont add a bunch of spaces, the text glitches. So your ending should look something like this, except you dont need the words space and you wont SEE the spaces, but the game will know they are there. Gravyman, Saucy Boy (spaces) (invisible linebreaks) He served gravy to people (space space space space space space) in all the kitchens of the (spaces) world, disgusting people with (spaces) his inferior cuisine. (spaces) I dont know exactly how many spaces you need after each line so I would just add as many as necessary, really. Experiment, play around, and work it out. One more chapter, down! Chapter 21: Tutorial Editing/Getting Rid of the Tutorial This is a frequently touched upon subject. I want to make this quick. To get rid of the very basic tutorial events, you can A) use the Tutorial Editor nightmare module B) use the Event Assembler or C) use some patch somewhere. Method A: Load the tutorial editor module for FE7. Repoint each pointer to an empty space of 4 00s. If you dont know of a space, you can type in 0x80000B4 because at that very offset are 4 kindarandom-but-probably-important-for-something 00s. Just do that for every pointer and bam. Method B:

At the very top of events, before even the #include stuff, put DISABLE_TUTORIALS and the Event Assembler should disable the tutorials when you insert your events. Method C: I dont know where this patch is but it does the same thing as the stuff above. Its just a patch way. There is a Tutorial Killer Patch I made but it gets rid of complex tutorial events as well. However, it is reported as glitchy, but I have given up on trying to fix it after such a long time. Chapter 22: Legendary Weapon Editing FE7: There is a nightmare module thanks to Xeld that can edit which weapons have the special stuff that goes with the legendary weapons Armads, Durandal, Forblaze, and Aureola. Its very simplistic. However, if you want to add more weapons to this list, you have to do some different stuff (you cant just expand it like normal). See this topic for more information-http://forums.feshrine.net/index.php?showtopic=3285 Chapter 23-24: Music Insertion Tutorial (ELF Method) & Documentation This is a copy/paste from my music hacking tutorial I released. It tells how to insert music using the Elf Method (tr.exe, a hex editor, Nightmare, and a few other things). It also tells how to make a song loop and includes documentation. This tutorial does NOT cover how to rip music from other games and import them, however.

This tutorial, created by me, Blazer, will guide you step-by-step on how to take a MIDI and insert it into either Fire Emblem 6 or Fire Emblem 7. I have not made an instrument patch for Fire Emblem 8 so youll have to either find some other way to hack music or bribe me into making one for FE8. :P Tools Needed: Required: Music List.txt Your MIDI, i.e. a song file ending in .mid

Midi2AGB/Midi2GBA* Anvil Studio (or another good MIDI editing program, although Anvil is preferable) HxD (or another good Hex Editing program) A Fire Emblem ROM (or another GBA ROMthis tutorial is direct towards Fire Emblem hacking, however) Blazers Instrument Patch (found in tutorial) NUPS Optionals: Sappy 1.6 Sappy 2005 *(Same programs, Ive seen them under both names, I will reference it as Midi2GBA) YOU CAN FIND MOST PROGRAMS AT HTTP://WWW.FESHRINE.NET/ Part 1: Background Information Before trying to insert custom music into Fire Emblem or any other GBA game, you should: Know how to manipulate a hex editor and its basic commands (go to, find, opening, saving, copying, pasting, and editing) Know how to make patches as well as apply patches Use Visual Boy Advance to play ROMs, savestate test, etc. Know how to back-up ROMs. Backing up is very important. I will not constantly warn you to back up your ROM, but I will on occasionits up to you to do it.

Terms: (note: some definitions may have been simplified or otherwise defined as something else for the sake of making it easier to understand, please dont talk to me about technicality terms, Im a casual hacker and I dont care for 100% accurate definitions.) MIDI- a song file that contains all the tracks of a song. Track- one part to a song, a track contains all the info about what a certain instrument should play. Each track has one instrument and the track has all the notes for it. Instrument- Digital instruments, an instrument is a sound or set of sounds to play. Acoustic Grand is a type of instrument. The track would tell what sounds of the instrument to play, when, for how long, etc.

General Hex Editing Terms- This includesoffset, hex, byte, word, pointer, little-endian, header, etc. Pitch- How high or low a sound is. Octave- What set of pitches to use. A lower octave has lower, deeper sounds, while a higher octave will produce higher pitched sounds. Volume- The loudness, in this case, the loudness of a track or song.

Part 2: Downloading the Programs Everything you need (excluding illegal ROMs, which btw, a ROM isnt really a program) can be found at http://www.feshrine.net/hacks.html, simply navigate that site and download what you need. The music list can be found in the documentation section. Anvil Studio and Mid2GBA can be found on the Music Editors page, just as HxD can be found on the hex editors page. The instrument patch can be found in the Patches section and NUPS can be found on the patchers page. Finding a MIDI is up to you. Use google and http://www.vgmusic.com to find a MIDI of a song you may like or something. Dont ask for help with this. Part 3: Preparing Your MIDI Before you insert your MIDI, you need to make sure it is properly prepared. This includes quite a few things. Ease up your mind, its pretty straightforward and you use a easy program to help you with it. Load up Anvil Studio, and then load up your MIDI file. In the middle you should see a bunch of tracks.

The middle part is where all your tracks and their information are. To the left is the track name, then the type it is, and the instrument used (example, Acoustic Grand, Violin, String Ensemble 1, etc.). Step 1: Minimizing Tracks Having more than 10 tracks in a song will probably screw things up somewhere down the line. I wouldnt even try and do itI remember a friend telling me he tried to and it failed. One thing to do is delete any tracks without notes. It will say to the left of the play/pause buttons no notes if a track doesnt have any notes. Sometimes there are redundant tracks labeled Copyright or something. If there are any, go to Track->Delete at the top of the menu.

That shows a redundant track named Copyright by Bla Bla Bla and at the top it says no notes. If you still have more than 10 tracks, you should find another MIDI. Sorry but, there are limits in life. Step 2: Truncating Your Song Some songs repeat within themselves. Like a song may be 6 minutes, but at 3 minutes it just repeats itself all over again. Well, in-game, this uses up some space and for maximum efficiency, youd best get rid of the repeat. Do so by finding out exactly where the song repeats and then going File->Truncate Song-> Delete from Current Position to End. Going to View-> Composer may help you find the place where it repeatsotherwise just listen to the song and stop once you hear it, then click around in the track area until you get to the point where it repeats. Then do as I say and TRUNCATE! Step 3: Track Timings In order for your MIDI to properly repeat in-game, all of the tracks need to be aligned. Otherwise one track might go ahead and play itself before another track has finished its rounds, and then once it repeats in-game, youll be like WOAH THE SONG IS ALL MIXE D UP WHAT DO I DO?!!!!.

I got this trick from someone elseI believe it was Charon the Ferryman, a member on my forums. Go to View-> Composer if your composer scroll isnt loaded already. Select the first track, then click in the composer area. Hit page down on your keyboard (or if you dont have that, do it slowly by holding the right arrow) until you reach the end of the track. Making sure you are at the end, look at the top.

Make sure the time and the duration are the exact same. If it isnt, then add rests by clicking the Insert a Rest button until it is.

Theres the button if you cant find it. Now if your songs duration CHANGES, thats also bad. Press the backspace button to delete rests. Usually one backspace will get it to the perfect timing. In my case, the duration went to 3:03:07 due to an extra rest, and then I pressed backspace once, and now it is back to 3:03:04. Click on the next track (simply click on the row of the track underneath the column named Track Name if youre stuck on how to do select a track, and then make sure the track is highlighted) and do that with EVERY SINGLE TRACK. Yeah, the repeating process makes you hate large #s of tracks. D: Once thats done, best save your song. Youve now prepared your song for insertion. That was arguably the hardest part of the entire process. :P Part 4: Applying Blazers Beta Music Insertion/Instrument Patch So, get my epic patch from my website at http://www.feshrine.net/hacking/patches.html I probably sound narcissistic for calling it epic, but everyone needs to feel some good selfaccomplishment. Im just having some fun XP Right, back to hacking, Heres the Readme: README

-------

This is a private patch supplied by Blazer. It is not for use without permission. Credit must be given.

It adds all instruments at offset 0x107d7d0. Data ends at 0x11b6530. The actual instrument map can be referenced by the offset 0x11ae42c when creating songs.

Back-up your ROM before using and be very careful with this. If you have not gotten this patch directly from Fire Blazer than the data will not be repointed properly and it WILL screw up your ROM if used in combination with a MIDI.

Thank you for your time.

As long as you dont post this tutorial anywhere (you can link people to it, but link them to the WEBSITE, DO NOT REPOST IT SOMEWHERE ELSE), then youre free to use it. Also give credit if you use it in your hack. Not only because I indirectly helped you with your hack but Im curious to see if people actually make use of things like these, and curiosity is just so hard to control. Now, with that said, if you read the README (thats the point of it), it says some data is inserted at some scary offset. Well, if you happened to have data at that offset, we have a problemthe patchs data has pointers inside of it. TONS of pointers. The pointers are relative of each other. Unless you want to repoint hundreds of pointers, the data has to go where the patch says it is going. In short, make sure there is nothing at that offset. So youll need to move out any data you have therego use a hex editor and check to see if there is any data between those offsets. If there is, it WILL be overwritten, beware. Also, if you have a clean ROM, this WILL expand your ROM, meaning you will now have to start using UPS patches if you havent already, and if you simply dislike expanding... well too bad. -_BEFORE you use NUPS (find it on feshrine.net) to apply that patch, BACK UP YOUR ROM! I make no guarantees that nothing will go wrong and everything works. Its worked for several people but that doesnt mean it wont screw up your ROM. You have been warned. That being said, go ahead and apply the patch, because youll never get anywhere without it.

Part 5: Converting Your MIDI With that done, time to convert your song to GBA format. Crack out MIDI2GBA. Open up that program called tr.exe. It has an icon with the text ELF. Put your MIDI file into the folder called mid. The mid folder is inside of the MIDI2GBA folder. Make sure it is your ONLY and I mean ONLY Midi there. In fact, make sure it is your only file there. Otherwise things can get confusing later on and my methods wont necessarily work if you try and insert/convert multiple MIDIs at a time. Once youre sure its in, press the ?? button in tr.exe (the ELF program). A pop-up window will come up and your song will either be on the left or the right. If its on the right, the conversion failed. If its on the left, its a success. Now if its on the right, dont get all pissed at me. There are some reasons why this might happen. Errors in the MIDI. Try to repair it using Anvil Studio. In Anvil, go to File-> Repair and hit No to any pop-ups, then save and retry. The following may actually mess it up as well. Dont try to repair the song and then insert, first try to insert and then repair. Awkward instruments or something. Perhaps your MIDI file has some instrument that the program doesnt like. I doubt it, but who knows. Bad tracks, some unsupported type of track. MIDI file type. Try saving it as MIDI format 1 and midi format 0, although Im not sure if this makes a difference, maybe it does. It has to be a MIDI by the wayMP3s and WAVs are totally different, dont even try them. The file name has some weird symbols in it. You could just be unlucky and your song doesnt want to work. This often times happens with Felover3, a hacker who seems to fail at a lot of things Poor dude.

If you cant get it fixed, Im sorry, this is a flaw in this method. I cant help you too much besides saying redo the process or try a different MIDI. To be honest, while writing this tutorial I did one myself, but the MIDI I tried to insert ended up being on the right. In fact, so did the 2nd one. Not until I got to the 3rd one did it work like it should.

Now, time to test out how your song should sound in-game. Already?! We already get to test?! YESZ! In the MIDI2GBA folder is a ROM called song.gba load said ROM using VBA and then press Z (the equivalent of the A button in-game), wait a second, and then listen to your song.

If its choppy, then that means conversion had some difficulty. If the sounds are a little different or something, then thats due to instruments. Conversion isnt perfect and the GBA hardware has its limitations, thus the song wont sound perfect. If it sounds pretty good, thats great lets continue. If not, try repairing the song, manually fixing it using MIDI editing skills (if you have any), or try another MIDI.

My song, Celicas Map Theme, sounds great, although not exactly like it should, so I am continuing. My other two choices (Awkward Justice from Tales of the Abyss and Rick Roll by Rick Astley) didnt work it was quite unfortunate really, but such is hacking. :P

Now time to get it to Fire Emblem. Nub approach: cant we just copy the song from song.gba, the game we just played, into our game? My approach: Lets just copy the song from the test game into our game!

Hey, something IS simple! Sorta. Lets get down to it.

Part 6: Making Your MIDI Repeat and Transferring it to Your ROM Sigh, this tutorial is getting really long. And my hands are tired. Yeah. Not cool. Also, Im making more and more redundant comments like these. Get your hex editor out, open up your Fire Emblem ROM as well as song.gba. Back-up your ROM, btw. Go to 0x1B3BB8 in song.gba this is where your first track starts. Now copy everything from here to the end of the ROM. Youve just copied all of the music data as well as the songs header. Thats all you need to know for now. :P Now Im going to make use of a new method of doing the repeats in the game. What you have to do is paste all that data you just copied into a blank file. Using HxD, just press Ctrl+N or File->New and a new tab will come up. Go to that an press Ctrl+V to paste all of your song data. Bam. Now heres how this works. The command to end a track is B1. The repeat command is B2 *pointer*. For whatever reason, tr.exe doesnt add a repeat to the tracks, so you have to do it yourself. My easy way is to just use a find and replace feature. Press Ctrl+R in HxD, or if youre using some other hex editor, find the option to do a find and replace. In the find menu, type in B1 (hex) and in the replace area type in B2 00000000 B1 000000without the spaces. It should look identical to this.

With that done, press OK. If you selected Prompt on Replace it will ask whether you want to replace each instance of B1. In most cases you want to replace every one, but SOMETIMES there will be a B1 byte that isnt actually the B1 we want to replace. If that doesnt make any sense, sometimes there will be a ninja B1, but we DONT want to replace those, because they are ninja. The way to make sure that you dont replace a wrong byte is look at the B1 thing and check to make sure that after the B1 is a BC byte. Thisll make more sense with a picture.

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 youre finished youre good to go. What youve just done is preformatted the song to have repeats. You added in the code, so now you have to insert the MIDI into your ROM and then fix up ALL the pointers. Fun. As I just said, we need to put the MIDI in your Fire Emblem ROM. Copy all the MIDI data (the one that you just did a find-and-replace function on). Well need a bunch of free space for this song. Im going to paste at some offset farther into the game that isnt being used at all. Make sure wherever you paste your edited song/MIDI IS NOT BEING USED and there is plenty of free space around it, just to be safe. For your info (in case you didnt know), it is best to insert at offsets that end in 00. Like 0x1200000 is easier to remember than 0x10849C4, although both will work. I just expanded my ROM further and am inserting it at 0x11E4000. Thats an easy to remember offset. Because offsets are always important, I am going to write it down. You should be writing down all these offsets in something like a notepad file yourselfdo it or youll suffer consequences later on. Now, once you paste it, go to the end of wherever your pasted data is my hex editor (HxD) automatically takes me there. By the way, you should paste write, not paste insert. Paste insert = Ctrl + V and it adds the data in the middle of the game, which messes up pointers. Ctrl + B overwrites the free space you have and doesnt mess up pointers.

Once youre at the end of your song data, you should see to the right (in the ASCII text part) the name of your file, something like awesome.mid with awesome being the name of your song If you see that, you are in the right area. Congratulations.

Boxed in dark red is the text. On the right you can see the name of my MIDI and on the left you can see the hex for that text. 4 bytes before the text is what I consider a garbage pointer. Thats all you need to know, its garbage. Like all garbage, you get rid of it. The name of the MIDI is garbage too, so just 00 all that out. Your end product should be something as beautiful as this.

With that, on to the next part!

Part 7: Track Pointers & Repointing

This is the final part of your MIDI, which is ironically called the header. The part in the dark red box, the first 4 bytes, are 06 00 0A 00 in this example. 0x06 is the # of tracks I have in my song. My song DOES have 6 tracks. After that is a pointer to the Instrument Maps, also known as Voice Groups, although instrument map is a much better term in my opinion. My patch inserts instrument maps at 0x11AE42C. In pointer form, that is 2C E4 1A 09. If you notice, the only difference between the current pointer and what the new pointer should be is the 09, so change that. Once you do, you will have set up your instruments for the

song. Simple as that. Not only this, but any of the songs that are inserted with this method will use the exact same instrument map, so theres no hassle. :D After that, in the purple box, are the pointers to the tracks. Right now they still point to our old tracks, eww. A pointer is 4 bytes and if you notice there are 6 sets of 4 bytes up in that data I posted, or 6 pointers. 6 pointers for 6 tracks. Your song will probably be different. It might have 10 pointers or 3 pointers and the pointers wont all be the same as mine. Anyway, first we need to add in the repeat pointers. If you remember we added the B2 code to the song for every track earlier on. What we were doing was adding the repeat code, 0xB2, and space for us to put in a pointer. The pointer points back to the beginning of the track so that the track just plays over again and over again, and over again. :P Go to the offset where you put your data. For example I put my data at 0x11E4000. From now on, write down offsets, because it is very important to for you to repoint stuff. Do a search for the hex 0xB2 and youll get to the end of your track.

Now the beginning of this track is at 0x11E4000 for me. You just wrote this offset down, itll be something different for you, depending on where you put your song. In pointer form that is 00 40 1E 09. About turning offsets into pointers: Break up the offset into parts: AB + CD + EF + GH = GH + EF + CD + (AB+8) So 0x00123456 would turn into 56 34 12 08 And 01 1E 40 00 becomes 00 40 1E 01, but you add an 08 to the last byte making it 00 40 1E 09. Bam.

Now type that in where the 00s are between the B2 and B1. Like so.

Now that youve done that, there will be a BC byte soon after that. BC is the first byte of a track. I could load you with lots of more information, but this is confusing enough as it is, so if youre looking for documentation on how track data is made up, look at the end of this tutorial. Anyway, we want to know where the beginning of the next track is so that we can tell the game where to repeat to. So find out the offset of the next tracklook for the magical BC.

At the bottom left of HxD it tells you the offset of wherever you are. So that byte is at 11E4902. Yes, great. Im going to write that down, then do a search for B2 again. Then Im going to take that offset, put it into pointer form (02 49 1E 09) and then place it in the middle of the repeat code. Then Im going to find the next BC and start the process ALL over again, writing down the offsets each time, until I get to the final repeat code. And, stinks for you, but youre going to have to do this too, and the more tracks you have, the more frustrating and tedious it gets. Eventually you should see your track header again, you know, the 06 00 0A 00 bytes, where 06 is the number of tracks in your song. Once you see that, you know youve finished doing the repeating for all the tracks. Congratulations, now you have to repoint the entire track header. Take all those offsets of the track headers and repoint the tracks.

Remember a pointer is 4 bytes. There are 24 bytes there so if each pointer is 4 bytes then that means there are 6 pointers, because my song has 6 tracks. If your song has 10 tracks, that means you have to replace 10 pointers with the 10 offsets of the beginning of each track. Great. Do that and save your game/ROM so you dont lose all your work. Hahah. Part 8: Finale- Assembling Your Song & Profit This differs for each game. Use the Music List for each game (comes with Nightmare Modules) to find out which song you want to be replace. You can also replace a blank song. Now, take the hex of that song and note it down. I am going to replace song 0x7A in Fire Emblem 7, which is a Nothing song. But its OK. :D Now you need to find out where in the pointer table that song is. You can optionally use Sappy 2005 to load up your game, find the song, and then look at Sappy to find the offset of it.

Table is where the pointer to the header is. That offset there, circled in red, is what we want. Header (blue) is the offset of the song header. We just made thatit includes pointers to all the tracks, tells the game how many tracks, and where the instrument map is. Voices (green) is the offset of the instrument map. My patch makes a universal version and the offset of it is 0x11AE42C. Thats also in the song header, and weve already repointed that too. Just a little bit more! Go to the Table offset with Sappy. If you dont have Sappy, follow the directions below 1. For FE7, go to 0x69D6E0. For FE6, go to 0x3994D8. For FE8, go to 0x224470. For any other game, youll need to use Sappy to find out where the Song Table is. 2. Take your song # (mine is 0x7Ayours is whatever you got from the Nightmare Modules Music List) and multiply it by 8. Use Microsoft Calculator or something (make it Scientific and then select hexit can multiply hex, thats right). You could probably find some calculator online too. Then take that

number and add it to the song table offset. So for me, 0x7A times 8 = 0x3D0. 0x3D0 + 0x69D6E0 = 0x69DAB0. That is the offset of my song. Alternatively, for Fire Emblem 7, I made a Music Array Editor which can help you edit any of the songs up to a certain point, but its limited due to an incomplete music list and its only for FE7.

Whats highlighted is my songs info. The final bit. The pointer is a pointer to the songs header. Mine is at 0x11EC900. Good luck if you didnt write it down like a good person. 0x11EC900 = 00 C9 1E 09, so I type that in. The next 4 bytes, which are currently just 00000000, have to do with priority. 00 = Top Priority, 01 = Map Song Priority, and I had others noted down but pretty much the higher the # gets the lower priority it has. Sound effects have a high priority of 6-8 generally, while backgrounds music generally has 0-1, misc. music has 2-3, and yeah You should be able to figure things out. Most of the time youll just need to use 00 or 01 anyway. 01 00 01 00 is necessary for map songs to work correctly, or else when a unit goes into battle the map music will stop playing. Just letting you guys know about that. My final result is:

As usual, red is the edited stuff. I save, and then I test. You can test using Sappy v1.6 or just go straight into Visual Boy Advance. Obviously you need to make your song play in game, which means you have to somehow load it, whatever that way is. If youre replacing something like the title theme, then thats really easy to test, because you just load up the game and bam. If youre replacing a song that currently wasnt used, its up to you to test that song out.

Part 9: Possible Errors & Wrap-UP

Hopefully your song works. If it doesnt, error could be Number of tracks Song wasnt converted properly (programs fault) Faulty pointers (very very likely, double check pointers, check for 08/09 for the last byte) Messed up data Overwrote some important data Edited the wrong pointer (rather than messing it up) You inserted some data somewhere, thus shifting everything, making pointers go wrong Some sort of pointer error >_> The song simply doesnt want to play? You arent playing the right song in-game, you think youre playing the edited song but you really arent I dunno dude. Leave me alone. This tutorial is 4,900+ words and 19 pages. IM FREAKIN TIRED.

Once you do a couple, you can make up your own tricks to make it go faster, and youll know how it all works, making things go a LOT faster. I can probably insert a 5 track song in 30 minutes, a 10 track song in like an hour and a half (yeah # of tracks can totally make things harder). And I havent done a ton of insertions either. A little bit of practice and youll make every minute of music insertion worth it. Update: I recently inserted like, a 6 track song in 10 minutes, so it just takes some practice and then things like repointing and knowing what to do will come REALLY easy. ^_^ Part 10: Documentation and Stuff Commands: BC PP BD II BE VV These are commands that set stuff. There are other commands too but I wont get into it. The first is BC PP where PP = octave. 0x00 is default while adding or subtracting 0x0C will get you lower and higher octaves, for example, 0x0C or 0xF4.

BD II sets the instrument. The conversion already does this for you but if you want to change it you can do so manually. The instrument is the one labeled in Anvil Studio[you] take that # and then subtract one, then convert the number from decimal to hex. Wala, you have your instrument. BE VV sets the volume, IIRC. VV is a # between 0-127, except in hex. You shouldnt need to change this but if you want to, its available to you, and its better than having to edit the MIDI with anvil studio and then reinsert everything, IMO, assuming you dont have to make massive changes to the tracks. B0 = Rest B1 = End Son B2 = Repeat Some more commands for you to know*. *(I am calling them commands, even if the name sometimes doesnt make sense)

Atrius Notes:
The audio track data is a list of commands and arguments for playing music/sound effects. Anything below 0x80 is an argument, and anything 0x80 and above is a command. 0x80 - 0xB0 = Rest commands of varying lengths, to wait a certain amount of time before playing each note. 0xB1 = Stop command, to signal the end of the audio track. From what I've noticed even if a song loops it has one of these after the loop command. 0xB2 = Jump command, to jump the playback pointer to another location in memory. Often used to loop songs by jumping back to the beginning of it. 0xB3 = Jump command where playback can jump back to after it again later. Used when you want to repeat part of a song before continuing with the rest of it. 0xB4 = Return to last 0xB3 command. 0xB5-0xBA = Unidentified 0xBB = Set Tempo

0xBC = Set Pitch offset 0xBD = Set instrument 0xBE = Set Volume 0xBF = Set Panning 0xC0 - 0xCE = Unidentified 0xCF - 0xFF = Play notes of varying lengths.

So to break apart the track information I gave you: BE FF BC 00 BB 01 BD 00-CF 3C 7F B0 B1 BE FF = A volume command with an argument of 0xFF (Volume is an odd exception to the rule that arguments must be less than 0x80) BC 00 = Set the pitch offset to zero BB 01 = Very low tempo so that the note is drawn out long enough for voice samples to play their full length. BD 00 = Set the instrument to the first entry in the instrument map. CF 3C 7F = Play a note with a pitch of 0x3C (Right in the middle of the available range), and a volume of 0x7F (The maximum available) B0 = Wait long enough for the note to finish playing B1 = End the audio track

Charons Notes:
Pitch Pitch is very easy to understand. As Atrius noted, it is follows the byte 0xBC (which is usually the first byte in a given track anyhow). Pitch works like this: 0x00 is the base, equivalent to Middle C.

0x0C is one octave higher; High C. 0xF4 is one octave lower; Low C. If you haven't noticed, it goes by increments of 0x0C, so for higher increments, they would be 0x18, 0x24, ect, while for lower increments they would be 0xE8, 0xDC, ect. Tracks can be transposed by any value, however, so if you wanted it to be in a different key, you could change these values. If done, make sure to add/subtract 0x0C when raising/lowering octaves. Tempo Tempo is simply the tempo transfered into Hex. So, if your original tempo was 80, you would put in 0x50. It follows a 0xBB byte. Instruments The instruments correspond with the instruments of the voicegroup. Although the instruments can be anything you want, the typical way is to have the instruments correspond directly. It follows a 0xBD The direct map: PIANO 0x00 Acoustic Grand (often used as a drum kit) 0x01 Bright Acoustic 0x02 Electric Grand 0x03 Honky-Tonk 0x04 Electric Piano 1 0x05 Electric Piano 2 0x06 Harpsichord 0x07 Clav CHROMATIC PERCUSSION 0x08 Celesta 0x09 Glockenspiel 0x0A Music Box 0x0B Vibraphone 0x0C Marimba 0x0D Xylophone 0x0E Tubular Bells 0x0F Dulcimer ORGAN 0x10 Drawbar Organ 0x11 Percussive Organ 0x12 Rock Organ 0x13 Church Organ

0x14 Reed Organ 0x15 Accoridan 0x16 Harmonica 0x17 Tango Accordian GUITAR 0x18 Acoustic Guitar(nylon) 0x19 Acoustic Guitar(steel) 0x1A Electric Guitar(jazz) 0x1B Electric Guitar(clean) 0x1C Electric Guitar(muted) 0x1D Overdriven Guitar 0x1E Distortion Guitar 0x1F Guitar Harmonics BASS 0x20 Acoustic Bass 0x21 Electric Bass(finger) 0x22 Electric Bass(pick) 0x23 Fretless Bass 0x24 Slap Bass 1 0x25 Slap Bass 2 0x26 Synth Bass 1 0x27 Synth Bass 2 STRINGS 0x28 Violin 0x29 Viola 0x2A Cello 0x2B Contrabass 0x2C Tremolo Strings 0x2D Pizzicato Strings 0x2E Orchestral Strings 0x2F Timpani ENSEMBLE 0x30 String Ensemble 1 0x31 String Ensemble 2 0x32 SynthStrings 1 0x33 SynthStrings 2 0x34 Choir Aahs 0x35 Voice Oohs 0x36 Synth Voice 0x37 Orchestra Hit BRASS

0x38 Trumpet 0x39 Trombone 0x3A Tuba 0x3B Muted Trumpet 0x3C French Horn 0x3D Brass Section 0x3E SynthBrass 1 0x3F SynthBrass 2 REED 0x40 Soprano Sax 0x41 Alto Sax 0x42 Tenor Sax 0x43 Baritone Sax 0x44 Oboe 0x45 English Horn 0x46 Bassoon 0x47 Clarinet PIPE 0x48 Piccolo 0x49 Flute 0x4A Recorder 0x4B Pan Flute 0x4C Blown Bottle 0x4D Shakuhachi 0x4E Whistle 0x4F Ocarina SYNTH LEAD 0x50 Lead 1 (square) 0x51 Lead 2 (sawtooth) 0x52 Lead 3 (calliope) 0x53 Lead 4 (chiff) 0x54 Lead 5 (charang) 0x55 Lead 6 (voice) 0x56 Lead 7 (fifths) 0x57 Lead 8 (bass+lead) SYNTH PAD 0x58 Pad 1 (new age) 0x59 Pad 2 (warm) 0x5A Pad 3 (polysynth) 0x5B Pad 4 (choir) 0x5C Pad 5 (bowed) 0x5D Pad 6 (metallic)

0x5E Pad 7 (halo) 0x5F Pad 8 (sweep) SYNTH EFFECTS 0x60 FX 1 (rain) 0x61 FX 2 (soundtrack) 0x62 FX 3 (crystal) 0x63 FX 4 (atmosphere) 0x64 FX 5 (brightness) 0x65 FX 6 (goblins) 0x66 FX 7 (echoes) 0x67 FX 8 (sci-fi) ETHNIC 0x68 Sitar 0x69 Banjo 0x6A Shamisen 0x6B Koto 0x6C Kalimba 0x6D Bagpipe 0x6E Fiddle 0x6F Shanai PERCUSSIVE 0x70 Tinkle Bell 0x71 Agogo 0x72 Steel Drums 0x73 Woodblock 0x74 Taiko Drum 0x75 Melodic Tom 0x76 Synth Drum 0x77 Reverse Cymbal SOUND EFFECTS 0x78 Guitar Fret Noise 0x79 Breath Noise 0x7A Seashore 0x7B Bird Tweet 0x7C Telephone Ring 0x7D Helicopter 0x7E Applause 0x7F Gunshot (also commonly used as a drum kit)

Volume Volume is a simple concept as well, but unlike most of the song arguments, it must be a value

less than 0x80, or else (for some whacked out reason) it acts as a rest o.o It follows 0xBE. Panning I need to investigate panning a little more, but I do believe that 0x00 is the neutral value. Either that, or it's 0x0C. I believe that pan's range is from 0x00 to 0x0F; Atrius, correct me if I'm wrong. Also, about 0xB1 - if your track doesn't end in it, it will cause the game to crash and make that horrible noise some of us know too well o-o
Part 11: The Music Hacking Run-Down (Shorter Version of Tutorial & Walls of Text) Lets say youve already hacked music before but you forgot how it works. Perhaps you just want to know the general idea of how to hack music or the general layout of GBA games music, whether that game be Fire Emblem (which is the focus of this tutorial) or not. This is the section for you. It wont go into huge detail but itll still give directions and whatnot. First you have to download all the programs related to music hacking. Once youve unzipped them and everything, take your MIDI and load it in Anvil Studio. What were going to do here is have the MIDI formatted so it can be properly inserted. To start, we dont want the song to repeat inside of the MIDI, because were going to have the game repeat the song for us. If the MIDI repeats within itself then were just consuming space. Use Anvil Studio to truncate the song such that it only plays once. Next we have to get rid of all unnecessary tracks to minimize tracks. I dont recommend inserting a song with more than 14 tracks. Ive done 14 tracks but on occasion I actually have problems with them. Its best to limit a MIDI to 10 tracks or under if you can, just to be safe. Delete any tracks without any notes (Anvil Studio will have some red text at the top left letting you know) and delete any tracks that are already muted. If you still have too many tracks, look for some redundant tracks that only have a few notes or have minor instruments that you can live without. After optimizing the number of tracks you will need to equalize your tracks lengths. Making sure that you go to View-> Composer, select a track, go all the way to the end of it, and make sure that the track length and the song length match exactly. If it doesnt, insert rests until the track length matches the song length. Make sure you dont add so many rests to the track that it makes the song longer. If you make the song longer itll mess up the other tracks and itll also be adding rests to the end of the song, so when your song repeats, it will have a pause in between the repeat, and thus sound bad. That being said, optimize the song to be repeated properly with equal track lengthswith all tracks. You can now save your MIDI (I recommend to use the Save as option in Anvil Studio to make a separate copy with the new edited MIDI). Go to where you saved the MIDI and drag it into the midi

folder inside of MIDI2GBA, making sure that the MIDI you are going to insert is the ONLY file inside of that folder. Double-click tr.exe in the MIDI2GBA folder and hit the ?? button. Click OK and then look in the two columns. If your song is on the left side, the program and MIDI worked fine well, they should have, anyway. If its on the right side, something is up with the MIDI, in which case please refer to part 5 of the tutorial. If you have not already applied the instrument patch for FE6/FE7, please do so. If there is no instrument patch for your game, what you can do is just apply the patch to a clean FE6/FE7 game anyway and copy the new data in the expanded section of the game (0x1000000 to the end of the game) and copy it to whatever game you are hacking. If you dont get what I mean by this, then oh well, this tutorial is optimized for Fire Emblem hacking, but as usual I just keep FE8 out of the mix. Anyway, the patch aside, load the ROM song.gba (located in the MIDI2GBA folder) into Visual Boy Advance or your GBA emulator of choice (VBA is the best GBA emulator though). Press A or your keyboard alternative which will make the ROM play your inserted song. Make sure it plays nicely and whatnot. Then close the ROM. Youve now heard your song play in a GBA ROM, so hopefully thats motivation to continue this music insertion process. Load your ROM (for example, your hacked Fire Emblem 7 ROM) and song.gba in a hex editor. I most definitely recommend using HxD because it has all of the features needed and thats what I use. Copy all the data from 0x1B3BB8 to the end of the game into a new, blank file. Use a find and replace function to find B1 and replace it with B2 00 00 00 00 B1 00 00 00. Do that to all instances you should find as many B1 bytes as you have tracks. Once youre done with the find and replace function go to the end of the ROM and delete the ASCII text that has the name of your MIDI. Also delete the 4 bytes before the text as they are part of a stupid pointer that you dont need. Now copy the data in this file youve just done some stuff with and paste write (for HxD, use Ctrl+B, NOT Ctrl+V, Ctrl+V will INSERT data and possibly mess up your ROM) your data into a lot of clear, open space in your FE7 ROM. Make sure there is plenty of space just to be safe. You will need enough space for all of the data you are pasting so just look at HxD to find out how much space that exactly is. Now go to the beginning of where you pasted your data and write that offset down. In fact, write every relevant offset down from now on. You will need it. I recommend just opening a notepad and typing important offsets. Do a search for 0xB2. Youll find the data B2 00 00 00 00 B1 00 00 00. The first 4 00s are where your pointer will go. They point to the beginning of the track. This data here is the repeat code and for the track to repeat you need to tell it to play itself over from the beginning of the song. So the pointer should go to the beginning of the song, which I told you to write down the offset. Put it into pointer form (little endian, noting that offsets have an 08 at the beginning of them, such that the offset 005C3984 will become 08 5C 39 84 which will finally be 84 39 5C 08) and enter it into that space of 4 00s. Now right after the B1 00 00 00 should be a BC byte. This is the beginning of the NEXT track. Write down the offset that the BC byte/write the offset of the beginning of the track. Do another search for B2 and do the same thing you just did with the pointer. Repeat this for every track until you end up

noticing that there is no BC byte for the next track because youve added the repeat code for every track. After the final B1 00 00 00 part youll end up at the header (TT 00 0A 00 where TT is the number of tracks your song has, in hex). After the first 4 bytes is a pointer to the instrument map. My patch inserts it such that all you have to do is turn the 08 in that pointer to a 09. All the other pointers in the songs header are pointers to the tracks. Assuming you listened to me and wrote down all the offsets of the tracks, you can now take those offsets and type them in pointer form, one after another, until youve replaced all the old track pointers with the new track pointers. Save your ROM and go to your songs song table. You can use Sappy 2005 to find this or look at the full-length tutorial for specific offsets for Fire Emblem games. Alternatively there is also an FE7 Music Array Editor which lets you edit the pointers and priority of songs in the song table/array. Youll now need to find which song youre going to replace. Lets say youre replacing song 0x4C, whatever that is. Thats great. Each entry is 0x08 bytesat least it is in Fire Emblem games, Im not sure about other gamesso multiple 0x4C by 0x08. Add this to the offset of the music array (for example, FE7s music array is at 0x69D6E0). Go to that offset and replace the pointer here with a pointer to your new songs header. Change the priority accordingly noting that 00000000 is for background music, 000100001 is for map music, and lower numbers are for various things, see the full-length tutorial for more details. XP. Youve now done a lot of stuff. Lets think it over weve formatted the song, got it converted to GBA format, added repeats, made an appropriate song header, made sure that the song has appropriate instruments (itll use standard MIDI instruments) and told the game where the song is as well as what priority it has. All we have to do now is make the game use that song. Thats up to youif youre replacing something like the title theme then thats not a problem because the song already plays in game. If youre replacing some random song or an unused song then youll have to make the game use that song yourself which is up to you. For Fire Emblem I suggest using the Chapter Data Editor, Sound Room Editor, or Boss Music Editor to get your song to play in-game if it doesnt already. Hopefully it sounds nice and well. If you need more help or if the song had some issues, please see the full-length tutorial (parts 1-9). This is mainly to give the general idea without completely explaining anything, dividing into parts, etc.

Part 12: Credits & Thanks My last part, I would appreciate credits and thanks for this tutorial. I sacrificed a ton of time creating this and learning how music works and stuff. Im not trying to complain butaAll I ask is that if you use it, you put my name (Blazer) and Charon the Ferryman somewhere obvious, like in the credits. Thanks for your understanding I hope this guide helped you. Special Thanks To:

Atrius Lots of information about music editing, helped me insert WAVs (which is NOT explained here) Charon the Ferryman her tutorial on music editing helped and inspired me to make my own tutorial. She also gave me some one-on-one help with how to hack music and I took her method and just expanded on it and stuff like that.

Chapter 25: Music Editing with Zahlmans Song Editor First of all, you need to download Zahlmans song editor to do this. I suggest going to this topichttp://www.feuniverse.net/forums/index.php?showtopic=7874&st=0 Next, download and install Python. Its necessary. Once thats done, extract the files from the download. Read the README and transcript just to give some background. Who knows if itll actually help, but it wouldnt be included if it wasnt meant to be read, right? XP Now, double-click cli.py, and some stuffll happen. Mainly a screen will come up with a disclaimer and a comment saying that if you need help you should press help.

If you actually do type in help and press enter on your keyboard, itll give you a list of commands, and tell you some stuff. Heres the important stuff:

Commands are not case sensitive. Filenames, probably yeah, just stick with doing proper capitalization always, to limit the chance for problems. Decimal doesnt have a prefix, while hexadecimal (AKA hex) has the 0x prefix. We know this already (if you dont, then this might be hard for you). Dont include extensions or quotes with filenames You can use relative paths or absolute paths. To make things easy, when the program needs to access a file, make sure the file is in the same folder as the program. That way you just type the file nameno fuss, no mess. (some other stuff you can read if you want toisnt completely necessary to know when using the program, but a good read anyway)

Now, onto actually using the program. To start, you should know how to find more information on a command. Simply type help commandname. So for example, to find out how the open command works, type help open. The open command is the easiest. Just type open nameofrom. So if my game is called fireemblem8.gba Id type open fireemblem8. Itll say Loaded ROM from disk. Now, what to do with this ROM Well, lets say I want to extract a song from this game and put it into Fire Emblem 7. First we need to know where the song is in Fire Emblem 8. This is where Sappy can actually be useful. You can have it locate the song table for you and grab the offset from it. That being said, open Sappy 2005 and then load the ROM you want to export from. Itll (hopefully) find the song table of the game you are trying to hackif it doesnt, then something tells me the game doesnt use the Sappy engine, so you cant hack its music with these methods. On the left itll say the offset of the song table. For FE8, the song table is at 0x224470. Now, in the FE8 nightmare modules is a music list. This will actually prove very useful because it tells us which song is which. One day I was feeling nice and I uploaded this song list here, for your referencehttp://www.feshrine.net/hacking/downloads/fe8_music_list.txt Lets rip Truth, Despair, and Hope (TDH for short) because its an awesome song. Its song 0x0D. Since each entry in the song table is 8 bytes, we need to do (0x0D x 0x08) + 0x224470 to find where the pointer to the song is. We can use Microsoft calculator or an online hexadecimal calculator to do this.

If you dont see options for hex in MS Calculator, set your view to scientific (View-> Scientific). Then hit hex at the top left.

D x 8 = 68, according to MS Calc. + 224470 (the program knows it is hex because it is in hex mode, so no need to put 0x in MS Calc) is 2244D8. So well go to 0x2244D8 in a hex editor.

I see 5C 2A 55 08. Thats a pointer. It has little endian, i.e. byte reversal, so lets flip it and we get 08552A5C. Take off the 08 (only the game needs to know about the 08) and we have 0x552A5C. Finally, we have the offset we need.

Back to Zahlmans Song Editor. All weve done so far is open fireemblem8 to open our FE8 game (or in your case, whatever game youre using). Next well do rip 0x552A5C to rip the song we want.

Great! All 7 tracks were ripped. Lets consider ourselves lucky that the program supports those kind of tracks. Now we can do two things. We can A) save the data in a binary file or B) burn the data to another ROM. Lets save it and then burn it, for teaching matters. Type in save songname to save the data to a binary file. Since I just ripped TDH, this is what I did:

Now it says we can still burn it if we want. So lets do that. First, well open up the ROM we want to burn it to. Mine is called sc.gba so Ill do open sc. Then Im going to burn the song. I need two offsetsone offset where the pointer to the song will go, and another offset for where the song is going to be inserted to. I know I have some free space at 0xD40000, so thats solved. But how do I know which pointer to replace? I have to go to FE7 and do the same thing I did with FE8 to find a song. Well say I am trying to replace song 0x5A, which is the main theme. 0x5A x 8 + 0x69D6E0 (offset for FE7s song table) = 69D9B0. So that is where my pointer is going to go. So I have to type burn 0x69D9B0 0xD40000 to make it repoint the song at 0x69D9B0 to the new song I am importing to the offset 0xD40000.

Burning successful! Now I just have to save my game. WAIT, DONT USE THE SAVE COMMAND. Remember, the save command is to DUMP SONG DATA. Were trying to save our ROM. Do close romname. In this case, I just opened sc.gba, so I do close sc.

YESZ. Saved ROM to disk. Alright, Im going to go test my song out now. (*Tests*) It worked! Great! I know how to import a song!

But, wait, this song is cool and all, but I want some new music in my hack! I want to insert a MIDI! Well, here we go. Lets start all over againlets close and re-open Zahlmans Song Editor just to refresh ourselves. Before we continue, we need to apply a patch. This patch supplies us with basic MIDI instruments. You can find it here- http://www.feshrine.net/hacking/patches.html But wait, thing is, this inserts data at a place, and it may very well overwrite some of your data. This is why I suggest you dont apply this patch unless you have an unexpanded ROM, and if your ROM is expanded, that will be a problem, so this method will not work for you (D: D: D:). Assuming you can apply the patch (use NUPS and make sure to hit Notify on the left so that it bypasses the fact that the patch will most likely not match your file) we now have instruments to use so we can continue. Lets open our hack. open romname. Bam. Now, we need to convert a MIDI. help convert tells us we need an offset for the instrument map (my patch takes care of that) and the name of the MIDI. I am a very simple person (lol), and have called my MIDI cm for custom music. I will give you the offset for the instrument map (since it comes with my patch): 0x11AE42C. So we must now type convert 0x11AE42C cm. We can now save our data to a binary file and load it later, or we can just burn straight to the ROM. Im going to do the latter. Like before, we need to know which song to repoint. I am going to use the same song as before in FE7song 0x5A, the main theme. Im using this because I can test the main theme right after I load the game. I got the offset I needed already by doing 0x5A x 8 + 69D6E0 = 69D9B0. I have empty space at 0xD50000 so I will insert my song there. So I type burn 0x69D9B0 0xD50000. Now I save my ROM (close sc) and test.

I hope it works for you, because it sure did work for me. It wasnt perfect, but I didnt expect it to be perfect, since the program is still a work in progress, and the MIDI I used wasnt great either. The tutorial on how to do it is a bit long, but get the hang of it and its a 1-to-3 minute job. Enjoy your new song! ^_^

Chapter 26: Exporting Music with GBA2MIDI Theres another way to import music from other games besides Shadowofchaos very hard method and the ZSE (Zahlman Song Editor) method. You can use a program called GBA2MIDI to convert a song to a MIDI and then use my Elf Method tutorial to insert that MIDI. All I will do in this chapter is quickly teach you how to export a MIDI. First, you need your game. It has to use the Sappy engine or this wont work. You know that if you try and load your game and it doesnt load/the program crashes, it is most likely because your game does not use this music format. Its unfortunate, but it happens. Anyway, first download GBA2MIDI from my site. Extract the files and open it up. You should see the following-

First, lets load the ROM. Hit the at the top right to browse for the file and select it. Then, using the browse button right underneath it, choose a generic file that the MIDI will be exported to. No matter which song you choose, the MIDI will ALWAYS be called this. Keep this in mind. Your screen should look something like this (but perhaps with a different game).

Next, use the arrow keys next to OFS: to choose which song to play. If youre not sure which one to use, you can try convert (make sure you have Play at once checked) and listen to the song. To stop it, press the Play/Stop button. The same thing to play it again.

The list and help buttons probably wont be too useful to you. The list button can be used to supply your own offset for a song table to the program, but the program has its own way of locating the song table, so that shouldnt be necessary. We already know what every other button does except for the close button which simply closes the program. Now for the checkboxes: Play at once plays the song right after conversion. Output Instruments outputs the instruments used in the song as WAVs in a subfolder. Useful if you wanted to import the instruments, but its not very easy to do something like that manually, so if you want to import instruments from another game, youre going to need ZSE (no way to get everything in one package, huh?). Optimize for XG sort of alters the instruments used and stuff. Hard to explain what it changes, but you can hear the difference. It often times affects drums. Extract sequence data Im not too sure what this is, actually, nor am I too curious about it. Minimal conversion same as above. I dont know everything, lol. When you convert a song itll output as whatever you told it to output. I suggest renaming the exported MIDI and then you can use it for whatever you wantif youre a hacker, then that most likely means you will insert the MIDI into another game. Youd only really use this method if ZSE was not able to export the tracks because the tracks were unsupported. Otherwise, ZSE > GBA2MIDI. Thats it for this chapter. =D

Chapter 27: Battle Background Graphics Note: This chapter will only cover how to insert custom battle background graphics. It may help with some other types of graphics, but it will not cover other battle related graphics such as sprites or the battle template. To start, what are battle backgrounds? I gave this term to the backgrounds that you see while you are fightingnot the platforms but the image behind it. If you dont like these, then you can change them. Im not going to supply you with the graphics to change to, but I will tell you how the whole shebang works.

First, using Nightmare, load my Battle BG Editor. Skip over to the Desert one (0x08). There are 3 pointers, very much like the CG editor. Graphics are LZ77 compressed TSA is LZ77 compressed, unlike CGs Palettes are also compressed, unlike CGs

Oshi- everything is compressed. Well, thats actually not a problem. GBAGE can decompress said stuff. However, theres another trick to this. Compressed and uncompressed TSA work differently. When you look at an image with uncompressed TSA in GBAGE, youll notice that the whole image is flipped, and every 240x16 line is also flipped. Compressed TSA doesnt have this problem and works normally. With CGs, which use uncompressed TSA, either the re-used TSA or FEditor Advs custom TSA takes care of the weird image flipping. With battle backgrounds, you can just use my custom TSA and it should handle all 16 colored images. That being said, were going to need a 240x160 image for the background. The WHOLE image doesnt NEED to be apart of the backgroundyou can have just a background strip like the original games do-but whatever, your choice. An important note about your image; battle sprites feet are typically set to be 100 pixels down from the top of the image. This means that if you are using a background and removing platforms from the game (like I did with Tactics Universe, for those who have played) you have to make sure there is a place to stand 100 pixels down.

You can stink that image into MS Paint and see if you want, verily there is a place to stand 100 pixels down. Also, to format your image, you need a portion of the transparent color at the very bottom (the size of said transparent area is 240x8) and a pixel of the transparent color at

the very top-left which will become black (there IS a way to avoid having this pixel here, but its so insignificant that I am not going to give you TSA to do it). OK, we have a lot of things on our mind with all the information Ive given. What were going to do is take this formatted image, make it 16 colors, save it, import it as a bitmap with GBAGE, repoint the graphics, insert over the old palette, insert our own custom TSA to use with any 16colored image formatted like above, and then repoint the TSA. Then good thing is, once you insert the TSA once, all you have to do is repoint every custom battle background to use that TSA. That bad news is, youre stuck with 16 colors, because I dont feel like inventing a method to not be stuck with 16 colors. You can be mad at me, I dont care. https://dl.dropbox.com/u/8875056/hacking/downloads/BBG%20Standard%20TSA.map Theres my TSA/map data. Download it. Open it up in a hex editor like HxD.

Alright, cool stuff. Looks like a bunch of numbers going straight up from 00 and on, with some LZ77 compression in the mix. It pretty much is. Copy that and paste it into your ROM into some free space. Note the offset that you insert it at. In fact, write down all significant offsets from this point on. Youll find it quite useful. So Ill say I inserted mine at 0x1376100. Now we need to insert the palette and the image. To GBAGE!

Now, using the offsets given in the Battle BG nmm, lets load a background. I am using the desert one so the graphics are at 0x2F758C.

Dont worry about what you see in the graphics area. Its not going to look right until we load the palette and TSA. So do thatmy palette is at 0x2F83A8. Make SURE you select Compressed ROMpalette or else it wont work.

Now, to load the (original) TSA. 0x2F8454.

Make sure that Use TSA and Compressed are both checked. If thats done, your image should look like this, or look like whatever background you were trying to load:

If it doesnt, 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. Once thats done, its time to insert your formatted graphic. Hit Import a bitmap in the Image Control window. Time to put up some write options.

Hit browse to locate the formatted graphic you want to insert. Make sure that it A) has a transparent pixel at the very top-left, B) is 240x168, C) is 16 colors (use Usentis palette>requantize option to do that very quickly if you havent alreadyif the image has too many colors to start with, after you make it 16 colors it wont look good, see the CG tutorial for more info on this). Next to Graphics offset put in an offset to insert the graphics at (duh). Make sure there is plenty of freespace and always write down your offsets. Do the same thing for the palette-although you CAN just insert over the old palette, it doesnt hurt to repoint stuff anyway, and theres less room for error if you repoint data to freespace. Check all the boxes like I have.

Note how my palette is exactly 0x100 bytes BEFORE my graphics. So I left some space in between, even though my palette should only take up about 0x20 (32) bytes. (Each color is 2 bytes, and since the image is 16 colors, 16x2=32 bytes, which is 0x20 in hex. However theres compression and stuff so it doesnt actually take that many bytes) If you want to be REAL safe, you can leave 0x200 bytes between the graphics and palette, because palette data should never taken up more than 0x200 bytes. Anyway, hit OK and then hit OK to anything else. It should insert and look real weird because we havent loaded our TSA yet. Load your TSA (mine is at 0x1376100-I remember because I wrote down my offset :P) so I will do that.

Im going to save my changes so far (File->Save) and then see how my image looks so far:

Looks exactly like I thought it would look. No complaints from me! Now the final step-repointing. Reload Nightmare and the Battle BG editor (remember that we close programs after we move to another program to avoid overlapping changes and causing confuzltion) and go to whatever background you just inserted over. In my very case, the desert background (even though I inserted mountains). The graphics and palette should already be repointed thanks to GBAGE, so we just have to type in the TSA. Again, mine is at 0x1376100, so I type 0x9376100.

Enter/ctrl+s to save nightmare, exit out, test in VBA and it should work. Wooh! Now that we know how to do this, it should get a lot quicker (like most things). Lets keep it up =D. Chapter 28: Music Array Module The Music/Song Table/Array module helps 1) repoint music and 2) control the purpose of the music. If you open up said module with Nightmare, youll see a list of songs. Said list of songs gets cutoff after a while because the Music List you commonly see skips some of the entries. Thus my solution was to simply leave them unlabeled (unless somebody else wants to go back and label them). Anyway, aside from being able to repoint the song data with this module, you can change the priority. For most songs used in cutscenes, during battle, etc. its the highest one (0x00). For

map music, you want to set it to 0x01000100 (the 2nd option) because otherwise the song will stop playing after a battle. Whatll happen is itll play to start, but after you go into an animated battle, itll stop playing, and it wont start playing again unless you reset the music in the games options, suspend/resume, or wait until the next turn. Thats all there is to it, really. Chapter 29: Sound Room Editing There is a nightmare module that can edit the songs in the sound room. Open that up in Nightmare and well get started. This is going to be a very quick chapter. The song is which song plays in that entry. The song length is for when you use random mode and there is a sort of music player. It has a time limit of sorts to play the song, and it needs to know how long the song is. As mentioned, 0x3B is about 1 second. 0x3B = 59 in decimal. What we have to do is take how many seconds our song is (lets say its 74 seconds) and multiply it by 59. 74x59 = 4,366. In hex that is 110E (hint: Im not a genius, I just use a calc by Microsoft). If Im right about how this works, then thats what you put for the time. The ASM pointer is something used for the songs toward the endpossibly something to do with unlocking the songs without actually listening to them (IIRC they require some Mario bonus disk thing). Its nothing to worry about. The text pointer is just the index for the text. You can edit the song name in FEditor Adv by just typing in said text ID/pointer/index/whatever you want to call it. Chapter done! Chapter 30: Chapter Unit Editing with Nightmare There are two main ways to edit units. The first way is to use Nightmare. The second is using the Event Assembler. The latter is mainly for people who want to use custom events or want to add more units. Im going to cover the first way here in this chapter. To start, in unit data, you will find some empty slots. Dont edit thesethey are separators. The point of them is to separate different groups of units. Allies and enemies of normal/hard mode

are separated, as are event unitsunits that only appear in events (NPCs and the like)and reinforcement units (units that show up mid-chapter as opposed to the beginning). The character and class are obvious. The characters leader just specifies who is the boss/leader of that allegiance of units. Not really important. The starting level is kinda obvious too. Note that there are two options for each level/allegiance thoughthe 2nd one is the autolevel feature which adds stats based off of automatic levelups. Its mainly used for enemies so that a level 1 enemy doesnt have the same stats as a level 10 enemy, even if they use the same character data. The loading coordinates is where they start on the map. They will then move to the starting Xcoordinates. Sometimes this can just be the same, other times (during cutscenes) you may want to actually have them move to wherever they are gonna be stationed. Note that coordinates start from the top left (0,0) and X is to the right while Y is to the left. If you are using a custom map, it is sometimes useful to use Mappy to figure out which tile is what co-ordinate. There are only 4 spots for items, unfortunately. Its kinda obvious what to do here as well. AI is sort of tricky, if only a little. AI stands for Artificial Intelligence IIRC. There are 3 main AIs I use. 00000000 default attack anything. 00030900 attack anything within range. 03030920 attack only if a unit can be attacked without moving. The first is for main enemies, the second is for guarding enemies, and the third is for bosses who guard a gate or throne or something. There are also dropdown lists that have some other options though, so youre free to play around with those things. Notes on How the Game Loads Units: Once a unit is marked as an ally and you play as them for a chapter, their data is in the save data, so all you need to do to is load their character with their character #. Everything else is insignificant (allies dont use AI). However, if that unit is killed, thats a different thingyou have to reload their data again, from scratch. Battle preps work similarly, however, if a unit is killed OR their allegiance is changed, they will no longer be considered an ally and will not show up in battle preps. How many units are allowed in battle preps is dependent on how many characters you add. It doesnt matter which characters you add or where you add them because the player gets to choose which characters he/she wants to use in the battle as well as reposition them. However, if you put in 10

character slots, that means the player can only choose 10 characters, and the characters can only be at the spots that you designated with the starting co-ordinates. Also, units will NOT show up in battle preps unless they joined the chapter BEFORE. That means you cant just add a new unit to the unit data and expect them to show up in the battle preps. They have to A) be secretly loaded the chapter before at the end cutscene, so the game recognizes they are a part of the ally team, or B) loaded separately from the battle preps through events. This is important-just adding a new unit to the unit data when battle preps is on doesnt do anything. As said, if battle preps are off, thats different. Chapter unit editing in Nightmare can get tedious and may sometimes be limiting or confusing, but thats Nightmare and hacking in general for you. If you dont like it, learn how to use the Event Assembler! :P

Chapter 31: Death Quotes This will not teach how to edit death quote text. Death quote text works the same as other text (even though I havent actually taught how to edit text yet). This just edits the stuff in the Nightmare modules. Well start with death quote editor part 1. If Im right, this is Lyns mode death quotes. Character and chapter is obvious-use 0x43 for most characters unless they have a special death quote in a specific chapter (in which case specify the chapter, of course).

The pointer to the death event is a pointer to a very short event that usually just contains a text event. For example, if you go to CC0808 in a hex editor (for Lyns death quote, the first entry) youll see 0D000000 A8070000 09000000 0A000000 00000000.

The 0D part is the command for normal text. A807 is the text pointer, but reversed due to little endian, so its actually 7A8. This is what you go to in FEditor Adv to edit her death quote text. The 09 command clears the text and 0A ends the event. The 00s are just insignificant nullifiers for the most part (but dont edit them anyhow). The main part to worry about is the A8070000 since thats the text pointer/ID/reference (from now on Im calling it text ID for simplicitys sake) that you might want to change. The trigger ID is something that will take a bit of learning to understand. Its like a number that references an event. I call it an event ID. In this case, Lyns death quote has event ID 0x65 attached to it. This is important because when event 0x65 is triggered, the game over scene occurs. Yesif you want a game over scene after the death quote, just give the character a Trigger ID of 0x65. The Trigger ID can also be used in conjunction with other events though. You could set it to say, 0x0B, and then make an event that happens when 0x0B is triggered. So you could make it so that if you kill a unit, the chapter ends right after Just like a boss. Yes, bosses typically have a Trigger ID of 0x02 (although their data is in death quote editor part 2, for whatever reason). Similarly Trigger IDs 0x01 and 0x03 are also reserved, so its better not to touch 0x01-0x03 and

0x65. Managing them is kinda hard but its feasible. Ill cover more about this in the next chapter. Anyway, lets continue to part 2 of the death quote editors. This one is a bit better. Its the same except it gives us the option to just put a text ID instead of ALWAYS having to have an event. But still, there is an option for an event if you want (if not, its 00). The Trigger ID works the same (I will cover more about it in the next chapter). Chapter 32: Event IDs Well, my order is a bit messed up. Maybe I should be teaching things like how to edit text and portraits before going onto teaching event IDs. Maybe I should. Oh well. Before you read this part of the tutorial, please read the previous chapter on death quotes because it contains information on Trigger IDs, AKA Event IDs. ^With that out of the way event IDs come from various places. One place is scenic eventsthere are event IDs there that have many purposes. When we get to events, youll start seeing spots to put event IDs ALL over. Theres even codes that can trigger them on and off manually. One thing is that the event IDs are shared-meaning you shouldnt use the same one in a chapter, unless its 0x00. If an event has an event ID of 0x00, it can happen infinitely (unless something ELSE is stopping it from happening-like if you visit a village and the village gate is closed, you cant visit the village, regardless of whether the event ID is 0x00 or not). Thus events with 0x00 are like generic events and dont have any special properties to them. Event 0x01 is for somethingI think boss battle quotes. Event 0x02 is for death quotes, I believe. Event 0x03 is for the seize event. Event 0x65 is the game over event-if this is triggered, the game will go the game over screen. I would say almost anything after event 0x65 is a perma-event, meaning that the event ID remains in use after every chapter. Earlier event IDs, like 0x01-0x64, are not permanent. After the chapter is done, they get reset to not being triggered. Actually, I have a confession. Im not sure which events are permaevents and which are not-I only have a VERY vague idea. It shouldnt be a problem though, hopefully. Oh well. :\ So, back to where event IDs come from:

Scenic events Location events (villages, seize) Death quotes Battle quotes Triangle attack battle quotes (yes, even this)

These are all shared. Meaning if say, event 0x14 is triggered because of a battle quote, and an event with ID 0x14 is supposed to happen in a scenic event, it wont happen, because event 0x14 was already triggered (and the game is trying to avoid having the same event happen twice). Thus you have to manage which events you use and how you manipulate them. With this background, youre ready to step into events! Unfortunately, events are chapters ahead of us. D= Chapter 33: Battle Conversations
There are two types of battle conversations: specified and unspecified. Specified means it is between two specific characters, while an unspecified battle conversation can happen when one character fights with any character. Well start with the unspecified battle conversation module by Icy Toast. The character and chapter are obvious. Now depending on your version of this NMM, you may have Convo Text and Convo Bank, or just Convo Text Pointer. Regardless of where its broken up into two slots or not, its just the text pointer that is used. For information on trigger IDs, see the other topic. If you wanted a battle conversation to occur everytime you fight a unit, you could use 00. The default value for boss battle convos (assuming there arent any special properties) is 01. If you wanted an event to happen after a battle conversation, you could set it to something else and make an AFEV event happen when said event ID is triggered. Youll learn about after events (AFEV events) in the event chapters of this tutorial.

The specified battle conversation editor works similarly, except there are 2 characters, and the event ID is not 01. Its some other value that the game uses. Remember that event IDs for a chapter are shared between battle conversations and scenic events/the main events, so dont have two events with the same ID. The event data pointer can be used in place of a text pointer. Its really only used when theres special properties for a battle conversation-for example, if there is a different battle conversation for Hectors mode and Eliwoods mode of a chapter. Its just a pointer to an event-you have to either edit the event in hex or make an event with the EA, specify an exact location for that event, and then put the pointer to that event in the battle conversation Event Data Pointer slot. Its something you most likely wont use in your hack, so I wouldnt worry about it too much. Thats all there is to it. Another chapter down, w00t!

Chapter 34: Triangle Attacks Before I go on writing a tutorial, Im going to post some notes I have on triangle attacks. Notes on Triangle Attack: Character Editor Nightmare Module:

Ability 3, 0x20 is Triangle Attack. This is for Pegasus Knights. There is another triangle attack option, 0x40. I am almost certain this is leftover from FE6 as the armor knight triangle 'skill' is 0x40 in FE6. However, this triangle attack could probably be used for something else too. 0xC9F130 - Triangle Attack Convos Character, chapter (0x43=any), Text ID, Trigger ID (Info thanks to NL) Should be able to expand to allow more triangle attack convos, for say, alternate combinations of triangle attacks (like if there are 4 pegasus knights) or usage of the currently unused triangle attack skill (just add more convos, set the skills, and if the game already has the code there [just unused], then it should work). Triangle Attack Graphics- Start around image 495 (+ or - a few) in GBAGE 0x2E5CB8 - First Graphic Order: PegasusKnight (Lance) FalcoKnight (Lance) FalcoKnight (Sword) PegasusKnight (Lance) (2nd sheet) FalcoKnight (Lance) (2nd sheet) FalcoKnight (Sword) (2nd sheet) ArmorKnight (Standing) General (Spear) (Standing) General (Axe) (Standing) General (Handaxe) (Standing) ArmorKnight (Attack Motion) General (Spear) (Attack Motion) General (Axe) (Attack Motion) General (Handaxe) (Attack Motion) Pointer to ArmorKnight graphics at 0x6AAC8 in ASM This means that they are probably already coded into the game and leftover from FE6, but simply unused (most likely since there aren't 3 armor knights to do it with). This also means that it's likely that one can

use the Armor Knight triangle if they just set it up. Data continues right after the final graphics (i.e. there is more graphics right after the General handaxe graphics) meaning miscellaneous data (animation and whatever else) is probably both before and in the first megabyte's span of data. 0x2E58BC - compressed data right before graphics. Slight resemblance to TSA at first but then diverts from this and shows signs of graphical data (0xF0 0x01, which is in essence blank graphics). Idk if it has to do with anything. In any case the only way to tell how this works and what is relevant or not is through ASM. One could edit the existing graphics, triangle convos, who has the skills, and test the usage of the unused [once used as FE6's armor knight] triangle attack. For palettes, I believe that the palette of the surrounding characters is used... that is, use the battle reference module to get the palette of the Pegasus Knight sisters. I tested this and it loads fine and looks great. Farina's Palette- 0xFDA00C Fiora's Palette- 0xFDA07C Florina's Palette- 0xFDA0EC

Alright. Now that that is off my back, I can tell you how to make use of this information. To start, theres a module called the Triangle Attack Convo Editor or something like it. At least, there is such a module for Fire Emblem 7. Id like you to open that up in Nightmare. The character, chapter, and convo value/text pointer work as they always have. If you dont know how these work, I suggest learning about death quotes and battle conversations first. The trigger ID also works as it usually does. Theres a whole chapter on these, so I wont explain this either. Which means were almost done here. By default theres only room for 3 conversations. But what if you want more than 3 conversations? There could be many reasons for wanting more conversationsif theres another Pegasus Knight, if theres a special conversation for a chapter, or something else. Well, to do this, you have to expand the table. To expand it, you have to first move the data to empty space and then repoint it. The details? Ill cover them in a later chapter.

Now, how does the game know which characters have the triangle attack ability? The keyword is ability. Its in the character abilities. Load up Fiora in the character module and scroll down all the way to character ability 3. You should see 0x20 Triangle Attack. Bam. Theres also another set of triangle attacks with the value 0x40. I think this was originally the armor knight triangle attack, but when I tested it out myself with 3 FalcoKnights, it showed FalcoKnights, not Armor Knights, so maybe the game checks to see if there are 3 armor knights first. I really dont know, but the alternate triangle attack is there and ready to use. As for palettes, the palettes of the FalcoKnights that cut-in are from the other characters palettes err, that means that as long as the palettes of whoever is in the Triangle Attack are working palettes, they should work/look fine during a triangle attack. If youre really into graphic editing, you could try fiddling with the jumbled graphics that I noted in my notes (I gave offsets and some other information). However, its not very easy, nor is there a lot of freedom with it, so I wouldnt exactly suggest it. With this, have fun editing triangle attack conversations, making your own triangle attacks, etc.! Chapter 35-36: The Animation Modules & Repointing Tutorial In this chapter were going to quickly go over the modules in the Animation folder-at least, the modules we havent gone over yet. First, were going to start with the Animation Pointer Table Editor. Its a table for both reference and repointing that has relevant offsets for each animation. The header is just some text that I probably wouldnt edit. The mode divider is also something I wouldnt edit. Frame data can be edited but you have to know how and its not something thats really suggested or needed very often. I might cover the basics of how to do it. I wouldnt suggest editing anything there except maybe the palette. The palette is like, the generic class palette, for generic units. Yeah. :\ Next, the Item Animation Reference Pointer module. All it can possibly do for you is repoint two pointers to something else. Since it uses a dropdown, you are limited to only repointing it to one area. Since we dont want to be too limited in our hacking, Im going to teach you how to repoint it in a hex editor. Skip this if you dont care about expanding/repointing data, especially if you dont care about this data at all. All it does is repoint Spell Associations so that you can add more weapons to the list. Go to offset 0x052B24. If youre wondering how I figured this offset out, all I did was edit the Nightmare module (.nmm file) in a text editor and looked under the line that says the name of the module.

As said, this is sort of limiting. We can just go to that offset in a hex editor and repoint it to whatever we want.

If you dont know, pointer form in a hex editor is (0x08000000 + offset) reversed. The default offset to animation lists or whatever is 0x00C999C0. I add 0x08000000 so it becomes 0x08C999C0. Then I reverse the order of the bytes (a byte is like two digits). 0x08 C9 99 C0 becomes C0 99 C9 08. At that

offset I told you to go to, we see exactly those bytes. If we wanted to repoint it to some other blank space, wed take the offset of the blank space and reverse it like I just did, then just type it in. However, if you remember, the NMM has TWO pointers to repoint. Well, to find the other pointer, well just search for its bytes. So we do a search (typically ctrl+F) in our hex editor of C0 99 C9 08.

(Make sure to set the input/datatype to hexadecimal, not decimal, text, or something else.)

Alright, we found another instance. Thats the only other instance there is. So we repoint this one too. After that, were almost done. Now were going to copy the old data to the new area. Lets say our new area is at 0xD70500, just for teaching purposes. Were going to copy the data there where there is plenty of free space to be used. The point of free space is to add more things to a list or table. The purpose of repointing is like moving books to another room. You can only put so many books into a room before you get to the walls and you cant put anymore. So we just designate another room for all

the books. This room has PLENTY of space though, so we can add even more books. However, we cant have an infinite number of books, because the building has its limits as well. The equivalent: We can only put so many entries of data (in this case, item animation/spell animations) into one area before we run into other data. So we have to designate another area to use, and then move all of our old animations there. Then we can add our own item/spell animations there. Hopefully this is all starting to make sense. We did the designating (repointing), so now we have to move our stuff. Go to 0xC999C0 and copy all the data from there to 0xC9A1B0 (but dont include that last 0xFF byte).

Copy it (ctrl+C) and paste it into our new area. Per my example, I am putting it at 0xD70500. You know how to paste data, hopefully (make sure you are PASTING data, NOT inserting new data, if you insert new data itll shift over the offsets of other data and your ROM will get royally screwed). Now save your ROM in your hex editor. Were going to do one last thing. To make sure we dont have to edit data in hex, well edit our Nightmare Module to edit the data at our new offset. The repointing module is the one we were using before I said this has its limits, its lame. The actual data we are repointing is the item animations, AKA spell associations. So go to the spell association editor and make a copy of that .NMM file. Make a copy for your repointed table of data.

Call it something to remind you that its repointed. Now open it with a text editor (my NMMs are already set to open with a text editor-if yours dont, just double-click them, hit open with a specific program or something like that, and choose Notepad or your preferred text editor from the list of programs). It should look like this:

Were going to A) rename the module to remind us that it is repointed, B) change the offset from 0xC999C0 to 0xD70500/your equivalent offset, and C) change the # of entries from 127 to however many entries you want (I suggest 150 because you probably wont need anymore than that many, and if you do, good luck on actually making over 23 custom weapons and items). Heres my changes to show you what I did (you should be able to figure out what to change based off of my image and what I said).

Save it and youre ALMOST done, Im serious this time. Now you just have to open up your new module and youre ready to start editing. Youve learned how to repoint and expand data, as well as customize your own Nightmare Module for it! Congrats! Unfortunately, this chapter is not yet done. FE7 has one more animation module. A custom item animation list one. The module is just an outdated version of the Spell Association editor that was made to be at 0x9000000 instead of 0xC999C0. In other words, like the Item Animation Reference Pointer module, you probably wont make use of it anymore. (Still, you have to admit Pukachi was nice to make all these nightmare modules to help us out with our hacking. After all, she started most of the thing, some years ago before that, only a few people did FE hacking myself not included )

Chapter 37: Support Editing This is a tedious job, especially for a sole hacker to do, but sometimes it is worth it. Personally the Fire Emblem games that had legitimate supports (where the characters actually had personality and background) were some of the best. Anyway, if you have outdated modules, you may have Custom Support Pointer Editor and Support Pointer Editor modules. The former is used for expansion but its limiting, and thus trash. Well start with the Support Bonus Editor. It lists the affinity and the bonuses that said affinity gives. Attack and defense bonuses are stats while the others are percentage boosts. The support compatibility editor is a list of what supports a character has. A character can have a max of 7 supports, and to my knowledge, can have no more than 4 active supports at a time (supports that actually have reached at least level C and can be seen on the menu). The initial support count is the count towards getting the next level of supports. Some general values for supports are: 100 for C level 180 for B level 241 for A level

These arent exact/for sure. They are just general ranged if you want a set support. Otherwise, you can have it set at 0, or something higher. Two characters that already have some relationship with each other (like Eliwood and Hector) are more likely to support realistically, and thus have a higher initial support count. The support gain per turn is how much the support level grows for every turn they are next to each other. A higher the number the quicker it grows (although you dont see the effect of a support relationship growing until you have the next levels support conversation). To make use of these entries, there is a pointer in the character editor called the Supports Data Pointer. It points to a specific slot as opposed to a reference byte like 0x00 for Eliwood or 0x0A for Oswin. This actually makes it somewhat easier to make use of. :\ By the way, each entry is 0x18 bytes IIRC, meaning pointers will be 0x18 bytes apart. This information may or may not be useful to you. The Support Convo Availability Editor just specifies which conversation values (text pointers) there are for the C, B, and A level support conversations between two characters. By now you should know enough about hacking that I dont have to explain anything here.

Everything in the Endings Editor should be obvious so Im not going to even cover that. Thus, were done with learning about supports and endings! Chapter 38: Miscellaneous Nightmare Modules In this chapter Im going to quickly run through what some other nightmare modules do. FE6: Army Editor same thing as chapter unit editor, pretty much. Battle Screen Editor edits the layout of the battle screen. I myself dont really get how to use this, and thus am not covering it. Critical Bonus Editor edits the critical bonus. (Default: 15) Event References a module for the event table. It helps with knowing where event data is located as well as repointing. Level Cap Editor edits the level cap. (Default: 20) Promotion Level Editor edits the level at which a unit must be higher than to promote. (Default: 9, meaning level 10 or higher) Shop Event Editors edits the events for shops (location, shop pointer, shop type). Vendor/Armory Editors edits the contents of vendors and armories. FE7: Afas Drop Bonus Editor edits the bonuses given by Afas drops. AI Recruitment Editors edits info about AI recruitments, where an NPC or enemy unit moves to and talks to a character in order to be recruited. Clarine of FE6 and Xane of FE12 are just a couple examples. Battle Screen Editor edits the layout of the battle screen. I myself dont really get how to use this, and thus am not covering it. Beta Modules for editing the FE7 beta. Chest Editors edits the contents of chests. Critical Bonus Editor - edits the critical bonus. (Default: 15) Event Pointer Tables can edit the individual event pointer tables of chapters. Not very useful anymore. Event References - a module for the event table. It helps with knowing where event data is located as well as repointing. Level Cap Editor - edits the level cap. (Default: 20) Luck Cap Editors edits the luck cap. Comes in two parts. (Default: 30) Promotion Level Editor - edits the level at which a unit must be higher than to promote. (Default: 9, meaning level 10 or higher) Shop Editors edits the contents of shops. Seize Throne Editors edits the location of thrones that can be seized. Currently incomplete. S-Rank Bonus Editor edits the bonuses of S rank weapons. Vulnerary Editor edits the amount of HP restored by a vulnerary. (Default: 10)

World Map Event References A list of pointers for world map events, the one you see before a chapter actually starts. FE8: Battle Screen Editor edits the layout of the battle screen. I myself dont really get how to use this, and thus am not covering it. Chest Editors edits the contents of chests. Critical Bonus Editor - edits the critical bonus. (Default: 15) Event Table Editor same as the Event References editors for other games, just for FE8, and with a different name. Level Cap Editor - edits the level cap. (Default: 20) Palette Association Editors edits which palettes go with which characters and classes. Promotion Level Editor - edits the level at which a unit must be higher than to promote. (Default: 9, meaning level 10 or higher) Recruitment Editors edits recruitments. Reinforcement Editors edits unit reinforcements. Shop Editors edits the contents of shops. Summon Editors edits which classes can summon and what character/class is summoned. Vulnerary Editor edits the amount of HP restored by a vulnerary. You may be wondering hey, wait, we still havent done the Chapter Data Editor yet!. Thats because Im saving the best for last. Sort of. Something tells me the Chapter Data Editor is going to be a long chapter, so I am going to try and keep it as short as I can, but it has a lot of important information related to map and event editing and creation. All this, after something else. :P Chapter 39: Loading FEditor Advance What, Im dedicating a whole chapter just to loading FEditor Advance? Eh, its not that big a deal, I dedicated chapters to minor modules like the Arena Class Editor. Plus Ive seen so many topics on getting FEditor Advance to work that I feel I must make this chapter. Step-by-Step Tutorial: 1. Go to the Java website. http://www.java.com/en/download/manual.jsp 2. Download the program by clicking on it. If you are a Windows user, use the online download if you dont know what to do. There are instructions on how to download and install Java. For example, a windows user would look to the right where it says instructions and click there, getting them to this pagehttp://www.java.com/en/download/help/windows_manual_download.xml.

3. Save the file to your desktop or run it automatically. If it is saved, double-click and install. Wait, why am I typing this, the website gives instructions. 4. Once Java is installed, restart your computer. Just to be safe. There is no harm in restarting your computer, and I want this to be fool-proof. So do it. 5. http://www.java.com/en/download/installed.jsp Test your java. It should work. If it doesnt, reinstall while following the directions. 6. Download FEditor Adv. You can find a link to the topic on my website, or you can just google FEditor Adv and it should show up on Fire Emblem Universe, a bunch of crappy forums. 7. Extract the files. To do this, use 7zip. To download 7zip, go here- http://www.7-zip.org/. Note that 7zip files can also be extracted with winRAR. Once it is installed, right-click and hit extract here or something like that. 8. A folder should come up. I suggest you move this folder to wherever you keep your hacking stuff (as opposed to just lying about on the desktop; organization is key to a successful hack). 9. Open the FEditor Adv folder. 10. To run FEditor, you can either A) click the run file or B) go to the dist folder and double-click FEditor Adv.jar 11. It will ask you to open an FE ROM. Open up an English, U.S.A. release GBA Fire Emblem ROM of your choice. For FE6 (Sealed Sword/Binding Blade/Fuuin no Tsurigi) the ROM should be the Japanese ROM patched with the translation patch found on romhacking.net. Please do not ask me for ROMs, I will flame you. :D 12. If your ROM is edited, it will most likely give you an error message. Just hit OK or Yes or something. Congratulations. You have hopefully followed my overly specific directions and successfully loaded FEditor Adv. If you have not, I would check the following: Program, make sure to have the latest version *ironically, I am using an older version because FEditor Adv is not compatible with some of my older hack, and yet I am telling you to use the latest version at all costs* ROM, it should be the (U) version. Check the ROM# as well, and for FE6, use the RHDN patch, as said. The cleannessif youve made massive edits and most importantly edited something that the program uses to check which FE game it is, that could be a problem. Like the ROM header, for instance. IIRC FEditor Adv checks something in the header, so if youve edited that, it could very well be a problem. Your java. I can only hope you installed it right Your file extraction. If by somehow you extracted it wrong, the files could get corrupt, although the chance of this happening is very low, I think

If its still not working, then check yourself. No, really, I dont know what else to do. I cant write more than a page on how to load a program. Itd suck if you couldnt get it loaded, but plenty of people can, so its not the program, at the very least. Sorry if that happens to you. :\

With FEditor Adv loaded, we can now use all of its features! Huzzah! Chapter 40: Text Editing with FEditor Adv The reason why this chapter is called Text Editing with FEditor Adv and not just Text Editing is because there ARE other ways to edit text, but they are kind of inferior and obsolete. So much so that I am not even going to cover it in this tutorial, because there is no point in teaching old methods if the old methods are inferior in almost all ways. Anyway, open up FEditor Adv. The first thing I see is a Memory and Free Space Manager that I have no idea how to use. Sounds pretty bad, right? Well, Ive gotten along without it just fine Thats probably the only major thing you wont find in this tutorial, unless someone else submits a chapter on how to work it. Go to Tools-> Text Editor. Bam, text editor loaded. It should look like this:

It starts at text entry 1. It goes as far as text entry 133D. The input index is what text entry is being loaded at the moment. The max index is as far as it goes-you can change it if you want to, but you shouldnt have to change it unless your game is like 40 chapters long and text-heavy.

The find and replace boxes should be simple. You can find some text in the script or you can find AND replace some text in the scrip. Just type in the text and hit find, and hit find next to find every other occurrence after that (find previous obviously just goes back an instance). It works like a hex editor, except its a tex-t editor. Replace all replaces all occurrences of something. I dont know what the Use Reg ex? does. Its probably not too important. Now, actually editing text is easy. There are some control codes you should know and stuff but mainly its just loading portraits, typing text, and pauses. Ill get into the details later, but when you make changes to text, you have to hit apply-you have to do this after EVERY ENTRY, not after youre all done with text. Wait to press it, youll regret it. :P The revert button just undoes applying something. I think. The dump button dumps the script to a text file (and it asks you where to save it/what to call it). The insert is the opposite, it lets you insert a dump script. The idea is that you dump a script, edit it, and then re-insert it. And when youre done with the text editor, you press Quit. Now, about actually making text. You have to load portraits, and to do that, you use the following code: [LoadFace][0xPP][0xVV] 0xPP is the portrait value. You can find a portrait list in the folder with the character and class editor modules, and probably some other folders too. 0xVV is almost always 0x01, except for when youre in a village, house, or other type of scene. To have a portrait be the portrait of the current character in use, use [0xFF][0xFF]. So in a village youd just use that and whatever character is used to visit the village will show up with their portrait. However, theres one more aspect to loading Portraits. Positioning. There are various positions. You just put the positions right before the [LoadFace]. [OpenFarLeft] [OpenMidLeft] [OpenLeft] [OpenRight] [OpenMidRight] [OpenFarRight] [OpenFarFarLeft] [OpenFarFarRight] To move a portrait from one position to another, just change the Open to Move. So to move to the Far Right, youd do [MoveFarRight]. However, note that when a portrait moves, the way they are facing does not change, so you have to clear a portrait and then reload it to change position. To clear a

portrait, use the code [ClearFace]. [ClearFace] is also commonly used in special battle conversations; after every line one character says, their portrait is cleared, because during a battle there is only room for one person to be talking (lol). When typing your text, you cant just type straight through. After about a max of 30-35 text characters (it depends on how big the characters are), you should make a new line. 01234567890123456789012345 About that long. Thats actually only 26 numbers, but trust me here. However, sometimes if you do this youll have one line that has reached its max length and another line that only has one word. It looks odd, and so I suggest evening out the length when formatting text. Text text text text text text text text. Should become Text text text text text text text text. Its better for reading and professionality. Another thing that helps a lot with reading is pauses where you have to press the A button to continue the text. To make one of these blue-arrow pauses (a blue arrow appears in the corner when it happens), use [A]. This is best used every two lines, but once in a while you may make it 3 lines. The original game sometimes has pauses in the middle of sentences, which is kind of odd and unprofessional, but it means that if you dont care so much, use [A] every two lines and whoever plays your game shouldnt miss any text. [.] is a very quick pause. Sometimes youll see it randomly but its not randomjust dont worry about it. [..] is a slightly longer pause. [ToggleSmile] makes a character smile, [ToggleMouthMove] makes their mouth stop moving (used for ellipses), [Yes] asks a Yes/No question with Yes selected to start (No does the same but with No to start), [CloseEyes], [OpenEyes], and [HalfEyes] are obvious, and for all the other interesting codes, just look in FEditor Advs doc folder-there is a folder called Text Control Codes with codes to use. (Note that the NL code is redundant as FEditor Adv automatically converts the invisible linebreaks into codes for the game to interpret). Remember all those text pointers and convo values weve seen in Nightmare Modules and the such? Just type in the values there into the Input Index to go right to that text. By the way, Lyns mode text starts at index 813. With all that knowledge youre on your way to making an awesome script. Just make sure to apply after every change to an entry, and save often just in case. Also, experimenting is the best way to learn!

Chapter 41: Portrait Formatting & Preparation Yes: like text editing, there are other ways to do portraits than FEditor Adv. However FEditor Adv > all. Its much easier than it used to be. First, you need a portrait with frames and a chibi. I cant help you with this. This is a spriting thing. Youll have to learn how to sprite and make your own portraits or request portraits from others (the latter is a bit difficultpeople dont wait around for random people to request portraits, most of the time). Once youve got that done, clear up your spritesheet (a sheet with the portrait, normal talking frames, normal smiling frames, blinking frames, and chibi) so that ONLY the sprites are on there. Next, we have to reduce colors. Look at your image. The hair should have one set of colors with 3 shades, and the armor should have another set of colors with 3 (max 4, sometimes). Everything else should be either skin colors or outline colors (there is typically an orangish color and dark brown color in skins and the outline color is usually a dark purple). Open up your image in Usenti. If it wont load, thats most likely because it is a GIF, and Usenti is a bitmap editor, so your image must either be a BMP or a PNG to load. PNGs are superior to BMPs because they are MUCH smaller in size, have transparency capabilities, and when you upload them to photobucket, photobucket doesnt convert them to JPEGs and distort the image with fuzziness. (Cough, BMPs get distorted by photobucket) Once its loaded, we need to check colors. On the bottom right there should only be one row of colors 16. Lemme show ya.

See, only one row of colors (look at the bottom left). If its NOT like that, there IS a way to reduce colors without tedious work. However, theres a limit to how much reducing can be done before the image changes. First, zoom in to your image, about 4x or so, so you can easily see the shades of colors and their differences. Next, go to Palette-> Requantize at the top.

Type in 16 like so.

Hit OK. Look at your image carefully to see if the quality has changed a lot. If it has, that means you have too many variety in colors, and you need to manually use spriting techniques to reduce the # of colors. Otherwise if theres no major difference, you should be OK. (Tip: you can use ctrl+z and ctrl+y to go back and forth between the lots-of-colors and 16 color images and look for differences.) After that, you need to format your portrait. This is what most people have a hard time with. I will post multiple methods on how to do this. Also, there is an old format which hardly anyone uses anymore, and a new format. I will include a few details on both, but mainly the new format. Tutorial 1: Formatting Portraits Step-by-Step with Layers by Nayr Note: The following images are used in this tutorial as formats/templates. Alignments | Standard Format Box | Old Format Box [16:08] NayrLRosfar: step 1: Paste the mug into the hack box on the template. [16:08] NayrLRosfar: step 2: Copy the mug and hack box and paste into the alignment sheet in a new layer. [16:09] NayrLRosfar: step 3: Move the box over until it fits into one of the alignments, find the one that fits and copy paste under the red box on the mug. That'll copy the proper frame alignments. [16:09] NayrLRosfar: step 4: Past into the appropriate spots in the template. Repeat process for mouths. [16:10] NayrLRosfar: step 5: Copy/paste the eye blinks, mouth flaps for talking, and smiling [frames] into their appropriate places on the frames. Edit to fit if splicing in from another mug. [16:11] NayrLRosfar: step 6: Paste in the chibi in the box above the blinking frames. [16:11] NayrLRosfar: step 7: Merge all layers down on template and remove the background color or fill it in completely. [16:11] NayrLRosfar: step 8: Optional. Double check to make sure there are no stray colors

that could prevent insertion. [16:12] NayrLRosfar: step 9: save as [a 24bpp] png Tutorial 2: Video Tutorial on Portrait Formatting by Flyingace24 Video Link Tutorial 3: Video Tutorial on Old Formatting by Blazer Video Link

Hopefully those tutorials have taught you how to format a portrait. Now you have to insert your portrait, so get ready! Chapter 42: Portrait Insertion with FEditor Adv This will be quick and painless, assuming youve done everything right so far. Open up FEditor Adv. Go to Tools-> Portrait Editor.

At the top we see the formatted portrait with its frames. In this case, its the dummy portrait. Below that we see what it actually looks like. The input index is which portrait you are viewing. You can type in a value from a portrait list to go right to a portraitfor example, the portrait says Lyns default portrait is 0x16, so we type in 16 and go to hers. The max index is just how many portrait slots there are. Eyes always closed makes it so that the portraits eyes start off as closed. You can have this same effect by just using the closed eye frames for the open eye frames, too, if you wanted. I wouldnt mess with the palette editor (the colorful boxes). Load from File loads a portrait (I think only BMPs and PNGs work). Revert will undo a portrait load. Save saves it. Save to file saves a portrait to a file. However, when you save it, you have to add the extension yourself (so to save Lyns portrait as a png, type Lyn.png or something). Quit is kinda obvious What were going to do is hit Load from File to load your formatted 128x112 16-color portrait with proper formatting and saved as a PNG. (Tip: make sure its everything I just said, and if your insertion doesnt work, go back and make sure its everything I said again.) If its done right, it should show up in place of the current portrait.

Hit save to save. Then hit quit to exit out of the portrait editor.

Now go File-> Save to save your ROM per usual. Portraits almost never cause a game-breaking crash so I wouldnt worry about backing up before portrait insertion (as opposed to bigger less foolproof stuff like animation insertion, graphic insertion, or event insertion). Test it out in VBA and hopefully it looks nice! Enjoy your new portrait! ^_^ Chapter 43: Locating Palettes Wow, were already on chapter 43. Ive only been working on this for a couple of days... Well, its about time we learn how to find palettes. First of all, re-read the definition in like, the first chapter. Once thats done, open up your hex editor of choice, mine being HxD, and open up VBA. Play the game until the palette who you want to find in your hex editor shows up. Im going to be really simplistic and edit the title screen palette of FE7.

Alright. Were going to look for the bluish/purplish backgrounds palette. Go to Tools-> Palette Viewer in VBA.

The palette we want to edit is the one at the bottom left. Palettes are in rows, so it is the bottom row in the Background area of palettes. By clicking on a color, we can see its Address (where it is in the RAMRAM is memory, a temporary place for storing data), its RGB (Red, Green, and Blue values used to make a color), and value in hex. The RGB values are on a 0-31 scale. Normally people use a 0-255 scale, but the GBA is sort of limited. That being said, just multiple each value by 8 to get the RGB in standard terms. So for the color I have selected in the image above (a transparent green color), I multiply the RGB (16, 20, 16) by 8 to get (128,160,128). Keep this in mind for later. The value is the hex value of the color. The game uses little endian, so if we want to know its value, we have to reverse the order of the bytes first. So 0x4290 becomes 9042. Thats only one color though, and we cant find a palette by just one color. So get 3 more colors, so we have the first 4 colors used. 9042 987F 567F 147F Sometimes doing more than the first 4 colors can be dangerous because of compressed palettes. Compression makes it so that you cant just search all the colors in a row, because there are other bytes (usually 00s) in between. Now use a find command (typically ctrl+F) in your hex editor and search for those bytes. (Tip: starting a search from offset 0 is the best because it searches the whole ROM. If you start a search at some random offset, you can often times only search either forward and backward, and will have to do multiple searches, and waste time.)

With that ready, do a search. My hex editor automatically takes me to where it finds those bytes.

This palette is uncompressed. How do I know? Here are some easy tricks to recognize LZ77 compression. Of course, when you dont recognize it, that means that its not there. Recognizing LZ77 Compression 1) Standard LZ77 compression starts with a 10. 2) After that it has two bytes saying the size of the data. Youll see common sizes and recognize them quickly through experience. 3) A 00 byte every 4 bytes. (This does not hold true all the time, but usually at the beginning of LZ77 compressed data, youll see this pattern.) Thats all I have, actually, but if #1 and 2 dont tell you almost instantly, then #3 wont be too useful either (but its a good check to make sure). Anyway, this makes it easy on us. Weve now located the palette, and even if it were compressed, we still could have located it because we used a safe method. One last thing. Sometimes there are multiple instances of a palette. Use a find next feature (or just do ctrl+f again from where you are) and you may find another instance of the same palette. Theres only two ways to know which palette is which if the whole palette is the exact same. You can A) just edit both and see what does what or B) debug. The latter is probably not within your skills, especially if youre reading this tutorial to learn how to edit palettes. (No offense.)

Chapter 44: Editing Palettes There are multiple ways to edit palettes and find the values to change them to. Method 1: Editing Uncompressed Palettes with SNES Palette Editor SNES Palette Editor works fine for GBA too, trust me. Download it from google or something and open it up. Load your ROM and go to the offset where your palette is (we already located the palette in the last chapter). Make sure your palette is uncompressed. See my guide in the previous chapter for telling the difference between compressed and uncompressed.

YESZ! We can clearly see the colors and their values. We can even see the Raw Color value and the RGB. If we wanted, we could even do searches for colors, but thats not really my thing, so I didnt cover that in my previous chapters instructions. To edit the color, we can drag the bars left and right until we get the color we want. To change which color were editing, we just hit the ^ arrow next to the Address: slot/the offset. If you want to use a specific color, you can get the colors RGB from MS Paint or some other program (this is a spriting thing really), round each value to the nearest multiple of 8, and then divide.

However, converting colors like this can sometimes be a pain, and this method only works for uncompressed palettes, unfortunately. Method 2: Getting the RGB of a Color and Converting to Hex I dont exactly have a color I want to use for this title screen background, so Im just going to show you how to get the RGB of some random color on a portrait. Load up MS Paint or another program, zoom in, and use the eyedropper tool to select the color you want to find the RGB of. Often times you can see the RGB off to a window on a side for programs like Photoshop or Corel Paint Shop Pro. Ill just show you how to do it in MS Paint:

(You cant see my eyedropper, but Im about to select the light orangish/brownish color.) After its selected, go to Colors-> Edit Colors and hit Define Custom Colors so that the following pops up (except with whatever color youre using):

To the far right you can easily change the shade of the color to something lighter or darker. You can also pick another color from the rainbow-like area. Whats most important is the RGB: it is 248, 208, 112. With this, we can A) round it (its already rounded, actually) to the nearest multiple of 8 and divide by 8 to get the RGB on a 0-31 scale, then put it in SNES Palette Editor or B) put it into GBA Color Picker and get the hex value to use with SNES Palette Editor or a hex editor. Were going to do B. Download, extract, and open up GBA color picker. Put in the RGB for your color and itll get the nearest matchand it does the rounding, too.

We now have the hex for this color3B5F. If we put this in a hex editor to replace another color though, we have to reverse the order as usual. You can hit the Byteswap? checkbox in GBA Color Picker if you want, but it only does it once, meaning if you edit the RGB input, its not going to byteswap it again (you have to click the button everytime to byteswap, pretty much). By the way, GBA Color Picker crashes if you leave one of the RGB slots empty (without a value). So dont use backspace to delete the numbers there or itll freak out and crash. So we take the color were trying to replace and put in the hex we got. We use this for every color until were done. We can use this to replace uncompressed or compressed colors as since were humans, we can just skip the 00s that occur every once in a while in compressed palettes and only replace the bytes that are actually color bytes. Method 3: Editing Palettes with GBA Graphics Editor This method involves Nintenlords GBAGE. Hopefully you know the very basics of how to work ithave Net Framework 3.5 or higher installed (or Mono, the Linux/other equivalent), how to load a ROM, how to save, and how to input offsets and navigate through images. After loading GBAGE and your ROM, we need to locate the image you want to change. You can scroll through all the images if you want, you can find out the offset by debugging, you can find it by logic and a hex editor (the palette and the offset are often close to each other, so if you find the palette the graphics might be nearbyits up to you to search in a hex editor and find it, not me), or you can see if someone else knows. I happen to have some FE7 offsets, but Im pretty clueless on FE6 and FE8, so youll have to manually search those games by scrolling through the images (or you can just use another method to edit palettes). Anyway, I happen to know that in GBAGE the title screen background image is at 1369 (offset 66AF8C). The preferred size is 30x32*. We already located our palette at 66AF6C, so we put that into the ROMPalette Offset slot of the Palette Control hey, wait, thats only 0x20 bytes before the graphics! Oh look, that stuff I said about logic before was actually kinda helpful maybe!

*30x20 will work too. The size is just the # of tiles the image is, with each tile being 8 pixels. The screen is 240x160, and 240/8 = 30 and 160/8 = 20, but it doesnt matter how large you make the height because there arent any graphics to load anyhow.

If youve done everything I told you, it should look like that. Actually, it looks kinda weird, doesnt it? The top left tile (8x8 pixel piece) is missing, and its in the bottom left The reason why the game does that is because it recognizes the first pixel it sees as transparent, and the first pixel would normally be a blue one, so it uses this image where the first pixel is green (the transparent color). To make up for the distorted layout of the graphic, it uses TSA. I suggest you read up on the battle background and CG chapters for this to make more sense. Anyway, back to relevant information. We have the palette loaded. We can save the image as a PNG, edit the colors using Usenti by changing the RGB values to what we want (click on the colors in Usenti and just put your own RGB/use the scrolly thingies), save the image, and then re-import it. When you reimport the image, all that matters is that you replace the old palette with the new palette.

Yup, I wouldnt even have anything else checked. Once you import the palette, save your ROM, and you should be done.

With that, weve found our colors and replaced the old colors and made our palette changes. After saving, we can load VBA and check out our palette changes to see if they look good, turned out right, and give us a refreshing feeling. If something didnt work right, make sure you: Didnt 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 00s unless they are part of an actual color remember, 00s come about every 4 bytes).

Wooh! Were done! Chapter 45: Working with GBAGE Here were 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. Ill 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. Its like the raw hex for it. You cant SEE anything unless you save it as a bitmap, however. If youre 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, its 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, itll mess up the palette. If

you insert an image with more than the original amount of colors, itll overwrite data AFTER the palette. Furthermore, sometimes images may appear to use more than 16 colors, but dont actuallyits all a bit tricky so just be safe with what youre 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 dont 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, youll want to know where it is in case you need to go back and do stuff to it. This includes palettes! Finding palettes isnt 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 FE7s graphics. Nothing for FE6 or FE8 not because Im biased, but because Ive just never hacked those as much. Oh wait, that could be considered bias teehee. I only made one hack of FE6 so far and havent 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, thats all I have to share with you. I think Ive said enough about that topic then. Next, about palettesthere are different graphic modes. GBA almost always uses 4bit, so unless youre an NDS hacker *like me*, I wouldnt worry about it too much. I dont 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 isnt included in this tutorial as GBAGE doesnt support it (and its not very useful). Gray scale makes it so that the image is grayscale. This is sometimes useful. Its most useful when youre scrolling through images trying to find out what they are. If its set to grayscale, its easier to see the details of an image and make out what its 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, theres 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. Im not really good with it, so youll 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 cant 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 youll see a weird tile at the top-left corner or everything will look like its 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 hackshowever, newer versions of GBAGE dont 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 Im going to help out a little. First of all, you need to use TSA, and if its compressed, hit that button.

While Im at it, you may be thinking how do you even know where TSA IS?. There are several ways to find TSA: 1) Find it in a pointer table/array. For example, the Battle BG Array Editor (its a nightmare module) has a list of graphics, palette, and TSA for battle background. 2) Use debugging. If you dont know how to debug though, this wont prove to useful. 3) 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 wouldnt be surprising to find TSA data right after the palette data, for instance. Being able to recognize different types of data is a skill youll develop over time just by experimenting and studyingits 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. Its 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 placedwhich you can change by clicking horizontal and vertical under Flipand 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 Im editing the tiles at the bottom right. Ive not only flipped them but I made one of the tiles (the tile being highlighted) use palette 1. Unfortunately palette 1 is just a dudits just a

bunch of 00s 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 youre not sure what tile you are editing, you can change the palette quickly and spot the tile that changes palettethats easier than trying to tell which tile was just flipped or something. Now, lets get some practice with the title screen menu background. Ill 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 thats done, you should see the following in the image panel:

WAIT! I CAN EXPLAIN! First of all, theres 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 thats 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 dont know why, but its the truth. The game initially processes the image like this, and then it undoes the flips. Its a result of uncompressed TSAcompressed TSA is not flipped like this, meaning what you see is what you get with compressed TSA. If youve done the chapter on battle backgrounds, youre familiar with compressed TSA already. If we really wanted we could flip each tile and change the order manually. But as I said, that isnt 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. Heres one more example of how this works, just for emphasis:

And my results (the tile at the top):

Thats 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! Chapter 46: Chapter Data Editor Finally, this chapter. The chapter on the chapter data editor, the only Nightmare Module that Blazer hasnt covered. Open Nightmare, your FE ROM, and the chapter data editor. Were going to do this. Chapter Reference Pointer eww. I wouldnt worry about it. So far no one has (publicly) shown that this is useful to anyone.

Object Set 1, Object Set 2, Tile Configuration, and Palette are all important and all related. They are properties of the maps tileset (see definitions for what a tileset is). For a map to work properly, these settings have to be right. If you make a field map, you have you use the field object sets and tile configuration. The palette can be changed, but it can only be changed to a palette that is labeled as Fields. For example, palette 0x1E is fields, and palette 0x17 is Fortress&Fields. They are TOTALLY DIFFERENT. You can only use something marked as Fields and solely fields. To know which tileset settings you use, you have to look at the name of the tileset you used to make your map. If you used tileset 0A000B0C, then you set object set 1 to 0x0A, object set 2 to 0x00, palette to 0x0B, and tile config to 0x0C. If you take a look, all of those bytes are marked with Plains&Castle, so they should work together. Keep this information in mind as it is important for when you make your map (although Ill probably repeat myself and tell you what it is again anyway). The map is a byte that reference the Event Table that says what map to use. You can change this to any other map if you want, but remember to change the other settings as well to match whatever map you change it to. The tile animations are for changing tiles like water tiles. If water tiles were still theyd be slightly less cool, so we have tile animations to make them move. Its kinda obvious what to put for what map. Triggerable Map Changes are for tiles that can change into other tiles. For example, when you open a chest, it changes from a closed chest tile to an open chest tile. Same thing with doors and breakable walls. The data for these changes is at an offset in the Event Table, and this byte references the Event Table. Vision Distance is for Fog of War (FOW). If its 0, its assumed there is no fog of war. Preparations Screen can be disabled or enabled, but ultimately if you do not set up the events to match the settings, the Preparation Screen will not load regardless of what the byte is (your game might crash though). Weather is kind of obvious, except some values dont exactly work right. Thus I only suggest using the Snow, Rain, or if youre in a firey area, Fiery Glow weather effects. The battle tileset is for which battle backgrounds/tiles to use. For a foggy map or a night map youd use different tiles, of course. This changes that. If youre not sure what to use, set it to something that sounds right, and then test it out until you get what you want. The Phase music choices are the map themes for the different phases. I wouldnt touch the Secondary Player/Enemy phase things, mainly because I dont see a need for them, I dont know what they do, and I dont recall them even being used (they probably are used SOMWEHRE, idk where though).

The Worldmap Chapter Prologue music is for when you start a chapter and youre on the world map and it goes over recent events and stuff. The opening music is kinda obvious, its just the music that starts when you begin the chapter and the first scene starts. Destructible Walls HP is just how much HP the walls have before they get broken down. The tactics stuff is tactics stuff. I really dont give a crap about tactics and all, but if you want to change it, its there for you. The EM/HM Chapter Number Text is the chapter with the # in front of it, which you see on the main menu. The Chapter Name text pointers are the ones with just the name that you see in like the Status Menu and stuff. The Event Data Reference is a byte that references the event table and tells the game which events to use. Same thing applies to Worldmap events (labeled Worldmap Chapter Prologue Scene). The Pre-Augury text is what the fortune teller says before you pay. After that is the actual augury text (and it can change for each mode, of course) and then theres the Post-Augury Text, which is what is said after the augury is all said and done. The Augury Portrait is just what portrait to load for the Augury either that old lady or Nils, typically. Augury price obvious. The chapter no. thing is for the battle preparations. It says at the top what chapter youre playing. Unless you reorder the chapters (like say, make chapter 7x into chapter 8, and so on) then you probably wont need to deal with this. The Merlinus Co-ordinate is where Merlinus tent starts off. Its in the chapter data editor because you dont get to reposition Merlinus during battle preparations. Enemy count for Winning Road is so obvious When the chapter begins, the game either fades to black, or fades to the map. This is important when you are making your events, but we arent to that point yet, so Ill leave it be. The status objective text is for the status menu. The text is a little bit longer and a little bit more descriptive than the Goal text pointer, which is usually just two words, like Seize throne or Defeat enemy. By the way, this just changes the text, not the actual goal. The actual goal is a part of events.

You can also choose what information the game should display in the corner. If you dont want anything, 0x00 is fine. If theres a turn limit during your chapter, you can display it. If you need to defend for 13 turns, type 14. If you have good memory you may recall that Natalie in FE7 has a blue symbol because she is a character that is supposed to be protected. You can give this symbol to any unit in the chapter. Its kind of cool, I guess. This is the Protect Character Marker dropdown that Im talking about. Lastly, in chapter 28 (Eliwood) or so I believe, when youre getting Durandal, there is an arrow that points to a certain tile you are supposed to wait on. You can set this arrow to be anywhere by giving it some co-ordinates on the map. Well, that wasnt so scary, except for the fact that I had to type almost 3 pages of explanations and stuff. The chapter data editor is most important when youre doing eventsyou have to change the goal text, sometimes do special attributes (character marker, tile marker), the augury text, chapter numbers/text, set the events, and most commonly set the map settings to the right ones. HOLD IT! (Unless you arent hacking FE7!) After Final Chapter: Light (pt2) are some cutscene/miscellaneous maps. They are chapters that are loaded through events during cutscenes. For example, when Rath joins at the end of chapter 7, I believe, you see some village/town. This map is a cutscene mapit only appears in a cutscene. However, you can use these spots for either your own cutscene maps OR your own chapters. Chapter 0x41 (its actually 0x42, but NMM has the prologue as 0x00 when its actually 0x01) is actually the link arena chapter, however, so I would refrain from editing that. Anything before that and after the final chapter part 2 is safe game. *Unfortunately the chapter data editor for FE7 is not compatible with the extra chapters, and I myself dont have time to make the proper updates* Chapter 47: Map Creation Im tired of writing this tutorial. Honestly. So from now on, Im going to stop making so many wasteful comments like the one I am typing right now. First of all, download Mappy and the appropriate tilesets. Go. Do it. Google Fire Emblem Mappy Map Editor, or look on my site. No excuses. Extract the files as usual, blab la. Depending on what game you are hacking, there are different tilesets. As usual this hack is FE7 oriented and I will be using FE7 tilesets to make an FE7 map for insertion to FE7. Open up Mappy and make a new map. File-> New.

Your settings should be as follows. All GBA maps use 16x16 tiles. The smallest size is 15x10; the biggest size differs for each game or something. FE7s biggest size is 43x36. I am going to make a very small and simple map for this tutorial. When youre done with the settings (should take 10 seconds) hit OK. A message will pop-up. Read it, but dont do anything. Mappy should look like this:

But not for long. Do File-> Import or hit Ctrl+I. Select a tileset, and only ONE tileset.

I am going to use the fields tileset, 1C1D1E1F. Note the name of the tileset you use. It is very important that you have this for later. Thus I click open and load my tileset. I now see a bunch of tiles to the right. You should too.

I can use these tiles to make a map. I will make a very, very simple map, because I am just testing making a simple map is good in case you mess up and need to restart from scratch. Learn how first, then you can spend time with fancy map making later. Despite this, Im going to teach you the fundamentals to map-making: Drawing a rough draft/doodle can be very useful. Reference other maps to make maps properly. Dont spam/abuse tiles. Think about realism. To actually use a tile, click on it on the right and then click on it on the map area. You can hold your mouse and drag to apply a map tile in multiple places. Ctrl+Z undoes the last change you made. You can only undo one change. Dont use glitchy or black tiles. Make sure to shade castle maps. Remember, walls make shadows, so tiles next to walls need the appropriate shading on the left and top. Look at elevation and make sure it is correct. Grass patchesdifferent colored grasshelps make grass look less bland. Dont abuse fortress or pillar tiles like some people do.

Once youre done with your map, save it. Heres what my real quick test map looks like.

Before we move on, I am going to cover some of the functions in Mappy (mainly the ones you will use).

File-New Map makes a new map. File-Open opens an FMP/map. File-Save saves a map. File-Save as saves a map as a different file/as a copy. File-Import imports a tileset File-Export I will cover this in a minute. Edit-Undo undoes a map change. MapTools-MapProperties tells you the properties of a map (the size, tilesize, and other stuff) MapTools-Resize Map lets you change the size of a map and add rows/columns based on where the center of the map is. To add columns to the right and left, center at 1. To add columns all around, center at 5. To add columns to the left and right, center at 9. MapTools-Grid turns grid on/off. Alternatively use Ctrl+G. MapTools-Zoom (X) zooms a certain amount. Useful for analyzing tiles. We are now going to export the map as two things. We can do each export separately, or both at once. The latter is more convenient. Start by doing File-> Export.

Check the things marked. The .MAR is for hacking purposes. The current layer as big picture exports the picture of a map as a BMP. If you want to share it with others, I suggest you resave the image as a

PNG first. The image will have the extension scrn at the end and be located wherever the FMP is. Same thing with the .MAR. After you do this, save your map, and were done with map creation! Chapter 48: Map Insertion Now that weve made our map and have a .MAR, we can insert it into the game. First we need to insert the .MAR. Thankfully the awesome Nintenlord made a program that does it for us (yes, you used to have to do it manually, and man was it a pain). Its called the MAR Array Inserter. Like many other things, you can find it on google or on my website. Its a simple but useful program. When you first open the program it should look like this. Please note that like all of NLs programs, you have to have the Net Framework or Mono installed this should already be done if GBAGE worked for you and all.

Use the browse button to locate the MAR file that we just exported. Use the browse button below that to navigate to where the ROM you are going to insert to is. Now you need to know the size of your map. If you dont already know it, you can go into Mappy, load your map, and use MapTools->MapProperties or MapTools->Resize and itll tell you the size of your map. Anyway, enter that into the Map size slot. Lastly, we need some free space to insert to. Lets say 0x1009100 is empty so we are going to insert our map at that offset. This is just my example thoughlike always, you need to know your own free areas and manage them so you dont overwrite data and stuff. Once youre done inputting the info, it should look something like this:

Except with different offsets and stuff. If you notice, I label the map I am inserting with its size beforehand so I dont have to go back and look it up. Anyway, once thats all set up, we hit run, the program says Finished, and the map is inserted, so we can exit the program. Now we have to fix up our tilesets. I was smart and I wrote down before what tileset I used for this map: 1C1D1E1F was the name. These also happen to be the bytes I use in the Chapter Data Editor. Its pretty nifty. So lets load Nightmare, our ROM, and the chapter data editor.

In my case Im inserting over chapter 18/19 (Im actually killing two birds with one stone and doing legit hacking ATM), but it works all the same for all the maps. Currently its set to 0A003A0C for a Plains and Castle map. Im going to have to change those bytes to 1C1D1E1F. And bang.

Remember! The maps palette can change to anything in the same set, but nothing else can change! You cant make a map meant to be an outdoor field map and then use castle tiles. It just wont work. Hit enter/apply your changes in Nightmare and save. Now we are going to use the Event References module to repoint the old map to our new one.

Alright. I loaded the module and scrolled down to the chapter 18/19 map pointer, since that IS what I am changing. I see some pointer that I dont care too much about. Im going to repoint it to my new map. Since my new map is at 0x01009100, the pointer is +0x08000000 to that, meaning 0x09009100. So thats what I type. I hit enter to apply changes and then save. Im done! Congratulations, youve inserted your first map! I hope you enjoy it! If youre looking to make a totally new chapter (instead of being limited to the old games EXACT same scenes with EXACT same events) then read on, because Im going to hack events next! Chapter 49: Event Assembler Basics Theres two main ways to do events. You can do them straight in hex with a hex editor, or with the Event Assembler. The Event Assembler is much easier, so Im going to cover this. First, some things to start you off: EA = Event Assembler STLB = Standard Library = the standard definitions included with the EA EALF = Event Assembler Language file = the text file with all the EA codes you can use. Assemble = use the Event Assembler to interpret the codes in a text file and turn it into hex that the game comprehends.

Disassemble = Opposite of assemble, take the games events and put it into a text file with codes that you can understand.

You should of course know what pointers and offsets are. While knowledge of programming languages can be useful, it is not by any means necessary. Download the Event Assembler and extract its files as you would any other program. Im now going to tell you about the basics of event assembling. The program itself isnt going to be used much. Open it up and see for yourself.

The input is either where you put the text file (for assembling) or the ROM (for disassembling). You put the opposite thing in the output (so for assembling, youre going to output a ROM, and for disassembling, you will output a text file). Obviously you have to choose which game you want. When disassembling, you need to input an offset. The offset can either be an offset a pointer in the event reference table, or it can be the actual header of the events. The header is a list of pointers saying what event data is where. If you are going to point to the latter, you need to select the appropriate checkbox. I would just always add end guards since its not something you need to worry about too much. Of course, when you have your correct input and settings, click assemble to assemble or disassemble to disassemble. This is how you work the EA. Youll likely reference this part of the tutorial later because youre not actually going to do any assembling for a while. Your event assembler folder should look like this, but without the NewMacros file or template file.

Language raws is a folder of the EA assembler language raws as in, it defines what code is what/its hex equivalent and the format of the code, as well as some other stuff. You can change it if you want. EAstdlib is a library of standard EA definitions. You can edit it if you want, but since its the standard definitions, its not exactly supposed to be edited. If you look at my icon, it shows a notepad in it. Thats because I have set .event files to open with Notepad so I can edit them. Yes, thats rightto edit the file, just open it in notepad. Now, what exactly are definitions? It defines stuff. It can define a name for a valuefor example, Lyns character hex is 0x2D, but instead of typing 0x2D, you could type Lyn in the event assembler. This is easier than remembering the hex for every character/having to look it up. Tutorial (i.e. Lyns mode) Lyn would be Lyn_t. As said, you can view the files and see the definitions for each game. #ifdef _FE8_ #ifndef _NO_FE8_DEFINITIONS_ #define Eirika 0x01 #define Seth 0x02 #define Gilliam 0x03 (more entries) #endif #endif This is stolen from the STLB. #ifdef _FE8_ is an if statement that see if its FE8. It also checks to see if _NO_FE8_DEFINITIONS is marked. That is, if you DONT want to use the standard FE8 definitions but rather your own definitions, you could use _NO_FE8_DEFINITIONS in your code, and when the EA checks to see if it should use the definitions, itd be like no, this is marked, so I cant do it. For each #ifdef/#ifndef there has to be an #endif. Thus after all the definitions for characters, classes, and items, is an endif.

There are also these shortcuts called macros. Macros simplify otherwise long processes. Lets look at a few macros as well as other definitions in the STLB. //Backwards compability #ifdef _FE7_ #define IFEV IFEF #endif This defines one code as another code, so if a person had used an older verison and used one spelling, their code would still work. #ifdef _FE8_ #define GotoPrepScreen "GOTO $591FD8; ENDA" #endif This macro makes a code GotoPrepScreen that the EA interprets as the code in quotes next to it. Instead of remembering that offset and the whole code, you can just type something easy to remember. Much better, huh? While were at it, do you see the semi-colon after the 8? A semi-colon is like a way of signifying a line break (a new line) without actually making it. Thus the EA knows that GOTO and ENDA are separate codes. #define Village(eventID,offset,X,Y) "VILL eventID offset [X,Y] 0xE; LOCA eventID [X,Y-1] 0x1D"

While you still dont know how to actually use macros and codes in your events, you should understand how they work. Everything inside of the parantheses, separated by commas, is a paremeter. eventID is a parameterwe know what event IDs are, of course. So is the offset of the village, as is the X and Y coordinates. However, that small code on the left comes out to be the code on the rightits much easier for us to use the code on the left. Make sure you get the connectionthe input X and Y is the same input on the right for the X and Y there. However, were avoiding all the other codes and bytes by using our little shortcut. Its why macros are so useful. I think weve covered macros well enough that we can move on to the next file in the folder. The Event assembler language file that I will be calling EALF is a list of all the codes you can use with the Event Assembler. It does not, however, include macros. It contains the base codesthe very codes that are defined in the language raws. It says what paremeters there are and explains the basics of each code. Im going to cover many codes (as well as some of my own macros) in another chapter. I will not cover every code, but I will cover enough that you will know what codes to use when and where and how they work in conjunction with the rest of the events.

The README should be read. Nothing else to say about that. Theres also the template file Markyjoe1990 made. It has a base layout for codes. Im going to give you a similar template in the next chapter. The other file you saw me have was a custom file for my own macros. Dont worry, Ill share the macros with you in a couple chapters. :D Chapter 50: Events The Layout How do we actually make our events? Well, there are different sections for different types of codes. We need to know the layout of the events, and then make the actual events. We do all of this in a simple text file. If you by some chance dont know how to make a text file, I can tell you how to do it on windows. Either A) right-click on a folder, do New-> Text Document (it might say Notepad File or something maybe), then rename it to something that makes sense like Chapter X events, B) go to program files in the start menu, then go to Accessories, then load Notepad, and save the file, or C) copy an existing text file, rename it, and open that. Now Im going to post my template; dont be alarmed. //Made by markyjoe1990 of Youtube //Modified by Nintenlord //Modified by Blazer #define DISABLE_TUTORIALS #include EAstdlib.event EventPointerTable(0x??,Pointers)

org 0x???????? Pointers: POIN Turn_events POIN Character_events POIN Location_events POIN Misc_events POIN BallistaData BallistaData POIN BadEN BadEH BadEN BadEH POIN GoodEN GoodEH GoodEN GoodEH POIN Opening_event Ending_event Turn_events:

CODE 0x00 Character_events: CODE 0x00 Location_events: CODE 0x00 Misc_events: CauseGameOverIfLordDies CODE 0x00 Ballista_events: CODE 0x00 Opening_event: ENDB Ending_event: MNCH 0x?? ENDA GoodEN: UNIT Empty GoodEH: UNIT Empty BadEN: UNIT Empty BadEH: UNIT Empty

#ifdef _FE7_ #define TileMap(TCN,X1,X2,L1,L2,TilePointer) "CODE TCN X1 X2 L1; CODE L2 0x00 0x00 0x00; POIN TilePointer" #endif org 0xC9C9C8+(4*0x??) // - Pointer to tile map changes

POIN TileChanges org 0x???????? TileChanges: TileMap(0x00,X1,X2,Y1,Y2,TilePointer) CODE $FF CODE $00 CODE $00 TilePointer: CODE (Tile hex) CODE $00 MESSAGE Events end at offset currentOffset //The map for this chapter is at offset: ???????? This template includes: all main structure events getting rid of the tutorial including the STLB the format for tile map changes event table repointing normal and hard mode enemies (no differentiation between E/H modes to save space/I forgot which is which)

Please copy that to your text file and take a good look at it. Im going to explain everything from top to bottom. // denotes a comment. Anything after that is ignored, but can be seen. Thus all the comments there that say who have edited the template are rightfully ignored by the program. #define DISABLE_TUTORIALS - disables the tutorials. I covered this in a MUCH earlier chapter. Once you disable the tutorials once, you dont need to do it again. #include bla.event this includes the standard definitions so that you dont have to waste space defining them all in one text file. You can include other definitions (like your own) as well. EventPointerTable(0x??,Pointers) this is to repoint the pointer in the event table (you can also do it manually using a hex editor or the Event Reference module). 0x?? is the reference byte for the events.

To know what this is, you can go into the Chapter Data Editor and scroll down to where it says Event Data Pointer or something like that. Ill show you a screen real quick:

Its called Event Data Reference (I was close). The byte is 0x65, so thats what I use. The text Pointers is a pointer itself. What this does is go to entry 0x65 in the event table and repoint the pointer there to wherever the Pointers data is. org 0x???????? this is uh well say its a code that says where to put data. Anything that comes after it (but before the next org) goes at this offset. For our events, we need a bunch of freespace. Weve been through this before. Note that when you put your offset, you dont need the 0x08 in front of it. Personally I am using 0xCB3800 although this is not typically free space so I dont suggest using it yourself. Pointers: POIN Turn_events POIN Character_events POIN Location_events POIN Misc_events POIN BallistaData BallistaData POIN BadEN BadEH BadEN BadEH

POIN GoodEN GoodEH GoodEN GoodEH POIN Opening_event Ending_event These pointers are the header we were talking about. As said before, the EventPointerTable code repoints a pointer in the event table to wherever this data isand we specified where this data is with the org code. The pointers themselves are the base 16 pointers for FE7 events. FE6 and FE8 have a slightly different format, IIRC. Anyway, POIN is a code that makes a pointer. Its going to make a pointer of each word there (a word is separated by a space, of course). So if we make a pointer to Turn_events, there has to be some events labeled Turn_events. Verily, there is. Turn_events: CODE 0x00 Before I explain what turn events are, let me explain what it means to put a name and a colon after it. Its making a label or a group or an event. Because you use the same thing for units, I dont want to call them events, so I am going to call it a label. Back to the POIN code above, it points to this Turn_events, which has some code beneath it. Right now all it has is a CODE 0x00CODE 0x00 is a nullifier that signifies the end of these events. The actual events wed put here are events that take place during a certain turnfor example, for a scene at the opening, you could have a scene on turn 1, and for a scene on turn 4, youd use turn events. I wont actually teach you what codes to use here/how to make turn events until later though. From here on out Im going to be less detailed on my explanations, so here we go: Character events talks/conversations between characters Location events villages, shops, doors, chests, etc., any events that take place on a certain tile Miscellaneous events other types of events. Includes after-events and chapter goal conditions. Ballista events events for ballista units Opening event the events for the opening scene. If battle preparations are on, then it loads this automatically, and the event ends with ENDB. If battle preparations are off, you need to have a turn event on turn 1 that uses the opening event, and the event ends with ENDA (you also have to manually load units onto the map). Ending event the event at the ending scene. This is only directly used if you have a seize event with event ID 0x03. GoodEN Ally unit data for Eliwood* normal mode. GoodEH Ally unit data for Eliwood hard mode. BadEN Enemy unit data for Eliwood normal mode. BadEH Enemy unit data for Eliwood hard mode. *Also used for Lyns mode

The stuff at the bottom is all for tile changes, except for the message at the end, which just says where the events end after they are inserted. Youll see what I mean when you assemble events. As for a maps tile changes, youll have to see another chapter on that. :P Chapter 51: Events The Event Codes This part is going to be a dragits where I explain all the codes in the Event Assembler so that you have no excuse to not know how any of them work unless its A) a code not listed here, B) something I cant work, C) glitch due to the program, or D) a CODE or ASMC thing that you cant figure out because its not a supported code but rather some special code. Open up the EALF. The EAL text file contains a list of all the codes, as said. It doesnt include some macros though. Im going to skip any codes that can be easier done with macros, and Im skipping any codes I dont know. Im also only going to give the important details that arent obvious, so if I dont mention an aspect of something, that means it is obvious. Here are some generic principles to know: Event ID/event identifier is covered with its own chapter, and thus I will not cover how it works again, and will just expect that you know it. $ and 0x both denote hex, otherwise it is decimal. Binary has a b at the end of it. a pointer is a name, not an offset. When it asks for a pointer, you give a name, and later on you use NameofLabel: and give the appropriate info for that event (i.e. you use codes to tell what happens during said event). [X,Y] asks for co-ordinates. Co-ordinates are from the top-left of the map, which is considered (0,0). You can use Mappy to figure out co-ordinates easily by just highlighting a tile in Mappy (it tells you at the top left what the co-ordinates are).

With that, lets get started! XP Turn based events. TURN 0xPP $pointer [XX,YY] 0xZ 0xMM PP = event identifier XX = starting turn YY = ending turn+1 Z = 0 beginning of player phase Z = 8 beginning of enemy phase MM=mode 01=ENM 02=HNM 03=EHM 04=HHM, FE7 only This is like, the only code youll used in the Turn_events area. If you want an event to happen on any mode, just set 0xMM to 0x00. A turn-based event might look like this:

TURN 0x00 Opening_scene [01,00] 0x0 0x00 Character based events. CHAR 0xPP $pointer 0xAA 0x 0xMM PP = event identifier AA = character1 = character2 MM = 1, eliwood MM = 2, hector MM = 00XX0003, if event XX has happened, for FE7 and FE8 only These go in the character events area, of course. This code is for a talk between two characters. To make a talk go both ways you need two events, with the characters switched in them. However make sure that they have the same event ID so that if the conversation goes one way, it cant go the other way as well. Example: CHAR 0x07 RecruitmentConvo 0x03 0x0D 0x00 CHAR 0x07 RecruitmentConvo 0x0D 0x03 0x00 CODE 0x00 // - nullifier Shop list. SHLI 0xI1 0xI2 0xI3 0xI1,2,3... = item. This is an easy code. In a shop/armory/secret label use this to specify what items/weapons are available. Note that there IS a limit to how many there can be, so I would not add too many. Idk what the specific limit is though. 0xI1, 0xI2, etc. are just the hex values of the items. You can also use names IronSword,IronSpear, but they have to be defined (I covered definitions earlierthis is how you use them). Area events. AREA 0xPP $pointer [X1,Y1] [X2,Y2] [X1,Y1] = upper left corner of trigger area [X2,Y2] = lower right corner of trigger area Honestly, Ive sort of forgotten where this goes, but I think it actually goes in the Misc_events section, NOT the location events. It sounds ironic, but this is what I remember (and Ive been doing events for years, guys). This is pretty self-explanatoryit sets a rectangular area to have an event such that when you wait on a tile there, the event activates. Note that certain codes wont work with an area event because the character is still considered moving when this activates (thus the DISA code, which removes a character from the map, does not function properly).

Event after another event. AFEV 0xPP *pointer* 0xRR 0xRR = The event ID of previous event. This goes in the Miscellaneous section as well. It activates an event after another event has been activated. This is actually how the game over event workswhen event 0x65 is activated/triggered, it uses an after event to go to the game over screen. *this is one of the event codes I told NL about, tee hee* Event if ASM condition is fulfilled ASME 0xPP *pointer* *ASM pointer* ASM pointer = pointer to ASM code Unless you are familiar with specific ASM conditions, I dont suggest using this codevery often. Despite this I think the Defeat All Enemies goal uses this kind of event (but there should be a macro for it). Unit data FE7 and FE6: UNIT 0xZZ 0xCC 0xLC 0xLL [X1,Y1] [X2,Y2] I1 I2 I3 I4 A1 A2 A3 A4 UNIT 0xZZ 0xCC 0xLC 0xLL [X1,Y1] [X2,Y2] *Items* *AI* UNIT 0xZZ 0xCC 0xLC 0xLL [X1,Y1] [X2,Y2] [I1,I2,I3,I4] [A1,A2,A3,A4] ZZ = Character CC = Class LC = Leader character LL = Starting level [X1,Y1] = Loading coordinate [X2,Y2] = Starting coordinate I1 I2 I3 I4 or *Items* = Starting inventory A1 A2 A3 A4 or *AI* = Units artificial intelligence Character and class are obvious. Leader character is described in the Chapter Unit Editing with Nightmare chapter (its not very important, so you can just set it to 0x00 if you want). Starting level is a byte that determines the allegiance, starting level, and whether a unit is autoleveled or not. There is a list of values in the Nightmare modules; however, there is also another (MUCH better) way to do starting levels. Use the macro: Level(Level,Allegiance,T/F) where Level is a number that determines the level, Allegiance is either Ally, NPC, or Enemy, and T/F is either True or False. The first co-ordinates are the loading position. Units will then move to the starting positions. If battle preparations are on, these co-ordinates might as well be the same.

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. AI is the hex for AI, with each byte being separated You can see my Chapter Unit Editing with Nightmare chapter on how AI works. Now, for an example: UNIT Hector 0x03 0x00 Level(5,Ally,False) [03,00] [03,02] [IronAxe,SteelAxe,Vulnerary] [0x00,0x03,0x09,0x00] (Note: Allies dont actually use AI, but I included it to show you how it works anyhow) Ballistae's BLST [XX,YY] *Ballista type* Ballista type is either 0x34, 0x35, or 0x36. After the BLST code you have to add the code ALIGN 4 for reasons I dont want to get intoit prevents some glitches from happening, however. Both codes go in the ballista events and are probably the only codes youll use there unless you know super special codes. XP. It should look like this: Ballista_events: BLST [14,23] 0x34 ALIGN 4 Thats just an example, of course. Showing text. TEX# 0xZZZZ ZZZZ=text value //# - code //1 - 0d //2 - 0e //3 - 0f //4 - 11 //5 cf TEX1 0x0816 this loads some text at the beginning of lyns mode. it uses the default text loading code, which is TEX1, and is for dialog. I forgot what 0E and 0F are for, but 11 is for continuing text while still using the same loaded portraits and the such. Youd use this if you have some dialog, need to change the music playing, and then continue dialog, but dont want to show all the portraits being cleared and then reloaded just when the music changes.

CF is for CG text. Just make sure to use the [SetName] text control code in FEditor Adv to set the name of who is talking. (And of course, every time it changes whose talking, you need a new text event) TEX8 0xZZZZ [XX,YY] Show small brown textbox ZZZZ = text value XX,YY = position of the textbox RETB Hide brown text-box This text code is mainly used for displaying the name of a location when there is a scene that shows something happening in another area. Its just a small brown box though, really. The position is in pixels, IIRC, that is if you want it at the top left, you could use say [24,16] and itd be there. Its up to you to experiment and figure out where you want it. The latter code just hides the text box afterwards. Its necessary for your events to work properly. Makes event ID usable. ENUT 0xNN Makes event ID used. ENUF 0x00 NN = event number This is mainly used amidst conditional events but doesnt have to be. It can set an event ID to be usable, i.e. an event with said event ID CAN activate, or it can set it to be unusable, so that an event with said event ID CANNOT activate. Condition related codes. Turn condition IFTU 0xII 0xTT Event condition IFEV 0xII 0xVV Previous yes/no statement IFYN 0xII Checks for Eliwood mode IFEM 0xII Checks for tutorial mode IFTT 0xII Unit is Fielded IFUF 0xII 0xXX

Checks for active character IFCA 0xII 0xXX Checks if character is dead (or recruited?) IFCD 0xII 0xXX ASM condition is true (returns non 0 value in r0) IFAT 0xII *pointer* ASM condition is false (returns 0 in r0) IFAF 0xII *pointer* End of if statement ENIF 0xII Else statement ELSE 0xII II = condition identifier VV = Event number TT = Turn number Wooh, so many conditional events! Conditional events are just if/else statements, really. The base structure for them is: IF (insert parameter) // - (insert event to happen if condition is met) ELSE ENDIF // - (insert event to happen if condition is not met) ENDIF // - it really does ENDELSE but its ultimately the same code as ENDIF, so Btw, for the turn condition, its actually like TURN LIMIT -1 or something. I think... Anyhow, conditional events are a bit tricky, so I would just follow the general format above and use whatever beginning codes you want to check for whatever thing you want (check what character is fielded/dead/currently in use, or what mode, or turn #, etc.). Change weather. WEA1 0xZZ WEA2 0xZZ ZZ=Weather You know the Weather dropdown in the Chapter Data Editor? You can find values for weather in there. Load units. LOU1 $pointer (repeatable) LOU2 $pointer (repeatable)

LOU3 $pointer (repeatable) LOU4 $ENM pointer $EHM pointer $HNM pointer $HHM pointer LOEV 0xZZ 0xPP [XX,YY] ZZ = Character PP = Class [XX,YY] = coordinate to load into. This is how you actually load units. I almost always use LOU1. In your early chapters there wont be battle preps and so youll need to load units during a cutscene like this. WITH battle preps, units are loaded based off of the GoodEN, BadEN, etc. pointers in the header that we talked about a while ago. The actual pointer is the pointer to a list of units. I already covered how units work, but heres another bit of example anyhow: LoadUnitsEvent: LOU1 AlliedUnits ENUN // - this code is used after an event. It waits for the previous event to be finished. Its almost always used after loading units or movement, however. AlliedUnits: UNIT Eliwood 0x01 0x00 Level(1,Ally,False) [0,0] [2,2] [IronSword,Rapier,Vulnerary] [00000000] UNIT Empty // - this has to be at the end of your units. Otherwise the game will not know when to stop loading units and your units WILL crash and stuff. Almost guaranteed crash (I wont tell you how to not include this and not crash it, some secrets are better kept secret). OH WAIT! I forgot about the LOEV code. It loads an NPC with said character and class at the coordinates [X,Y]. Thats all. =D Move units on map. MOVE [X1,Y1] [X2,Y2] MOVE [X1,Y1] [X2,Y2] 0xGG MOVE [X1,Y1] *pointer To Move Manual* MOVE 0xZZ [XX,Y2] MOVE 0xZZ [XX,Y2] 0xGG MOVE 0xZZ *pointer To Move Manual* [X1,Y1] = Starting coordinate [X2,Y2] = Ending coordinate ZZ = Character GG = Speed of moving There are various different MOVE codes but the EA has them all start out the same. If there are multiple co-ordinates, it moves the unit at the first co-ordinates to the 2nd co-ordinates. 0xGG is optionalyou

can test out values to see what you need. Alternatively, you can use 0xZZ to specify a character instead of specific co-ordinates. You can use ENUN to wait for movement to be finished before executing the next event. Thats about all I have to say. End unit load or/and move event ENUN I covered this earlier, but you just use this aftering loading units or moving units. It can also be used to wait for an earlier event to finish taking place before continuing on (but its not used much like that). End of an event ENDA At the end of a scenic event (a scenic event is one with say, dialog, character movement, etc., as opposed to one of the codes in the Turn_events or Location_events areas) you put this, UNLESS the scene is the opening scene and you want battle preparations, in which case you need to use ENDB (for FE7) or GotoPrepScreen (for FE6-FE8 IIRC). End chapter and transfer to next one MNCH 0xYY MNC2 0xYY (skips world map) YY = Chapter number. An alternate way to skip the world map is to set it to 0x00 in the Chapter Data Editor. Anyhow, this code is used at the end of chaptersit takes you to the save screen and continues to the next chapter. To know the chapter # of your chapter, there is a list of chapters in the Quote Editor folder with the hex next to them (at least, for FE7 there isfor FE8, you can use the hex values seen when you load the Chapter Data Editor). Use the hex of the chapter you want to go to in place of YY. Stall. STAL 0xZZ (repeatable) ZZ=time to stall Very simple code. It makes the game wait. The time is in uh Im not sure, and Id guess frames, but I could easily be wrong, but anyhow, 0x1E is a short pause, 0x64 is a second pause, 0xFF is like 2-3 seconds or so just test out values until it looks good, kay? Move camera on map. CAM1 0xZZ CAM1 [XX,YY] CAM2 [XX,YY] //1F ZZ=character [XX,YY] = Character

The camera of the map is what part of the map is being focused on. You can set it to focus on a character or a co-ordinate. (Warning: If you set the camera to focus on places too close to off-screen, the map will get messed up and stuff in other words, be careful about where you focus it ondont try and focus it on the bottom-right corner, that will surely be screwy.) Changes vision distance VCBF 0xZZ (black fog) VCWF 0xZZ (white fog) ZZ = vision distance 00 = infinite This is a code that changes how far a unit can see in the fog. It loads fog if there wasnt fog before. Kinda simple Changes/puts up a convo background BACG 0xZZ ZZ=background This is a simple code and used somewhat frequently. It loads a background for dialog. To use it properly, you need to have a FADI and a FADU after it, or else the transition to the background will not look good. I made a list of backgrounds for FE7 but for the other games, youre kinda on your own, unless someone has a list they want to share Shows a CG picture SHCG XX XX = picture value Like the BACG code, but shows a CG. return to map REMA Used after text to clear the text and return to the map view. Changes music MUS1 0xZZ MUS2 0xZZ MUS3 0xZZ ZZ=music value See the music list for values to use.

Makes sound effect play SOUN 0xZZZZ ZZZZ=sound effect value See the music list for values to use. Fades music out. MUEN 0xZZ ZZ=fade out speed 0x05 is a decent speed. Ending music abruptly as well as ending one song and switching to another song abruptly are both bad ideas that dont sound good and people will notice it. Thus this code could be used more than you might think. Lowering/Highering volume of the music MUSI (makes music more silent) MUNO (makes music normal after MUSI) I have nothing to say. Causes map changes. MAC1 0xZZ 0xY MAC2 0xZZ MACE (placed after a bunch of MAC2) MAC3 0xZZ ZZ=map change number Y=0 does them Y=8 undoes them Youll mainly use MAC1 (especially because I dont know/remember what the differences for the other ones are). The map change number is the first byte in the map changes. The first map change in the list is 0x00, the 2nd is 0x01, and so forth. Youll learn more about map/tile changes later. Load map LOMA 0xZZ [XX,YY] ZZ = Map number [XX,YY] = Coordinate Mainly used for cutscenes, which is why its called Load map, but its sort of like going to another chapter without actually going through the save screen and world map. The map number is actually the chapter number (and when it loads the chapter, it consequently loads the map). Unless youre really

smart and understand all of this and think you can manipulate event codes really well, I wouldnt try and use this code to do a chapter after a chapter (i.e. without actually saving). XP Giving items to character ITGC 0xPP 0xZZ ITGV 0xZZ (village) ITGM 0xZZ (to main lord) ZZ=item PP=character Money giving MONE 0xZZ 0xMMMM MMMM = Amount of money ZZ=00 village ZZ=01 cutscene So very obvious. The ZZ byte in money giving is important because it helps decide whether a weapon is received or pilfered -_-. Execute ASM ASMC $pointer (repeatable) Unless you want to write your own ASM routines using the EA (*sweats* D:) you want to actually put in a pointer here. What pointer to use? Well, there are different ones for different effects. I guess you have to be smart and know them. One way to know them is to analyze existing event codes by disassembling and figuring out what certain ASMC codes do. Thats how I figured out most of my event hacking back when there wasnt any Event Assembler or FEditor Adv. >_> Change unit condition UNCM 0xZZ 0xXX (causes) UNCR 0xZZ 0xXX (reverses) ZZ = character XX = condition values 01 = invicibility 02 = Grayed out 10 = rescuing a unit 20 = being rescued Effects map sprites, btw. Makes unit disappear and re-appear DISA 0xZZ (disappear)

DISA [XX,YY] REPA 0xZZ (re-appear) REPA [XX,YY] ZZ = Character [XX,YY] = Coordinate Very obvious use co-ordinates or the character #. Make units fight (FE7) FIGH 0xZZ 0xPP $pointer $code ZZ = Attacker PP = Defender code = 00000000 normal, controlled fight If you want a totally scripted fight, theres a trick. Yes, there is. Oh yes. Theres a bunch of things you can do with the data pointed to by $code I think Ill teach you. To start, the $code can do some special things. One thing it can do is make the attacking character equip any weapon, even if its not in their inventory. lolwut? Yes it can. $0000001F would make them equip an Iron Axe, for example. Its the first byte that controls it (when using $ you are reversing the byte order though, making it seem like the last byte). Now, the data pointed to by the pointer controls what happens in the fight. You can have multiple attacks, but typically any more than 4 attacks and the game may start to act a bit silly, so be careful. FightData: CODE (bytes) CODE 0x00 0x00 0x80 0x00 // ends the fight A general fight looks like that. There are many things you can do with the fight, though. One attack consists of 4 bytes, and those 4 bytes control everything about that one attack. CODE 0x00 0x00 0x00 0x20 What this does is make an attack that 1) hits 2) acts normal 3) that the attacker does and 4) that does 0x20, or 32 (yes a lot) damage. The first byte controls the outcome of the attack. Byte 1: 0x00 = Hit 0x01 = Critical 0x02 = Miss

0x40 = Poison 0x80 = Devil The second byte is, to my knowledge, only used to control whether the hit is a silencer or not. 0x00 is normal, and 0x08 is silencer (it has the silencer special dark kill effect too). The third byte controls who attacks, if anyone. 0x00 means the attacker attacks. 0x08 is to make the defender attack. And 0x80 ends the battle (which is why 0x00 0x00 0x80 0x00 is used at the end of all fight events, if youre smart). The last byte is the easiest byte to remember, as it is the damagein hex, mind you. As usual, use your head or MS Calculator or an online calculator to convert from decimal to hex. Now, here is an example of a scripted fight. FIGH 0xED 0x01 AnakinFight $0000001F UNCM 0xED 0x01 MOVE 0x2D [16,23] ENUN FIGH 0x2D 0xEE SiegFight $00000000 UNCM 0xEE 0x01 AnakinFight: CODE 0x02 0x00 0x00 0x00 // attacker misses and does 0 damage CODE 0x01 0x00 0x08 0x30 // defender attacks, critical, and does a whopping 48 damage CODE 0x00 0x00 0x80 0x00 // the battle ends SiegFight: CODE 0x81 0x08 0x00 0x30 // attacker critical and does 48 damage WITH a silencer to HIMSELF // because of the devil effect. So he pretty much assassinated himself. XD CODE 0x00 0x00 0x80 0x00 // the battle ends ***USEFUL INFO ON SCRIPTED MAP FIGHTS*** Alright. So character 0xED fights character 0x01 (happens to be Anakin). The enemy uses weapon 0x1F to fight (see the last byte of the FIGH code), which is an Iron Axe, but the unit data (which I didnt show) says his class is a soldier. Do you know what this means? It means that the game cant load an animation because soldiers dont have an axe animation. The result? The scripted fight happens on the map instead of with full animations on. This is useful for fights with generic enemies where people typically dont want to see battle animations. I think its a pretty good idea because I cant find a byte that forces animations off, but then again I came up with it so I am biased. XD

As for what happens in the fight, see the comments and look at what I said about what byte values do what, and you should figure it out. Now admittedly there are some other codes in-between the two FIGHs but just ignore them for now. In the next FIGH code, character 0x2D attacks character 0xEE, and uses the weapon he has equipped. Notice how in the code I used 0x81 for the first byte. Wait, that wasnt an option! 0x80 is devil, and 0x01 is a critical, but 0x81 oh, get it? Its just a critical with the devils axe effect. Hes essentially critical-ing himself like an assassin. Fun stuff. Thats all there is to FIGH commands. Just be careful that you dont do anything reckless, as they can EASILY mess up. For one, make sure the fighting units are within range of each other, and dont try doing anything stupid (not that you would) like a missing critical (0x03I sincerely doubt it would work). As for the FE8 scripted fights I have almost no clue how the FE8 code works so I cant help you there. Then again, this tutorial is FE7 oriented, so I have few regrets. T_T If you need help, try Archs event tutorial, as it includes info on the differences between FE7 and FE8 and the like. Its useful. Kill a character KILL [XX,YY] KILL 0xZZ ZZ = Character [XX,YY] = Coordinate Actually kills the character rather than just making them disappear. When a character is killed, so is their data, meaning if you try and load the character you killed later, they will have their base stats. This only applies to allies, of course, because enemies and NPCs cant level up, but why would you want to kill an ally? :P Changes units AI CHAI 0xZZ $AI code CHAI [XX,YY] $AI code ZZ = Character [XX,YY] = Coordinate The AI bytes are the same AI bytes used in unit data. Whoop-dee-doo. Changes characters affiliation (FE6/FE7) CUSI 0xZZ 0xPP ZZ = Character PP = affiliation code Changes characters affiliation (FE8)

CUSA 0xZZ to ally (blue) CUSE 0xZZ to enemy (red) CUSN 0xZZ to neutral (green) ZZ = Character For FE6 and FE7, 0x40 should work for NPC, and 0x80 should work for Enemy. I think. If they dont work, then just test values (I know 0xA0 should work for enemy, NPC should be somewhere in the middle). There are macros for FE7 to simplify this so you dont have to remember values. FE8 is lucky and has 3 separate codes for each allegiance. Well, idk if you consider having to use 3 separate codes lucky, but its better than having to remember random allegiance values Promotes character (FE8) PROM 0xZZ 0xYY ZZ = Character YY = Class to promote to FE8 is lucky and has its own code for promotions. I only know a code for promoting the Main Lord in FE7. D: Ill give you some of these macros later (very soon). Fadi in/out black FADI 0xZZ FADU 0xZZ ZZ = Speed of the fade-out 01 = slowest possible FF = Fastest possible Fade in/out white FAWI 0xZZ FAWO 0xZZ ZZ = Speed of the fade-out 01 = slowest possible FF = Fastest possible Fade in/out for CG FADICG 0xZZ FADUCG 0xZZ ZZ = Speed of the fade-out 01 = slowest possible FF = Fastest possible

These codes are pretty important. When you fade to black, you can execute events without the player seeing them. You can secretly load units, make them all invisible, load music, load a background, load a CG, or something else. These codes generally work the same, except one is black, one is white, and one is for CGs, apparently (I never used the CG code myself). A good value for average-speed fades is 0x10 and for slower fades, 0x04. For faster fades, something high (but probably not 0xFF). Pointer POIN $pointer It makes a pointer. I cant believe I just said something so obvious. Go to event GOTO $pointer Executes pointed events and then returns. The EALF already explains this one. Once again, I find myself near stunned that I even pasted this. I must be tired/bored Now, onto those macros I said. Ill givem, but theyre only for FE7, unfortunately. Once again FE7 is treated better than all the other games. Sorry, but FE8 hacking never got my interest, and I dont feel like going to that game and having to figure out all the stuff that I already know about in FE7. D: //NewMacros //Most new macros are by Blazer. The CameraOff and FE7 allegiance codes as well as the rescue //code are all thanks to Arch. Some of the hex I got for the codes is in thanks //to Nintenlord and Icy Toast. //Please make sure you have the latest version of the Event Assembler and this file before using. //Please credit Blazer, Arch, Nintenlord, and Icy Toast if you use these. //Also, check to make sure that some of these macros don't have language codes made for them in //a newer release of the Event Assembler. Thank you and enjoy! #ifdef _FE7_ #define UnitClear "ASMC 0x7A8B9" #define Scroll(Box,Index) "CODE 0xA7 0x00 0x07 0x00; CODE 0x00 0x00 0x00 0x00; CODE Index Box 0x00 0x00; CODE $42; CODE $08083181; CODE $89" #define Reposition(Char,XC,YC) "CODE 0x2F 0x00 0x00 0x00; CODE Char 0x00 0x00 0x00; CODE $00YC00XC" #define UnitFlash(Char,Time) "UNCM Char 1b; STAL Time; UNCR Char 1b; STAL Time; UNCM Char 1b; STAL Time; UNCR Char 1b; STAL Time; UNCM Char 1b; STAL Time; UNCR Char 1b; STAL Time; UNCM Char 1b; STAL Time; UNCR Char 1b; STAL Time" #define MoveOff(Char,X,Y) "MOVE Char [X,Y]; ENUN; DISA Char"

#define TileMap(TCN,X1,X2,L1,L2,TilePointer) "CODE TCN X1 X2 L1; CODE L2 0x00 0x00 0x00; POIN TilePointer" #define Rescue(Char,Rescuer) "DISA Char; ENUN; UNCM Rescuer 0x10; STAL 0x10" #define CameraOff "CODE 0x3D" #define CameraOn "CODE 0x3C" #define Ally(Char) "CUSI Char 0x00" #define Enemy(Char) "CUSI Char 0xA7" #define NPC(Char) "CUSI Char 0x37" #define BlackOff "CODE $0C" #define QuintessenceEffect "ASMC 0x7D711; STAL 0x3C; ASMC 0x7D7B5; STAL 0x3C; ASMC 0x6CCB9; ASMC 0x7D771" #define LynModeEnding "CODE $58; CODE 0x30 0x0F 0xCC 0x08" #define UnitInvisible "ASMC 0x7A939; ASMC 0x7A9D5" #define Rumble "ASMC 0x7D645" #define MainCharPromote "ASMC 0x79AF5" #define DarkenScreen "CODE $E1; CODE $E0; CODE 0xFFFFFFFF; CODE 0x04 0x00 0x00 0x00; CODE 0x80 0x00 0x02 0x08; CODE $E2" #define MapColorChange(Speed,ColorByte1,ColorByte2) "CODE $E1; CODE $E0; CODE 0xFFFFFFFF; CODE Speed 0x00 0x00 0x00; CODE 0x80 0x00 ColorByte1 ColorByte2; CODE $E2" #define MapColorReturn "CODE $E1; CODE $E0; CODE 0xFFFFFFFF; CODE 0x04 0x00 0x00 0x00; CODE 0x00 0x01 0x04 0x10; CODE $E2; CODE $E2" #define LightningStrike(X,Y) "CODE $DD; CODE X 0xFF 0xFF 0xFF; CODE Y 0xFF 0xFF 0xFF; CODE $42; CODE 0x99 0x14 0x01 0x08" #define DefeatAllEnemies(pointer) "CODE $0E; POIN $pointer; CODE 0xE9 0x9F 0x07 0x08" #define DefeatBossGoal(pointer) "AFEV 0x00 pointer 0x02" #define IfPlayerUnitsOnly(evid) "CODE $48; CODE $01; CODE 0xF1 0xA2 0x07 0x08; ENUT evid; CODE $45; CODE $09; CODE $44; CODE $01" #define IPUO(evid) "CODE $48; CODE $01; CODE 0xF1 0xA2 0x07 0x08; ENUT evid; CODE $45; CODE $09; CODE $44; CODE $01" #define ENDPUO "CODE $44; CODE $09" #define LoadLynsModeFallenText "GOTO 0xCC0928" #define GUARD "0x03,0x03,0x09,0x20" #define ATRANGE "0x00,0x03,0x09,0x00" #define NOAI "00000000" #endif You can use them, of course, as long as you give credit. People who make programs, codes, and even nightmare modules all deserve some sort of thanks, IMO. Especially people like Nintenlord and Xeld who have contributed a LOT. Anyway, Ill cover each code briefly.

The UnitClear code is used in cutscenes to clear all the units off the map leftover from the battle. The Scroll code loads a scroll-esque box (the ones often seen in tutorials) with text. Box, Index is an old-fashioned way of dividing up the text pointer into two parts (sorry, my macros are not very efficient). Box would be the first part and index would be the second part. The Reposition code is used to move a unit without actually seeing them move there. The UnitFlash code is mainly for me, but anyhow, it makes a map sprite flash (appear invisible and visible repeatedly) as if though the unit is coming out of the shadows. The MoveOff code simply moves a unit off the map (you still need co-ordinates though. ) TileMap is a macro used for map/tile changes. Beware: it uses all hex for input. Youll learn more about this very soon. The Rescue macro simply makes it easier to rescue a character during a cutscene. CameraOff makes it so that the camera doesnt follow movement and unit loading all over the place. CameraOn undoes this by turning the camera back on (obvious, huh? XD). The Ally(Char) etc. codes just change the allegiance of a character to whatever you want. BlackOff is used A) when the chapter fades to black to start (you can change this setting in the Chapter Data Eidtor), and B) in a turn 1 scene when battle preps are set on, it is needed for reasons I cant explain. Pretty much, whenever you have battle preps, make a scene on turn 1 and include this code at the beginning of it. QuintessenceEffect does the quintessence sucking red wavy crap. You have to see it to know it. LynModeEnding makes the game go to the Lyns mode endings. UnitInvisible makes units invisible, supposedly. I got this code from NL, so Rumble is just a rumbling effect MainCharPromote promotes the main character (depends on the mode, idk if it works in Lyns mode). DarkenScreen is quite obvious. MapColorChange changes the color of the screen to whatever you input (has to be hex) and does it with the speed you input. Dont know what to input? Experiment and find out.

MapColorReturn returns the screen to its normal colors. LightningStrike makes lightning strike (its used in a very late chapter in FE7 by Limstella). The positioning would normally be controlled by 0xC0 and 0xF0, AKA (13,15), but its tricky. Do what you want with it, but I dont like having to deal with tricky special effects. DefeatAllEnemies and DefeatBossGoal are ways of making said goal conditions. They go in the Misc_events section. Of course, you have to input a pointer for them to go to. This is redundant because Nintenlord already made macros for them included in the EAs standard library. XP IfPlayerUnitsOnly checks to see if the current character is an allied/player unit. The shortened verison is IPUO. LoadLynsModeFallenText does exactly what it says. When a character is injured, text is typically loaded at the end of the chapter. Its supposedly done using this code. GUARD "0x03,0x03,0x09,0x20" is a shortcut for entering the guard AI. At the end of unit data I could put [Javelin,Vulnerary] [GUARD] and the unit would stay in his one spot, attacking whoever he can while staying still. It beats typing out the hex. Arch has some other useful AI macros you can use (see the Fire Emblem Shrine or Fire Emblem Universe for themcheck the documentation sections). If any of the macros dont work, dont get frustrated at me. The solution is simple: dont use them. Im being nice and sharing, so be nice and accept what gifts are offered to you. :P You can always contact me too so I can fix them. That works. Now that we know all about the codes used in events, we have to actually construct our chapter by putting everything together. Chapter 52: Event Construction Im going to make this chapter easy on myself. You look at a bunch of events and recognize all the codes used (because I explained most of them). Then you are like oh, this makes sense and you get a feel of how actually using the codes to build your events work. Right, Ive explained enough about events, so youll have to work it out on your own by looking at this chapter of mine from Tactics Universe. If you still need more help constructing your events, please look at Archs tutorial, found here-http://serenesforest.net/forums/index.php?showtopic=21165 #include EAstdlib.event //#include NewMacros.event this would load my custom macros. You can add a line like this //to load your own macro file, which can contain your own macros and macros by others. //I suggest you download Archs and my macros from the FEShrine as they are very useful.

org 0xC9C9C8+(4*0x5A) // - tells the game where the pointer to this chapters events is POIN Pointers // - makes the pointer org 0xCB2000 // - tells where to insert data Pointers: // label name POIN Turn_events // makes a pointer to turn events, same for others but different events POIN CharacterTalk POIN Location_events POIN Misc_events POIN Ballista_events Ballista_events POIN BadEN BadEH BadEN BadEH POIN GoodEN GoodEH GoodEN GoodEH POIN Opening_event Ending_event Turn_events: // name of turn events. Look how it matches with the POIN to the top. TURN 0x00 PreBattle [01,01] 0x00 0x00 // - creates a turn scene on turn 1 on the ally phase CODE 0x00 // ends structure events PreBattle: // the actual turn scene that is referenced in the turn event. be careful with //capitalization and spelling always! BlackOff // custom macro used to fade out of a black screen at the beginning of a chapter or // after battle preps ENDA // ends the scenic event CharacterTalk: // for character talks, most commonly recruitment conversations CODE 0x00 // ends structure events Location_events: Village(0x07,Village1,3,2) // creates a village with event ID 0x07 Village(0x08,Village2,3,8) // creates a village whose scene is Village2 Village(0x09,Village3,2,11) // creates a village with co-ordinates (2,11) Village(0x00,Village4,1,14) // village that can be visited repetitively due to 0x00 as event ID Door(9,14) // allows a door to be opened at 9,14 Door(10,14) Armory(WeaponShop,6,16) // creates an armory at (6,16) Vendor(ItemShop,9,17) // creates a shop with a list of weapons called ItemShop CODE 0x00 // ends location events/structural events Village1: Text(0x0D,0x970) // text macro that loads background 0x0D and text 0x970

ITGV KnightsCrest // gives a KnightsCrest to the active unit visiting the village REMA // removes graphics/returns to map ENDA // end scenic event Village2: Text(0x01,0x971) MONE 0x00 5000 // gives 5,000 gold to player, for villages (cutscene would be 0x01, not 0x00) REMA ENDA Village3: Text(0x0D,0x972) ITGV 0xA5 // gives item/weapon 0xA5 to current unit ENDA Village4: Text(0x01,0x973) REMA ENDA WeaponShop: SHLI IronSword SteelSword IronSpear SteelSpear Javelin IronAxe SteelAxe HandAxe IronBow SteelBow // list of weapons available at weapon shop CODE 0x00 // data separator ItemShop: // same structure as weaponshop SHLI Heal Mend Fire Thunder Lightning Shine Vulnerary Antitoxin CODE 0x00 Misc_events: // miscellaneous events, triggered events ALIGN 4 // prevents misalignment from shops CauseGameOverIfLordDies // when event 0x65 is triggered, game over screen will occur DefeatAll(Ending_event) // when all enemies are defeated, the game goes to Ending_event AREA 0x14 ItemFind [9,13] [12,14] // area event with event ID 0x14 called ItemFind. //Item can be found by waiting anywhere between [9,13] or [12,14] CODE 0x00 ItemFind: ITGV DoorKey // gives a doorkey REMA ENDA

Ballista_events: CODE 0x00 Opening_event: ALIGN 4 // prevents misalignment from ballista data CameraOff // custom macro that turns the camera off so it doesnt follow unit movement CAM1 [0,0] // moves camera to position [0,0] UnitClear // custom macro that clears all units from the field (redundant, no units loaded yet) BlackOff // custom macro that removes black screen CAM1 [0,0] ENUN // waits for event to finish/camera to move LOU1 Allies // loads unit group Allies ENUN // waits for units to move CAM1 [3,10] STAL 40 // stalls the game for time of 40, a short pause that helps the flow of events CAM1 [6,14] STAL 40 CAM1 [14,14] LOU1 Kelik // loads unit group Kelik (NOT necessarily the character Kelik) ENUN STAL 40 CURF [14,15] // flashes the cursor on (14,15) FADI 0x10 // fades in with speed of 0x10 BACG 0x0A // loads background 0x0A FADU 0x10 // fades out with speed of 0x10 TEX1 0x967 // loads text REMA // clears text and returns to map STAL 0x10 // stall, but with hex input ENDB // goes to battlepreps, one can alternatively use a macro Allies: // name of unit group/event label UNIT Sain 0x00 0x00 Level(1,Ally,False) [6,16] [6,16] [0x00] [00000000] // loads character Sain UNIT Lyn 0x00 0x00 Level(1,Ally,False) [3,12] [3,12] [0x00] [00000000] // class 0x00 // the game knows to load Lyns class as Lyn is already an allied unit in the save data UNIT 0x49 Myrmidon 0x00 Level(15,NPC,False) [14,15] [14,15] [0x00] [00000000] // loads level 15 NPC without autoleveling (automatically adding stats) UNIT Empty // unit separator to prevent glitches

Kelik: UNIT 0x02 0x00 0x00 Level(1,Ally,False) [16,14] [16,15] [0x00] [00000000] UNIT Empty

Ending_event: MUEN 0x05 // fades out of music at speed 0x05 FADI 0x10 BACG 0x0A MUS1 0x0038 // loads music 0x0038 FADU 0x10 TEX1 0x968 MNCH 0x17 // goes to chapter 0x17 (not exactly chapter 17, but the 0x17th chapter in the data) ENDA GoodEN: // allied units, controls positioning and # allowed in battle preps UNIT 0x02 0x00 0x00 Level(1,Ally,False) [16,10] [16,10] [0x00] [00000000] UNIT Sain 0x00 0x00 Level(1,Ally,False) [8,12] [8,12] [0x00] [00000000] UNIT Lyn 0x00 0x00 Level(1,Ally,False) [16,4] [16,4] [0x00] [00000000] UNIT Empty GoodEH: // allied units in hard mode (you can limit the # allowed in battle preps) UNIT 0x02 0x00 0x00 Level(1,Ally,False) [16,10] [16,10] [0x00] [00000000] UNIT Sain 0x00 0x00 Level(1,Ally,False) [8,12] [8,12] [0x00] [00000000] UNIT Lyn 0x00 0x00 Level(1,Ally,False) [3,4] [3,4] [0x00] [00000000] UNIT Empty BadEN: // normal mode enemy units UNIT 0x49 Myrmidon 0x00 Level(15,Enemy,False) [16,2] [16,2] [0x9C] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Archer 0x00 Level(10,Enemy,True) [14,15] [14,15] [ShortBow,IronBow,Vulnerary] [0x00, 0x03, 0x09, 0x00] // loads inventory of ShortBow etc. UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [18,13] [18,13] [SteelAxe,HandAxe] [0x00, 0x03, 0x09, 0x00] // unit has AI of attack in range (00030900) UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [2,12] [2,12] [PoisonAxe,Vulnerary] [0x00, 0x03, 0x09, 0x00] // unit DOES autolevel (set to true) UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [10,6] [10,6] [IronAxe,HandAxe] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Pirate 0x00 Level(10,Enemy,True) [6,7] [6,7] [HandAxe,Vulnerary] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Fighter 0x00 Level(10,Enemy,True) [15,6] [15,6] [SteelAxe,HandAxe] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Mercenary 0x00 Level(10,Enemy,True) [7,3] [7,3] [SteelSword] [0x00, 0x03, 0x09, 0x00] UNIT 0xB3 Mercenary 0x00 Level(10,Enemy,True) [12,10] [12,10] [PoisonSword,Antitoxin] [0x00, 0x03, 0x09, 0x00] UNIT Empty

BadEH: // for hard mode units UNIT 0x49 Myrmidon 0x00 Level(15,Enemy,False) [16,2] [16,2] [0x9C] [00000000] UNIT 0xB3 Archer 0x00 Level(12,Enemy,True) [14,15] [14,15] [ShortBow,Longbow,Vulnerary] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [18,13] [18,13] [SteelAxe,HandAxe] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [2,12] [2,12] [PoisonAxe,Vulnerary] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [10,6] [10,6] [IronAxe,HandAxe] [00000000] UNIT 0xB3 Pirate 0x00 Level(12,Enemy,True) [6,7] [6,7] [HandAxe,Vulnerary] [00000000] UNIT 0xB3 Fighter 0x00 Level(12,Enemy,True) [15,6] [15,6] [SteelAxe,HandAxe] [00000000] UNIT 0xB3 Mercenary 0x00 Level(12,Enemy,True) [7,3] [7,3] [SteelBlade,Vulnerary] [00000000] UNIT 0xB3 Mercenary 0x00 Level(12,Enemy,True) [12,10] [12,10] [PoisonSword,Antitoxin] [00000000] UNIT Empty

org 0xC9C9C8+(4*0x59) // - Pointer to tile map changes POIN TileChanges // repoints tile changes org 0xCB1F00 // puts data at offset 0xCB1F00 TileChanges: // list of tile changes TileMap(0x00,0x03,0x02,0x01,0x01,VillageGate) // tile change #0 (0x00) TileMap(0x01,0x03,0x08,0x01,0x01,VillageGate) // top-left tile of change is [0x03,0x08] or [3,8] TileMap(0x02,0x02,0x0B,0x01,0x01,VillageGate) // [0x02,0x0B] = [2,11] convert to hex TileMap(0x03,0x01,0x0E,0x01,0x01,VillageGate) // w/ your head or a calculator TileMap(0x04,0x09,0x0E,0x02,0x01,TownGate) // tile area is 2 tiles horizontal, 1 tile vertical CODE $FF // terminates tile changes CODE $00 // above CODE $00 // above VillageGate: // name of tile data group CODE 0x80 0x00 0x00 0x00 // one tile [0x80,0x00] use reference tilesets to obtain hex TownGate: CODE 0x24 0x08 0x28 0x08 CODE 0x00 // separator to prevent mixing of data

Hopefully youre on your way to making your own chapter with all the knowledge you have. All thats left is some finishing touchesfirst, Im going to cover tile changes in detail, and then well work on the finishing touches (using the Chapter Data Editor to finish your chapter construction). Chapter 53: Map Tile Changes Heres the run-down of how I set up tile map changes to work in the EA. Although Im sure NL could work this out much better than I have, heres something that works and doesnt require you to do it in hex, but together with the events in the EA. org 0xC9C9C8+(4*0x??) // - Pointer to tile map changes POIN TileChanges org 0x???????? This repoints the tilechanges to your new tile changes and sets them to be at offset 0x???????? (you have to put in the offset, of course). TileChanges: TileMap(0x00,X,Y,XL,YL,TilePointer) CODE $FF CODE $00 CODE $00 Creates a label called TileChanges which contains data for the tile changes. TileMap(blob) is a macro. The first byte in the blob is a sequential byteit starts with 0x00 and goes up. Co-ordinates must be in hex (sorry) and are from the top-left of the map, as always. (X,Y) is the top left tile of the area that changes. XL and YL are the lengths in tiles to go horizontally (XL) and vertically (YL). TilePointer is the name of a label with the data for the tiles that it will change to. For example, if you have a 2 by 2 room that changes and the top left tile is (18,10) youd do TileMap(0x00,0x12,0x0A,0x02,0x02,Room). TilePointer: CODE (Tile hex) CODE $00 CODE (Tile hex) is the hex of the tiles. You write out the hex of the tiles from left to right (and then going down the rows). So if my tiles were 0xD0 0x04, 0xD4 0x0C, 0xD8 0x04, and 0x5C 0x07, for example (I just chose random tiles), Id do: Room: CODE 0xD0 0x04 0xD4 0x0C

CODE 0xD8 0x04 0x5C 0x07 CODE $00 To know which tiles to use, you need to have the co-ordinates of the tiles. You need something to referencethats where there are reference tilesets. Unfortunately they are only for FE7, which is the bad part. You can find FE7 Reference tilesets in the documentation part of my website (yes, in the doc part, I know). Heres what one looks like:

You cant see it very clearly in my image because mine is resized, but at the top and to the left there are numbers. If I wanted say, the open chest tile, Id use 0x04 0x00. That is, I use the column it is in (the numbers at the top), and then use the row it is in (numbers to the left). The #define stuff is just the definition for the Tilemap macro. I wouldnt edit it if I were you. Now if that wasnt good enough for you, you can check out Icy Toasts old tutorial on tile map changes in hex. You can find it here- http://www.feshrine.net/hacking/downloads/icy_map_guide.txt (you have to go down the page to find the part on tile changes though). Chapter 54: Chapter Creation Finishing Touches Before were totally finished we should fix up some of the stuff in the Chapter Data Editor. Itll help out with our chapter creationwe already have the maps and events, so now its onto the other stuff.

Ive already been through what all this does, but anyhow the triggerable map changes byte should be the one for your chapter and it should match the byte in the Tile Map Changes part of your events. If the Preparations Screen is turned off and you try and load battle preps (ENDB), it wont work. If its ON and you dont load battle preps, idk whatll happen, but it could screw up as well. Just make sure that the events match the setting in the CDE. If you used ENDB/GotoPrepScreen at the end of your opening scene, the game will try and go to the battle preps, but only if it is enabled. And, of course, if preparation screens are on, remember to have an event on turn 1 with the BlackOff code (for FE7, anyhow). Make sure your weather and battle tileset match your map/what you want them to be. Change the map music around as well if you want.

Just showing some more music you can change. Its better to use the Chapter Opening BGM thing instead of your own event code to load the music at the beginning of the chapter. (I use 0xC3 Nothing in this screenshot, but I actually have custom music inserted over it, so it actually does play a song, mind you)

Changing your chapter name/number text is a good idea. Again, make sure your event data reference byte is right, and if you dont want a worldmap chapter prologue scene, set that byte to 0x00. Also, take care of the augury text if needed (on later chapters in Eliwoods mode Hannah or whatever her name is will appear and the augury option will be turned on).

More augury text and the portrait and the price, obvious stuff. The Preparation Screen Ch. No. only has to be worried about if you have battle preps on. Its what it displays as the chapter at the top.

See where it says Chapter 10? Thats what Im referring to. Anyway, the Merlinus co-ordinates are easy, as is the Winning Road byte. The chapter title display fadeout is somewhat important because it dictates how your chapter starts off. If its fade to black, you need to use the black off code to fade out of the black and onto the map, IIRC. *alternatively you could TRY the FADU or REMA code, but I cant say itll work*

Just a few more things we might want to take care of. Youll probably need to change your objective/goal text, and possibly the goal window information. If you are doing a defend or timed chapter of some sort, a turn count would be nice. For the protect character marker, see the original chapter on Chapter Data editing. The tile marker would be used in like an escape chapter to specify where the unit should escape to. XP Now save any changes in the Chapter Data Editor and exit. Assemble your events (I say how in like the first chapter on Event Assemblyyou just input the text, output the ROM, hit the game you are assembling for on the right, and hit Assemble) and fix any problems there are. Test your events out as well. There are many, many places you could make errors in, even if the Event Assembler doesnt report an error in your events. (It only reports stuff that it cant properly interpretit doesnt say whether the event will turn out like you actually want it to in-game, it doesnt know that much.) Here are some things to check if youre having errors: Names of definitions. If you use say IronLance and it doesnt work, thats because the weapon is defined as IronSpear. The EA is case-sensitive. IIRC sometimes weapons like Armorslayer are spelled Armourslayer (although I could be wrong about this specific case). If you arent sure what a macro, definition, or code is, look it up. If you arent sure what a code does, see if I explain it, and if its one of the few codes I didnt cover, ask a question about it on a forum or something. If the game says that certain things arent word-aligned, look at where the error starts. That is if it says Opening_scene: and everything beyond isnt word-aligned, then look BEFORE that for

something that might somehow mis-align it. The code ALIGN 4 should help realign stuff afterwards, by the way. If you cant load even up to the main menu, its very possible that your chapter name is too long or something. Try changing it. If the game screen goes black after starting the chapter, you may need the BlackOff code. Otherwise, try changing the Chapter Title Display thing in the Chapter Data Editor (I will reference this as the CDE from now on). Always double-check your pointers in Nightmare and the such. Dont forget about adding 0x08000000 to your offset. If it says X is an invalid name its likely because you didnt actually make a scenic event, but you made the base event for it (an event that points to said event). If it says some code isnt supported, check the format. This is likely to happen in Unit Data if you forget a byte or make a typo or something. Remember, use FADI code to fade into black, run some background eventsstuff the players dont need to/shouldnt see happen, and then use FADU to fade out to either the map, a dialog background, or CG. If battle preparations arent loading, check the Battle Preps byte in the CDE, or check to see if you used ENDB (for FE7) or GotoPrepScreen (for FE7 and FE8, maybe FE6, idk for sure). It IS possible that the EA isnt working properly somewhere. Make sure its not your own mistake first and then report it and see if a problem is the EAs fault. The EA is pretty well done, but its easy to make a small error somewhere. When asking for help on events, post your script! Knowing how to ask questions is imperative. Post a script, a patch, and a savestate. That way people have the information to help you. Sometimes screenshots and videos are useful too. Dont forget CODE 0x00, ENDA, or UNIT Empty at the end of a group/label/event. CODE 0x00 is for the main framework events (turn, character, location, misc, and ballista events), ENDA is for scenic events, and UNIT Empty is for units, if you forgot. If your map isnt loading, there are various reasons why it may not load. Its probably a pointer problem though. If it loads but looks weird, either your map is corrupted or you are using the wrong tileset. See the map chapter(s) for more information. Sometimes if you forget the BlackOff code units may not load or move properly. There are many weird glitches that come along with not using this code, for whatever reason, so beware. There are many, many codes and macros that can be used. See if one of them can fit whatever you need. If it happens in the original game, it can probably happen in your hack too, so sometimes analyzing other events by disassembling is useful.

Thats all I have to say to help you for now. With that, I hope your custom chapters are success!

Chapter 55: Importing Tilesets

Ever wanted to use a tileset from another game? This tutorial will teach you how. Its actually a very simple conceptlocate the data in the game that has the tileset you want, copy it, and repoint it. Thats it.

In this example Ill import the Valni tileset into FE7. First I load Nightmare, an FE8 ROM, and the event table editor. I locate the tile config, object, and palette I want to use. In addition, Im going to transfer a map, just so I can test that the imported tileset works without having to make my own map.

Wow, I sure am lucky! All the offsets I need are right next to each other! Ill start with the object type. This is what it looks like:

I have to go to this offset and copy the data there. But how do I know to stop? Well, I have to know by finding the offset of the object type that comes before it. This is object type 10.

I go to object type 10 and see the offset 0x8165F7C. So the Tower of Valni object type ends at 0x165F7C. So I go to the offset 0x1609BC and copy the data from there to 0x165F7C using a hex editor. Pic below:

Then I paste it into some free space in the game I am importing to. I will use 0x1040000 in this example/for this tutorial. Now I have to do the same thing for all of the other data I am importing. Actually, importing most data (aside from ASM, animations, and data that has pointers inside of it) works like this, so importing a tileset is nothing special. =O Once Im done copying the data from one game and pasting it into another, I have to repoint the data in the other game. Since I am importing into FE7, I open nightmare and load the Event Reference Module. I can replace an existing tileset and repoint the old pointers to the new tileset info.

(This just shows me repointing the Dragons Gate tileset to something else. You can also replace other entries besids tileset entries but you have to edit the Chapter Data Editor dropdowns to let you select said bytes, and you have to know what you are doing in general its too complex for me to explain it, sorry.) Anyway, as said, do that with each part of the tileset (and the map as well) and then enter the bytes into the Chapter Data Editor per normal.

Err, youll notice my thing is sort of kinda uh hacked so that there arent any dropdowns. This is because having dropdowns is often times limiting because I cant enter any value I want to. D= Anyway, once thats done, load up your ROM, test your map, and enjoy your imported tileset

Chapter 56: Animation Importation Chapter 57: Custom Battle Animations Frames Okay, now this is one cool aspect of Fire Emblem hacking, in my opinion. In fact, if you want to have a good hack, you need at least a couple of these. In my opinion, of course. Part 1: Briefing A custom battle animation is just what it says. When you play Fire Emblem and you have animations on and you use say, Eliwood, to attack a bandit, you see a red-haired guy with blue armor stab a shirtless dude with an axe. Each of those characters has their own animation. An animation, in case you dont know, is like a bunch of pictures shown right after each other to give the appearance of movement. You can google for more details.

So yes, we can have our own animations. That is some great stuff. But, you have to make the spritesthe little guys who do the movingas well as format the sprites, which I will cover in this tutorial, and then script the sprites. Where do you get sprites? Well, you can always make your own battle sprites. You could also use other games sprites, assuming they are 16 colors or less, because battle animations must be 16 colors or less. You could also request someone to make a sheet (collection) of sprites for you, AKA an animation. But getting the sprites is YOUR problem. I can edit existing Fire Emblem battle sprites myself, which is an important skill, because most of the time in hacking, you have to be able to supply yourself with the things needed to hack. Part 2: The First Frame Anyway, onto actually making the animation. What we are going to do is create individual still images of each part of the animation. Each image is called a frame.

That right there is my first frame of Kelik, an original character of mine. Hes standing. I call it my standing frame, AKA an idle frame. Hes not doing anything. Hell be in this position at the beginning and end of battles, as well as when he gets hit, and just while he isnt doing anything. Its also the base frame I use for every other frame. So its important. How did I get this frame? Well, I do everything in MS Paint, personally. To start, you need a 248x160 image. 248x160 means the width is 248 and the height is 160. The reason why is because the GBA screen is 240x160 pixels. The extra 8 pixels in the width is where you can put your battle palette. So I open MS Paint and make my image with dimensions 248x160.

Then, I fill in my image some color that has a very, very low chance of being a color in my battle palette. Since Kelik is not green, Ill put in green.

Okay, thats really all you should have now. Next, we put in our sprite. Now, we want our sprite to fit in with the battle background, platforms, template, and other animation. So we want to make sure its feet are at the right level.

Its hard to see, but at the bottom-right it shows the co-ordinates of the pixel I am hovering over (which you also cant see, but my invisible cursor is at the bottom-left of his left foot, our point of view). It says 143,101, which is about right. The near foot should be about 100 pixels down. The body should start showing up about 140 pixels to the right. Granted, if you have a bigger sprite, you might need to make some adjustments. What you must do is paste your sprite and then position it in that general area to get a good alignment. Generally if the left foot is at about (142,100) you should be good, but theres no specific rule. By the way, an important feature you should know how to use is the opacity/transparent control feature of MS Paint, which is to the left. When using the select tool, you can make a color transparent, or see-through. The default color to be see-through is white; however, you can right-click any color on the image and make that the transparent color. Youll know its the transparent color because itll show up as the other color at the far-left of the color box at the top of MS Paint. For example, if I right-clicked green (which is the background, so it should be transparent), the color box would look like this:

The transparent color is circled in orange. However, your toolbox must also have the appropriate setting on for that color to be transparent:

Do you see the blue-highlighted box at the bottom? The top one will make the background color (green) opaque, as in, it wont be transparent. If you click the bottom box, the color WILL be transparent. Its that simple. Anyway, back to making the frame. You should have something like this, but with your own sprite:

Next is an optional part. I highly suggest you do it. I call it palette preparing. You see, FEditor Adv can automatically detect your 16 color palette for you, but sometimes, it just kinda acts silly and messes up. Other times, you may want to have a specific order to your palette, e.g., if the animation you are inserting is a Pegasus knight with axes, and you want it to be compatible (palette-wise) with the lance Pegasus Knight animation. If you dont care for this, you can skip it, but dont blame me if your palette acts weird later.

Part 1B: Palette Preparing So, what you are going to do is place all 16 colors of your palette in the top-right corner. The very top-right color must be the background/transparent color, and the colors after that can be in any order you desire. How to get the colors? You can either manually use the eye-dropper tool and select each color and then place one pixel of it in the top-right corner, or you can use the Usenti method, which I invented. To do the Usenti method of palette preparing, you must first download and open Usenti. It should look like this:

Then, drag your image (standing frame) onto Usenti (or use File->open to open your standing frame). At the right is a palette box. It has a list of all the colors used in that image. Because battle sprites must be 16 colors or less, your palette should be no more than 16 colors. (Having more than 16 colors is a spriting issue, so if it IS more than 16 colors, ask some spriter how to get rid of colors.) Here is my palette box:

As you can see, there is one row, or 16 colors. Now what you must do is take a screenshot of Usenti by pressing the screenshot button on your computer. Then, open up a new window of MS Paint, and paste your screenshot into that window. Then, using the select tool, find the 16 colors in your palette box, select them, and copy them. This is what Im talking about:

Then, paste that bar into your standing frame image, near the top-right, and zoom in, like so:

Now we have some colors here that arent actually apart of the palette. Im talking about the red, white, and green outline, as well as the black stuff in between, and the grey outline. We

need to get rid of all that, which can quickly be done by usingt he bucket tool and making all those dumb colors into the transparent/background color (dark green in this case).

Great, we have what we need. Now we use the eyedropper tool to select each color and put one pixel of it in the top-right corner. Watch.

Do you see the colors at the top-right? The very top-right pixel is the dark green background color, with the rest of the colors to the left and below that. Just make that the area of the palette space is 8x2 pixels (8 times 2 = 16 colors), i.e. one row should only have 8 colors. If you by some chance dont have 16 colors and have like, 14 colors, just make the rest of the area dark green (transparent color). Now, delete the big squares of colors, and save your image, which should look something like this:

(Note: Im zoomed in at 2x or 200%) Part 2: Testing the Foundation to Your Animation You now have one frame. Wooh, that may have seemed like a lot of work. In fact, your first time, it probably will be, especially since you have to read my long, detailed explanations of how to do everything. But once you know what youre doing, it should only take 5 minutes, if that. Now that we have one frame, we can base every single other frame off of this one, because the palette is set-up (well, maybe it is). However, to be safe, we are first going to test your animation, to make sure that the first frame was made right. WHAT?! WE ONLY HAVE ONE FRAME?! Yes, but that one frame will be the basis for every other frame, so it better work right! Well just make a simple animation script. It starts with a text file, a simple notepad file ending in .txt. Since my guy is named Kelik and his class is Legend and he uses a sword, I appropriately called him Kelik Legend (Sword).txt.

Since Im nice, Ill give you guys a template script. As long as you have one frame called standing.png, it should work. Which reminds meALWAYS SAVE YOUR FRAMES AS PNGS. Why? Because BMPs take up a lot of space, and I always use PNGs, so itll be easier to follow this tutorial if you do too. Plus, if I remember correctly, FEditor Adv only accepts 24bit bitmaps, and I could explain that to you, but I really dont want to. -----------------------/// - Mode 1 C03 C07 3 p- standing.png /// - Attack Frames C04 C1A C1F /// - Frames after hitting but before stopping to wait for HP depletion C01 /// - RETURN TO BASE 3 p- standing.png C06 C0D ~~~ /// - Mode 3 C03 C07 3 p- standing.png /// - Critical Frames

C04 C08 C1F /// - Frames after hitting but before stopping to wait for HP depletion C01 /// - RETURN TO BASE 3 p- standing.png C06 C0D ~~~ - Mode 5 C03 C07 5 p- standing.PNG C05 4 p- standing.PNG C01 4 p- standing.PNG C06 3 p- standing.png C0D ~~~ - Mode 6 C03 C07 5 p- standing.PNG

C05 4 p- standing.PNG C01 4 p- standing.PNG C06 3 p- standing.png C0D ~~~ - Mode 7 C02 2 p- standing.PNG C0E 3 p- standing.PNG C01 2 p- standing.PNG C06 2 p- standing.png C0D ~~~ - Mode 8 C02 2 p- standing.PNG C0E 3 p- standing.PNG C01 2 p- standing.PNG

C06 2 p- standing.png C0D ~~~ - Mode 9 3 p- standing.png C01 ~~~ - Mode 10 3 p- standing.png C01 ~~~ - Mode 11 3 p- standing.png C01 ~~~ - Mode 12 C03 C07 3 p- standing.png /// - Attack-That-Will-Miss Frames C04 C1F /// - Frames after hitting but before stopping to wait for HP depletion C01 /// - RETURN TO BASE 3 p- standing.png C06

C0D ~~~ - End Animation Data ------------Everything between the dashed lines is part of the template script, so copy and paste it into your text file. Then save it. You now have a working script. You dont know what it does though, because I havent taught that, and I dont plan on teaching it. Ever. In this chapter. :P In all seriousness, all it does is show the standing frame for literally every single animation mode. But thats cool enough for us. Lets crank up FEditor Adv with our ROM so we can insert this bad boy. Oh, but quickly, a review of what we have: one frame called standing.png with the sprite and the palette at the top-right that we spent forever making a script that we gave a nice name to with the codes I provided you

Thats it. And both items are in the same folder, because I said so (hint: put them in the same folder).

OSHI- ITS FEDITOR ADV Yes it is. This is the Class Animation Creator. What you want to do is hit the Load from Script button. Then, select your .txt file animation script. FEditor Adv will run through it and stuff. If your script is error-free and so is your image, nothing will come up. If some error does, heres what you should check: size of image (should be 248x160) file type of image (PNG? if that somehow doesnt work, try a 24bpp bitmap) palette (if you didnt prepare the palette, try doing that. If you did, make sure its less than 16 colors!) script is .txt file with what I gave you Blazer (check to make sure he isnt being dumb and didnt forget something or mess up something? if its none of the above it might be this >_>)

At the end, in the small dialog box at the bottom, it should say Mode: Complete if its all done. NOTE: IF IT GIVES IN AN ERROR YOU MUST HIT RESET ANIMATION BEFORE YOU TRY TO INSERT THE ANIMATION AGAIN. I ALSO SUGGEST HITTING QUIT AND RELOADING THE EDITOR IF FEDITOR ADV IS GIVING YOU PROBLEMS. (If youre wondering why I bolded that, I got an e-mail saying that someone got stuck for 1-hour because they didnt; and admittedly its not the most obvious thing in the world and I should have mentioned it, so yeah, here it is.) Heres the dumb part. You have to save the animation by clicking save to file. I usually make a new folder called Animation Data within the folder where I am keeping all my frames and the animation script, and I save it in there. Just name it something logical and then go to the Class Animation Manager in FEditor Adv.

Okay, so now you have to find the animation you want to insert over. You type in a new number into the Input Index, which neatly corresponds to the animation list supplied in the folders of Nightmare Modules.

Once you find the animation you want to replace, you hit Insert and find that one file you just saved with the Class Animation Creator part of FEditor Adv. Let FEditor Adv do its shit, then save your ROM with FEditor adv.

If all goes well, your guy should be standing, kinda like this. And thats all the sprite should be doing, because you only have one frame. If its just doing that, and its looking hella boring, thats great news. We can now go on and make every other frame. If there are some issues, we gotta fix them. The main issue that comes to mind with this is the palette issue. You see, a custom battle animation has its own palette. You can force a character to use that classs battle animations palette by setting their palette in the character editor to 0x00. Look:

You see the blue box? Its set to 0x00 because this character has a custom animation. The animation we are inserting has the palette for us, so we dont need to assign the character another palette. This may or may not be the case for your animation. If its another problem, I cant be a psychic and predict and address it here, so I suggest posting on a forum or something to get some help with it. Make sure to post your animation script and the frame (and possibly a patch that lets one test the animation quickly or a screenshot showing what it looks like) or else theres no way to really tell what the might problem be. Anyway, back to the ideal situationeverything works. Now we exit out of FEditor and Nightmare and go back to that standing frame in MS Paint.

Part 3: Making the Rest of Your Frames

Looking good, kinda. Now, we have to make the rest of the frames. You can start with whatever mode you wantattack, critical, range, range critical, or dodge, but ultimately, every time you do a new animation mode (a part of the animation), you should start with the standing image. Now, if you already know how to animate images, this is going to be a piece of cake. If not, well, itll take some practice and tweaking to get right, but have patience. You need to copy the sprite from your sprite sheet and paste it onto MS Paint. Using the transparency feature of MS Paint which I explained a while ago is quite useful.

Can you see how the selection of Kelik I copied over has some green, and that green is covering over the old Kelik? Its really hard to position my new pose over the old pose like that. So I turn on transparency, and wala:

Now I can drag him around until I get him to align with the last sprite. In this case, hes only supposed to move his chest/head while dodging (because hes slick like that). Since his feet arent moving, I can position the feet of this new pose over the feet of his old pose.

Wait, I can still see his old pose hiding behind there! Yeah, thats a problem. Thats why once you align the new sprite/new pose over the old one, you can change the transparency mode to make it un-transparent, which will get rid of the old sprite. You should see what I mean:

(Notice how transparency is turned off using the box on the left toolbar) Okay, we have another frame set-up. But its still called standing.png. Thats a problem. Using file->save as, save it as something else. Since this pose happens to be a dodge pose, Ill call it dodge1.png. Thankfully, Im lazy and I only made one dodge sprite, so there isnt even a dodge2.png. Haha. Now that Im done with that animation mode (that was quick), Ill do another one. Doing the range mode frames is pretty easy, because chances are, your character wont have to move much. That is, you dont have to worry about whether a weapon will actually hit an enemy, and there probably wont be much feet movement, or jumping, either. My point is, I dont really have to cover that too muchjust put the frames and know that the game will take care of showing the actual spell animation (for example, when the ice tornado forms and the ice block shatters in Fimbulvetrthe game will take care of that for you). Physical attacks, however, are a bit harder. If youre a mage, your attack animation and ranged animation are the same. If youre like Kelik, and youre a swordsman, your ranged animation is only used for ranged swords, while your attack animation is used for melee (close-up) attacks, so its different. What makes physical attacks harder is just keeping track of the sprites movement. You dont want it too high or too low. Remember, foot level is about 100 pixels down (its not some

difficult number like 126.38 so no complaining). Your guys sprite should start about 140 pixels to the right. And the enemys center is typically at about (90,85) so that is where a weapon should slash through or whatever, approximately.

If you look at an actual screenshot of a game (even though this is a hack), you can see that there really isnt too much space between the two enemies, so keep that in mind. Heres a screenshot of one of my attack frames. This is when the enemy is actually being hit.

Its hard to see as usual, but at the bottom-right is the co-ordinate (92,87), which is ALMOST at what I suggested (the co-ordinate (90,85)). You could check the feet too and see that its at about 100 pixels down.

What is the significance of all this info? Why am I telling you? Well, during your attacks, you have to make sure the sprite will actually reach the enemy, but not have its sprite go too far into the enemy, or make it look like your characters weapon is just BARELY hitting the enemy. Not only that, but you need to make sure that when your character moves back to his/her starting position, they are at the right placewhich is why you always use your standing frame as a base to make sure your animation flows smoothly and that all other frames are aligned. Now, were ALMOST done learning about making frames. I know, we havent even gotten to the coding, but thankfully coding is easier than this, or at least not as time-consuming. One important thing I must show you how to do is piercing frames. The first example that comes to mind is a Knight. When he stabs an enemy with his lance, the lance doesnt just appear right over the enemy sprite. It kinda actually looks like the lance is going through them, even if there is no blood.

This is not the example I was talking about, but whateveryou can see that the thief sprite somewhat covers the Generals spear a little, the point being it looks like the weapons going through him. Well, you have to make a special version of a frame for this effect. This new frame will have a size of 488x160. You may have guessed already: the frame consists of 2 screens, each being 240x160, side-by-side, for a (240x2)x160 or 480x160 image, with an 8 pixel column for the palette, just like before.

Now, Im gonna have to be a bad kid and switch my example animation to another one, because Kelik, the red-jacketed sword guy Ive been showing, doesnt use piercing frames (he slices, doesnt pierce). First, this:

Then, this:

(Note: the name a13p stands for attack13pierce, as in, attack frame #13, which is a piercing frame.)

This is actually a very easy-to-do maneuver. The left portion of this frame is everything that DOESNT pierce. Its the 240x160 image of everything but the weapon. And the right portion of this frame is the sword; it pierces. If there is an enemy there, the enemys sprite will have priority over the sword, making it so that the enemy sprite/body covers the sword. Making it look like the sword went through the sprite in short, piercing. Once you set that up, youre good to go. With piercing frames out of the way, you should now know how to make all your frames for your animation. I need you to do that, so we can FINALLY head on to the next chapter, which will cover animation scripts, and how the game will receive your animation.

Chapter 58: Custom Battle Animations Scripts Oh my. In the previous chapter, you made your animation frames. Now, we have to code them. That little template script I gave you will be the basis for that, but your REAL animation script wont be that simple. First, you need to go to FEditor Advs doc and find the very important list of 0x85 commands to use. I could explain the significance of the name, but it wont help you with your hacking. In case you cant find it on your own, its in the Battle Animations folder, which is in the doc folder, which is in the main folder of FEditor Adv. Its called 0x85 Command Usage. Now go, read it. Yes. Read the ****ing doc. I just pulled a Xeld. Had to do that at least once in this tutorial. Okay, I will now go ahead and explain the template animation script I gave you, since you read the doc and you have some background on a few things, maybe. First, there are 12 animation modes. Each mode needs its own codes and has its own significance, except for modes 2 and 4. Ill explain each in order, so Ill get to modes 2 and 4 very shortly. Mode 1 is the attack mode. Its the main attack that hits and does damage. But its not a critical, and its only used in melee (close-up) fights. Mode 2 is the above, but its sprites are layered BEHIND the enemy. This is how piercing is done: in the piercing example in the previous chapter, the piercing sprites are put behind the enemy, if need be. Its automatically coded for you based off of the frames and mode 1, so no worries. Mode 3 is the critical attack. It works the same as mode 1, but activates with a critical.

Mode 4 works the same as mode 2, but applies to mode 3. Consider it the piercing mode for critical. Mode 5 is for ranged attacks. This means attacks that load spell animations, but dont actually hit themselves. Mode 6 is the above, but for critical ranged animations. Mode 7 is the melee dodge. Close-range dodge. Enough said. Mode 8 is the ranged dodge, for ranged attacks. Kay? Mode 9 is the standing animation. Its just for standing. Yes, you can have an animation for standing guys, but good luck getting it to work right. Mode 10 is another standing animation. Or so the doc says. If I knew what the difference between mode 9 and mode 10 was, I forgot, or else Id tell you. Mode 11 is the last standing animation, for ranged attacks. If by some chance your character stands differently when hes farther away from an enemy, then by all means use this mode to make your character stand differently. Mode 12 is the missed-attack animation. Its what happens when an attack misses. Its usually very similar to the normal attack animation. Okay, now that we know that, Ill cover how to actually code each mode. To be honest, once I teach you the first mode, the attack mode, the rest will be a piece of cake, because the key to doing each mode is using 0x85 commands to spice up your animation. 0x85 commands can add sounds, special effects, and other stuff. But mainly sounds and special effects. In mode 1 for the template, we have: /// - Mode 1 C03 C07 3 p- standing.png /// denotes a comment. So - Mode 1 is ignored C03 and C07 are important codes. Just keep them. (NOOO!!! DELETION!!! EVARRRRR!!!!!!)

3 p- standing.png is important. Its the graphic-loading code. So its very important. 3 is the time for the frame to be shown. 3 isnt very long. When you test your animation, youll see for yourself. Its hard to tell you how long 3 is, so youll just have to play around and test different values and find out what looks good. Just know that the time must be a positive integer greater than 1 (e.g. 1, 2, 3, 4, 5 etc why am I counting?). p is just part of the code. standing.png is the name of the frame to use. Make sure the frame is in the same directory/folder as the script, or else youll have problems. Now, onto explaining the rest of the script: ------------------------/// - Attack Frames C04 C1A C1F /// - Frames after hitting but before stopping to wait for HP depletion C01 /// - RETURN TO BASE 3 p- standing.png C06 C0D --------------C04 is just what the doc says. It starts HP depletion. Keep it always when there is a hit. C1A is the normal hit code. Just keep it next to C04, please. Oh, and you can only have one of these. C1F is the hit sound. It actually changes depending on whether the attack is a critical or not and stuff.

C01 is the code that says wait for HP to deplete completely before continuing the animation. Whatever frame is right before that is the frame that will show until the HP is done depleting. C06 says start enemies animation sequence. And C0D ends the animation. So logically, you will most likely just want them next to each other. Thats the basis to the attack animation. Its quite simple, no? You can add lots of frames (although if you have too many frames in an animation, the game wont be able to take it, and problems that I cannot help you with will ensue), and you can also use other codes listed in the doc (0x85 command usage text file). For example, the doc says 0x1B Play quick "heavy step" SFE. How do you use that? Simply put a C in front of the hex and give it its own line. Like so: C1B Thats it. Then it will play that sound (which happens to be a stepping sound, which you will probably use in animations that move). If you dont know what a sound sounds like, just test it out with your animation and find out. Experiment with the codes if you need to. Oh, theres one thing the doc might have missed out on though. There is a special code that works like this: S####. S stands for sound. Its a sound code. Xeld made a special hack that made a new code that will play any sound. #### is the hex of the sound. Oh, and it can play music, too. If you need to know the hex of the song or sound or whatever, just look it up in a music list that comes with Nightmare Modules. Last thingif your attack has multiple hits, you CANT USE C1A. So you have to use C51, which is like a fake hit. It makes the screen flash white, but it doesnt add those blue things. But oh wellits still cool. Using C51 and C1F in conjunction will give the illusion that the enemy is being hit. The idea is like so: ATTACK FRAME ATTACK FRAME C51 C1F JUMP FRAME RAISE SWORD UP

SWING DOWN FOR THE BIG FINAL CRUSH C04 C1A C1F Where the C04 / C1A / C1F is the final hit, where the HP finally depletes. Now that mode 1 is done, comes explaining the rest of the modes, which will be easy. Mode 2 will be done for you. Mode 3 works the same as the critical, except instead of C1A, it uses any value from C08 to C0C. I usually just use C08 because I know it works and while I dont know what the other ones do, I am guessing that it is just a difference in the color of the critical hit effect. Mode 4 will be done for you by FEditor Adv as well. Mode 5 is the ranged mode, as we know. Instead of a hit with C04 / C1A / C1F, you put C05, which loads the spell animation. And thats all there is to itC05 will take care of the spell/ranged weapon or whatever. Mode 6 is the above, but the critical. You know how to put frames together and add in codes to make it look and sound cooler, so go do that. Mode 7 and 8 will probably be the same, since they are dodges, and most people dont really care to make their dodges different. Put the actual dodging frames after C0E, and the return-tostanding frames after C01. Remember that the frame before the C01 will be the frame that the sprite stays on until the move is completely dodged if that doesnt make sense, dont worry about it. Heheh Modes 9 through 11 can be some animation, but just know that the animation is just the idle frames, so it shouldnt be anything special. I usually just keep it as my standing frame, which makes 3 modes automatically done, because all the template does is use standing frames in the first place. Mode 12 can just be a copy/paste of mode 1, but with the attacks taken out. Meaning that, if you have multiple attacks, you need to put the C04, which will make the enemy do their dodge, during the first attack, or else itll look like *slash slash slash* *dodge the final slash, no damage* and itll just be wtf. So if your animation looked like:

C03 C07 ATTACK FRAMES C51 C1F MORE ATTACK FRAMES C04 C1A C1F OTHER ATTACK FRAMES C01 RETURN TO BASE C06 C0D ---------Itd turn into ---------C03 C07 ATTACK FRAMES C04 MORE ATTACK FRAMES C01 RETURN TO BASE

C06 C0D ----------If you didnt notice, I moved the C04 back to BEFORE the first attack (remember, an attack can also be C51 / C1F), and I got rid of the hit sounds and hit effects, or else itd look and sound like they were being attacked even though they dodged. With mode 12 done, your animation script is done! Save everything and check for errors. You may have written something and forgot to comment it out, or you may have accidentally forgot to press enter and might have something like C51C1F on one line instead of two lines. You may have also typed c23 instead of C23, which mattersthe C in commands MUST BE CAPITALIZED. Also make sure you typed in all the file names for your frames right. With the proofreading done, you can now insert your animation, which you already know how to do, because you once tested the very basic animation in the previous chapter. Insert it, and test it, and see how it is. Is it too fast? Make the timings larger. Is it choppy? Well, youd have to add more frames, so thats a spriting issue. Do the sounds work right, and how well are they timed? Try playing around with the order and timings of things to fix that. Are there too many effects, or not enough? Delete/add commands as need bethe 0x85 command usage list found in FEditor Advs doc IS YOUR FRIEND. Lastly, are the frames aligned well? If not, go back to the frames in MS Paint and try and figure out whats wrong. Touch-up your animation and make sure its looking nice and spiffy. Be sure to test out the attack, critical, dodge, ranged, and ranged-critical animations, and anything else that might need testing.

Mine looks pretty nifty. He looks like hes having a staring contest with the Dragon! D= Wait! Theres ONE LAST THING! Your animation needs a disarmed animation. Ill just tell you how to do itnow that youve done the main animation, you already have more than enough skills to code the disarmed. Simply make the disarmed frames based off of the standing frames, and then keep the bear bones to every mode, while replacing all standing frames with the disarmed standing frames, and making sure to remake the dodge frames into the disarmed dodge frames. Since there are no attacks, youll save yourself trouble if you just make the attack modes just have one frame of your character standing there disarmedno one will know, and it saves space and time (since FEditor Adv doesnt have to process all the attack frames and codes). Thats all there is to it. I know I say that and youre like thats all? that took forever! but once again, even a complex animation with 50 frames could only take a few hours once you know how to do it. Ive probably (I never timed myself) done animations in less than 30 minutes, or even quicker, for short ones that only have a dozen or so framesso its really not that bad, and in the end, its worth it, because theres nothing like enjoying your awesome animation ingame and sharing it with others who play your hack. ^_^ Chapter 59: Custom Spell Animations

Oh my. Custom spells. It is one of the hardest things to do in hacking, and one of the most mysterious aspects of hacking. Very few people have done custom spells successfully, and very few know much of anything about this. Of course, this is where this chapter comes in. This is actually the very final chapter I am writing for this tutorial, despite the order. Every other chapter has been completed as far as I know (there are so many I cant be sure). This is also going to be one of the lengthiest chapters, despite the fact that I am going to try and be concise and straight-forward as much as possible. Before you advance, please make sure of the following: You are able to insert your own custom battle animations. Many of the aspects of battle animations are very similar to spell animations. If you cannot do the former, you have little hope of doing the latter. You have a lot of free time and patience. You should have some basic knowledge of the following terms: opaque, transparency, background, foreground, object, translucent, frame. Knowing the definitions and understanding them should be sufficient. You have some spell sprites to work with. I of course cannot supply you with those. It is up to you to make or find them.

Alright. Let us begin.

Before we start, we must check the spell sprites you have. The spell sheet as a whole does not have to be 16 colors, but each individual frame has to be 16 colors. Thus we will not be quantizing colors to change images to 16 colors (if they arent already) until we have made the individual image first. You will need FEditor Adv and an image editing program. I suggest Usenti if your computer supports it as that is what this tutorial will use. It has the ability to reduce colors and do basic graphic operations in a simplistic manner. It was also intended for GBA use, if you didnt already know, and so its just perfect for GBA hacking. If Usenti does not work for you you either A) need to know how to do the same things with a program like Photoshop, PSP, or Gimp or B) are screwed. This is why I always stick to Windows, that and all the other reasons.

But anyway before I get e-mails about how Macs are better (>________> longface) lets get on with the show. Create a folder for all your spell frames. Include everything in therereference videos, the spell sheet, the README, and a blank text file named [Spell Name] Script where you will code your spell script. In my case I am actually doing the entire process for this tutorial (not just faking it) and am inserting a spell called Shaver. The spell frames are ripped from Fire Emblem: New Mystery of the Emblem ~Heroes of Light and Shadow~, and thus they have more colors than the GBA supports. They are also not in the perfect format for GBAFE. Thus the process will be thorough and I may do something that arent necessary for you but may be necessary for certain spell animations. tl;dr Im trying to covering everything. There are two main layers for spells: the object and the background. The object is always opaque. The background can be set to be translucent. The level of translucency is decided by the script. Thus you wont be doing any fancy photo-shopping to create translucency. It will all be done by the game. You must divide your spell sheet into these two layers. This is up to you as this is a spriting matter. Decide which is which. To start, well want to test a very basic spell script. Start with two blank frames. One will be a blank object frame, and the other will be a blank background frame. To do this you must know the dimensions of the frames. The documentation on spells that comes with FEditor Adv will help with this (and possibly other things) so take note of this.

Object:

Background:

I named mine blank and blankbg respectively for sake of ease. You may just want to name yours something even shorter like bo (blank object) and bbg (blank background). Im too lazy to rename mine though. If youre using the doc version of this tutorial you may be able to just copy the images into an image program and save them. If youre using the HTML version (online) you should be able to right-click them and hit save image as to save them. If youre using the PDF version all I can do is suggest you try another version or simply make an image knowing the dimensions, 488x160 and 264x64 respectively. The background color does not particularly manner but I suggest making it something that will not clash with any of the spell frames (or perhaps it should clash to standout and rather not blend in with any of the spell frames) and something that will most obviously be the background color. When you have those two frames copy this into your spell script text file (just a standard .txt file): /// - Start Animation C00 C00 C00 C00 C00 C00 C00 C000040 O p- blank.PNG B p- blankbg.PNG 1 C00001A C1F ~~~

O p- blank.PNG B p- blankbg.PNG 1 /// - End Animation Noting that blank.PNG and blankbg.PNG change depending on the filename and extension of the blank object and blank background files respectively. Now open up FEditor Adv with your ROM. I always use a testing ROM for my animations and back-up the test ROM so that if something screws up, nothing bad that I cant fix will result. I always perfect it in a test ROM and if your hack gets messed up because you tried to do this straight on your real hack, dont blame me. Though you cant blame me for any of this as this is just a profit-free guide to hacking and youre using it out of your own will with no responsibility or liability on me. ANYWAY Open up the scary spell animation inserter under tools. Should look like this:

Dont freak out. Most everything on the top half is for manually making spells. We are using a script so this is not necessary. Scripts are much, much bettermuch more convenient, much easier to use, much

easier to fix, much easier to share. So just forget about everything before the Add Miss Terminator button, including that button. Max index refers to the max # of spells you can have, which you can change to increase the amount of spells you can have. (Derp) Input index refers to the spell animation hex that is, which animation youre replacing. You should be able to find a list with any spell association editor, that is the nightmare module named so, though I believe its oddly called the Custom Item Animation List module for FE8regardless heres an excerpt from the FE8 list (named Ranged Attack Animations.txt)

74 0x00 - Nothing 0x01 - Hand Axe 0x02 - Arrow 0x03 - Javelin #1 0x04 - Javelin #2 0x05 - Javelin #3 0x06 - Javelin #4 0x07 - Javelin #5 0x08 - Javelin #6 0x09 - Javelin #7 0x0A - Javelin #8 0x0B - Javelin #9 0x0C - Javelin #10 0x0D - Javelin #11 0x0E - Dance/Play (Regular) 0x0F - Dance/Play (Regular) 0x10 - Ballista (Glitchy Arrow)

0x11 - Nothing (Stalls Battle Screen) 0x12 - Sword of Seals Fire 0x13 - Flametongue 0x14 - Fa's Holy Dragon Stone (BGM/SFX-kill) 0x15 - Iodun's Dark Dragon Stone (Mirrored) 0x16 - Fire 0x17 - Elfire 0x18 Nothing As you can see the hex is on the left with the name of the spell animation on the right. If you didnt already know, anything that is a projectile is considered a spell, including javelins, arrows, and hand axes-it doesnt have to actually be magic. This is just to simplify the naming of things, its easier to refer to everything as spells. I am going to replace 0x16, Fire, because it is very easy to just get a mage unit to use Fire. In fact, my animation testing ROM has a save state with a mage (with a custom battle animation nonetheless) using Fire, so this is totally perfect. *wink* Regardless of whatever you replace youll likely need to use Nightmare to get a situation where you can actually test the spell animation. I also suggest upping the critical a little bit and keeping Nightmare handy so that you can ROM hack the character or weapons stats as to force misses, hits, criticals, etc., to test various different situations. If you know how to RAM hack to change those stats on the spot, thats even better, but I wont teach that here. Back to FEditor Adv, type in the input index and load your script using the obvious button. There should be no errors unless you somehow got the wrong image or typed in the wrong path in the script. When its done the log at the bottom will show some stuff but not much else will happen. You have to hit terminate animation to finish the spell insertion and insert it to the input index. In the case that youve messed up, be sure to hit reset animation before loading a script again, or youll load over an existing script. Lastly if you want to dim the screen you can click that box. For things like arrows and javelins you probably wont want that but actual magic spells will probably want the screen dimmed to make it more authentic as most if not all spells do so.

When its inserted the spell animation hit quit and save with FEditor Adv. If you need to, setup a mage or something to use the spell (using Nightmare or the Event Assembler or whatever is needed) and test the animation. Just be sure to close FEditor Adv after youre done so that you dont end up overwriting changes (see the chapter on how to have good hacking habits, wherever that one is, and why you shouldnt have FEditor Adv and Nightmare opened up simultaneously).

Congrats! Youve inserted your first spell animation! Its especially bland and should just involve a basic hit and a quick screen dimming. Thats the point thoughto make sure you know how to insert it. Now all we have to do is add in actual sprites and spice it up with some codes. Easier said than done thuogh. Now were off to making frames. Im going to start with the object frames first because I feel they are easier. The image is divided into 3 parts: a 240x160 section, another 240x160 section, and an 8x160 section. The first section is the foreground. I think. Its the sprite that shows up in front of the battle animations. The second 240x160 section (P.S., 240x160 is the size of the GBA screen, which you should know from the battle animation tutorial) is the background. Its what appears BEHIND the battle animations. All you have to do is copy/paste your spell sprite to the appropriate section depending on what you want. As for actually knowing where to put it, that is an animation issue, which is more of an artistic thing. I suggest taking a screenshot of the GBA game and finding where you want your spell to start, then taking the pixel co-ordinates of that point, doing that as you animate the frames. Again, the battle animation tutorial teaches this so I will NOT go through this in detail. If the frames are already fit to be 240x160 and animated for GBAFE, then that is absolutely awesome. Just one more reminder: the spell should assume that the screen is NOT shifted. The screens view sliding/shifting is a trick of the game, a code in the script.

The final portion is for the palette. You can enter in a palette like you did battle animations but its tedious and mostly pointless so I suggest leaving it as the transparent color and FEditor Adv + the game will handle the rest. Hextator did a good job of making this convenient, no? Props to him. XP Believe it or not this Shaver spell I am inserting does not have ANY object frames; everything is translucent and thus I have to use the background frames. However here is an example.

I suggest saving each frame as a new file numbered in the order they appear. Take note that you load an object frame and background frame at the same time so one sprite may appear simultaneously with another. Oh, the beauty of spell animations. The object frames are a bit more of a pain in the butt. They are 264x64. Yes, only 64 height, when the screen is 160 pixels. You see, these frames only use a specific portion of the screen. 160-128=32. They ignore 32 pixels. 16 on the top of the screen, 16 on the bottom. Why is it 64 height? The image is resized to be half. Why? Hextator (the creator of FEditor Adv and the CSA system) had to do this in coding the new spell animation format. He actually made a completely new system for spell animations. Thats why everythings so different. And he worked hard on this. I would know. I was there. So live with what you get and dont be a whiner. ^_^ The actual width of the actual image here is 256x64. The last 8x64 portion is of course for the optional forced palette. The image is 256x64 because you have to remember that the screen can slide here in which case the range of the spell can become more than just 240 pixels, if you get what I mean (if you dont get it, dont worry about it; act like everythings normal). Time to do this. For my spell animation, my ripped frame starts off looking like this, though I happened to pick a frame in the middle just for a first frame test (once we make our first background frame, along with the object frame we learned to do earlier, were going to do another spell insertion test).

Oooh, shiny. However, that wont do for insertion. Gonna take off the bottom half first, then resize it to 240x160.

Well it still looks pretty good to me. So lets remove 16 pixels off the top and bottom then since this part of the spell only takes part in the middle area

All thats left is to resize it to half again:

Add the 24x64 portion to the right to make it 264x64:

Aaaaand make it 16 colors. Oh wait, how do we do that? Well, I use Usenti (found on google).

Palette -> Requantize -> #colors = 16, OK Result:

Thoughts: Blegh. The quality has gone down. Even if the image will ultimately be stretched back to 240x128 height like it should be (thats just how these frames work, has to do with the transparency), the post-resized result

wont be as good as the original and now that it onlny has 16 colors it doesnt look nearly as shiny or cool. And what can we do? Not much. Thats hacking for you. Especially on the GBA system. There are limitations. You cant always get what you want, definitely not get it to be perfect. If you get it even close you should consider yourself lucky. So we suck it up, save the frame, and go to our script to add it in there: To do that though, you have to learn about the format of scripts. Before I go through a script though, I suggest you open up the 0x85 command list for spells (found in FEditor Adv\doc\Custom Spell Animations) and readup on that a little. Just a little, for old Blazer here. Then you can read my explanation of each code below. /// - Start Animation always at beginning C00 buffer code. Stalls. Needed. If you encounter random looking graphic or palette errors you probably need some of these. Sometimes if the spell progresses too fast it loads the wrong palette or other data in the VRAM or elsewhere interferes with the spell. In short, just add these and take it easy. C00 C00 C00 C00 C00 C00 C000040 makes the screen slide. Always have it, and early. O p- blank.PNG object frame, followed by the path. This code must be proceeded by the next two codes, they are all jumbled up together, you cant load one frame by itself. Or if you can you couldnt back in the day. :P B p- blankbg.PNG the background frame. Same deal. 1 the length of the frame. 1 is the shortest. Has to be a whole number. 3 is like slow. Most frames will probably be 1-3. This is more of an animating thing, but you can test different times yourself to get a feel for it. C00001A hit code, must have

C1F hit sound, recommended ~~~ - miss terminator. This makes it so that the animation stops if a miss occurs. Stupidly enough this HAS to be after hit code, meaning you cant have an animation miss before it would have hit. It has to miss after it would have hit. Yeah, I know. Silly and inconvenient. Thats life. O p- blank.PNG another frame loading code identical to the one above. Nothing special here. B p- blankbg.PNG 1 /// - End Animation - ends loading code from the animation script

Now that thats explained, let me go through the command list: 0x00 through 0x13 (except 0x08) - Ignored/unused self-explanatory 0x08 Attack (becomes critical automatically) with HP stealing never used this before but I believe you use it either instead of C00001A or after C00001A. Find out for yourself if youre really curious. 0x14 through 0x28 - passed to attacker's animation; it is recommended that all possible caster/ spell animation combinations are considered such that no combination conflicts this means that using a code with one of these command values is like using a code for the battle animation user, not for the spell. Youd have to see the 0x85 command list for battle animations to know what codes C14-C28 would do. 0x29 Set brightness and opacity levels for the background. opacity refers to the translucency (the opposite in a way) Argument XX is the brightness level from 0 to 100% (0x0 through 0x10) 0x00 = 0, 0x10 = 100%, values in the middle reflect a percent in the middle Argument YY is the opacity level from 100% to 50% (0x0 through 0x10) 0x00 = 100% opacity (can see everything), 0x10=50% opacity (is translucent and you can see halfway through). As above, values in the middle reflect a percent in the middle. 0x2A Sets whether maps 2 and 3 of the GBA screen should be visible. Argument YY is the boolean for whether to display those two maps:

The value 0 means "false to display"; all other values mean "true". thus C00002A would stop maps 2 and 3 from being visible, C00YY2A where YY is any value but zero would mean it shows. This is used to make parts of the screen black. 0x2B through 0x3F - passed to attacker's animation; see note above see my own note above, heheh 0x40 Scrolls the screen from being centered on the attacker to being centered on the defender. This should not be used more than once per animation. has been used/explained before 0x41 through 0x47 - passed to attacker's animation; see note above see my own note above again. teehee 0x48 Plays sound or music whose ID corresponds to those documented in Music List.txt of the Nightmare module packages. - very awesome code, used for almost all sounds. Is pretty much explained enough already. Argument XXYY is a 16 bit music ID. 0x49 through 0x52 - passed to attacker's animation; see note above for commands 0x14 through 0x28 bla bla bla, see above 0x53 through 0xFF - Ignored/unused derp Okay, now that Ive broken down the format of and the possible codes used in spell animations, we can start adding in some own frames and codes. Heres the bulk of my script for my next test: C000040 C100D29 Set brightness to 0x10 = 100%, and opacity to 0x0Dgiven that 100%-50%=50% = range of opacity change, and 0x10 = 16 values, 50/16=3.125 meaning each increase in 0x01 is equal to a little bit more than a 3% decrease in opacity. 0x0D =13 x 3.125% = 40.625% opacity decrease. 100%-40.625%=59.375% opacity level. Thats some math for you. =D O p- blank.PNG this frame load here is just a buffer blank frame load thats good to have B p- blankbg.PNG 2

C02F948 this is command 48, loading sound 02F9, which happens to be a swishy sound Im testing out (to see if it fits Shaver). O p- blank.PNG B p- s1.PNG another frame load but this time Im loading frame s1, the new background frame I made. Since I applied an opacity change code it should appear somewhat translucent. 10 the length is 10 to make sure I can see it clearly, since this is just a test of one frame. C00001A (after this the rest of the script continues on) Wooh. Alright, time to save our script and test it. Here goes nothing! Oops! An error! How do we figure out what went wrong? Well, thankfully were early on so we only have a few frames to check and a few codes to check. Sometimes itll say that an images dimensions are wrong, in which case you must of course check that. Other times FEditor Adv might be a bit more cryptic and say:

Great, I could have told myself that. Thankfully the log can help us a little. We can look at the last frame it attempted to load and check that frame and the codes around it for any errors. \Shaver (DS)\s1.PNG Okay, s1.PNG. Wait, thats the new frame I did! Whats wrong? After a look at my programs, I realized I never saved my 16color version (yes, this actually happened to me, haha, and it was a perfect chance to write about it). If it were a code problem I could have looked at this information:

0x85 command count for this spell: 10 Animation frame count for this spell: 1 To see how many codes and frames were loaded to see how far the program was into the script before it crashed, and then search that area of the script because the error would HAVE to be there. Once the error is fixed, just hit reset animation and load the script again. Terminate it, quit the spell inserter, save, and test. Hopefully the frame works outif not, try changing the settings or positioning of things around as needed. Granted its just the first REAL test frame so there shouldnt be too many quirks. Once thats done, youve all the knowledge you need to go ahead and start making all the spell frames you need. If you forget how to do something, just look backyouve already learned the whole process, youve just yet to do it. After all, if you can make one frame, you can make a million ofm. Oh and heres my frame as a little farewell present:

Its true! It did work! Its 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! ^That there was my real final present. A spell. A spell Of confidence! Good luck! And make awesome spells! Ones that will shock the world! Im done herethis was the final chapter I wrote! So goodbye, my friend! ~ Blazer

Chapter 60: Weapon Icons Ah, weapon icons. For the custom items and weapons you make to ever be complete, youll need custom weapon icons. Even if you dont have them, you may just want to make the old icons look better. You may even want to edit some other icons besides weapon icons. In any of these cases, youll need to be able to edit the icon graphics. Before I get started, I am just going to let you know that while this is called Weapon Icon Editing, not everything you edit is a weapon. Its just simply easier to refer to them all as weapon icons than weapon, item, and miscellaneous icons. Hopefully you can tell why. ^_^ There are several ways to go about this process but I am only going to teach the best way that I know: thus if you have learned the TLP method or another method and want to know more about that, I am not going to help you here, as I have no intention of endorsing completely inferior (IMO) ways of editing weapon icons. To start, youre going to need GBA Graphics Editor, a graphics editing program by Nintenlord that you have hopefully acquainted yourself with. If you havent, you may want to check out chapter 45, Working with GBAGE (GBAGE is the abbreviation for GBA Graphics Editor which I will henceforth use to refer to the program). Open the program and your ROM. Immediately switch the graphic type to uncompressed graphics, as weapon icon graphics in all games are uncompressed graphics. Then proceed to enter in a graphics offset and palette offset according to which game you are using:
FE6 Weapon Icon Graphics: F9D80 FE6 Weapon Icon Palette: FED80 FE7 Weapon Icon Graphics: C5EA4 FE7 Weapon Icon Palette: CBEA4 FE8 Weapon Icon Graphics: 5926F4 FE8 Weapon Icon Palette: 5996F4

Thanks for the offsets goes to the people who originally found them, whoever they were. They are much appreciated. Once you do that (my example is FE7)

You should see this:

Or something similar dependning on your game. Note that my ROM is hacked and thus I have some different weapon icons; however, it should generally look quite similar. 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. However, to make it look better, you can change the width to 2and I suggest you do this as it aligns the weapon icons perfectly. Now you have the height issueat a width of 2, the height controls how many weapon icons show up. First of all, it should definitely be an even number. After that, its up to youyou can just have one icon show up by making the height 2, or have a bulk amount show up (noting that GBAGE has a limit to the height so you cant make them all show up at once at width 2). For bulk amounts, I suggest a height of 64. This gives you many weapon icons in one column and also makes it easy to remember the offsets of the next set. Look: with these settings,

I have this show up:

Where the bottom icon is the steel axe icon. As you may already know, the icon after the steel axe is the silver axe. Well, if I just add 0x1000 to my offset of 0xC5EA4, I get 0xC6EA4, which is the start of the next set, starting with Silver Axe. Looky:

Sorry for the really tall images, but Im trying to make a point here. I personally save each set as a bitmap using the Save as bitmap option, naming the image after the offset I can find it at in GBAGE. After that, its time to edit the image. However, we have to worry about the palette, which we cannot, or rather, should not, disrupt. Most importantly you must use the same 16 colors for all the weapon icons, and nothing more than those colors; and if you wish to replace those colors, edit the palette using a hex editor, NOT with GBAGE, as it is much safer to use a hex editor. You may be able to edit the image in MS paint or an equivalent image editing program (hopefully something better) and get away with it, but I personally suggest googling and downloading the paint-look-alike Usenti if your computer supports it. It is very good at keeping palettes in tact in the exact order you save the image as. You see, when you save the bitmap, the palette comes with it. To prevent not only the colors but the order from getting mixed up, well, Im not sure, but I know that if you use Usenti to copy or edit the image, the palette will rarely ever mess up. Thus when you import the bitmap,

the same 16 colors in the same order will be there and your images palette wont screw up and trust me, itll be VERY obvious when it screws up. I still screw up sometimes. Another suggestion is that you save the image as PNG. There are reasons for this but mainly it makes life easier as PNG is just the easiest image format to work with in my honest opinion, and its easier not to complicate your minds with more knowledge that likely wont benefit you. When you DO import the new edited bitmap when youre done editing the weapon icons, youll want to have it insert to the same offset you ripped at, which is why its very useful to note offsets, or do it like I do and name the image after the offset so you cant forget it and dont have to go looking for your doc on what graphic is where. Youll want to import the graphics and check the abort bla bla bla but dont import the palette or anything else, just keep the palette offset at whatever it was at.

It should look something like that. Because the graphics are uncompressed they should always take up the same amount of space as they used to, so if you did everything right you should never run into a space error. Despite this, there IS a limit to the number of actual weapon icons you can have unless you repoint the data.

You can see after the red musical note that there is a bunch of pixels that doesnt look like graphics at all. They are actually other data but the program interprets all hex as a graphical form in uncompressed mode and so thats what the data looks like if you tried to view it. My point is that its NOT stuff you can just replace, its important data and your game will likely screw up badly if you mess with it. This is why if you run out of weapon icons to replace, youll need to repoint. For FE7, you may need to apply the Item Icon Bug Fix patch by Xeld/Hextator/Obviam which can be found with FEditor Adv in this directory: FEditor Adv\asm\Fire Emblem 7\Item Icon Bug Fix. See the IPS patching or JFP patching tutorials on how to do that. I dont know about there being any problems with this in FE6 or FE8. Theres one last thing I want you to know, and its about the other icons in there. What icons? These ones:

Woah howd I get them to show the right palette? Well, the palette for these should be the one right after the palette for the weapon/item icons. Thus all you have to do is click up on the palette index once and you should get it.

Like above, where it says Palette index. With that, youve the knowledge to make your complete custom weapons, so congratulations! Chapter 61: Map Sprites Before you get started on learning how to edit map sprites, I suggest you read: Chapter 45, Working with GBAGE Chapter 60, Weapon Icon Editing

As they prepare you for use with using GBA Graphics Editor and I am not going to explain things as detailed here as I have done in previous chapters. First you must find the location of the graphics. You can either: A) Scroll through GBAGE until you find the map sprites (I suggest using greyscale width 2 as it will make it much easier to recognize them). B) Use the offsets from a map sprite module, if one exists for your ROMI dont think one exists for FE6. In the case of A, open up GBAGE, open your ROM, and scroll through until you find them. They will be compressed and they will all be bunched together so feel free to skip sections of the ROM that you know they wont be in (for example, if you start seeing spell animations, skip past them, the map sprites wont be in between spell animations). They are likely in the first half of the ROM (though I dont guarantee anything). In the case of B, youll need to open up Nightmare and take the offsets from the map sprite modules. The standing one is for idle poses, the other one is for moving posesyes, they are separate images.

Youll want the animation pointer (which should really be labeled graphics pointer, as the another pointer is really the animation data heheh). Stick that into GBAGE. If you are using the other module (for standing sprites), use the Pointer to graphics.

Note that the size should change depending on the size of the image. A width of 1 is equal to 8 pixels; thus a width of 2 is equal to 16, and 4 is equal to 32. The height does not matter much as the data is compressed so GBAGE will only show as much data as there is. I just keep my height at 32 and set the width to 2 or 4, usually 2, depending on what is needed. This is important in viewing the image properly.

We now need an appropriate palette. Depending on the game, type in or copy/paste the map sprite palette to the palette offset slot. FE6: 0x100968 FE7: 0x194594 FE8: 0x59EE20 After applying the palette the image should look nice. If it isnt aligned change the width/height accordingly. If the palette is still messed up double-check you did the right offset.

For different palettes (allegiances, greyed out, and secret ones), press up on the palette index. You can get various different palettes. For example, this one:

To edit the image or save it to import it elsewhere, use save as bitmap and preferably save it as a PNG. I suggest using a program like Usenti that will maintain the colors and order of the palette so that when you re-insert the image, the palette does not screw up (see weapon icon tutorial for a more length talk about this issue). When you import a bitmap youll want to check the following:

As usual a palette menu will come up, hit okay and it should insert. However, if it does not, this means the old graphics take up more space than the new ones (and for the record, this may happen even if the size is the same or the image is less complex, so do not freak out). In this case you must repoint the graphics by typing in a new graphics offset to free space and checking repoint graphics pointers on the above menu, then reinserting. That is all there is to it. Good luck! With your custom classes! Chapter 62: Proper Betatesting Theres a proper way to do most things in life, and that includes beta testing. You might think its not a big dealjust play the game and look for glitchesbut if you want a professional hack, you need it professionally tested, or the next closest thing, which is what Im going to detail in this chapter. To start, a beta patch may or may not come with a README and other files. If the betatest is one that is practically meant to be released to the public (has patching instructions, readme, etc., along with the patch, of course) youre going to want to make sure that all the files are clear and it is not confusing as to what is what and how one should go about playing the game. Once you actually start playing the game, its time to analyze everything you can while playing the game. For example, if there are different modes (normal, hard) youre going to want to play both (or at least test it out, maybe use cheats to expedite the betatesting process if you dont have time). You want to check out the balance of the game, the graphics, and of course TRY and cause glitches, because its better that a betatester encounters it when they are testing than when an ordinary person is playing the game. This chapter is/is going to be (I just know as Im writing this that its going to be) text heavy. But to make it easier (wall of texts get boring quickly) Im just going to write 50 things you should know about betatesting a game, and call it a day.

50 Things to Know About Betatesting 1. Make sure that the download isnt confusing, nor is extracting files or patching the game. 2. Watch all the scenes in a game. Dont even skip the opening, even if the creator of the patch hasnt altered itit might have been accidentally edited. 3. Check for spelling everywhere. If youre not a good speller, have a spell-checker nearby for words that you think might be spelled wrong.

4. Check for grammar everywhere. I guess in part to be qualified as a good betatester, you kind of need good grammar. Simple stuff like your and youre is given, but also runon sentences and stuff. Of course, if the author intends to use bad grammar in dialog as a means of ones personal type of speech, or if the game leans toward bad grammar for humorous purposes (or some other obscure purpose), you might want to just ignore the grammar part. But in general, good grammar = good game. 5. Press buttons. Just try pressing random buttons, and see if something odd happens. 6. Check all modes of the game in the main menu to see that they are working properly. 7. In games like Fire Emblem, you may need to check help menus. In Fire Emblem, this is done by pressing R, and may also give character or class descriptions, which hackers often forget to change. 8. Listen to all the songs in the sound room (if there is one). 9. If you hear a song play in game, make sure it also appears in the sound room (applicable only to some games). 10. When you hear a song in game and its custom, have it loop at least once if possible, not only to make sure it loops, but to make sure that the whole song plays without any problems. Songs from the original game are less likely to be glitchy (and if they are, theyll probably be obvious). 11. On games with maps (like Fire Emblem, of course) check all the tiles on the map. Sometimes tiles may act funny (you may move onto non-existant tiles, or tiles may appear crossable but not be, or something else weird). 12. In dialog, make sure that there are pauses in between to let the player read the text. This may mean having to press a button to continue, or just having text go slowly. 13. Always look for weird pixels or graphics that might show up somewhere. 14. If you do encounter a problem, take screenshots and videos to show where it is. 15. If a problem occurs, it is very helpful to take a savestate (shift+F1-F10, then press the F# button to reload a savestate slot) and then give that savestate to the author of the hack so s/he can access the glitch without having to play through the game. 16. Use all characters in the game at least once.

17. Keep animations on to ensure that you see that battle sprite are working and are colored properly, amongst other things. 18. Look at stats to make sure that they arent working weird either (crazy high stats, stats that change on their own, -- stats, etc). 19. Also test animations off to make sure map sprites are working right. 20. Listen to soundsmake sure the right sound effects are being played at the right time. 21. Look for balance in enemy numbers and your numbers. In a game like Fire Emblem, you typically dont want 20 allied units and only 10 enemy units. 22. Look for balance in unit strength. One of your units shouldnt be so broken that they can solo an entire chapter (barring the first few chapters, where there are usually only a few units on the entire map). Similarly, the enemies shouldnt be so hard that theyre better than your own units, or so weak that they have a 30% chance of doing only 2 damage, or something as ridiculous as that. 23. Analyze the map. Boring maps with a simple path to the area one is trying to go to are boring and should be edited. The terrain should be as diverse as possible while still adhering to the plot (if the characters are in a desert region, theres typically not going to be a lot of grass or trees or civilization, of course). 24. Pay attention to consistency in the plot. This includes names, characteristics, and plot details in general. 25. Visit all villages and other places on a map you can possibly go to. This includes looking for secret shops. 26. Analyze the plot to see which characters can be recruited or perhaps check for character relations. Also check for gaiden/secret chapters and how they might be reached. 27. Think to yourself if I werent a very smart person, and question how confusing the plot may or may not be? Is there something that doesnt make sense, or perhaps a character doesnt get enough time to develop themselves? 28. Check for repetitiveness. If every enemy has the same inventory, or only 1 or 2 classes are used for all the enemies on a map, or the same reinforcements constantly come, players wont feel very excited to play on the map. These things may detract from the enjoyability of the game.

29. Always try both paths. Try killing off units to check their death quotes, or losing to get game overs. Its possible someone forgot to code in a game over event! 30. Look for suspicious areas on the map. Sometimes there may be hidden secrets on tiles you dont expect. 31. Check enemy inventories to see if there are any weapons that they have, but cant be used, as well as droppable items. Its possible a hacker meant to make an item droppable but didnt, so question it, even if its meant to be stolen by a thief. 32. Question things that might be right, because they might be wrong. If some unit has lethality as a skill, it might have just been a test. A weapon might accidentally have 100 critical because the player was testing a critical! 33. If there are custom animations, test all different aspects of the animation. This includes dodge, magic swords (if applicable), close and far range, etc.; and the same thing applies to custom spell animations. 34. Check to see if something is missing in a game. If one of the characters mentions that the enemy has ballista but you dont see ballista on the map, the hacker likely forgot it, and its your job as a betatester to let them know. 35. Expanding on the multiple path idea, use savestates to test out possible split choices. A chapter may have two ways to beat ittry both. You may be given a choice to do X or X. Use a savestate, try one, go back , and try the other. Do this every chance you get to make sure things turn out right. 36. Custom cutscenes are often full of problems. For instance, the camera may not follow a person, or may jump around if multiple people are loaded. It might even glitch up sometimes while not glitch other times. One thing is that cutscenes sometimes glitch up if you watch the scene, get to the battle preparations, save, and then restart the chapter, so try it out to see if theres some major problem. 37. If a certain weapon is broken, suggest to the author that they tone it down. 38. Make sure PRF weapons are actually limited to a certain character (or maybe class) and arent apocryphal. 39. Check to see that custom classes behave as they shouldfor example, a class on horse will need the move again ability, and will need the knight icon. A custom flying unit will need the movement ability to flow over mountains.

40. Always look for unedited text and other aspects of the game that should probably be edited. This is tricky because its not a glitch or a bug as much as it is something the author simply didnt do. Sometimes character/class/item descriptions, death quotes, battle quotes, or even certain dialog may have been forgotten to be edited. Someone may have left a support of two characters who arent supposed to support anymore, or have left an enemy with a weapon that has been edited to be a customized weapon enemies arent supposed to have. 41. Try all the different menus in the game. For example, a hacker may have edited a background somewhere, and that same background may be shared in the Options menu, but they may have forgotten to edit the palette (coloring) of the background, and so it may look weird. If you dont check that menu, you wont know! 42. The game shouldnt be too difficult or too easy in most cases (unless that is the purpose of the hack). Take into thought that you may be a better player at a game than most other people, and so the game might be too difficult for the average person. 43. Actually test a little bit of hard mode to make sure that its working right not just in theory, but in actuality and that hard mode itself isnt harder or easier than the hacker may have intended. In this case its best to just comment on the difficulty level in general rather than say whether it is too high or low. 44. Check for weird occurrences when you suspend and resume the game. For instance, there was this one glitch where certain stats would increase if the game was suspended and resumed (I wont get into it, but the point is, check). 45. Check for portrait colors (consistency and general appearance). Portraits shouldnt be a mixture of FE7 and FE8 colors if it can be avoided. Also, really bright colors can hurt the eyes, so make sure the hacker doesnt give reason for anyone to be blinded. 46. Dont forget to promote all the units you can too! Savestates are quite useful here. One promotion item can be used to promote units of all classes. You may need to abuse arenas to level units up to level 10, play the game multiple times, or hack the game to help with this, but its necessary, because its possible the author forgot to do every single promoted battle palette. 47. When you are actually betatesting, write down everything nice and neat, in bullet or numbered form, in a word or notepad file or something. Do it WHILE you are playing the game, not afterbecause youll probably miss something if you just keep it in your head.

48. While writing your report, be detailed and include specifications as to where things are and when they might occur. As said before, use screenshots, videos, and savestates as necessary. It might be helpful to organize your comments into different categories, like Text, Forgotten Things, and Glitches, because it helps them tackle down all the problems in one category at a time. It also helps because glitches are usually a priority of beta-fixing. 49. Dont be too harsh or bias with your betatesting. You dont want to anger the hacker and make them not want to fix something, or give your opinion on something they dont care about, like this portrait looks really ugly, whoever made it sucks at spriting, or the plot is really bland, it needs a complete overhaul. 50. Enjoy your time betatesting, because if you dont play normally, itll be more of a job than it is a special privilege!

Chapter 63: VBAs Tools Im going to (relatively quickly) cover the various tools in VBAs Tools dropdown menu. Disassemble: this lets you disassemble ARM or THUMB assembly. If you dont know ASM, it wont prove very useful to you. Logging: Im no expert on this, but to my knowledge, logging lets you keep track of various functions and operations whose purposes I do not know. I/O Viewer: This viewer enables you to view the input/output area of the RAM and even edit the values here to some extent, in real time. Map Viewer: The map viewer is one of the more useful tools for average hackers that lets you see backgrounds, as well as information such as their size and # of colors. FYI, stretch to fit stretches the background in the viewing window so that it fits the window, and auto update makes it so that the background is automatically updated as it changes in-game. (The latter applies to other viewers as well). On the bottom left you can select a square/color (which is selected by clicking on a place in the window) and see its RGB. Memory Viewer: The memory viewer lets you view the games RAM (memory) in real time (if you click automatic update) and save it as a memory dump (which you can load later) or edit it (although the game might change it by itself right back anyway, depending on what youre editing). To edit, just click on a byte and type in the new value. Type in an offset in the Go box to go to a specific offset.

OAM Viewer: Essentially the same thing as the map viewer, this lets you view sprites, which are essentially smaller object graphics that are on top of the backgrounds. Palette Viewer: The palette viewer is one of the most useful tools in VBA as it lets you find a palette and view any of the colors in the palette. It gives you the RGB and hex value and can let you save either the background (BG) or sprite (OBJ) part of the palette viewer as a .PAL file. Its very useful for finding palettes in a hex editor as one can search the values of colors to find and edit them. Tile Viewer: This last viewer lets you view graphics as 16bpp or 256bpp (depending on which its meant forlikely the former) as well as scroll through a selection of palettes (as different palettes fit with different tiles in the viewing window). Its other functions are much like the Map Viewers own functions.

Well, theres nothing else of major interest I want to talk about in this dropdown just yet. There is the ability to record videos and sound, but that is for a future chapter. ^_^

Chapter 64: Other VBA Options In this chapter Im going to detail some of VBAs semi-obscure but not totally obscure options. Knowing how to use VBA will help you test your game in various ways. The file menu has many options, most of which you should be familiar with. Pause obviously pauses the game (and also unpauses it) and reset restarts the came (but doesnt reload the cartridge, meaning if you hack the ROM and hit reset in VBA, IIRC the changes wont show up). The Recent tab lets you load a recently played ROM. Import lets you import gameshark code files, battery saves (the main saves), and gameshark snapshots. Battery files and gameshark snapshots can be exported with the export tab, of course. Screen capture takes a PNG screenshot and saves it to your computer, which is very useful. Rom information gives very basic information of the ROM based off of the header and some other crap, and close simply closes the ROM without loading another one or exiting the program. Now the more interesting and less basic stuff is in the Options menu at the top. There are a bunch of categories/tabs with lots of options, some with even more tabs. Ill go through whatever I know well enough to teach. Haha.

Frame skip lets you skip frames, like youd imagine. Lowering the frame rate makes each frame playmaking it higher skips a lot of frames, which will make everything seem kinda laggy. Just try 9 and try moving your cursor on a map in Fire Emblem, for example, and you should notice the difference. Automatic sets the frame skip to whatever VBA thinks is best. Throttling forces the game to go at a certain speed (or close to said speed). Thus you can speed the game or slow the game down (of course, you can always speed the game up to max speed by pressing the spacebar too). 100% is normal speed, 25% is 1/4th said speed, and 200% is twice as fast as normal. You can also set your own emulation speed via the Other (just enter a number in the dialog box). The video tab affects the graphics display. There are a bunch of rendering options that I dont care about, an x1, x2 etc. with zoom options (you can force the screen to be twice its normal size all the time, or just manually drag the screen yourself if you want), and most importantly, you can set which layers are on/off, which is useful for more advanced graphical hacking to see which graphical aspects are on the same graphic layer, as well as ripping graphics (because you turn the layers you dont want to rip off). The emulator tab has a lot of stuff that I dont care about, even if I know what it does. The most relevant things to hacking are the automatic IPS feature (just keep it checkedall it does is have IPS patches with the same name as the ROM automatically be soft patched when you play the ROM-will cover in detail in the IPS patch chapter), and the PNG/BMP format which is for taking screenshots, which should be checked to PNG, of course, because BMPs take up a ton of space. In the sound menu you can turn sound off (which speeds up the game because it doesnt have to load sound), mute it (which doesnt speed up the game), or just have it on (). The various channels (which should all be checked) control which layers (not terminologically savy) of sound are playing. So if you turn some channels off, you wont hear certain music/sound. You can also edit the sound type (again, terms = fail), with the 11khz, 22khz, etc., and adjust the emulators volume (not sure why youd do that with the computers own volume changer though lol). The gameboy category doesnt have anything I want to talk about. The end. Neither does priority. So next is filtering, which is used for when your emulator is zoomed in. Filters edit the way zoomed in pixels are interpreted and displayed. You can make the game look like fine lines, smoothen things out, add motion blur, whatever, but the window has to be more than 1x zoomed in. Try out the filters yourself and see what you like. Heres an example:

(This one is kinda smoothier than normal, if you can tell). Joypad and Language also dont have any interesting (to me) features, so Im not gonna go over those which means that, were done!

Chapter 65: Recording Videos & Sound VisualBoyAdvance has two great features that separate it even more from most emulators. It can record both video and sound (even though video has a desync problem which will be covered in the next chapter). You can find these amazing features near the bottom of the Tools menu in VBA. If you go to the record tab and hit start sound recording, youll be prompted to type in the name for a .WAV file, which is an uncompressed file with recorded sound that can be played by a program like Windows Media Player. They tend to be big though, so watch out. When youre done recording the sound, you go back to the record tab and hit stop sound recording, and then enjoy your file. Bam. In a similar manner, one can record an AVI file, which is an uncompressed video file. Like the WAV, it tends to be huge, except that since its video and contains graphics, it will be even larger than you might imagine. Depending on how long the video is, it can definitely get over 100MB as an AVI. No worries, though, Ill cover how to save space and make uploading such a huge file quicker in the next chapter. The only difference between this and sound is that you have to select a basic video compression.

Full Frames (Uncompressed) is completely uncompressed. All the other options will compress the files, but with different features and quality. So I kinda lied about AVIs not being compressed, its just that they arent compressed nearly as well as MP4s XP. I typically use Microsoft Video 1 as it doesnt really change the quality of the video but gets the job done, and it shouldnt lag like Full Frames does (that records every single frameitll be huge and unless your computer is super uber, itll be slow). Other codecs may also be installed into the system due to installation of other programs (or youre just an extremely competent video renderer), but those arent necessary or anything. Finally, you can record a movie, which is not for sharing with others. A movie is a clip of the game that you can play (using the play tab) which shows you part of the game that you played. If you ever use the movie feature, savestate before, then do it. As you can see, none of that is really any hard or anything, which is why its more convenient (and results in better quality!) to use VBA to record stuff from your hack than it is an external program! Chapter 66: Fixing the Desync with VirtualDubMod & Video Rendering In the last chapter, I mentioned a desync an audio desync, to be exact. The video frame rate and audio frame rate dont match up. As a result, the audio starts to lag behind, and after a couple of minutes, when the audio and video dont match up, it can get really bad. This is solved by a program called VirtualDubMod. The program and the method to fix the desync were introduced to me by Shadow of Chaos, who was introduced to it by some youtube video, IIRC. Download and install virtual dub mod (I wont tell you how though, its just installing a program. >_>). Load it up and hit Ctrl+O (or file->open video file) and load the AVI that VBA produced.

Now, since Im really nice, I created a file that loads settings that automatically fix the frame rate issue and set the program to quickly but efficiently recompress the AVI. You can download it below. http://www.feshrine.net/hacking/downloads/GBASettings.vcf Hit ctrl+L or file-> load processing settings and load the file I just linked to above (make sure you do that AFTER the video is loaded, though). Then hit save as under the file menu and save the AVI again. Itll take a little bit to render, but once its done, you may be done for good, as the file may be small enough that you can just upload it as it is and be happy. If you arent happy, you can try recompressing it, while also making it youtube friendly, with a program called Free Zune Converter (yes its free). Download that and extract it or whatever and when you open it, you should see this:

Those are the settings I have, which youtube doesnt complain about. You can change the resolution which will affect the various quality settings youtube and possibly other sites offer. 1280x720 is for 720p [HD], 1920x1080 is for 1080p [HD], and the one I have hightlighted, 640x480, is for HQ (480p). Granted, if you save it as an HD file, the game will not only be

stretched and kinda appear as awesome HD (GBA was never meant for HD resolution though XD), but the file will be large, so keep that in mind. You can mess with some of the other settings if you want, but once I pick the resolution and the output format (which is always the same for me), Im done, which means I just drag my videos onto the program and hit convert, and itll create a new MP4 file from the AVI file I got from VirtualDubMod which I got from VBA. All of this may seem like a long process, but its necessary for an awesome video, and once you learn how to do it, the actual work isnt longyou just have to wait for the videos to render, and everything else pretty much takes 5 minutes. But yes, thats the basics of rendering videos. With that, theres no excuse for crappy youtube videos of hacks (unless the hacks are crappy, but thats what the REST of this tutorial is for!). Chapter 67: IPS Patching & General Patching Information Ah, IPS patching, one of the oldest types of patching. What is patching? Why, its applying a patchlike you know, a fix or an updateto something. In the case of ROM Hacking, it means applying the edited parts of a hack to an un-hacked ROM. Why do we do this when we can just share ROMs? Well, sharing ROMs is mostly taboo on the internet, at least on most forums. However, by sharing only the changes, which is what sharing a patch is, you kind of avoid being attacked by this taboo. Furthermore, patches only include the changes I know I just said this, but the point is that they are MUCH smaller files than entire ROMs, which includes everything. Thus its easier to share patches (though now as technology advances, patches are becoming a little more obsolete in that you can download larger files super-fast, and space is rarely an issue). There are two things you can do with most patchers: apply a patch and create a patch. I am going to mostly teach these things. I am NOT going to cover how patchers work, I am only going to explain the practical use of patchers. Back to IPS patchingthis is the most basic patch format. IPS patches cannot add data to the ROM. They can only change the values at already existent places. Thus lets say youre hacking FE7 which is 16MB. If your edited ROM is 18MB, you cant use IPS patching because it wont support it as the files arent the same size. The best IPS patcher I know of is Lunar IPS, AKA LIPS, so google that and download it and extract it, then open it up.

Create a Log File really isnt necessary. About LIPS is pretty self-explanatory. So lets do Create IPS Patch. Youll want to navigate to the folder where your original, unedited ROM is. I made things easy on myself and put the clean ROM next to the Edited ROM so that I dont have to go searching very far.

Double-click/open the unedited ROM. For me thats Fire Emblem.gba (named so because its the original copy of FE7). Then itll ask you to select the new modified file, so do so:

And then you type in a name for your patch that it will create.

Hit save and it should tell you you were successful. Wala, youve just made an IPS patch. Now lets apply it. Hit Apply IPS Patch in the main menu. This time, you select your IPS patch you just made (hint: it ends in .ips) followed by a clean, unedited ROM (hint: its not the hack). It should say The file was successfully patched, in which case you have successfully learned how to deal with IPS patching.

Chapter 68: UPS Patching I suggest you read the IPS patching tutorial (at least the beginning) if you havent done so as I will not be as thorough with this chapter as I was the previous. UPS patching was revolutionary as it allowed patches between two differently sized files. The UPS patch would simply have all the extra data attached to it. Its better in other ways too but I wont get into that. The best UPS patcher, the one I want you to download, is called NUPS. However, if you search that on google, you actually probably wont be too successful in finding it. Thus I suggest searching Nintenlords UPS Patcher and go through some forums and you should find a download. Youll need the latest version of .NET Framework or the Mono equivalent if you arent running Windows (see google to find these) for this to work as it is one of Nintenlords programs and all of his programs have this requirement as far as I know. Extract the files, open it up and you should see this:

Shiny. Exit is self-explanatory. The rest isnt as much. Lets create a new UPS patch.

Here you have a nice menu. You hit Browse and select the file you want, which is labeled on the left. Thus the first entry should be the unedited, original, clean ROM. The second entry should be the hacked

ROM. The 3rd entry should be the UPS file you are going to createjust name it something and save it somewhere youll find it. Once youre done, hit create patch and NUPS should create a patch with the differences, then take you back to the main menu. In an extremely similar manner you can apply patches. Take a look.

The file to patch is the clean ROM you want to patch. The UPS patch is any UPS patchfor testing purposes use the one you just made. Where it says create backup of the file, this is in case you arent sure if the UPS patching will work. It will make a back-up that you can go back to if the patch screws up your ROM. Pretty useful. Another safety check is the If file is invalid. If a patch is applied to a file that wasnt the same file the patch was based off ofi.e. the clean ROMthen NUPS will take an action depending on what you have selected. It will either abort it and not patch it, ask if you want it patched, notify you that the files dont match (meaning your ROM isnt clean/unedited), or ignore it as a whole and patch anyway as if though nothing odd happened. Take your choice and hit patch to apply the patch. Lastly, we have a brand new feature not seen in IPS patching: Get patch data. What you do here is browse for a UPS file and hit Check and NUPS will tell you the offset of any data that was changed and the length of bytes changed at that offset.

Like so, where the offset tells where and the length (misspelled as lenghts) tells how long. You might think this is so pointless or something like that, but its actually useful for more advanced hackers. It tells you what data was changed, and whereyou can use this to track what data was changed in small fix patches or ASM patches. If by some chance you dont want part of a patchs data, you could use this to help you find out where the part you dont want is, and revert it back to normal, or vice-versa if you only want a specific part. There are many other uses for this feature but they are rather specific so I wont get into them, but this feature has definitely saved me in a few instances by helping me solve my own bugs/glitches. Thus Id keep it in mind for the future. And with that, you can now use all of NUPS features!

Chapter 69: JFP Patching WARNING: This chapter will not be as detailed as the others/assume you know little to nothing. Rather, it assumes you are familiar with the basics of patching. If you are new to patching as a whole, I suggest learning IPS and UPS patching first. First of all, JFP patching was invented by Hextator as a better patch format than UPS. It has its advantages but I cant think of them all nowIm pretty sure that it uses a better format for checksums, is more compatible with FEditor Adv, and allows you to save the patched file separately from the unpatched file. Second of all, you need the latest version of Java for this to work, so get that installed if you dont have it already (chances are if Xelds other programs are working, you have it). Then extract the files (youll need WinRAR or 7zip probably, the archive will probably be a .7z) and go into the Java Implementation folder. Double-click on the Drive batch file which will load up a command prompt and then ask you: Are you creating a patch instead of applying one? Hit yes to create a patch, where you select the original file, edited file, and the path for the .jfp patch, in that order. Hit no to apply a patch, where you select the JFP patch, a clean ROM,

and a path to save the new patched ROM (it does not apply the patch to the original file, but saves it as a separate file). And thats all I have to say about that. Its relatively easy and not complex even if it doesnt have the greatest GUI. At least now you can deal with JFP patches without freaking out, right? Chapter 70: XDelta Patching This type of patching is unique in that it results in very small files and can be used for NDS hacking, though the latter is irrelevant for this tutorial. There are two methods I will teach here: one with GUI, one without GUI. The one with GUI is nice and all, but the one without GUI is easier for the final user, the person who will ultimately play the patch, as it results in a simple drag-and-drop patching method. And whats easier than a drag-and-drop patch? Not much. The downside is that non-Windows users wont find Delta Patching very fun or easy. First Method: Formal Program with GUI First, download this: http://www.romhacking.net/utilities/704/ The download link is at the bottom. Extract the files as usual. There are two programs here: DeltaPatcher and DeltaPatcher Lite. The difference is that the DeltaPatcher Lite can only apply patches. Thus it was intended to be included with the patch download so that people could apply patches without having to worry about the feature of creating one. To be honest, both are pretty easy to use, and if you can use the main one, you can use the Lite one, so Im just going to teach the main one.

Boom, I explained most everything there. When youre ready to apply the patch, hit apply patch (duh) and youre all done. To create a patch, you need to hit Create xdelta patch, which will change the top left area a little bit.

If youve been following the other patching tutorials this is all a complete, obvious piece of cake, except the compression level dropdown, which I explained above. Just hit create patch and youre all done, and thats method one. (Teehee, I rhymed) Second Method: Batch File Editing, without GUI This is not for the weak-hearted. The main purpose of this patch format is to make it so that the people who patch files only have to drag and drop the file to patch it. Download this version of XDelta from my site: http://www.feshrine.net/hacking/downloads/XDelta.zip Extract it and you should see 3 files: Patch Creator, Patch Applyer, and xdelta itself. To start, never rename xdelta to anything else. Ever. Just dont do it and youll be safe. I realize that people who know how this works can get away with renaming it to something else, but if youre reading this tutorial you shouldnt know how this works, or else you shouldnt be reading this tutorial. :P The other 2 files are batch files. Scary? Not really. You can edit them in any old text editor. I just right-click it and edit it with Notepad++, you can do something similar with Textpad or plain old Notepad or something. But dont try Microsoft Word or Wordpad, those programs probably wont work. You want something simple. First, open the patch creator. Boom.

The black line points to the name of the original, clean, unedited file/ROM. In this case its unmod.nds, change it to whatever you want though, like original.gba or something. The green line points to the name of the patch file. This can be whatever you want, under any extension. To make life simple, keep everything lowercase and without spaces. If you didnt already notice, the .blz extension is for blazer as I used this patch creator for my own patches. Heheh. =P Once youre done renaming that stuff, you need to actually put the unedited ROM there. So in my case Id put unmod.nds in the folder. To make the patch, you simply drag the edited/hacked ROM onto the patch creator file, and a file called patch.blz, or whatever the heck you named it, will pop out. Now, how do we use this patch? We use the patch applier. To setup the patch applier, edit it like you did the patch creator.

I realize this can be pretty intimidating at first but you really dont have to do anything but change the patch.blz to whatever you named your patch to. Remember, it has to match whats in the file! Save it and close it. Test your patcher by dragging a clean ROM onto Patch Applyer (which I now realize should be spelled Patch Applier). A new ROM called bla-patched.bla should appear, where the blas are the name of the file and the extension of the file respectively. The point is, itll end in -patched, so you cant not know which file is patched and which isnt. Unless youre dumb. But if youre reading this Id like to think youre not dumb. Thats that, for the most part. But lets imagine were some internet guys just playing a hack for fun. We dont need the patch creator, just xdelta, the patch applier, and the patch itself. Thus if you want to share a patch with someone easily, just include the patch applier, xdelta, and the xdelta patch file you made. The player just has to get a clean ROM and drag it onto the patch applier file and theyre done patching. It LITERALLY takes 1 second to drop it, maybe 3 seconds to make the patch if theyre unlucky, and maybe 6 seconds to find the ROM and get it to the right folder if theyre having a bad day. And if they cant do that 10 second process successfully then they PROBABLY arent meant to play the hack.

And I cant write a tutorial on THAT. Chapter 71: Nightmare Module Format At some point in your hacking career it may have occurred to you, or may occur to you, that there has to be some format to nightmare modules, given all the people that have made them, myself included. The truth is, there is, and making Nightmare Modules is actually pretty easy. In fact, thats why they were used in the first placeNightmare modules along with the Nightmare program serve to make editing tables and arrays very, very easy. It divides a huge amount of data into different entries and allows you to edit any of those entries and its contents easily, helping by making the format of those entries match the data type, and labeling what each entry is. That may all sound confusing but as we go through the nightmare format, you should find that its actually relatively basic. To start, Im going to post the nightmare format documentation included with the original Nightmare download. NIGHTMARE MODULE FORMAT ----------------------Blank lines are ignored, so you can use them to divide stuff up and make it more readable.

Lines beginning with # are comments.

Numbers are assumed to be decimal; to indicate hex, include a "0x" prefix. You can even indicate octal with a "0" prefix, if you're so inclined. :D

All numeric values can be decimal or hex interchangably, with the exception of table files - the values there are assumed to be hex. (This allows copying and pasting from existing table files.)

THE MODULE FORMAT ----------------The first line holds the module file version. For this file, that's "1". No decimal points or anything fancy. The second line is the module description, which appears on the title bar when the module is loaded. The third line is the root address of the data table. The fourth line is the number of table entries. The fifth line is the length of a single entry. The sixth line is a filename, indicating a list of names to be used by the entry selector. If "NULL", the entry selector will only use numbers. If names run out before numbers do, the selector will continue with just numbers. The seventh line is also a filename, indicating the table file to be used by TEXT entries. Tables here can only be letter-matching, that is, of the form XX=Y; multiple bytes or multiple characters, such as XXYY=Z, or XX=yz, are not permitted. If "NULL", standard ASCII is assumed.

Here follow entry-component handlers, until the end of the file.

It is recommended (for reasons of readability by humans) that a newline be placed here, and also after each entry-component handler.

ENTRY-COMPONENT HANDLER FORMAT -----------------------------The first line contains a textual description. The second line contains the offset from the start of the entry. The third line contains the number of bytes used by the component. The fourth line indicates type, which is one of the following:

TEXT - Text editbox HEXA - Hex array (useful for indicating and changing unknowns) NEHU - Numeric editbox, hex unsigned NEDS - Numeric editbox, decimal signed NEDU - Numeric editbox, decimal unsigned NDHU - Numeric dropbox, hex unsigned NDDU - Numeric dropbox, decimal unsigned

Binary toggles should use NEHU with something like "(binary)" in their description, and an explanation in comments within the module file. Types are not case-sensitive.

The fifth line is the parameter file, a name list for dropboxes. It follows this format:

<number of entries to follow> <numeric value> <written description> <numeric value> <written description> ... <numeric value> <written description>

The numeric value is displayed in the context specified by Type (hex or decimal, for example). This value is what is written to the rom when a dropbox entry is selected and Save is used. This parameter is unused ("NULL") for editboxes.

That information should be referenced frequently as I dont want to have to constantly reiterate myself about understood things, such as # denoting a comment. For me, the easiest way to make a Nightmare module is to just copy someone elses. After all, its so much easier to just steal the format than to make it from scratch. Thus its relatively harmless to use it as a basis for your own nightmare module (granted if you use the same offsets and stuff or youre just making an update then you should give/leave credit to the original maker). I am going to use the FE7 Item Editor for my explanation of the format. 1 Always 1 FE7 Item Editor by SpyroDi, updated by Nintenlord the name. a super long name might not fit. 0xBE222c the starting offset of the data. I cant help you with finding this. When you find an array of data and you want to make a nightmare module for it, youll know the offset then. 159 the number of entries, in decimal. 36 the number of bytes in each entry, in decimal. Note that the starting point of the last entry + its length should be this number.

FE7 Item Editor.txt the filename of a list of names to use for each entry. It must be a text file in the same folder, and each name should have its own line. NULL dont worry about it After the header, we start breaking apart the data into different entries, like so: Item Name Pointer the name of the entry. Should identify what it is 0 the starting point of that data entry, always starts at 0. 2 the length of that entry, in bytes, in decimal. NEHU the type of data it is. NULL a dropdown list for dropdown data types, including the number of values, followed by the values themselves, with the label for the value accompanying every value. Youll see for yourself in a minute.

Item Description Pointer name redux 2 starting point. Note that the last entry started at 0 and was 2 bytes, and 0+2=2. 2 - length NEHU - type NULL - text NULL means that no dropdown list is used.

The file continues like this all the way to the bottom. And thats all there is in broad sight. However, Ive yet to cover the different data types. The nightmare format tells what each is but you may not understand that, so I will just use a few more words to make it more clear: TEXT - Text editbox allows for there to be a text parameter, meaning an ASCII text string. Lets say a certain 8 bytes is not like a statistic but an actual string of text, youd use this to make it so that Nightmare will let you edit the text as text and not numbers. HEXA - Hex array (useful for indicating and changing unknowns) this lists the values out as individual bytes. Like its description says, its mainly useful if you have a bunch of unknown values that you want to compare between entries.

NEHU - Numeric editbox, hex unsigned a standard old edit box where you can type in the numeric value you want. Hex means hexadecimal, you know the counting system weve been using since forever in hacking, and unsigned means that the values arent signed, meaning oh, I guess I should teach that. If a value is signed, it means that it can change signany value after 127, which is equal to 0x7F, becomes negative. Thats right, you can have negative values. Thats how things like negative growths come about. You can never have signed hex values though, hex values just arent negative, everthe whole point of the signed/unsigned system is to make it so that hex values come out as signed in the decimal system. NEDS - Numeric editbox, decimal signed see above, a standard edit box where the value is in decimal and is signed (can be negative) NEDU - Numeric editbox, decimal unsigned - a standard edit box where the value is in decimal and is unsigned (cannot be negative) NDHU - Numeric dropbox, hex unsigned a dropbox entry, see NEHU for info about hex unsigned NDDU - Numeric dropbox, decimal unsigned a dropbox entry, the values are in decimal and arent signed Here are a few examples: Weapon Ability 1 - name 8 offset from start of entry (8) 1 length of 1 byte NDHU type, Numeric Dropbox Hex Unsigned, meaning its a dropbox where the values are in hexadecimal and unsigned Weapon Ability 1.txt the list of values possible to use, if it were NEHU instead of NDHU this would have to be NULL since NEHU doesnt use lists, the E being for editbox and all, whereas the D in NDHU is for dropbox and all. And all. :D Heres an excerpt from a list: 256 0x00 None 0x01 Weapon

0x02 Magic 0x03 0x04 Staff As you can see, the top number is the number of entries, followed by a new line with the hex and the name. If there is no label it still works fine though. Just remember the following: You cant have an entry be outside the length of the nightmare module that is specified in the header The difference between decimal, hexadecimal, signed, and unsigned Test small nightmare modules first and then build on them, or you may find yourself with so many errors that you dont know where they come from Nightmare modules are meant for simplifying tables. Not every little thing needs a nightmare module! (Despite the fact that I made many small and near-pointless nightmare modules, haha, I only did that to make it easy on people who dont like hex editors) Theres this tutorial to help you at all times, so you can do it!

Youre on your way to helping the community, starting small, but thats how every normal person starts. This is the final chapter dedicated to a specific teaching purpose; the rest are very general or arent meant to teach anything about hacking. This means that you have now completed learning most everything there is to being an awesome Fire Emblem hacker, and now you can start contributing to the hacking scene yourself in every way possible! Chapter 72: Miscellaneous Information Archive This chapter is an archive of sorts for information. It will include documentation, links to help, instructions, anything I can think of that might not fit in a specific chapter. Thus it may get longer and longer through time, or it may stay short. I encourage people to submit knowledge to this section that may not fit into any other category or may fit into too many categories. Chapter 73: Useful Links & Websites First, I suggest you look at my websites documentation page. Included on it is some of my own documentation as well as lots of other documentation thanks to various hackers across the internet. I also suggest googling Hextators Doc, a very thorough compilation of all of a veteran

FE hackers hacking stuff, which isnt even limited to Fire Emblem, but has a ton on Fire Emblem regardless tl;dr its important. http://www.feshrine.net/hacking/doc.html Some other good hacking websites are: http://www.romhacking.net http://www.gbatemp.net http://www.gbadev.org

Some decent Fire Emblem websites are: http://www.feshrine.net | http://forums.feshrine.net (My own website, has lots of neat stuff if you ask me) http://www.serenesforest.net | http://www.serenesforest.net/forums/ (Very good for everything, the biggest Fire Emblem fansite to exist really) http://www.fireemblemempire.com (this one just looks cool) http://fendcommunity.com/forum/ (a forum best known for its spriting)

Need a file host? Here are some: http://www.megaupload.com (it has a timer on downloads) http://www.sendspace.com (deletes files for inactivity) http://www.fileden.com (deletes files for inactivity and requires registration, but has 1GB of space and direct downloads) http://www.dropbox.com (more than just a file uploader, also has direct links) http://www.mediafire.com (people like this one, but I dont, especially due to ads)

Need an image host? There are two main ones used: http://www.photobucket.com (registration required, but many features and lots of space. DO NOT UPLOAD BMPs TO THIS WEBSITE, IT DISTORTS THEM) http://www.imageshack.us (no registration required, but sometimes annoying for various reasons, such as website problems/finding a link to your image you uploaded)

Final Chapter: Credits, Thanks, and the Epilogue


This tutorial took quite a bit, but so did Fire Emblem hacking. Thus Id like to thank people for all their work and effort. Please note that my memory is vague as well as not all-inclusive. If you feel you contributed a lot to the Fire Emblem hacking community and deserve to be here, just kindly contact me (dont flame and get pissed). If I said something incorrect, please do the same. And if I forgot you, as I am quite forgetful, please do alert me as I want this to be a thorough list of people who deserve to be here. However, Im not going to include everything everyone has done (or this list would be at least a dozen pages), but for major people, I will post their general accomplishments. Major, Veteran Hackers: Lute/Iggy One of the original FE hackers who posted a page of data on FE hacking that got Pukachi/SpyroDi to make Nightmare modules. Pukachi/SpyroDi One of the original FE hackers. She created the original set of modules and has contributed in hacking games from FE4 to FE8, IIRC. An inspiration to others and the instigator of Fire Emblem hacking. Xeld/Zeld/Hextator One of the original FE hackers. He started with assembly hacks and miscellaneous stuff but eventually created FEditor Adv, one of the most used and best Fire Emblem hacking programs out there, which is capable of editing text and portraits better than any other program, and is also capable of importing battle animations in seconds, and making custom battle animations and spell animations (the former would be really difficult without himthe latter would pretty much be impossible without him). Hes also made several patches and in general has had a lot of accomplishments throughout his hacking career. Blazer/Fire Blazer/Keriku/Luffy/FireShrine One of the original FE hackers. Ive been doing it for a long, long time, and Ive helped lots of people with their questions and hacking. Whenever a new innovation came out, Id almost always be there to test it out, help find bugs/glitches, or expand on information, write tutorials, etc I helped Xeld and Nintenlord in the few ways I could (testing programs and reporting glitches) and have done my best to make use of everyones programs and finds by making hacks like Prince of Durand and Tactics Universe. I have a site dedicated to Fire Emblem with lots of hacking information, as well as forums with many hackers who can help out, and I am a member on most Fire Emblem forums. With this tutorial I hope that I have left hackers with most everything they need to make a hack on par with or better than my own hacksnot to be arrogant, but people have a hard time making use of things unless they know how, and I was often times one of the few people who knew how to do something (events, insert music, battle and spell animations, etc). This tutorial is also to remedy that as I shouldnt be the only one able to make full use of the knowledge out there that simply hasnt been put in an easy-enough fashion for people who cant figure everything out on their

own. The reason why this paragraph is so long is because I made this tutorial, so of course I have to say a lot about myself. And theres no way this paragraph could not sound egotistical and narcissistic no matter how I phrased it, if you ask me. =D Flyingace24 an inspirational hacker who has helped the community in ways most people dont know. Has made nightmare modules and helped other hackers with their projects. Hes also one of the original FE hackers and one of my long time friends. Arch a veteran hacker who has lived through a lot of the changes in the FE hacking community. He was the driving force of the forums that were once renowned as the best Fire Emblem hacking forums, Fire Emblem Universe. Arch is also the creator of extremely popular hacks such as Elibian Nights and Fire Emblem 4 Advance (now discontinued). Raydonn a hacker whose name was a bit lost. He made use of information given by people to make Nightmare Modules and do other stuff. If youve hacked with Nightmare, youve most likely used one of his Nightmare Modules. Icy Toast he helped re-spark the FE hacking community, to some extent. Icy Toast made a revolutionary tutorial on how to insert custom maps and make your own events, amongst other stuff. This inspired me to try it out and I made a hack that I think got Nintenlord into Fire Emblem hacking the reason why I say this is because I still have a PM from Nintenlord on youtube from years ago. Anyway, he has also contributed Nightmare Modules and his tutorials are still referenced today, even though there are programs that have made the things done in his tutorials much easier. I still miss Icy Toast to this day. Nintenlord One of my favorite Fire Emblem hackers. Even if you arent too into meeting nice people, if you like smart, helpful, and unselfish people, Nintenlord is the guy. Hes made many programs like GBA Graphics Editor and the MAR Array Inserter that have helped tremendously with Fire Emblem hacking. He also has many Nightmare Modules he has made and many ASM hacks that give cool effects (like the move-after-attacking skill in FE10, for instance). He also made the Event Assembler, which is just another one of his awesome creations. I consider Nintenlord a good friend. :D Honorable Mentions: Zahlman has helped a lot with improving FEditor Adv and has also made a Song Editor for music insertion. Is continuously making efforts to improve hacking amongst other stuff. Shadowofchaos although not the oldest hacker and doesnt have a full-fledged hack of his own, he has taken the initiative to make use of programs like FEditor Adv to make battle animations, spell animations, insert music, import music, and has recently even done ASM hacks and other useful fixes for the community. He always likes learning new things, whatever that may be, and is a great help to people and their hacks when they need something done that they themselves cannot do on their own.

FurryYunSeong a veteran Fire Emblem hacker who has made GhebFE and GhebSaga. Although his hacks are joke hacks, he knows how to hack, and has been one of the (unfortunately few) successful hackers around the community. He appears to have retired from hacking, however. MageKnight404 although he has never directly contributed anything to hacking innovation, he has inspired others to try out hacking, and the more people the better. Hes also made some popular hacksone being called MK404s FE7 Hack, and the other being Fire Emblem: A Sacred Dawn. More Honorable Mentions: (In no particular order, as I remember them) Celice VincentASM Ryrumeli Felover3 Kate Atrius CharontheFerryman Camus the Dark Knight Twilkitri Mariobro3828 Mercenary/Rutger SandwichSage MageGirl CrypticGirl Markyjoe1990 Seph1212 Creators of all the many programs Creators of all the many patches

Epilogue: I hope Ive helped you a lot with your Fire Emblem hacking. Ive spent a lot of time on this tutorial and itd be a shame if it wasnt even used well, right? With that being said, I have some favors to ask. First of all, theres a large list of people in the credits. Im not going to ask you to credit every single one of them just for being a decent part of the Fire Emblem

hacking community. However, if you make a hack, you should probably credit the major hackers (and not just because I am there >_>) because its almost unavoidable that they have some sort of impact whether direct or indirecton your game. Especially people like Pukachi, Xeld, and Nintenlord, who have spent so many hours unselfishly working to help others with their hacking (and youre bound to use one of their programs or modules). Just saying thanks isnt much, but its a good thought. Also, please dont upload this tutorial to other sites without permission. If you need to share it, you can always link to my site or the online version of the Ultimate Tutorial so that people can download the latest version and older versions arent uploaded and spread about. I simply cannot keep version control of the Ultimate Tutorial everywhere, which is why its nice to have one place where people can always find various links to various formats of the latest version, and Id like to keep it this way. Furthermore, please notify me of where said links (which I do encourage you to post around) are posted so that I can keep things up to date as much as I can regardless and answer anything related to the Ultimate Tutorial. If this has done you any good, let me know, because I like knowing when I help others. Im just that kind of guy (and Im not a narcissist). Im looking forward to some epic hacks to play when I myself retire, and I really hope that the Ultimate Tutorial will help make those hacks epic, and come fast! For everything thank you!

~FIN

You might also like