[FE8] Shuusuke's Simple Sorcery

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 08018064 to 08017FC4. image

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.
Source: N/A

How to do it: Go to address 2521C, line 0802522E , and change the value there to 08024D8Cimage

Allow Enemies/NPCs/Other units to also gain exp

FEB Patch: No, because there are visual glitches, but it still functions normally otherwise.
Source: N/A
image image
Visual bug: image
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 2B9F4, line 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 NPCs to gain EXP, or 0x80 to allow only enemies 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

FEB Patch: Allow the player to steal from NPCs (green units)
Source: N/A
How to do it: Go to 25BA0, lines 08025BAA and 08025BAC, change r0 to r1 and #0x80 to r0 respectively.image
NPCs won’t steal from the player, even with this.

Allow Enemies/NPCs/Other units to get droppable items

FEB Patch: Remove restriction on droppable items
Source: N/A
image image image image image image
How to do it: Go to 3292C, line 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

FEB Patch: GetCurrentlyPressedKeys
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 <<<<
mov r2,r1
ldr r0,=0x30004B8 @FE8U MemorySlot0
mov r1,#0x0C @FE8U MemorySlotC
lsl r1,#2
str r2,[r0,r1]
bx lr
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.


:eyes: cool stuff

I see you like to do stuff with NPCs as an opposing army, hah

1 Like
My master plan



1 Like

If you make a patch, I’ll register it.
In FEBuilderGBA, patches that fix multiple locations are implemented as switch patches.

For example, the patch that fixes 0x73758 and 0x73D2C, 0x73722 is written as follows.
When Default is selected, the OFF item is executed, and when Fix is selected, the FIX item is executed.

NAME.en=Fixed the display of large level-up screens
INFO.en=Move the text tiles in vram so that they don't overwrite the battle screen's larger tiles



OFF:0x73758=0xC0 0x28 0x00 0x06
OFF:0x73D2C=0x8C 0x22 0x12 0x01
OFF:0x73722=0xA3 0x22

FIX:0x73758=0x00 0x3C 0x00 0x06
FIX:0x73D2C=0x1C 0x22 0x12 0x02
FIX:0x73722=0xF0 0x22

The only one that I may have forgotten to ask about was the fourth one, which allows the player to steal from NPCs. I don’t know if it would conflict with other patches, but the patch file for what I described in the first post should look like this:

NAME.en=Allow the player to steal from NPCs (green units)
INFO.en=Normally blue units can only steal from enemies, but this patch also allows them to steal from NPCs if the other requirements for stealing are met.\r\nNPCs won’t be able to steal from the player even if this is done.\r\n
AUTHOR=Shuusuke [FE8] Shuusuke's Simple Sorcery



OFF:0x25BAA=0x08 0x40 0x80 0x28

FIX:0x25BAA=0x09 0x40 0x80 0x42

The others I already asked about previously, and I listed the explanation you gave me for why you didn’t add them to FEBuilder.

Also, I forgot to add GetCurrentlyPressedKeys to the first post, so I’ll be doing that.
EDIT: Done that.
EDIT2: Allow the player to steal from NPCs (green units) was added to FEBuilder’s patches.

1 Like