FF6 Hacking
Let's Talk Zombie (Status) - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Zozo Pub (https://www.ff6hacking.com/forums/forum-6.html)
+--- Thread: Let's Talk Zombie (Status) (/thread-3887.html)



Let's Talk Zombie (Status) - C-Dude - 09-29-2019

I've been looking at the Zombie status with scorn, lately, thinking about doing something drastic with it (changing it to work identically to the Relic Ring, IE: the status sets the Undead flag).  Before I dive into that, though, I thought it'd be nice to gather some opinions on the status in general.


Zombie first appears in Final Fantasy 5, where it works essentially the same way as it does in Final Fantasy 6: it sets HP to 0, muddles the target, and counts them as defeated for the purposes of ending a battle.

Zombie in Final Fantasy 8 and later, however, uses the Undead model in its entirety: it inverts healing magic, grants immunity to death magic, and makes life spells instant-death.


Both iterations have interesting applications.  With the modern version, it could be inflicted on enemies to make them vulnerable to curing attacks (unlike now, where it kills them and makes their invisible body randomly attack the party).  However, FF6 Zombie in particular has a neat mechanic... it can be cast by a monster on a dead party member to raise them as a muddled pain.  This tactic is only seen deployed by Hidon in the vanilla game, but it has potential.

So which do you prefer?


RE: Let's Talk Zombie (Status) - PowerPanda - 09-30-2019

I definitely prefer "Zombie" status inverting healing and death. I also like where it causes Poison to heal you and Regen to harm you. As I was creating the new spells for my hack, I actually cut the "Zombie" spell because of how the status worked.


RE: Let's Talk Zombie (Status) - C-Dude - 10-02-2019

For anyone curious, I did get inverted heal zombie (kinda) working for the player characters.  Disregarding all of the little status check bits scattered throughout the C2, it basically involves ORing the Relic Ring bit on when Zombie is applied, and ANDing it off when Zombie is removed (strangely, XOR does NOT work in this situation).

EDIT: Old post slashed!  Everything must go!


Scratch that amateur hour stuff, I got it working!  Well, mostly.  There are LOTS of checks that have to be changed to do something like this; if you miss one things will badly break.  I also couldn't change how Overcast works because another patch changed the area of that code [and I couldn't figure out what it was doing... I think it might have been in the CV Compilation].
Code:
========================================
Undead Zombie (HP Inversion HexTweak)
========================================
Changes the Zombie status ailment to invert healing (sets the Undead flag) and makes it usable on monsters.
Note this does NOT address the Overcast bit.  The Overcast special should be changed or removed from all attacks... otherwise
it will soft-lock the game.

Zombie players will suffer inverted healing effects.  They also do not cycle their outlines, meaning you can't tell which statuses they already have (and will have to guess).
If a Zombie player is forced to retarget a dead target, they'll target an ally instead [unintentional but neat].


[C2 Bank]
C2/06B5: 89 80        BIT #$80       (Check for Dead or Zombie Status)
...
C2/06C2: 89 C0        BIT #$C0       (Check for Dead, Zombie, or Petrify status)
...
C2/06EA: 80 05        BIT #$02
EA EA


(Let Relm control Zombies)
C2/07AD: F4 C0 B0     PEA $B0C0      (Sleep, Muddled, Berserk, Death, Petrify) [Was $B0C2, changed to remove Zombie]

(Umm... updating stuff.  Not sure what this does)
C2/0956: F4 C0 B0     PEA $B0C0      (Sleep, Muddled, Berserk, Death, Petrify) [Was $B0C2, changed to remove Zombie]


