Users browsing this thread: 3 Guest(s)
Some final code requests (and screenshots)

#48
Posts: 617
Threads: 49
Thanks Received: 0
Thanks Given: 5
Joined: Feb 2017
Reputation: 25
Status
None
Lightning, I've taken a break from my Genji Glove restriction hack and my main Definitive Edition hack to look into the Throw animation anomaly. Here's what I found.

As previously discovered, Water Edge has 2 different animation sets, one for being used as a rage, and one for being used as a Throw command. I'll bold the part that is different:
RAGE:    81F5  |  0289  |  FFFF  |  81F5
THROW: 81F5  |  01F6  |  FFFF  |  81F5

When looking at Everything's disassembly, he left 01F6 as unmarked. Here are the two back-to-back though. The differences are marked with an asterix:

Code:
; [ Animation Script $01F6: Water Edge (bg1) Throw Version ]

D0/237B: 00 A0                    speed 1, align to center of screen
D0/237D: D1 01                    invalidate character/monster sprite priority
D0/237F: DB 03                    branch to $2384 if character already stepped forward to attack
D0/2381: BF 67 70                 jump to subroutine $7067
D0/2384: C4 80                    move bg1 thread to this thread's position
D0/2386: C9 00                    play default sound effect
D0/2388: 89 07                    loop start (7 times)
D0/238A: 83 9F                    move back 32
D0/238C: 8A                       loop end
D0/238D: 89 60                    loop start (96 times)
D0/238F: E9 0B 03                 move animation randomly (0..11,0..3)
D0/2392: 83 63                    move forward 4
D0/2394: 00                       [$00]
D0/2395: 8A                       loop end
D0/2396: C9 FF                    play sound effect $FF
*D0/2398: FF                       end of script

; [ Animation Script $0289: Water Edge (bg1) Rage Version]

D0/2399: 00 A0                    speed 1, align to center of screen
D0/239B: D1 01                    invalidate character/monster sprite priority
D0/239D: DB 03                    branch to $23A2 if character already stepped forward to attack
D0/239F: BF 67 70                 jump to subroutine $7067
D0/23A2: C4 80                    move bg1 thread to this thread's position
D0/23A4: C9 00                    play default sound effect
D0/23A6: 89 07                    loop start (7 times)
D0/23A8: 83 9F                    move back 32
D0/23AA: 8A                       loop end
D0/23AB: 89 60                    loop start (96 times)
D0/23AD: E9 0B 03                 move animation randomly (0..11,0..3)
D0/23B0: 83 63                    move forward 4
D0/23B2: 00                       [$00]
D0/23B3: 8A                       loop end
D0/23B4: C9 FF                    play sound effect $FF
*D0/23B6: DB 03                    branch to $23BB if character already stepped forward to attack
*D0/23B8: BF 8E 70                 jump to subroutine $708E
*D0/23BB: FF                       end of script

Since 0289 has a conditional to check to see if the character has moved forward, I changed the throw animation to use that instead of 01F6. Unfortunately, it didn't work. Shadow stepped back twice.

So, the actual solution to this is that Fire Skean and Bolt Edge will need their bg1 components copied to free space, with 5 bytes tagged onto the end of each one. Alternatively, you can eliminate 01F6 if it's not being used, use the free space to expand 01F4 and 01F7 by 5 bytes each, and then repoint the Animation Pointers in D1...

...But that's a lot of work for very modest gains. I don't think I'm going to release a patch on this. I'd recommend just not using Fire Skean or Bolt Edge on the Ninja's rage.

EDIT: Hang on. I'm falling into the same trap I always chide other people on. I'm so deep in the code that I'm missing the obvious solution, and trying to fix problems that don't exist! You don't need to add 5 bytes so the characters walk BACK. You just need them to not walk FORWARD in the first place.  Laugh Just NOP out the walk forward, and you're golden!

Alrighty. Here's your fix:
BOLT EDGE
D0/2342: EA EA
D0/2344: EA EA EA

WATER EDGE (Rage version: 0289)
(note this one has a walk forward AND a walk back)
D0/239D: EA EA
D0/239F: EA EA EA
...
D0/23B6: EA EA
D0/23B8: EA EA EA

WATER EDGE (Throw version: 01F6)
D0/237F: EA EA
D0/2381: EA EA EA

FIRE SKEAN
D0/23C0: EA EA
D0/23C2: EA EA EA

These changes will cause Gau to just stand in place, walking neither forward nor backward. They are untested, as I have something I need to run to tonight, but they should work. Also, note that THESE CHANGES WILL BREAK THE THROW COMMAND. This solution only works if Throw is not a part of your game.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  



Messages In This Thread
RE: Some final code requests (and screenshots) - by PowerPanda - 09-04-2018, 06:32 PM

Forum Jump:

Users browsing this thread: 3 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite