FF6 Hacking
Kefka final battle and Statue of the Gods 3 tier Question - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Kefka final battle and Statue of the Gods 3 tier Question (/thread-4312.html)



Kefka final battle and Statue of the Gods 3 tier Question - calebbyramen - 07-07-2023

I know in the base game between these final battles if you have a fallen party member it changes them out between phases, my question is, is their a way to mod to where the entire party changes between every tier??

I always felt that would make the final battles a bit more impactful.


RE: Kefka final battle and Statue of the Gods 3 tier Question - Gi Nattak - 07-08-2023

That is an interesting quandary and idea. That final battle code is fairly complicated I think, but I'm sure it's possible... How to go about it though I'm not sure, besides guessing the function that handles it is around C2/2F2F. Hopefully someone with more knowledge may be able to shed some light on it.


RE: Kefka final battle and Statue of the Gods 3 tier Question - Cecil188 - 07-09-2023

I mean, the game checks for specific status ailments there. I suspect it could be as simple as checking for any status including none of them. Dunno if that would be space effective at all. But I imagine it would work in theory.

Oh, I guess the big issue would be that you simply don't have enough people for the boss. So you'd be working in parties of three or something, which would require extra handling.


RE: Kefka final battle and Statue of the Gods 3 tier Question - Everything - 07-09-2023

It looks like the checks start at C2/4A31. If you want to swap out the entire party, you can try replacing bytes at C2/4A31 with 4C 54 4A (JMP $4A54) or 80 21 (BRA $4A54) to skip the checks entirely.

Cecil188 brings up a good point though, if you don't have enough characters the game will probably hang. You would need to add some more code to handle different cases.


RE: Kefka final battle and Statue of the Gods 3 tier Question - C-Dude - 07-09-2023

Yeah, full swapping is always going to crash no matter what because you'd need four full parties in order to avoid an empty last battle, and the ordering function before the fight doesn't allow that even if you force form four parties before you invoke it.

You might be able to set a RAM value to how many characters you have available... with an event before the fight begins, or in the party ordering screen, or even during the special handling of the first phase of the fight (the check for the formation background). You'd then decrement this RAM value by 1 each time you swap out a party member, and refrain from further decrementation or swapping once it reaches a certain threshold (4? 1?). The trick is calculating how many party members you have in the first place... not sure where to start with something like that.


RE: Kefka final battle and Statue of the Gods 3 tier Question - Cecil188 - 07-09-2023

I feel like the easier way would be to just pull an IAF sequence and hard-require a certain number of characters, which would be 12. Though it would prevent early KT dives, for better or for worse. As for a more elegant solution that doesn't restrict player freedom, well, have fun with that.


RE: Kefka final battle and Statue of the Gods 3 tier Question - Gens - 07-10-2023

Now I'm curious. There's a way to simply change it to exclude near fatal chars in addition to wounded one?


RE: Kefka final battle and Statue of the Gods 3 tier Question - Everything - 07-10-2023

Here is the relevant code:

Code:
C2/4A31: BD A0 3A     LDA $3AA0,X
C2/4A34: 4A           LSR
C2/4A35: 90 1D        BCC $4A54       ; $3AA0.0 branch if character is not present
C2/4A37: BD E4 3E     LDA $3EE4,X
C2/4A3A: 89 C2        BIT #$C2
C2/4A3C: D0 16        BNE $4A54       ; branch if character has zombie, poison, or wound status
C2/4A3E: BD 05 32     LDA $3205,X
C2/4A41: 89 04        BIT #$04
C2/4A43: F0 0F        BEQ $4A54       ; branch if character has air anchor effect ($3205.2)
C2/4A45: C2 20        REP #$20
C2/4A47: BD F8 3E     LDA $3EF8,X     ; status 3 & 4
C2/4A4A: 29 FE EE     AND #$EEFE      ; remove dance, rage, and trance status
C2/4A4D: 9D F8 3E     STA $3EF8,X
C2/4A50: E2 20        SEP #$20
C2/4A52: 80 14        BRA $4A68
C2/4A54: A9 FF        LDA #$FF
C2/4A56: 9D D8 3E     STA $3ED8,X     ; clear actor
C2/4A59: BD 18 30     LDA $3018,X
C2/4A5C: 1C 2C 3F     TRB $3F2C       ; clear jump/seize characters
C2/4A5F: 1C 2E 3F     TRB $3F2E       ; clear characters with an esper equipped
C2/4A62: 1C 2F 3F     TRB $3F2F       ; clear characters that have used a desperation attack
C2/4A65: 20 9E 4A     JSR $4A9E       ; clear all statuses

It removes characters with zombie, poison, and dead status, which are all in status byte 1. Near fatal status is in status byte 2, so you would need to modify this code a bit to get it to check that as well. An easy way would be to remove the air anchor check since that's unlikely to be applied to a character. Replace five bytes at C2/4A3F with E5 3E 89 02 D0. I think that should do it.

Again though, if all of your remaining characters are dead or near-fatal this will give you an empty party. If there are no characters left to replace them the game will probably hang.


RE: Kefka final battle and Statue of the Gods 3 tier Question - Gens - 07-11-2023

Thanks. I imagine would be very complicated to exclude petrified/zombie chars, to have just KO and near fatal leave the party during transitions.


RE: Kefka final battle and Statue of the Gods 3 tier Question - Everything - 07-11-2023

I think if you change C2/4A3B from C2 to 80 it would exclude zombie and petrify characters.