(I'm honestly not sure why this works, but it does.  Skips the zombie check in the "Called Every Frame" block)
C2/1163: BD 18 30    LDA $3018,X
D0 07                BNE    #$09    (Skip the rest of this check)
4C 79 11            JMP $1179    (Go to Advance time gauge if monster)
EA EA EA EA            NOP

(Candidate Bodyguard)
C2/12D6: 89 D0 A0     BIT #$A0D0     (Death, Petrify, Clear, Sleep, Muddled) [Was A0D2]

[Let zombies die at 0 HP]
(If character/monster takes lethal damage)
...
C2/139C: 80 03            BRA #$03  (Just remove and skip the zombie check)
EA EA EA                NOP


(Item use) [Let Zombies use items?]
...
C2/18CA: 89 C0        BIT #$C0       (Check if Dead, Petrify or Zombie attack)  [Change to #$C0 to exclude Zombie]


(Run away mechanic)
C2/211C: 80 02        BRA #$02       (Skip Check)        [Was 89 02, BIT #$02 to check for Zombie Status]


(Don't whiff attacks on monster zombies)
C2/22B8: 89 18        BIT #$18       (Check target for Clear, M-Tek)  [Was 89 1A]


(Targetting?)
C2/272D: 89 C0        BIT #$C0


(Learn lore if casted) [Need to remove Zombie from exclusions]
...
C2/36E6: F4 C1 B0     PEA $B0C1      (Death, Petrify, Dark, Sleep, Muddled, Berserk) [Changed from B0C3 to exclude Zombie]

(Special effect $53 - Control) [Let Relm control Zombies]
C2/3ACE: F4 D0 B0     PEA $B0D0      (Death, Petrify, Clear, Sleep, Muddled, Berserk)
                                    [Changed from B0D2 to exclude Zombie bit]


(Bababreath from 42E1) [Need to not prioritize Zombies, in case only valid fighter is a zombie]
...
C2/406E: 89 C0        BIT #$C0       (Check for Dead, Zombie, or Petrify) [Need to change to C0 so Zombies can be blown away]


(Spell marks Death status on Death or Zombie?) [Why both?]
C2/4435: 89 80        BIT #$80  [Was 89 82]



(Clear some statuses if target has Zombie.) [Only clear Near-Fatal]
    ...
[Vanilla] C2/458C: 29 FF FD     AND #$FDFF     (Clear Near Fatal) [Untested]
[CV Bugfixes] C2/FC35: 09 FF FD        ORA #$FDFF        (Clear Near Fatal)



(ZOMBIE - SET)
C2/45A3:
B9 95 3C     LDA $3C95,Y    (Player enters here)
09 80 00     ORA #$0080      (Turn on undead)
99 95 3C     STA $3C95,Y
60            RTS
EA EA EA EA        NOP




    (Pointer: Zombie - Set)
        C2/46B2: A3 45 (Zombie - Set)  $45A3 [Unchanged]
    (Pointer: Zombie - Clear)
        C2/46F2: DA 64 (Zombie - Clear) $64DA
    
    (Zombie - Clear) [Moved to Freespace, 10 bytes]
    C2/64DA:
    B9 95 3C        LDA $3C95,Y        [Load Special byte 3]
    29 7F FF        AND #$FF7F        [Turn off the top bit]
    99 95 3C        STA $3C95,Y        [Save it.  This turns off Undead status]
    60                RTS


(Shadow Leaves)  [Needs to be possible while Zombied?]
...
[CV Bugfixes] C2/487A: 89 C0        BIT #$C0       (Check for Dead or Petrify)  [Changed from #$C2 to exclude Zombie]
[Vanilla] C2/487C: 89 C0            BIT #$C0       (Check for Dead or Petrify)  [Changed from #$C2 to exclude Zombie]


(Ghost leaves party) [Changed to exclude Zombie]
...
C2/4948: 89 C0        BIT #$C0            [Changed from #$C2 to exclude Zombie]


(For final battle tier transitions, do some end-battle code, and clean out
 Wounded/Petrified/Zombied and Air Anchored characters)
[Exclude Zombie from the removal]
C2/4A3A: 89 C0        BIT #$C0       (Check for Dead or Petrify)  [Changed from #$C2 to exclude Zombie]



(Update lists and counts of present and/or living characters and monsters)
[Needs to not count Zombie as dead]
...
C2/4AEE: 89 C0        BIT #$C0       (Petrify or death status?)  [Changed from #$C2 to exclude Zombie]
...
C2/4B27: 89 C0        BIT #$C0       (Petrify or death status?)  [Changed from #$C2 to exclude Zombie]



(Black Belt counter) [Allow Zombies to retort]
...
C2/4D0B: F4 C8 A0     PEA $A0C8      (Death, Petrify, M-Tek, Sleep, Muddled)  [Changed from A0CA to exclude Zombie]



(Clears targets if attacker is Zombied or Muddled)
...
C2/4D80: 89 00 20     BIT #$2002    [Switch to #$2000 to exclude Zombie]


(Removes dead (including Zombie/Petrify for monsters), hidden, and absent targets)
C2/5A60: A9 C0 00     LDA #$00C0    [Changed from A9 C2 00 to exclude Zombie]


(Enemy death?)
C2/5CC0: 89 C0        BIT #$C0        [Was #$C2]


(End of victorious combat GP and Experience)
...
C2/5DB3: 89 C0 00     BIT #$00C0     (Petrify or death?) [Was 89 C2 00, BIT #$00C2.  Changed to exclude Zombie]
...
C2/5F1A: 89 C0        BIT #$C0       (Petrify or Wound?) [Was 89 C2]




[C3 Bank]
(Fork: Check if dead) [For inventory purposes]
...
C3/1EAB: 29 C0        AND #$C       [Was #$C2, changed to exclude Zombie]



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bonus
(Making Zombie look good, and keeping Poison from overriding it)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[C1 Bank]
+ C1/2E4C:    20 0D 2F      JSR $2F0D ====>   80 03        BRA #$03
                               + C1/2E4F: EA        NOP
...
+ C1/2E57:    A9 01        LDA #$01  ====>   A9 00        LDA #$00
...
+ C1/2E66:    20 0D 2F      JSR $2F0D ====>   80 01        BRA #$01
                               + C1/2E69: EA        NOP
(Removes color change from Poison and Berserk, and makes Zombie use Poison's color change)
+ C1/308D:    A9 0A        LDA #$0A  ====>   A9 0D        LDA #$0D
(Makes Sleep use the MapDead pose)
+ C1/3095:    A9 25        LDA #$25  ====>   A9 26        LDA #$26
(Makes Confuse interrupt its spinning with laughs)
Anyway, feel free to play around with this!  Just make sure you turn off ANDor repurpose the Overcast special if you do.