Mokha's Hacks Sundries

All for FE8U.

Some minor modifications suitable for porting to other people’s games may be shown here. Mainly write in C.

Repo in github see here (which is just working-in-process)

New Decomp-based C-Hack Template

MokhaLeee/fe8-chax-template: simple FE-CHAX template fit for decomp (github.com)

Modern c-skillsystem

23

[FE8] Morden c-skillsystem release - Resources / Assets - Fire Emblem Universe (feuniverse.us)

Battle Forcast Hit-Counts Hack

BkSel Expansion

Download Here

33

This hack enables you to get any number of hit counts to show on Battle-Forcast window.

Just include BkSelExpansion.event and you will make it.

Unit Status Rework

Expand Unit Status to 63 index

See Here

cSkillSys3

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.

Null BWL

Remove the total BWL Table entry

Download Here

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.

Ekr Skill Activate Anime Hack

Hack on Skill Anime Effect

Download Here

Reset the Bg config to null the semi-transparency effect.

Vanilla:32
Hack:33

Costum Game Intro Gfx

H&S Screen Rework

Download Here

32

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.

Weapon Selection routine’s Eyes Blink

Eyes blink in Weapon-Selection
// Portrait's eye will wink
ORG $22C0A
SHORT 0 0

ORG $005EA8
SHORT 0 0

32

Update

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

Map Anime Effect: Gravity

A Map Anime Effect

Download here

32

A DIY map anime, just like Debuff-Status-Clear-Routine.
Just include 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 Gravity/Gravity.c

Replace “a” or “an” to space

Function: PrependArticleToString rework

Download Here

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.

Change Weapon During Target-Select

TargetSelect Proc Rework

Download Here

ChangeWeaponDuringTargetSelect

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.

Unit Debuff Banim Flashing Rework

DIY your own flashing effect for debuff

A patch that allows you to customize the debuff flashing effect on unit during battle.

1

Download Here

Usage:

Include file EfxStatusUnitRework.event and define your own debuff flashing effect in EfxUnitDebuffPalConfigTable, which you may define the flash R/G/B color and the flashing speed.

The R/G/B effect is recommended ranging from 0 to 0x10, the higher value may result in a more pronounced flashing.

The speed range from 0 to 3, in which 0 will not change the color, 1 is the slow speed, 2 is the vanilla, and 3 may flash fast.

This patch is not conflict to any existing patch since the unit debuff index is not directly caught from unit struct, so don’t worry.

Banim Command Expansion

see here: #18

C0E/C0F (flashing screen)

1

C16/C17 (Call DK)

1

C53/C54/C55 (Call Dumma)

C55

ClassChg expansion

expand promotion list

Download here

a rework of Old promotion expansion, enable unit promote to no more than 6 classes.

image

1. Custom Usage

1.1. Vanilla table

Vanilla table of 2 selectable classes has been retained. You can also config on old table to diy branched promotion classes.

1.2. Expansion

At the same time, there are two list for promotion expansion:

  1. gPromoJidLutExpa
    A 0x100 * 4 linear table according to class index.
    You can config 4 additional class to promote.You can also config this table by FEBuilder’s patch, ./patches/PATCH_ClassChgExpandList.txt
  2. gClassChgExpaMods
    A table for promotion with higher degrees of freedom. A unit can promote to ClassChgExpaMod::jid_promo if:
  • The configed class index is matched
  • The configed character index is matched
  • The configed item is used for promotion
  • The configed event flag is set

You can config this table by FEBuilder’s patch, ./patches/PATCH_ClassChgExpandModulearList.txt

1.3. Trainees

As for auto-promotion for trainee class, there is also a reworked table for configuration. gpTraineesRe , with two element jid and level .

You can also config this table by FEBuilder’s patch, ./patches/PATCH_ClassChgExpandTrainee.txt

Custom Build

If you want to modify on source code, please refer to CHAX template, note that the C-Lib use the ver.2023.07.31.

You can also write your own jid-getter function and add the function to the list gGetClasschgListFuncs.

/**
 * r0: unit struct
 * r1: protion item
 * r2: out buffer
 * r3: length of the out-buffer, DO NOT overflow!
 *
 * return: amount of the classes to promote
 */
typedef int (* GetClasschgListFunc_t)(struct Unit * unit, u16 item, u8 * out, int len);
extern const GetClasschgListFunc_t gGetClasschgListFuncs[];

Note that this patch has been embedded to the latest version of SkillSystem , you can directly use the FEB patches without installing for skillsys users.

FE6 style StatScreenfx

StatScreen UI

111

fe8_hacks_sundries/wizardry/StatScreenfx at main · MokhaLeee/fe8_hacks_sundries (github.com)

Just as the image, let FE8U statscreen display in FE6 style.

This patch has no conflict to SkillSystem, you can directly use this patch to your skillsystem with no worry.

No wait after trade

PreAction hack

Unit may not wait after trade with unit nor supply.

1

Download here


In vanilla, if unit has traded with somebody, he can handle other action freely but can only wait if player want to control other units. You can get more details here . This taken action is saved in gBmSt + 0x3D, and may casue wait during pre-action handler PlayerPhase_PrepareAction. This patch hacked such function and handle on actions before that handler in modular.

Dummy Spell anim fix

fix spell anim

Download Here

