[FE8U] Fourth Allegiance

[FE8U] Fourth Allegiance


This hack adds a fully independant fourth allegiance to FE8U, Based on the 4th army used by the link arena. Note that this hack is incompatible with the skill system family of engine hacks.

Download Here

How to Install

Non-buildfile users

Requires Event Assembler.
You will need to install this engine hack into your ROM’s Free Space. To do that, add ORG (YourFreeSpaceOffset) at the top of MasterAsmInstaller.event.
Then, use event assembler to assemble MasterAsmInstaller.event into your rom, and you should be good to go.

Buildfile users

Simply include MasterAsmInstaller.event into your buildfile, and everything should be good to go.


Adding 4th allegiance units

To add units of the 4th allegiance, simply set the faction in your unit definition to 3. In FEBuilder, that should appear as “Defeat”.

Setting Faction Relations per chapter

Faction relations are handled via a bitmap. The short at +0x26 in the chapter data table is said bitmap. (Under “Enemy Phase BGM Flag 4” for FEBuilder users.)
This hack automatically sets all chapters to have the vanilla relations for Blue, Red and Green units, and has Purple units be hostile to everyone.
There are 4 bitmaps, in the order Blue-Green-Red-Purple; one per faction, and then each bit sets if you are allied or enemy to a faction, in the same order. Edit that bitmap to set your relations however you’d like.
Due to it being 4 Bits, you can interpret the short as if every nybble(character in a hex number) is for a different faction; in this case the order goes reverse. Then, to set your custom relations, you change the desired nybble. For example, my vanilla behaviour is 0x8433; if we interpret it by nybble, we go in the order Purple-Red-Green-Blue, so we have 8 for purple units, as 1<<3 is 8 and they are not allied to anyone asides from themselves; we then have 4 for red units, as 1<<2 is 4 and they are not allied to anyone asides from themselves; we then have 3 for both blue and green units; they are allied, and blue units are faction 0 and green units faction 1, we get 1<<0=1 and 1<<1 = 2, which in turn becomes 1+2 = 3 as they are both allied to each other. I hope that explanation will help you understand the system better.

Alternatively, if you’re using buildfiles, you can use the macros included.

Setting Map music for the fourth faction

Short 0x1C in the chapter data table is map music for the fourth phase(“Player Phase BGM 2” for FEBuilder users), while short 0x1E is map music for the fourth phase when flag 4 is set(“Enemy Phase BGM 2” for FEBuilder users).

Other important info

The maximum number of purple units is 20. Please ask me if you want a version with a specific number of max units.

Huge thanks to Shuusuke and Shane for helping with testing(and giving screenshots), Peerless for the “NEUTRAL PHASE” banner graphics, and HyperGammaSpaces(along with other people at the spell academy of FEU’s discord server) for technical help.

Please report any glitch your find either on this thread or in the issue tab of the


I don’t even get credit for the NEUTRAL PHASE graphic? wow ok


Fixed; I apologize for the inconvenience.


Very cool - thanks Kirb!

I’m getting a 404 when I click on the download link.

Accidentally uploaded the repository as private, it should be fixed now. I apologize again for the inconvenience.


This is great thank you all!

Thanks for reporting! I have been keeping a list of every glitch found so far and I’ve been fixing most of them. Expect an update in the following days.

As for other news, I’ve been working on Skill System compatibility. I hope to be able to give you an update on that in the near future.


I just noticed the 5+th unit disappearing when updating [FE8U] FE8 Free For All (4th allegiance test) - Update v2, nice to see someone found it first.

A list of known issues/required additions would be good to let us know what you’re working on and is aware of, in case things get reported somewhere else specifically. I found some issues today so I’ll compile what I know into a list:

Event command additions:
-Change unit into the 4th affiliation (CUSF)
-Clear all 4th affiliation units (CLEF)
-Count how many 4th affiliation units are in the map (CHECK_FOURTH)

-Only 10 NPCs are saved.

Graphical issues:
-When there are more than 5 4th affiliation units, map sprites of the units after that will disappear when another unit is moving.
-When a 4th affiliation unit is rescued, the rescue icon uses a strange palette (which distorts further when the phase changes) image
-Units in the 4th affiliation don’t display a status icon in the map if they’re afflicted.
-When units in the 4th affiliation are cured from a status effect, the animation uses a strange palette.image
-Units in the 4th affiliation use a strange palette in the minimap. image


