I almost titled this thread “Shuu’ssembly” before the alliteration dawned upon me
I don’t make it a secret that I’m not a fan of ASM, but even then, I’ve done some very basic stuff that I figured I should put together somewhere, and thus this here SSS was created.
I’ll include whether there is an FEBuilder patch for it (and if not, why), the source(s) for more information if there are any, explanations and images of the result/how to do it. Thanks to 7743, Sme, Leonarth, Pikmin, Epicer, and Vesly for helping with some of these at some point. They’re currently FE8 exclusive, some specifically for FE8U only.
Change easy/normal mode penalty into bonus
FEB Patch: “Change Easy and Normal modes level penalty into level bonus”
Source: [FE7/FE8] Difficulty stat changes
With this, the values previously read to lower autoleveled unit’s levels in easy and normal modes will instead be used to increase their level, like what’s done for hard mode. (Note that FEBuilder’s interface won’t change to reflect the patch).
Example of the same unit in Normal mode using the same modifier of 0xF (15 levels), left is vanilla behavior (penalty, essentially nothing since the unit has less than 15 levels), right is with the edit (stats are calculated as if the unit was 15 levels above their actual level).
The idea for this was that you would design around the Easy difficulty having no modifiers, so that you could have two increased difficulty options.
How to do it: In the Disassembler, go to address
18064, go to line
080180FA, and change the value
Allow the player to trade with NPCs
FEB Patch: No, because it conflicts with Capture, which is part of the skill system. If you use the skill system, the code will be different and this won’t work.
How to do it: Go to address
0802522E , and change the value there to
Allow Enemies/NPCs/Other units to also gain exp
FEB Patch: No, because there are visual glitches, but it still functions normally otherwise.
The Soldier is the one who leveled up, but it displays Eirika’s data instead, since only the unit on the right can normally level up. Also, since the Soldier uses a generic portrait, it displays a broken image instead. But it occurred correctly, and as seen above, the Soldier’s stats were updated. Both units leveling up will also occur correctly, despite graphical bugs.
How to do it: Go to address
0802BA0E, the default value there is
0xC0, meaning only blue units can gain exp. To make it so all units can gain EXP, change it to
0x0 like in the image. Change to
0x40 to allow only enemies to gain EXP, or
0x80 to allow only NPCs to gain EXP.
Once this is done, you have to set the EXP of the units that you want to level up to a value other than 255, which is another condition that restricts EXP gain in vanilla, and was not changed for convenience (this makes it so units don’t break their level cap, and lets you select which units can gain EXP instead of making all of them do so unconditionally) through events. With the “Set all unit status” patch it’s easy to set this for multiple units at once, if that’s what you want. Note that units will use their unit growths when leveling up this way, regardless of autolevel, even generics.
Allow the player to steal from NPCs
Allow the player to steal from NPCs (green units)
How to do it: Go to
NPCs won’t steal from the player, even with this.
Allow Enemies/NPCs/Other units to get droppable items
Remove restriction on droppable items
How to do it: Go to
08032942, the default value is
0xC0, meaning only blue units. Change to
0x0 to allow all units to get droppable items,
0x40 to allow NPCs, or
0x80 to allow enemies.
Note that if an enemy/npc gets an item and can’t carry any more, the player will be prompted to discard or store one of their items, depending on whether the convoy is enabled.
Get currently pressed keys
Source:This post, 7743 later improved the code which is listed below.
This is an ASMC, so if you use FEBuilder, just apply the patch. If you don’t use FEBuilder, the code is listed below.
This ASMC makes it so the bitmask of the keys being pressed by the player are returned to memory slot C. The bitmask is the same used for vanilla command IGNORE_KEYS, so A is 1, B is 2, A+B is 3, select is 4, and so on. FEBuilder’s patch also includes a command to check if the pressed keys are the one(s) you want, using the intuitive menu you see in the images.
ldr r0,=0x2024CC0 @Key press bitfield pointer
ldrh r1,[r0,#0x4] @Key press bitfield start <<<<
ldr r0,=0x30004B8 @FE8U MemorySlot0
mov r1,#0x0C @FE8U MemorySlotC
At first this was made to simulate RPG walking, but later Sme’s Free Walk ASMC was made, so it was surpassed for this purpose. Still, you can use it if you want to know what the player is pressing during an event, such as letting the player decide with direction to move to by checking the right/left keys, or if they approve/deny a suggestion by checking A/B, and so on.