Suppose you set Rapier’s range as 1-2 without configuration on SpellAssoc::efx , you may got a problematic animation as a result that dummy efxmagic does not deal the hitted anim properly. This patch fixed on dummy spell anim as below:
vanilla →

2

fixed →

1

FE7 style thunder bmfx

new bmfx

Download here

1

Port form FE7 event thunder fx to FE8U with API bmbgfx , event script is intergrated, you may save the target character index to slot2 and directly call for event EventScr_CallThunderfx

Example

SVAL 2 Riev
CALL EventScr_CallThunderfx

FE7 style SpawnAssassinfx

new bmfx

Download here

111

Usage (see here )

SVAL 3 0x6     // [slot3] = x
SVAL 4 0x8     // [slot4] = y
ASMC CallEvent_SpawnAssassinfx
STAL 1

Port from FE7, you can also directly load an Assassin after call for such bmfx just as what it did in FE7

20 Likes

Ekr Skill Activate Anime Hack

Download Here

Reset the Bg config to null the semi-transparency effect.

Vanilla:32
Hack:33

6 Likes

Custom Game Intro Gfx

Download Here

32

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.

5 Likes

Eyes blink during Weapon-Selection

// Portrait's eye will wink
ORG $22C0A
SHORT 0 0

ORG $005EA8
SHORT 0 0

32

update

add 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
11 Likes

Is there a standalone version of the skill animation that shows the skill name?
image

It seems that item index may be failed to indentify in Promotion-Rework patch, I have fixed this bug, also updated to download link to git repo.

Map Anime Effect: Gravity

Download here

32

A DIY map anime, just like Debuff-Status-Clear-Routine.
Just include 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 Gravity/Gravity.c:

// PROC_CALL_2( ProcGravity_MoveCamera ),
9 Likes

Replace “a” or “an” to space

Download Here

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.

This is also supported for UTF8 Characters such as Chinese and Japanese texts.

5 Likes

Decomp-based C-Hack Template

Github repo at here

This is a simple example of building the Buildfile based on Proj.FE8U-Decomp outputs (or say c-hacks, CHAX).

The 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.

7 Likes

Change Weapon During Target-Select

Download Here

ChangeWeaponDuringTargetSelect

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 button will function as vanilla to try change target.

14 Likes

I think this routine could be extended to add blinks in other places

//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
3 Likes

fe8_hacks_sundries/wizardry/ts_rework at main · MokhaLeee/fe8_hacks_sundries (github.com)

I have updated patch “change weapon during target-select” so that now we can properly handle with un-breakable weapon. Also a CHAX repo has been established for costum usage.

7 Likes

Sorry, I don’t quite understand how exactly you edit the text here to set the extended promotions. Is there a tutorial I could follow?

1

Download Here

Unit Debuff Banim Flashing Rework

A patch that allows you to customize the debuff flashing effect on unit during battle.

Usage:

Include file EfxStatusUnitRework.event and define your own debuff flashing effect in EfxUnitDebuffPalConfigTable, which you may define the flash R/G/B color and the flashing speed.

The R/G/B effect is recommended ranging from 0 to 0x10, the higher value may result in a more pronounced flashing.

The speed range from 0 to 3, in which 0 will not change the color, 1 is the slow speed, 2 is the vanilla, and 3 may flash fast.

This patch is not conflict to any existing patch since the unit debuff index is not directly caught from unit struct, so don’t worry.

11 Likes

3
Working in process on skill-activation in FE7J

12 Likes

Banim Command Expansion

Download here


Working on some simple effect to expand banim command.

1

  1. C0E
    Call for a fake hit (flashing BG) the same as C51, but with red color and hold a longer duration (C51 holds 5 frams but C0E holds 16 frams)

  2. C0F
    Call for a fake hit (flashing BG) the same as C51, but with black color and hold a longer duration (C51 holds 5 frams but C0F holds 16 frams)

2

  1. C16
    Freeze the anim until the DemoKing has been summoned in background
13 Likes

It is welcome if any guys have any ideas on adding new command for banim script. I may try to make it if possible.

Bnaim-cmd

1

5 Likes

Bnaim-cmd

C53C54

  • C53 (CallDuma):
    Freeze the anim until the dragon-Duma has been summoned in background. You must call for C54 (or C17 or C55) to remove it.

  • C54 (RemoveDuma):
    Freeze the anim to remove the summoned Duma by C53

C55

  • C55 (RemoveDumaNonBlocking) :
    The same as C54, but will not freeze the anim.
4 Likes

Some note on banim ekrgauge

0805160C: display left hp bar number
08051688: display right hp bar number

08051746: display left top hp bar
080517AC: display left down hp bar

08051878: display right top hp bar
080518D8: display left down hp bar

0805191C: Hit/Dmg/Crt number LEFT
08051946: Hit/Dmg/Crt text LEFT

0805197C: Hit/Dmg/Crt number RIGHT
080519A2: Hit/Dmg/Crt text RIGHT

* HP bar position

080514FC: handle hp bar (one line) y pos

0805172A: handle hp bar (two line) top y pos LEFT
08051770: handle hp bar (two line) bottom y pos LEFT

0805185C: handle hp bar (two line) top y pos RIGHT
080518A2: handle hp bar (two line) bottom y pos RIGHT

* proc definition

Proc_Ekrgauge:
+3A: base yPos