FF6 Hacking
Patch: Decoupled Color-Coded MP Digits - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Hacks, Resources and Tutorials (https://www.ff6hacking.com/forums/forum-1.html)
+--- Forum: Jidoor Auction House (https://www.ff6hacking.com/forums/forum-4.html)
+---- Forum: Patches, Bugfixes, Tweaks (https://www.ff6hacking.com/forums/forum-15.html)
+---- Thread: Patch: Decoupled Color-Coded MP Digits (/thread-3996.html)

Pages: 1 2


Patch: Decoupled Color-Coded MP Digits - SilentEnigma - 04-26-2020

author: SilentEnigma (updates), Imzogelmo (original implementation)
Download
(Version 1.3 released 2021-04-19)

This is a reworking of Imzogelmo's "Color-Coded MP Digits" patch, which recolors the MP damage and healing numerals displayed during battle. Imzogelmo's original patch has the unfortunate side effect of changing the palette used by the reflected spells animation; this new implementation keeps the reflected spells animation intact.

It also fixes the "Crusader redecorates Reflect barriers" / "Red Reflect" bug. (And Gi Nattak has informed me the patch is incompatible with Lenophis' Bad Decoration fix.)

Pink is used for MP damage, and blue is used for MP healing.
Since the new colors are no longer coupled to the reflected spells graphic, a different blue color is used for the MP healing numerals.

[Image: MPDigits-Decoupled.png]

This patch uses Imzogelmo's original "Color-Coded MP Digits" patch as a base. Some of Imgozelmo's code has been moved in order to make the new patch more compatible with C. V. Reynolds' Bug-Fix Compilation (version 1.16) [edit: note: Bad Decoration must still be excluded for this patch to work.]

Two methods are available for applying the mod:
  • the default full version patch for fresh ROMs
  • an upgrade patch for ROMs which already have Imzogelmo's version applied

Cheers!

[attachment=554]


RE: Patch: Decoupled Color-Coded MP Digits - seibaby - 04-28-2020

Very nice! This has been on my to do-/wishlist for a long time. Thanks for taking care of it!


RE: Patch: Decoupled Color-Coded MP Digits - Imzogelmo - 05-23-2020

That's cool. I don't think it ever occurred to me to be able to decouple the two palettes.  Ironic since we already knew about the red reflect bug (although it would be a couple more years till Lenophis figured out the fix for that one). We really didn't have very good tracing tools back then.


RE: Patch: Decoupled Color-Coded MP Digits - Warrax - 05-25-2020

I had this occurrence where the color of the MP healing would change from blue to green fluorescent in realtime if an Auto-Shell was queued right after that MP heal. This requires some timing so I wasn't able to do it again to take a screenshot but it's definitely a new thing since I used the original patch for a while and never got that issue once.


RE: Patch: Decoupled Color-Coded MP Digits - SilentEnigma - 05-25-2020

(05-23-2020, 08:47 AM)Imzogelmo Wrote: That's cool. I don't think it ever occurred to me to be able to decouple the two palettes.  Ironic since we already knew about the red reflect bug (although it would be a couple more years till Lenophis figured out the fix for that one). We really didn't have very good tracing tools back then.

Hello Imzogelmo!
Thanks for your response here.
It is beyond impressive what you and the other core hackers managed to pull off back in the day. And of course, most of my work would be nowhere without your disassembled code banks on hand.

Looks like I just need to iron out any remaining kinks here...

(05-25-2020, 12:25 AM)Warrax Wrote: I had this occurrence where the color of the MP healing would change from blue to green fluorescent in realtime if an Auto-Shell was queued right after that MP heal. This requires some timing so I wasn't able to do it again to take a screenshot but it's definitely a new thing since I used the original patch for a while and never got that issue once.
I'll do my best to reproduce this.
By "queued," do you mean just before the pulsing green "shell status" glow would reappear on a character?


RE: Patch: Decoupled Color-Coded MP Digits - Warrax - 05-25-2020

(05-25-2020, 12:29 PM)SilentEnigma Wrote: I'll do my best to reproduce this.
By "queued," do you mean just before the pulsing green "shell status" glow would reappear on a character?

No it's just before the spell Shell is being casted on a character (the big green circle that appear when you cast Shell on someone).


RE: Patch: Decoupled Color-Coded MP Digits - SilentEnigma - 05-27-2020

(05-25-2020, 06:44 PM)Warrax Wrote: No it's just before the spell Shell is being casted on a character (the big green circle that appear when you cast Shell on someone).

Thanks Warrax, I have it reproduced -- Equip barrier rings, poison the party, and spam ethers until someone's HP goes below the shell activation threshold.

I'll see what I can do. Hopefully it can be fixed by delaying the palette change by a split second, or by hijacking a different pair of colors.


RE: Patch: Decoupled Color-Coded MP Digits - Warrax - 05-27-2020

Pretty much how it happened to me but with Seizure instead if Poison. I'm glad you were able to reproduce the issue quickly.

Also I was able to adapt your patch to work with FF3us 1.1 so please let me know what Hex you changed when you gonna fix the palette bug so I can quick fix it and release it to those interested.


RE: Patch: Decoupled Color-Coded MP Digits - Gi Nattak - 05-27-2020

I was able to reproduce it as well; man, that is some super tight timing indeed. I'm surprised Warrax had it happen during regular gameplay!
It's something I could live with if there turns out to be no easy fix. Longest I've seen it last is almost a full second, usually less, but with certain timing it can stick for about a full second, if a pause were to be implemented.


RE: Patch: Decoupled Color-Coded MP Digits - SilentEnigma - 06-02-2020

The patch has been updated to v1.1 in the OP to fix the color glitch on Auto-Shell/Auto-Protect activation.
I found a more appropriate spot later in the code to inject the switch back to the default Reflect animation palette.

(05-27-2020, 10:09 AM)Warrax Wrote: let me know what Hex you changed

Three chunks of code have been changed from v1.0:

Code:
Decoupled v1.0:
C1/ABEE: 22 03 FB C2  JSL $C2FB03    ; Jump to new subroutine C2/FB03

Decoupled v1.1 / Original:
C1/ABEE: B1 76        LDA ($76),Y    ; Executes before spell/summon animation
C1/ABF0: C9 F9        CMP #$F9
Code:
Original/Decoupled v1.0:
C1/AC23: 7B           TDC
C1/AC24: A8           TAY
C1/AC25: 84 1E        STY $1E
C1/AC27: C8           INY
C1/AC28: C8           INY
C1/AC29: B1 76        LDA ($76),Y
C1/AC2B: 20 B3 9C     JSR $9CB3      ; Load gfx data for spell Battle Dynamics
C1/AC2E: 20 5B AC     JSR $AC5B      ; Shows the spell animation
C1/AC31: 20 35 AC     JSR $AC35
C1/AC34: 60           RTS

Decoupled v1.1:
C1/AC23: 22 03 FB C2  JSL $C2FB03    ; Jump to new subroutine C2/FB03
C1/AC27: 20 5B AC     JSR $AC5B
C1/AC2A: 20 35 AC     JSR $AC35
C1/AC2D: 60           RTS
C1/AC2E: 20 B3 9C     JSR $9CB3      ; Long access to subroutine C1/9CB3
C1/AC31: 6B           RTL
C1/AC32: FF
C1/AC33: FF
C1/AC34: FF
Code:
Decoupled v1.0 (free space):
C2/FB03: E0 19 00     CPX #$0019     ; Is it a summon?
C2/FB06: F0 14        BEQ $FB1C      ; if so, branch
C2/FB08: DA           PHX
C2/FB09: 7B           TDC            ; set accumulator to 0
C2/FB0A: AA           TAX            ; set X to 0
C2/FB0B: BF A1 C6 C2  LDA $C2C6A1,X  ; Default reflect barrier palette
C2/FB0F: 9D F8 7F     STA $7FF8,X    ; write over reflect barrier palette
C2/FB12: 9D F8 7D     STA $7DF8,X    ; write over reflect barrier palette
C2/FB15: E8           INX
C2/FB16: E0 08 00     CPX #$0008
C2/FB19: D0 F0        BNE $FB0B
C2/FB1B: FA           PLX
C2/FB1C: B1 76        LDA ($76),Y    ; Originally at C1/ABEE
C2/FB1E: C9 F9        CMP #$F9       ; Originally at C1/ABF0
C2/FB20: 6B           RTL
C2/FB21: FF
C2/FB22: FF
C2/FB23: FF

Decoupled v1.1:
C2/FB03: 7B           TDC            ; originally at C1/AC23
C2/FB04: A8           TAY            ; originally at C1/AC24
C2/FB05: 84 1E        STY $1E        ; originally at C1/AC25
C2/FB07: C8           INY            ; originally at C1/AC27
C2/FB08: C8           INY            ; originally at C1/AC28
C2/FB09: B1 76        LDA ($76),Y    ; originally at C1/AC29
C2/FB0B: 22 2E AC C1  JSL $C1AC2E    ; long access to subroutine C1/9CB3
C2/FB0F: DA           PHX
C2/FB10: 7B           TDC            ; set accumulator to 0
C2/FB11: AA           TAX            ; set X to 0
C2/FB12: BF A1 C6 C2  LDA $C2C6A1,X  ; Default reflect barrier palette
C2/FB16: 9D F8 7F     STA $7FF8,X    ; write over reflect barrier palette
C2/FB19: 9D F8 7D     STA $7DF8,X    ; write over reflect barrier palette
C2/FB1C: E8           INX
C2/FB1D: E0 08 00     CPX #$0008
C2/FB20: D0 F0        BNE $FB12
C2/FB22: FA           PLX
C2/FB23: 6B           RTL