[FE8] Confused on double DEF/RES structs [ASM]

Looking with a debugger, I saw that DEF and RES calculations are done on 2 areas
but they are the same in their calculations
and also one of them on each case (both DEF/RES) seems to not affect the game at all.

DEF struct starts at 2AA88 but also exists in 2AAA4.
Modifying the 1st one (2AA88) affects all physical calculations (melee/ranged)
but toying with 2AAA4 (2nd) does nothing to the actual game

Same with RES, calculations are in 2AA5A and 2AA78.
Still haven’t experimented with RES but my guess is one of them won’t do something.

So my question is if there’s a reason or meaning for DEF and RES being calculated twice.

One is to get the final battle defense/resistance depending ln the defender’s weapon, the other is simply to get the battle defense without a defender. The former is used for usual battle calculations, while the second one appears to be related to item effect stuff( https://github.com/FireEmblemUniverse/fireemblem8u/blob/master/src/bmbattle.c#L2164 ).

1 Like

What do you mean item effects?

Ring buffs/ Magic Barrier?
or
Raw stat boosts from equipped weapons?

Bump. Can someone be more specific with the “item related” stuff?

I tried DEF Ring and Passive Stats Boosts
but none of these affect which calculation is used.
For DEF it’s always the 0x2AA88 being used.

Thread locked upon OP’s request.