Another issue I’ve noticed: While using the HP bars talk display thing (I’m using FEBuilder), a display to talk with a fourth faction unit (while the conversation initiator is selected) doesn’t appear. The talk option is still available, but you need to put the conversation initiator next to the fourth-allegiance unit to see that it’s even there.

That is probably more on that patch’s end though, i noticed that other patches (for example, the ones that do something for multiple units at once) also sometimes ignore some 4th allegiance units. Which is completely understandable since the addition of a new allegiance was not expected to happen, so patches just work for the 3 vanilla ones. Perhaps this hack could do something to make general commands also check the 4th affiliation list though, so that they don’t all individually require rewriting.

Another thing that just occurred to me but i wont be able to test in a while, is the behavior on fog of war. I think that the player should be able to see units they are allied with, and not vice-versa.

EDIT: Vanilla fog of war behavior is unchanged. You also have vision of green units and not the others, regardless of affiliation.

I believe that the warnings should work for the first 6 purple units, due to the size of the warnings cache being 0xC6; Anything above that would require that cache to be expanded.

I only had five purple units on the map, and the talk conversation was itself the only one the map had.

Trying to use it on a very simple game with no skillsystem or anything but music patches and this. A few bugs I’ve found so far:

  1. When there is an event to spawn 4th allegiance units and there are exactly enough units to not have the event spawn anything, the game softlocks
  2. AIs flat out do not work for me when there are these types of units on the map (i can send you a mp4 showing what happens to me on discord)
  3. Changing the palette for fourth allegiance units using FEB stays at purple or the original palette
  4. Green units fight eachother!?!??

I’m having all the issues Magix has in my 1 Hour blitz hack, actually.

For the fourth army palette I don’t remember where the address was but it uses a different address; I simply used a hex editor to copy the palette I wanted over it

I’m at work right now so I can’t get the address yet

1 Like


Send a patch/report and savestate(s) reproducing the issues. The cause could be something else, and without anything to investigate, we’ll never know.

1-My experience with this is that it lets you spawn the units even after the limit of 5, but after the event ends, units after that aren’t saved. For example, if you spawn 6 purple units, but make one of them green before the event ends, they all will stay. If you make an non-existent unit move without the fix, the game will hang.

2-I haven’t had problems with their AI myself. Unless you mean trying to change their AI through events, which I wouldn’t be surprised if there are issues since the game normally doesn’t check there. Please clarify and send a patch.

3-The patch hijacks the light rune palette, the original purple palette is only used in the link arena. I’m not certain why this is done, maybe because the link arena’s hardcoding includes swapping the two palettes since they’re never used at the same time. The sepia palette exists though, maybe that would be a better sacrifice. To change the light rune palette to the purple one, open a hex editor and write 90 42 0B 35 B5 76 9C 7F 8F 29 38 26 FF 67 0B 31 90 49 77 72 1A 7F 5D 0C FF 17 30 3A FF 7F A9 20 to 0x59EEC0

4-I assume you meant you correctly set their affiliation to not to fight each other, and it happened anyway. Haven’t had that issue myself, so please clarify and send a patch.

EDIT: Meant to suggest something, but forgot to after replying to the message. The affiliation settings could also change fog-of-war view. As I’ve reported earlier, it’s unnaffected by the fourth allegiance patch, so regardless of the affiliation you set, you can still see what green units see and not what red and purple units see.

I can send you a video of what i mean and hopefully i can search for some backups. Otherwise ill have to recreate it. I can send you all the stuff on discord. Magix#1484

Wow, this patch screws up the AI.
It doesn’t work for me at all - the red units stop attacking you and only move towards you to a range of two spaes and the grey units just stand there and watch.

Late, but make sure you read how to set the affiliations’ allegiances, which it sounds like you didn’t. If you correctly set it and are still having problems, send a report in the FEBuilder channel, otherwise there’s nothing anyone else can do if there’s nothing to investigate.

Also, I noticed thanks to a report a few days ago that the 6th and 7th units of the fourth allegiance always get erased after being loaded, but the 8th and so on still stay. So that’s a bug that needs fixing, but as a workaround just skip those units.

1 Like

Ran into the same issue and this fixed it for me. I did what Kirb said and it did the thing:

The AI seems to be working fine. I’ll have to run more tests, to see if it truly works as intended. I had to sacrifice the unique bgm flag patch for this patch to work correctly however.

Sadly, installing the patch does corrupt my save files. After installing the patch, all save data is lost and importing save files makes them corrupt.

All in all: If the patch works as intended, it will be well worth the sacrifices. Thanks Kirb and Shuusuke!

1 Like