[FE8] How to add Status Expansion to the current Skill System build?

I’m trying to add @Sme’s Status Expansion to my project (I’m using the latest version of the Skill System), but nothing works as expected.

This is what I’m doing.:

  1. I added the installer to the project.
#include "StatusExpansion/StatusExpansion.event"

I set a staff to apply the effect:

In the Item Table:
Byte 0x1E: 0x34
Byte 0x22: 0x4E (Duration: 0100b [0x4], Effect: 1110b [0xE], Total: 01001110b. For some reason using 0x5E gives a blank status instead of 5 turns of status 0xE)

In the UseEffectAnimTable:
0x34,0x34,2,0x2d,0x0,0x0,0x89a4ea4,0x0,0x0,0x0,0x0 (Copy Silence Animation)

In the IERevampTable:
0x34,0x8028aec,0x802a100,0x8028fcc,0x802fe74 (Silence's Usability and Targeting)

In the SpellAssociationTable:
0xF6,HexingStaff,0x2,0x26,0x00,0x0,0x89A4EA4,0x0,0x0,WhiteFlash,0x0 (Use Silence's Animation)

With this the staff should apply the Hex status to the target, right?

The target:

The staff does work:

The status gets inflicted… but it does nothing, the target still has all the PV.

And for some reason the detail box says it only lasts for 2 turns:
(Ignore the palette)

Another odddity is that the status changes after 1 turn:
Looking at the memory, the status changed from 0x4E to 0x3E.
In the next turn it goes back to Hexing status with 2 turns remaining.

Additionally, a random thief got poisoned for 10 turns instead of 5.

Ok, so then I go to:
2. I check the files and try to figure out a way to make this work.
In HexingRod\HexingRod.event:

#define HexingRodStatusID 0xE //first fully unused status ID


//add this to the max HP getter file
// prHexingRodStatus:
//    rIfUnitHasStatus(HexingRodStatusID); rHalved
//and a ptr to prHexingRodStatus to the getter loop itself
//define text IDs for name and desc (only used on stat screen)

So, I’ll go check the Max HP getter and it already has this:

	#incbin "_asm/HexingRod.bin"
	WORD DebuffTable

And I’ll add this as the HexingRod.event suggests:

pMaxHPModifiers: // Maximum HP
	POIN prAddUnitMaxHP prHexingRodStatus prHexingRodEffect prAddEquipHP prItemPassiveHp 
	#incbin "_asm/HexingRod.bin"
	WORD DebuffTable


And… still nothing:

At this point I give up with Hexing, so I’ll try with Enfeeble.

  1. Enfeeble doesn’t have instructions…
#define EnfeebleStatusID 0x1F //last valid status ID


#include "Enfeeble.lyn.event"

BYTE EnfeebleStatusID

// Add `` to stat getters for stats you want enfeeble to debuff
// Define EnfeebleName and EnfeebleDesc (only used on stat screen)

Moving on to Regen.
4. …

#define RegenStatusID 0x10


BYTE RegenStatusID

//meat of this is in hp restoration skills func

Ok, but the other files have names that might help: RenewalAmaterasu.s and RenewalAmaterasu.lyn.event
In the current version of Skill System, the HP Restoration skills have been divided in separated files, meaning that I have to create the proper entry for Regen to work.

I copied the ASM code and created this file:


.global RegenStatus
.type RegenStatus, %function

push {r4-r5,r14}
@check for status
mov r0,r5
add r0,#0x30
ldrb r0,[r0]
mov r1,#0x1F
and r0,r1
ldr r1,=RegenStatusIDLink
ldrb r1,[r1]
cmp r0,r1
bne NoRegenStatus

@add 10% regen
add r4,#25

mov r0,r5
pop {r4-r5}
pop {r1}
bx r1


I compiled the .elf and .lyn.event files and I add this to the Regen.event:

#include "RegenStatus.lyn.event"

And I added it to the corresponding CalcLoop function:

HPRestorationLoop: //for each, r0 = unit and r1 = current heal %; return modified heal % in r0
POIN Renewal Relief Imbue Forager Camaraderie Amaterasu
POIN HealTiles
POIN RegenStatus
WORD 0 //terminator

And because I’m too lazy to create another Staff to do the job, I’ll just edit the memory:
And just wait for the next turn and…
Did he just… restored his status to normal?
Even without the Regen status injured units go back to normal as if they had a status affecting them (That goes for enemies too, the thief was poisoned and he restored his status to normal)

Then I tried with Haste and Slow, and those didn’t work either.
What am I doing wrong?
How do I fix this?

As a side note, I know this Status Expansion hack is meant to work with 3 bites for duration and 5 for the status ID, however, it doesn’t seem to work like that.
To make the Hex status work for 5 turns, it should be 101b+01110b (0xAE), but that only gives it 10 turns instead of 5.

1 Like

I’m not sure how to fix it, but as you note at the end, the data for status expansion is saved differently to accommodate more statuses.

It looks like it is treating the status as if it weren’t expanded. Something needs to tell it to decrement in a different way.

Sorry I can’t be more of a help. Hopefully someone else can give you a real answer.

I tested this on a vanilla ROM (using Skill System) and it doesn’t work.
Probably something changed between updates and this got deprecated.

1 Like

Are you using a buildfile or a custombuild of skillsys? You should ask Sme about it if it’s via buildfiles. Otherwise, I know many of the files in the custombuild have a last edited date from around February, so the febuilder patch does need some updates.

I’m using buildfiles and the latest version of Skill System available.

For hexing rod you missed the //and a ptr to prHexingRodStatus to the getter loop itself step
Enfeeble is EnfeebleStatDebuff
The contents of the Compatibility folder need to go different places to solve different issues, per comment in the main installer

fix all proc skills that apply statuses

things changed:
- HP Bars
- MSG InstallHelpers
- Freeze decrease funcs
- MSS defs

Compatibility folder contains updated funcs for various things listed above,
This is the updated MSG InstallHelpers bit
	SHORT 0x6B08 0x231F 0x4018 0x4290 0xD101 0x202A 0xE000 0x2000 0x4770 0x46C0


Some require more active intervention than others, you’ll need to rebuild MSS page 1 with the updated defs file for instance
Haste and Slow too give instructions
//define text IDs, and add SlowStatusEffect to (near the end of) pre-battle calc loop
// define text & put 'HastePostBattle' in the post-battle calc loop
Normal status decrementing is taken over by Boon’s function, to which a replacement version is in the Compatibility folder


I made all those changes, and now Hex, Enbleeble and Haste work.
Slow works, but it has a bug, and Regen still have issues.

The problem with Slow is that the AS isn’t calculated at the start of every battle.
Untitled Project
In the first battle the calculation is not correct (0+4), but if you select the unit again the calculation is correct (12+4).
This is more notable with another target, the archer has 4 AS, and when it targets the Myrmidon it shows 4+4.

Regen still gives the Normal status by next turn instead of healing.

Also, is there another thing that I should check?
I think something is calculating the status as 4-4 bits instead of 3-5 in battle, because Haste and Slow act as Poison and Sleep in battle. An unit with Haste blinks purple as if it is poisoned, and an unit with Slow can’t counterattack as if it were asleep.
I changed the IDs to avoid this.

And I also found that you can’t inflict statuses that go over 0x7F, neither with staves nor weapons. I think this is a Status Weapon hack issue.