Here I’ll be uploading some ASM I wrote. I’m pretty new to thumb assembly and have not shared ASM before, so expect issues when trying to use this stuff. I’d really appreciate it if you could tell me of any issues you run into!
Also, massive thanks to the people who helped me understand asm over at the spell-academy channel in FEU’s discord. You’ve been a great help! Teq’s guide has also been incredibly helpful:
Suspend x2
Download
GitHub
How to install
Install by using Event Assembler to apply “Suspendx2.event” to an FE8U ROM. Or include
Suspendx2.event in your buildfile. Read the README.txt; There’s a few quirks to pay mind to.
Whatitdo?
This is my attempt at replicating a sort of Mila’s Turnwheel/Divine Pulse in FEGBA. It is admittedly more limited.
You can create a backup suspend save at any time (except during a tutorial) during a chapter. Press “Backup” in the chaptermenu and you’ll be offered the option to create a backup save. If you don’t have a backup save yet, the command will be glowing green. If you choose “Yes” a backup of your current progress in the chapter will be made. If you already had a backup save, it will be overwritten.
To return to your backup save, go back to the main menu and press L instead of A when resuming the battle. If a backup save is available, there’ll be a counter (under “UNDO”) displaying how many times you’re allowed to return to this backup. When this counter hits 0, you won’t be able to return to your backup save. The “Backup” command will not appear anymore either. Reset the counter by loading or saving a regular game save and subsequently making another backupsave.
Of course, regular suspend is still available. The game automatically saves after every action you take. If you return to a backupsave this save will also overwrite the regular suspend save (resuming a suspend/backup save also counts as an action), so feel free to turn off the game after returning to a backupsave.
So, like the Turnwheel, but with only one moment (of your choosing) you can go back to.
Creating backups is free, but returning to them can only be done a finite amount of times, before the player needs to save or load a game save to reset the counter. If you don’t save in between chapters, the backup save will still be available, but the counter won’t reset (nice try!)
Customization
There’s one variable, “UndoCount.” Change the value this holds in “Suspendx2.event” to whatever many times you wish to allow the player to return to a backup.
By default, there will be a backup command in the chaptermenu, right below suspend. If this makes the menu too cluttered, uncomment the #define OverwriteSuspend in “Suspendx2.event.” This will remove the backup command from the chaptermenu. Instead, you can create a backup save by pressing suspend and declining the offer to return to the main menu.
Concluding
So, this only took me five days to implement. I’m pleased as punch with that speed, because most ASM projects I undertake take me three weeks to a month. ExpandedModularSave has been a lifesaver in this regard; Without it, this would’ve taken way longer.
Credits
- EA credits:
- Nintenlord for making this.
- Kate/Klo/whatever for writing FE6 CHAR support
- Everyone who submitted event codes for this, especially
Fire Blazer and flyingace24. - markyjoe1990 for FE7 event template.
- Mariobro3828 for FE7 world map definition values and
for making the EAstdlib Macro and Command List.txt. - Arch for making code I can use to debug this app,
for his tutorials and his FE6 template. - Ryrumeli for telling me the ASM routine that handles
the events in FE8. - Omni for reporting errors with FE6 disassembly script.
- Camtech075/Cam/Kam for making FE8 template.
- Everyone who uses this and/or reports bugs and/or gives
feedback.
- Text Processor made by circleseverywhere, StanH_.
- ExModularSave made by StanH_, Colorz.
- FEBuilder by 7743. I used this for documentation. https://github.com/FEBuilderGBA/FEBuilderGBA
- StanDOC by StanH_.
- Teq Doq by Tequila.
- Assuming I didn’t miss anything, the rest should go to me, Huichelaar.
Tell me if I’ve missed anyone, I’ll make sure to add them to the credits.
Fortresses & Materials
Download
GitHub
There should be a big green “Code” button on this page, allowing you to download everything. I’m trying something new here, if it doesn’t work out I’ll set up a dropbox.
How to install
Install by using Event Assembler to apply “Fortresses.event” to an FE8U ROM. Or include
Fortresses.event in your buildfile.
What it do?
Heya, this here is a thing I made which installs fortresses, forts, for short. These forts can do two
things for the player. First, they produce materials which can be used to upgrade these forts (I’m
also planning on building a crafting system which can use these materials to craft items). Second,
the forts can provide bonuses based on the (player) unit in charge of the fort. The only bonus I’ve
implemented so far is an exp boost, but I’m planning on making more. More details regarding how stuff
is implemented can be found in “README.txt.”
It’s all still very WIP so I doubt anyone can find a use for it yet, but if you’re interested you can at
least check it out.
Credits
Tell me if I’ve missed anyone, I’ll make sure to add them to the credits.
- The tree being chopped down in the fort menu was made by Obsidian Daddy.
- The other assets displayed in that animation (pirate, plateau) are in vanilla FE8, so credit goes to IS for that. I Frankenstein’d the “MATERIALS” and “FORTS” displayed in the fortmenu from vanilla FE8 menu UI, so credit goes to IS for that too.
- The material icons in order of appearance in “Graphics/Materials.png”:
- Coal from Bomberman Jetters Densetsu no Bomberman, ripped by Garamonde.
- Copper from Bomberman Jetters Densetsu no Bomberman, ripped by Garamonde.
- Lime from Bomberman Jetters Densetsu no Bomberman, ripped by Garamonde.
- Iron from Bomberman Jetters Densetsu no Bomberman, ripped by Garamonde.
- Wood made by kb.
- Magic wood simple recolour I made of an icon by kb.
- Spice from Minecraft, ripped by WizToad.
- Gunpowder from Minecraft, ripped by WizToad.
- Hemp made by Zarg.
- Belladonna made by Beansy.
- Laurel from Minecraft, ripped by WizToad.
- Topaz made by GabrielKnight.
- Ruby made by GabrielKnight.
- Emerald made by GabrielKnight.
- Diamond made by GabrielKnight.
- Milk from Fire Emblem Fates, ripped by Henrai.
- Cabbage from Fire Emblem Fates, ripped by Henrai.
- Grape from Fire Emblem Fates, ripped by Henrai.
- Fish from Fire Emblem Fates, ripped by Henrai.
- Wheat from Fire Emblem Fates, ripped by Henrai.
- Meat from Boktai 3 / Shin Bokura no Taiyou, ripped by Greiga Master.
- Down from Radiant Historia, ripped by redblueyellow.
- Hide from Radiant Historia, ripped by redblueyellow.
- Wool from Radiant Historia, ripped by redblueyellow.
- Oil made by GabrielKnight.
- Rune from Radiant Historia, ripped by redblueyellow.
- ExModularSave made by StanH_, Colorz.
- EA credits:
- Nintenlord for making this.
- Kate/Klo/whatever for writing FE6 CHAR support
- Everyone who submitted event codes for this, especially
Fire Blazer and flyingace24. - markyjoe1990 for FE7 event template.
- Mariobro3828 for FE7 world map definition values and
for making the EAstdlib Macro and Command List.txt. - Arch for making code I can use to debug this app,
for his tutorials and his FE6 template. - Ryrumeli for telling me the ASM routine that handles
the events in FE8. - Omni for reporting errors with FE6 disassembly script.
- Camtech075/Cam/Kam for making FE8 template.
- Everyone who uses this and/or reports bugs and/or gives
feedback.
- Text Processor made by circleseverywhere, StanH_.
- Assuming I didn’t miss anything, the rest should go to me, Huichelaar.
Custom Chapter Intro
Download
The one with the crystals.
The one without the crystals. Used in Pokémblem.
Latest update: 9 November 2020.
How to install
The following two options exist:
1. If you have a buildfile, just add an #include "ChapterScreen/ChapterScreen.event"
or #include "ChapterScreenPokémblem/ChapterScreen.event"
to the buildfile. Make sure that the ChapterScreen
or ChapterScreenPokémblem
folder is in the same directory. Alternatively, apply ChapterScreen.event
directly to a clean FE8U ROM using Event Assembler.
2. If you’re using FEBuilder, go to Advanced Editors -> Insert EA -> Open. Pick ChapterScreen.event and press Load Script. If I’m not mistaken FEBuilder will just ignore the defined FreeSpace in ChapterScreen and use its own generated value instead.
What it do?
This patch replaces the standard chapter opening with something I made. There’s a segment that shows off some crystals doing some funky rotations followed by a segment displaying the chapter title while all living recruited units run from left to right, presumably to this chapter’s destination.
Customization
Which crystals will display is determined by a table that takes chapterID as an index. If you wish to change which crystals will appear per chapter (maybe for plot reasons?), you can change the values in this table. Details on how to do this can be found in the README. The combination of displayed crystals will affect the colour of the background once the gems are ‘slotted’.
I can understand that having the crystal combination be determined by something as rigid as ROM may not be desirable, therefore there’s a GetGemMask
function which is used to get the combination of crystals to be displayed during the chapter opening. All you have to do is change this function to maybe grab some reserved byte in RAM instead and everything should be good. The mask can be stored in a single byte, even just 6 bits (one for each gem) will be enough.
There’s more details on customization in the README.
Pokémblem version
I made a variant without gems/crystals. This one uses a 256-colour background. Mind, only 224 colours are available, as the last two palettes are reserved. Vesley’s Pokémblem uses this variant as of 8 November 2020, but it should be compatible with vanilla FE8U as well.
Concluding
I had wanted to do this for a while, but had to first finish my previous project. Now that it’s finally here, seeing it all come together, it’s all very rewarding. The only frustration I had was coming up with ideas for this whilst having to wait a decent while before I could see them come to fruition due to the time it takes to implement the ideas. Not to mention the stuff I still want to implement, but I guess I’ll save that for another custom chapter opening someday in the future.
Credits
-
Agro/Brendor for the 16 Tracks/12 Sounds Fix.
-
Alusq for the amazing music installer template they made.
-
7743 for FEBuilder. Amazing multipurpose tool, great for documentation too!
-
Square Enix for the Gems/Crystals and Ryan914 for ripping them from Final Fantasy (Dawn of Souls).
-
Konami for the Mist and SMITHYGCN for ripping it from Castlevania Harmony of Dissonance.
-
Konami for the Relief and Urathros for submitting it to Spriters Resource. Idk who ripped it, but it’s used in Yu-Gi-Oh!: Reshef of Destruction.
-
Game Freak for the VersusBG and DRAGOON for ripping it from Pokémon Platinum Version.
-
Game Freak for the AreaBGs and Latias Tamer for ripping them from Pokémon HeartGold/SoulSilver Version.
-
Huichelaar, that’s me. Idk if it’s rude putting yourself on a credit list, but I did make the thing.
Also a massive thank you to the people over at the FEU’s discord #spell-academy channel who have:
- helped me understand how thumb works.
- made tutorials regarding inserting assembly, creating processes, using Lyn, reducing buildtime, etc.
- referred me to great resources such as GBATek and tonc.
Adaptive BGM
This one is really just a proof of concept at this point. I’ll get back to this, eventually.
What it do?
Basically, Adaptive BGM mutes/unmutes certain tracks/channels of a midi during battle and unmutes/mutes those tracks outside of battle. In the example I provided in dropbox, I’m using a modifed version of Desire Below (arranged by Libera over at ninsheetmusic, modifed by me). Outside of battle, only tracks 1, 2 and 3 are playing (0, 1, 2 depending on your mood). When battle starts, tracks 4 and up are unmuted. When battle ends tracks 4 and up are muted again.
Prerequisites
To take full advantage of Adaptive BGM, you should assemble the Change Battle BGM By Chapter (credit: 7743) patch.
You should probably also assemble the 16 Tracks/12 Sounds Fix (credit: Agro/Brendor) patch. It’s part of the Essential Fixes of the skillsystem.
Make sure NOT to assemble the Continue Battle BGM Between Map and Combat (credit: 7743) patch. Adaptive BGM actually uses a modifed version of Continue Battle BGM.
How to install
There’s 2 options:
1. If you have a buildfile, just add an #include "FE8-CalmFlow/CalmFlow.txt"
to the buildfile. Make sure that the FE8-CalmFlow
folder is in the same directory. Alternatively download the Dependencies
folder and buildfile.event
, and assemble buildfile.event
using a clean FE8U ROM.
2. Apply the FE8U-ABGM.ups patch to a clean ROM. This patch also sets the Prologue’s Player Phase BGM, Player Phase Battle BGM, Enemy Phase BGM and Enemy Phase Battle BGM to Desire Below. Please let me know if the patch doesn’t adapt successfully, or if something goes wrong.
How to use
I’ll be using FEBuilder a lot in this section. I find it more easy to work with for this part.
There’s no need to keep the .midi
, .s
or .mp4
files in the FE8-CalmFlow
folder, but to replicate what’s happening in the .mp4
sample, import Fire Emblem Fates - Desire Below.s
in FEBuilder’s Song Track editor to track 3DD
.
Make sure to also set 3DD
's priority type to High (Map Music) in FEBuilder’s Song Table. Finally, in the chapter editor, set the Player Phase BGM and the Player Battle BGM and/or the Enemy Phase BGM and Enemy Battle BGM to 3DD
. That should be all.
Customization
Right-o, that’s all neat for this one (poorly adapted) soundtrack, but what about other soundtracks? Well, there’s some room for customization!
- Simply importing a different MIDI to location
3DD
will have the same effect of channels 4 and up being unmuted during battle and muted outside of battle. - This effect can also be applied to a different location, X, if you replace all instances of
3DD
inInitCalm.asm
,ReturnCalm.asm
,FadeoutCalm.asm
,EndBattleCalm
andContinueBattleBGM.asm
with X and re-assemble these files. - What if you want to mute different (from the top 3) channels outside of battle? Not very hard, but requires a little knowledge of asm. I’ll provide some details below.
- Maybe there are certain channels you wish to mute during battle. This one will also require some asm knowledge. More details below.
- You may want to have multiple soundtracks that can adapt. Maybe for one of these soundtracks channels 3 and up should be muted outside of battle, yet for another soundtrack it’s channels 5 and up. This requires more asm stuff. this time too, it’s not particularly hard, but rather than me painstakingly explaining every step for this one I’d rather you take a look at the asm (I commented it) and ask me if anything isn’t clear, so I can clarify it.
Muting channels outside of battle
There’s a cmp rX, #0xD
command (where X can be some number between 0 and 7) in InitCalm.asm
, ReturnCalm.asm
and FadeoutCalm.asm
, followed by a conditional branch (either ble
or bgt
). 0xD
ensures that channels 3 (0xE
), 2 (0xF
) and 1 (0x10
) remain unmuted outside of battle. increment 0xD
to 0xE
, and only channel 1 and 2 will be unmuted outside of battle. Decrement 0xD
to 0xC
and channel 1, 2, 3 and 4 will remain unmuted outside of battle. You will also have to increase or decrease the immediate in line 36 of ContinueBattleBGM.asm
accordingly, to indicate which tracks should be unmuted during battle. Also, the immediate in line 38 of EndBattleBGM.asm
needs to be adapted appropriately as well. As long as the channels that are to be muted outside of battle are at the top (not interwoven with the other tracks), this will work. If they aren’t, you’ll have add a few more conditional and unconditional branches and labels. Teq’s guide should be very helpful for this: GBAFE Assembly for Dummies, by Dummies
muting channels during battle
I won’t go into too much detail this time, but to mute channels when battle starts you’ll have to put some conditional branches around line 52 in ContinueBattleBGM.asm
. If the immediate in line 52 is 0x40
, the track (which should be 0x10-r5
) at that iteration of the loop will be unmuted when battle starts. If the immediate is 0x0
the track will be muted when battle starts. r5 contains the counter which counts down for every iteration of the loop, and we know which track we’re dealing with by subtracting it from 0x10
.
Concluding
In retrospect, after writing all these paragraphs, I do see how user-unfriendly this patch really is. I still believe it’s more helpful than nothing, but I understand it’s not very attractive to have to do assembly-coding to ‘properly’ take advantage of this patch. I’ll see if I can make the patch more user-friendly in the future!
Danger Radius
Latest update: 13 November 2020.
Dropbox containing the patch. Compatible with vanilla FE8U.
Dropbox containing the patch. Compatible with the SkillSystem (as of August 5th 2020)
PLEASE NOTE: Regarding the SkillSystem version, a hook in the Capture skill is overwritten. Either make sure that Capture is #included BEFORE FogDR or comment out/delete the jump to Should_Dead_Unit_Be_Cleared
in the Capture.event
file.
How to install
There are two versions. For the vanilla FE8U version the following three options exist:
1. If you have a buildfile, just add an #include "FE8-FogDR/FE8-FogDR.event"
to the buildfile. Make sure that the FE8-FogDR
folder is in the same directory.
2. There’s a UPS patch named FE8_FogDR.ups
in the dropbox. Apply that patch to a clean FE8U ROM.
3. If you’re using FEBuilder, use the Insert EA
option and open FE8-FogDR/FogDR.event
. Press Load Script
. Best to make sure you’re writing to free memory.
For the SkillSystem-compatible version, the following three options exist:
1. If you have a buildfile, just add an #include "FE8-FogDR/FE8-FogDR.event"
to the buildfile. Make sure that the FE8-FogDR
folder is in the same directory. I repeat, a hook in the Capture skill is overwritten. Either make sure that Capture is #included BEFORE FogDR or comment out/delete the jump to Should_Dead_Unit_Be_Cleared
in the Capture.event
file.
2. There’s a UPS patch named SkillsTest.ups
in the dropbox. Apply that patch to a clean FE8U ROM.
3. If you’re using FEBuilder, use the Insert EA
option and open FE8-FogDR/FogDR.event
. Press Load Script
. Best to make sure you’re writing to free memory. Insert this EA, after implementing the SkillSystem patch.
Extra functionality
If you replace all instances of DangerRadius
in FogDR.event
with DangerRadius2
The following additional functionalities will be disabled:
- Pressing select on a tile not containing an enemy unit will disable all enemy unit DR’s if at least one enemy unit’s DR is set.
- Pressing select on a tile not containing an enemy unit will enable all enemy unit DR’s if no enemy unit’s DR is set.
Because DR can slow down the game when many are active, the alternative DangerRadius2
exists. Accidentally setting all enemy units’ DR is a mistake quite easily undone, but only if you know how (by pressing select again).
What it do?
This patch implements Danger Radius. Unlike Danger Zone, the danger radius of individual enemy units can be viewed by pressing the select button when hovering over their map sprite. Pressing select again will disable their danger radius.
There’s also the following ASMC macros in here. These can be used for chapter events:
-
CheckDangerRadius(charID): Returns 1 if true - currently displaying the Danger Radius for charID.
-
CheckDangerRadius(X, Y): Returns 1 if true - currently displaying the Danger Radius for unit at coordinates X, Y.
-
SetDangerRadius(charID): Sets the Danger Radius for charID.
-
SetDangerRadius(X, Y): Sets the Danger Radius for unit at coordinates X, Y.
-
UnsetDangerRadius(charID): Unsets the Danger Radius for charID.
-
UnsetDangerRadius(X, Y): Unsets the Danger Radius for unit at coordinates X, Y.
-
SetAllDangerRadius: Sets every enemy’s Danger Radius.
-
UnsetAllDangerRadius: Unsets every enemy’s Danger Radius.
Limitations
- The Fog of War palette is used to display danger radius. To avoid conflicts, If Fog of War is active during a map, Danger Radius is replaced by the more standard Danger Zone as was originally implemented (but not available) in vanilla FE8U. I’d recommend not using the custom ASMC’s during a chapter that has FOW.
- Depending on the size of a map, calculation of multiple units’ danger radii could slow down the game considerably. Make sure not to have too many units’ danger radii active, if you want to avoid lag. Fewer than a dozen should be safe.
- Danger Area automatically disables itself when the current phase is not player phase. It can, of course, be re-enabled during player phase.
- Both versions use byte 0x6 in IRAM (0x0300 0006) and the seventh lsb from byte 0x32 of enemy unit character structs (supports). If these are used by any other installed patches, issues may arise. However, note that only the enemy unit structs are repurposed, not the players’ or allies’.
Danger Area Colour
How to change the DR colour
If you want the danger area to display as a purple ‘layer’ instead of it using the default FOW palette, you’ll have to replace the FOW palette. This can be done quite easily in FEBuilder:
The palette I’m using in the Danger Zone sample gif can be obtained by following these steps:
- Ensure the Tileset Palette is “Fields(01 02 03 05 00)” and Palette Type is “1=fog.” Both are marked in red in the image above.
- Set Palette No. to “0000=0 palette.” Go to the Digitize Palette menu by pressing the Clipboard button and enter
1900934D9149D741185A9530D4553339123D9645D74D5441F03CD861B65D173D
before pressing Change. - Set Palette No. to “1000=1 palette.” Go to the Digitize Palette menu by pressing the Clipboard button and enter
0038B541113D14668D556C552D550F51EF4CD655B255D255D44DB349724D5345
before pressing Change. - Set Palette No. to “2000=2 palette.” Go to the Digitize Palette menu by pressing the Clipboard button and enter
0038F1510F49165EF359F255B151D451914DD559B05592557349514D1045F555
before pressing Change. - Set Palette No. to “3000=3 palette.” Go to the Digitize Palette menu by pressing the Clipboard button and enter
00387341394EF35139621962184E1556B64DF459AF596E594E5931551051534D
before pressing Change. - Set Palette No. to “4000=4 palette.” Go to the Digitize Palette menu by pressing the Clipboard button and enter
00385A66576A345EF255F255B2597249524D19621952D84D764D54493245F165
before pressing Change.
Do note that this only changes the FOW palette for the “Fields(01 02 03 05 00)” tileset palette. To get the purplish Danger Area for any other tileset, you’ll still have to change their palettes. Of course, feel free to go for a completely different palette (negative, sepia, black-and-white, go wild).
Concluding
So, Danger Area got a lot of feedback, and it seems that for a number of people, not being able to use Fog of War as a result of the Danger Area patch was a dealbreaker. Allowing both Danger Area/Radius and FOW on a map wouldn’t be possible due to certain limitations, but giving people the choice between either on a map-by-map basis was certainly doable. Personally, and I’m sure others would have this issue too, I couldn’t stand the lag that came with Danger Zone as soon as not even two-dozen enemies were present on a semi-big map.
Danger Radius aims to fix these two issues. Unlike Danger Area, Danger Radius is implementable on vanilla FE8U. I’ve made a version for the SkillSystems as well. Hopefully it won’t get deprecated any time soon.
I’m also planning, somewhere further in the future, probably within the next year, to come back to this and add and rework a few more things; I’d like to remove a certain piece of hard-coding and I intend to implement some option in the in-game options menu to let the player limit the max amount of active DR.
Again, please tell me if you run into any issues adapting these patches. I’m also new to these forums, so Hi!