Users browsing this thread: 1 Guest(s)
BTB's Enemy Scripting Tutorial
12-05-2015, 03:21 AM
On a related note, here's something interesting I found in bank C2. I believe this is a bit of code that would have allowed debuggers/testers to instantly win any battle. First, it checks if the font color is set to 30,30,30 and then it checks if the select button and the down button are pressed on controller 1 (kinda like a secret code). If so, it basically does AI command F5 00 05 FF, which instantly kills all monsters. This is the only instance I've ever found that uses the F5 05 command. Unfortunately, whatever was supposed to jump to this code every frame has been removed, so the game needs to be hacked in order to make it work. Here's the original code:
To get this "instant win" code to work, I made the change below. Try it out, it's pretty fun.
Code:
; [ Defeat All Monsters Immediately (unused) ]
; debug
C2/643E: C2 20 REP #$20
C2/6440: AD 55 1D LDA $1D55 ; font color
C2/6443: C9 DE 7B CMP #$7BDE
C2/6446: E2 20 SEP #$20
C2/6448: D0 1E BNE $6468 ; branch if not (30,30,30)
C2/644A: AF 19 42 00 LDA $004219 ; controller 1
C2/644E: C9 28 CMP #$28
C2/6450: D0 16 BNE $6468 ; branch unless select and up are pressed on controller 1
C2/6452: A9 02 LDA #$02
C2/6454: 0C 96 3A TSB $3A96 ; make sure it's been pressed for more than one frame ???
C2/6457: D0 0F BNE $6468
C2/6459: A9 FF LDA #$FF ; affect all monsters
C2/645B: 85 B9 STA $B9
C2/645D: A9 05 LDA #$05 ; hide monsters and set wound status
C2/645F: 85 B8 STA $B8
C2/6461: A2 00 LDX #$00 ; enter/exit immediately
C2/6463: A9 24 LDA #$24 ; command $24 (monster entrance/exit)
C2/6465: 20 91 4E JSR $4E91 ; create immediate action
C2/6468: 60 RTS
this code was taken from ff3u, but is also present in ff6j at C2/6426
To get this "instant win" code to work, I made the change below. Try it out, it's pretty fun.
Code:
C2/001B: 20 3E 64 JSR $643E
C2/001E: 80 03 BRA $0023
Note that this hack replaces some of the code for the Quick spell.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)