- •Downloads:
- •Update Log:
- •Table of Contents:
- •Prologue: Bare Basics
- •Chapter 1: Key Terminology & Abbreviations
- •7Zip Archive – Supposedly the best file archiver there is, but not used as much, and thus less convenient. Requires 7zip or winRar to use.
- •VisualBoyAdvance – most people’s emulator of choice, almost always referred to as “vba” for short.
- •Chapter 2: Using Nightmare Modules
- •I upload anything that I think might be useful to someone on that site. Just use the menus and search until you find it.
- •Chapter 3: File Management
- •In order to be a successful hacker you need to have a lot of good management.
- •Chapter 4: Pointer Tables
- •Chapter 5: Battle Animation Editor
- •Chapter 6: Character Editor
- •Chapter 7: Class Editor
- •Chapter 8: Item Editor
- •Item icon – obvious
- •Chapter 9: Spell Association Editor
- •Chapter 13: Movement Cost Editor
- •If the value next to a type of terrain is ‘255’ then it is uncrossable because a unit won’t have 255 movement points.
- •Chapter 16: Battle Palette Reference Editor
- •If you want to know how to actually edit battle palettes’ colors, you can find that in a later chapter that I will make.
- •Chapter 17: Arena Class Editor
- •It’s a bit of work, but making cGs is quite rewarding, and it’s easier than some stuff, that’s for sure! Good luck with your cg making!
- •Chapter 20: Lyn’s Ending Editor
- •Chapter 21: Tutorial Editing/Getting Rid of the Tutorial
- •Part 2: Downloading the Programs
- •Part 3: Preparing Your midi
- •If you still have more than 10 tracks, you should find another midi. Sorry but, there are limits in life.
- •Part 4: Applying Blazer’s Beta Music Insertion/Instrument Patch
- •Part 5: Converting Your midi
- •Part 6: Making Your midi Repeat and Transferring it to Your rom
- •If the b1 and bc are next to each other then I can almost guarantee you want to replace it, so hit “replace” and do that with every instance and once you’re finished you’re good to go.
- •Part 7: Track Pointers & Repointing
- •Part 8: Finale- Assembling Your Song & Profit
- •If you don’t have this module, you’ll have to use this outdated way of doing it. Do check to see if you have the latest Nightmare Modules in general, but otherwise… well, sorry I guess. Xp
- •Part 9: Possible Errors & Wrap-up
- •Part 10: Documentation and Stuff
- •Atrius’ Notes:
- •Charon’s Notes:
- •Part 11: The Music Hacking Run-Down (Shorter Version of Tutorial & Walls of Text)
- •Part 12: Credits & Thanks
- •Chapter 25: Music Editing with Zahlman’s Song Editor
- •If you actually do type in help and press ‘enter’ on your keyboard, it’ll give you a list of commands, and tell you some stuff. Here’s the important stuff:
- •It worked! Great! I know how to import a song!
- •Chapter 26: Exporting Music with gba2midi
- •Chapter 27: Battle Background Graphics
- •If it doesn’t, I suggest double-checking all your settings (everything should be compressed) and make sure your width is set to 30 and your height is set to 32.
- •Chapter 28: Music Array Module
- •Chapter 29: Sound Room Editing
- •Chapter 30: Chapter Unit Editing with Nightmare
- •Chapter 31: Death Quotes
- •Chapter 32: Event iDs
- •Chapter 33: Battle Conversations
- •Chapter 34: Triangle Attacks
- •Chapter 35-36: The Animation Modules & Repointing Tutorial
- •It should look like this:
- •Chapter 37: Support Editing
- •Chapter 38: Miscellaneous Nightmare Modules
- •In this chapter I’m going to quickly run through what some other nightmare modules do.
- •Vendor/Armory Editors – edits the contents of vendors and armories.
- •Vulnerary Editor – edits the amount of hp restored by a vulnerary. (Default: 10)
- •Vulnerary Editor – edits the amount of hp restored by a vulnerary.
- •Chapter 40: Text Editing with fEditor Adv
- •Chapter 41: Portrait Formatting & Preparation
- •Chapter 42: Portrait Insertion with fEditor Adv
- •I wouldn’t mess with the palette editor (the colorful boxes).
- •Chapter 43: Locating Palettes
- •Chapter 44: Editing Palettes
- •I don’t exactly have a color I want to use for this title screen background, so I’m just going to show you how to get the rgb of some random color on a portrait.
- •If something didn’t work right, make sure you:
- •Chapter 45: Working with gbage
- •Chapter 46: Chapter Data Editor
- •Vision Distance is for Fog of War (fow). If it’s ‘0’, it’s assumed there is no fog of war.
- •Hold it! (Unless you aren’t hacking fe7!)
- •Chapter 47: Map Creation
- •I’m tired of writing this tutorial. Honestly. So from now on, I’m going to stop making so many wasteful comments like the one I am typing right now.
- •Chapter 48: Map Insertion
- •If you’re looking to make a totally new chapter (instead of being limited to the old game’s exact same scenes with exact same events) then read on, because I’m going to hack events next!
- •Chapter 49: Event Assembler Basics
- •I would just always add end guards since it’s not something you need to worry about too much.
- •Chapter 50: Events – The Layout
- •Including the stlb
- •Chapter 51: Events – The Event Codes
- •Items is just a list of items with a max of 4 starting items. I prefer to use the 3rd method of writing them, with the brackets and all. Each item is separated by a comma.
- •Chapter 52: Event Construction
- •VillageGate: // name of tile data group
- •Chapter 54: Chapter Creation Finishing Touches
- •Chapter 55: Importing Tilesets
- •Part 2: The First Frame
- •Part 1b: Palette Preparing
- •Part 2: Testing the Foundation to Your Animation
- •If all goes well, your guy should be standing, kinda like this.
- •Part 3: Making the Rest of Your Frames
- •Chapter 58: Custom Battle Animations – Scripts
- •I just pulled a Xeld. Had to do that at least once in this tutorial.
- •If you don’t know what a sound sounds like, just test it out with your animation and find out. Experiment with the codes if you need to.
- •Chapter 59: Custom Spell Animations
- •0X85 command count for this spell: 10
- •It’s true! It did work! It’s still very much a work in progress, as you can see, but the point is we got he test frame working. The rest just takes time, patience, and the attitude that you can do it!
- •Chapter 60: Weapon Icons
- •If you did, you are successful. Despite the odd format of the icons, you have spotted them, and that is what is most important, in my honest opinion.
- •I have this show up:
- •Chapter 61: Map Sprites
- •Chapter 62: Proper Betatesting
- •Chapter 63: vba’s Tools
- •Chapter 64: Other vba Options
- •In this chapter I’m going to detail some of vba’s semi-obscure but not totally obscure options. Knowing how to use vba will help you test your game in various ways.
- •Chapter 65: Recording Videos & Sound
- •Chapter 66: Fixing the Desync with VirtualDubMod & Video Rendering
- •Chapter 67: ips Patching & General Patching Information
- •Chapter 68: ups Patching
- •I suggest you read the ips patching tutorial (at least the beginning) if you haven’t done so as I will not be as thorough with this chapter as I was the previous.
- •In an extremely similar manner you can apply patches. Take a look.
- •Chapter 69: jfp Patching
- •Chapter 70: xDelta Patching
- •Chapter 71: Nightmare Module Format
- •It is recommended (for reasons of readability by humans) that a newline
- •Is unused ("null") for editboxes.
- •Chapter 72: Miscellaneous Information Archive
- •Chapter 73: Useful Links & Websites
- •Chapter 74: Bonus – Assembly Hacking
- •Preparations:
- •Part 1: Background Info
- •Part 2: Inserting an Assembly Hack
- •Part 2: Breaking Down Your First asm Hack
- •I digressed a lot, but back to the point:
- •Part 3: Second Example – More Codes, More Fun
- •Read other people’s doc.
- •Part 4: More Examples – “Speed-Analyzing”
- •It’s thumb. Write to offset 0. Start with label “Initial”. Push 5 registers and the last register, then start a loop counter in r2 with starting value 0x00.
- •Ifat *Conditional id* *asm routine pointer*
- •I may have mentioned this before, but finding where to hack routines is difficult. And I’m sure I mentioned that finding space for them is difficult.
- •It’s not super long, but it’s got some new things we need to learn. Let’s get started.
- •Part 5: Finding asm Routines & Basics of Using a Debugger
- •Warning: terms may not be accurate. In fact, they almost definitely aren’t accurate, as you’ve probably figured out by now.
- •I don’t know what the flags do either, but they’re there, right next to the window. That’s g.
- •I hope to hear of your achievements in the near future!
- •Final Chapter: Credits, Thanks, and the Epilogue
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 don’t 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 don’t want to get into—it prevents some glitches from happening, however. Both codes go in the ballista events and are probably the only codes you’ll use there unless you know super special codes. XP. It should look like this:
Ballista_events:
BLST [14,23] 0x34
ALIGN 4
That’s 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 lyn’s 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. You’d use this if you have some dialog, need to change the music playing, and then continue dialog, but don’t 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. It’s 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 it’d be there. It’s up to you to experiment and figure out where you want it.
The latter code just hides the text box afterwards. It’s 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 doesn’t 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 it’s ultimately the same code as “ENDIF”, so…
Btw, for the turn condition, it’s 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 won’t be battle preps and so you’ll 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 here’s 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. It’s 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 won’t 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]. That’s 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 optional—you 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. That’s 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 it’s 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 chapters—it 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 is—for 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… I’m not sure, and I’d 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 on—don’t 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 wasn’t 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, you’re 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 don’t 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
You’ll mainly use MAC1 (especially because I don’t 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. You’ll 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 it’s called ‘Load map’, but it’s 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 you’re really smart and understand all of this and think you can manipulate event codes really well, I wouldn’t 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. That’s how I figured out most of my event hacking back when there wasn’t 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, there’s a trick. Yes, there is. Oh yes. There’s a bunch of things you can do with the data pointed to by ‘$code’… I think I’ll 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 it’s not in their inventory. lolwut? Yes it can. $0000001F would make them equip an Iron Axe, for example. It’s 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 you’re smart).
The last byte is the easiest byte to remember, as it is the damage—in 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 didn’t show) says his class is a soldier. Do you know what this means? It means that the game can’t load an animation because soldiers don’t 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 don’t want to see battle animations. I think it’s a pretty good idea because I can’t 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 wasn’t an option! 0x80 is devil, and 0x01 is a critical, but 0x81… oh, get it? It’s just a critical with the devil’s axe effect. He’s essentially critical-ing himself like an assassin. Fun stuff.
That’s all there is to FIGH commands. Just be careful that you don’t do anything reckless, as they can EASILY mess up. For one, make sure the fighting units are within range of each other, and don’t try doing anything stupid (not that you would) like a missing critical (0x03—I sincerely doubt it would work…).
As for the FE8 scripted fights… I have almost no clue how the FE8 code works so I can’t help you there. Then again, this tutorial is FE7 oriented, so I have few regrets. T_T If you need help, try Arch’s event tutorial, as it includes info on the differences between FE7 and FE8 and the like. It’s 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 can’t 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 don’t 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 don’t 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 it’s 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: I’ll 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 can’t 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. I’ll give’m, but they’re 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 don’t 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, I’ll 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. You’ll 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 doesn’t 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 can’t 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 Lyn’s 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 Lyn’s 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. Don’t know what to input? Experiment and find out.
MapColorReturn returns the screen to its normal colors.
LightningStrike makes lightning strike (it’s used in a very late chapter in FE7 by Limstella). The positioning would normally be controlled by 0xC0 and 0xF0, AKA (13,15), but it’s tricky. Do what you want with it, but I don’t 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 EA’s 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. It’s 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 them—check the documentation sections).
If any of the macros don’t work, don’t get frustrated at me. The solution is simple: don’t use them. I’m 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.
