Users browsing this thread: 1 Guest(s)
Final Requests for Help

#21
Posts: 461
Threads: 46
Thanks Received: 201
Thanks Given: 118
Joined: Feb 2017
Reputation: 23
Status
None
Works perfectly. I changed the D0 in question to a "D0 06", and then placed the "4C DA 02" at the end. It's a nice, quick, 15-byte fix for an issue I'm surprised wasn't discovered before.


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  

#22
Posts: 296
Threads: 22
Thanks Received: 119
Thanks Given: 118
Joined: Dec 2018
Reputation: 18
Status
Moog
You said during CasualTom's stream that you hadn't worked out how to make Imp look different for Kappa. I say use an approach similar to the one that was used for the equipment: check for Kappa and fork if the result succeeds.

The graphic replacement code for Imp and Morph is in the C1 bank.
Code:
C1/2FB5:    BDBD2E      LDA $2EBD,X        (which status to display)
C1/2FB8:    2920        AND #$20        (is it imp?)
C1/2FBA:    F015        BEQ $2FD1        (branch if not)
***C1/2FBC:    B96C7B      LDA $7B6C,Y        (load character sprite ID ?)
***C1/2FBF:    C90F        CMP #$0F        (check if it's already imp ?)
***C1/2FC1:    F023        BEQ $2FE6        (branch if it'S the case)
***C1/2FC3:    A90F        LDA #$0F        (load imp sprite number)
***C1/2FC5:    996C7B      STA $7B6C,Y        (store as character sprite ID)
C1/2FC8:    205731      JSR $3157
C1/2FCB:    7B          TDC
C1/2FCC:    99707B      STA $7B70,Y
C1/2FCF:    8015        BRA $2FE6
C1/2FD1:    B96C7B      LDA $7B6C,Y        (load character sprite ID ?)
C1/2FD4:    DDAE2E      CMP $2EAE,X        (compare to battle sprite ID)
C1/2FD7:    F00D        BEQ $2FE6        (branch if both the same)
C1/2FD9:    BDAE2E      LDA $2EAE,X        (load battle sprite ID)
C1/2FDC:    996C7B      STA $7B6C,Y        (store as character sprite ID)
C1/2FDF:    205731      JSR $3157
C1/2FE2:    7B          TDC
The starred lines are where you'll want to look. A subroutine that checks $2EC6,X against $0E and branches if successful (loading #$12 instead of #$0F, with otherwise identical code) should do the trick. Thankfully in this situation we shouldn't have to fight to get a specific X back into place, since 2EC6 is in the same Battle RAM block as $2EBD.
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • PowerPanda (04-08-2021)

#23
Posts: 461
Threads: 46
Thanks Received: 201
Thanks Given: 118
Joined: Feb 2017
Reputation: 23
Status
None
Thanks, CDude! I have it working. The code is a frankenstein's monster, and is almost guaranteed to conflict with another hack, so I'm not posting it here. Let's just say I'm taking space I freed up with other C1 changes and doing a whole lot of subroutines. But it's working! Kappa now turns into a merchant when she is imped.


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  

#24
Posts: 461
Threads: 46
Thanks Received: 201
Thanks Given: 118
Joined: Feb 2017
Reputation: 23
Status
None
On my personal list has been fixing battle animations. I've fixed up the animations for Safe 2, Shell 2, the Super Ball (as a thrown weapon the character would take 2 steps forward and 2 steps back), and changed the animations for Rasp 2 and Kappa's Morph to be more appropriate for the ability. My last animation is one that I've been stuck on for 3 days, with no measurable progress. So, I figured I'd throw it here in case anyone knows.

I have replaced the Esper Raiden with Leviathan. The graphics replacement was easy, but there's something tied to the sprite itself that is:
1. Causing the esper sprite to display underneath the enemies
2. Displaying the "slice through" graphic on the enemies, rather than displaying damage. This happens even when I change the spell to a damaging spell. It DAMAGES the enemies, but instead of displaying the damage numbers, it slices them in half.

I've gotten far enough to know that it is tied to Byte 10 of the animation, and that Raiden's Byte 10 value (6B) is reading from this code:
Code:
Raiden: 6B - C2/EBFE
C2/EBFE: 20 2D F0     JSR $F02D
C2/EC01: A2 8C        LDX #$8C
C2/EC03: 01 DA        ORA ($DA,X)
C2/EC05: 22 00 24 C1  JSR $C12400
C2/EC09: 20 70 FA     JSR $FA70
C2/EC0C: 22 C6 9E C1  JSR $C19EC6
C2/EC10: FA           PLX
C2/EC11: 22 80 24 C1  JSR $C12480
C2/EC15: 20 87 FA     JSR $FA87
C2/EC18: EE B0 62     INC $62B0
C2/EC1B: 60           RTS

I tried replacing that code with Terrato's (C2/F25D), since that graphic is almost the exact same size, replacing the LDX #$84 with Raiden's LDX #$8C, but that just crashes. I know from nop-ing out one function of the code at a time, that the code for slicing through the enemies is either the LDX #$8C or the ORA ($DA,X), and I suspect it's ORA ($DA,X) since Odin's code is just LDX #$8B/ORA ($DA,X). Most Espers have an ORA ($22,X) at that spot. However, but any edits to either of those 2 ops just causes crashing. Any ideas?

I also started down an alternate path, thinking that I could put Leviathan in Ragnarok's spot, and have Ragnarok replace Raiden, since an instant death animation fits with Metamorph. I have been able to edit Ragnarok to be a damaging spell, so i know that works. However, Ragnarok is the one esper that you can't edit through Final Fantasy 3 Sprite Editor, so I can't just do a graphic replacement and call it good. I found that the slot for Ragnarok's graphics data (D2/77D0), is just a bunch of zeroes, and that there's some other function that's putting the graphics in.

So yeah, if anyone can help me figure how to do 1 of the 2 following, I'd be immensely grateful:
1. Make Raiden's Byte 10 deal damage
2. Swap the sprites for Ragnarok and Raiden


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  

#25
Posts: 148
Threads: 2
Thanks Received: 148
Thanks Given: 21
Joined: Apr 2015
Reputation: 18
Status
None
One quick note, the index registers (X and Y) are 16-bit at the beginning of these subroutines, so the disassembly should be:

Code:
C2/EBFE: 20 2D F0     JSR $F02D       ; init_mode7
C2/EC01: A2 8C 01     LDX #$018C      ; id for raiden (ragnarok is #$0190)
C2/EC04: DA           PHX
C2/EC05: 22 00 24 C1  JSL $C12400.    ; summon_mode7_chr_set_long
C2/EC09: 20 70 FA     JSR $FA70.      ; summon_color_set_bg1
C2/EC0C: 22 C6 9E C1  JSL $C19EC6.    ; Clear Animation Tile Data Buffer
C2/EC10: FA           PLX
C2/EC11: 22 80 24 C1  JSL $C12480     ; summon_obj_chr_set_long
C2/EC15: 20 87 FA     JSR $FA87.      ; summon_color_set
C2/EC18: EE B0 62     INC $62B0
C2/EC1B: 60           RTS

I could be wrong, but I don't think byte 10 determines whether to use damage numerals or the slice through animation.
  Find
Quote  

#26
Posts: 461
Threads: 46
Thanks Received: 201
Thanks Given: 118
Joined: Feb 2017
Reputation: 23
Status
None
(04-11-2021, 03:05 PM)Everything Wrote: I could be wrong, but I don't think byte 10 determines whether to use damage numerals or the slice through animation.

Yeah, with a proper disassembly, it looks like you may be right. It's definitely in the LDX #$018C. I wonder where that is reading from? I thought that it might be in these 5-byte blocks:

Code:
D2/7780
6E 58 02 5B 72 Ramuh
06 59 82 5D 22 Ifrit
E3 37 01 D3 58 Shiva
96 5A 02 5F 73 Siren
EA 5A 82 61 23 Terrato

D2/7799
E2 5B 02 63 74 Shoat
4A 5C 02 65 75 Maduin
D6 DC 82 67 24 Bismark
51 5D 02 68 76 Stray
91 5D 82 6A 25 Palidor

D2/77B2
71 5E 82 6C 26 Tritoch
A5 5F 82 6E 27 Odin
A1 60 82 70 28 Raiden
A1 61 82 72 29 Bahamut
49 63 82 74 2A Alexander

D2/77CB
89 65 82 76 2B Crusader
00 00 00 00 00 Ragnarok
11 66 02 78 77 Kirin
D5 66 02 7A 78 Zoneseek
4D 67 02 7C 79 Carbuncle

D2/77E4
9D E7 02 7E 7A Phantom
EB 67 02 7F 7B Sraphim
73 68 02 81 7C Golem
F7 68 02 83 7D Unicorn
9F 69 82 85 2C Fenrir

D2/77FD
27 6A 82 87 2D Starlet
F7 6A 82 89 2E Phoenix
EB 6B 02 8B 7E ??
0B 6C 82 8D 2F ??
0B 6C 82 8F 2F ??

1F EE 00 5A 7F ??
00 00 00 00 00 ??

Those appear to be just graphics though. When I straight-up replace Raiden with Tritoch's 5-byte block, I get a corrupted version of Tritoch's sprite, and it still slices through the enemies.


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  

#27
Posts: 148
Threads: 2
Thanks Received: 148
Thanks Given: 21
Joined: Apr 2015
Reputation: 18
Status
None
Yes, what you posted is the data referenced by the value #$018C or whatever. That determines which esper graphics and palette get loaded, but there is another step to generate the correct animation frames (i.e. how the graphics tiles get arranged on-screen). I believe you already know about the 14-byte animation data at D0/7FB2, but you also need to update the 6-byte attack graphics data at D4/D000. The format is on the wiki: https://www.ff6hacking.com/wiki/doku.php...phics_data. The index is the same as it is for the animation scripts, so the index for Tritoch is $01F2 for the sprite layer and for Raiden it's $0120. If you replace that block the graphics should no longer be corrupted.
  Find
Quote  

#28
Posts: 51
Threads: 5
Thanks Received: 33
Thanks Given: 0
Joined: Jun 2010
Reputation: 6
Status
None
Code:
C1/B0DF:    AD7D62      LDA $627D       (Animation's Byte 10 in FF3usME)
C1/B0E2:    300F        BMI $B0F3       (Branch if top bit set)
C1/B0E4:    C96B        CMP #$6B        (0x6B=Raiden)
C1/B0E6:    F008        BEQ $B0F0       (Branch if Raiden)
C1/B0E8:    C945        CMP #$45        (0x45=Odin)
C1/B0EA:    F004        BEQ $B0F0       (Branch if Odin)
C1/B0EC:    C90B        CMP #$0B        (0x0B=Cleave)
C1/B0EE:    D003        BNE $B0F3       (Branch if not Cleave)
C1/B0F0:    205AAF      JSR $AF5A       (Dices up an enemy)
C1/B0F3:    A917        LDA #$17
C1/B0F5:    8D8D89      STA $898D       (Does something)
C1/B0F8:    60          RTS
Quote  
[-] The following 2 users say Thank You to Drakkhen for this post:
  • PowerPanda (04-11-2021), Warrax (04-12-2021)

#29
Posts: 461
Threads: 46
Thanks Received: 201
Thanks Given: 118
Joined: Feb 2017
Reputation: 23
Status
None
Thank you so much, Drakkhen! I now have Raiden displaying damage, rather than doing the Cleave animation. The sprite is still showing behind the enemies, which is something I'll try to figure out tomororw. For today, I'm happy with this level of progress!


Projects:
Divergent Paths: The 3 Scenarios (Completed) - a redo of the 3 scenarios in the original game that gives equal time to each group. Meant to be a basis for future mods.
FFVI: Divergent Paths (In Progress) - a hack built off of the 3 scenarios that changes other events in the same, such as making Leo permanently recruitable, bringing Banon's story closure, and adding 1 more secret character.
  Find
Quote  

#30
Posts: 192
Threads: 3
Thanks Received: 23
Thanks Given: 134
Joined: May 2013
Reputation: 0
Status
None
(04-11-2021, 06:23 PM)Drakkhen Wrote:
Code:
C1/B0DF:    AD7D62      LDA $627D       (Animation's Byte 10 in FF3usME)
C1/B0E2:    300F        BMI $B0F3       (Branch if top bit set)
C1/B0E4:    C96B        CMP #$6B        (0x6B=Raiden)
C1/B0E6:    F008        BEQ $B0F0       (Branch if Raiden)
C1/B0E8:    C945        CMP #$45        (0x45=Odin)
C1/B0EA:    F004        BEQ $B0F0       (Branch if Odin)
C1/B0EC:    C90B        CMP #$0B        (0x0B=Cleave)
C1/B0EE:    D003        BNE $B0F3       (Branch if not Cleave)
C1/B0F0:    205AAF      JSR $AF5A       (Dices up an enemy)
C1/B0F3:    A917        LDA #$17
C1/B0F5:    8D8D89      STA $898D       (Does something)
C1/B0F8:    60          RTS

I've been looking to make Raiden do damage without Cleave for a while, glad to see a new part of C1 documented (unless my docs are outdated?), thanks!



  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite