[FE7] Graphical Issue Fix - Battle Preview Screen Stat Syncing

Normally, the numbers used on the battle preview screen (esp. simplified’s might) are reread and recalculated(in the case of mt) from the data. This is troublesome if you modify some aspect of it in the pre or post- rng rolls routines of Modular battle, or even do some other mod to the might formula. As such, I have fixed it to write the final numbers to a table and read the numbers off of that. It was not an easy fix.

This will be installed by default in Modular Battle, but if you want it separately, I’ll post a patch here when I’m done building it, and also in my ASM Dump.

Original post:

So I know from my documentation that the game stores the damage to be dealt in combat at 0203A3DC, HOWEVER, this is not the byte they use to display the “Mt” on the battle preview “simplified” view.

Can anyone isolate the routine that is used to determine what number to use for Mt on the battle preview screen? Possibly write it to read off of the damage offset?

I’m pretty awful at graphics, so I don’t even know how to start…

Edit: I really want/need this fixed. If someone wants to hack this for me, I’ll in turn do some ASMz for you.

If this helps, here’s some things from Nintenlord’s notes that I dug out.

(4:42:06 PM) Crazycolorz5: 203E0CA is displayed damage
(4:42:13 PM) Crazycolorz5: But only IN BATTLE, not on the battle preview

      : 1D95B0 Palettes
04C3F0: 1D9020 Hit, Crit & WT Arrows (upper)
04C3F8: 1D90C0 Dmg & WT Arrows (lower)
      : 1D9330 Palettes
      : 1D9170-1D932F Hit crit % dmg numbers
      : 1D93B0-1D95B0 Hp bar
      : 1D97F0 Exp bar box

(4:45:38 PM) Crazycolorz5: Hmmmmmm
(4:45:44 PM) Crazycolorz5: The numbers are there but I mean
(4:45:49 PM) Crazycolorz5: I don’t know what chooses which one

@Icecube provided me with its offsets and I should have a patch in a few moments.

Edit: This will take longer than expected, but I should still be able to do this.

How I’m doing this:
The in-battle numbers (like Hit 100 Might whatever) store the digits they display at 2017700. Since this is just used for the in-battle digits and not the pre-battle menu, I’m jacking this space. Like so:

@0x00 4 Blank 
@0x04 2 Hit
@0x06 2 Attack
@0x08 2 Defense
@0x0A 2 Final Might
@0x0C 4 blank
@0x10 2 Crit
@Then the attacker as the same
@0x12 4 Blank 
@0x16 2 Hit
@0x18 2 Attack
@0x1A 2 Defense
@0x1C 2 Final Might
@0x1E 4 blank
@0x22 2 Crit

Then I’ll just read from this location for the pre-battle, and I’ll find where it loads the digits for the in-battle and have it read off of this chart before overwriting it.

I estimate this will take me 2-3 days.

I finished the “simnplified” display change. Things I had to change:
The rounds system, to store the data I need after the first and second rounds, or just the first if the opponent can’t counterattack

The effects engine – normally it’d make damage equal to the opponent’s health for nosferatu effects. However, since I read off the damage, I had to change this. I moved the floor-check thing to just inside the nosferatu branch, and didn’t alter the final damage at all.

The simplified display – to load from my display buffer location, not to recalculate everything/from the unit data.

Next: Working on the “detailed” display,
Then: The in-battle display.

Just gonna leave this documentation here in case anyone wants to mess with changing numers in the middle of battle or something.

(11:28:05 AM) Crazycolorz5: 203E0C4 - numbers to display in battle, in hex.
(11:28:54 AM) Crazycolorz5: Enemy HP, Ally HP, Enemy Hit, Ally Hit, Enemt Dmg, Ally, Dmg, Enemy Crit, Ally Crit, all as halfwords.

The actual decimal digits to use are at 0201700

Battle Preview is now synced with the actual battle statistics and not side-calculated. I’ll have a patch and source codes for it in my asm dump after I get done MAKING a patch for it.

1 Like