Some minor modifications suitable for porting to other people’s games may be shown here. Mainly write in C, C-Lib is called as decomp-based include files.
Simple CHAX Toturial
This is a simple example of building the Buildfile based on Proj.FE8U-Decomp outputs (or say c-hacks, CHAX).
Wizardry folder includes some functions based on decomp, you can directly copy the decompiled function into it and modify it again.
The repo’s readme documentation details how to compile. I think this may be a beginner-friendly tutorial-type template.
I also use this template to test some new functions, so I recommend it to you.
This hack enables you to get any number of hit counts to show on Battle-Forcast window.
BkSelExpansion.event and you will make it.
Expand Unit Status to 63 index
In vanilla, unit status (buff & debuffs) use a u8 byte at
Unit Struct +0x30 , 4 bits for status-index, 4 bits for status-duration. In this work, we have expanded unit status index to 6 bits, which can support up to 63 different states simultaneously. Meanwhile, through a series of modifications, we successfully used the remaining 2 bits to make the status last for up to 4 turns.
Remove the total BWL Table entry
BWL Table, or Battle & Win & Lose table, a ram-space as large as 0x460 size that can be saved and loaded in save & suspand data.
The data has no meaning to the game experience, but it can provide a 0x460 saveable data for hackers as a free-ram-space.
Previously @StanH has worked
Brif-Bwl in Skills-Lite, in this work, we completely shielded this area from all read and write operations except save-data operations, making it a free-ram-space that can store data freely.
Hack on Skill Anime Effect
Reset the Bg config to null the semi-transparency effect.
H&S Screen Rework
DIY on H&S Screen. You could just include
GameStartScreen.event and get it. For your own gfx, replace the file
Data/GameIntro.4bpp.lz with a LZ77 compressed Png2Dmp file.
Eyes blink in Weapon-Selection
// Portrait's eye will wink ORG $22C0A SHORT 0 0 ORG $005EA8 SHORT 0 0
Added more blinking routines by genius @7743
//for FE8U PUSH ORG 0x05EA8 BYTE 0x00 0x00 0x00 0x00 ORG 0x1E0CC //HandleNewItemGetFromDrop BYTE 0x00 ORG 0x22BB2 //? BYTE 0x00 ORG 0x22C08 //AttackCommandEffect_DrawFace BYTE 0x00 ORG 0x2326E //PlayOrDanceCommandEffect BYTE 0x00 ORG 0x23324 //ItemCommandEffect BYTE 0x00 ORG 0x23582 //ItemMenu BYTE 0x00 ORG 0x2361A //? BYTE 0x00 ORG 0x23B06 //StaffCommandEffect BYTE 0x00 ORG 0x2999E //HammerneTargetSelection_OnSelect BYTE 0x00 ORG 0x2D802 //TradeMenu 1 BYTE 0x00 ORG 0x2D80A //TradeMenu 2 BYTE 0x00 POP
//for FE8J PUSH ORG 0x05DAC BYTE 0x00 0x00 0x00 0x00 ORG 0x1DD28 BYTE 0x00 ORG 0x22B7A BYTE 0x00 ORG 0x22BD0 BYTE 0x00 ORG 0x23236 BYTE 0x00 ORG 0x232EC BYTE 0x00 ORG 0x23546 BYTE 0x00 ORG 0x235DE BYTE 0x00 ORG 0x23ACA BYTE 0x00 ORG 0x2992A BYTE 0x00 ORG 0x2D73A BYTE 0x00 ORG 0x2D742 BYTE 0x00 POP
Reworked on promotin routinue to allow diy on promotion list. Now you can freely decide the promotion list based on character index, class index and item index. Since this patch does not involve the item system rework, if you want to use non-promotion items to promote characters, you will also need other patches such as IER.
PromotionRework.event and then you will get it. For custom usage, define your own usr-function
const u8 *GetUnitPromoList(u8 charId, u8 classId, u8 itemId), I have made an example.
A Map Anime Effect
A DIY map anime, just like Debuff-Status-Clear-Routine.
MapAnimesInstaller.event, then call for function
void StartMapAnim_Gravity(struct Unit* unit, ProcPtr proc), then it will start a child blocking proc to show anime effect.
Due to the default of the program, the target character exists in the current screen, so there is no effect of moving the camera. If not, you can either move the camera over before calling the function, or delete the comment on line 41 in
Function: PrependArticleToString rework
For now, replace “a” patch is just delete the character, this patch has rewrite function
void PrependArticleToString(char *str, const char *insert_str, s8 c) so that we can replace “a” to a space.
Just include “RemoveA.lyn.event” and then you will make it. Don’t forget define your own
FreeSpace since this is just a c-generated file.
TargetSelect Proc Rework
A interesting rework on
SelectTargetProc so that we can change weapon during target-selection.
Now Up & Down botton will change the target, meanwhile
Left & Right button could make you change another weapon to attack. If you don’t have any other weapons to attack current target, then the Left & Right will function as vanilla to try change target.